aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-27 21:22:17 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-27 21:22:17 +0000
commit2daa34da02d288f8f322ce2fb39bf872e2cce92f (patch)
tree6bca9f25863293f0f0ddf05aac12095411970f20 /target/linux
parentc2d1ad30e8396632dc2048557be1fb37792b3832 (diff)
downloadupstream-2daa34da02d288f8f322ce2fb39bf872e2cce92f.tar.gz
upstream-2daa34da02d288f8f322ce2fb39bf872e2cce92f.tar.bz2
upstream-2daa34da02d288f8f322ce2fb39bf872e2cce92f.zip
rb532: align partitions to 128KB
because block2mtd wants "erasesize must be a divisor of device size" since 3.15 Signed-off-by: Roman Yeryomin <roman@advem.lv> SVN-Revision: 45072
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/rb532/image/Makefile10
-rwxr-xr-xtarget/linux/rb532/image/gen_image.sh3
2 files changed, 11 insertions, 2 deletions
diff --git a/target/linux/rb532/image/Makefile b/target/linux/rb532/image/Makefile
index 706c768060..284b3d4510 100644
--- a/target/linux/rb532/image/Makefile
+++ b/target/linux/rb532/image/Makefile
@@ -63,10 +63,18 @@ define Image/cmdline/yaffs2
root=/dev/mtdblock1 rootfstype=yaffs2
endef
+define Image/Build/squashfs
+ $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+endef
+
define Image/Build
+ $(call Image/Build/$(1),$(1))
$(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel
$(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel '$(strip $(call Image/cmdline/$(1))) '
- ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).bin 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1)
+ ./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).bin \
+ 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel \
+ $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1) \
+ 128
endef
$(eval $(call BuildImage))
diff --git a/target/linux/rb532/image/gen_image.sh b/target/linux/rb532/image/gen_image.sh
index 8875834b9e..a2d6f4012a 100755
--- a/target/linux/rb532/image/gen_image.sh
+++ b/target/linux/rb532/image/gen_image.sh
@@ -4,11 +4,12 @@ KERNELSIZE="$2"
KERNELIMAGE="$3"
ROOTFSSIZE="$4"
ROOTFSIMAGE="$5"
+ALIGN="$6"
rm -f "$OUTPUT"
# create partition table
-set `ptgen -o "$OUTPUT" -h 16 -s 32 -t 0x27 -p ${KERNELSIZE}m -t 0x83 -p ${ROOTFSSIZE}m`
+set `ptgen -o "$OUTPUT" -h 16 -s 32 -l ${ALIGN} -t 0x27 -p ${KERNELSIZE}m -t 0x83 -p ${ROOTFSSIZE}m`
KERNELOFFSET="$(($1 / 512))"
ROOTFSOFFSET="$(($3 / 512))"