Add support for GL.iNET (AX3000) B3000. Speficiations: * SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz) * Memory: Winbond W634GU6NQB-11 (512 MiB DDR3-933) * Serial Port: 3v3 TTL 115200n8 * Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax) * Wi-Fi: QCN6102 (2x2:2 5 Ghz 802.11an/ac/ax) * Ethernet: IPQ5018 integrated virtual switch connected to an external QCA8337 switch (3 Ports 10/100/1000 GBASE-T) * Flash: Winbond W25N01GWZEIG (128 MiB) * LEDs: 1x single-color blue LED (GPIO 24 Active High) 1x single-color white LED (GPIO 23 Active High) * Buttons: 1x Reset (GPIO 27 Active Low) Flash Instructions: *** The .img files are now universal ! *** Openwrt --> openwrt-qualcommax-ipq50xx-glinet_gl-b3000-squashfs-factory.img GL.iNet OEM --> openwrt-b3000-4.5.18-0731-1722397535.img Either file can be flashed, in any of the available upgrade options, in both Firmwares. Pick a file .. pick a method .. and SEND IT !! Signed-off-by: Scott Mercer <TheRootEd24@gmail.com> Link: https://github.com/openwrt/openwrt/pull/17903 Signed-off-by: Robert Marko <robimarko@gmail.com>
53 lines
1.5 KiB
Bash
53 lines
1.5 KiB
Bash
. /lib/upgrade/common.sh
|
|
|
|
glinet_do_fit_upgrade() {
|
|
echo -n "fit: Extract [ FIT IMAGE ] -x-x-> [ ubi.bin ] ... "
|
|
local ubi=/tmp/ubi.bin
|
|
local part=$(dumpimage -l "$1" | grep -o "Image [0-9] (ubi)" | cut -f2 -d" ")
|
|
|
|
local ubibin=$( dumpimage -T flat_dt -p ${part} -o "$ubi" "$1" )
|
|
if [ -s "$ubi" ]; then
|
|
echo "[ OK ]"
|
|
local ubiMd5=$(md5sum "$ubi" | cut -f1 -d" ")
|
|
echo -n "fit-copy: [ ubi.bin ] -c-c-> [ firmware.bin ] ... "
|
|
mv "$ubi" "$1"
|
|
echo "[ OK ]"
|
|
local firmMd5=$(md5sum "$1" | cut -f1 -d" ")
|
|
echo -n "fit-copy: MD5 CHECK: "
|
|
if [ "$ubiMd5" = "$firmMd5" ]; then
|
|
echo "[ OK ]"
|
|
echo "$ubiMd5 <=> $firmMd5"
|
|
echo "fit: Successfully Extracted UBI from FIT IMAGE"
|
|
echo "fit: Proceeding with sysupgrade .."
|
|
nand_do_upgrade "$1"
|
|
return
|
|
fi
|
|
echo "[ FAILED ] !!"
|
|
echo "ERROR: Failed to Copy UBI into firmware.bin !!"
|
|
echo "fit: Terminating sysupgrade .."
|
|
exit 1
|
|
fi
|
|
echo "[ FAILED ] !!"
|
|
echo "ERROR: Failed to Extract UBI from FIT IMAGE !!"
|
|
echo "fit: Terminating sysupgrade .."
|
|
exit 1
|
|
}
|
|
|
|
glinet_do_upgrade() {
|
|
CI_UBIPART="rootfs"
|
|
echo -n "Validating GL.iNet Image ... "
|
|
case "$(identify_magic_long $(get_magic_long "$1"))" in
|
|
fit)
|
|
echo "[ OK ]"
|
|
echo "fit-main: Firmware is Valid: fit"
|
|
echo "fit-main: Upgrading Firmware via [ FIT IMAGE ]"
|
|
glinet_do_fit_upgrade "$1"
|
|
;;
|
|
*)
|
|
echo "[ FAILED ] !!"
|
|
echo "main: GL.iNet Image Validation Failed !!"
|
|
echo "main: Attempting default sysupgrade"
|
|
nand_do_upgrade "$1"
|
|
;;
|
|
esac
|
|
}
|