--- trunk/grubby/new-kernel-pkg 2012/07/02 13:07:56 1848 +++ trunk/grubby/new-kernel-pkg 2012/10/01 12:33:17 1937 @@ -122,25 +122,10 @@ ubootDevice=/dev/${UBOOT_DEVICE:-"mmcblk0p1"} ubootDefaultImage=${UBOOT_UIMAGE:-"uImage"} ubootDefaultInitrd=${UBOOT_UINITRD:-"uInitrd"} + ubootAddress=${UBOOT_IMGADDR:-"0x00008000"} mounted="" liloFlag="" isx86="" - if [[ -z ${UBOOT_IMGADDR} ]] - then - machine=${MACHINE:-$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')} - # A few machines use an alternate kernel load address - if [[ "${machine}" =~ ^OMAP[3|4].* ]] - then - ubootAddress=0x80008000 - elif [[ "${machine}" =~ ^Efika\ MX.* ]] - then - ubootAddress=0x90008000 - else - ubootAddress=0x00008000 - fi - else - ubootAddress="${UBOOT_IMGADDR}" - fi else # this leaves i?86 and x86_64 liloConfig=/etc/lilo.conf @@ -879,6 +864,21 @@ fi fi +# if we're using U-Boot, check if the default load address should change +if [[ -n ${cfguBoot} ]] && [[ -z ${UBOOT_IMGADDR} ]] +then + [[ ${version} =~ .([^.]*)$ ]] + platform=${BASH_REMATCH[1]} + # A few platforms use an alternate kernel load address + if [[ ${platform} = omap ]] + then + ubootAddress=0x80008000 + elif [[ ${platform} = imx ]] + then + ubootAddress=0x90008000 + fi +fi + # if we have a lilo config on an x86 box, see if the default boot loader # is lilo to determine if it should be run if [[ -n ${cfgLilo} ]] && [[ -n ${isx86} ]]