aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rb532/image
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-05 17:22:16 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-07 17:50:57 +0100
commitad76fdfc8afc6e13b371cb47f6a82af39eabd414 (patch)
tree113092d72bb224bd420db3b4a0df8bc55738ef89 /target/linux/rb532/image
parent5b6b0aa267bac03a8fb75d2e6c7dd98f384b7fea (diff)
downloadupstream-ad76fdfc8afc6e13b371cb47f6a82af39eabd414.tar.gz
upstream-ad76fdfc8afc6e13b371cb47f6a82af39eabd414.tar.bz2
upstream-ad76fdfc8afc6e13b371cb47f6a82af39eabd414.zip
rb532: switch to UBI, drop yaffs2 support, use sysupgrade for NAND
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/rb532/image')
-rw-r--r--target/linux/rb532/image/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/rb532/image/Makefile b/target/linux/rb532/image/Makefile
index d529957dc7..06255c60ed 100644
--- a/target/linux/rb532/image/Makefile
+++ b/target/linux/rb532/image/Makefile
@@ -13,12 +13,41 @@ RAMSIZE = 0x00100000 # 1MB
IMAGE_COPY = 1
LOADER_MAKEOPTS= \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ PATH="$(TARGET_PATH)" \
+ CC="$(TARGET_CC)" \
KDIR=$(KDIR) \
LOADADDR=$(LOADADDR) \
KERNEL_ENTRY=$(KERNEL_ENTRY) \
RAMSIZE=$(RAMSIZE) \
IMAGE_COPY=$(IMAGE_COPY)
+
+LOADER_DIR = $(GENERIC_PLATFORM_DIR)/image/lzma-loader
+
+define Build/lzma-loader-elf
+ rm -rf $@.loader
+ mkdir -p $@.loader
+ $(CP) $(LOADER_DIR)/src/* $@.loader/
+ $(CP) $@ $@.loader/vmlinux.lzma
+ $(MAKE) -C $@.loader $(LOADER_MAKEOPTS)
+ cp $@.loader/lzma.elf $@
+ rm -rf $@.loader
+endef
+
+define Device/nand
+ CMDLINE := ubi.mtd=1 ubi.block=0,rootfs root=/dev/ubiblock0_1
+ BOARD_NAME := rb532
+ SUPPORTED_DEVICES := rb532
+ KERNEL_INITRAMFS := append-kernel | patch-cmdline | lzma | lzma-loader-elf
+ KERNEL := $$(KERNEL_INITRAMFS) | kernel2minor -s 2048 -i 0 -c
+ IMAGES := sysupgrade.bin
+ FILESYSTEMS := squashfs
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+
+TARGET_DEVICES := nand
+
define Build/Clean
$(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean
endef