| 1 |
# boot script for BeagleBone Black |
| 2 |
|
| 3 |
# BeagleBone white uses a different .dtb file, and flash-kernel is |
| 4 |
# currently unable to support multiple .dtb files. |
| 5 |
if test "${board_name}" = "A335BONE" |
| 6 |
then |
| 7 |
echo "BeagleBone white detected, unsupported platform." |
| 8 |
echo "Exiting in 10 seconds..." |
| 9 |
sleep 10 |
| 10 |
exit |
| 11 |
fi |
| 12 |
|
| 13 |
if test "${devtype}" = "" |
| 14 |
then |
| 15 |
setenv device mmc |
| 16 |
else |
| 17 |
# use device provided by distro_bootcmd |
| 18 |
setenv device "${devtype}" |
| 19 |
fi |
| 20 |
|
| 21 |
if test "${devnum}" = "" |
| 22 |
then |
| 23 |
setenv partition ${bootpart} |
| 24 |
elif test "${distro_bootpart}" = "" |
| 25 |
then |
| 26 |
# use partition provided by bootpart |
| 27 |
setenv partition ${devnum}:${bootpart} |
| 28 |
else |
| 29 |
# use partition provided by distro_bootpart |
| 30 |
setenv partition ${devnum}:${distro_bootpart} |
| 31 |
fi |
| 32 |
|
| 33 |
setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@ |
| 34 |
|
| 35 |
if test "${prefix}" = "" |
| 36 |
then |
| 37 |
setenv image_locations '/boot/ /' |
| 38 |
else |
| 39 |
# use prefix provided by distro_bootcmd |
| 40 |
setenv image_locations "${prefix}" |
| 41 |
fi |
| 42 |
|
| 43 |
if test -z "${fk_kvers}"; then |
| 44 |
setenv fk_kvers '@@KERNEL_VERSION@@' |
| 45 |
fi |
| 46 |
|
| 47 |
if test -n "${fdtfile}"; then |
| 48 |
setenv fdtpath dtbs/${fk_kvers}/${fdtfile} |
| 49 |
else |
| 50 |
setenv fdtpath dtb-${fk_kvers} |
| 51 |
fi |
| 52 |
|
| 53 |
for pathprefix in ${image_locations} |
| 54 |
do |
| 55 |
load ${device} ${partition} ${loadaddr} ${pathprefix}vmlinuz-${fk_kvers} \ |
| 56 |
&& load ${device} ${partition} ${fdtaddr} ${pathprefix}${fdtpath} \ |
| 57 |
&& load ${device} ${partition} ${rdaddr} ${pathprefix}initrd.img-${fk_kvers} \ |
| 58 |
&& echo "Booting Debian ${fk_kvers} from ${device} ${partition}..." \ |
| 59 |
&& bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr} |
| 60 |
done |