[Buildroot] [PATCH 3/5] linux: ensure buildroot_defconfig is writable

Yann E. MORIN yann.morin.1998 at free.fr
Thu Nov 14 18:46:57 UTC 2013

From: "Yann E. MORIN" <yann.morin.1998 at free.fr>

If $(KERNEL_SOURCE_CONFIG) is read-only (eg. becasue Buildroot's source
dir is), the rm of $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig will
either fail, or prompt the user, both of which we want to avoid.

Make it writable by using $(INSTALL).

Fixes: #4363
Signed-off-by: Nathan Lynch <ntl at pobox.com>
[yann.morin.1998 at free.fr: use $(INSTALL) instead of cp, don't 'rm -f']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
 linux/linux.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 33931e5..fcaf7a9 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
-	cp $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
+	$(INSTALL) -m 0644 $(KERNEL_SOURCE_CONFIG) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
 	$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
 	rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
 	$(if $(BR2_arm)$(BR2_armeb),

More information about the buildroot mailing list