target: socfpga: Add Altera SoCFPGA support
[openwrt.git] / package / boot / uboot-socfpga / patches / 0002-arm-socfpga-Tweak-SoCkit-default-env-for-OpenWRT.patch
1 From 3a0e4875b00e9e487b0081116a81ed17cfd5143f Mon Sep 17 00:00:00 2001
2 From: Marek Vasut <marex@denx.de>
3 Date: Sun, 3 Apr 2016 19:27:23 +0200
4 Subject: [PATCH 2/2] arm: socfpga: Tweak SoCkit default env for OpenWRT
5
6 Tweak the default environment on SoCFPGA SoCkit to match OpenWRT.
7 This means switching to fitImage, which is already available, but
8 not used by the environment and weeding out completely dysfunctional
9 pieces of the environment.
10
11 Signed-off-by: Marek Vasut <marex@denx.de>
12 ---
13  include/configs/socfpga_sockit.h | 20 ++++++--------------
14  1 file changed, 6 insertions(+), 14 deletions(-)
15
16 diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h
17 index 07cfcbf..5a90105 100644
18 --- a/include/configs/socfpga_sockit.h
19 +++ b/include/configs/socfpga_sockit.h
20 @@ -35,7 +35,7 @@
21  
22  /* Booting Linux */
23  #define CONFIG_BOOTDELAY       3
24 -#define CONFIG_BOOTFILE                "fitImage"
25 +#define CONFIG_BOOTFILE                "openwrt-socfpga-socfpga_cyclone5_sockit-fit-uImage.itb"
26  #define CONFIG_BOOTARGS                "console=ttyS0," __stringify(CONFIG_BAUDRATE)
27  #define CONFIG_BOOTCOMMAND     "run mmcload; run mmcboot"
28  #define CONFIG_LOADADDR                0x01000000
29 @@ -51,28 +51,20 @@
30  
31  /* Extra Environment */
32  #define CONFIG_EXTRA_ENV_SETTINGS \
33 -       "verify=n\0" \
34         "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
35         "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
36 -               "bootm ${loadaddr} - ${fdt_addr}\0" \
37 -       "bootimage=zImage\0" \
38 -       "fdt_addr=100\0" \
39 -       "fdtimage=socfpga.dtb\0" \
40 -       "bootm ${loadaddr} - ${fdt_addr}\0" \
41 +               "bootm ${loadaddr}\0" \
42         "mmcroot=/dev/mmcblk0p2\0" \
43         "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
44                 " root=${mmcroot} rw rootwait;" \
45 -               "bootz ${loadaddr} - ${fdt_addr}\0" \
46 -       "mmcload=mmc rescan;" \
47 -               "load mmc 0:1 ${loadaddr} ${bootimage};" \
48 -               "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
49 +               "bootm ${loadaddr}\0" \
50 +       "mmcload=mmc rescan && load mmc 0:2 ${loadaddr} /boot/${bootfile}\0" \
51         "qspiload=sf probe && mtdparts default && run ubiload\0" \
52         "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
53                 " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\
54 -               "bootz ${loadaddr} - ${fdt_addr}\0" \
55 +               "bootz ${loadaddr}\0" \
56         "ubiload=ubi part UBI && ubifsmount ubi0 && " \
57 -               "ubifsload ${loadaddr} /boot/${bootimage} && " \
58 -               "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
59 +               "ubifsload ${loadaddr} /boot/${bootfile}\0"
60  
61  /* The rest of the configuration is shared */
62  #include <configs/socfpga_common.h>
63 -- 
64 2.8.0.rc3
65