]>
Commit | Line | Data |
---|---|---|
592896d2 AF |
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 | |
cd99c473 | 7 | setenv boot_part 0:1; |
592896d2 AF |
8 | fi; |
9 | ||
10 | if test ${soc} = "kirkwood"; then | |
11 | setenv kernel_type kirkwood; | |
12 | else | |
13 | setenv kernel_type multi; | |
14 | fi; | |
15 | ||
2a0947f2 | 16 | # Import uEnv txt... |
592896d2 | 17 | if 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; | |
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 | |
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 |
52 | else |
53 | echo Set console to tty1 ; | |
a06f9daf | 54 | setenv bootargs console=tty1 root=${root_dev} rootwait; |
2a0947f2 AF |
55 | fi; |
56 | ||
57 | setenv fdt_high ffffffff; | |
592896d2 AF |
58 | fatload ${boot_dev} ${boot_part} ${kernel_addr_r} vmlinuz-${KVER}-ipfire-${kernel_type}; |
59 | fatload ${boot_dev} ${boot_part} ${fdt_addr_r} dtb-${KVER}-ipfire-${kernel_type}/${fdtfile}; | |
60 | setenv ramdisk_addr ${ramdisk_addr_r} | |
61 | if fatload ${boot_dev} ${boot_part} ${ramdisk_addr} uInit-${KVER}-ipfire-${kernel_type}; then | |
2a0947f2 AF |
62 | echo Ramdisk loaded...; |
63 | else | |
64 | echo Ramdisk not loaded...; | |
592896d2 | 65 | setenv ramdisk_addr -; |
2a0947f2 | 66 | fi ; |
592896d2 | 67 | bootz ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}; |
2a0947f2 AF |
68 | |
69 | # Recompile with: | |
70 | # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr |