From: Baruch Siach <baruch@tkos.co.il>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Rafał Miłecki" <rafal@milecki.pl>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] board/broadcom: add support for Northstar platform devices
Date: Tue, 10 Aug 2021 17:01:27 +0300 [thread overview]
Message-ID: <87y299flfs.fsf@tarshish> (raw)
In-Reply-To: <20210810131236.18022-1-zajec5@gmail.com>
Hi Rafał,
on Tue, Aug 10 2021, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> 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 the D-Link). Some
> vendors (like Luxul and Netgear) wrap TRX in their own containers.
>
> For above reason a plain kernel and rootfs are useless for flashing
> purposes. CFE requires TRX(-like) format and there isn't any CFE
> replacement. Another issue is lack for DTS support in CFE.
> That's why for this board there is post-image script building device
> specific images. It takes care of appending DTB to the kernel and
> putting everything in a TRX image.
>
> Kernel config was adjusted to provide minimal support all on-SoC blocks
> (like Ethernet, switch, USB, PCIe). For rootfs this boards adds network
> config that setups interfaces making device accessible over the network.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
[meta-patch text goes here]
> +++ b/board/broadcom/ns/post-image.sh
> @@ -0,0 +1,43 @@
> +#!/bin/sh
> +
> +# $1: images directory path
> +# $2: device dts filename
> +# $3: board id
> +build_lxl() {
> + local images="$1"
> + local device="$2"
> + local board="$3"
> +
> + 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
> + 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"
> +
> + 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
Is this utility part of the firmware-utils host package? I see that
defconfig selects BR2_PACKAGE_HOST_FIRMWARE_UTILS which is not in
current Buildroot master. So this patch depends on the patch
"package/firmware-utils: add package":
http://patchwork.ozlabs.org/project/buildroot/patch/20210809144144.30105-1-zajec5@gmail.com/
You should mentions that in the meta-patch part of the email (see
above).
baruch
> + 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-xap-1610")
> + build_lxl "$1" "$device" "XAP-1610"
> + ;;
> + "bcm47094-luxul-xwr-3150-v1")
> + build_lxl "$1" "$device" "XWR-3150"
> + ;;
> + esac
> +done
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-08-10 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 13:12 [Buildroot] [PATCH] board/broadcom: add support for Northstar platform devices Rafał Miłecki
2021-08-10 14:01 ` Baruch Siach [this message]
2021-08-10 14:04 ` Rafał Miłecki
2021-08-19 21:39 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y299flfs.fsf@tarshish \
--to=baruch@tkos.co.il \
--cc=buildroot@buildroot.org \
--cc=rafal@milecki.pl \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.