diff options
author | John Crispin <john@openwrt.org> | 2014-04-03 14:26:24 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-04-03 14:26:24 +0000 |
commit | 58eccdac4fb6b384dde8723876e69dafb8bf2368 (patch) | |
tree | 1cb6aa214bd126850734c1580add7a2c6aa28e36 /target/linux/lantiq/image | |
parent | 78a3f697a53b9d7582d1f750ad30bfaa815808d7 (diff) | |
download | mtk-20170518-58eccdac4fb6b384dde8723876e69dafb8bf2368.zip mtk-20170518-58eccdac4fb6b384dde8723876e69dafb8bf2368.tar.gz mtk-20170518-58eccdac4fb6b384dde8723876e69dafb8bf2368.tar.bz2 |
lantiq: fix vr9 ubi handling
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 40364
Diffstat (limited to 'target/linux/lantiq/image')
-rw-r--r-- | target/linux/lantiq/image/Makefile | 29 | ||||
-rw-r--r-- | target/linux/lantiq/image/ubinize-overlay.cfg | 21 |
2 files changed, 46 insertions, 4 deletions
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 28cb96c..34591c7 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -54,10 +54,10 @@ define TPLinkImageLzma endef define MkImageEVA - lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux-$(1).lzma $(KDIR)/$(1).eva.prealign - dd if=$(KDIR)/$(1).eva.prealign of=$(KDIR)/$(1).eva.align.64k bs=64k conv=sync - dd if=$(KDIR)/$(1).eva.prealign of=$(KDIR)/$(1).eva.align.128k bs=128k conv=sync - cat ./eva.dummy.squashfs >> $(KDIR)/$(1).eva.align.64k + lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/$(1)$(2).eva.prealign + dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.64k bs=64k conv=sync + dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.128k bs=128k conv=sync + cat ./eva.dummy.squashfs >> $(KDIR)/$(1)$(2).eva.align.64k endef define CompressGzip @@ -93,6 +93,21 @@ define Image/BuildEVA/squashfs $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva) endef +define Image/BuildEVA/ubifs + +ifneq ($($(PROFILE)_UBIFS_OPTS),) + $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubifs +endif +endef + +define Image/BuildEVA/ubi + +ifneq ($($(PROFILE)_UBI_OPTS),) + $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs.ubi + $(CP) $(KDIR)/root-overlay.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-rootfs-overlay.ubi +endif +endef + define Image/BuildLoader/squashfs dd if=$(KDIR)/loader-$(2).bin of=$(KDIR)/loader-$(2).bin.padded bs=1536k conv=sync cat $(KDIR)/loader-$(2).bin.padded $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image @@ -197,6 +212,12 @@ define Image/BuildKernelEVA/Template $(call MkImageEVA,$(1)) $(CP) $(KDIR)/$(1).eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.64k $(CP) $(KDIR)/$(1).eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.128k +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + $(call PatchKernelLzma,$(1),-initramfs) + $(call MkImageEVA,$(1),-initramfs) + $(CP) $(KDIR)/$(1)-initramfs.eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.64k + $(CP) $(KDIR)/$(1)-initramfs.eva.align.128k $(BIN_DIR)/$(IMG_PREFIX)-$(1)-initramfs.eva.align.128k +endif endef define Image/BuildKernelGzip/Template diff --git a/target/linux/lantiq/image/ubinize-overlay.cfg b/target/linux/lantiq/image/ubinize-overlay.cfg new file mode 100644 index 0000000..ce8e5d9 --- /dev/null +++ b/target/linux/lantiq/image/ubinize-overlay.cfg @@ -0,0 +1,21 @@ +[rootfs] +# Volume mode (other option is static) +mode=ubi +# Source image +image=root.squashfs +# Volume ID in UBI image +vol_id=0 +# Allow for dynamic resize +vol_type=dynamic +# Volume name +vol_name=rootfs +[rootfs_data] +# Volume mode (other option is static) +mode=ubi +# Volume ID in UBI image +vol_id=1 +# Allow for dynamic resize +vol_type=dynamic +# Volume name +vol_name=rootfs_data +vol_size=1MiB |