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:
13
target/linux/pistachio/base-files/etc/board.d/02_network
Normal file
13
target/linux/pistachio/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2017 OpenWrt.org
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
ucidef_set_interface_lan 'eth0' 'dhcp'
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
46
target/linux/pistachio/base-files/lib/upgrade/platform.sh
Normal file
46
target/linux/pistachio/base-files/lib/upgrade/platform.sh
Normal file
@@ -0,0 +1,46 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2017 OpenWrt.org
|
||||
|
||||
RAMFS_COPY_BIN='fw_printenv fw_setenv dmesg'
|
||||
RAMFS_COPY_DATA="/etc/fw_env.config"
|
||||
REQUIRE_IMAGE_METADATA=0
|
||||
|
||||
platform_check_image()
|
||||
{
|
||||
local board=$(board_name)
|
||||
|
||||
nand_do_platform_check $board $1
|
||||
return $?
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
# TODO no need to switch to ramfs with dual partitions in
|
||||
# fact we don't even want to reboot as part of seamless
|
||||
# upgrades. Instead just upgrade opposite partition and mark
|
||||
# the next reboot to boot from that partition. Could just call
|
||||
# stage2 directly but need to refactor nand_upgrade_success
|
||||
# for this to work.
|
||||
# Also the nand functions don't allow url to be used
|
||||
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
img,pistachio-marduk)
|
||||
local boot_partition=$(dmesg | grep "ubi0: attached.*" | sed "s/^.*\(firmware[0-1]\).*/\1/g")
|
||||
|
||||
echo "Current boot partiton $boot_partition (/dev/mtd$(find_mtd_index $boot_partition))"
|
||||
mkdir -p /var/lock
|
||||
if [ "$boot_partition" == "firmware0" ]; then
|
||||
CI_UBIPART="firmware1"
|
||||
fw_setenv boot_partition 1 || exit 1
|
||||
else
|
||||
CI_UBIPART="firmware0"
|
||||
fw_setenv boot_partition 0 || exit 1
|
||||
fi
|
||||
echo "Upgrading partition $CI_UBIPART (/dev/mtd$(find_mtd_index $CI_UBIPART))"
|
||||
;;
|
||||
esac
|
||||
|
||||
nand_do_upgrade $1
|
||||
}
|
||||
Reference in New Issue
Block a user