Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
51
target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh
Normal file
51
target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh
Normal file
@@ -0,0 +1,51 @@
|
||||
#
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
|
||||
PART_NAME=firmware
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
|
||||
RAMFS_COPY_BIN='fw_setenv'
|
||||
RAMFS_COPY_DATA='/etc/fw_env.config'
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
nec,wg600hp|\
|
||||
nec,wr8750n|\
|
||||
nec,wr9500n)
|
||||
local uboot_mtd=$(find_mtd_part "bootloader")
|
||||
|
||||
# check "U-Boot <year>.<month>" string in the "bootloader" partition
|
||||
if ! grep -q "U-Boot [0-9]\{4\}\.[0-9]\{2\}" $uboot_mtd; then
|
||||
v "The bootloader doesn't seem to be replaced to U-Boot!"
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
return 0
|
||||
esac
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
engenius,eap350-v1|\
|
||||
engenius,ecb350-v1|\
|
||||
engenius,enh202-v1)
|
||||
ENV_SCRIPT="/tmp/fw_env"
|
||||
IMAGE_LIST="tar tzf $1"
|
||||
IMAGE_CMD="tar xzOf $1"
|
||||
KERNEL_PART="loader"
|
||||
ROOTFS_PART="fwconcat0"
|
||||
KERNEL_FILE="uImage-lzma.bin"
|
||||
ROOTFS_FILE="root.squashfs"
|
||||
platform_do_upgrade_failsafe_datachk "$1"
|
||||
;;
|
||||
*)
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Reference in New Issue
Block a user