]>
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 | |
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}; | |
592896d2 | 47 | setenv bootargs console=${console} rootwait root=${root_dev} rootwait; |
2a0947f2 AF |
48 | else |
49 | echo Set console to tty1 ; | |
592896d2 | 50 | setenv bootargs console=tty1 rootwait root=${root_dev} rootwait; |
2a0947f2 AF |
51 | fi; |
52 | ||
53 | setenv fdt_high ffffffff; | |
592896d2 AF |
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 | |
2a0947f2 AF |
58 | echo Ramdisk loaded...; |
59 | else | |
60 | echo Ramdisk not loaded...; | |
592896d2 | 61 | setenv ramdisk_addr -; |
2a0947f2 | 62 | fi ; |
592896d2 | 63 | bootz ${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 |