1500b7d5c8
Broadcom Northstar family of SoCs is most commonly used for home routers. It's an ARM platform with Cortex-A9 CPU(s). All known Northstar devices come with CFE bootloader which almost always expects a TRX firmware format (with exception for D-Link). Some vendors (like Luxul and Netgear) wrap TRX in their own containers. This board code provides: 1. Minimal kernel with support for on-SoC blocks. It enables Linux drivers for SoC, watchdog, Ethernet, switch, USB, PCIe, LEDs). 2. Post image script building firmware images. In uses Buildroot packages tools (lzma_alone, otrx, lxlfw) to build bootloader-compatible images that can be flashed. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/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
|
|
}
|
|
|
|
devices="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})"
|
|
for device in $devices; do
|
|
case "$device" in
|
|
"bcm4708-smartrg-sr400ac")
|
|
build_trx "$1" "$device"
|
|
;;
|
|
"bcm47094-luxul-xwr-3150-v1")
|
|
build_lxl "$1" "$device" "XWR-3150"
|
|
;;
|
|
esac
|
|
done
|