[LEDE-DEV] [PATCH] bcm53xx: put kernel into TRX when building initramfs images
Rafał Miłecki
zajec5 at gmail.com
Fri Mar 24 10:37:48 PDT 2017
From: Rafał Miłecki <rafal at milecki.pl>
Many (most?) devices can't boot raw kernel using tftp and probably none
allows flashing it. It's way more usable to have TRX with kernel
containing initrams as such an image can be actually flashed.
Some devices may support tftp flash booting and it would be the best to
have both images generated for them. Unfortunately it's not possible
right now (only one initramfs image can be generated).
Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
target/linux/bcm53xx/image/Makefile | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
index 660981ea1e..58ec84cae6 100644
--- a/target/linux/bcm53xx/image/Makefile
+++ b/target/linux/bcm53xx/image/Makefile
@@ -49,6 +49,14 @@ define Build/buffalo-wzr-header
mv $@.new $@
endef
+define Build/trx
+ $(STAGING_DIR_HOST)/bin/trx \
+ -o $@.new \
+ -m 33554432 \
+ -f $@
+ mv $@.new $@
+endef
+
define Build/trx-serial
$(STAGING_DIR_HOST)/bin/trx \
-o $@.new \
@@ -111,6 +119,7 @@ define Device/Default
DEVICE_DTS := $(patsubst %.dtb,%,$(notdir $(wildcard $(if $(IB),$(KDIR),$(DTS_DIR))/*-$(1).dtb)))
KERNEL := kernel-bin | append-dtb | lzma-d16
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma-d16 | trx
FILESYSTEMS := squashfs
KERNEL_NAME := zImage
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1).$$(2)
--
2.11.0
More information about the Lede-dev
mailing list