~alpine/devel

3 3

main/u-boot-rockchip: Add board, which requires TPL blob

Details
Message ID
<CADscph1FF0NnpeKDZM9N8KQ0dxiy89Ak7uYYiMKfu3PDpZLn-Q@mail.gmail.com>
DKIM signature
missing
Download raw message
Hi,

I would like to add support for the Radxa Zero 3E [1] to main/u-boot-rockchip.

U-Boot requires an additional TPL (third program loader) for this
board. The TPL (and more) can be found at [2], which I would like to
package first. For boards requiring such a TPL, one has to set the
ROCKCHIP_TPL variable referencing the TPL when building U-Boot. Due to
this I would call the package "rockchip-tpl".

Anyone could tell me, if that [3] is an MIT license?

I tried arch="aarch64" before, as U-Boot requires the TPL to boot
aarch64. Imho, they don't make much sense on i. e. "x86-64" other than
cross-building U-Boot.
Though, they're identified as "data" only and abuild said, that
"noarch" would be better. Should I stick to "noarch"?

Below you can find the APKBUILD I've screwed up so far. (Copy'n'paste just
replaced the tabs.)

Cheers,
    Daniel Martin

[1] http://radxa.com/products/zeros/zero3e/
[2] https://github.com/rockchip-linux/rkbin
[3] https://github.com/rockchip-linux/rkbin/blob/master/LICENSE

-----8< APKBUILD 8<-----
pkgname=rockchip-tpl
pkgver=20241209  # date of the commit
pkgrel=0
pkgdesc="Third Program Loader for RK3308, RK3568 and RK3588"
url="https://github.com/rockchip-linux/rkbin"
commit="0f8ac860f0479da56a1decae207ddc99e289f2e2"
arch="noarch"  # XXX
license="MIT"  # XXX:
https://github.com/rockchip-linux/rkbin/blob/master/LICENSE
options="!check"  # no tests
source="rkbin-$commit.tar.gz::https://github.com/rockchip-linux/rkbin/archive/$commit.tar.gz"

# TPLs referenced in U-Boot documentation, roughly:
# grep -r export.ROCKCHIP_TPL u-boot/doc/board | cut -f2 -d=
tpls="bin/rk33/rk3308_ddr_589MHz_uart?_m?_v*.bin
    bin/rk35/rk3568_ddr_1056MHz_v*.bin
    bin/rk35/rk3568_ddr_1560MHz_v*.bin
    bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v*.bin
    bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_eyescan_v*.bin"

package() {
    mkdir -p "$pkgdir"/usr/share/$pkgname

    cd "$srcdir"/rkbin-$commit
    for bin in $tpls; do
        fname="${bin##*/}"
        lname="${fname/_v*/.bin}"
        install $bin "$pkgdir"/usr/share/$pkgname/$fname
        # link name without version as a more stable reference
        ln -s $fname "$pkgdir"/usr/share/$pkgname/$lname
    done
}

sha512sums="
4287fb19042e9b090e8eb51287eef289224c6ae95f6bc3e9040eaa4d783a28e377685e4d32a984b8a49ab5bd95b885248e910a644d088d679b4cdd94cd735de9
 rkbin-0f8ac860f0479da56a1decae207ddc99e289f2e2.tar.gz
"
----->8 APKBUILD >8-----
Details
Message ID
<Z5itD8MSnR4C8O2C@pie>
In-Reply-To
<CADscph1FF0NnpeKDZM9N8KQ0dxiy89Ak7uYYiMKfu3PDpZLn-Q@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Tue, Jan 28, 2025 at 10:43:44AM +0100, Daniel Martin wrote:
> Hi,
> 
> I would like to add support for the Radxa Zero 3E [1] to main/u-boot-rockchip.
> 
> U-Boot requires an additional TPL (third program loader) for this
> board. The TPL (and more) can be found at [2], which I would like to
> package first. For boards requiring such a TPL, one has to set the
> ROCKCHIP_TPL variable referencing the TPL when building U-Boot. Due to
> this I would call the package "rockchip-tpl".
> 
> Anyone could tell me, if that [3] is an MIT license?

(claim: I'm not a lawyer)

Refering to its content,

> Except as expressively authorized by Rockchip in writing, you may NOT:
> (a) decompile, reverse-engineer, dissemble, or attempt to derive any
> source code from the Software;
> (b) remove or obscure any copyright, patent, or trademark statement
> or notices contained in the Software.

and considering rkbin doesn't come with corresponding source, I don't
even think it's an open-source project and suspect whether Aports is
willing to accept it.

> I tried arch="aarch64" before, as U-Boot requires the TPL to boot
> aarch64. Imho, they don't make much sense on i. e. "x86-64" other than
> cross-building U-Boot.
> Though, they're identified as "data" only and abuild said, that
> "noarch" would be better. Should I stick to "noarch"?
> 
> Below you can find the APKBUILD I've screwed up so far. (Copy'n'paste just
> replaced the tabs.)
> 
> Cheers,
>     Daniel Martin

