Files
openwrt/target/linux/qualcommax/image/glinet_qsdk.bootscript
T
Gilberto Conde 20b25487f7 qualcommax: ipq50xx: share GL.iNet factory bootscript
The U-Boot script embedded in the GL.iNet QSDK factory image hardcodes
the GL-B3000 flash layout. Replace the UBI offset and size with
placeholders filled in by the gl-qsdk-factory recipe, so other GL.iNet
boards with a different layout can use the same script.

The script is copied under a per-device name, which keeps the FIT
description unchanged and avoids devices overwriting each other's
substituted copy in KDIR_TMP.

Signed-off-by: Gilberto Conde <gilbertorconde@gmail.com>
2026-09-28 14:21:38 +02:00

48 lines
1.5 KiB
Plaintext

if test "x$verbose" = "x"; then
failedmsg=\'[failed]\'
else
failedmsg='######################################## Failed'
fi
if test -n $soc_hw_version; then
if test "$soc_hw_version" = "20180100" || test "$soc_hw_version" = "20180101" ; then
echo 'soc_hw_version : Validation success'
else
echo 'soc_hw_version : did not match, aborting upgrade'
exit 1
fi
else
echo 'soc_hw_version : unknown, skipping validation'
fi
if test "$machid" = "8040004" ; then
echo 'machid : Validation success'
else
echo 'machid : unknown, aborting upgrade'
exit 1
fi
if test "x$verbose" = "x"; then
echo \\c'Flashing ubi: '
setenv stdout nulldev
else
echo '######################################## Flashing ubi: Started'
fi
failreason='error: failed on image extraction'
imxtract $imgaddr ubi || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
failreason='error: failed on partition erase'
nand device 0 && nand erase @UBI_OFFSET@ @UBI_SIZE@ || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
failreason='error: failed on partition write'
nand write $fileaddr @UBI_OFFSET@ @ROOTFS_SIZE@ || setenv stdout serial && echo "$failedmsg" && echo "$failreason" && exit 1
if test "x$verbose" = "x"; then
setenv stdout serial
echo '[ done ]'
setenv stdout nulldev
setenv stdout serial
else
echo '######################################## Flashing ubi: Done'
fi
exit 0