mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
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
This commit is contained in:
parent
c2d1ad30e8
commit
2daa34da02
@ -63,10 +63,18 @@ define Image/cmdline/yaffs2
|
|||||||
root=/dev/mtdblock1 rootfstype=yaffs2
|
root=/dev/mtdblock1 rootfstype=yaffs2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Image/Build/squashfs
|
||||||
|
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
||||||
|
endef
|
||||||
|
|
||||||
define Image/Build
|
define Image/Build
|
||||||
|
$(call Image/Build/$(1),$(1))
|
||||||
$(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel
|
$(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))) '
|
$(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
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildImage))
|
$(eval $(call BuildImage))
|
||||||
|
@ -4,11 +4,12 @@ KERNELSIZE="$2"
|
|||||||
KERNELIMAGE="$3"
|
KERNELIMAGE="$3"
|
||||||
ROOTFSSIZE="$4"
|
ROOTFSSIZE="$4"
|
||||||
ROOTFSIMAGE="$5"
|
ROOTFSIMAGE="$5"
|
||||||
|
ALIGN="$6"
|
||||||
|
|
||||||
rm -f "$OUTPUT"
|
rm -f "$OUTPUT"
|
||||||
|
|
||||||
# create partition table
|
# 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))"
|
KERNELOFFSET="$(($1 / 512))"
|
||||||
ROOTFSOFFSET="$(($3 / 512))"
|
ROOTFSOFFSET="$(($3 / 512))"
|
||||||
|
Loading…
Reference in New Issue
Block a user