bcm4908: prepend kernel images with a custom header
authorRafał Miłecki <rafal@milecki.pl>
Wed, 13 Jan 2021 08:16:46 +0000 (09:16 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Fri, 15 Jan 2021 06:45:19 +0000 (07:45 +0100)
It's required for CFE to accept kernel.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/bcm4908/image/Makefile

index 7eaafd583c0169aa1e349fd44754eee540b42c2b..f5db38915de32a5d29c3de66a790345dfd945e34 100644 (file)
@@ -8,11 +8,16 @@ define Build/bcm4908lzma
        mv $@.new $@
 endef
 
+define Build/bcm4908kernel
+       $(STAGING_DIR_HOST)/bin/bcm4908kernel -i $@ -o $@.new
+       mv $@.new $@
+endef
+
 define Device/Default
-  KERNEL := kernel-bin | bcm4908lzma
+  KERNEL := kernel-bin | bcm4908lzma | bcm4908kernel
   KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
   KERNEL_INITRAMFS_SUFFIX := .bin
-  KERNEL_INITRAMFS := kernel-bin | bcm4908lzma
+  KERNEL_INITRAMFS := kernel-bin | bcm4908lzma | bcm4908kernel
   FILESYSTEMS := squashfs
   KERNEL_NAME := Image
   IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)