]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - config/u-boot/boot.cmd
u-boot: add config for aarch64
[people/pmueller/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
959b404e 37 if test "${fdtfile}" = "bcm2837-rpi-3-b-plus.dtb"; then
2a0947f2
AF
38 setenv console ttyS1,115200n8;
39 else
959b404e
AF
40 if test "${fdtfile}" = "bcm2837-rpi-3-b.dtb"; then
41 setenv console ttyS1,115200n8;
42 else
43 setenv console ttyAMA0,115200n8;
44 fi;
2a0947f2
AF
45 fi;
46 else
47 setenv console ttyS0,115200n8;
48 fi;
49 fi
50 echo Set console to ${console};
a06f9daf 51 setenv bootargs console=${console} root=${root_dev} rootwait;
2a0947f2
AF
52else
53 echo Set console to tty1 ;
a06f9daf 54 setenv bootargs console=tty1 root=${root_dev} rootwait;
2a0947f2
AF
55fi;
56
57setenv fdt_high ffffffff;
592896d2
AF
58fatload ${boot_dev} ${boot_part} ${kernel_addr_r} vmlinuz-${KVER}-ipfire-${kernel_type};
59fatload ${boot_dev} ${boot_part} ${fdt_addr_r} dtb-${KVER}-ipfire-${kernel_type}/${fdtfile};
60setenv ramdisk_addr ${ramdisk_addr_r}
61if fatload ${boot_dev} ${boot_part} ${ramdisk_addr} uInit-${KVER}-ipfire-${kernel_type}; then
2a0947f2
AF
62 echo Ramdisk loaded...;
63else
64 echo Ramdisk not loaded...;
592896d2 65 setenv ramdisk_addr -;
2a0947f2 66fi ;
592896d2 67bootz ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r};
963f6e97 68booti ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r};
2a0947f2
AF
69
70# Recompile with:
71# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr