]> git.ipfire.org Git - ipfire-2.x.git/blame - config/u-boot/boot.cmd
swconfig: update switch config script for Lamobo R1
[ipfire-2.x.git] / config / u-boot / boot.cmd
CommitLineData
592896d2
AF
1if test ${boot_dev} = ""; then
2 setenv boot_dev mmc;
3 setenv root_dev /dev/mmcblk0p3;
4fi;
5
6if test ${boot_part} = ""; then
cd99c473 7 setenv boot_part 0:1;
592896d2
AF
8fi;
9
10if test ${soc} = "kirkwood"; then
11 setenv kernel_type kirkwood;
12else
13 setenv kernel_type multi;
14fi;
15
2a0947f2 16# Import uEnv txt...
592896d2 17if fatload ${boot_dev} ${boot_part} ${kernel_addr_r} uEnv.txt; then
2a0947f2
AF
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;
26fi;
27
28# for compatiblity reasons set DTBSUNXI if we run on sunxi
29if test "${board}" = "sunxi"; then
30 setenv fdtfile ${DTBSUNXI};
31fi;
32
33# Check if serial console is enabled
34if 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};
a06f9daf 47 setenv bootargs console=${console} root=${root_dev} rootwait;
2a0947f2
AF
48else
49 echo Set console to tty1 ;
a06f9daf 50 setenv bootargs console=tty1 root=${root_dev} rootwait;
2a0947f2
AF
51fi;
52
53setenv fdt_high ffffffff;
592896d2
AF
54fatload ${boot_dev} ${boot_part} ${kernel_addr_r} vmlinuz-${KVER}-ipfire-${kernel_type};
55fatload ${boot_dev} ${boot_part} ${fdt_addr_r} dtb-${KVER}-ipfire-${kernel_type}/${fdtfile};
56setenv ramdisk_addr ${ramdisk_addr_r}
57if fatload ${boot_dev} ${boot_part} ${ramdisk_addr} uInit-${KVER}-ipfire-${kernel_type}; then
2a0947f2
AF
58 echo Ramdisk loaded...;
59else
60 echo Ramdisk not loaded...;
592896d2 61 setenv ramdisk_addr -;
2a0947f2 62fi ;
592896d2 63bootz ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r};
2a0947f2
AF
64
65# Recompile with:
66# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr