sunxi: arm64 binary size fixes
Subsystems (5)
cover sunxi: arm64 binary size fixes
Hi,
As we discussed already, this is the list of options that we will need to disable by default.
I also added to the mix a size check, which even though it's not really optimal, is temporary and will be removed in a future (and hopefully close) release.
Tom, is this still something we can merge for 2018.01?
Thanks!
Maxime
Andre Heider (1):
sunxi: imply CONFIG_OF_LIBFDT_OVERLAY
Maxime Ripard (10):
cmd: crc32: Disable by default on sunXi
cmd: unzip: Disable by default on sunXi
cmd: loadb: Disable by default on sunXi
cmd: loads: Disable by default on sunXi
cmd: misc: Disable by default on sunXi
video: bpp8: Disable by default on sunXi
video: bpp16: Disable by default on sunXi
net: regex: Disable by default on sunXi
Makefile: Add size check to the u-boot.itb make target
sunxi: Add limit with the MMC environment
Makefile | 1 + arch/arm/Kconfig | 1 + cmd/Kconfig | 5 +++++ configs/CHIP_defconfig | 1 - configs/CHIP_pro_defconfig | 1 - drivers/video/Kconfig | 2 ++ include/configs/sunxi-common.h | 10 ++++++++++ lib/Kconfig | 1 + 8 files changed, 20 insertions(+), 2 deletions(-)
Signature · 1 line
2.14.3
PATCH 1/11 cmd: crc32: Disable by default on sunXi
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.
--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
cmd/Kconfig +1 -0
@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI default y help Compute CRC32.
Signature · 1 line
2.14.3
PATCH 1/11 cmd: crc32: Disable by default on sunXi
Hi,
Quoted 17 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)cmd/Kconfig +0
-0
cmd/Kconfig menu "Memory commands" · line 400
Quoted 4 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI
Is that meant to solve issues with 32 bit boards as well? Or shall we use "ARCH_SUNXI && ARM64" here?
In case including 32-bit is intentional, this is:
for [PATCH 01/11] - [PATCH 04/11]:
If no one shoot any of those options down, you might want to squash them into one patch, since they all go into the same file.
Unless you need to meet some company patch count target before the end of the year :-D
Cheers,
Andre.
P.S. Shall we mark those patches somehow, so that we can easily revert them later? Those commands can be useful.
Cheers,
Andre
Quoted 4 lines
cmd/Kconfig +0
-0default y help Compute CRC32.
PATCH 1/11 cmd: crc32: Disable by default on sunXi
Quoted 15 lines · Andre Przywara
Hi,
Quoted 12 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 12 lines
cmd/Kconfig menu "Memory commands" · line 400
Quoted 9 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXIIs that meant to solve issues with 32 bit boards as well? Or shall we use "
ARCH_SUNXI&& ARM64" here?
Agreed this, and If we go further better to have A64 and H5 check directly.
PATCH 1/11 cmd: crc32: Disable by default on sunXi
In reply to Andre PrzywaraHi Andre,
Quoted 28 lines · Andre Przywara
Hi,
Quoted 17 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)cmd/Kconfig +0
-0cmd/Kconfig menu "Memory commands" · line 400
Quoted 4 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXIIs that meant to solve issues with 32 bit boards as well? Or shall we use "
ARCH_SUNXI&& ARM64" here?
Quoted 4 lines
In case including 32-bit is intentional, this is:
for [PATCH 01/11] - [PATCH 04/11]:
Reviewed-by Andre Przywara <[email protected]>
This is intentional. I really want to have an experience as close as possible on the arm and arm64 boards, and having the same commands set is one of the things that matter to achieve that :)
Quoted 2 lines
If no one shoot any of those options down, you might want to squash them into one patch, since they all go into the same file.
That works for me :)
Quoted 2 lines
Unless you need to meet some company patch count target before the end of the year :-D
I guess I missed that deadline already... ;)
Quoted 2 lines
P.S. Shall we mark those patches somehow, so that we can easily revert them later? Those commands can be useful.
That might be a good idea. Do you have a suggestion?
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180105/b492cb42/attachment.sig>
PATCH 1/11 cmd: crc32: Disable by default on sunXi
In reply to Maxime RipardQuoted 9 lines · Maxime Ripard
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 <[email protected]>---
Applied to u-boot-sunxi/master
PATCH 1/11 cmd: crc32: Disable by default on sunXi
In reply to Maxime RipardQuoted 17 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)cmd/Kconfig +0
-0
cmd/Kconfig menu "Memory commands" · line 403
Quoted 7 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI default y help Compute CRC32.
this make unselect HASH so, few of the boards have build issues, we can select sunxi directly on HASH kconfig.
[1] https://travis-ci.org/openedev/u-boot-sunxi/jobs/327576344
PATCH 1/11 cmd: crc32: Disable by default on sunXi
Quoted 14 lines · Jagan Teki
Quoted 12 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 15 lines
cmd/Kconfig menu "Memory commands" · line 403
Quoted 12 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI default y help Compute CRC32.this make unselect HASH so, few of the boards have build issues, we can select sunxi directly on HASH kconfig.
OK, hold on. This series was supposed to be pulled in to v2018.01, to fix size issues, before we could take the env series that I said can come in for v2018.03, yes? So we should just not do this series and take Maxime's update to the env series which I expect to be posted soon so I can merge it, and sunxi can move to env in FAT and not have the problem it has on aarch64 atm.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180111/30b6de9c/attachment.sig>
PATCH 1/11 cmd: crc32: Disable by default on sunXi
Quoted 31 lines · Tom Rini
Quoted 14 lines · Jagan Teki
Quoted 12 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)Quoted 15 lines
cmd/Kconfig menu "Memory commands" · line 403
Quoted 12 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI default y help Compute CRC32.this make unselect HASH so, few of the boards have build issues, we can select sunxi directly on HASH kconfig.
Quoted 6 lines
OK, hold on. This series was supposed to be pulled in to v2018.01, to fix size issues, before we could take the env series that I said can come in for v2018.03, yes? So we should just not do this series and take Maxime's update to the env series which I expect to be posted soon so I can merge it, and sunxi can move to env in FAT and not have the problem it has on aarch64 atm.
They are a bit orthogonal actually.
This serie addresses the build failures we have today in order to still be able to build binaries that work.
The FAT transition is more of a longer-term goal in order to not have the size restriction we have eventually (hopefully 2018.05).
So the first one mitigates the problem, while the second one allows us to get rid of the problem entirely in the future.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180112/59716b2b/attachment.sig>
PATCH 1/11 cmd: crc32: Disable by default on sunXi
In reply to Jagan TekiHi,
Quoted 30 lines · Jagan Teki
Quoted 17 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)cmd/Kconfig +0
-0cmd/Kconfig menu "Memory commands" · line 403
Quoted 7 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI default y help Compute CRC32.this make unselect HASH so, few of the boards have build issues, we can select sunxi directly on HASH kconfig.
Quoted 1 line
[1] https://travis-ci.org/openedev/u-boot-sunxi/jobs/327576344
All the errors on the build 3 (which is the one that failed in your history) are related to git issues it seems, and not build failures.
Which boards are failing?
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180112/5553d4e2/attachment.sig>
PATCH 1/11 cmd: crc32: Disable by default on sunXi
Quoted 33 lines · Maxime Ripard
Hi,
Quoted 30 lines · Jagan Teki
Quoted 17 lines · Maxime Ripard
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 <[email protected]>--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)cmd/Kconfig +0
-0cmd/Kconfig menu "Memory commands" · line 403
Quoted 7 lines
cmd/Kconfig +1
-0@@ -397,6 +397,7 @@ menu "Memory commands" config CMD_CRC32 bool "crc32" select HASH + default n if ARCH_SUNXI default y help Compute CRC32.this make unselect HASH so, few of the boards have build issues, we can select sunxi directly on HASH kconfig.
Quoted 4 lines
Quoted 1 line
[1] https://travis-ci.org/openedev/u-boot-sunxi/jobs/327576344
All the errors on the build 3 (which is the one that failed in your history) are related to git issues it seems, and not build failures.
Not exactly, boards which uses dfu from 5i/7i/8i are failed [2]
PATCH 2/11 cmd: unzip: Disable by default on sunXi
In reply to Maxime RipardThe 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.
--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
cmd/Kconfig +1 -0
@@ -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.
Signature · 1 line
2.14.3
PATCH 2/11 cmd: unzip: Disable by default on sunXi
Quoted 9 lines · Maxime Ripard
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 <[email protected]>---
Applied to u-boot-sunxi/master
PATCH 3/11 cmd: loadb: Disable by default on sunXi
In reply to Maxime RipardThe 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.
--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
cmd/Kconfig +1 -0
@@ -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.
Signature · 1 line
2.14.3
PATCH 3/11 cmd: loadb: Disable by default on sunXi
Quoted 9 lines · Maxime Ripard
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 <[email protected]>---
Applied to u-boot-sunxi/master
PATCH 4/11 cmd: loads: Disable by default on sunXi
In reply to Maxime RipardThe 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.
--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
cmd/Kconfig +1 -0
@@ -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
Signature · 1 line
2.14.3
PATCH 4/11 cmd: loads: Disable by default on sunXi
Quoted 9 lines · Maxime Ripard
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 <[email protected]>---
Applied to u-boot-sunxi/master
PATCH 5/11 cmd: misc: Disable by default on sunXi
In reply to Maxime RipardThe 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.
--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)
cmd/Kconfig +1 -0
@@ -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
Signature · 1 line
2.14.3
PATCH 5/11 cmd: misc: Disable by default on sunXi
Hi,
Quoted 8 lines · Maxime Ripard
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 <[email protected]>
Are there any scripts relying on "sleep"? For some kind of fabricated timeout, maybe? But I guess users would enable them in that case, so:
Cheers,
Andre.
Quoted 17 lines
--- cmd/Kconfig | 1 + 1 file changed, 1 insertion(+)cmd/Kconfig +1
-0@@ -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
PATCH 5/11 cmd: misc: Disable by default on sunXi
In reply to Maxime RipardQuoted 9 lines · Maxime Ripard
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 <[email protected]>---
Applied to u-boot-sunxi/master
PATCH 6/11 video: bpp8: Disable by default on sunXi
In reply to Maxime RipardThe 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.
--- drivers/video/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/video/Kconfig +1 -0
@@ -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.
Signature · 1 line
2.14.3
PATCH 6/11 video: bpp8: Disable by default on sunXi
Hi,
Quoted 8 lines · Maxime Ripard
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 <[email protected]>
Actually that is useful for sunxi in any case, since we hardcode VIDEO_BPP32 in sunxi_de2.c.
Cheers,
Andre.
Quoted 19 lines
--- drivers/video/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/video/Kconfig +1
-0@@ -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.
PATCH 6/11 video: bpp8: Disable by default on sunXi
In reply to Maxime RipardQuoted 8 lines · On Thu, 21 Dec 2017 13:40:25 +0100 Maxime Ripard maxime.ripard at…
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 <[email protected]>
PATCH 6/11 video: bpp8: Disable by default on sunXi
Quoted 7 lines · Anatolij Gustschin
Quoted 4 lines · On Thu, 21 Dec 2017 13:40:25 +0100 Maxime Ripard maxime.ripard at…
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.
Quoted 6 lines
Quoted 4 lines
Disable this command that is not critical until we can adress the issue properly.
Signed-off-by Maxime Ripard <[email protected]>Reviewed-by Anatolij Gustschin <[email protected]>
Applied to u-boot-sunxi/master
PATCH 7/11 video: bpp16: Disable by default on sunXi
In reply to Maxime RipardThe 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.
--- drivers/video/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/video/Kconfig +1 -0
@@ -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.
Signature · 1 line
2.14.3
PATCH 7/11 video: bpp16: Disable by default on sunXi
Hi,
Quoted 8 lines · Maxime Ripard
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 <[email protected]>
Same comment as the other patch: we only support VIDEO_BPP32 for sunxi.
Cheers,
Andre.
Quoted 17 lines
--- drivers/video/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/video/Kconfig +1
-0@@ -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.
PATCH 7/11 video: bpp16: Disable by default on sunXi
In reply to Maxime RipardQuoted 8 lines · On Thu, 21 Dec 2017 13:40:26 +0100 Maxime Ripard maxime.ripard at…
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 <[email protected]>
PATCH 7/11 video: bpp16: Disable by default on sunXi
Quoted 7 lines · Anatolij Gustschin
Quoted 4 lines · On Thu, 21 Dec 2017 13:40:26 +0100 Maxime Ripard maxime.ripard at…
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.
Quoted 6 lines
Quoted 4 lines
Disable this command that is not critical until we can adress the issue properly.
Signed-off-by Maxime Ripard <[email protected]>Reviewed-by Anatolij Gustschin <[email protected]>
Applied to u-boot-sunxi/master
PATCH 8/11 net: regex: Disable by default on sunXi
In reply to Maxime RipardThe 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.
--- lib/Kconfig | 1 + 1 file changed, 1 insertion(+)
lib/Kconfig +1 -0
@@ -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
Signature · 1 line
2.14.3
PATCH 8/11 net: regex: Disable by default on sunXi
Hi,
Quoted 6 lines · Maxime Ripard
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.
Nit: this not a command.
Quoted 1 line
Signed-off-by Maxime Ripard <[email protected]>
Cheers,
Andre.
Quoted 17 lines
--- lib/Kconfig | 1 + 1 file changed, 1 insertion(+)lib/Kconfig +1
-0@@ -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
PATCH 8/11 net: regex: Disable by default on sunXi
Quoted 7 lines · Andre Przywara
Hi,
Quoted 4 lines · Maxime Ripard
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.
Quoted 8 lines
Quoted 2 lines
Disable this command that is not critical until we can adress the issue properly.
Nit: this not a command.
Quoted 1 line
Signed-off-by Maxime Ripard <[email protected]>Reviewed-by Andre Przywara <[email protected]>
Fixed nit
Applied to u-boot-sunxi/master
PATCH 9/11 sunxi: imply CONFIG_OF_LIBFDT_OVERLAY
In reply to Maxime RipardFrom: Andre Heider <[email protected]>
fdt overlay support is useful for all sunxi boards, enable per default and remove it from sunxi defconfigs.
--- arch/arm/Kconfig | 1 + configs/CHIP_defconfig | 1 - configs/CHIP_pro_defconfig | 1 - 3 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/Kconfig +1 -0
@@ -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
configs/CHIP_defconfig +0 -1
@@ -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
configs/CHIP_pro_defconfig +0 -1
@@ -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
Signature · 1 line
2.14.3
PATCH 9/11 sunxi: imply CONFIG_OF_LIBFDT_OVERLAY
Quoted 8 lines · Maxime Ripard
From: Andre Heider <[email protected]>
fdt overlay support is useful for all sunxi boards, enable per default and remove it from sunxi defconfigs.
Signed-off-by Andre Heider <[email protected]>Signed-off-by Maxime Ripard <[email protected]>---
Applied to u-boot-sunxi/master
PATCH 10/11 Makefile: Add size check to the u-boot.itb make target
In reply to Maxime RipardThe make macro to check if the binary exceeds the board size limit is not called. Make sure that is the case.
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -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)
Signature · 1 line
2.14.3
PATCH 11/11 sunxi: Add limit with the MMC environment
In reply to Maxime RipardThe 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.
--- include/configs/sunxi-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
include/configs/sunxi-common.h +10 -0
@@ -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
Signature · 1 line
2.14.3
PATCH 11/11 sunxi: Add limit with the MMC environment
Hi,
Quoted 15 lines · Maxime Ripard
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 <[email protected]>--- include/configs/sunxi-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)include/configs/sunxi-common.h +0
-0
include/configs/sunxi-common.h line 151
Quoted 5 lines
include/configs/sunxi-common.h +2
-0@@ -147,6 +147,16 @@#endif #if defined(CONFIG_ENV_IS_IN_MMC ) + +#ifdef CONFIG_ARM64
Why is that? Isn't the limit applicable to all sunxi boards using MMC env? Maybe that's actually the better check (thanks for digging this up, btw)? I guess this would avoid to break compatibility with older sunxi-fel versions (those provided by distros not carrying your fix), also avoids blowing up u-boot-sunxi-with-spl.bin to 504K always?
Or does this break anything on 32-bit boards?
Cheers,
Andre.
Quoted 12 lines
include/configs/sunxi-common.h +8
-0+/* +* 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
PATCH 11/11 sunxi: Add limit with the MMC environment
Quoted 30 lines · André Przywara
Hi,
Quoted 15 lines · Maxime Ripard
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 <[email protected]>--- include/configs/sunxi-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)include/configs/sunxi-common.h +0
-0include/configs/sunxi-common.h line 151
Quoted 5 lines
include/configs/sunxi-common.h +2
-0@@ -147,6 +147,16 @@#endif #if defined(CONFIG_ENV_IS_IN_MMC ) + +#ifdef CONFIG_ARM64 Why is that? Isn't the limit applicable to all sunxi boards using MMC env? Maybe that's actually the better check (thanks for digging this up, btw)? I guess this would avoid to break compatibility with older sunxi-fel versions (those provided by distros not carrying your fix), also avoids blowing up u-boot-sunxi-with-spl.bin to 504K always?
Quoted 1 line
Or does this break anything on 32-bit boards?
So there's a couple of arguments there, which are probably all a bit weak, but the sum of them made me do it that way:
- I tried to keep the changes as minimal as possible since it's going to be fixes, in one of the late -rc's. We know that the arm32 part works, so I didn't really want to disrupt that.
- It's not really optimal, as the expression is used directly in the Makefile and therefore any arithmetic operations can't really be done. The arm32 part can, and is therefore correct in all cases. Here we just bet that the user will never have changed one of the values.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171222/541f71b6/attachment.sig>
PATCH 11/11 sunxi: Add limit with the MMC environment
Quoted 33 lines · Maxime Ripard
Quoted 30 lines · André Przywara
Hi,
Quoted 15 lines · Maxime Ripard
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 <[email protected]>--- include/configs/sunxi-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)include/configs/sunxi-common.h +0
-0include/configs/sunxi-common.h line 151
Quoted 5 lines
include/configs/sunxi-common.h +2
-0@@ -147,6 +147,16 @@#endif #if defined(CONFIG_ENV_IS_IN_MMC ) + +#ifdef CONFIG_ARM64 Why is that? Isn't the limit applicable to all sunxi boards using MMC env? Maybe that's actually the better check (thanks for digging this up, btw)? I guess this would avoid to break compatibility with older sunxi-fel versions (those provided by distros not carrying your fix), also avoids blowing up u-boot-sunxi-with-spl.bin to 504K always?
Quoted 1 line
Or does this break anything on 32-bit boards?
Quoted 10 lines
So there's a couple of arguments there, which are probably all a bit weak, but the sum of them made me do it that way:
- I tried to keep the changes as minimal as possible since it's going to be fixes, in one of the late -rc's. We know that the arm32 part works, so I didn't really want to disrupt that.
- It's not really optimal, as the expression is used directly in theMakefileand therefore any arithmetic operations can't really be done. The arm32 part can, and is therefore correct in all cases. Here we just bet that the user will never have changed one of the values.
Based on the previous conversion, 2018.05 or future version will increase the u-boot partition size. Do we really need this in between which will anyway removed.
PATCH 11/11 sunxi: Add limit with the MMC environment
Quoted 46 lines · Jagan Teki
Quoted 33 lines · Maxime Ripard
Quoted 30 lines · André Przywara
Hi,
Quoted 15 lines · Maxime Ripard
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 <[email protected]>--- include/configs/sunxi-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+)include/configs/sunxi-common.h +0
-0include/configs/sunxi-common.h line 151
Quoted 5 lines
include/configs/sunxi-common.h +2
-0@@ -147,6 +147,16 @@#endif #if defined(CONFIG_ENV_IS_IN_MMC ) + +#ifdef CONFIG_ARM64 Why is that? Isn't the limit applicable to all sunxi boards using MMC env? Maybe that's actually the better check (thanks for digging this up, btw)? I guess this would avoid to break compatibility with older sunxi-fel versions (those provided by distros not carrying your fix), also avoids blowing up u-boot-sunxi-with-spl.bin to 504K always?
Quoted 1 line
Or does this break anything on 32-bit boards?
Quoted 10 lines
So there's a couple of arguments there, which are probably all a bit weak, but the sum of them made me do it that way:
- I tried to keep the changes as minimal as possible since it's going to be fixes, in one of the late -rc's. We know that the arm32 part works, so I didn't really want to disrupt that.
- It's not really optimal, as the expression is used directly in theMakefileand therefore any arithmetic operations can't really be done. The arm32 part can, and is therefore correct in all cases. Here we just bet that the user will never have changed one of the values.
Quoted 3 lines
Based on the previous conversion, 2018.05 or future version will increase the u-boot partition size. Do we really need this in between which will anyway removed.
Yes, otherwise we might end up again in a situation where we'll allow the compilation of a broken binary.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180105/09db40d8/attachment.sig>
cover sunxi: arm64 binary size fixes
In reply to Maxime RipardQuoted 10 lines · Maxime Ripard
Hi,
As we discussed already, this is the list of options that we will need to disable by default.
I also added to the mix a size check, which even though it's not really optimal, is temporary and will be removed in a future (and hopefully close) release.
Tom, is this still something we can merge for 2018.01?
Everything looks reasonable, and we need to fix this, so yes, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171221/5dc888e4/attachment.sig>
cover sunxi: arm64 binary size fixes
In reply to Maxime RipardMaxime,
Quoted 17 lines · Maxime Ripard
Hi,
As we discussed already, this is the list of options that we will need to disable by default.
I also added to the mix a size check, which even though it's not really optimal, is temporary and will be removed in a future (and hopefully close) release.
Tom, is this still something we can merge for 2018.01?
Thanks!
MaximeAndre Heider (1):
sunxi: implyCONFIG_OF_LIBFDT_OVERLAY
Quoted 11 lines
Maxime Ripard (10):
cmd: crc32: Disable by default on sunXi
cmd: unzip: Disable by default on sunXi
cmd: loadb: Disable by default on sunXi
cmd: loads: Disable by default on sunXi
cmd: misc: Disable by default on sunXi
video: bpp8: Disable by default on sunXi
video: bpp16: Disable by default on sunXi
net: regex: Disable by default on sunXi
Makefile: Add size check to the u-boot.itb make target
sunxi: Add limit with the MMC environment
based on the conversation on individual patches, I think all these need to change only for 64-bit sunxi boards for now and we can push this for the release if all fine.
cover sunxi: arm64 binary size fixes
Quoted 33 lines · Jagan Teki
Maxime,
Quoted 17 lines · Maxime Ripard
Hi,
As we discussed already, this is the list of options that we will need to disable by default.
I also added to the mix a size check, which even though it's not really optimal, is temporary and will be removed in a future (and hopefully close) release.
Tom, is this still something we can merge for 2018.01?
Thanks!
MaximeAndre Heider (1):
sunxi: implyCONFIG_OF_LIBFDT_OVERLAYQuoted 11 lines
Maxime Ripard (10):
cmd: crc32: Disable by default on sunXi
cmd: unzip: Disable by default on sunXi
cmd: loadb: Disable by default on sunXi
cmd: loads: Disable by default on sunXi
cmd: misc: Disable by default on sunXi
video: bpp8: Disable by default on sunXi
video: bpp16: Disable by default on sunXi
net: regex: Disable by default on sunXi
Makefile: Add size check to the u-boot.itb make target
sunxi: Add limit with the MMC environment
Quoted 3 lines
based on the conversation on individual patches, I think all these need to change only for 64-bit sunxi boards for now and we can push this for the release if all fine.
As far as I'm concerned, these patches can be merged as is.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180105/3bc08119/attachment.sig>
cover sunxi: arm64 binary size fixes
Quoted 34 lines · Maxime Ripard
Quoted 33 lines · Jagan Teki
Maxime,
Quoted 28 lines · Maxime Ripard
Hi,
As we discussed already, this is the list of options that we will need to disable by default.
I also added to the mix a size check, which even though it's not really optimal, is temporary and will be removed in a future (and hopefully close) release.
Tom, is this still something we can merge for 2018.01?
Thanks!
MaximeAndre Heider (1):
sunxi: implyCONFIG_OF_LIBFDT_OVERLAYMaxime Ripard (10):
cmd: crc32: Disable by default on sunXi
cmd: unzip: Disable by default on sunXi
cmd: loadb: Disable by default on sunXi
cmd: loads: Disable by default on sunXi
cmd: misc: Disable by default on sunXi
video: bpp8: Disable by default on sunXi
video: bpp16: Disable by default on sunXi
net: regex: Disable by default on sunXi
Makefile: Add size check to the u-boot.itb make target
sunxi: Add limit with the MMC environment
Quoted 5 lines
Quoted 3 lines
based on the conversation on individual patches, I think all these need to change only for 64-bit sunxi boards for now and we can push this for the release if all fine.
As far as I'm concerned, these patches can be merged as is.
I've no issues with this series if it goes to next version, since we have time to validate. But I'm thinking to push these asap to merge them in coming release in two days, it would be good to untouch 32-bit stuff at last minute.