122 |
ubootDevice=/dev/${UBOOT_DEVICE:-"mmcblk0p1"} |
ubootDevice=/dev/${UBOOT_DEVICE:-"mmcblk0p1"} |
123 |
ubootDefaultImage=${UBOOT_UIMAGE:-"uImage"} |
ubootDefaultImage=${UBOOT_UIMAGE:-"uImage"} |
124 |
ubootDefaultInitrd=${UBOOT_UINITRD:-"uInitrd"} |
ubootDefaultInitrd=${UBOOT_UINITRD:-"uInitrd"} |
125 |
|
ubootAddress=${UBOOT_IMGADDR:-"0x00008000"} |
126 |
mounted="" |
mounted="" |
127 |
liloFlag="" |
liloFlag="" |
128 |
isx86="" |
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 |
|
129 |
else |
else |
130 |
# this leaves i?86 and x86_64 |
# this leaves i?86 and x86_64 |
131 |
liloConfig=/etc/lilo.conf |
liloConfig=/etc/lilo.conf |
278 |
else |
else |
279 |
title="Magellan Linux [ ${version} ]" |
title="Magellan Linux [ ${version} ]" |
280 |
fi |
fi |
281 |
${grubby} --grub2 -c ${grub2EfiConfig} \ |
${grubby} --grub2 -c ${grub2EfiConfig} --efi \ |
282 |
--add-kernel=${bootPrefix}/${kernelName}-${version} \ |
--add-kernel=${bootPrefix}/${kernelName}-${version} \ |
283 |
${INITRD} --copy-default ${makedefault} --title "${title}" \ |
${INITRD} --copy-default ${makedefault} --title "${title}" \ |
284 |
${mbkernel:+--add-multiboot="${mbkernel}"} \ |
${mbkernel:+--add-multiboot="${mbkernel}"} \ |
864 |
fi |
fi |
865 |
fi |
fi |
866 |
|
|
867 |
|
# if we're using U-Boot, check if the default load address should change |
868 |
|
if [[ -n ${cfguBoot} ]] && [[ -z ${UBOOT_IMGADDR} ]] |
869 |
|
then |
870 |
|
[[ ${version} =~ .([^.]*)$ ]] |
871 |
|
platform=${BASH_REMATCH[1]} |
872 |
|
# A few platforms use an alternate kernel load address |
873 |
|
if [[ ${platform} = omap ]] |
874 |
|
then |
875 |
|
ubootAddress=0x80008000 |
876 |
|
elif [[ ${platform} = imx ]] |
877 |
|
then |
878 |
|
ubootAddress=0x90008000 |
879 |
|
fi |
880 |
|
fi |
881 |
|
|
882 |
# if we have a lilo config on an x86 box, see if the default boot loader |
# if we have a lilo config on an x86 box, see if the default boot loader |
883 |
# is lilo to determine if it should be run |
# is lilo to determine if it should be run |
884 |
if [[ -n ${cfgLilo} ]] && [[ -n ${isx86} ]] |
if [[ -n ${cfgLilo} ]] && [[ -n ${isx86} ]] |