From patchwork Thu Dec 21 12:40:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01/11] cmd: crc32: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122546 Message-Id: <20171221124030.23721-2-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:20 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard Reviewed-by: Andre Przywara --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index c0332235261f..7751001819d0 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI default y help Compute CRC32. From patchwork Thu Dec 21 12:40:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [02/11] cmd: unzip: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122547 Message-Id: <20171221124030.23721-3-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:21 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 7751001819d0..88188938045f 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -539,6 +539,7 @@ config CMD_LZMADEC config CMD_UNZIP bool "unzip" + default n if ARCH_SUNXI default y if CMD_BOOTI help Uncompress a zip-compressed memory region. From patchwork Thu Dec 21 12:40:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/11] cmd: loadb: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122548 Message-Id: <20171221124030.23721-4-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:22 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 88188938045f..36a1b9b784a6 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -748,6 +748,7 @@ config CMD_I2C config CMD_LOADB bool "loadb" + default n if ARCH_SUNXI default y help Load a binary file over serial line. From patchwork Thu Dec 21 12:40:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [04/11] cmd: loads: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122555 Message-Id: <20171221124030.23721-5-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:23 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 36a1b9b784a6..098fbe6fc90a 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -755,6 +755,7 @@ config CMD_LOADB config CMD_LOADS bool "loads" + default n if ARCH_SUNXI default y help Load an S-Record file over serial line From patchwork Thu Dec 21 12:40:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [05/11] cmd: misc: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122551 Message-Id: <20171221124030.23721-6-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:24 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard Reviewed-by: Andre Przywara --- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index 098fbe6fc90a..ca6d3956bd10 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1130,6 +1130,7 @@ config CMD_GETTIME # TODO: rename to CMD_SLEEP config CMD_MISC bool "sleep" + default n if ARCH_SUNXI default y help Delay execution for some time From patchwork Thu Dec 21 12:40:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [06/11] video: bpp8: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122554 Message-Id: <20171221124030.23721-7-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:25 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard Reviewed-by: Andre Przywara Reviewed-by: Anatolij Gustschin --- drivers/video/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 45a105db06ae..a267c9acfecb 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -38,6 +38,7 @@ config BACKLIGHT_GPIO config VIDEO_BPP8 bool "Support 8-bit-per-pixel displays" depends on DM_VIDEO + default n if ARCH_SUNXI default y if DM_VIDEO help Support drawing text and bitmaps onto a 8-bit-per-pixel display. From patchwork Thu Dec 21 12:40:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [07/11] video: bpp16: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122552 Message-Id: <20171221124030.23721-8-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:26 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard Reviewed-by: Andre Przywara Reviewed-by: Anatolij Gustschin --- drivers/video/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index a267c9acfecb..2fc0defcd0d1 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -49,6 +49,7 @@ config VIDEO_BPP8 config VIDEO_BPP16 bool "Support 16-bit-per-pixel displays" depends on DM_VIDEO + default n if ARCH_SUNXI default y if DM_VIDEO help Support drawing text and bitmaps onto a 16-bit-per-pixel display. From patchwork Thu Dec 21 12:40:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [08/11] net: regex: Disable by default on sunXi X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122550 Message-Id: <20171221124030.23721-9-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:27 +0100 From: Maxime Ripard List-Id: U-Boot discussion The sunXi arm64 build has overflown, leading to the main U-boot binary overwriting the environment when flashing the new image, or even worse, overwriting itself when we're calling saveenv. Disable this command that is not critical until we can adress the issue properly. Signed-off-by: Maxime Ripard Reviewed-by: Andre Przywara --- lib/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Kconfig b/lib/Kconfig index f447c53bdeff..8a17a9afe10b 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -47,6 +47,7 @@ config USE_TINY_PRINTF config REGEX bool "Enable regular expression support" + default n if ARCH_SUNXI default y if NET help If this variable is defined, U-Boot is linked against the From patchwork Thu Dec 21 12:40:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [09/11] sunxi: imply CONFIG_OF_LIBFDT_OVERLAY X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122553 Message-Id: <20171221124030.23721-10-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:28 +0100 From: Maxime Ripard List-Id: U-Boot discussion From: Andre Heider fdt overlay support is useful for all sunxi boards, enable per default and remove it from sunxi defconfigs. Signed-off-by: Andre Heider Signed-off-by: Maxime Ripard --- arch/arm/Kconfig | 1 + configs/CHIP_defconfig | 1 - configs/CHIP_pro_defconfig | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f2c35e32c649..918424a82ac2 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -715,6 +715,7 @@ config ARCH_SUNXI select USE_TINY_PRINTF imply CMD_GPT imply FAT_WRITE + imply OF_LIBFDT_OVERLAY imply PRE_CONSOLE_BUFFER imply SPL_GPIO_SUPPORT imply SPL_LIBCOMMON_SUPPORT diff --git a/configs/CHIP_defconfig b/configs/CHIP_defconfig index 062ac76e6d66..2452d42a873c 100644 --- a/configs/CHIP_defconfig +++ b/configs/CHIP_defconfig @@ -20,4 +20,3 @@ CONFIG_AXP_ALDO4_VOLT=3300 CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y -CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/CHIP_pro_defconfig b/configs/CHIP_pro_defconfig index f47aead6f904..02e79b5bb510 100644 --- a/configs/CHIP_pro_defconfig +++ b/configs/CHIP_pro_defconfig @@ -25,4 +25,3 @@ CONFIG_AXP_ALDO4_VOLT=3300 CONFIG_USB_EHCI_HCD=y CONFIG_USB_MUSB_GADGET=y CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y -CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Thu Dec 21 12:40:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [10/11] Makefile: Add size check to the u-boot.itb make target X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122557 Message-Id: <20171221124030.23721-11-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:29 +0100 From: Maxime Ripard List-Id: U-Boot discussion The make macro to check if the binary exceeds the board size limit is not called. Make sure that is the case. Signed-off-by: Maxime Ripard --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index c573ddba95ff..dd26795bb1f3 100644 --- a/Makefile +++ b/Makefile @@ -1022,6 +1022,7 @@ u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \ u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE $(call if_changed,mkfitimage) + $(BOARD_SIZE_CHECK) u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) From patchwork Thu Dec 21 12:40:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [11/11] sunxi: Add limit with the MMC environment X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122556 Message-Id: <20171221124030.23721-12-maxime.ripard@free-electrons.com> To: Tom Rini Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Thu, 21 Dec 2017 13:40:30 +0100 From: Maxime Ripard List-Id: U-Boot discussion The MMC environment offset is getting very close to the end of the U-Boot binary now. Since we want to make sure this will not overflow, add a size limit in the board for arm64. arm32 has already that limit enforced in our custom image generation. Signed-off-by: Maxime Ripard --- include/configs/sunxi-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 3855c564f914..6236e129a89d 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -147,6 +147,16 @@ #endif #if defined(CONFIG_ENV_IS_IN_MMC) + +#ifdef CONFIG_ARM64 +/* + * This is actually (CONFIG_ENV_OFFSET - + * (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)), but the value will be used + * directly in a makefile, without the preprocessor expansion. + */ +#define CONFIG_BOARD_SIZE_LIMIT 0x7e000 +#endif + #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1 /* If we have two devices (most likely eMMC + MMC), favour the eMMC */ #define CONFIG_SYS_MMC_ENV_DEV 1