Best regards,
Yao Zi

> [1] http://radxa.com/products/zeros/zero3e/
> [2] https://github.com/rockchip-linux/rkbin
> [3] https://github.com/rockchip-linux/rkbin/blob/master/LICENSE
> 
> -----8< APKBUILD 8<-----
> pkgname=rockchip-tpl
> pkgver=20241209  # date of the commit
> pkgrel=0
> pkgdesc="Third Program Loader for RK3308, RK3568 and RK3588"
> url="https://github.com/rockchip-linux/rkbin"
> commit="0f8ac860f0479da56a1decae207ddc99e289f2e2"
> arch="noarch"  # XXX
> license="MIT"  # XXX:
> https://github.com/rockchip-linux/rkbin/blob/master/LICENSE
> options="!check"  # no tests
> source="rkbin-$commit.tar.gz::https://github.com/rockchip-linux/rkbin/archive/$commit.tar.gz"
> 
> # TPLs referenced in U-Boot documentation, roughly:
> # grep -r export.ROCKCHIP_TPL u-boot/doc/board | cut -f2 -d=
> tpls="bin/rk33/rk3308_ddr_589MHz_uart?_m?_v*.bin
>     bin/rk35/rk3568_ddr_1056MHz_v*.bin
>     bin/rk35/rk3568_ddr_1560MHz_v*.bin
>     bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v*.bin
>     bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_eyescan_v*.bin"
> 
> package() {
>     mkdir -p "$pkgdir"/usr/share/$pkgname
> 
>     cd "$srcdir"/rkbin-$commit
>     for bin in $tpls; do
>         fname="${bin##*/}"
>         lname="${fname/_v*/.bin}"
>         install $bin "$pkgdir"/usr/share/$pkgname/$fname
>         # link name without version as a more stable reference
>         ln -s $fname "$pkgdir"/usr/share/$pkgname/$lname
>     done
> }
> 
> sha512sums="
> 4287fb19042e9b090e8eb51287eef289224c6ae95f6bc3e9040eaa4d783a28e377685e4d32a984b8a49ab5bd95b885248e910a644d088d679b4cdd94cd735de9
>  rkbin-0f8ac860f0479da56a1decae207ddc99e289f2e2.tar.gz
> "
> ----->8 APKBUILD >8-----
Details
Message ID
<CADscph0vpnFZDQOFfoxbSgOW4tV+F=e6Lqvcaz63NXQpg_n0iA@mail.gmail.com>
In-Reply-To
<Z5itD8MSnR4C8O2C@pie> (view parent)
DKIM signature
missing
Download raw message
On Tue, 28 Jan 2025 at 11:11, Yao Zi <ziyao@disroot.org> wrote:
> On Tue, Jan 28, 2025 at 10:43:44AM +0100, Daniel Martin wrote:
> > Anyone could tell me, if that [3] is an MIT license?
>
> (claim: I'm not a lawyer)
>
> Refering to its content,
>
> > Except as expressively authorized by Rockchip in writing, you may NOT:
> > (a) decompile, reverse-engineer, dissemble, or attempt to derive any
> > source code from the Software;
> > (b) remove or obscure any copyright, patent, or trademark statement
> > or notices contained in the Software.
>
> and considering rkbin doesn't come with corresponding source, I don't
> even think it's an open-source project and suspect whether Aports is
> willing to accept it.

Even when "... Rockchip hereby grants to you a non-exclusive license
(a) to use, copy,
distribute the Software; ..."?

> > [3] https://github.com/rockchip-linux/rkbin/blob/master/LICENSE
Naomi Rennie-Waldock <naomi.renniewaldock@gmail.com>
Details
Message ID
<8B1BEDC3-0D2D-4DCD-86F2-1E462EF87A10@gmail.com>
In-Reply-To
<CADscph1FF0NnpeKDZM9N8KQ0dxiy89Ak7uYYiMKfu3PDpZLn-Q@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On 28 January 2025 09:43:44 GMT, Daniel Martin <consume.noise@gmail.com> wrote:

>Anyone could tell me, if that [3] is an MIT license?

It's not MIT, but I don't see a reason it can't be accepted. The license is very similar to a lot of the linux-firmware licenses.
Reply to thread Export thread (mbox)