[U-Boot] [RFC PATCH] net: mii command: disable build for 64-bit Allwinner boards
Andre Przywara
andre.przywara at arm.com
Mon Feb 12 01:25:21 UTC 2018
The current master fails to build some Allwinner H5 boards, due to
exceeding the U-Boot proper size limit we currently have still in place.
This affects:
- nanopi_neo2_defconfig
- nanopi_neo_plus2_defconfig
- orangepi_pc2_defconfig
- orangepi_prime_defconfig
- orangepi_zero_plus2_defconfig
To workaround this issue, a left-over low hanging fruit is to disable
the MII *command*, which is probably only useful for debugging and not
needed for a normal boot flow, even when booting via network (PXE/TFTP).
Allow to de-select CMD_MII, even when the distro default enables it.
Then disable it explicitly in the affected board's defconfigs.
This makes all Allwinner ARMv8 boards build again.
Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
Hi,
my sincere apologies for this ugly hack (and I welcome any nicer solution!),
but we are running out of silver bullets for this particular problem and this
command seems both easy to give up and worthwhile in terms of code size
savings (~11KB).
The "default n if ..." doesn't seem to work with "imply", so I needed to
disable it in each of the affected defconfigs. Please let me know if there
is a better solution.
Cheers,
Andre.
Kconfig | 2 +-
cmd/Kconfig | 1 +
configs/nanopi_neo2_defconfig | 1 +
configs/nanopi_neo_plus2_defconfig | 1 +
configs/orangepi_pc2_defconfig | 1 +
configs/orangepi_prime_defconfig | 1 +
configs/orangepi_zero_plus2_defconfig | 1 +
configs/pine64_plus_defconfig | 1 +
8 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/Kconfig b/Kconfig
index 166e7841b1..0e412709de 100644
--- a/Kconfig
+++ b/Kconfig
@@ -75,7 +75,7 @@ config DISTRO_DEFAULTS
select CMD_EXT4
select CMD_FAT
select CMD_FS_GENERIC
- select CMD_MII if NET
+ imply CMD_MII if NET
select CMD_PING if NET
select CMD_PART
select HUSH_PARSER
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 7368b6df52..a5c3c09a4a 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1017,6 +1017,7 @@ config CMD_NFS
config CMD_MII
bool "mii"
+ default n if ARCH_SUNXI && ARM64
help
Enable MII utility commands.
diff --git a/configs/nanopi_neo2_defconfig b/configs/nanopi_neo2_defconfig
index f78ee504b7..d50a389f2a 100644
--- a/configs/nanopi_neo2_defconfig
+++ b/configs/nanopi_neo2_defconfig
@@ -7,6 +7,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_MII is not set
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
diff --git a/configs/nanopi_neo_plus2_defconfig b/configs/nanopi_neo_plus2_defconfig
index dc62385bcb..9ba9b6df89 100644
--- a/configs/nanopi_neo_plus2_defconfig
+++ b/configs/nanopi_neo_plus2_defconfig
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-neo-plus2"
CONFIG_SPL=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_MII is not set
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
diff --git a/configs/orangepi_pc2_defconfig b/configs/orangepi_pc2_defconfig
index e8bf285ab3..47bc513eb1 100644
--- a/configs/orangepi_pc2_defconfig
+++ b/configs/orangepi_pc2_defconfig
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-pc2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_MII is not set
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
diff --git a/configs/orangepi_prime_defconfig b/configs/orangepi_prime_defconfig
index c1c82bb2dd..57e4db3e96 100644
--- a/configs/orangepi_prime_defconfig
+++ b/configs/orangepi_prime_defconfig
@@ -7,6 +7,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-prime"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_MII is not set
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
diff --git a/configs/orangepi_zero_plus2_defconfig b/configs/orangepi_zero_plus2_defconfig
index 9f955304ca..6ebfb7940d 100644
--- a/configs/orangepi_zero_plus2_defconfig
+++ b/configs/orangepi_zero_plus2_defconfig
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-orangepi-zero-plus2"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_MII is not set
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
index a8d4e2b0aa..e5d4df3f50 100644
--- a/configs/pine64_plus_defconfig
+++ b/configs/pine64_plus_defconfig
@@ -6,6 +6,7 @@ CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SPL=y
# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_MII is not set
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
--
2.14.1
More information about the U-Boot
mailing list