openwrtv3/target/linux/layerscape/image/gen_sdcard_head_img.sh
Yangbo Lu eb684205e5 layerscape: add SD card boot support
NOR/QSPI Flash on Layerscape board only has limited 64MB memory size.
Since some boards (ls1043ardb/ls1046ardb/ls1088ardb/ls1021atwr)
could support SD card boot, we added SD boot support for them to put
all things on SD card to meet large memory requirement.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2018-09-22 21:20:57 +02:00

22 lines
420 B
Bash
Executable file

#!/usr/bin/env bash
#
# Copyright 2018 NXP
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
set -x
[ $# -eq 3 ] || {
echo "SYNTAX: $0 <file> <rootfs part offset> <rootfs size>"
exit 1
}
OUTPUT="$1"
ROOTFSOFFSET="$(($2 * 1024))"
ROOTFSSIZE="$3"
head=4
sect=16
set `ptgen -o $OUTPUT -h $head -s $sect -l $ROOTFSOFFSET -t 83 -p ${ROOTFSSIZE}M`