Skip to contentSkip to conversation

configs/stm32f4xx_defconfig: off network utils from busybox

PATCH In review Dario Binacchi 3 participants 3 messages May 28, 2023 – Jul 28, 2023 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 .../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
board/stmicroelectronics/common/stm32f4xx/busybox.fragment new file +21 -0
new file mode 100644
index 000000000000..d0bf2cb99dbb
@@ -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
board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh +3 -0
index 2ac9c653c327..4fcce6150071 100755
@@ -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
configs/stm32f429_disco_xip_defconfig +1 -0
index 5640d9dc4d32..d4e000487a80 100644
@@ -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
configs/stm32f469_disco_sd_defconfig +1 -0
index 662ce3b3d068..8b10bc674176 100644
@@ -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"
configs/stm32f469_disco_xip_defconfig +1 -0
index ae2780556ad1..e362a9985116 100644
@@ -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
Signature · 6 lines
2.32.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v1 1/1
#1 lore raw

Hi Dario,

Quoted 3 lines · Dario Binacchi

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.

good idea,

Quoted 1 line

I've built tested stm32f469_disco_sd_defconfig successfully, so:

Signature · 1 line
CEO/CTO@Benetti Engineering sas
Quoted 77 lines
---
  .../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

board/stmicroelectronics/common/stm32f4xx/busybox.fragment new file +21 -0
new file mode 100644
index 000000000000..d0bf2cb99dbb
@@ -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
board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh +3 -0
index 2ac9c653c327..4fcce6150071 100755
@@ -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
configs/stm32f429_disco_xip_defconfig +1 -0
index 5640d9dc4d32..d4e000487a80 100644
@@ -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
configs/stm32f469_disco_sd_defconfig +1 -0
index 662ce3b3d068..8b10bc674176 100644
@@ -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"
configs/stm32f469_disco_xip_defconfig +0 -0
index ae2780556ad1..e362a9985116 100644

configs/stm32f469_disco_xip_defconfig BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" · line 20

Quoted 7 lines
configs/stm32f469_disco_xip_defconfig +1 -0
@@ -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

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Dario Binacchi
Quoted 5 lines · On Sun, 28 May 2023 17:31:56 +0200 Dario Binacchi…

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.

Quoted 8 lines
---
 .../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

We normally don't want to have defconfigs with too many tweaks, but I agree the STM32F4 ones are special due to their low flash/RAM size, so applied to master. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot