Skip to contentSkip to conversation

boot/arm-trusted-firmware: add config option for custom patches

PATCH In review Andreas Ehmanns 3 participants 5 messages Jan 28, 2022 – Apr 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 boot/arm-trusted-firmware: add config option for custom patches

Many embedded board manufacturer provide their BSP as patches to linux kernel and u-boot. They can simply be applied by setting the corresponding buildroot config (custom patches).
Nowadays patches for the arm trusted firmware (ATF) are also part of BSP deliveries but there is no config option in buildroot for ATF to apply custom patches.
This patch adds (similar to linux kernel and u-boot) an option to apply custom patches to ATF.

---
 boot/arm-trusted-firmware/Config.in           |  8 +++++++
 .../arm-trusted-firmware.mk                   | 21 +++++++++++++++++++
 2 files changed, 29 insertions(+)
boot/arm-trusted-firmware/Config.in +8 -0
index b1fc03e10b..786a3083a2 100644
@@ -63,6 +63,14 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION
 
 endif
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH
+	string "Custom ATF patches"
+	help
+	  A space-separated list of patches to apply to ATF.
+	  Each patch can be described as an URL, a local file path,
+	  or a directory. In the case of a directory, all files
+	  matching *.patch in the directory will be applied.
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
 	string "ATF platform"
 	help
boot/arm-trusted-firmware/arm-trusted-firmware.mk +21 -0
index 03fa83b7b5..d329bdbfc3 100644
@@ -29,6 +29,27 @@ ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST
 BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
 endif
 
