aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/image
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/apm821xx/image')
-rw-r--r--target/linux/apm821xx/image/Makefile5
-rw-r--r--target/linux/apm821xx/image/mbl_boot.scr2
-rwxr-xr-xtarget/linux/apm821xx/image/mbl_gen_hdd_img.sh8
3 files changed, 7 insertions, 8 deletions
diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile
index 9d9c0e5ace..bfc6562431 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -211,7 +211,7 @@ define Build/boot-img
endef
define Build/hdd-img
- ./mbl_gen_hdd_img.sh $@ $@.boot $(IMAGE_ROOTFS)
+ ./mbl_gen_hdd_img.sh $@ $@.boot $(IMAGE_ROOTFS) $(BOOT_SIZE) $(CONFIG_TARGET_ROOTFS_PARTSIZE)
endef
define Device/wd_mybooklive
@@ -219,7 +219,6 @@ define Device/wd_mybooklive
DEVICE_PACKAGES := kmod-usb-dwc2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-fs-vfat wpad-mini
DEVICE_DTS := wd-mybooklive
SUPPORTED_DEVICES += mbl wd_mybooklive-duo
- IMAGE_SIZE := 48m
BLOCKSIZE := 1k
DTB_SIZE := 16384
KERNEL := kernel-bin | dtb | gzip | uImage gzip
@@ -227,7 +226,7 @@ define Device/wd_mybooklive
BOOT_SIZE := 8
IMAGES := rootfs.img.gz kernel.dtb
DEVICE_DTB := apollo3g.dtb
- FILESYSTEMS := ext4
+ FILESYSTEMS := ext4 squashfs
IMAGE/kernel.dtb := export-dtb
IMAGE/rootfs.img.gz := boot-script | boot-img | hdd-img | gzip | append-metadata
endef
diff --git a/target/linux/apm821xx/image/mbl_boot.scr b/target/linux/apm821xx/image/mbl_boot.scr
index 062dc2725a..955216983b 100644
--- a/target/linux/apm821xx/image/mbl_boot.scr
+++ b/target/linux/apm821xx/image/mbl_boot.scr
@@ -1,4 +1,4 @@
-setenv boot_args 'setenv bootargs root=/dev/sda2 rw rootfstype=ext4'
+setenv boot_args 'setenv bootargs root=/dev/sda2 rw rootfstype=squashfs,ext4'
setenv load_part1 'sata init; ext2load sata 1:1 ${kernel_addr_r} /boot/uImage; ext2load sata 1:1 ${fdt_addr_r} /boot/apollo3g.dtb'
setenv load_part2 'sata init; ext2load sata 0:1 ${kernel_addr_r} /boot/uImage; ext2load sata 0:1 ${fdt_addr_r} /boot/apollo3g.dtb'
setenv load_sata 'if run load_part1; then echo Loaded part 1; elif run load_part2; then echo Loaded part 2; fi'
diff --git a/target/linux/apm821xx/image/mbl_gen_hdd_img.sh b/target/linux/apm821xx/image/mbl_gen_hdd_img.sh
index 589dcf9150..6536ce9872 100755
--- a/target/linux/apm821xx/image/mbl_gen_hdd_img.sh
+++ b/target/linux/apm821xx/image/mbl_gen_hdd_img.sh
@@ -1,16 +1,16 @@
#!/usr/bin/env bash
set -x
-[ $# -eq 3 ] || {
- echo "SYNTAX: $0 <file> <bootfs image> <rootfs image>"
+[ $# -eq 5 ] || {
+ echo "SYNTAX: $0 <file> <bootfs image> <rootfs image> <bootfs size> <rootfs size>"
exit 1
}
OUTPUT="$1"
BOOTFS="$2"
ROOTFS="$3"
-let "BOOTFSSIZE=(`stat -c%s "$2"` + 1048575) / 1048576"
-let "ROOTFSSIZE=(`stat -c%s "$3"` + 1048575) / 1048576"
+BOOTFSSIZE="$4"
+ROOTFSSIZE="$5"
head=4
sect=63