]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - config/u-boot/boot.cmd
e8ee59a0888f80370db0b44fc69414f297097f8b
[people/pmueller/ipfire-2.x.git] / config / u-boot / boot.cmd
1 if test ${boot_dev} = ""; then
2 setenv boot_dev mmc;
3 setenv root_dev /dev/mmcblk0p3;
4 fi;
5
6 if test ${boot_part} = ""; then
7 setenv boot_part 0:1;
8 fi;
9
10 if test ${soc} = "kirkwood"; then
11 setenv kernel_type kirkwood;
12 else
13 setenv kernel_type multi;
14 fi;
15
16 # Import uEnv txt...
17 if fatload ${boot_dev} ${boot_part} ${kernel_addr_r} uEnv.txt; then
18 echo Load uEnv.txt...;
19 env import -t ${kernel_addr_r} ${filesize};
20 if test "${uenvcmd}" = ""; then
21 echo ...;
22 else
23 echo Boot with uEnv.txt...;
24 run uenvcmd;
25 fi;
26 fi;
27
28 # for compatiblity reasons set DTBSUNXI if we run on sunxi
29 if test "${board}" = "sunxi"; then
30 setenv fdtfile ${DTBSUNXI};
31 fi;
32
33 # Check if serial console is enabled
34 if test "${SERIAL-CONSOLE}" = "ON"; then
35 if test ${console} = ""; then
36 if test "${board}" = "rpi"; then
37 if test "${fdtfile}" = "bcm2837-rpi-3-b.dtb"; then
38 setenv console ttyS1,115200n8;
39 else
40 setenv console ttyAMA0,115200n8;
41 fi;
42 else
43 setenv console ttyS0,115200n8;
44 fi;
45 fi
46 echo Set console to ${console};
47 setenv bootargs console=${console} rootwait root=${root_dev} rootwait;
48 else
49 echo Set console to tty1 ;
50 setenv bootargs console=tty1 rootwait root=${root_dev} rootwait;
51 fi;
52
53 setenv fdt_high ffffffff;
54 fatload ${boot_dev} ${boot_part} ${kernel_addr_r} vmlinuz-${KVER}-ipfire-${kernel_type};
55 fatload ${boot_dev} ${boot_part} ${fdt_addr_r} dtb-${KVER}-ipfire-${kernel_type}/${fdtfile};
56 setenv ramdisk_addr ${ramdisk_addr_r}
57 if fatload ${boot_dev} ${boot_part} ${ramdisk_addr} uInit-${KVER}-ipfire-${kernel_type}; then
58 echo Ramdisk loaded...;
59 else
60 echo Ramdisk not loaded...;
61 setenv ramdisk_addr -;
62 fi ;
63 bootz ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r};
64
65 # Recompile with:
66 # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr