diff --git a/configure b/configure index d4c1d5e935..692eedfb79 100755 --- a/configure +++ b/configure @@ -293,6 +293,8 @@ HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR= HAIKU_ADD_ALTERNATIVE_GCC_LIBS= HOST_GCC_LD=`gcc -print-prog-name=ld` HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy` +SFDISK_BINARY=sfdisk +HOST_SFDISK=$SFDISK_BINARY haikuRequiredLegacyGCCVersion="2.95.3-haiku-090629" export haikuRequiredLegacyGCCVersion @@ -415,6 +417,7 @@ case "${platform}" in ;; Darwin) HOST_PLATFORM=darwin ;; FreeBSD) HOST_PLATFORM=freebsd + SFDISK_BINARY=sfdisk-linux if [ "$HAIKU_USE_32BIT" = 1 ] ; then echo Unsupported platform: FreeBSD ${platformMachine} exit 1 @@ -451,6 +454,13 @@ if [ $targetArch = "x86" ]; then fi fi +# check common locations for sfdisk +for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do + if [ -e ${sfdiskDir}/${SFDISK_BINARY} ]; then + HOST_SFDISK=${sfdiskDir}/${SFDISK_BINARY} + fi +done + # check for case-sensitive filesystem if on darwin if [ $HOST_PLATFORM = "darwin" ]; then diskutil info $(pwd) | grep -i "case-sensitive" > /dev/null @@ -546,6 +556,7 @@ HOST_GCC_RAW_VERSION ?= ${HOST_GCC_RAW_VERSION} ; HOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ; HOST_LD ?= ${HOST_GCC_LD} ; HOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ; +HOST_SFDISK ?= ${HOST_SFDISK} ; EOF diff --git a/src/system/boot/platform/u-boot/Jamfile b/src/system/boot/platform/u-boot/Jamfile index a5e67702e3..16bb0d9a8a 100644 --- a/src/system/boot/platform/u-boot/Jamfile +++ b/src/system/boot/platform/u-boot/Jamfile @@ -144,7 +144,7 @@ rule BuildUBootSDImage image : files Depends $(image) : $(files) ; SDIMAGE_BLOCK_SIZE on $(image) = 1M ; SDIMAGE_SIZE on $(image) = $(HAIKU_BOARD_SDIMAGE_SIZE) ; - SDIMAGE_FDISK on $(image) = /sbin/sfdisk ; + SDIMAGE_FDISK on $(image) = $(HOST_SFDISK) ; SDIMAGE_FDISK_SCRIPT on $(image) = "0,$(HAIKU_BOARD_SDIMAGE_FAT_SIZE),0c,-\\\n,,eb\\\n\\\n" ; SDIMAGE_FDISK_H on $(image) = 255 ;