Ticket #5211: ConfigureDetectSfdisk.patch

File ConfigureDetectSfdisk.patch, 1.8 KB (added by mmadia, 13 years ago)

Fixed typos. Introduced another variable to handle 'sfdisk-linux' for FreeBSD

  • configure

     
    293293HAIKU_ADD_ALTERNATIVE_GCC_LIBS=
    294294HOST_GCC_LD=`gcc -print-prog-name=ld`
    295295HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy`
     296SFDISK_BINARY=sfdisk
     297HOST_SFDISK=$SFDISK_BINARY
    296298
    297299haikuRequiredLegacyGCCVersion="2.95.3-haiku-090629"
    298300export haikuRequiredLegacyGCCVersion
     
    415417            ;;
    416418    Darwin) HOST_PLATFORM=darwin ;;
    417419    FreeBSD)    HOST_PLATFORM=freebsd
     420                SFDISK_BINARY=sfdisk-linux
    418421                if [ "$HAIKU_USE_32BIT" = 1 ] ; then
    419422                    echo Unsupported platform: FreeBSD ${platformMachine}
    420423                    exit 1
     
    451454    fi
    452455fi
    453456
     457# check common locations for sfdisk
     458for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do
     459    if [ -e ${sfdiskDir}/${SFDISK_BINARY} ]; then
     460        HOST_SFDISK=${sfdiskDir}/${SFDISK_BINARY}
     461    fi
     462done   
     463
    454464# check for case-sensitive filesystem if on darwin
    455465if [ $HOST_PLATFORM = "darwin" ]; then
    456466    diskutil info $(pwd) | grep -i "case-sensitive" > /dev/null
     
    546556HOST_GCC_MACHINE            ?= ${HOST_GCC_MACHINE} ;
    547557HOST_LD                     ?= ${HOST_GCC_LD} ;
    548558HOST_OBJCOPY                ?= ${HOST_GCC_OBJCOPY} ;
     559HOST_SFDISK                 ?= ${HOST_SFDISK} ;
    549560
    550561EOF
    551562
  • src/system/boot/platform/u-boot/Jamfile

     
    144144    Depends $(image) : $(files) ;
    145145    SDIMAGE_BLOCK_SIZE on $(image) = 1M ;
    146146    SDIMAGE_SIZE on $(image) = $(HAIKU_BOARD_SDIMAGE_SIZE) ;
    147     SDIMAGE_FDISK on $(image) = /sbin/sfdisk ;
     147    SDIMAGE_FDISK on $(image) = $(HOST_SFDISK) ;
    148148    SDIMAGE_FDISK_SCRIPT on $(image) =
    149149        "0,$(HAIKU_BOARD_SDIMAGE_FAT_SIZE),0c,-\\\n,,eb\\\n\\\n" ;
    150150    SDIMAGE_FDISK_H on $(image) = 255 ;