2022-03-10 13:12:29 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# $1: images directory path
|
|
|
|
# $2: device dts filename
|
|
|
|
# $3: board id
|
|
|
|
build_lxl() {
|
|
|
|
local images="$1"
|
|
|
|
local device="$2"
|
|
|
|
local board="$3"
|
|
|
|
|
|
|
|
$HOST_DIR/bin/lzma_alone e $images/zImage.$device $images/zImage.$device.lzma -d16
|
|
|
|
rm -f $images/zImage.$device
|
|
|
|
$HOST_DIR/bin/otrx create $images/$device.trx -f $images/zImage.$device.lzma -a 0x20000 -f $images/rootfs.ubi
|
|
|
|
rm -f $images/zImage.$device.lzma
|
|
|
|
$HOST_DIR/bin/lxlfw create $images/$device.lxl -i $images/$device.trx -b "$board"
|
|
|
|
}
|
|
|
|
|
|
|
|
# $1: images directory path
|
|
|
|
# $2: device dts filename
|
|
|
|
build_trx() {
|
|
|
|
local images="$1"
|
|
|
|
local device="$2"
|
|
|
|
|
|
|
|
$HOST_DIR/bin/lzma_alone e $images/zImage.$device $images/zImage.$device.lzma -d16
|
|
|
|
rm -f $images/zImage.$device
|
|
|
|
$HOST_DIR/bin/otrx create $images/$device.trx -f $images/zImage.$device.lzma -a 0x20000 -f $images/rootfs.ubi
|
|
|
|
rm -f $images/zImage.$device.lzma
|
|
|
|
}
|
|
|
|
|
2024-01-03 07:32:53 +01:00
|
|
|
devices="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([^"]*\)"$/\1/p' ${BR2_CONFIG})"
|
2022-03-10 13:12:29 +01:00
|
|
|
for device in $devices; do
|
2024-01-03 07:32:53 +01:00
|
|
|
device="${device#broadcom/}"
|
2022-03-10 13:12:29 +01:00
|
|
|
case "$device" in
|
|
|
|
"bcm4708-smartrg-sr400ac")
|
|
|
|
build_trx "$1" "$device"
|
|
|
|
;;
|
|
|
|
"bcm47094-luxul-xwr-3150-v1")
|
|
|
|
build_lxl "$1" "$device" "XWR-3150"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|