From: <abe...@us...> - 2016-03-03 17:56:50
|
Revision: 7570 http://sourceforge.net/p/astlinux/code/7570 Author: abelbeck Date: 2016-03-03 17:56:47 +0000 (Thu, 03 Mar 2016) Log Message: ----------- build system, allow RUNNIX to be built on a 64-bit system and still allow 'astlinux-makeimage' to work on 32-bit system Modified Paths: -------------- branches/1.0/boot/syslinux/syslinux.mk branches/1.0/scripts/astlinux-makeimage Modified: branches/1.0/boot/syslinux/syslinux.mk =================================================================== --- branches/1.0/boot/syslinux/syslinux.mk 2016-03-01 16:49:16 UTC (rev 7569) +++ branches/1.0/boot/syslinux/syslinux.mk 2016-03-03 17:56:47 UTC (rev 7570) @@ -13,6 +13,8 @@ SYSLINUX_DEPENDENCIES = host-nasm +HOST_SYSLINUX_DEPENDENCIES = host-nasm + define SYSLINUX_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) CC="$(HOSTCC)" AR="$(HOSTAR)" -C $(@D) endef @@ -26,4 +28,13 @@ done endef +define HOST_SYSLINUX_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_SYSLINUX_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/linux/syslinux $(HOST_DIR)/usr/sbin/syslinux +endef + $(eval $(call GENTARGETS,boot,syslinux)) +$(eval $(call GENTARGETS,boot,syslinux,host)) Modified: branches/1.0/scripts/astlinux-makeimage =================================================================== --- branches/1.0/scripts/astlinux-makeimage 2016-03-01 16:49:16 UTC (rev 7569) +++ branches/1.0/scripts/astlinux-makeimage 2016-03-03 17:56:47 UTC (rev 7570) @@ -9,8 +9,15 @@ HOST_BIN="./output/host/usr/sbin" -# Package host-fdisk builds: -REQUIRED_HOST_CMDS="fdisk" +# +# If the RUNNIX package was built on a x86_64 system, ./syslinux is not executable on a 32-bit build system. +# In such a case, we need to locally build host-syslinux for 32-bit systems, host-fdisk is always needed. +# +if [ "$(uname -m)" != "x86_64" ]; then + REQUIRED_HOST_CMDS="fdisk syslinux" +else + REQUIRED_HOST_CMDS="fdisk" +fi REQUIRED_CMDS="which sudo mkdosfs mkfs losetup gzip" @@ -64,6 +71,12 @@ exit 1 fi +for i in $REQUIRED_HOST_CMDS; do + if [ ! -x "$HOST_BIN/$i" ]; then + make host-$i + fi +done + error=0 for i in $REQUIRED_HOST_CMDS; do if [ ! -x "$HOST_BIN/$i" ]; then @@ -195,10 +208,16 @@ ## " +if [ -x $HOST_BIN/syslinux ]; then + SYSLINUX="$(pwd)/$HOST_BIN/syslinux" +else + SYSLINUX="./syslinux" +fi + # run syslinux and copy the master boot record ( cd ${RUNNIX_DIR} - sudo ./syslinux ${LOOPD}1 + sudo ${SYSLINUX} ${LOOPD}1 sudo bash -c "cat mbr.bin > ${LOOPD}0" ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |