sunxi-common.h: Remove CONFIG_SYS_BOOT_GET_CMDLINE
PATCH 1/7 sunxi-common.h: Remove CONFIG_SYS_BOOT_GET_CMDLINE
sunxi does not need this and it should never have been enabled for it in the first place.
--- include/configs/sunxi-common.h | 2 -- 1 file changed, 2 deletions(-)
include/configs/sunxi-common.h +0 -2
@@ -126,8 +126,6 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "bootm_size=0x10000000\0" -#define CONFIG_SYS_BOOT_GET_CMDLINE -#include <config_cmd_default.h> #define CONFIG_FAT_WRITE /* enable write access */
Signature · 1 line
2.0.3
PATCH 2/7 sunxi-common.h: Remove dead #ifdef CONFIG_CMD_NET code block
We undef CONFIG_CMD_NET at line 167, and there is nothing re-defining it between line 167 and the #ifdef CONFIG_CMD_NET, so remove this effectively dead block.
--- include/configs/sunxi-common.h | 8 -------- 1 file changed, 8 deletions(-)
include/configs/sunxi-common.h +0 -8
@@ -205,14 +205,6 @@#define CONFIG_PHYLIB #endif -#ifdef CONFIG_CMD_NET -#define CONFIG_CMD_NFS -#define CONFIG_CMD_DNS -#define CONFIG_NETCONSOLE -#define CONFIG_BOOTP_DNS2 -#define CONFIG_BOOTP_SEND_HOSTNAME -#endif -#ifdef CONFIG_USB_EHCI #define CONFIG_CMD_USB #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1
Signature · 1 line
2.0.3
PATCH 2/7 sunxi-common.h: Remove dead #ifdef CONFIG_CMD_NET code block
Quoted 5 lines · Hans de Goede
We undef
CONFIG_CMD_NETat line 167, and there is nothing re-defining it between line 167 and the #ifdefCONFIG_CMD_NET, so remove this effectively dead block.Signed-off-by Hans de Goede <[email protected]>
PATCH 3/7 sunxi-common.h: Don't undefine CONFIG_CMD_NFS
In reply to Hans de GoedeI see no reason to override the choice to include this from config_cmd_defauls.h .
--- include/configs/sunxi-common.h | 1 - 1 file changed, 1 deletion(-)
include/configs/sunxi-common.h +0 -1
@@ -168,7 +168,6 @@#undef CONFIG_CMD_FPGA#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS/* I2C */ #define CONFIG_SPL_I2C_SUPPORT
Signature · 1 line
2.0.3
PATCH 3/7 sunxi-common.h: Don't undefine CONFIG_CMD_NFS
Quoted 4 lines · Hans de Goede
I see no reason to override the choice to include this from
config_cmd_defauls.h.Signed-off-by Hans de Goede <[email protected]>
PATCH 4/7 sunxi-common.h: Don't undef CONFIG_CMD_NET only to redefine it again later
In reply to Hans de Goedeconfig_distro_defaults.h which is include later will redefine CONFIG_CMD_NET, drop the useless / meaningless undef of it.
While at also move the undef of CONFIG_CMD_FPGA up to directly under the include of config_cmd_defaults.h, to make it clear that it overwrites the setting done from config_cmd_defaults.h .
--- include/configs/sunxi-common.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
include/configs/sunxi-common.h +1 -3
@@ -127,6 +127,7 @@ "bootm_size=0x10000000\0"#include <config_cmd_default.h> +#undef CONFIG_CMD_FPGA#define CONFIG_FAT_WRITE /* enable write access */
@@ -166,9 +167,6 @@#define CONFIG_SYS_SPL_MALLOC_START 0x4ff00000#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00080000/* 512 KiB */ -#undef CONFIG_CMD_FPGA -#undef CONFIG_CMD_NET -/* I2C */ #define CONFIG_SPL_I2C_SUPPORT #define CONFIG_SYS_I2C
Signature · 1 line
2.0.3
PATCH 4/7 sunxi-common.h: Don't undef CONFIG_CMD_NET only to redefine it again later
Quoted 8 lines · Hans de Goede
config_distro_defaults.hwhich is include later will redefineCONFIG_CMD_NET, drop the useless / meaningless undef of it.While at also move the undef of
CONFIG_CMD_FPGAup to directly under the include ofconfig_cmd_defaults.h, to make it clear that it overwrites the setting done fromconfig_cmd_defaults.h.Signed-off-by Hans de Goede <[email protected]>
PATCH 5/7 sunxi-common.h: Use new generic $bootcmd
In reply to Hans de GoedeUse the new standard bootcmd from <config_distro_bootcmd.h>.
--- include/configs/sunxi-common.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)
include/configs/sunxi-common.h +24 -3
@@ -123,9 +123,6 @@#define CONFIG_ENV_OFFSET (544 << 10)/* (8 + 24 + 512) KiB */ #define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootm_size=0x10000000\0" -#include <config_cmd_default.h> #undef CONFIG_CMD_FPGA
@@ -219,6 +216,30 @@#ifndef CONFIG_SPL_BUILD #include <config_distro_defaults.h> + +#ifdef CONFIG_AHCI +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(SCSI, scsi, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#endif + +#include <config_distro_bootcmd.h> + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + BOOTENV + +#else /* ifndef CONFIG_SPL_BUILD */ +#define CONFIG_EXTRA_ENV_SETTINGS #endif #endif /* _SUNXI_COMMON_CONFIG_H */
Signature · 1 line
2.0.3
PATCH 5/7 sunxi-common.h: Use new generic $bootcmd
Hi,
Quoted 1 line · Hans de Goede
Use the new standard bootcmd from <
config_distro_bootcmd.h>.
Note this applies on top of Stephen Warren's "[PATCH 1/3] config: introduce a generic $bootcmd"
Regards,
Hans
Quoted 52 lines
Signed-off-by Hans de Goede <[email protected]>--- include/configs/sunxi-common.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)include/configs/sunxi-common.h +24
-3@@ -123,9 +123,6 @@#define CONFIG_ENV_OFFSET (544 << 10)/* (8 + 24 + 512) KiB */ #define CONFIG_ENV_SIZE (128 << 10)/* 128 KiB */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootm_size=0x10000000\0" -#include <config_cmd_default.h> #undef CONFIG_CMD_FPGA@@ -219,6 +216,30 @@#ifndef CONFIG_SPL_BUILD #include <config_distro_defaults.h> + +#ifdef CONFIG_AHCI +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(SCSI, scsi, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#endif + +#include <config_distro_bootcmd.h> + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + BOOTENV + +#else /* ifndef CONFIG_SPL_BUILD */ +#define CONFIG_EXTRA_ENV_SETTINGS #endif #endif /* _SUNXI_COMMON_CONFIG_H */
PATCH 5/7 sunxi-common.h: Use new generic $bootcmd
In reply to Hans de GoedeQuoted 1 line · Hans de Goede
Use the new standard bootcmd from <
config_distro_bootcmd.h>.
Quoted 6 lines
include/configs/sunxi-common.h +4
-0+#ifdef CONFIG_AHCI +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(SCSI, scsi, 0) \
include/configs/sunxi-common.h line 233
Quoted 10 lines
include/configs/sunxi-common.h +10
-0+ func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#endif
In the spirit of using crazy macros (!) :-) I might code that as:
#ifdef CONFIG_AHCI
#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) #else
#define BOOT_TARGET_DEVICES_SCSI(func)
#endif
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ BOOT_TARGET_DEVICES_SCSI(func) \ func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)
... since it doesn't duplicate the rest of the main macro, but either way is fine by me.
PATCH 5/7 sunxi-common.h: Use new generic $bootcmd
Hi,
Quoted 4 lines · Stephen Warren
Quoted 1 line · Hans de Goede
Use the new standard bootcmd from <
config_distro_bootcmd.h>.Acked-by Stephen Warren <[email protected]>
Thanks for the review.
Quoted 25 lines
Quoted 6 lines
include/configs/sunxi-common.h +4
-0+#ifdef CONFIG_AHCI +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(SCSI, scsi, 0) \include/configs/sunxi-common.h line 233
Quoted 10 lines
include/configs/sunxi-common.h +10
-0+ func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#endif In the spirit of using crazy macros (!) :-) I might code that as:
#ifdef
CONFIG_AHCI
#defineBOOT_TARGET_DEVICES_SCSI(func)func(SCSI, scsi, 0)#else
#defineBOOT_TARGET_DEVICES_SCSI(func)
#endif
Quoted 8 lines
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ BOOT_TARGET_DEVICES_SCSI(func) \ func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)... since it doesn't duplicate the rest of the main macro, but either way is fine by me.
Ah, I like, esp. since in the future we may get boards without an USB host (tablets), and then things would get complicated but not with your trick.
I've modified this patch my personal tree to use your approach.
Regards,
Hans
PATCH 5/7 sunxi-common.h: Use new generic $bootcmd
Quoted 42 lines · Hans de Goede
Hi,
Quoted 4 lines · Stephen Warren
Quoted 1 line · Hans de Goede
Use the new standard bootcmd from <
config_distro_bootcmd.h>.Acked-by Stephen Warren <[email protected]>Thanks for the review.
Quoted 32 lines
Quoted 6 lines
include/configs/sunxi-common.h +4
-0+#ifdef CONFIG_AHCI +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(SCSI, scsi, 0) \include/configs/sunxi-common.h line 233
Quoted 10 lines
include/configs/sunxi-common.h +10
-0+ func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) +#endif In the spirit of using crazy macros (!) :-) I might code that as:
#ifdef
CONFIG_AHCI
#defineBOOT_TARGET_DEVICES_SCSI(func)func(SCSI, scsi, 0)#else
#defineBOOT_TARGET_DEVICES_SCSI(func)
#endif#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ BOOT_TARGET_DEVICES_SCSI(func) \ func(USB, usb, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)
Quoted 5 lines
Quoted 1 line
... since it doesn't duplicate the rest of the main macro, but either way is fine by me.
Ah, I like, esp. since in the future we may get boards without an USB host (tablets), and then things would get complicated but not with your trick.
Agreed, Stephen's way is much better and more flexible. We could use it even for the non-optional stuff right away I suppose but I'm not sure there is much point.
Quoted 1 line
I've modified this patch my personal tree to use your approach.
Ack to that in principal.
Ian.
PATCH 6/7 sunxi: Kconfig: move common settings into a shared code block
In reply to Hans de GoedeSYS_CPU, SYS_BOARD and SYS_SOC are identical for all sunxi boards, move them to a shared code block.
--- board/sunxi/Kconfig | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-)
board/sunxi/Kconfig +6 -26
@@ -1,17 +1,5 @@ if TARGET_SUN4I -config SYS_CPU - string - default "armv7" - -config SYS_BOARD - string - default "sunxi" - -config SYS_SOC - string - default "sunxi" - config SYS_CONFIG_NAME string default "sun4i"
@@ -20,25 +8,21 @@ endif if TARGET_SUN5I -config SYS_CPU +config SYS_CONFIG_NAME string - default "armv7" + default "sun5i" -config SYS_BOARD - string - default "sunxi" +endif -config SYS_SOC - string - default "sunxi" +if TARGET_SUN7I config SYS_CONFIG_NAME string - default "sun5i" + default "sun7i" endif -if TARGET_SUN7I +if TARGET_SUN4I || TARGET_SUN5I || TARGET_SUN7I config SYS_CPU string
@@ -52,8 +36,4 @@ config SYS_SOC string default "sunxi" -config SYS_CONFIG_NAME - string - default "sun7i" - endif
Signature · 1 line
2.0.3
PATCH 6/7 sunxi: Kconfig: move common settings into a shared code block
Quoted 4 lines · Hans de Goede
SYS_CPU,SYS_BOARDandSYS_SOCare identical for all sunxi boards, move them to a shared code block.Signed-off-by Hans de Goede <[email protected]>
This is an improvement so:
But eventually we could clean up even more, e.g.
config SYS_CONFIG_NAME
string
default "sun4i" if TARGET_SUN4I
default "sun5i" if TARGET_SUN5I
etc
Possibly even some things should be select'd rather than default'd.
Ian.
PATCH 6/7 sunxi: Kconfig: move common settings into a shared code block
Quoted 11 lines · Ian Campbell
Quoted 4 lines · Hans de Goede
SYS_CPU,SYS_BOARDandSYS_SOCare identical for all sunxi boards, move them to a shared code block.Signed-off-by Hans de Goede <[email protected]>This is an improvement so:
Acked-by Ian Campbell <[email protected]>But eventually we could clean up even more, e.g.
Quoted 7 lines
config
SYS_CONFIG_NAME
string
default "sun4i" ifTARGET_SUN4I
default "sun5i" ifTARGET_SUN5I
etcPossibly even some things should be select'd rather than default'd.
Selected sounds better. :)
PATCH 6/7 sunxi: Kconfig: move common settings into a shared code block
Quoted 18 lines · Chen-Yu Tsai
Quoted 17 lines · Ian Campbell
Quoted 4 lines · Hans de Goede
SYS_CPU,SYS_BOARDandSYS_SOCare identical for all sunxi boards, move them to a shared code block.Signed-off-by Hans de Goede <[email protected]>This is an improvement so:
Acked-by Ian Campbell <[email protected]>But eventually we could clean up even more, e.g.
config
SYS_CONFIG_NAME
string
default "sun4i" ifTARGET_SUN4I
default "sun5i" ifTARGET_SUN5I
etc
Quoted 3 lines
Quoted 1 line
Possibly even some things should be select'd rather than default'd.
Selected sounds better. :)
The main thing I know about select is that one needs to be very careful about when it is used, since it can have odd side effects....
Ian.
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
In reply to Hans de GoedeAutomatic booting using an extlinux.conf file requires various environment variables to be set.
--- board/sunxi/Kconfig | 3 +++ configs/A10-OLinuXino-Lime_defconfig | 1 + configs/A10s-OLinuXino-M_defconfig | 1 + configs/A13-OLinuXinoM_defconfig | 1 + configs/A13-OLinuXino_defconfig | 1 + configs/A20-OLinuXino_MICRO_defconfig | 1 + configs/Auxtek-T004_defconfig | 1 + configs/Bananapi_defconfig | 1 + configs/Cubieboard2_FEL_defconfig | 1 + configs/Cubieboard2_defconfig | 1 + configs/Cubieboard_defconfig | 1 + configs/Cubietruck_FEL_defconfig | 1 + configs/Cubietruck_defconfig | 1 + configs/Linksprite_pcDuino3_defconfig | 1 + configs/Mele_A1000G_defconfig | 1 + configs/Mele_A1000_defconfig | 1 + configs/Mini-X-1Gb_defconfig | 1 + configs/Mini-X_defconfig | 1 + configs/ba10_tv_box_defconfig | 1 + configs/i12-tvbox_defconfig | 1 + configs/qt840a_defconfig | 1 + configs/r7-tv-dongle_defconfig | 1 + include/configs/sunxi-common.h | 18 +++++++++++++++--- 23 files changed, 39 insertions(+), 3 deletions(-)
board/sunxi/Kconfig +3 -0
@@ -36,4 +36,7 @@ config SYS_SOC string default "sunxi" +config FTDFILE + string "Default ftdfile env setting for this board" + endif
configs/A10-OLinuXino-Lime_defconfig +1 -0
@@ -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
configs/A10s-OLinuXino-M_defconfig +1 -0
@@ -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
configs/A13-OLinuXinoM_defconfig +1 -0
@@ -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
configs/A13-OLinuXino_defconfig +1 -0
@@ -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
configs/A20-OLinuXino_MICRO_defconfig +1 -0
@@ -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
configs/Auxtek-T004_defconfig +1 -0
@@ -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
configs/Bananapi_defconfig +1 -0
@@ -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
configs/Cubieboard2_FEL_defconfig +1 -0
@@ -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
configs/Cubieboard2_defconfig +1 -0
@@ -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
configs/Cubieboard_defconfig +1 -0
@@ -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
configs/Cubietruck_FEL_defconfig +1 -0
@@ -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
configs/Cubietruck_defconfig +1 -0
@@ -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
configs/Linksprite_pcDuino3_defconfig +1 -0
@@ -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
configs/Mele_A1000G_defconfig +1 -0
@@ -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
configs/Mele_A1000_defconfig +1 -0
@@ -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
configs/Mini-X-1Gb_defconfig +1 -0
@@ -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
configs/Mini-X_defconfig +1 -0
@@ -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
configs/ba10_tv_box_defconfig +1 -0
@@ -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
configs/i12-tvbox_defconfig +1 -0
@@ -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
configs/qt840a_defconfig +1 -0
@@ -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
configs/r7-tv-dongle_defconfig +1 -0
@@ -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
include/configs/sunxi-common.h +15 -3
@@ -100,10 +100,10 @@/* 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
@@ -217,6 +217,16 @@#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 (func) \ func(MMC, mmc, 0) \
@@ -235,7 +245,9 @@#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 */
Signature · 1 line
2.0.3
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 10 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using 0xffffff has caused issues. I really think you should set bootm_size to something reasonable. beaglebones for instance has to be 0x10000000 as the beaglebone white only has 256M of ram. and let u-boot move things around, ensuring we do not get into a place where the decompressed kernel overwrites memory. This behaviour is what I had in the docs I had written earlier in the year.
Dennis
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>
Quoted 7 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues.
What kind of issues?
At least for Tegra, I've carefully chosen the values for the various load addresses so that there won't be issues. (Without that I can easily see the potential for issues.) I've seen far more repeated problems when U-Boot moves the DT/initrd around than than when it didn't (none in that case). Besides, it's completely redundant and unnecessary work if the blobs are already loaded at sane addresses, which they are on Tegra at least.
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 20 lines · On Fri, 01 Aug 2014 14:22:40 -0600 Stephen Warren <[email protected]> wrote:
Quoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>Quoted 7 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues.What kind of issues?
Quoted 7 lines
At least for Tegra, I've carefully chosen the values for the various load addresses so that there won't be issues. (Without that I can easily see the potential for issues.) I've seen far more repeated problems when U-Boot moves the DT/initrd around than than when it didn't (none in that case). Besides, it's completely redundant and unnecessary work if the blobs are already loaded at sane addresses, which they are on Tegra at least.
Mostly to do with the decompressed kernel overwriting the initrd or dtb resulting in machines that would hang on boot. it came up quite a few times earlier this year on both imx and omap.
Dennis
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
In reply to Stephen WarrenQuoted 20 lines · Stephen Warren
Quoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>Quoted 7 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues.What kind of issues?
Quoted 7 lines
At least for Tegra, I've carefully chosen the values for the various load addresses so that there won't be issues. (Without that I can easily see the potential for issues.) I've seen far more repeated problems when U-Boot moves the DT/initrd around than than when it didn't (none in that case). Besides, it's completely redundant and unnecessary work if the blobs are already loaded at sane addresses, which they are on Tegra at least.
Just how large of a kernel have you thrown on a Tegra? 32MB might seem reasonable at first but it wouldn't be overly surprised if someone can shove a BSS into there. I know I shoved DT into 128MB by default because a 32bit ARM kernel isn't functional at that size.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140801/d16ac361/attachment.pgp>
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 29 lines · Tom Rini
Quoted 20 lines · Stephen Warren
Quoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>Quoted 7 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues.What kind of issues?
Quoted 7 lines
At least for Tegra, I've carefully chosen the values for the various load addresses so that there won't be issues. (Without that I can easily see the potential for issues.) I've seen far more repeated problems when U-Boot moves the DT/initrd around than than when it didn't (none in that case). Besides, it's completely redundant and unnecessary work if the blobs are already loaded at sane addresses, which they are on Tegra at least.
Quoted 4 lines
Just how large of a kernel have you thrown on a Tegra? 32MB might seem reasonable at first but it wouldn't be overly surprised if someone can shove a BSS into there. I know I shoved DT into 128MB by default because a 32bit ARM kernel isn't functional at that size.
There's enough space for the following:
16M decompressed kernel
16M compressed kernel
1M DTB
The kernel I typically boot is ~4.MB zImage, and ~9MB Image (which doesn't include BSS).
Note that if the decompressed/compressed kernel overlap, the kernel decompresser takes care of relocating the compressed kernel before doing the decompression, and IIRC is supposed to take care not to clobber the DTB (or initrd?) when doing so.
Fedora's rawhide zImage is a bit larger at ~6MB. That works fine too.
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 35 lines · Stephen Warren
Quoted 29 lines · Tom Rini
Quoted 20 lines · Stephen Warren
Quoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>Quoted 7 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues.What kind of issues?
Quoted 7 lines
At least for Tegra, I've carefully chosen the values for the various load addresses so that there won't be issues. (Without that I can easily see the potential for issues.) I've seen far more repeated problems when U-Boot moves the DT/initrd around than than when it didn't (none in that case). Besides, it's completely redundant and unnecessary work if the blobs are already loaded at sane addresses, which they are on Tegra at least.
Quoted 4 lines
Just how large of a kernel have you thrown on a Tegra? 32MB might seem reasonable at first but it wouldn't be overly surprised if someone can shove a BSS into there. I know I shoved DT into 128MB by default because a 32bit ARM kernel isn't functional at that size.
Quoted 4 lines
There's enough space for the following:
16M decompressed kernel
16M compressed kernel
... which is potentially small :)
Quoted 9 lines
1M DTB
The kernel I typically boot is ~4.MB zImage, and ~9MB Image (which doesn't include BSS).
Note that if the decompressed/compressed kernel overlap, the kernel decompresser takes care of relocating the compressed kernel before doing the decompression, and IIRC is supposed to take care not to clobber the DTB (or initrd?) when doing so.
The decompressor is happy to clobber over other things I would swear which is how people end up in the "oops, my DT was eaten" case when things are placed too close and _not_ relocated prior to booting.
Quoted 1 line
Fedora's rawhide zImage is a bit larger at ~6MB. That works fine too.
Right but what's the worst case you can come up with? There's folks out there attempting to feed the same kernel into their testboard farm of relatively wild differnet HW but all works on multi_v7_defconfig.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140801/c963e06d/attachment.pgp>
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 36 lines · Tom Rini
Quoted 35 lines · Stephen Warren
Quoted 33 lines · Tom Rini
Quoted 20 lines · Stephen Warren
Quoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>Quoted 7 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues.What kind of issues?
Quoted 7 lines
At least for Tegra, I've carefully chosen the values for the various load addresses so that there won't be issues. (Without that I can easily see the potential for issues.) I've seen far more repeated problems when U-Boot moves the DT/initrd around than than when it didn't (none in that case). Besides, it's completely redundant and unnecessary work if the blobs are already loaded at sane addresses, which they are on Tegra at least.
Just how large of a kernel have you thrown on a Tegra? 32MB might seem reasonable at first but it wouldn't be overly surprised if someone can shove a BSS into there. I know I shoved DT into 128MB by default because a 32bit ARM kernel isn't functional at that size.
Quoted 6 lines
Quoted 4 lines
There's enough space for the following:
16M decompressed kernel
16M compressed kernel... which is potentially small :)
Yes, I suppose we should bump the decompressed kernel size to 24M. The last time we had this conversation, IIRC there was an agreement that since that's the limit of the ARM ISA's branch/jump instruction, that's the largest a kernel image could be (and at that size, no modules could be loaded). That is, unless intermediate trampolines were generated by the linker, which IIRC isn't done.
FWIW, multi_v7_defconfig is only 11MB uncompressed and 5MB compressed, so we're not likely to hit the 16M limit for a while.
Quoted 14 lines
Quoted 9 lines
1M DTB
The kernel I typically boot is ~4.MB zImage, and ~9MB Image (which doesn't include BSS).
Note that if the decompressed/compressed kernel overlap, the kernel decompresser takes care of relocating the compressed kernel before doing the decompression, and IIRC is supposed to take care not to clobber the DTB (or initrd?) when doing so.
The decompressor is happy to clobber over other things I would swear which is how people end up in the "oops, my DT was eaten" case when things are placed too close and _not_ relocated prior to booting.
Quoted 5 lines
Quoted 1 line
Fedora's rawhide zImage is a bit larger at ~6MB. That works fine too.
Right but what's the worst case you can come up with? There's folks out there attempting to feed the same kernel into their testboard farm of relatively wild differnet HW but all works on
multi_v7_defconfig.
Hmm. Some experimentation shows that if the DTB is loaded where the kernel will be decompressed to, then the DTB does indeed get clobbered.
Still, the Tegra default environment already places the DTB 32MB after the decompressed kernel location, so that won't be an issue (unless there's a 24MB kernel with 8MB BSS, which is very unlikely). If we fix the size allocated to the decompressed kernel to be the full 24MB, the issue would then only occur with a 24MB uncompressed kernel with 16MB BSS. That's even more unlikely. For tegra_defconfig or multi_v7_defconfig, BSS is currently 3/8MB and 1/4MB respectively.
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Quoted 51 lines · Stephen Warren
Quoted 36 lines · Tom Rini
Quoted 35 lines · Stephen Warren
Quoted 33 lines · Tom Rini
Quoted 20 lines · Stephen Warren
Quoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>Quoted 7 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues.What kind of issues?
Quoted 7 lines
At least for Tegra, I've carefully chosen the values for the various load addresses so that there won't be issues. (Without that I can easily see the potential for issues.) I've seen far more repeated problems when U-Boot moves the DT/initrd around than than when it didn't (none in that case). Besides, it's completely redundant and unnecessary work if the blobs are already loaded at sane addresses, which they are on Tegra at least.
Just how large of a kernel have you thrown on a Tegra? 32MB might seem reasonable at first but it wouldn't be overly surprised if someone can shove a BSS into there. I know I shoved DT into 128MB by default because a 32bit ARM kernel isn't functional at that size.
Quoted 6 lines
Quoted 4 lines
There's enough space for the following:
16M decompressed kernel
16M compressed kernel... which is potentially small :)
Yes, I suppose we should bump the decompressed kernel size to 24M. The last time we had this conversation, IIRC there was an agreement that since that's the limit of the ARM ISA's branch/jump instruction, that's the largest a kernel image could be (and at that size, no modules could be loaded). That is, unless intermediate trampolines were generated by the linker, which IIRC isn't done.
Quoted 2 lines
FWIW,
multi_v7_defconfigis only 11MB uncompressed and 5MB compressed, so we're not likely to hit the 16M limit for a while.
Part of why I harp on this is that I've had vendor kernels run past this 16MB limit (some test file had be included in the kernel binary due to some _other_ problem). That's why I moved the am33xx stuff (and other TI bits I could test) to the worst-case must-be-safe limits because you never know what less-than-ideal thing might get thrown at us later on.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140804/f8ea1fb1/attachment.pgp>
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
In reply to Dennis GilmoreQuoted 9 lines · Dennis Gilmore
Quoted 6 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>
Quoted 8 lines
Quoted 4 lines
I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
There has been quite a few times where using
0xffffffhas caused issues. I really think you should setbootm_sizeto something reasonable.
Which we do FWIW, "bootm_size=0x10000000\0" is retained by this patch. I think this was discussed/agreed during the initial upstreaming (but I've not checked the archives to confirm my recollection)
Ian.
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Hi,
Quoted 15 lines · Ian Campbell
Quoted 14 lines · Dennis Gilmore
Quoted 10 lines · On Fri, 01 Aug 2014 12:57:31 -0600 Stephen Warren <[email protected]> wrote:
Quoted 2 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
Acked-by Stephen Warren <[email protected]>I'd personally be tempted to set fdt_high=0xffffffff, initrd_high=0xffffffff to stop U-Boot copying the DT/initrd from the load location to some other location under 256M, but that's just an optimization and entirely optional.
Quoted 7 lines
Quoted 3 lines
There has been quite a few times where using
0xffffffhas caused issues. I really think you should setbootm_sizeto something reasonable.Which we do FWIW, "bootm_size=0x10000000\0" is retained by this patch. I think this was discussed/agreed during the initial upstreaming (but I've not checked the archives to confirm my recollection)
Right, and that is 256M which is the smallest amount of memory found on any allwinner board (there is only one 256M board, all others are 512M or more).
Regards,
Hans
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
In reply to Hans de Goedeinclude/configs/sunxi-common.h line 106
Quoted 9 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
include/configs/sunxi-common.h +2
-2-#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
I think these two changes need to be explained in the commit log. Otherwise looks good.
Ian.
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Hi,
Quoted 7 lines · Ian Campbell
Quoted 6 lines · Hans de Goede
Automatic booting using an extlinux.conf file requires various environment variables to be set.
include/configs/sunxi-common.h +1
-1-#define CONFIG_SYS_LOAD_ADDR 0x48000000/* default load address */ +#define CONFIG_SYS_LOAD_ADDR 0x42000000/* default load address */
Quoted 6 lines
include/configs/sunxi-common.h line 106
Quoted 3 lines
/* standalone support */
include/configs/sunxi-common.h +1
-1-#define CONFIG_STANDALONE_LOAD_ADDR 0x48000000 +#define CONFIG_STANDALONE_LOAD_ADDR 0x42000000I think these two changes need to be explained in the commit log. Otherwise looks good.
Good idea, I'll amend the commit log for this.
Regards,
Hans
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
In reply to Hans de Goedeboard/sunxi/Kconfig config SYS_SOC · line 40
Quoted 2 lines · Hans de Goede
board/sunxi/Kconfig +2
-0+config FTDFILE + string "Default ftdfile env setting for this board"
Vagrant just pointed out the typo in all of this to me, whoops ;-)
Quoted 1 line
+ "fdtfile="
CONFIG_FTDFILE"\0" \
At least the actual environment name is correct ;-)
8<------------------------------
PATCH 7/7 sunxi: Add environment settings to make extlinux.conf booting work
Hi,
Quoted 7 lines · Ian Campbell
board/sunxi/Kconfig config SYS_SOC · line 40
Quoted 2 lines · Hans de Goede
board/sunxi/Kconfig +2
-0+config FTDFILE + string "Default ftdfile env setting for this board"Vagrant just pointed out the typo in all of this to me, whoops ;-)
Quoted 1 line
+ "fdtfile="
CONFIG_FTDFILE"\0" \
Oops.
Quoted 1 line
At least the actual environment name is correct ;-)
Yeah, well if it wasn't I would have noticed as I tested extlinux.conf booting using the fdtfile env. variable to get the dt.
Quoted 44 lines
8<------------------------------
From
64aeaa14fc0a7672ee4f89f03354558b09a3116aMon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Sat, 30 Aug 2014 22:46:15 +0100
Subject: [PATCH] sunxi: Correct typoCONFIG_FTDFILE=>CONFIG_FDTFILEPatch is the result of:
sed -i -e 's/FTDFILE/FDTFILE/g' board/sunxi/Kconfig configs/*include/configs/sunxi-common.hSpotted-by Vagrant Cascadian <[email protected]>Signed-off-by Ian Campbell <[email protected]>--- board/sunxi/Kconfig | 2 +- configs/A10-OLinuXino-Lime_defconfig | 2 +- configs/A10s-OLinuXino-M_defconfig | 2 +- configs/A13-OLinuXinoM_defconfig | 2 +- configs/A13-OLinuXino_defconfig | 2 +- configs/A20-OLinuXino_MICRO_defconfig | 2 +- configs/Auxtek-T004_defconfig | 2 +- configs/Bananapi_defconfig | 2 +- configs/Cubieboard2_FEL_defconfig | 2 +- configs/Cubieboard2_defconfig | 2 +- configs/Cubieboard_defconfig | 2 +- configs/Cubietruck_FEL_defconfig | 2 +- configs/Cubietruck_defconfig | 2 +- configs/Linksprite_pcDuino3_defconfig | 2 +- configs/Mele_A1000G_defconfig | 2 +- configs/Mele_A1000_defconfig | 2 +- configs/Mini-X-1Gb_defconfig | 2 +- configs/Mini-X_defconfig | 2 +- configs/ba10_tv_box_defconfig | 2 +- configs/i12-tvbox_defconfig | 2 +- configs/qt840a_defconfig | 2 +- configs/r7-tv-dongle_defconfig | 2 +- include/configs/sunxi-common.h | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-)board/sunxi/Kconfig +0
-0
board/sunxi/Kconfig config SYS_SOC · line 40
Quoted 6 lines
board/sunxi/Kconfig +1
-1@@ -36,7 +36,7 @@ config SYS_SOC string default "sunxi" -config FTDFILE +config FDTFILE string "Default ftdfile env setting for this board"
The typo is present in the help text too, the patch should probably fix it there too.
Regards,
Hans
Quoted 247 lines
board/sunxi/Kconfig +0
-0endifconfigs/A10-OLinuXino-Lime_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun4i-a10-olinuxino-lime.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN4I=yconfigs/A10s-OLinuXino-M_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun5i-a10s-olinuxino-micro.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN5I=yconfigs/A13-OLinuXinoM_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun5i-a13-olinuxino-micro.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN5I=yconfigs/A13-OLinuXino_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun5i-a13-olinuxino.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN5I=yconfigs/A20-OLinuXino_MICRO_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-olinuxino-micro.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/Auxtek-T004_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun5i-a10s-auxtek-t004.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN5I=yconfigs/Bananapi_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-bananapi.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/Cubieboard2_FEL_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/Cubieboard2_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-cubieboard2.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/Cubieboard_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun4i-a10-cubieboard.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN4I=yconfigs/Cubietruck_FEL_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/Cubietruck_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-cubietruck.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/Linksprite_pcDuino3_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-pcduino3.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/Mele_A1000G_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun4i-a10-a1000.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN4I=yconfigs/Mele_A1000_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun4i-a10-a1000.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN4I=yconfigs/Mini-X-1Gb_defconfig +1
-1@@ -1,5 +1,5 @@ CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="MINI_X_1GB,SPL,AXP209_POWER,USB_EHCI" -CONFIG_FTDFILE="sun4i-a10-mini-xplus.dtb" +CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN4I=yconfigs/Mini-X_defconfig +1
-1@@ -1,5 +1,5 @@ CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="MINI_X,SPL,AXP209_POWER,USB_EHCI" -CONFIG_FTDFILE="sun4i-a10-mini-xplus.dtb" +CONFIG_FDTFILE="sun4i-a10-mini-xplus.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN4I=yconfigs/ba10_tv_box_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun4i-a10-ba10-tvbox.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN4I=yconfigs/i12-tvbox_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/qt840a_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun7i-a20-i12-tvbox.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN7I=yconfigs/r7-tv-dongle_defconfig +1
-1@@ -1,5 +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" +CONFIG_FDTFILE="sun5i-a10s-r7-tv-dongle.dtb" +S:CONFIG_ARM=y +S:CONFIG_TARGET_SUN5I=yinclude/configs/sunxi-common.h +1
-1@@ -244,7 +244,7 @@#define CONFIG_EXTRA_ENV_SETTINGS \ MEM_LAYOUT_ENV_SETTINGS \ - "fdtfile=" CONFIG_FTDFILE "\0" \ + "fdtfile=" CONFIG_FDTFILE "\0" \ "console=ttyS0,115200\0" \ BOOTENV
PATCH 1/7 sunxi-common.h: Remove CONFIG_SYS_BOOT_GET_CMDLINE
In reply to Hans de GoedeQuoted 4 lines · Hans de Goede
sunxi does not need this and it should never have been enabled for it in the first place.
Signed-off-by Hans de Goede <[email protected]>