diff mbox

[LEDE-DEV,staging,7/7] ath25: recover creation of separate kernel and rootfs

Message ID 1463995832-10364-8-git-send-email-ryazanov.s.a@gmail.com
State Accepted
Headers show

Commit Message

Sergey Ryazanov May 23, 2016, 9:30 a.m. UTC
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@gmail.com>
---
 target/linux/ath25/image/Makefile | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox

Patch

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