Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Compilation Errors in armv8a and fix issue with NOS image discovery #459

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions build-config/make/images.make
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,17 @@ endif
sysroot-check: $(SYSROOT_CHECK_STAMP)
$(SYSROOT_CHECK_STAMP): $(PACKAGES_INSTALL_STAMPS)
$(Q) for file in $(SYSROOT_LIBS) ; do \
[ -r "$(DEV_SYSROOT)/lib/$$file" ] || { \
echo "ERROR: Missing SYSROOT_LIB: $$file" ; \
exit 1; } ; \
find $(DEV_SYSROOT)/lib -name $$file | xargs -i \
cp -av {} $(SYSROOTDIR)/lib/ || exit 1 ; \
if [ "$(ARCH)" == "arm64" ] || [ "$(ARCH)" == "x86_64" ] ; then \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is x86_64 included here? x86_64 is currently building fine as it is with the new crosstool-ng.

It seems like this is only an arm64 issue. I'm probably missing something.

[ -r "$(DEV_SYSROOT)/lib64/$$file" ] || [ -r "$(DEV_SYSROOT)/lib/$$file" ] || { \
echo "ERROR: Missing SYSROOT_LIB: $$file" ; \
exit 1; } ; \
find $(DEV_SYSROOT)/lib64 $(DEV_SYSROOT)/lib -name $$file | xargs -i cp -av {} $(SYSROOTDIR)/lib/ || exit 1 ; \
else \
[ -r "$(DEV_SYSROOT)/lib/$$file" ] || { \
echo "ERROR: Missing SYSROOT_LIB: $$file" ; \
exit 1; } ; \
find $(DEV_SYSROOT)/lib -name $$file | xargs -i cp -av {} $(SYSROOTDIR)/lib/ || exit 1 ; \
fi; \
done
$(Q) for file in $(DEBUG_UTILS) ; do \
cp -av $$file $(SYSROOTDIR)/usr/bin || exit 1 ; \
Expand Down
6 changes: 6 additions & 0 deletions build-config/make/sysroot.make
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ $(SYSROOT_INIT_STAMP): $(TREE_STAMP)
$(Q) mkdir -p -v -m 0755 $(SYSROOTDIR)/dev
$(Q) mkdir -p -v $(SYSROOTDIR)/{sys,proc,tmp,etc,lib,mnt}
$(Q) mkdir -p -v $(SYSROOTDIR)/{var/log,usr/lib,usr/bin,usr/sbin,usr/share/locale,lib,mnt}
$(Q) cd $(SYSROOTDIR) && ln -s lib lib32 && ln -s lib lib64
$(Q) cd $(SYSROOTDIR)/usr && ln -s lib lib32 && ln -s lib lib64
$(Q) touch $@

# Development sysroot, used for compiling and linking user space
Expand All @@ -53,6 +55,10 @@ $(DEV_SYSROOT_INIT_STAMP): $(TREE_STAMP) | $(XTOOLS_BUILD_STAMP)
$(Q) echo "==== Preparing a new development sysroot ===="
$(Q) rm -rf $(DEV_SYSROOT)
$(Q) cp -a $$($(CROSSBIN)/$(CROSSPREFIX)gcc -print-sysroot) $(DEV_SYSROOT)
$(Q) rsync -rl $(XTOOLS_INSTALL_DIR)/$(TARGET)/$(TARGET)/lib $(DEV_SYSROOT)
ifeq ($(ARCH),$(filter $(ARCH),arm64 x86_64))
$(Q) rsync -rl $(XTOOLS_INSTALL_DIR)/$(TARGET)/$(TARGET)/lib64 $(DEV_SYSROOT)
endif
$(Q) chmod +w -R $(DEV_SYSROOT)
$(Q) touch $@

Expand Down
10 changes: 6 additions & 4 deletions build-config/scripts/onie-mk-iso.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ RECOVERY_ISO_IMAGE=${12}
echo "ERROR: Unable to read recovery config directory: $RECOVERY_CONF_DIR"
exit 1
}
[ -r "${GRUB_TARGET_LIB_I386_DIR}/biosdisk.mod" ] || {
echo "ERROR: Does not look like valid GRUB i386-pc library directory: $GRUB_TARGET_LIB_I386_DIR"
exit 1
}
if [ "$FIRMWARE_TYPE" = "auto" ] || [ "$FIRMWARE_TYPE" = "bios" ] ; then
[ -r "${GRUB_TARGET_LIB_I386_DIR}/biosdisk.mod" ] || {
echo "ERROR: Does not look like valid GRUB i386-pc library directory: $GRUB_TARGET_LIB_I386_DIR"
exit 1
}
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onie-mk-iso.sh change looks OK to me. This is orthogonal to the above bit about lib32 / lib64. Let's make this a separate patch.

[ -x "${GRUB_HOST_BIN_I386_DIR}/grub-mkimage" ] || {
echo "ERROR: Does not look like valid GRUB i386-pc bin directory: $GRUB_HOST_BIN_I386_DIR"
exit 1
Expand Down