linux: make it possible to install the kernel in /boot
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 5 Jul 2011 19:53:54 +0000 (21:53 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 7 Jul 2011 21:16:05 +0000 (23:16 +0200)
[Peter: always copy to output/images as requested by Luca]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
linux/Config.in
linux/linux.mk

index 1f1a69c44e09abc0a77d22a640a6119ee71d4911..bdfa5b7ef5c8a69094c1c7afa86291ca2b06b6dd 100644 (file)
@@ -153,6 +153,14 @@ config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME
          Specify the kernel make target to build the kernel that you
          need.
 
+config BR2_LINUX_KERNEL_INSTALL_TARGET
+       bool "Install kernel image to /boot in target"
+       depends on !BR2_TARGET_ROOTFS_INITRAMFS
+       help
+         Select this option to have the kernel image installed to
+         /boot in the target root filesystem, as is typically done on
+         x86/x86_64 systems.
+
 endif # BR2_LINUX_KERNEL
 
 endmenu
index 43ca87b9f7e88cf8b7d1d4d9964b2d08dd662019..a5b9b8e2e7daa9c4d1be5744adc37ba88e475ee7 100644 (file)
@@ -157,6 +157,9 @@ $(LINUX26_DIR)/.stamp_compiled: $(LINUX26_DIR)/.stamp_configured $(LINUX26_DIR)/
 # Installation
 $(LINUX26_DIR)/.stamp_installed: $(LINUX26_DIR)/.stamp_compiled
        @$(call MESSAGE,"Installing kernel")
+ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
+       install -m 0644 -D $(LINUX26_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX26_IMAGE_NAME)
+endif
        cp $(LINUX26_IMAGE_PATH) $(BINARIES_DIR)
        # Install modules and remove symbolic links pointing to build
        # directories, not relevant on the target