summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2013-07-10 19:27:56 +0300
committerRoman Yeryomin <roman@advem.lv>2013-07-10 19:27:56 +0300
commit8d04e9d26f772cf2709222f6e1dbd9b15a115e66 (patch)
treec356577f153be4bd09133f36a5b00cb2e671f390
parentb929e332549ff2910aa24438e9628145cf432af2 (diff)
Fix sysupgrade image generation
Signed-off-by: Roman Yeryomin <roman@advem.lv>
-rw-r--r--target/linux/realtek/image/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile
index da0e7eac8..f5f1c4f56 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -31,13 +31,17 @@ define Image/Build/jffs2-4k
endef
+BS_KERNEL=$$$$((`printf %d 0x${CONFIG_REALTEK_ROOTFS_OFFSET}`-`printf %d 0x${CONFIG_REALTEK_KERNEL_OFFSET}`))
+BS_ROOTFS=$$$$((`printf %d ${CONFIG_REALTEK_FLASH_SIZE}`-`printf %d 0x${CONFIG_REALTEK_ROOTFS_OFFSET}`))
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
cvimg root $(BIN_DIR)/$(IMG_PREFIX)-$(1).img $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin F0000 ${CONFIG_REALTEK_ROOTFS_OFFSET}
+ echo "BS_KERNEL=$(BS_KERNEL)"
+ echo "BS_ROOTFS=$(BS_ROOTFS)"
( \
- dd if=$(BIN_DIR)/$(IMG_PREFIX)-kernel.bin bs=1088k conv=sync; \
- dd if=$(KDIR)/root.$(1) bs=6912k conv=sync; \
+ dd if=$(BIN_DIR)/$(IMG_PREFIX)-kernel.bin bs=$(BS_KERNEL) conv=sync; \
+ dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=$(BS_ROOTFS) conv=sync; \
) > $(BIN_DIR)/$(IMG_PREFIX)-$(1)-sysupgrade.img
endef