mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
eb684205e5
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>
23 lines
420 B
Bash
Executable File
23 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`
|