linux: ensure buildroot_defconfig is writable
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 28 Jan 2014 20:11:23 +0000 (21:11 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 28 Jan 2014 21:56:17 +0000 (22:56 +0100)
If $(KERNEL_SOURCE_CONFIG) is read-only (eg. because 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@pobox.com>
[yann.morin.1998@free.fr: use $(INSTALL) instead of cp, don't 'rm -f']
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
linux/linux.mk

index ab25fe9871dcb6dde235c709d7fce84eeac5644f..62033d280b87a2164efb57b9f6c4e2bc3a8293e8 100644 (file)
@@ -164,7 +164,7 @@ KERNEL_SOURCE_CONFIG = $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)
 endif
 
 define LINUX_CONFIGURE_CMDS
-       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),