Skip to content
Snippets Groups Projects
Commit 55b97b68 authored by John Crispin's avatar John Crispin
Browse files

mediatek: make emmc image generation work on mt7622


Signed-off-by: default avatarJohn Crispin <john@phrozen.org>
parent 127ad763
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ define Build/sysupgrade-emmc
rm -f $@.recovery
mkfs.fat -C $@.recovery 3070
./gen_mt7623_emmc_img.sh $@ \
./gen_$(SUBTARGET)_emmc_img.sh $@ \
$(IMAGE_KERNEL) \
$@.recovery \
$(IMAGE_ROOTFS)
......
#!/bin/sh
OUTPUT_FILE=$1
KERNEL_FILE=$2
RECOVERY_FILE=$3
ROOTFS_FILE=$4
BS=512
#RECOVERY_OFFSET= kernel size / BS = 20M / 512 (blocks)
RECOVERY_OFFSET=40960
#ROOTFS_OFFSET = RECOVERY_OFFSET + (RECOVERY_SIZE / BS)
# = 40960 + (10M / 512) (blocks)
ROOTFS_OFFSET=61440
dd bs="$BS" of="$OUTPUT_FILE" if="$KERNEL_FILE"
dd bs="$BS" of="$OUTPUT_FILE" if="$RECOVERY_FILE" seek="$RECOVERY_OFFSET"
dd bs="$BS" of="$OUTPUT_FILE" if="$ROOTFS_FILE" seek="$ROOTFS_OFFSET"
dd if=/dev/zero of="$OUTPUT_FILE" bs=128k count=1 oflag=append conv=notrunc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment