Tabs to spaces, proper ubootscr flavor detection

This commit is contained in:
computermouth 2016-11-02 14:58:29 -07:00
parent 02fee4d567
commit dff8a1fdac
2 changed files with 73 additions and 68 deletions

View File

@ -25,7 +25,7 @@ UBI_PREFIX="chip"
UBI_SUFFIX="ubi.sparse"
UBI_TYPE="400000-4000"
while getopts "sgpbhB:N:F:" opt; do
while getopts "sgpbfhB:N:F:" opt; do
case $opt in
s)
echo "== Server selected =="
@ -43,6 +43,10 @@ while getopts "sgpbhB:N:F:" opt; do
echo "== Buildroot selected =="
FLAVOR=buildroot
;;
f)
echo "== Force clean and download =="
rm -rf .dl/ .new/
;;
B)
BRANCH="$OPTARG"
echo "== ${BRANCH} branch selected =="
@ -63,6 +67,7 @@ while getopts "sgpbhB:N:F:" opt; do
echo " -g -- GUI [Debian + XFCE]"
echo " -p -- PocketCHIP"
echo " -b -- Buildroot"
echo " -f -- Force clean"
echo " -B -- Branch(optional) [eg. -B testing]"
echo " -N -- Build#(optional) [eg. -N 150]"
echo " -F -- Format(optional) [eg. -F Toshiba_4G_MLC]"

View File

@ -136,7 +136,7 @@ flash_images() {
echo "setenv splashpos m,m" >> $ubootcmds
echo "echo Configuring Video Mode" >> $ubootcmds
if [ "$PLATFORM" = "PocketCHIP" ]; then
if [ "$FLAVOR" = "pocketchip" ]; then
echo "setenv bootargs root=ubi0:rootfs rootfstype=ubifs rw ubi.mtd=4 quiet lpj=501248 loglevel=3 splash plymouth.ignore-serial-consoles" >> $ubootcmds
echo "setenv bootpaths 'initrd noinitrd'" >> $ubootcmds
echo "setenv bootcmd 'run test_fastboot; if test -n \${fel_booted} && test -n \${scriptaddr}; then echo (FEL boot); source \${scriptaddr}; fi; for path in \${bootpaths}; do run boot_\$path; done'" >> $ubootcmds
@ -157,7 +157,7 @@ flash_images() {
echo "fastboot 0" >> $ubootcmds
echo "reset" >> $ubootcmds
mkimage -A arm -T script -C none -n "flash $PLATFORM" -d $ubootcmds $ubootscr
mkimage -A arm -T script -C none -n "flash $FLAVOR" -d $ubootcmds $ubootscr
if ! wait_for_fel; then
echo "ERROR: please make sure CHIP is connected and jumpered in FEL mode"