lede/target/linux/mediatek/image/gen_mt7623_emmc_img.sh
AmadeusGhost 404209f6c4
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
  431fb8c mac80211: add AQL improvements
  6bdd4c9 mac80211: add missing backports for building with 4.14 kernels
  0106820 mac80211: add missing return code checks in AQL improvements
  e7f7101 mac80211: rework encapsulation offload support

[package]
  base-files: add function for generating random MAC
  dnsmasq: abort dhcp_check on interface state
  boot: sync upstream source code
  ath10k-ct-firmware/mt76/sch_cake: update to latest git HEAD

[script]
  download: add China Mirror Station

[target]
  Sync: arc770, ath79, bcm63xx, kirkwood, lantiq, layerscape,
        mediatek, mvebu, octeon, oxnas, pistachio, uml
  Sync most of the target patches.

Run-compiled-on: ipq40xx (4.19 & 5.4), ramips
2020-08-26 11:31:50 +08:00

31 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
#
# This script is used only to create the "legacy" image for UniElec U7623,
# suitable for upgrading from the vendor OpenWrt or from OpenWrt 19.07.
#
OUTPUT_FILE=$1
KERNEL_FILE=$2
RECOVERY_FILE=$3
ROOTFS_FILE=$4
BS=512
# These two offsets are relative to the absolute location of the kernel on the mmc
# (0xA00), so their position in the image is -2560 blocks
#
# They must be kept in sync with the default command line for U7623.
# blkdevparts=mmcblk0:3M@6M(recovery),256M@9M(root)"
#
# For upgrading from the vendor firmware, the total image must fit in its
# MTD 'firmware' partition, which is typically 36MiB.
# In the legacy image, the uImage starts at block 0xa00. Allow 4864 KiB (9728) blocks.
RECOVERY_OFFSET=9728
# The recovery image is 3MiB, or 6144 blocks.
ROOTFS_OFFSET=15872
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