1 if test ${boot_dev} = ""; then
3 setenv root_dev /dev/mmcblk0p3;
6 if test ${dev_num} = ""; then
10 if test ${boot_part} = ""; then
11 setenv boot_part ${dev_num}:1;
14 if test ${soc} = "kirkwood"; then
15 setenv kernel_type -kirkwood;
17 if test ${cpu} = "armv8"; then
20 setenv kernel_type -multi;
25 if fatload ${boot_dev} ${boot_part} ${kernel_addr_r} uEnv.txt; then
26 echo Load uEnv.txt...;
27 env import -t ${kernel_addr_r} ${filesize};
28 if test "${uenvcmd}" = ""; then
31 echo Boot with uEnv.txt...;
36 # for compatiblity reasons set DTBSUNXI if we run on sunxi
37 if test "${board}" = "sunxi"; then
38 setenv fdtfile ${DTBSUNXI};
41 # Check if serial console is enabled
42 if test "${SERIAL-CONSOLE}" = "ON"; then
43 if test ${console} = ""; then
44 if test "${board}" = "rpi"; then
45 if test ${cpu} = "armv8"; then
46 if test "${fdtfile}" = "broadcom/bcm2837-rpi-3-b-plus.dtb"; then
47 setenv console ttyS1,115200n8;
49 if test "${fdtfile}" = "broadcom/bcm2837-rpi-3-b.dtb"; then
50 setenv console ttyS1,115200n8;
52 setenv console ttyAMA0,115200n8;
56 if test "${fdtfile}" = "bcm2837-rpi-3-b-plus.dtb"; then
57 setenv console ttyS1,115200n8;
59 if test "${fdtfile}" = "bcm2837-rpi-3-b.dtb"; then
60 setenv console ttyS1,115200n8;
62 setenv console ttyAMA0,115200n8;
67 setenv console ttyS0,115200n8;
70 echo Set console to ${console};
71 setenv bootargs console=${console} root=${root_dev} rootwait;
73 echo Set console to tty1 ;
74 setenv bootargs console=tty1 root=${root_dev} rootwait;
77 setenv fdt_high ffffffff;
78 fatload ${boot_dev} ${boot_part} ${kernel_addr_r} vmlinuz-${KVER}-ipfire${kernel_type};
79 fatload ${boot_dev} ${boot_part} ${fdt_addr_r} dtb-${KVER}-ipfire${kernel_type}/${fdtfile};
81 if test "${FDTCMDS}" = ""; then
84 fdt addr ${fdt_addr_r};
88 setenv ramdisk_addr ${ramdisk_addr_r}
89 if fatload ${boot_dev} ${boot_part} ${ramdisk_addr} uInit-${KVER}-ipfire${kernel_type}; then
90 echo Ramdisk loaded...;
92 echo Ramdisk not loaded...;
93 setenv ramdisk_addr -;
95 bootz ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r};
96 booti ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r};
98 bootz ${kernel_addr_r} - ${fdt_addr_r};
99 booti ${kernel_addr_r} - ${fdt_addr_r};
102 # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr