]> git.sur5r.net Git - u-boot/commitdiff
sunxi: Add environment settings to make extlinux.conf booting work
authorHans de Goede <hdegoede@redhat.com>
Fri, 1 Aug 2014 07:37:58 +0000 (09:37 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 12 Aug 2014 06:42:32 +0000 (08:42 +0200)
Automatic booting using an extlinux.conf file requires various environment
variables to be set.

Also modify CONFIG_SYS_LOAD_ADDR and CONFIG_STANDALONE_LOAD_ADDR to match
the value chosen for kernel_addr_r, see the added comment for why the new
value is chosen.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
23 files changed:
board/sunxi/Kconfig
configs/A10-OLinuXino-Lime_defconfig
configs/A10s-OLinuXino-M_defconfig
configs/A13-OLinuXinoM_defconfig
configs/A13-OLinuXino_defconfig
configs/A20-OLinuXino_MICRO_defconfig
configs/Auxtek-T004_defconfig
configs/Bananapi_defconfig
configs/Cubieboard2_FEL_defconfig
configs/Cubieboard2_defconfig
configs/Cubieboard_defconfig
configs/Cubietruck_FEL_defconfig
configs/Cubietruck_defconfig
configs/Linksprite_pcDuino3_defconfig
configs/Mele_A1000G_defconfig
configs/Mele_A1000_defconfig
configs/Mini-X-1Gb_defconfig
configs/Mini-X_defconfig
configs/ba10_tv_box_defconfig
configs/i12-tvbox_defconfig
configs/qt840a_defconfig
configs/r7-tv-dongle_defconfig
include/configs/sunxi-common.h

index 24cca4747b49120ed8f4090cd93fdc3b7772db16..c61c650735bc442afc4e86419255c3ede75d067e 100644 (file)
@@ -36,4 +36,7 @@ config SYS_SOC
        string
        default "sunxi"
 
+config FTDFILE
+       string "Default ftdfile env setting for this board"
+
 endif
index a4149537fc88b43fe42b4cc8f7020245af56ce15..b93ae7d52fb86978c593085f891637d012422228 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A10_OLINUXINO_L,SPL,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPC(3),USB_EHCI"
+CONFIG_FTDFILE="sun4i-a10-olinuxino-lime.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN4I=y
index 1560ab18ec04c7efbe46fb34389bce42fa398f9c..f2069704179193df78e22f872242a8323d5cd397 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A10S_OLINUXINO_M,SPL,AXP152_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPB(10)"
+CONFIG_FTDFILE="sun5i-a10s-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN5I=y
index fb510d5cca1b30983977ebf5474c460c376dd201..8529dbe1416fb94ee4c1ecab7656dbfb850d4dd5 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINOM,SPL,CONS_INDEX=2,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
+CONFIG_FTDFILE="sun5i-a13-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN5I=y
index ba21136dc908f78d3d4ad1dd48fe9b7568e17145..c3a12cc17df883436882f5747dd9d89d9a9661d9 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A13_OLINUXINO,SPL,CONS_INDEX=2,AXP209_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(11)"
+CONFIG_FTDFILE="sun5i-a13-olinuxino.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN5I=y
index 52a857a7704df95e759908c25d21826bf2d57a22..c91319d551de43b31e848f9cf293a3d55e925d3e 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="A20_OLINUXINO_M,SPL,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-olinuxino-micro.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index 643e628f551ca95410bfe05b07d209d716dcf501..193019c926ac1a37a506d53a985111ba76c29d27 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="AUXTEK_T004,SPL,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
+CONFIG_FTDFILE="sun5i-a10s-auxtek-t004.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN5I=y
index be3d815568b35c364a46e97364d94f859fc9c7de..dc68469e08d55caf4440b3c1b5a173289dc989f1 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="BANANAPI,SPL,AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-bananapi.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index 63636b029ae22e2cdf2c6bce26353e57a2d5573e..ae5e25a561a6c97e5ec5298d84a3763912489c80 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,SPL_FEL,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index fa34c5178aff775172067ee660db4b1d036449b0..df87edc911fbc37767e9679be2454424960a218d 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD2,SPL,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-cubieboard2.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index 774029c8b03bc055a42c2ec2bf2d45038aad64c6..57bf045050a20fc4b98e6410e37d02fd26495c13 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIEBOARD,SPL,AXP209_POWER,SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8),USB_EHCI"
+CONFIG_FTDFILE="sun4i-a10-cubieboard.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN4I=y
index 7ebf6353ee0fb8977c9fef53575183509107fb2e..790125a344e5e359ba89fef11d80548c1fea580d 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,SPL_FEL,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index fbc912745ffd33213f0e6e8301ea8d67d6369245..4ad82e3cee2590fa36e47abdf20d742752638a77 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="CUBIETRUCK,SPL,AXP209_POWER,SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPH(12),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-cubietruck.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index 10ebcefdfdf86edd41979dadbc839e204c5e0076..22d0446387f576f7e7d2738652213ea9bee8c000 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="PCDUINO3,SPL,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-pcduino3.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index 20792798b85a63449f4477111b28bea2091eb9f2..fa47faea4aefefb26d74101786bed2e35a8e3725 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000G,SPL,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
+CONFIG_FTDFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN4I=y
index 13528abeb3f98b451cd393f8a02a505af3dca553..d7c156d30d91c6395daa27b327f3571c2c1130ea 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MELE_A1000,SPL,AXP209_POWER,SUNXI_EMAC,MACPWR=SUNXI_GPH(15),AHCI,USB_EHCI"
+CONFIG_FTDFILE="sun4i-a10-a1000.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN4I=y
index 61fa1de155431b03905628ede5b8e6c7e8fc626f..af0b8003bae9d82d1e2ae6ff5a14fca84996eeb6 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MINI_X_1GB,SPL,AXP209_POWER,USB_EHCI"
+CONFIG_FTDFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN4I=y
index ceb02c5cd06b6f1d6ee0c7a1489b6f4a5d5ae645..ea0c786c6544bb2e5f370584f3e032038421ec13 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="MINI_X,SPL,AXP209_POWER,USB_EHCI"
+CONFIG_FTDFILE="sun4i-a10-mini-xplus.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN4I=y
index 02a2538d79959a8df154c52da0681f359d427116..c9961bda7fcc994b031566252a5ac8302defa24f 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="BA10_TV_BOX,SPL,AXP209_POWER,SUNXI_EMAC,USB_EHCI,SUNXI_USB_VBUS1_GPIO=SUNXI_GPH(12)"
+CONFIG_FTDFILE="sun4i-a10-ba10-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN4I=y
index ff86841f9da69d17886dda77b3078f4aa46b7146..b2673127d0ebb90bbbc721015d5f81915790c7db 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="I12_TVBOX,SPL,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index acb100c71893a3f468baf421a3ec0c9e5191541d..73602124f88562de2db83aae06308dcc92261312 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="QT840A,SPL,AXP209_POWER,SUNXI_GMAC,MACPWR=SUNXI_GPH(21),USB_EHCI"
+CONFIG_FTDFILE="sun7i-a20-i12-tvbox.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN7I=y
index f0f97b05619c4f3ff39cd0adf4901973817eca11..35b66f0ff612f89607acbd2cb60fe96bc88d6314 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="R7DONGLE,SPL,AXP152_POWER,USB_EHCI,SUNXI_USB_VBUS0_GPIO=SUNXI_GPG(13)"
+CONFIG_FTDFILE="sun5i-a10s-r7-tv-dongle.dtb"
 +S:CONFIG_ARM=y
 +S:CONFIG_TARGET_SUN5I=y
index 9bfc4eede31b49495925c0ae26ec65bf3c66ef7d..e7689213834a21f3eb1a6c79a3fead264ff255ea 100644 (file)
 /* Boot Argument Buffer Size */
 #define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
 
-#define CONFIG_SYS_LOAD_ADDR           0x48000000 /* default load address */
+#define CONFIG_SYS_LOAD_ADDR           0x42000000 /* default load address */
 
 /* standalone support */
-#define CONFIG_STANDALONE_LOAD_ADDR    0x48000000
+#define CONFIG_STANDALONE_LOAD_ADDR    0x42000000
 
 #define CONFIG_SYS_HZ                  1000
 
 #ifndef CONFIG_SPL_BUILD
 #include <config_distro_defaults.h>
 
+/* 256M RAM (minimum), 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
+ * 1M script, 1M pxe and the ramdisk at the end */
+#define MEM_LAYOUT_ENV_SETTINGS \
+       "bootm_size=0x10000000\0" \
+       "kernel_addr_r=0x42000000\0" \
+       "fdt_addr_r=0x43000000\0" \
+       "scriptaddr=0x43100000\0" \
+       "pxefile_addr_r=0x43200000\0" \
+       "ramdisk_addr_r=0x43300000\0"
+
 #ifdef CONFIG_AHCI
 #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
 #else
 #include <config_distro_bootcmd.h>
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
-       "bootm_size=0x10000000\0" \
+       MEM_LAYOUT_ENV_SETTINGS \
+       "fdtfile=" CONFIG_FTDFILE "\0" \
+       "console=ttyS0,115200\0" \
        BOOTENV
 
 #else /* ifndef CONFIG_SPL_BUILD */