diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-05-23 23:40:35 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-05-24 00:54:32 +0200 |
commit | 26258c970a5de46a243ffccd74a30ecdaed85b9c (patch) | |
tree | c5520924fb822771235f31a299569794cfd8f69c /libre | |
parent | 88462e5cc21168872df53543d9607335bb4ba625 (diff) | |
download | abslibre-26258c970a5de46a243ffccd74a30ecdaed85b9c.tar.gz abslibre-26258c970a5de46a243ffccd74a30ecdaed85b9c.tar.bz2 abslibre-26258c970a5de46a243ffccd74a30ecdaed85b9c.zip |
move WIP u-boot modifications in libre-testing
I asked bill-auger to push his modifications so he uploaded the
packages to libre-testing and the PKGBUILD modifications to abslibre.
Since the pakcages have been uploaded to libre-testing it's better to
move them here.
While the code is not ready yet, it enables users to test the new
u-boot which fixes the Ethernet PHY. From linux-sunxi we have[1]:
Proper fix for rev. F and newer is to apply trace length
compensation at the PHY.
This is done by default (also for rev. H and newer despite commit
message mentioning only realtek not Micrel) since mainline linux
v5.15 and since mainline u-boot v2022.04;
[1]https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2#calibrate_at_PHY
That page also has more background on the issue being fixed here
(basically making all the various Lime 2 A20 revisions (which have
different Ethernet PHY) work with the same u-boot binary / package.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre')
-rw-r--r-- | libre/uboot4extlinux-sunxi/PKGBUILD | 86 |
1 files changed, 56 insertions, 30 deletions
diff --git a/libre/uboot4extlinux-sunxi/PKGBUILD b/libre/uboot4extlinux-sunxi/PKGBUILD index 513ed74e3..a2b8ca12c 100644 --- a/libre/uboot4extlinux-sunxi/PKGBUILD +++ b/libre/uboot4extlinux-sunxi/PKGBUILD @@ -1,9 +1,9 @@ # U-Boot: sunXi -# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info> +# Maintainer: Isaac David <isacdaavid@at@isacdaavid@dot@info> # Contributor: André Silva <emulatorman@hyperbola.info> # Contributor: Timothy Redaelli <timothy.redaelli@gmail.com> # Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> -# Maintainer: Parabola hackers <dev@lists.parabola.nu> +# Maintainers: Parabola hackers <dev@lists.parabola.nu> # To add a new board (that uses an Allwinner System On a Chip) you need: # - The package name. Example: uboot4extlinux-a20-olinuxino_micro @@ -32,7 +32,7 @@ # point to it when relevant. Examples of that are available for other # boards in the ARM installation guide. -_upstream_name=u-boot-libre +_pkgbase=u-boot-libre pkgbase=uboot4extlinux-sunxi pkgname=("${pkgbase}" 'uboot4extlinux-a10-olinuxino-lime' @@ -57,11 +57,24 @@ pkgname=("${pkgbase}" 'uboot4extlinux-orangepi_pc' 'uboot4extlinux-orangepi_plus') -_uboot_ver=2022.04 # version of the upstream u-boot source code -_ubootlibre_rev=r1 # revision of the u-boot-libre deblob script - -pkgver="${_uboot_ver}" -pkgrel="${_ubootlibre_rev}.parabola3" +# We have a ${pkgver}-${pkgrel} that looks like that: +# '2021.07-r1.parabola3' and all the individual components are needed: +# - '2021.07' corresponds to the upstream u-boot version. It is needed +# to know which u-boot version source code is used. +# - 'r1' corresponds to the u-boot-libre revision. Without it it would +# be impossible to fix bugs inside the u-boot-libre deblob script. +# - .parabola3 is the Parabola package revision. Without it it would be +# impossible to fix bugs inside this PKGBUILD. +# As for the '-r1', it cannot go inside pkgver, else we end up with an +# error like that when running makepkg: +# ==> ERROR: pkgver is not allowed to contain colons, forward slashes, +# hyphens or whitespace. +# so it was moved in pkgrel. +_pkgver=2021.07 +_pkgrel=r1 + +pkgver="${_pkgver}" +pkgrel="${_pkgrel}.parabola3" arch=('armv7h' 'i686' 'x86_64') url="https://libreboot.org/docs/maintain/#resourcesscriptsbuildreleaseu-boot-libre" @@ -71,12 +84,12 @@ makedepends_i686+=('arm-none-eabi-gcc') makedepends_ppc64le+=('arm-none-eabi-gcc') makedepends_x86_64+=('arm-none-eabi-gcc') -_mirror="https://mirrors.mit.edu/libreboot/" # use a mirror per libreboot's request -source=("${_mirror}/${_upstream_name}/${_uboot_ver}-${_ubootlibre_rev}/${_upstream_name}-${_uboot_ver}-${_ubootlibre_rev}.tar.xz") -source+=('extlinux.conf' - "${pkgbase}.hook.in" - 'install-uboot4extlinux.sh.in' - "generate-${pkgbase}-install-text.sh") +# According to the Libreboot maintainer, we are supposed to use +# any of the mirrors in https://libreboot.org/download.html#https +# and not use the rsync server. The rsync server is only supposed +# to be used by mirrors as it has limited bandwith. +_mirror="https://mirrors.mit.edu/libreboot/" +source=("${_mirror}/${_pkgbase}/${_pkgver}-${_pkgrel}/${_pkgbase}-${_pkgver}-${_pkgrel}.tar") # TODO: this checksum doesn't correspond to the one in # tests/u-boot-libre.sha512. This means that the tarball is not @@ -95,13 +108,17 @@ source+=('extlinux.conf' # code, so while there is a valid license, we might lack # corresponding source code if it's really some code. The debian # commits might have more information about it. -sha512sums=('b816667988210c4f5e0e219fcf633fe0c599ced74568a2924afc8df14bede52ce0c9615ff27eae3ecf194d41a87d04231f099c90beece18028ee5890a3911669') -sha512sums+=('dcbcbc8d196c7dd7db1a8a30dfa8c9ece5d241580bdf593df5fa2de527f0dfea2bb76ff9bfe49fb1e9d631bd1e4b95c828a41cfb38dc2ddc9553e18a54a521f0' - '766b28c45218746672d3e802c16f2c1283d708b43edf0a42cb569c1cfa6d6d3f318d5da91efcc832303dcc2175ee23528d15891010c187dea4c6828e82596be3' - '1ecb7b932bb0b097cac2cdfabbf7faa1601a556b49782f68109be07e49bff62d4515d6492ad1c72f471cdc7b4e1c2d8750e3494fcb0fc93108e6e5bd4e82aedb' - 'b0e8b0ec7f742778ffed486cf529d56d550db48354a4251867078fda8e5a28c8938f6c005225042744c1117a6abb3843e632234b8fd73d8bfdd9c590b0165e4c') +sha512sums=('4fd4cb762efd6b3e1eede883ee44cbf16f787de7f9bd8d6f9a98d69a22fd75519cce4b9ff713b205d34854597d2f9d6053dabc6097e55cb5be7c7ce71dae2ef6') + +source+=('extlinux.conf' + "${pkgbase}.hook.in" + 'install-uboot4extlinux.sh.in' + "generate-${pkgbase}-install-text.sh") +sha512sums+=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP') -# supported boards _defconfigs=('A10-OLinuXino-Lime_defconfig' 'A10s-OLinuXino-M_defconfig' 'A13-OLinuXino_defconfig' @@ -127,6 +144,11 @@ _defconfigs=('A10-OLinuXino-Lime_defconfig' # Offset at which to install u-boot u_boot_with_spl_offset=8192 +case "$CARCH" in + armv7h) ARCH=arm;; + i686|ppc64le|x86_64) ARCH=arm;CROSS_COMPILE=arm-none-eabi-;; +esac + _nr_targets=0 for _defconfig in ${_defconfigs[@]}; do _nr_targets=$(expr ${_nr_targets} + 1) @@ -159,18 +181,22 @@ _build_uboot_target() unset CFLAGS CXXFLAGS LDFLAGS - local make_vars=( ARCH=arm ) - make ${make_vars[*]} distclean - make ${make_vars[*]} ${_defconfig} + make "ARCH=${ARCH}" distclean + make "ARCH=${ARCH}" ${_defconfig} - make_vars+=( EXTRAVERSION=-${pkgrel} ) - [[ "$CARCH" != armv7h ]] && make_vars+=( CROSS_COMPILE=arm-none-eabi- ) echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config - make ${make_vars[*]} + + if [ "$CARCH" = "armv7h" ]; then + make "ARCH=${ARCH}" EXTRAVERSION=-${pkgrel} + else + make "ARCH=${ARCH}" "CROSS_COMPILE=${CROSS_COMPILE}" \ + EXTRAVERSION=-${pkgrel} + fi echo "==> Installing ${_target_name} to ${_destdir}" install -d ${_destdir} mv -f u-boot-sunxi-with-spl.bin "${_destdir}" + } # TODO: We need to fix the timestamps upstream to a valid date @@ -183,13 +209,13 @@ _build_uboot_target() # make the u-boot package reporducible. prepare() { - cd "${srcdir}"/u-boot-v${_uboot_ver}-${_ubootlibre_rev} + cd "${_pkgbase}-${_pkgver}-${_pkgrel}" find -print0 | xargs -0r touch --no-dereference --date="@${SOURCE_DATE_EPOCH}" } build() { - cd "${srcdir}"/u-boot-v${_uboot_ver}-${_ubootlibre_rev} + cd "${_pkgbase}-${_pkgver}-${_pkgrel}" _target_nr=0 for _defconfig in ${_defconfigs[@]}; do @@ -229,7 +255,7 @@ _check_uboot_target() check() { - cd "${srcdir}"/u-boot-v${_uboot_ver}-${_ubootlibre_rev} + cd "${_pkgbase}-${_pkgver}-${_pkgrel}" _target_nr=0 for _defconfig in ${_defconfigs[@]}; do @@ -248,7 +274,7 @@ _make_uboot_package() _pkgname="$1" if [ -n "${pkgdir}" ] ; then - cd "${srcdir}"/u-boot-v${_uboot_ver}-${_ubootlibre_rev} + cd "${_pkgbase}-${_pkgver}-${_pkgrel}" # Install the u-boot binary install -d "${pkgdir}/usr/lib/u-boot/${_pkgname}/" |