From f187fad22d692f046441976efcd4385692a48261 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Sun, 28 May 2023 17:31:56 +0200 Subject: [PATCH] configs/stm32f4xx_defconfig: off network utils from busybox Kernel is built without network support, so network utils are useless. This has a positive impact on the size of busybox and xipImage, making them smaller. Signed-off-by: Dario Binacchi Reviewed-by: Giulio Benetti Signed-off-by: Thomas Petazzoni --- .../common/stm32f4xx/busybox.fragment | 21 +++++++++++++++++++ .../common/stm32f4xx/stm32-post-build.sh | 3 +++ configs/stm32f429_disco_xip_defconfig | 1 + configs/stm32f469_disco_sd_defconfig | 1 + configs/stm32f469_disco_xip_defconfig | 1 + 5 files changed, 27 insertions(+) create mode 100644 board/stmicroelectronics/common/stm32f4xx/busybox.fragment diff --git a/board/stmicroelectronics/common/stm32f4xx/busybox.fragment b/board/stmicroelectronics/common/stm32f4xx/busybox.fragment new file mode 100644 index 0000000000..d0bf2cb99d --- /dev/null +++ b/board/stmicroelectronics/common/stm32f4xx/busybox.fragment @@ -0,0 +1,21 @@ +# CONFIG_FEATURE_HWIB is not set +# CONFIG_HOSTNAME is not set +# CONFIG_DNSDOMAINNAME is not set +# CONFIG_FEATURE_HTTPD_PORT_DEFAULT is not set +# CONFIG_IFCONFIG is not set +# CONFIG_FEATURE_IFCONFIG_HW is not set +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFUP is not set +# CONFIG_IFDOWN is not set +# CONFIG_IP is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_NC is not set +# CONFIG_NETSTAT is not set +# CONFIG_PING is not set +# CONFIG_ROUTE is not set +# CONFIG_TC is not set +# CONFIG_TELNET is not set +# CONFIG_WGET is not set +# CONFIG_UDHCPC is not set diff --git a/board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh b/board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh index 2ac9c653c3..4fcce61500 100755 --- a/board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh +++ b/board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh @@ -1,4 +1,7 @@ #!/bin/sh +# Busybox is built without network support +sed -i '/hostname/d' ${TARGET_DIR}/etc/inittab + # Kernel is built without devpts support sed -i '/^devpts/d' ${TARGET_DIR}/etc/fstab diff --git a/configs/stm32f429_disco_xip_defconfig b/configs/stm32f429_disco_xip_defconfig index 5640d9dc4d..d4e000487a 100644 --- a/configs/stm32f429_disco_xip_defconfig +++ b/configs/stm32f429_disco_xip_defconfig @@ -14,6 +14,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f429-disco" BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/common/stm32f4xx/busybox.fragment" # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set diff --git a/configs/stm32f469_disco_sd_defconfig b/configs/stm32f469_disco_sd_defconfig index 662ce3b3d0..8b10bc6741 100644 --- a/configs/stm32f469_disco_sd_defconfig +++ b/configs/stm32f469_disco_sd_defconfig @@ -14,6 +14,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco" BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/common/stm32f4xx/busybox.fragment" # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_SIZE="32M" diff --git a/configs/stm32f469_disco_xip_defconfig b/configs/stm32f469_disco_xip_defconfig index ae2780556a..e362a99851 100644 --- a/configs/stm32f469_disco_xip_defconfig +++ b/configs/stm32f469_disco_xip_defconfig @@ -14,6 +14,7 @@ BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco" BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/common/stm32f4xx/busybox.fragment" # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set