+# Analogous code exists in linux/linux.mk. Basically, the generic
+# package infrastructure handles downloading and applying remote
+# patches. Local patches are handled depending on whether they are
+# directories or files.
+ARM_TRUSTED_FIRMWARE_PATCHES = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH))
+ARM_TRUSTED_FIRMWARE_PATCH = $(filter ftp://% http://% https://%,$(ARM_TRUSTED_FIRMWARE_PATCHES))
+
+define ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES
+	for p in $(filter-out ftp://% http://% https://%,$(ARM_TRUSTED_FIRMWARE_PATCHES)) ; do \
+		if test -d $$p ; then \
+			$(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
+		else \
+			$(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
+		fi \
+	done
+endef
+ARM_TRUSTED_FIRMWARE_POST_PATCH_HOOKS += ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES
+
+# We have no way to know the hashes for user-supplied patches.
+BR_NO_CHECK_HASH_FOR += $(notdir $(ARM_TRUSTED_FIRMWARE_PATCHES))
+
 ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
 
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)

--
2.26.2

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

#1 lore raw
Quoted 8 lines · Andreas Ehmanns

Many embedded board manufacturer provide their BSP as patches to linux kernel and u-boot. They can simply be applied by setting the corresponding buildroot config (custom patches).
Nowadays patches for the arm trusted firmware (ATF) are also part of BSP deliveries but there is no config option in buildroot for ATF to apply custom patches.
This patch adds (similar to linux kernel and u-boot) an option to apply custom patches to ATF.

Hi Andreas,

You shouldn't need a custom option to add patches for each package. If you add patches to $(BR2_EXTERNAL)/patches/arm-trusted-firmware then they will get applied automatically, we are using this mechanism already.

I think the specific patch options for the kernel and U-Boot may predate that mechanism but don't need to be used anymore either.

Quoted 79 lines
---
 boot/arm-trusted-firmware/Config.in           |  8 +++++++
 .../arm-trusted-firmware.mk                   | 21 +++++++++++++++++++
 2 files changed, 29 insertions(+)
boot/arm-trusted- renamed from boot/arm-trusted-firmware/Config.in +0 -0

firmware/Config.in
index b1fc03e10b..786a3083a2 100644

boot/arm-trusted-firmware/Config.in +8 -0
@@ -63,6 +63,14 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION
 
 endif
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH
+	string "Custom ATF patches"
+	help
+	  A space-separated list of patches to apply to ATF.
+	  Each patch can be described as an URL, a local file path,
+	  or a directory. In the case of a directory, all files
+	  matching *.patch in the directory will be applied.
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
 	string "ATF platform"
 	help
boot/arm- renamed from boot/arm-trusted-firmware/arm-trusted-firmware.mk +0 -0

trusted-firmware/arm-trusted-firmware.mk
index 03fa83b7b5..d329bdbfc3 100644

boot/arm-trusted-firmware/arm-trusted-firmware.mk +0 -0
@@ -29,6 +29,27 @@ ifeq

($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST
BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
endif

boot/arm-trusted-firmware/arm-trusted-firmware.mk +5 -0
+# Analogous code exists in linux/linux.mk. Basically, the generic
+# package infrastructure handles downloading and applying remote
+# patches. Local patches are handled depending on whether they are
+# directories or files.
+ARM_TRUSTED_FIRMWARE_PATCHES = $(call

qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH)) +ARM_TRUSTED_FIRMWARE_PATCH = $(filter
https://urldefense.com/v3/__ftp://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78mYZP6cg$
https://urldefense.com/v3/__http://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128
fh66I9s3_Ij-
rcq9bSBMIxBB8jTXDxe6jH78b3MIP3A$ https://urldefense.com/v3/__https://*,$(ARM
_TRUSTED_FIRMWARE_PATCHES)__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij- rcq9bSBMIxBB8jTXDxe6jH78N2PO7_g$ )

boot/arm-trusted-firmware/arm-trusted-firmware.mk +3 -0
+
+define ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES
+	for p in $(filter-out 

https://urldefense.com/v3/__ftp://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78mYZP6cg$
https://urldefense.com/v3/__http://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128
fh66I9s3_Ij-
rcq9bSBMIxBB8jTXDxe6jH78b3MIP3A$ https://urldefense.com/v3/__https://*,$(ARM
_TRUSTED_FIRMWARE_PATCHES)__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij- rcq9bSBMIxBB8jTXDxe6jH78N2PO7_g$ ) ; do \

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
+		if test -d $$p ; then \
+			$(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
+		else \
+			$(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` ||

exit 1; \

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
+		fi \
+	done
+endef
+ARM_TRUSTED_FIRMWARE_POST_PATCH_HOOKS +=

ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -1
+
+# We have no way to know the hashes for user-supplied patches.
+BR_NO_CHECK_HASH_FOR += $(notdir $(ARM_TRUSTED_FIRMWARE_PATCHES))
+
 ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
 
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)
--

2.26.2

Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://urldefense.com/v3/__https://lists.buildroot.org/mailman/listinfo/buildroot__;!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78CXtWZJI$

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

#2 lore raw

Robert, Andreas, All,

On 2022-01-28 16:25 +0000, Robert Hancock via buildroot spake thusly:

Quoted 9 lines · Andreas Ehmanns
Quoted 8 lines

Many embedded board manufacturer provide their BSP as patches to linux kernel and u-boot. They can simply be applied by setting the corresponding buildroot config (custom patches).
Nowadays patches for the arm trusted firmware (ATF) are also part of BSP deliveries but there is no config option in buildroot for ATF to apply custom patches.
This patch adds (similar to linux kernel and u-boot) an option to apply custom patches to ATF.

Quoted 3 lines

You shouldn't need a custom option to add patches for each package. If you add patches to $(BR2_EXTERNAL)/patches/arm-trusted-firmware then they will get applied automatically, we are using this mechanism already.

I think you forgot a part to this:

... as long as you set BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches" in your Buildroot configuration.

BR2_GLOBAL_PATCH_DIR is the generic solution to apply custom patches to any package in Buildroot. BR2_GLOBAL_PATCH_DIR can even be a space-separated list of directories. And it can also use a 'series' file rather than just globing *.patch.

Quoted 2 lines

I think the specific patch options for the kernel and U-Boot may predate that mechanism but don't need to be used anymore either.

Indeed. We're keeping them just because of inertia...

Regards,
Yann E. MORIN.

Quoted 86 lines
Quoted 78 lines
---
 boot/arm-trusted-firmware/Config.in           |  8 +++++++
 .../arm-trusted-firmware.mk                   | 21 +++++++++++++++++++
 2 files changed, 29 insertions(+)
boot/arm-trusted- renamed from boot/arm-trusted-firmware/Config.in +0 -0

firmware/Config.in
index b1fc03e10b..786a3083a2 100644

boot/arm-trusted-firmware/Config.in +8 -0
@@ -63,6 +63,14 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION
 
 endif
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH
+	string "Custom ATF patches"
+	help
+	  A space-separated list of patches to apply to ATF.
+	  Each patch can be described as an URL, a local file path,
+	  or a directory. In the case of a directory, all files
+	  matching *.patch in the directory will be applied.
+
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
 	string "ATF platform"
 	help
boot/arm- renamed from boot/arm-trusted-firmware/arm-trusted-firmware.mk +0 -0

trusted-firmware/arm-trusted-firmware.mk
index 03fa83b7b5..d329bdbfc3 100644

boot/arm-trusted-firmware/arm-trusted-firmware.mk +0 -0
@@ -29,6 +29,27 @@ ifeq

($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST
BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
endif

boot/arm-trusted-firmware/arm-trusted-firmware.mk +5 -0
+# Analogous code exists in linux/linux.mk. Basically, the generic
+# package infrastructure handles downloading and applying remote
+# patches. Local patches are handled depending on whether they are
+# directories or files.
+ARM_TRUSTED_FIRMWARE_PATCHES = $(call

qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH)) +ARM_TRUSTED_FIRMWARE_PATCH = $(filter
https://urldefense.com/v3/__ftp://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78mYZP6cg$
https://urldefense.com/v3/__http://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128
fh66I9s3_Ij-
rcq9bSBMIxBB8jTXDxe6jH78b3MIP3A$ https://urldefense.com/v3/__https://*,$(ARM
_TRUSTED_FIRMWARE_PATCHES)__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij- rcq9bSBMIxBB8jTXDxe6jH78N2PO7_g$ )

boot/arm-trusted-firmware/arm-trusted-firmware.mk +3 -0
+
+define ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES
+	for p in $(filter-out 

https://urldefense.com/v3/__ftp://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78mYZP6cg$
https://urldefense.com/v3/__http://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128
fh66I9s3_Ij-
rcq9bSBMIxBB8jTXDxe6jH78b3MIP3A$ https://urldefense.com/v3/__https://*,$(ARM
_TRUSTED_FIRMWARE_PATCHES)__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij- rcq9bSBMIxBB8jTXDxe6jH78N2PO7_g$ ) ; do \

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
+		if test -d $$p ; then \
+			$(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
+		else \
+			$(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` ||

exit 1; \

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
+		fi \
+	done
+endef
+ARM_TRUSTED_FIRMWARE_POST_PATCH_HOOKS +=

ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -1
+
+# We have no way to know the hashes for user-supplied patches.
+BR_NO_CHECK_HASH_FOR += $(notdir $(ARM_TRUSTED_FIRMWARE_PATCHES))
+
 ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
 
 ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)
--

2.26.2

Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://urldefense.com/v3/__https://lists.buildroot.org/mailman/listinfo/buildroot__;!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78CXtWZJI$

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

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Robert Hancock via buildroot
Quoted 9 lines · Robert Hancock via buildroot
Quoted 8 lines · Andreas Ehmanns

Many embedded board manufacturer provide their BSP as patches to linux kernel and u-boot. They can simply be applied by setting the corresponding buildroot config (custom patches).
Nowadays patches for the arm trusted firmware (ATF) are also part of BSP deliveries but there is no config option in buildroot for ATF to apply custom patches.
This patch adds (similar to linux kernel and u-boot) an option to apply custom patches to ATF.

Quoted 8 lines

Hi Andreas,

You shouldn't need a custom option to add patches for each package. If you add patches to $(BR2_EXTERNAL)/patches/arm-trusted-firmware then they will get applied automatically, we are using this mechanism already.

I think the specific patch options for the kernel and U-Boot may predate that mechanism but don't need to be used anymore either.

Hi Robert, Hi Yann,
I typically store BSP Patches under board/<manufacturer>/<board name>/patches/<linux,uboot,atf>/<version number> ...
This is necessary for me since I have to manage a lot of different embedded boards with buildroot. Every manufacturer has its own patches, often different patches for different boards and also for different releases. A global patch directory
does not help because I have to configure in each defconfig which patches from which manufacturer/board/version combination should be applied. For that I use the custom patch option of linux and uboot since a lot of years and it works perfectly for me. So I transferred this mechanism to ATF too. This patch helps me managing all the different combination of BSP versions, therefore I thought it may be helpful for others too.

Regards,
Andreas

Quoted 74 lines
Quoted 74 lines
---
  boot/arm-trusted-firmware/Config.in           |  8 +++++++
  .../arm-trusted-firmware.mk                   | 21 +++++++++++++++++++
  2 files changed, 29 insertions(+)
boot/arm-trusted- renamed from boot/arm-trusted-firmware/Config.in +0 -0

firmware/Config.in
index b1fc03e10b..786a3083a2 100644

boot/arm-trusted-firmware/Config.in +8 -0
@@ -63,6 +63,14 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION
 
  endif
 
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH
+	string "Custom ATF patches"
+	help
+	  A space-separated list of patches to apply to ATF.
+	  Each patch can be described as an URL, a local file path,
+	  or a directory. In the case of a directory, all files
+	  matching *.patch in the directory will be applied.
+
  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM
  	string "ATF platform"
  	help
boot/arm- renamed from boot/arm-trusted-firmware/arm-trusted-firmware.mk +0 -0

trusted-firmware/arm-trusted-firmware.mk
index 03fa83b7b5..d329bdbfc3 100644

boot/arm-trusted-firmware/arm-trusted-firmware.mk +0 -0
@@ -29,6 +29,27 @@ ifeq

($(BR2_TARGET_ARM_TRUSTED_FIRMWARE)$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST
BR_NO_CHECK_HASH_FOR += $(ARM_TRUSTED_FIRMWARE_SOURCE)
endif

boot/arm-trusted-firmware/arm-trusted-firmware.mk +5 -0
+# Analogous code exists in linux/linux.mk. Basically, the generic
+# package infrastructure handles downloading and applying remote
+# patches. Local patches are handled depending on whether they are
+# directories or files.
+ARM_TRUSTED_FIRMWARE_PATCHES = $(call

qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PATCH)) +ARM_TRUSTED_FIRMWARE_PATCH = $(filter
https://urldefense.com/v3/__ftp://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78mYZP6cg$
https://urldefense.com/v3/__http://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128
fh66I9s3_Ij-
rcq9bSBMIxBB8jTXDxe6jH78b3MIP3A$ https://urldefense.com/v3/__https://*,$(ARM
_TRUSTED_FIRMWARE_PATCHES)__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij- rcq9bSBMIxBB8jTXDxe6jH78N2PO7_g$ )

boot/arm-trusted-firmware/arm-trusted-firmware.mk +3 -0
+
+define ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES
+	for p in $(filter-out

https://urldefense.com/v3/__ftp://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78mYZP6cg$
https://urldefense.com/v3/__http://*__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128
fh66I9s3_Ij-
rcq9bSBMIxBB8jTXDxe6jH78b3MIP3A$ https://urldefense.com/v3/__https://*,$(ARM
_TRUSTED_FIRMWARE_PATCHES)__;JQ!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij- rcq9bSBMIxBB8jTXDxe6jH78N2PO7_g$ ) ; do \

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
+		if test -d $$p ; then \
+			$(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
+		else \
+			$(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` ||

exit 1; \

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
+		fi \
+	done
+endef
+ARM_TRUSTED_FIRMWARE_POST_PATCH_HOOKS +=

ARM_TRUSTED_FIRMWARE_APPLY_LOCAL_PATCHES

boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
+
+# We have no way to know the hashes for user-supplied patches.
+BR_NO_CHECK_HASH_FOR += $(notdir $(ARM_TRUSTED_FIRMWARE_PATCHES))
+
  ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES
Quoted 8 lines
Quoted 8 lines

ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y)
--
2.26.2

_______________________________________________
buildroot mailing list
[email protected]
https://urldefense.com/v3/__https://lists.buildroot.org/mailman/listinfo/buildroot__;!!IOGos0k!zefK7OglGeltoASai_ZVP128fh66I9s3_Ij-rcq9bSBMIxBB8jTXDxe6jH78CXtWZJI$

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

#4 lore raw

[Buildroot] Enable missing security options for ISC dhcp server

In reply to Andreas Ehmanns

Dear all,
I was trying to make the ISC dhcp daemon more secure by using the -user and -group option to let dhcp server run as non-root user. Unfortunately these options are not available when building ISC dhcp server with buildroot.
The reason is, that the configure script must be called with the additional option --enable-paranoia to activate these options. But this option is not set in the dhcp.mk file.

To be backward compatible I added a new option to the dhcp's Config.in to enable this feature when desired.

If you are interested in this feature and can create a patch and send it this list to make the change available to all buildroot users. Let me know what you think. Below are some details.

Regards,
Andreas

1) Add this to Config.in:
config BR2_PACKAGE_DHCP_SERVER_ENABLE_PARANOIA
        bool "Enable paranoia options"
        depends on BR2_PACKAGE_DHCP_SERVER
        help
          Add option --enable-paranoia to configure script. This activates additional server options (-user, -group and -chroot) to make dhcp server more secure.

2) And to dhcp.mk:
ifeq ($(BR2_PACKAGE_DHCP_SERVER_ENABLE_PARANOIA),y) DHCP_CONF_OPTS += --enable-paranoia
endif

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