[LEDE-DEV] [PATCH staging 7/7] ath25: recover creation of separate kernel and rootfs
Sergey Ryazanov
ryazanov.s.a at gmail.com
Mon May 23 02:30:32 PDT 2016
Since we do not generate factory images for most of supported
platforms, we need individual kernel and rootfs to be able update
factory firmware by our via RedBoot.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
---
target/linux/ath25/image/Makefile | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/target/linux/ath25/image/Makefile b/target/linux/ath25/image/Makefile
index 9fa30fa..f659df7 100644
--- a/target/linux/ath25/image/Makefile
+++ b/target/linux/ath25/image/Makefile
@@ -9,6 +9,23 @@ include $(INCLUDE_DIR)/image.mk
DEVICE_VARS += KERNEL_PREFIX FILESYSTEMS
+define Image/BuildKernel
+ cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
+ gzip -9n -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
+ $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.lzma
+ dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.gz bs=65536 conv=sync
+ dd if=$(KDIR)/vmlinux.bin.lzma of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma bs=65536 conv=sync
+endef
+
+define Image/Build/squashfs
+ $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+endef
+
+define Image/Build
+ $(call Image/Build/$(1))
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
+endef
+
define Device/Default
PROFILES = Default $$(DEVICE_NAME)
KERNEL := lzma-kernel
--
2.7.3
More information about the Lede-dev
mailing list