Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 908212258DB for <~alpine/devel@lists.alpinelinux.org>; Tue, 28 Jan 2025 10:11:59 +0000 (UTC) Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0D05B25224; Tue, 28 Jan 2025 11:11:59 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id DN08Fidj2Mmf; Tue, 28 Jan 2025 11:11:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1738059114; bh=+GreDsNFe7KSH0Q9Ikj0ZzAvRO1T6Mxj41Iodq88k2c=; h=Date:From:To:Subject:References:In-Reply-To; b=ZztwmTydiOpET2BrMGq1q9Brq1LezsDuh7IotNShBlS2BP9PhBl5tjUqzmeI8AHb1 cnNULw+OLClUh/FWptTKs+J9yX9oXX55s3nfM/1RYr8LCV9OQOqhxDe2Ael1Ftiqgz XzKx92Rre4a1Do2TFJCMGhWcbZX0FU13IOZJrrr6odECUMNjg9F5XtPSVLySYxuI7M KQLm5uR0pgyuuQ6ll1GthbIPPQrbESqcQo1EKI2wgNH8I2ZNX5H7qLo/waZ2dTDah6 2y5LaJG/QDs7ukqKJ7XkGRevU1eir/sqtn/mcH3m9DdO+GNHeh99FH77gHToZQCUza ubZDbrhbJRjcQ== Date: Tue, 28 Jan 2025 10:10:23 +0000 From: Yao Zi To: Daniel Martin , ~alpine/devel@lists.alpinelinux.org Subject: Re: main/u-boot-rockchip: Add board, which requires TPL blob Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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-----