2018-04-30 12:42:39 +00:00
|
|
|
#
|
2019-03-04 05:05:27 +00:00
|
|
|
# Copyright 2015-2019 Traverse Technologies
|
2020-05-28 04:48:29 +00:00
|
|
|
# Copyright 2020 NXP
|
2018-04-30 12:42:39 +00:00
|
|
|
#
|
2019-07-17 06:02:05 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
|
2020-02-25 19:07:41 +00:00
|
|
|
REQUIRE_IMAGE_METADATA=1
|
|
|
|
|
2020-05-28 08:02:28 +00:00
|
|
|
platform_do_upgrade_sdboot() {
|
2020-08-24 12:29:32 +00:00
|
|
|
local diskdev partdev parttype=ext4
|
|
|
|
local tar_file="$1"
|
|
|
|
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
|
|
|
|
board_dir=${board_dir%/}
|
2020-05-28 08:02:28 +00:00
|
|
|
|
|
|
|
export_bootdevice && export_partdevice diskdev 0 || {
|
|
|
|
echo "Unable to determine upgrade device"
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2020-08-24 12:29:32 +00:00
|
|
|
if export_partdevice partdev 1; then
|
|
|
|
mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt 2>&1
|
|
|
|
echo "Writing kernel..."
|
|
|
|
tar xf $tar_file ${board_dir}/kernel -O > /mnt/fitImage
|
|
|
|
umount /mnt
|
2020-05-28 08:02:28 +00:00
|
|
|
fi
|
|
|
|
|
2020-08-24 12:29:32 +00:00
|
|
|
echo "Erasing rootfs..."
|
|
|
|
dd if=/dev/zero of=/dev/mmcblk0p2 bs=1M > /dev/null 2>&1
|
|
|
|
echo "Writing rootfs..."
|
|
|
|
tar xf $tar_file ${board_dir}/root -O | dd of=/dev/mmcblk0p2 bs=512k > /dev/null 2>&1
|
2020-05-28 08:02:28 +00:00
|
|
|
|
2018-04-30 12:42:39 +00:00
|
|
|
}
|
2023-06-06 06:24:11 +00:00
|
|
|
|
|
|
|
platform_do_upgrade_traverse_slotubi() {
|
|
|
|
part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')"
|
|
|
|
echo "Active boot slot: ${part}"
|
|
|
|
new_active_sys="b"
|
|
|
|
|
|
|
|
if [ ! -z "${part}" ]; then
|
|
|
|
if [ "${part}" = "ubia" ]; then
|
|
|
|
CI_UBIPART="ubib"
|
|
|
|
else
|
|
|
|
CI_UBIPART="ubia"
|
|
|
|
new_active_sys="a"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
echo "Updating UBI part ${CI_UBIPART}"
|
|
|
|
fw_setenv "openwrt_active_sys" "${new_active_sys}"
|
|
|
|
nand_do_upgrade "$1"
|
|
|
|
return $?
|
|
|
|
}
|
|
|
|
|
2020-08-24 10:21:19 +00:00
|
|
|
platform_copy_config_sdboot() {
|
|
|
|
local diskdev partdev parttype=ext4
|
|
|
|
|
|
|
|
export_bootdevice && export_partdevice diskdev 0 || {
|
|
|
|
echo "Unable to determine upgrade device"
|
|
|
|
return 1
|
|
|
|
}
|
2020-05-28 08:02:28 +00:00
|
|
|
|
|
|
|
if export_partdevice partdev 1; then
|
2020-08-24 10:21:19 +00:00
|
|
|
mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt 2>&1
|
2020-08-24 12:29:32 +00:00
|
|
|
echo "Saving config backup..."
|
2020-05-28 08:02:28 +00:00
|
|
|
cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
|
|
|
|
umount /mnt
|
|
|
|
fi
|
|
|
|
}
|
2020-08-24 10:21:19 +00:00
|
|
|
platform_copy_config() {
|
|
|
|
local board=$(board_name)
|
|
|
|
|
|
|
|
case "$board" in
|
|
|
|
fsl,ls1012a-frwy-sdboot | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1021a-iot-sdboot | \
|
2020-08-24 10:21:19 +00:00
|
|
|
fsl,ls1021a-twr-sdboot | \
|
2022-07-19 11:35:12 +00:00
|
|
|
fsl,ls1028a-rdb-sdboot | \
|
2020-08-24 10:21:19 +00:00
|
|
|
fsl,ls1043a-rdb-sdboot | \
|
2020-08-03 04:52:22 +00:00
|
|
|
fsl,ls1046a-frwy-sdboot | \
|
2020-08-24 10:21:19 +00:00
|
|
|
fsl,ls1046a-rdb-sdboot | \
|
layerscape: add LX2160ARDB (Rev2.0 silicon) board support
The QorIQ LX2160A reference design board provides a comprehensive platform
that enables design and evaluation of the LX2160A processor.
- Enables network intelligence with the next generation Datapath (DPPA2)
which provides differentiated offload and a rich set of IO, including
10GE, 25GE, 40GE, and PCIe Gen4
- Delivers unprecedented efficiency and new virtualized networks
- Supports designs in 5G packet processing, network function
virtualization, storage controller, white box switching, network
interface cards, and mobile edge computing
- Supports all three LX2 family members (16-core LX2160A; 12-core LX2120A;
and 8-core LX2080A)
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[use AUTORELEASE, add dtb to firmware part]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-30 05:12:43 +00:00
|
|
|
fsl,ls1088a-rdb-sdboot | \
|
|
|
|
fsl,lx2160a-rdb-sdboot)
|
2020-08-24 10:21:19 +00:00
|
|
|
platform_copy_config_sdboot
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
2018-04-30 12:42:39 +00:00
|
|
|
platform_check_image() {
|
|
|
|
local board=$(board_name)
|
|
|
|
|
|
|
|
case "$board" in
|
2023-06-06 06:24:11 +00:00
|
|
|
traverse,ten64)
|
|
|
|
nand_do_platform_check "ten64-mtd" $1
|
|
|
|
return $?
|
|
|
|
;;
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1012a-frdm | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1012a-frwy-sdboot | \
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1012a-rdb | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1021a-iot-sdboot | \
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1021a-twr | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1021a-twr-sdboot | \
|
2022-07-19 11:35:12 +00:00
|
|
|
fsl,ls1028a-rdb | \
|
|
|
|
fsl,ls1028a-rdb-sdboot | \
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1043a-rdb | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1043a-rdb-sdboot | \
|
2020-08-03 04:52:22 +00:00
|
|
|
fsl,ls1046a-frwy | \
|
|
|
|
fsl,ls1046a-frwy-sdboot | \
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1046a-rdb | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1046a-rdb-sdboot | \
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1088a-rdb | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1088a-rdb-sdboot | \
|
layerscape: add LX2160ARDB (Rev2.0 silicon) board support
The QorIQ LX2160A reference design board provides a comprehensive platform
that enables design and evaluation of the LX2160A processor.
- Enables network intelligence with the next generation Datapath (DPPA2)
which provides differentiated offload and a rich set of IO, including
10GE, 25GE, 40GE, and PCIe Gen4
- Delivers unprecedented efficiency and new virtualized networks
- Supports designs in 5G packet processing, network function
virtualization, storage controller, white box switching, network
interface cards, and mobile edge computing
- Supports all three LX2 family members (16-core LX2160A; 12-core LX2120A;
and 8-core LX2080A)
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[use AUTORELEASE, add dtb to firmware part]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-30 05:12:43 +00:00
|
|
|
fsl,ls2088a-rdb | \
|
|
|
|
fsl,lx2160a-rdb | \
|
|
|
|
fsl,lx2160a-rdb-sdboot)
|
2020-02-25 19:07:40 +00:00
|
|
|
return 0
|
|
|
|
;;
|
2018-04-30 12:42:39 +00:00
|
|
|
*)
|
|
|
|
echo "Sysupgrade is not currently supported on $board"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
platform_do_upgrade() {
|
|
|
|
local board=$(board_name)
|
|
|
|
|
2019-07-17 06:02:05 +00:00
|
|
|
# Force the creation of fw_printenv.lock
|
|
|
|
mkdir -p /var/lock
|
|
|
|
touch /var/lock/fw_printenv.lock
|
|
|
|
|
2018-04-30 12:42:39 +00:00
|
|
|
case "$board" in
|
2023-06-06 06:24:11 +00:00
|
|
|
traverse,ten64)
|
|
|
|
platform_do_upgrade_traverse_slotubi "${1}"
|
|
|
|
;;
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1012a-frdm | \
|
|
|
|
fsl,ls1012a-rdb | \
|
|
|
|
fsl,ls1021a-twr | \
|
2022-07-19 11:35:12 +00:00
|
|
|
fsl,ls1028a-rdb | \
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1043a-rdb | \
|
2020-08-03 04:52:22 +00:00
|
|
|
fsl,ls1046a-frwy | \
|
2020-05-28 04:48:29 +00:00
|
|
|
fsl,ls1046a-rdb | \
|
|
|
|
fsl,ls1088a-rdb | \
|
layerscape: add LX2160ARDB (Rev2.0 silicon) board support
The QorIQ LX2160A reference design board provides a comprehensive platform
that enables design and evaluation of the LX2160A processor.
- Enables network intelligence with the next generation Datapath (DPPA2)
which provides differentiated offload and a rich set of IO, including
10GE, 25GE, 40GE, and PCIe Gen4
- Delivers unprecedented efficiency and new virtualized networks
- Supports designs in 5G packet processing, network function
virtualization, storage controller, white box switching, network
interface cards, and mobile edge computing
- Supports all three LX2 family members (16-core LX2160A; 12-core LX2120A;
and 8-core LX2080A)
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[use AUTORELEASE, add dtb to firmware part]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-30 05:12:43 +00:00
|
|
|
fsl,ls2088a-rdb | \
|
|
|
|
fsl,lx2160a-rdb)
|
2020-02-25 19:07:40 +00:00
|
|
|
PART_NAME=firmware
|
|
|
|
default_do_upgrade "$1"
|
|
|
|
;;
|
2020-05-28 08:02:28 +00:00
|
|
|
fsl,ls1012a-frwy-sdboot | \
|
2020-08-24 12:29:32 +00:00
|
|
|
fsl,ls1021a-iot-sdboot | \
|
2020-05-28 08:02:28 +00:00
|
|
|
fsl,ls1021a-twr-sdboot | \
|
2022-07-19 11:35:12 +00:00
|
|
|
fsl,ls1028a-rdb-sdboot | \
|
2020-05-28 08:02:28 +00:00
|
|
|
fsl,ls1043a-rdb-sdboot | \
|
2020-08-03 04:52:22 +00:00
|
|
|
fsl,ls1046a-frwy-sdboot | \
|
2020-05-28 08:02:28 +00:00
|
|
|
fsl,ls1046a-rdb-sdboot | \
|
layerscape: add LX2160ARDB (Rev2.0 silicon) board support
The QorIQ LX2160A reference design board provides a comprehensive platform
that enables design and evaluation of the LX2160A processor.
- Enables network intelligence with the next generation Datapath (DPPA2)
which provides differentiated offload and a rich set of IO, including
10GE, 25GE, 40GE, and PCIe Gen4
- Delivers unprecedented efficiency and new virtualized networks
- Supports designs in 5G packet processing, network function
virtualization, storage controller, white box switching, network
interface cards, and mobile edge computing
- Supports all three LX2 family members (16-core LX2160A; 12-core LX2120A;
and 8-core LX2080A)
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[use AUTORELEASE, add dtb to firmware part]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-30 05:12:43 +00:00
|
|
|
fsl,ls1088a-rdb-sdboot | \
|
|
|
|
fsl,lx2160a-rdb-sdboot)
|
2020-05-28 08:02:28 +00:00
|
|
|
platform_do_upgrade_sdboot "$1"
|
|
|
|
return 0
|
|
|
|
;;
|
2018-04-30 12:42:39 +00:00
|
|
|
*)
|
|
|
|
echo "Sysupgrade is not currently supported on $board"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|