mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
layerscape: sysupgrade: get rid of platform_pre_upgrade()
1) RAMFS_COPY_BIN and RAMFS_COPY_DATA can be defined at top of the file like it's done for all other targets. 2) fw_printenv.lock can be created one step later in the platform_do_upgrade(). It seems to be working well on many other targets. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
parent
fc2df4f705
commit
3b30ff2975
@ -1,8 +1,11 @@
|
|||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright 2015-2019 Traverse Technologies
|
# Copyright 2015-2019 Traverse Technologies
|
||||||
#
|
#
|
||||||
|
|
||||||
|
RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /usr/sbin/ubinfo /bin/echo"
|
||||||
|
RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock"
|
||||||
|
|
||||||
platform_do_upgrade_traverse_nandubi() {
|
platform_do_upgrade_traverse_nandubi() {
|
||||||
bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}')
|
bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}')
|
||||||
newbootsys=2
|
newbootsys=2
|
||||||
@ -39,6 +42,10 @@ platform_check_image() {
|
|||||||
platform_do_upgrade() {
|
platform_do_upgrade() {
|
||||||
local board=$(board_name)
|
local board=$(board_name)
|
||||||
|
|
||||||
|
# Force the creation of fw_printenv.lock
|
||||||
|
mkdir -p /var/lock
|
||||||
|
touch /var/lock/fw_printenv.lock
|
||||||
|
|
||||||
case "$board" in
|
case "$board" in
|
||||||
traverse,ls1043v | \
|
traverse,ls1043v | \
|
||||||
traverse,ls1043s)
|
traverse,ls1043s)
|
||||||
@ -49,11 +56,3 @@ platform_do_upgrade() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
platform_pre_upgrade() {
|
|
||||||
# Force the creation of fw_printenv.lock
|
|
||||||
mkdir -p /var/lock
|
|
||||||
touch /var/lock/fw_printenv.lock
|
|
||||||
|
|
||||||
export RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /usr/sbin/ubinfo /bin/echo ${RAMFS_COPY_BIN}"
|
|
||||||
export RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock ${RAMFS_COPY_DATA}"
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user