From 606ff32cb7e75b6975749b6250b68352b71e943b Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Mon, 12 Sep 2022 10:58:58 +0530 Subject: [PATCH] chore: bump deps Bump deps Ref: - #574 - #575 Signed-off-by: Noel Georgi --- Makefile | 2 +- Pkgfile | 130 ++--- cryptsetup/pkg.yaml | 2 + eudev/pkg.yaml | 3 + ...a283dd62a05a320c1921e3d8d71a87772637.patch | 134 ----- ipmitool/patches/gcc-10.patch | 37 -- ipmitool/patches/openssl-1.1.patch | 89 ---- ipmitool/pkg.yaml | 13 +- iptables/patches/fix-u_int16_t.patch | 163 ++++++ iptables/patches/fix-xtables.patch | 11 + iptables/pkg.yaml | 10 +- kernel/build/config-amd64 | 7 +- kernel/build/config-arm64 | 8 +- libinih/pkg.yaml | 4 + ...disable-create_toolcontext-buffering.patch | 25 - lvm2/patches/fix-stdio-usage.patch | 34 +- lvm2/patches/mlockall-default-config.patch | 22 +- lvm2/patches/static-build.patch | 13 - lvm2/pkg.yaml | 2 - nvidia-open-gpu-kernel-modules/pkg.yaml | 4 + open-iscsi/pkg.yaml | 5 + socat/pkg.yaml | 3 + .../patches/gcc-12-build-fix.patch | 14 - u-boot/jetson_nano/patches/README.md | 6 +- u-boot/jetson_nano/patches/tegra.patch | 470 ++++++++---------- u-boot/pkg.yaml | 34 +- .../board-rock-pi-4-enable-spi-flash.patch | 59 +-- .../patches/enable-boot-from-spi-flash.patch | 24 +- .../general-add-xtx-spi-nor-chips.patch | 44 +- util-linux/pkg.yaml | 2 +- 30 files changed, 627 insertions(+), 747 deletions(-) delete mode 100644 ipmitool/patches/7ccea283dd62a05a320c1921e3d8d71a87772637.patch delete mode 100644 ipmitool/patches/gcc-10.patch delete mode 100644 ipmitool/patches/openssl-1.1.patch create mode 100644 iptables/patches/fix-u_int16_t.patch create mode 100644 iptables/patches/fix-xtables.patch delete mode 100644 lvm2/patches/disable-create_toolcontext-buffering.patch delete mode 100644 lvm2/patches/static-build.patch delete mode 100644 u-boot/arm-trusted-firmware/patches/gcc-12-build-fix.patch diff --git a/Makefile b/Makefile index b523022b5..f42264121 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ SOURCE_DATE_EPOCH ?= "1559424892" # Sync bldr image with Pkgfile BLDR ?= docker run --rm --volume $(PWD):/tools --entrypoint=/bldr \ - ghcr.io/siderolabs/bldr:v0.2.0-alpha.8-frontend graph --root=/tools + ghcr.io/siderolabs/bldr:v0.2.0-alpha.10 graph --root=/tools BUILD := docker buildx build PLATFORM ?= linux/amd64,linux/arm64 diff --git a/Pkgfile b/Pkgfile index efb868dd4..3480f954b 100644 --- a/Pkgfile +++ b/Pkgfile @@ -1,14 +1,14 @@ -# syntax = ghcr.io/siderolabs/bldr:v0.2.0-alpha.8-frontend +# syntax = ghcr.io/siderolabs/bldr:v0.2.0-alpha.10 format: v1alpha2 vars: - TOOLS_IMAGE: ghcr.io/siderolabs/tools:v1.3.0-alpha.0-1-g7d6f9c3 + TOOLS_IMAGE: ghcr.io/siderolabs/tools:v1.3.0-alpha.0-14-g5f87206 # renovate: datasource=github-releases depName=containernetworking/plugins - cni_version: v1.1.0 - cni_sha256: c256b996fd5a1a2aea0e46a1f322be01afae0899015f65d77863693feccd32a4 - cni_sha512: 43cfcb0225cbc85cc75205cefac75f852fccce1a71b0384fe1f989e64c37508fc3b87cbc05c6dac679aea8950c3cd4d328a616fa79b52474561c624164da0206 + cni_version: v1.1.1 + cni_sha256: c86c44877c47f69cd23611e22029ab26b613f620195b76b3ec20f589367a7962 + cni_sha512: 03da31caee5f9595abf65d4a551984b995bc18c5e97409549f08997c5a6a2b41a8950144f8a5b4f810cb401ddbe312232d2be76ec977acf8108eb490786b1817 # renovate: datasource=github-tags depName=containerd/containerd containerd_version: v1.6.8 @@ -17,9 +17,9 @@ vars: containerd_sha512: c204c028cdfd76537d1da01c66526fc85b29b02d2412569bb9b265375603614b037356c61846025a72281398f0f46df326a5ea3df97f57901cce85f2f728f0ba # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.kernel.org/pub/scm/utils/cryptsetup/cryptsetup.git - cryptsetup_version: 2.3.4 - cryptsetup_sha256: 8bc16c0b1c987867f13f0f2114fc4182d92bc866d1f84bb725c2cb9bcc55bf93 - cryptsetup_sha512: a0a4981ca7294d6f0568bc9465e78ee1781ad73fe77e8daa0bbe67693534f02d3510e6fba9f76749b90ce7533bc9ac96dd27b73d733f8051e9560a3b4196ca3c + cryptsetup_version: 2.5.0 + cryptsetup_sha256: f8dacf7e29773b667b1d20ca5c3def2c3bde2dd0a673f6ab7bbaa66d76413263 + cryptsetup_sha512: f457168292ae9fadc34d709494818aee3f18b56bdf5fcff0b2a5ae0b554031ce888d01cd126ca7aa915fcdcb00de6afed2fdb25bbbd690aa8bfcaafa516ade93 # renovate: datasource=github-releases extractVersion=^v(?.*)$ versioning=loose depName=dosfstools/dosfstools dosfstools_version: 4.2 @@ -42,29 +42,29 @@ vars: grub_sha512: 4f11c648f3078567e53fc0c74d5026fdc6da4be27d188975e79d9a4df817ade0fe5ad2ddd694238a07edc45adfa02943d83c57767dd51548102b375e529e8efe # renovate: datasource=github-releases extractVersion=^IPMITOOL_(?.*)$ depName=ipmitool/ipmitool - ipmitool_version: 1_8_18 - ipmitool_sha256: 2bd79d899e8a8b3f96bf267ed2d7d5a0da3df45d8581cbf8d9e8433692375ae7 - ipmitool_sha512: e026bed01f8ac64b584d8c438ccc048df607b2e4832493335b2e266166acebf32f2b58c353bc2ecd3750d920e65a79afef7b28bf4a6405e2f461ab2c8cd953a7 + ipmitool_version: 1_8_19 + ipmitool_sha256: 48b010e7bcdf93e4e4b6e43c53c7f60aa6873d574cbd45a8d86fa7aaeebaff9c + ipmitool_sha512: 2d91706e9feba4b2ce4808eca087b81b842c4292a5840830001919c06ec8babd8f8761b74bb9dcf8fbc7765f028a5b1a192a3c1b643f2adaa157fed6fb0d1ee3 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.netfilter.org/iptables - iptables_version: 1.8.7 - iptables_sha256: c109c96bb04998cd44156622d36f8e04b140701ec60531a10668cfdff5e8d8f0 - iptables_sha512: c0a33fafbf1139157a9f52860938ebedc282a1394a68dcbd58981159379eb525919f999b25925f2cb4d6b18089bd99a94b00b3e73cff5cb0a0e47bdff174ed75 + iptables_version: 1.8.8 + iptables_sha256: 71c75889dc710676631553eb1511da0177bbaaf1b551265b912d236c3f51859f + iptables_sha512: f21df23279a77531a23f3fcb1b8f0f8ec0c726bda236dd0e33af74b06753baff6ce3f26fb9fcceb6fada560656ba901e68fc6452eb840ac1b206bc4654950f59 # renovate: datasource=git-refs versioning=git depName=https://github.com/ipxe/ipxe.git - ipxe_ref: c5af41a6f5b5f4a420b3e539f9e3a8dc9f8dd03e - ipxe_sha256: 370ef608f6314fe53bef52f780288364aa446428eb774c1cd55c656b81fe23b8 - ipxe_sha512: 4aa202b8b9489b217c8ef66b8cb3a8179689e98f2807024246d022eadc311f842855d19f20430bdbeb2358aca6ee7c9533d3f60456ba3b1681a8a22f31c2aa50 + ipxe_ref: bc19aeca5f6c695ad3db0196057d155e4f64584e + ipxe_sha256: bbc951518c4eb3a35c07b09b6c029eeb6b2a110ae39e894511c0b78dd89700e7 + ipxe_sha512: 8f2de95733b222a2192e35f9a4370ec094f814d9d2b6cf2bcd7db0241533ed20decf643f2711f57a6341fcb92a507b62cfd911e53c7725d746f8dabae54d89ef # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git - linux_version: 5.15.64 - linux_sha256: c6a1d38c6fa3798341372d5cf0088ae806ccdc827e31ecbff8988e097ba5de50 - linux_sha512: 3445baa4f53ab8108af576ca06596071cb12be7d67d93899c0819fa2feae4fff551e702a91357f798f920a0f7fd6cd38f2c1cb66cf60b6cc10142e503fe21b85 + linux_version: 5.15.67 + linux_sha256: da47d9a80b694548835ccb553b6eb1a1f3f5d5cddd9e2bd6f4886b99ca14f940 + linux_sha512: e4a113f11b8fcac3512f5f9a42dfdd30774c8979e4a7877161a0540cfbdbba88cac54cfe081d2f13d60f48b4fe04ea6ea79d6513376f036a67a4f93d45846895 # renovate: datasource=git-tags extractVersion=^v(?.*)$ versioning=loose depName=git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git - kmod_version: 27 - kmod_sha256: c1d3fbf16ca24b95f334c1de1b46f17bbe5a10b0e81e72668bdc922ebffbbc0c - kmod_sha512: e0513094935333fca1fb4c3e3493b232507a579ab00a6457cc9ed3e928363d05aad80634fb65a8287a336bf9895194c7be8ddc41bb088a6c2cca44fc1bfbdb6c + kmod_version: 30 + kmod_sha256: f897dd72698dc6ac1ef03255cd0a5734ad932318e4adbaebc7338ef2f5202f9f + kmod_sha512: e2cd34e600a72e44710760dfda9364b790b8352a99eafbd43e683e4a06f37e6b5c0b5d14e7c28070e30fc5fc6ceddedf7b97f3b6c2c5c2d91204fefd630b9a3e # renovate: datasource=git-tags extractVersion=^libaio-(?.*)$ versioning=loose depName=https://pagure.io/libaio.git libaio_version: 0.3.112 @@ -72,19 +72,19 @@ vars: libaio_sha512: 5f984529c9f747a6c82f1e4457fc0832bb1fc299ae6e700f2ac5a8ea7b9bfc6ea1e75809728cc115a020cff6685ed1f4e38c6aeacc1ea98dfccce04dd19dafaa # renovate: datasource=github-releases extractVersion=^r(?.*)$ versioning=loose depName=benhoyt/inih - libinih_version: 53 - libinih_sha256: 01b0366fdfdf6363efc070c2f856f1afa33e7a6546548bada5456ad94a516241 - libinih_sha512: 99bc40c294b521e9973184bfb30d60c129735991f33b387b3d023827a34672b0489eadf91e38895ea725168dbc7b27bb02c1975debe7573b4b209d0e947b2100 + libinih_version: 56 + libinih_sha256: 4f2ba6bd122d30281a8c7a4d5723b7af90b56aa828c0e88256d7fceda03a491a + libinih_sha512: ff3e0910990f73e5b21fddc84737ab346279f201c86c7ad864c6cad9de5bde57c3e0a433b9b8f3585b7d86feaae2ea074185f92891dcadc98c274c1c0745d2d2 # renovate: datasource=github-tags extractVersion=^json-c-(?.*)-.*$ versioning=loose depName=json-c/json-c - libjson_c_version: 0.15 - libjson_c_sha256: b8d80a1ddb718b3ba7492916237bbf86609e9709fb007e7f7d4322f02341a4c6 - libjson_c_sha512: dc01298bcc78f0f31a34f5fcfe45c0feebfd88518e97fb4f96f1a652f71ccdd303415a4c7bf5b573bdcbcca80428281f0dfccefc6545ea3a7f18dbb819332f34 + libjson_c_version: 0.16 + libjson_c_sha256: 8e45ac8f96ec7791eaf3bb7ee50e9c2100bbbc87b8d0f1d030c5ba8a0288d96b + libjson_c_sha512: 255cff99033340b2c2678255d41dae7808f83ed0c102e693d2d9e186bd1f21dd1385fcaa360c0fc087a00965a9567fbda733370e6b518a9be2f1bb0a80439151 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=https://git.tukaani.org/xz.git - xz_version: 5.2.5 - xz_sha256: 3e1e518ffc912f86608a8cb35e4bd41ad1aec210df2a47aaa1f95e7f5576ef56 - xz_sha512: 59266068a51cb616eb31b67cd8f07ffeb2288d1391c61665ae2ec6814465afac80fec69248f6a2f2db45b44475af001296a99af6a32287226a9c41419173ccbb + xz_version: 5.2.6 + xz_sha256: e076ba3439cb7cfc45b908c869f51a8c89f3c9ee9ee982fde28849c015e723a7 + xz_sha512: 5c69a492227c0ff72836d7a87e6372dc2e62bedfffb33f057263e28a6341825cef67834a863ed6ac02c5368c86da89f8affbe767f8bb914064cfa478f653e935 # renovate: datasource=github-releases extractVersion=^popt-(?.*)-release$ versioning=loose depName=rpm-software-management/popt libpopt_version: 1.18 @@ -97,19 +97,19 @@ vars: libseccomp_sha512: 92650bd7d1d48b383f402a536b97a017fd0f6ad1234daf4b938d01c92e8d134a01d2f2dd45fd9e2d025d7556bd1386ec360402145a87f20580c85949d62cea0e # renovate: datasource=git-tags extractVersion=^v(?.*)$ versioning=loose depName=git://git.liburcu.org/userspace-rcu.git - liburcu_version: 0.13.1 - liburcu_sha256: 3213f33d2b8f710eb920eb1abb279ec04bf8ae6361f44f2513c28c20d3363083 - liburcu_sha512: c86f2eb260cccb3cb6bd54ddbc0b46e60083fc99423e9403242ebed7f39a2a49c68af933ea6f373e2a9d4f9dc56f5befe030740891e28cf2fabe927a48ff8182 + liburcu_version: 0.13.2 + liburcu_sha256: 1213fd9f1b0b74da7de2bb74335b76098db9738fec5d3cdc07c0c524f34fc032 + liburcu_sha512: e5097a7f653f51b3a47a09f79e7a153aab8fd22c0504a1127a9b33d093a9ae6a941b97c0fe175ee168e2976097aefdcdf8d5ce030afbe565c1b72f64d6f5b60a # renovate: datasource=git-tags versioning=loose depName=git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git - linux_firmware_version: 20220411 - linux_firmware_sha256: 533ae621b3eacf6a4696dab52a9dbc5727403a175c413b1682ab3f9cfb37872f - linux_firmware_sha512: 385d74206b5ab312bc787a460e77d908a383963bec407c2f144f83c6b5a813b2c1de9e6250ffb57aa80e0c328d1fbde96ead79f6da73eb84347660873c05ffe6 + linux_firmware_version: 20220815 + linux_firmware_sha256: 5b053102645d23e5f070f0d3f3b1a538eb26b14778564c42dc6112e419233d2b + linux_firmware_sha512: 7d43482adfee0eec790e543a5401c256f06101a92cf50c16f0e895794ee4fffd0b094a1f8bff228ca872780c22a2b6c95e7df6e25f5e2a2e5aded622d04c5405 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://sourceware.org/git/lvm2.git - lvm2_version: 2_03_10 - lvm2_sha256: 5ad1645a480440892e35f31616682acba0dc204ed049635d2df3e5a5929d0ed0 - lvm2_sha512: 8678ae2f99739ccad0250f6f4b4b8e84520f2053835985a1ea9c80196a64df31a48858aebf983170c3dfcafecea83f2c6aa630ef73fd31dd84cf1627a1b421e4 + lvm2_version: 2_03_16 + lvm2_sha256: e661ece15b5d88d8abe39a4c1e1db2f43e1896f019948bb98b0e15d777680786 + lvm2_sha512: 084ba4080537359458db936637fc7f83bb9bfcf2de9f3660882551b5c31c7e9900c7d381b238ce1bb7629942c740c121f0dea5e404c302d31ed028b5c65efaa5 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.musl-libc.org/musl musl_version: 1.2.3 @@ -122,14 +122,14 @@ vars: nvidia_driver_sha512: c2ff6fd02272b6981a65e7e14c6b636f0113e21da910898c27682f58e60fa8e6deea3670081c57e4961fb5e7794eef8eddb90d134ba1892536a8468c5dc9d669 # renovate: datasource=github-releases depName=open-iscsi/open-iscsi - open_iscsi_version: 2.1.4 - open_iscsi_sha256: a5a73f7c795d1dc214100b1eb70647d6c2ceccf8973e584f50ee7f92c40d2a8a - open_iscsi_sha512: ae0663a964d86e6a4c19203598b859173c93ecce550f9bc9855ff735dd51a3c45822f2bc1cc99e6891c56ef1d16c42223803f07a961558fe6e38ead2164faef3 + open_iscsi_version: 2.1.7 + open_iscsi_sha256: d96761e47a69f8214c5fbd251d844f37961b14c3e437b63a15cc64f5b8cba2f0 + open_iscsi_sha512: 619c57b988c6972da09428b3a84ca375ca46653fbfca9cb61389c70a95871b665f93b75b8e6ff2aa993bdb89e2a078a188c0a7b45c3bf9c15a16b496e9ebc892 # renovate: datasource=github-releases versioning=loose depName=open-iscsi/open-isns - open_isns_version: v0.101 - open_isns_sha256: f672ec86b6c9e984843a7a28d76f07e26393499c486f86034b8b18caa8deb556 - open_isns_sha512: e5a392127b0d85f36e9e4aa963c0c502af8c5aea0aba6d12abb4425649969dcc20ba6e87a99083626d981438439b17b71a86320f816042d82ed5dbe7e7a63e77 + open_isns_version: v0.102 + open_isns_sha256: 9611344733c0cdf14395f60880950ea4c3c7d6b765565b6493ad3e1afbe216de + open_isns_sha512: f5ae8af89b85565181c2f6def9834d9dab0a15d5d9b28721cce116c5580173ed9adba219e1ede48988cb57f047578db4ece458c4a7db598412c7583e56393d2b # renovate: datasource=git-tags extractVersion=^OpenSSL_(?.*)$ versioning=loose depName=git://git.openssl.org/openssl.git openssl_version: 1_1_1q @@ -137,9 +137,9 @@ vars: openssl_sha512: cb9f184ec4974a3423ef59c8ec86b6bf523d5b887da2087ae58c217249da3246896fdd6966ee9c13aea9e6306783365239197e9f742c508a0e35e5744e3e085f # renovate: datasource=github-tags versioning=loose depName=raspberrypi/firmware - raspberrypi_firmware_version: 1.20220331 - raspberrypi_firmware_sha256: e186889be44a80bc148c0a020aaf580633ddb10ee314c1c7299c74fd73db3dd1 - raspberrypi_firmware_sha512: c510ddb5eb1c6ea1aa69f0063551445dd21092f68e19b64b885558d2c47735d4e9f781ef9674fbe3a9894d66eb07ccbb004541c9a85005318911fabda899c2cc + raspberrypi_firmware_version: 1.20220830 + raspberrypi_firmware_sha256: fcfa24ce0ea26c60d1a140d4220cb803269c38235a08e2b004f458d4692cb97f + raspberrypi_firmware_sha512: 9f5682254bf2596556b8759dd7b6ab1292ba6a28bf582f100682a1f14a03b43ac6ece654392e7a17f27db3940e8073b9e8645bd66aba8504a820fc29a3a1c500 # renovate: datasource=github-tags depName=opencontainers/runc runc_version: v1.1.4 @@ -148,9 +148,9 @@ vars: runc_sha512: 73f7b266a2aaabf180bf99d04e96a171ef12cc3c3ff43189caff324f1e4ac127a646c3c15489801d48291d997de4c88384ae957a8af4a96b3e779bcb09bc58ac # renovate: datasource=git-tags extractVersion=^tag-(?.*)$ depName=git://repo.or.cz/socat.git - socat_version: 1.7.3.4 - socat_sha256: d9ed2075abed7b3ec9730ed729b4c8e287c502181c806d4487020418a6e2fc36 - socat_sha512: c5699fd1a703e90927076599d02323b85722d49e86bc2f627b4301a41d3df72c634af629f378425ff201cde78343da5cd0cad1044bf857665176c91357401fdd + socat_version: 1.7.4.3 + socat_sha256: d697245144731423ddbbceacabbd29447089ea223e9a439b28f9ff90d0dd216e + socat_sha512: 81cb34c245052b6a0ae38a711591358460b6070957af4a9eeb11a3cadb4aff184eeaedabbc7ecdc7fdf21a6126c06f90f19b24a87ce74b30bfd60a3879181046 # renovate: datasource=git-tags extractVersion=^syslinux-(?.*)$ depName=git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git syslinux_version: 6.03 @@ -158,23 +158,23 @@ vars: syslinux_sha512: dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31 # renovate: datasource=github-tags versioning=loose depName=ARM-software/arm-trusted-firmware - arm_trusted_firmware_version: v2.7 - arm_trusted_firmware_sha256: 327c65b1bc231608a7a808b068b00c1a22310e9fc86158813cd10a9711d5725e - arm_trusted_firmware_sha512: ff9bd87bf74653275ef9abdf2079974c214e13bd1861bdb3dc4240bdf7e972f3a91c8c6ef86e26afcffe51b29b856c8cf6ffb3d4150d7ccd6a4d3b696bb6f55f + arm_trusted_firmware_version: v2.7.0 + arm_trusted_firmware_sha256: 99a37f5ab682415be80f20bb18acdc1a45eda9f2a7de67eb3dc798faa70f66e6 + arm_trusted_firmware_sha512: 3e1e09bcc69a0f080f91b94d9c8da6dd0b27b86292599c280438d7b6f594017a896af7cfc58d9d22053f77b5daa2faecd51a59505c755eac8493e4e0fd1e9203 # renovate: datasource=github-tags extractVersion=^v(?.*)$ depName=u-boot/u-boot - uboot_version: 2022.04 - uboot_sha256: 68e065413926778e276ec3abd28bb32fa82abaa4a6898d570c1f48fbdb08bcd0 - uboot_sha512: 113056e542db049eea3b1d1ccbbe52c79539a2f9bb6129d284ec9200dcffec7bd5969821913a9899631575b80991c84ad01bc845b4bba614e42e54466d9f0d64 + uboot_version: 2022.07 + uboot_sha256: 92b08eb49c24da14c1adbf70a71ae8f37cc53eeb4230e859ad8b6733d13dcf5e + uboot_sha512: e1b3621dafac876c644ffb3d24b6e2380f5a78454c420a5b17d174e3f0b57731a95cfbff28ae7d0af4493f4bbf8d21e7f9236d61bb2414ed12295332b3d557b6 # renovate: datasource=git-tags extractVersion=^v(?.*)$ versioning=loose depName=git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git - util_linux_version: 2.38 - util_linux_sha256: 6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64 - util_linux_sha512: d0f7888f457592067938e216695871ce6475a45d83a092cc3fd72b8cf8fca145ca5f3a99122f1744ef60b4f773055cf4e178dc6c59cd30837172aee0b5597e8c + util_linux_version: 2.38.1 + util_linux_sha256: 60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f + util_linux_sha512: 07f11147f67dfc6c8bc766dfc83266054e6ede776feada0566b447d13276b6882ee85c6fe53e8d94a17c03332106fc0549deca3cf5f2e92dda554e9bc0551957 # renovate: datasource=git-tags extractVersion=^v(?.*)$ depName=git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git - xfsprogs_version: 5.14.2 - xfsprogs_sha256: 01ccd3ef9df2837753a5d876b8da84ea957d13d7a461b8c46e8afa4eb09aabc8 - xfsprogs_sha512: cb9794247a2eed8bd9f10ff811d38f97e4adbed97bad334b0fa8a26503ec224237eddd92fd78892584a153967417ab2009fb2fc8bab6ef12cd53fd20bdba1b4e + xfsprogs_version: 5.19.0 + xfsprogs_sha256: 4b6c6c98c036a37f6d90c82cb7fe9405d3b5856d9345662032d01ff4b140592c + xfsprogs_sha512: 0b069cd44eb87052ee55ebffcce736ef103adeda539e854bd86d53942f541c07d74cc174f06a2221230eaa82b21d43327833492cd0ded577d442e1935a0abe7d labels: org.opencontainers.image.source: https://github.com/siderolabs/pkgs diff --git a/cryptsetup/pkg.yaml b/cryptsetup/pkg.yaml index 72abb4ae7..276703636 100644 --- a/cryptsetup/pkg.yaml +++ b/cryptsetup/pkg.yaml @@ -23,6 +23,8 @@ steps: ./configure \ --prefix=/usr \ + --disable-asciidoc \ + --disable-ssh-token \ --enable-static-cryptsetup || (cat config.log; exit 1) build: - | diff --git a/eudev/pkg.yaml b/eudev/pkg.yaml index 60d871167..b5d55e953 100644 --- a/eudev/pkg.yaml +++ b/eudev/pkg.yaml @@ -17,6 +17,9 @@ steps: # Required by gperf. cp /toolchain/lib/libstdc++* /lib + mkdir -p /usr/bin \ + && ln -sf /toolchain/bin/env /usr/bin/env + autoreconf -f -i -s cat > config.cache << "EOF" diff --git a/ipmitool/patches/7ccea283dd62a05a320c1921e3d8d71a87772637.patch b/ipmitool/patches/7ccea283dd62a05a320c1921e3d8d71a87772637.patch deleted file mode 100644 index de5457f7e..000000000 --- a/ipmitool/patches/7ccea283dd62a05a320c1921e3d8d71a87772637.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 7ccea283dd62a05a320c1921e3d8d71a87772637 Mon Sep 17 00:00:00 2001 -From: Chrostoper Ertl -Date: Thu, 28 Nov 2019 17:13:45 +0000 -Subject: [PATCH] fru, sdr: Fix id_string buffer overflows - -Final part of the fixes for CVE-2020-5208, see -https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp - -9 variants of stack buffer overflow when parsing `id_string` field of -SDR records returned from `CMD_GET_SDR` command. - -SDR record structs have an `id_code` field, and an `id_string` `char` -array. - -The length of `id_string` is calculated as `(id_code & 0x1f) + 1`, -which can be larger than expected 16 characters (if `id_code = 0xff`, -then length will be `(0xff & 0x1f) + 1 = 32`). - -In numerous places, this can cause stack buffer overflow when copying -into fixed buffer of size `17` bytes from this calculated length. ---- - lib/ipmi_fru.c | 2 +- - lib/ipmi_sdr.c | 40 ++++++++++++++++++++++++---------------- - 2 files changed, 25 insertions(+), 17 deletions(-) - -diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c -index 2e323ff9..4a5018dd 100644 ---- a/lib/ipmi_fru.c -+++ b/lib/ipmi_fru.c -@@ -3078,7 +3078,7 @@ ipmi_fru_print(struct ipmi_intf * intf, struct sdr_record_fru_locator * fru) - return 0; - - memset(desc, 0, sizeof(desc)); -- memcpy(desc, fru->id_string, fru->id_code & 0x01f); -+ memcpy(desc, fru->id_string, __min(fru->id_code & 0x01f, sizeof(desc))); - desc[fru->id_code & 0x01f] = 0; - printf("FRU Device Description : %s (ID %d)\n", desc, fru->device_id); - -diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c -index c24a3870..07256cb1 100644 ---- a/lib/ipmi_sdr.c -+++ b/lib/ipmi_sdr.c -@@ -2254,7 +2254,7 @@ ipmi_sdr_print_sensor_eventonly(struct ipmi_intf *intf, - return -1; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (sensor->id_code & 0x1f) + 1, sensor->id_string); - - if (verbose) { - printf("Sensor ID : %s (0x%x)\n", -@@ -2303,7 +2303,7 @@ ipmi_sdr_print_sensor_mc_locator(struct sdr_record_mc_locator *mc) - return -1; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (mc->id_code & 0x1f) + 1, "%s", mc->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (mc->id_code & 0x1f) + 1, mc->id_string); - - if (verbose == 0) { - if (csv_output) -@@ -2394,7 +2394,7 @@ ipmi_sdr_print_sensor_generic_locator(struct sdr_record_generic_locator *dev) - char desc[17]; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (dev->id_code & 0x1f) + 1, "%s", dev->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (dev->id_code & 0x1f) + 1, dev->id_string); - - if (!verbose) { - if (csv_output) -@@ -2449,7 +2449,7 @@ ipmi_sdr_print_sensor_fru_locator(struct sdr_record_fru_locator *fru) - char desc[17]; - - memset(desc, 0, sizeof (desc)); -- snprintf(desc, (fru->id_code & 0x1f) + 1, "%s", fru->id_string); -+ snprintf(desc, sizeof(desc), "%.*s", (fru->id_code & 0x1f) + 1, fru->id_string); - - if (!verbose) { - if (csv_output) -@@ -2634,35 +2634,43 @@ ipmi_sdr_print_name_from_rawentry(uint16_t id, - - int rc =0; - char desc[17]; -+ const char *id_string; -+ uint8_t id_code; - memset(desc, ' ', sizeof (desc)); - - switch ( type) { - case SDR_RECORD_TYPE_FULL_SENSOR: - record.full = (struct sdr_record_full_sensor *) raw; -- snprintf(desc, (record.full->id_code & 0x1f) +1, "%s", -- (const char *)record.full->id_string); -+ id_code = record.full->id_code; -+ id_string = record.full->id_string; - break; -+ - case SDR_RECORD_TYPE_COMPACT_SENSOR: - record.compact = (struct sdr_record_compact_sensor *) raw ; -- snprintf(desc, (record.compact->id_code & 0x1f) +1, "%s", -- (const char *)record.compact->id_string); -+ id_code = record.compact->id_code; -+ id_string = record.compact->id_string; - break; -+ - case SDR_RECORD_TYPE_EVENTONLY_SENSOR: - record.eventonly = (struct sdr_record_eventonly_sensor *) raw ; -- snprintf(desc, (record.eventonly->id_code & 0x1f) +1, "%s", -- (const char *)record.eventonly->id_string); -- break; -+ id_code = record.eventonly->id_code; -+ id_string = record.eventonly->id_string; -+ break; -+ - case SDR_RECORD_TYPE_MC_DEVICE_LOCATOR: - record.mcloc = (struct sdr_record_mc_locator *) raw ; -- snprintf(desc, (record.mcloc->id_code & 0x1f) +1, "%s", -- (const char *)record.mcloc->id_string); -+ id_code = record.mcloc->id_code; -+ id_string = record.mcloc->id_string; - break; -+ - default: - rc = -1; -- break; -- } -+ } -+ if (!rc) { -+ snprintf(desc, sizeof(desc), "%.*s", (id_code & 0x1f) + 1, id_string); -+ } - -- lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); -+ lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc); - return rc; - } - diff --git a/ipmitool/patches/gcc-10.patch b/ipmitool/patches/gcc-10.patch deleted file mode 100644 index 79d50bb56..000000000 --- a/ipmitool/patches/gcc-10.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 51c7e0822f531469cf860dfa5d010c87b284b747 Mon Sep 17 00:00:00 2001 -From: Vaclav Dolezal -Date: Thu, 23 Jan 2020 11:26:32 +0100 -Subject: [PATCH] hpmfwupg: move variable definition to .c file - -Signed-off-by: Vaclav Dolezal ---- - include/ipmitool/ipmi_hpmfwupg.h | 2 +- - lib/ipmi_hpmfwupg.c | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/ipmitool/ipmi_hpmfwupg.h b/include/ipmitool/ipmi_hpmfwupg.h -index de65292b..07f597be 100644 ---- a/include/ipmitool/ipmi_hpmfwupg.h -+++ b/include/ipmitool/ipmi_hpmfwupg.h -@@ -800,7 +800,7 @@ typedef struct _VERSIONINFO { - char descString[HPMFWUPG_DESC_STRING_LENGTH + 1]; - }VERSIONINFO, *PVERSIONINFO; - --VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX]; -+extern VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX]; - - #define TARGET_VER (0x01) - #define ROLLBACK_VER (0x02) -diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c -index 4aa8cecd..d63d2c15 100644 ---- a/lib/ipmi_hpmfwupg.c -+++ b/lib/ipmi_hpmfwupg.c -@@ -50,6 +50,8 @@ - - extern int verbose; - -+VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX]; -+ - int HpmfwupgUpgrade(struct ipmi_intf *intf, char *imageFilename, - int activate, int, int); - int HpmfwupgValidateImageIntegrity(struct HpmfwupgUpgradeCtx *pFwupgCtx); diff --git a/ipmitool/patches/openssl-1.1.patch b/ipmitool/patches/openssl-1.1.patch deleted file mode 100644 index ff5e7051b..000000000 --- a/ipmitool/patches/openssl-1.1.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff -urNp old/src/plugins/lanplus/lanplus_crypt_impl.c new/src/plugins/lanplus/lanplus_crypt_impl.c ---- old/src/plugins/lanplus/lanplus_crypt_impl.c 2016-05-28 10:20:20.000000000 +0200 -+++ new/src/plugins/lanplus/lanplus_crypt_impl.c 2017-02-21 10:50:21.634873466 +0100 -@@ -164,10 +164,10 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - uint8_t * output, - uint32_t * bytes_written) - { -- EVP_CIPHER_CTX ctx; -- EVP_CIPHER_CTX_init(&ctx); -- EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv); -- EVP_CIPHER_CTX_set_padding(&ctx, 0); -+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); -+ EVP_CIPHER_CTX_init(ctx); -+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -+ EVP_CIPHER_CTX_set_padding(ctx, 0); - - - *bytes_written = 0; -@@ -191,7 +191,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0); - - -- if(!EVP_EncryptUpdate(&ctx, output, (int *)bytes_written, input, input_length)) -+ if(!EVP_EncryptUpdate(ctx, output, (int *)bytes_written, input, input_length)) - { - /* Error */ - *bytes_written = 0; -@@ -201,7 +201,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - { - uint32_t tmplen; - -- if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen)) -+ if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) - { - *bytes_written = 0; - return; /* Error */ -@@ -210,7 +210,8 @@ lanplus_encrypt_aes_cbc_128(const uint8_ - { - /* Success */ - *bytes_written += tmplen; -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_cleanup(ctx); -+ EVP_CIPHER_CTX_free(ctx); - } - } - } -@@ -239,10 +240,10 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - uint8_t * output, - uint32_t * bytes_written) - { -- EVP_CIPHER_CTX ctx; -- EVP_CIPHER_CTX_init(&ctx); -- EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv); -- EVP_CIPHER_CTX_set_padding(&ctx, 0); -+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); -+ EVP_CIPHER_CTX_init(ctx); -+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv); -+ EVP_CIPHER_CTX_set_padding(ctx, 0); - - - if (verbose >= 5) -@@ -266,7 +267,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0); - - -- if (!EVP_DecryptUpdate(&ctx, output, (int *)bytes_written, input, input_length)) -+ if (!EVP_DecryptUpdate(ctx, output, (int *)bytes_written, input, input_length)) - { - /* Error */ - lprintf(LOG_DEBUG, "ERROR: decrypt update failed"); -@@ -277,7 +278,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - { - uint32_t tmplen; - -- if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen)) -+ if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen)) - { - char buffer[1000]; - ERR_error_string(ERR_get_error(), buffer); -@@ -290,7 +291,8 @@ lanplus_decrypt_aes_cbc_128(const uint8_ - { - /* Success */ - *bytes_written += tmplen; -- EVP_CIPHER_CTX_cleanup(&ctx); -+ EVP_CIPHER_CTX_cleanup(ctx); -+ EVP_CIPHER_CTX_free(ctx); - } - } - diff --git a/ipmitool/pkg.yaml b/ipmitool/pkg.yaml index 49babfda3..c9b58c2c1 100644 --- a/ipmitool/pkg.yaml +++ b/ipmitool/pkg.yaml @@ -6,17 +6,18 @@ dependencies: - stage: openssl steps: - sources: - - url: https://github.com/ipmitool/ipmitool/releases/download/IPMITOOL_{{ .ipmitool_version }}/ipmitool-{{ .ipmitool_version | replace "_" "." }}.tar.gz + - url: https://github.com/ipmitool/ipmitool/archive/refs/tags/IPMITOOL_{{ .ipmitool_version }}.tar.gz destination: ipmitool.tar.gz - sha256: e93fe5966d59e16bb4317c9c588cdf35d6100753a0ba957c493b064bcad52493 - sha512: 970a3ea69a2a06bf4bb49b07ddea2d575d79afe163f742a53dd29331889d74411d412e7a2117f1964c416b147ad4dc4212dec1fc653521ce710ed1eb45a185a3 + sha256: "{{ .ipmitool_sha256 }}" + sha512: "{{ .ipmitool_sha512 }}" prepare: - | tar -xzf ipmitool.tar.gz --strip-components=1 - patch -p1 -i /pkg/patches/openssl-1.1.patch - patch -p1 -i /pkg/patches/7ccea283dd62a05a320c1921e3d8d71a87772637.patch - patch -p1 -i /pkg/patches/gcc-10.patch + mkdir -p /usr/bin \ + && ln -sf /toolchain/bin/env /usr/bin/env + + ./bootstrap mkdir build cd build diff --git a/iptables/patches/fix-u_int16_t.patch b/iptables/patches/fix-u_int16_t.patch new file mode 100644 index 000000000..30f896ec5 --- /dev/null +++ b/iptables/patches/fix-u_int16_t.patch @@ -0,0 +1,163 @@ +From f319389525b066b7dc6d389c88f16a0df3b8f189 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Mon, 16 May 2022 18:16:41 +0200 +Subject: treewide: use uint* instead of u_int* + +Gcc complains about missing types. Some commits introduced u_int* instead +of uint*. Use uint treewide. + +Fixes errors in the form of: +In file included from xtables-legacy-multi.c:5: +xshared.h:83:56: error: unknown type name 'u_int16_t'; did you mean 'uint16_t'? + 83 | set_option(unsigned int *options, unsigned int option, u_int16_t *invflg, + | ^~~~~~~~~ + | uint16_t +make[6]: *** [Makefile:712: xtables_legacy_multi-xtables-legacy-multi.o] Error 1 + +Avoid libipq API breakage by adjusting libipq.h include accordingly. For +arpt_mangle.h kernel uAPI header, apply same change as in kernel commit +e91ded8db5747 ("uapi: netfilter_arp: use __u8 instead of u_int8_t"). + +Signed-off-by: Nick Hainke +Signed-off-by: Phil Sutter +--- + extensions/libxt_conntrack.c | 2 +- + include/libipq/libipq.h | 8 ++++---- + include/libiptc/libxtc.h | 2 +- + include/linux/netfilter_arp/arpt_mangle.h | 2 +- + iptables/xshared.c | 2 +- + iptables/xshared.h | 2 +- + libipq/ipq_create_handle.3 | 2 +- + libipq/ipq_set_mode.3 | 2 +- + 8 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/extensions/libxt_conntrack.c b/extensions/libxt_conntrack.c +index 64018ce1..234085c5 100644 +--- a/extensions/libxt_conntrack.c ++++ b/extensions/libxt_conntrack.c +@@ -778,7 +778,7 @@ matchinfo_print(const void *ip, const struct xt_entry_match *match, int numeric, + + static void + conntrack_dump_ports(const char *prefix, const char *opt, +- u_int16_t port_low, u_int16_t port_high) ++ uint16_t port_low, uint16_t port_high) + { + if (port_high == 0 || port_low == port_high) + printf(" %s%s %u", prefix, opt, port_low); +diff --git a/include/libipq/libipq.h b/include/libipq/libipq.h +index 3cd13292..dd0cb205 100644 +--- a/include/libipq/libipq.h ++++ b/include/libipq/libipq.h +@@ -24,7 +24,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -48,19 +48,19 @@ typedef unsigned long ipq_id_t; + struct ipq_handle + { + int fd; +- u_int8_t blocking; ++ uint8_t blocking; + struct sockaddr_nl local; + struct sockaddr_nl peer; + }; + +-struct ipq_handle *ipq_create_handle(u_int32_t flags, u_int32_t protocol); ++struct ipq_handle *ipq_create_handle(uint32_t flags, uint32_t protocol); + + int ipq_destroy_handle(struct ipq_handle *h); + + ssize_t ipq_read(const struct ipq_handle *h, + unsigned char *buf, size_t len, int timeout); + +-int ipq_set_mode(const struct ipq_handle *h, u_int8_t mode, size_t len); ++int ipq_set_mode(const struct ipq_handle *h, uint8_t mode, size_t len); + + ipq_packet_msg_t *ipq_get_packet(const unsigned char *buf); + +diff --git a/include/libiptc/libxtc.h b/include/libiptc/libxtc.h +index 37010188..a1d16ef9 100644 +--- a/include/libiptc/libxtc.h ++++ b/include/libiptc/libxtc.h +@@ -10,7 +10,7 @@ extern "C" { + #endif + + #ifndef XT_MIN_ALIGN +-/* xt_entry has pointers and u_int64_t's in it, so if you align to ++/* xt_entry has pointers and uint64_t's in it, so if you align to + it, you'll also align to any crazy matches and targets someone + might write */ + #define XT_MIN_ALIGN (__alignof__(struct xt_entry)) +diff --git a/include/linux/netfilter_arp/arpt_mangle.h b/include/linux/netfilter_arp/arpt_mangle.h +index 250f5029..8c2b16a1 100644 +--- a/include/linux/netfilter_arp/arpt_mangle.h ++++ b/include/linux/netfilter_arp/arpt_mangle.h +@@ -13,7 +13,7 @@ struct arpt_mangle + union { + struct in_addr tgt_ip; + } u_t; +- u_int8_t flags; ++ __u8 flags; + int target; + }; + +diff --git a/iptables/xshared.c b/iptables/xshared.c +index a8512d38..9b5e5b5b 100644 +--- a/iptables/xshared.c ++++ b/iptables/xshared.c +@@ -1025,7 +1025,7 @@ static const int inverse_for_options[NUMBER_OF_OPT] = + }; + + void +-set_option(unsigned int *options, unsigned int option, u_int16_t *invflg, ++set_option(unsigned int *options, unsigned int option, uint16_t *invflg, + bool invert) + { + if (*options & option) +diff --git a/iptables/xshared.h b/iptables/xshared.h +index 14568bb0..f8212988 100644 +# https://git.alpinelinux.org/aports/plain/main/iptables/fix-u_int16_t.patch +--- a/iptables/xshared.h ++++ b/iptables/xshared.h +@@ -80,7 +80,7 @@ struct xtables_target; + #define IPT_INV_ARPHRD 0x0800 + + void +-set_option(unsigned int *options, unsigned int option, u_int16_t *invflg, ++set_option(unsigned int *options, unsigned int option, uint16_t *invflg, + bool invert); + + /** +diff --git a/libipq/ipq_create_handle.3 b/libipq/ipq_create_handle.3 +index 11ef95c4..ebe46daa 100644 +--- a/libipq/ipq_create_handle.3 ++++ b/libipq/ipq_create_handle.3 +@@ -24,7 +24,7 @@ ipq_create_handle, ipq_destroy_handle \(em create and destroy libipq handles. + .br + .B #include + .sp +-.BI "struct ipq_handle *ipq_create_handle(u_int32_t " flags ", u_int32_t " protocol ");" ++.BI "struct ipq_handle *ipq_create_handle(uint32_t " flags ", uint32_t " protocol ");" + .br + .BI "int ipq_destroy_handle(struct ipq_handle *" h ); + .SH DESCRIPTION +diff --git a/libipq/ipq_set_mode.3 b/libipq/ipq_set_mode.3 +index 0edd3c00..e206886c 100644 +--- a/libipq/ipq_set_mode.3 ++++ b/libipq/ipq_set_mode.3 +@@ -24,7 +24,7 @@ ipq_set_mode \(em set the ip_queue queuing mode + .br + .B #include + .sp +-.BI "int ipq_set_mode(const struct ipq_handle *" h ", u_int8_t " mode ", size_t " range ); ++.BI "int ipq_set_mode(const struct ipq_handle *" h ", uint8_t " mode ", size_t " range ); + .SH DESCRIPTION + The + .B ipq_set_mode +-- +cgit v1.2.3 diff --git a/iptables/patches/fix-xtables.patch b/iptables/patches/fix-xtables.patch new file mode 100644 index 000000000..4476b5378 --- /dev/null +++ b/iptables/patches/fix-xtables.patch @@ -0,0 +1,11 @@ +# https://git.alpinelinux.org/aports/plain/main/iptables/fix-xtables.patch +--- a/libxtables/xtables.c 2022-05-13 13:26:26.000000000 +0000 ++++ b/libxtables/xtables.c 2022-05-17 08:56:52.670556393 +0000 +@@ -45,7 +45,6 @@ + + #include + #include /* INT_MAX in ip_tables.h/ip6_tables.h */ +-#include /* ETH_ALEN */ + #include + #include + #include diff --git a/iptables/pkg.yaml b/iptables/pkg.yaml index 6e5c9b666..a0a8f8e16 100644 --- a/iptables/pkg.yaml +++ b/iptables/pkg.yaml @@ -13,10 +13,12 @@ steps: - | tar -xjf iptables.tar.bz2 --strip-components=1 - mkdir build - cd build + # iptables out of tree built needs more patches and running ./autogen.sh + # https://www.spinics.net/lists/netfilter-devel/msg76456.html + patch -p1 < /pkg/patches/fix-xtables.patch + patch -p1 < /pkg/patches/fix-u_int16_t.patch - ../configure \ + ./configure \ --prefix=/usr \ --libexecdir=/usr/libexec \ --disable-static \ @@ -26,11 +28,9 @@ steps: --with-xtlibdir=/lib/xtables build: - | - cd build make -j $(nproc) install: - | - cd build make install DESTDIR=/rootfs finalize: - from: /rootfs diff --git a/kernel/build/config-amd64 b/kernel/build/config-amd64 index c970fb809..108ffc820 100644 --- a/kernel/build/config-amd64 +++ b/kernel/build/config-amd64 @@ -1,15 +1,15 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.15.64 Kernel Configuration +# Linux/x86 5.15.67 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.2.0" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=120200 CONFIG_CLANG_VERSION=0 CONFIG_AS_IS_GNU=y -CONFIG_AS_VERSION=23700 +CONFIG_AS_VERSION=23900 CONFIG_LD_IS_BFD=y -CONFIG_LD_VERSION=23700 +CONFIG_LD_VERSION=23900 CONFIG_LLD_VERSION=0 CONFIG_CC_CAN_LINK=y CONFIG_CC_CAN_LINK_STATIC=y @@ -5133,7 +5133,6 @@ CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y # end of Kernel hardening options # end of Security options -CONFIG_XOR_BLOCKS=y CONFIG_CRYPTO=y # diff --git a/kernel/build/config-arm64 b/kernel/build/config-arm64 index 9f58acb18..04c2c4189 100644 --- a/kernel/build/config-arm64 +++ b/kernel/build/config-arm64 @@ -1,15 +1,15 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm64 5.15.64 Kernel Configuration +# Linux/arm64 5.15.67 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.2.0" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=120200 CONFIG_CLANG_VERSION=0 CONFIG_AS_IS_GNU=y -CONFIG_AS_VERSION=23700 +CONFIG_AS_VERSION=23900 CONFIG_LD_IS_BFD=y -CONFIG_LD_VERSION=23700 +CONFIG_LD_VERSION=23900 CONFIG_LLD_VERSION=0 CONFIG_CC_CAN_LINK=y CONFIG_CC_CAN_LINK_STATIC=y @@ -363,6 +363,7 @@ CONFIG_ARM64_ERRATUM_1286807=y CONFIG_ARM64_ERRATUM_1463225=y CONFIG_ARM64_ERRATUM_1542419=y CONFIG_ARM64_ERRATUM_1508412=y +CONFIG_ARM64_ERRATUM_2441009=y CONFIG_CAVIUM_ERRATUM_22375=y CONFIG_CAVIUM_ERRATUM_23144=y CONFIG_CAVIUM_ERRATUM_23154=y @@ -7552,7 +7553,6 @@ CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y # end of Kernel hardening options # end of Security options -CONFIG_XOR_BLOCKS=y CONFIG_CRYPTO=y # diff --git a/libinih/pkg.yaml b/libinih/pkg.yaml index 53d2f1a76..e7400c23c 100644 --- a/libinih/pkg.yaml +++ b/libinih/pkg.yaml @@ -13,6 +13,10 @@ steps: - | tar -xzf inih.tar.gz --strip-components=1 + mkdir -p /usr/bin \ + && ln -sf /toolchain/bin/env /usr/bin/env \ + && ln -sf /toolchain/bin/python3 /toolchain/bin/python \ + LD_LIBRARY_PATH=/toolchain/lib pip3 install ninja meson \ diff --git a/lvm2/patches/disable-create_toolcontext-buffering.patch b/lvm2/patches/disable-create_toolcontext-buffering.patch deleted file mode 100644 index 815361647..000000000 --- a/lvm2/patches/disable-create_toolcontext-buffering.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ruN old/lib/mm/memlock.c new/lib/mm/memlock.c ---- old/lib/mm/memlock.c 2020-03-26 11:26:37.000000000 +0000 -+++ new/lib/mm/memlock.c 2020-06-12 17:57:46.230654829 +0000 -@@ -221,7 +221,9 @@ - - static void _release_memory(void) - { -+#if 0 - free(_malloc_mem); -+#endif - } - - /* -diff -ruN old/tools/lvmcmdline.c new/tools/lvmcmdline.c ---- old/tools/lvmcmdline.c 2020-03-26 11:26:37.000000000 +0000 -+++ new/tools/lvmcmdline.c 2020-06-12 17:42:44.476090689 +0000 -@@ -3438,7 +3438,7 @@ - */ - dm_set_name_mangling_mode(DM_STRING_MANGLING_NONE); - -- if (!(cmd = create_toolcontext(0, NULL, 1, 0, -+ if (!(cmd = create_toolcontext(0, NULL, 0, 0, - set_connections, set_filters))) { - udev_fin_library_context(); - return_NULL; diff --git a/lvm2/patches/fix-stdio-usage.patch b/lvm2/patches/fix-stdio-usage.patch index 524ed0372..2ba94b17d 100644 --- a/lvm2/patches/fix-stdio-usage.patch +++ b/lvm2/patches/fix-stdio-usage.patch @@ -1,6 +1,30 @@ ---- ./tools/lvmcmdline.c -+++ ./tools/lvmcmdline.c -@@ -1252,7 +1252,7 @@ +diff --git lib/commands/toolcontext.c lib/commands/toolcontext.c +index 4cb81bf94..91843425f 100644 +--- lib/commands/toolcontext.c ++++ lib/commands/toolcontext.c +@@ -1666,7 +1666,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd, + /* FIXME Make this configurable? */ + reset_lvm_errno(1); + +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + /* Set in/out stream buffering before glibc */ + if (set_buffering + #ifdef SYS_gettid +@@ -2046,7 +2046,7 @@ void destroy_toolcontext(struct cmd_context *cmd) + dm_hash_destroy(cmd->cft_def_hash); + + dm_device_list_destroy(&cmd->cache_dm_devs); +-#ifndef VALGRIND_POOL ++#if !defined(VALGRIND_POOL) && defined(__GLIBC__) + if (cmd->linebuffer) { + /* Reset stream buffering to defaults */ + if (is_valid_fd(STDIN_FILENO) && +diff --git tools/lvmcmdline.c tools/lvmcmdline.c +index 1e3547ed7..470fcaa87 100644 +--- tools/lvmcmdline.c ++++ tools/lvmcmdline.c +@@ -3398,7 +3398,7 @@ static int _check_standard_fds(void) int err = is_valid_fd(STDERR_FILENO); if (!is_valid_fd(STDIN_FILENO) && @@ -9,7 +33,7 @@ if (err) perror("stdin stream open"); else -@@ -1262,7 +1262,7 @@ +@@ -3408,7 +3408,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDOUT_FILENO) && @@ -18,7 +42,7 @@ if (err) perror("stdout stream open"); /* else no stdout */ -@@ -1270,7 +1270,7 @@ +@@ -3416,7 +3416,7 @@ static int _check_standard_fds(void) } if (!is_valid_fd(STDERR_FILENO) && diff --git a/lvm2/patches/mlockall-default-config.patch b/lvm2/patches/mlockall-default-config.patch index 305ddeedb..e7d685919 100644 --- a/lvm2/patches/mlockall-default-config.patch +++ b/lvm2/patches/mlockall-default-config.patch @@ -1,17 +1,21 @@ ---- ./conf/example.conf.in.orig -+++ ./conf/example.conf.in -@@ -1352,7 +1352,7 @@ - # Use the old behavior of mlockall to pin all memory. +diff --git conf/example.conf.in conf/example.conf.in +index 94f7a23fd..eeb495763 100644 +--- conf/example.conf.in ++++ conf/example.conf.in +@@ -1779,7 +1779,7 @@ activation { # Prior to version 2.02.62, LVM used mlockall() to pin the whole # process's memory while activating devices. -- use_mlockall = 0 + # This configuration option has an automatic default value. +- # use_mlockall = 0 + use_mlockall = 1 - + # Configuration option activation/monitoring. # Monitor LVs that are activated. ---- ./lib/config/defaults.h.orig -+++ ./lib/config/defaults.h -@@ -55,7 +55,7 @@ +diff --git lib/config/defaults.h lib/config/defaults.h +index 3308b1ea6..8619b9b6b 100644 +--- lib/config/defaults.h ++++ lib/config/defaults.h +@@ -66,7 +66,7 @@ #define DEFAULT_LVMLOCKD_LOCK_RETRIES 3 #define DEFAULT_LVMETAD_UPDATE_WAIT_TIME 10 #define DEFAULT_PRIORITISE_WRITE_LOCKS 1 diff --git a/lvm2/patches/static-build.patch b/lvm2/patches/static-build.patch deleted file mode 100644 index 22ef7e056..000000000 --- a/lvm2/patches/static-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/tools/Makefile.in b/tools/Makefile.in -index 2620daa17..3912f2d61 100644 ---- a/tools/Makefile.in -+++ b/tools/Makefile.in -@@ -136,7 +136,7 @@ man-generator: man-generator.o - - lvm.static: $(OBJECTS) lvm-static.o $(LVMINTERNAL_LIBS) - @echo " [CC] $@" -- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \ -+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(top_builddir)/libdm/ioctl -o $@ $+ \ - $(DMEVENT_LIBS) $(STATIC_LIBS) $(LVMLIBS) - - liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o diff --git a/lvm2/pkg.yaml b/lvm2/pkg.yaml index f3d10c184..0786daaa6 100644 --- a/lvm2/pkg.yaml +++ b/lvm2/pkg.yaml @@ -19,8 +19,6 @@ steps: patch -p0 < /pkg/patches/mallinfo.patch patch -p0 < /pkg/patches/fix-stdio-usage.patch patch -p0 < /pkg/patches/mlockall-default-config.patch - patch -p1 < /pkg/patches/disable-create_toolcontext-buffering.patch - patch -p1 < /pkg/patches/static-build.patch mkdir build cd build diff --git a/nvidia-open-gpu-kernel-modules/pkg.yaml b/nvidia-open-gpu-kernel-modules/pkg.yaml index c63a9bacf..ad8bf476c 100644 --- a/nvidia-open-gpu-kernel-modules/pkg.yaml +++ b/nvidia-open-gpu-kernel-modules/pkg.yaml @@ -29,6 +29,10 @@ steps: touch /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/modules.order /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/modules.builtin make -j $(nproc) modules_install SYSSRC=/src DEPMOD=/toolchain/bin/depmod INSTALL_MOD_PATH=/rootfs + test: + - | + # https://askubuntu.com/questions/923620/how-to-list-drivers-kernel-modules-affected-by-secureboot verify modules are signed + find /rootfs/lib/modules -name '*.ko' -exec grep -FL '~Module signature appended~' {} \+ finalize: - from: /rootfs to: / diff --git a/open-iscsi/pkg.yaml b/open-iscsi/pkg.yaml index 2765414fb..2136ff541 100644 --- a/open-iscsi/pkg.yaml +++ b/open-iscsi/pkg.yaml @@ -15,6 +15,11 @@ steps: sha512: "{{ .open_iscsi_sha512 }}" prepare: - | + mkdir -p /usr/bin \ + && ln -sf /toolchain/bin/env /usr/bin/env \ + && ln -sf /toolchain/bin/install /usr/bin/install \ + && ln -sf /toolchain/bin/sed /usr/bin/sed + tar -xzf open-iscsi.tar.gz --strip-components=1 # Create symlinks for binaries required by libtoolize. diff --git a/socat/pkg.yaml b/socat/pkg.yaml index 778b3d2da..0447215d9 100644 --- a/socat/pkg.yaml +++ b/socat/pkg.yaml @@ -14,6 +14,9 @@ steps: - | tar -xzf socat.tar.gz --strip-components=1 + # Just like Solaris, musl doesn't have getprotobynumber_r. + # Setting the configure variable to 2 ensures it isn't used. + sc_cv_getprotobynumber_r=2 \ ./configure \ --prefix=/usr build: diff --git a/u-boot/arm-trusted-firmware/patches/gcc-12-build-fix.patch b/u-boot/arm-trusted-firmware/patches/gcc-12-build-fix.patch deleted file mode 100644 index 37084723c..000000000 --- a/u-boot/arm-trusted-firmware/patches/gcc-12-build-fix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git Makefile Makefile -index 3941f8698..ad70d4b7f 100644 ---- Makefile -+++ Makefile -@@ -390,7 +390,7 @@ ifneq (${E},0) - ERRORS := -Werror - endif - --CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \ -+CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc -Wno-array-bounds \ - $(ERRORS) $(WARNINGS) - ASFLAGS += $(CPPFLAGS) $(ASFLAGS_$(ARCH)) \ - -ffreestanding -Wa,--fatal-warnings - diff --git a/u-boot/jetson_nano/patches/README.md b/u-boot/jetson_nano/patches/README.md index d9b266afb..08f233785 100644 --- a/u-boot/jetson_nano/patches/README.md +++ b/u-boot/jetson_nano/patches/README.md @@ -8,10 +8,10 @@ The diff is generated by looking at the commit history for the `patches-` branch Eg: -For the `v2022.01` release of u-boot we'd be using `patches-v2022.01` branch of the OE4T project. +For the `v2022.07` release of u-boot we'd be using `patches-v2022.07` branch of the OE4T project. The diff is generated as: -`git diff d637294e264adfeb29f390dfc393106fd4d41b17 HEAD --no-prefix` +`git diff e092e3250270a1016c877da7bdd9384f14b1321e HEAD --no-prefix` -where commit `d637294e264adfeb29f390dfc393106fd4d41b17` is the commit that started of the upstream u-boot [release](https://github.com/OE4T/u-boot-tegra/commit/d637294e264adfeb29f390dfc393106fd4d41b17). +where commit `e092e3250270a1016c877da7bdd9384f14b1321e` is the commit that started of the upstream u-boot [release](https://github.com/OE4T/u-boot-tegra/commit/e092e3250270a1016c877da7bdd9384f14b1321e). diff --git a/u-boot/jetson_nano/patches/tegra.patch b/u-boot/jetson_nano/patches/tegra.patch index 4eae0eb89..bebce71a4 100644 --- a/u-boot/jetson_nano/patches/tegra.patch +++ b/u-boot/jetson_nano/patches/tegra.patch @@ -1,8 +1,8 @@ diff --git arch/arm/dts/Makefile arch/arm/dts/Makefile -index b3e2a9c9d7..8f8dc007df 100644 +index a7e0d9f6c0..3d7e49f3df 100644 --- arch/arm/dts/Makefile +++ arch/arm/dts/Makefile -@@ -222,7 +222,9 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ +@@ -230,7 +230,9 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ tegra210-p2371-0000.dtb \ tegra210-p2371-2180.dtb \ tegra210-p2571.dtb \ @@ -10,7 +10,7 @@ index b3e2a9c9d7..8f8dc007df 100644 + tegra210-p3450-0000.dtb \ + tegra210-p3541-0000.dtb \ + tegra186-p3636-0001.dtb - + dtb-$(CONFIG_ARCH_MVEBU) += \ armada-3720-db.dtb \ diff --git arch/arm/dts/tegra186-p3636-0001.dts arch/arm/dts/tegra186-p3636-0001.dts @@ -151,12 +151,12 @@ index 649c163152..fc749e388b 100644 usb0 = "/usb@7d000000"; + usb1 = "/xusb@70090000"; }; - + memory { @@ -108,6 +109,11 @@ nvidia,vbus-gpio = <&gpio TEGRA_GPIO(CC, 4) GPIO_ACTIVE_HIGH>; }; - + + xusb@70090000 { + status = "okay"; + nvidia,vbus-gpio = <&gpio TEGRA_GPIO(CC, 5) GPIO_ACTIVE_HIGH>; @@ -166,7 +166,7 @@ index 649c163152..fc749e388b 100644 compatible = "simple-bus"; #address-cells = <1>; diff --git arch/arm/dts/tegra210-p3450-0000.dts arch/arm/dts/tegra210-p3450-0000.dts -index 9ef744ac8b..e19f5825b8 100644 +index 9ef744ac8b..119e7e8d7b 100644 --- arch/arm/dts/tegra210-p3450-0000.dts +++ arch/arm/dts/tegra210-p3450-0000.dts @@ -24,6 +24,7 @@ @@ -175,12 +175,27 @@ index 9ef744ac8b..e19f5825b8 100644 usb0 = "/usb@7d000000"; + usb1 = "/xusb@70090000"; }; - + memory { -@@ -132,6 +133,11 @@ +@@ -125,6 +126,14 @@ + spi@70410000 { + status = "okay"; + spi-max-frequency = <80000000>; ++ ++ spiflash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "mx25u3235f", "jedec,spi-nor"; ++ reg = <0>; ++ spi-max-frequency = <80000000>; ++ }; + }; + + usb@7d000000 { +@@ -132,6 +141,11 @@ dr_mode = "peripheral"; }; - + + xusb@70090000 { + status = "okay"; + nvidia,vbus-gpio = <&gpio TEGRA_GPIO(A, 6) GPIO_ACTIVE_HIGH>; @@ -361,13 +376,13 @@ index a521a43d6c..d1b5fbdfc4 100644 + }; }; diff --git arch/arm/include/asm/arch-tegra/clock.h arch/arm/include/asm/arch-tegra/clock.h -index 1d80d9e946..5f9ccc65e1 100644 +index 6586015fd2..36c6cfa7d7 100644 --- arch/arm/include/asm/arch-tegra/clock.h +++ arch/arm/include/asm/arch-tegra/clock.h @@ -372,6 +372,19 @@ enum periph_id clk_id_to_periph_id(int clk_id); */ int clock_set_rate(enum clock_id clkid, u32 n, u32 m, u32 p, u32 cpcon); - + +/** + * Adjust peripheral PLL to use the given divider and source. + * @@ -394,7 +409,7 @@ index c6d7487e62..4149242a9f 100644 PERIPH_ID_XUSB_PADCTL, - PERIPH_ID_W_RESERVED15, + PERIPH_ID_XUSB, - + /* 144 */ PERIPH_ID_W_RESERVED16, @@ -321,7 +321,7 @@ enum periph_id { @@ -412,7 +427,7 @@ index 7165d70a60..4c107ec150 100644 +++ arch/arm/mach-tegra/Makefile @@ -21,6 +21,7 @@ obj-$(CONFIG_TEGRA_PMC) += powergate.o obj-y += xusb-padctl-dummy.o - + obj-$(CONFIG_ARM64) += arm64-mmu.o cboot.o +obj-y += dt-edit.o obj-y += dt-setup.o @@ -429,16 +444,16 @@ index 532730fe72..45544e96f1 100644 + * (C) Copyright 2010-2015,2021 * NVIDIA Corporation */ - + @@ -151,8 +151,7 @@ static u32 get_odmdata(void) - + static void init_pmc_scratch(void) { - struct pmc_ctlr *const pmc = (struct pmc_ctlr *)NV_PA_PMC_BASE; - u32 odmdata; + u32 odmdata, ofs; int i; - + /* SCRATCH0 is initialized by the boot ROM and shouldn't be cleared */ @@ -160,13 +159,15 @@ static void init_pmc_scratch(void) if (!tegra_cpu_is_non_secure()) @@ -449,21 +464,21 @@ index 532730fe72..45544e96f1 100644 - writel(0, &pmc->pmc_scratch1 + i); + tegra_pmc_writel(0, ofs + (i * 4)); } - + /* ODMDATA is for kernel use to determine RAM size, LP config, etc. */ odmdata = get_odmdata(); - writel(odmdata, &pmc->pmc_scratch20); + ofs = offsetof(struct pmc_ctlr, pmc_scratch20); + tegra_pmc_writel(odmdata, ofs); } - + #ifdef CONFIG_ARMV7_SECURE_RESERVE_SIZE diff --git arch/arm/mach-tegra/cboot.c arch/arm/mach-tegra/cboot.c index 55eb819860..55c880a966 100644 --- arch/arm/mach-tegra/cboot.c +++ arch/arm/mach-tegra/cboot.c @@ -5,6 +5,9 @@ - + #include #include +#ifdef CONFIG_TEGRA210 @@ -475,7 +490,7 @@ index 55eb819860..55c880a966 100644 @@ -592,6 +595,139 @@ static char *cboot_get_bootargs(const void *fdt) return strip(args); } - + +#if defined(CONFIG_TEGRA210) +static enum env_location parse_env_drv_from_ids(const void *fdt, int offset) +{ @@ -615,7 +630,7 @@ index 55eb819860..55c880a966 100644 @@ -622,5 +758,11 @@ int cboot_late_init(void) free(bootargs); } - + +#if defined(CBOOT_RP4_LOAD) + /* T210 XUSB ONLY: get XUSB FW load address from CBoot */ + if (cboot_get_xusb_fw_addr()) @@ -625,11 +640,11 @@ index 55eb819860..55c880a966 100644 return 0; } diff --git arch/arm/mach-tegra/clock.c arch/arm/mach-tegra/clock.c -index 18c19dbf60..910047937d 100644 +index 77c8ad978e..aade00e5eb 100644 --- arch/arm/mach-tegra/clock.c +++ arch/arm/mach-tegra/clock.c @@ -406,7 +406,7 @@ static int find_best_divider(unsigned divider_bits, unsigned long parent_rate, - * @return 0 if ok, -1 on error (requesting a parent clock which is not valid + * Return: 0 if ok, -1 on error (requesting a parent clock which is not valid * for this peripheral) */ -static int adjust_periph_pll(enum periph_id periph_id, int source, @@ -1056,20 +1071,20 @@ index c11494722b..e389f06e76 100644 - * Copyright (c) 2010-2016, NVIDIA CORPORATION. + * Copyright (c) 2010-2019, NVIDIA CORPORATION. */ - + #include @@ -8,6 +8,7 @@ #include #include #include +#include "dt-edit.h" - + /* * This function is called right before the kernel is booted. "blob" is the @@ -32,6 +33,11 @@ int ft_system_setup(void *blob, struct bd_info *bd) return ret; } - + + fdt_del_env_nodelist(blob); + fdt_del_env_proplist(blob); + fdt_copy_env_nodelist(blob); @@ -1077,7 +1092,7 @@ index c11494722b..e389f06e76 100644 + return 0; } - + diff --git arch/arm/mach-tegra/tegra186/Kconfig arch/arm/mach-tegra/tegra186/Kconfig index b2e53b58ca..2639120959 100644 --- arch/arm/mach-tegra/tegra186/Kconfig @@ -1087,11 +1102,11 @@ index b2e53b58ca..2639120959 100644 +# Copyright (c) 2016-2020, NVIDIA CORPORATION. # # SPDX-License-Identifier: GPL-2.0 - + @@ -16,11 +16,21 @@ config TARGET_P2771_0000 micro-B port, Ethernet, USB3 host port, SATA, PCIe, and two GPIO expansion headers. - + +config TARGET_P3636_0001 + bool "NVIDIA Tegra186 P3636-0001 board" + select BOARD_LATE_INIT @@ -1102,13 +1117,13 @@ index b2e53b58ca..2639120959 100644 + expansion header. + endchoice - + config SYS_SOC default "tegra186" - + source "board/nvidia/p2771-0000/Kconfig" +source "board/nvidia/p3636-0001/Kconfig" - + endif diff --git arch/arm/mach-tegra/tegra210/Kconfig arch/arm/mach-tegra/tegra210/Kconfig index 17f18cbf30..b6c53f5d3b 100644 @@ -1117,7 +1132,7 @@ index 17f18cbf30..b6c53f5d3b 100644 @@ -33,6 +33,12 @@ config TARGET_P3450_0000 help P3450-0000 is a P3448 CPU board married to a P3449 I/O board. - + +config TARGET_P3541_0000 + bool "NVIDIA Jetson Nano 2GB Developer Kit" + select BOARD_LATE_INIT @@ -1125,14 +1140,14 @@ index 17f18cbf30..b6c53f5d3b 100644 + P3541-0000 is a P3448 SKU3 CVM module married to a P3542 SKU0 CVB carrier. + endchoice - + config SYS_SOC @@ -42,5 +48,6 @@ source "board/nvidia/p2371-0000/Kconfig" source "board/nvidia/p2371-2180/Kconfig" source "board/nvidia/p2571/Kconfig" source "board/nvidia/p3450-0000/Kconfig" +source "board/nvidia/p3541-0000/Kconfig" - + endif diff --git arch/arm/mach-tegra/tegra210/Makefile arch/arm/mach-tegra/tegra210/Makefile index cfcba5b68f..e6d2bd4db5 100644 @@ -1146,19 +1161,19 @@ index cfcba5b68f..e6d2bd4db5 100644 # # SPDX-License-Identifier: GPL-2.0+ @@ -7,5 +7,6 @@ - + obj-y += clock.o obj-y += funcmux.o +obj-y += rp4_support.o obj-y += xusb-padctl.o obj-y += ../xusb-padctl-common.o diff --git arch/arm/mach-tegra/tegra210/clock.c arch/arm/mach-tegra/tegra210/clock.c -index ccc64eb77b..57d477fb05 100644 +index 10c2478df7..dc6d378fd5 100644 --- arch/arm/mach-tegra/tegra210/clock.c +++ arch/arm/mach-tegra/tegra210/clock.c @@ -283,7 +283,7 @@ static enum clock_type_id clock_periph_type[PERIPHC_COUNT] = { TYPE(PERIPHC_5fh, CLOCK_TYPE_NONE), - + /* 0x60 */ - TYPE(PERIPHC_XUSB_CORE_HOST, CLOCK_TYPE_NONE), + TYPE(PERIPHC_XUSB_CORE_HOST, CLOCK_TYPE_NONE), /* start with 0x600 */ @@ -1171,7 +1186,7 @@ index ccc64eb77b..57d477fb05 100644 NONE(XUSB_PADCTL), - NONE(W_RESERVED15), + NONE(XUSB), - + /* 144 */ NONE(W_RESERVED16), @@ -548,13 +548,19 @@ static s8 periph_id_to_internal_id[PERIPH_ID_COUNT] = { @@ -1184,7 +1199,7 @@ index ccc64eb77b..57d477fb05 100644 + * but don't really correspond to any clock reset/enable bits. + * We should rework this odd relationship at some point. + */ - + /* 152 */ - NONE(W_RESERVED24), - NONE(W_RESERVED25), @@ -1208,7 +1223,7 @@ index ccc64eb77b..57d477fb05 100644 case PERIPH_ID_W_RESERVED18: @@ -1244,10 +1249,10 @@ int tegra_plle_enable(void) } - + struct periph_clk_init periph_clk_init_table[] = { - { PERIPH_ID_SBC1, CLOCK_ID_PERIPH }, - { PERIPH_ID_SBC2, CLOCK_ID_PERIPH }, @@ -1363,45 +1378,18 @@ index 0000000000..d2c6d50c24 +#define PROBE_BUF_SIZE 32768 + diff --git arch/arm/mach-tegra/xusb-padctl-common.c arch/arm/mach-tegra/xusb-padctl-common.c -index e56e27c8b6..7fd308a705 100644 +index 8bdd44ad7a..7fd308a705 100644 --- arch/arm/mach-tegra/xusb-padctl-common.c +++ arch/arm/mach-tegra/xusb-padctl-common.c -@@ -84,7 +84,7 @@ tegra_xusb_padctl_group_parse_dt(struct tegra_xusb_padctl *padctl, - - len = ofnode_read_string_count(node, "nvidia,lanes"); - if (len < 0) { -- pr_err("failed to parse \"nvidia,lanes\" property"); -+ pr_err("failed to parse \"nvidia,lanes\" property\n"); - return -EINVAL; - } - -@@ -94,7 +94,7 @@ tegra_xusb_padctl_group_parse_dt(struct tegra_xusb_padctl *padctl, - ret = ofnode_read_string_index(node, "nvidia,lanes", i, - &group->pins[i]); - if (ret) { -- pr_err("failed to read string from \"nvidia,lanes\" property"); -+ pr_err("failed to read string from \"nvidia,lanes\" property\n"); - return -EINVAL; - } - } -@@ -104,7 +104,7 @@ tegra_xusb_padctl_group_parse_dt(struct tegra_xusb_padctl *padctl, - ret = ofnode_read_string_index(node, "nvidia,function", 0, - &group->func); - if (ret) { -- pr_err("failed to parse \"nvidia,func\" property"); -+ pr_err("failed to parse \"nvidia,func\" property\n"); - return -EINVAL; - } - @@ -157,14 +157,14 @@ tegra_xusb_padctl_group_apply(struct tegra_xusb_padctl *padctl, - + lane = tegra_xusb_padctl_find_lane(padctl, group->pins[i]); if (!lane) { - pr_err("no lane for pin %s", group->pins[i]); + pr_err("no lane for pin %s\n", group->pins[i]); continue; } - + func = tegra_xusb_padctl_lane_find_function(padctl, lane, group->func); if (func < 0) { @@ -1411,7 +1399,7 @@ index e56e27c8b6..7fd308a705 100644 continue; } @@ -206,7 +206,7 @@ tegra_xusb_padctl_config_apply(struct tegra_xusb_padctl *padctl, - + err = tegra_xusb_padctl_group_apply(padctl, group); if (err < 0) { - pr_err("failed to apply group %s: %d", @@ -1419,51 +1407,24 @@ index e56e27c8b6..7fd308a705 100644 group->name, err); continue; } -@@ -232,7 +232,7 @@ tegra_xusb_padctl_config_parse_dt(struct tegra_xusb_padctl *padctl, - - err = tegra_xusb_padctl_group_parse_dt(padctl, group, subnode); - if (err < 0) { -- pr_err("failed to parse group %s", group->name); -+ pr_err("failed to parse group %s\n", group->name); - return err; - } - @@ -250,7 +250,7 @@ static int tegra_xusb_padctl_parse_dt(struct tegra_xusb_padctl *padctl, - + err = ofnode_read_resource(node, 0, &padctl->regs); if (err < 0) { - pr_err("registers not found"); + pr_err("registers not found\n"); return err; } - -@@ -261,7 +261,7 @@ static int tegra_xusb_padctl_parse_dt(struct tegra_xusb_padctl *padctl, - err = tegra_xusb_padctl_config_parse_dt(padctl, config, - subnode); - if (err < 0) { -- pr_err("failed to parse entry %s: %d", -+ pr_err("failed to parse entry %s: %d\n", - config->name, err); - continue; - } -@@ -289,7 +289,7 @@ int tegra_xusb_process_nodes(ofnode nodes[], unsigned int count, - - err = tegra_xusb_padctl_parse_dt(&padctl, nodes[i]); - if (err < 0) { -- pr_err("failed to parse DT: %d", err); -+ pr_err("failed to parse DT: %d\n", err); - continue; - } - + @@ -298,7 +298,7 @@ int tegra_xusb_process_nodes(ofnode nodes[], unsigned int count, - + err = tegra_xusb_padctl_config_apply(&padctl, &padctl.config); if (err < 0) { - pr_err("failed to apply pinmux: %d", err); + pr_err("failed to apply pinmux: %d\n", err); continue; } - + diff --git board/nvidia/p3450-0000/Kconfig board/nvidia/p3450-0000/Kconfig index 7a08cd8867..033718d232 100644 --- board/nvidia/p3450-0000/Kconfig @@ -1471,7 +1432,7 @@ index 7a08cd8867..033718d232 100644 @@ -9,4 +9,7 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "p3450-0000" - + +config P3450_EMMC + bool "SKU 2 module with eMMC" + @@ -1755,7 +1716,7 @@ index 0000000000..c3149026a5 + return 0; +} diff --git boot/pxe_utils.c boot/pxe_utils.c -index 0c24becae3..85ec21394d 100644 +index b08aee9896..eab1166ca6 100644 --- boot/pxe_utils.c +++ boot/pxe_utils.c @@ -1,7 +1,7 @@ @@ -1765,19 +1726,19 @@ index 0c24becae3..85ec21394d 100644 - * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. */ - + #include -@@ -30,6 +30,9 @@ - +@@ -31,6 +31,9 @@ + #include "menu.h" #include "cli.h" +#ifdef CONFIG_HUSH_PARSER +#include "cli_hush.h" +#endif - + #include "pxe_utils.h" - -@@ -385,17 +388,16 @@ err: + +@@ -386,17 +389,16 @@ err: */ #ifdef CONFIG_OF_LIBFDT_OVERLAY static void label_boot_fdtoverlay(struct pxe_context *ctx, @@ -1791,13 +1752,13 @@ index 0c24becae3..85ec21394d 100644 ulong fdtoverlay_addr; - ulong fdt_addr; int err; - + /* Get the main fdt and map it */ - fdt_addr = hextoul(env_get("fdt_addr_r"), NULL); working_fdt = map_sysmem(fdt_addr, 0); err = fdt_check_header(working_fdt); if (err) -@@ -503,7 +505,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) +@@ -504,7 +506,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) int len = 0; ulong kernel_addr_r; void *buf; @@ -1806,15 +1767,15 @@ index 0c24becae3..85ec21394d 100644 + ulong fdt_addr; +#endif label_print(label); - + label->attempted = 1; -@@ -521,13 +525,11 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) +@@ -522,13 +526,11 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) } - + if (label->initrd) { - ulong size; + ulong size = 0; - + if (get_relfile_envaddr(ctx, label->initrd, "ramdisk_addr_r", &size) < 0) { - printf("Skipping %s for failure retrieving initrd\n", @@ -1822,9 +1783,9 @@ index 0c24becae3..85ec21394d 100644 - return 1; + printf("initrd not found or zero, skipping ...\n"); } - + initrd_addr_str = env_get("ramdisk_addr_r"); -@@ -565,6 +567,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) +@@ -566,6 +568,10 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) if ((label->ipappend & 0x3) || label->append) { char bootargs[CONFIG_SYS_CBSIZE] = ""; char finalbootargs[CONFIG_SYS_CBSIZE]; @@ -1832,13 +1793,13 @@ index 0c24becae3..85ec21394d 100644 + char *distro_bootpart, *hush_bootpart; + char *env_devnum, *hush_devnum; +#endif - + if (strlen(label->append ?: "") + strlen(ip_str) + strlen(mac_str) + 1 > sizeof(bootargs)) { -@@ -581,10 +587,34 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) +@@ -582,10 +588,34 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) strcat(bootargs, ip_str); strcat(bootargs, mac_str); - + +#ifdef CONFIG_HUSH_PARSER + env_devnum = env_get("devnum"); + hush_devnum = get_local_var("devnum"); @@ -1862,17 +1823,28 @@ index 0c24becae3..85ec21394d 100644 env_set("bootargs", finalbootargs); printf("append: %s\n", finalbootargs); +#ifdef CONFIG_HUSH_PARSER -+ if (hush_bootpart && !distro_bootpart) -+ env_set("distro_bootpart", NULL); -+ if (hush_devnum && !env_devnum) -+ env_set("devnum", NULL); ++ if (hush_bootpart && !distro_bootpart) ++ env_set("distro_bootpart", NULL); ++ if (hush_devnum && !env_devnum) ++ env_set("devnum", NULL); +#endif } - + kernel_addr = env_get("kernel_addr_r"); -@@ -701,8 +731,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) +@@ -608,8 +638,8 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) + * It handles the following scenarios. + * + * Scenario 1: If fdt_addr_r specified and "fdt" or "fdtdir" label is +- * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r to +- * bootm, and adjust argc appropriately. ++ * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r ++ * to bootm, and adjust argc appropriately. + * + * If retrieve fails and no exact fdt blob is specified in pxe file with + * "fdt" label, try Scenario 2. +@@ -702,8 +732,9 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) label_boot_kaslrseed(); - + #ifdef CONFIG_OF_LIBFDT_OVERLAY + fdt_addr = (ulong)simple_strtol(bootm_argv[3], NULL, 16); if (label->fdtoverlays) @@ -1881,42 +1853,40 @@ index 0c24becae3..85ec21394d 100644 #endif } else { bootm_argv[3] = NULL; -@@ -727,9 +758,15 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) - if (!bootm_argv[3]) - bootm_argv[3] = env_get("fdt_addr"); - -- if (bootm_argv[3]) { -+ if (bootm_argv[3]) { /* fdt_addr exists */ +@@ -729,8 +760,14 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) + bootm_argv[3] = env_get("fdtcontroladdr"); + + if (bootm_argv[3]) { +#ifdef CONFIG_OF_LIBFDT_OVERLAY -+ fdt_addr = (ulong)simple_strtol(bootm_argv[3], NULL, 16); -+ /* apply any FDT overlays to in-RAM DTB (@ fdt_addr) */ -+ if (label->fdtoverlays) -+ label_boot_fdtoverlay(ctx, label, fdt_addr); ++ fdt_addr = (ulong)simple_strtol(bootm_argv[3], NULL, 16); ++ /* apply any FDT overlays to in-RAM DTB (@ fdt_addr) */ ++ if (label->fdtoverlays) ++ label_boot_fdtoverlay(ctx, label, fdt_addr); +#endif if (!bootm_argv[2]) - bootm_argv[2] = "-"; -+ bootm_argv[2] = "-"; /* skip initrd */ ++ bootm_argv[2] = "-"; /* skip initrd */ bootm_argc = 4; } - + diff --git cmd/mmc.c cmd/mmc.c -index 96d81ffdf3..d537273db2 100644 +index 63bf69b0bd..8309253f50 100644 --- cmd/mmc.c +++ cmd/mmc.c -@@ -151,7 +151,7 @@ static struct mmc *__init_mmc_device(int dev, bool force_init, +@@ -159,7 +159,7 @@ static struct mmc *__init_mmc_device(int dev, bool force_init, return mmc; } - + -static struct mmc *init_mmc_device(int dev, bool force_init) +struct mmc *init_mmc_device(int dev, bool force_init) { return __init_mmc_device(dev, force_init, MMC_MODES_END); } diff --git configs/p2371-0000_defconfig configs/p2371-0000_defconfig -index 38836696c0..4289c22886 100644 +index b335d851bf..7968ff6916 100644 --- configs/p2371-0000_defconfig +++ configs/p2371-0000_defconfig -@@ -2,12 +2,12 @@ CONFIG_ARM=y +@@ -3,12 +3,12 @@ CONFIG_SYS_L2CACHE_OFF=y CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_SYS_MALLOC_LEN=0x2500000 @@ -1932,16 +1902,16 @@ index 38836696c0..4289c22886 100644 CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y CONFIG_SYS_STDIO_DEREGISTER=y -@@ -48,3 +48,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 +@@ -49,3 +49,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p2371-2180_defconfig configs/p2371-2180_defconfig -index ea95943122..1d0228823f 100644 +index 5977325973..e0074418d9 100644 --- configs/p2371-2180_defconfig +++ configs/p2371-2180_defconfig -@@ -2,13 +2,13 @@ CONFIG_ARM=y +@@ -4,13 +4,13 @@ CONFIG_SYS_L2CACHE_OFF=y CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_SYS_MALLOC_LEN=0x2500000 @@ -1959,11 +1929,11 @@ index ea95943122..1d0228823f 100644 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y -@@ -55,3 +55,10 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 +@@ -57,3 +57,10 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y -+CONFIG_NVME=y ++CONFIG_NVME_PCI=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_TEGRA=y +CONFIG_USB_STORAGE=y @@ -1971,10 +1941,10 @@ index ea95943122..1d0228823f 100644 +CONFIG_CMD_CACHE=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p2571_defconfig configs/p2571_defconfig -index da33f88d83..fbcc5072d5 100644 +index d3f169ae24..e28f451de0 100644 --- configs/p2571_defconfig +++ configs/p2571_defconfig -@@ -2,9 +2,9 @@ CONFIG_ARM=y +@@ -3,9 +3,9 @@ CONFIG_SYS_L2CACHE_OFF=y CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_SYS_MALLOC_LEN=0x2500000 @@ -1986,17 +1956,17 @@ index da33f88d83..fbcc5072d5 100644 CONFIG_DEFAULT_DEVICE_TREE="tegra210-p2571" CONFIG_TEGRA210=y CONFIG_TARGET_P2571=y -@@ -49,3 +49,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 +@@ -50,3 +50,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p2771-0000-000_defconfig configs/p2771-0000-000_defconfig -index 90e9396048..e5a1249aeb 100644 +index 47be8a1c28..e836d0f606 100644 --- configs/p2771-0000-000_defconfig +++ configs/p2771-0000-000_defconfig -@@ -1,9 +1,9 @@ - CONFIG_ARM=y +@@ -3,9 +3,9 @@ CONFIG_COUNTER_FREQUENCY=19200000 + CONFIG_SYS_L2CACHE_OFF=y CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 -CONFIG_NR_DRAM_BANKS=1026 @@ -2008,20 +1978,20 @@ index 90e9396048..e5a1249aeb 100644 CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-000" CONFIG_TEGRA186=y CONFIG_SYS_LOAD_ADDR=0x80080000 -@@ -35,4 +35,6 @@ CONFIG_PCI_TEGRA=y +@@ -37,4 +37,6 @@ CONFIG_PCI_TEGRA=y CONFIG_POWER_DOMAIN=y CONFIG_TEGRA186_POWER_DOMAIN=y CONFIG_SYS_NS16550=y -CONFIG_USB=y +CONFIG_CMD_CACHE=y -+CONFIG_NVME=y ++CONFIG_NVME_PCI=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p2771-0000-500_defconfig configs/p2771-0000-500_defconfig -index 6bdc1132f6..f0b56ec4c7 100644 +index 94866cd769..47f7b9dd0c 100644 --- configs/p2771-0000-500_defconfig +++ configs/p2771-0000-500_defconfig -@@ -1,9 +1,9 @@ - CONFIG_ARM=y +@@ -3,9 +3,9 @@ CONFIG_COUNTER_FREQUENCY=19200000 + CONFIG_SYS_L2CACHE_OFF=y CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 -CONFIG_NR_DRAM_BANKS=1026 @@ -2033,19 +2003,19 @@ index 6bdc1132f6..f0b56ec4c7 100644 CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-500" CONFIG_TEGRA186=y CONFIG_SYS_LOAD_ADDR=0x80080000 -@@ -35,4 +35,6 @@ CONFIG_PCI_TEGRA=y +@@ -37,4 +37,6 @@ CONFIG_PCI_TEGRA=y CONFIG_POWER_DOMAIN=y CONFIG_TEGRA186_POWER_DOMAIN=y CONFIG_SYS_NS16550=y -CONFIG_USB=y +CONFIG_CMD_CACHE=y -+CONFIG_NVME=y ++CONFIG_NVME_PCI=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p3450-0000_defconfig configs/p3450-0000_defconfig -index 85402e9b82..815a6773ac 100644 +index ec813dd7a5..25bb3c4a98 100644 --- configs/p3450-0000_defconfig +++ configs/p3450-0000_defconfig -@@ -2,14 +2,14 @@ CONFIG_ARM=y +@@ -4,14 +4,14 @@ CONFIG_SYS_L2CACHE_OFF=y CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_SYS_MALLOC_LEN=0x2500000 @@ -2064,7 +2034,7 @@ index 85402e9b82..815a6773ac 100644 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_SETUP=y CONFIG_CONSOLE_MUX=y -@@ -58,3 +58,9 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 +@@ -61,3 +61,9 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0955 CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y @@ -2076,11 +2046,13 @@ index 85402e9b82..815a6773ac 100644 +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p3450-0002_defconfig configs/p3450-0002_defconfig new file mode 100644 -index 0000000000..595d270b73 +index 0000000000..7435868b30 --- /dev/null +++ configs/p3450-0002_defconfig -@@ -0,0 +1,66 @@ +@@ -0,0 +1,68 @@ +CONFIG_ARM=y ++CONFIG_COUNTER_FREQUENCY=19200000 ++CONFIG_SYS_L2CACHE_OFF=y +CONFIG_ARCH_TEGRA=y +CONFIG_SYS_TEXT_BASE=0x80080000 +CONFIG_SYS_MALLOC_LEN=0x2500000 @@ -2123,7 +2095,7 @@ index 0000000000..595d270b73 +CONFIG_SF_DEFAULT_SPEED=24000000 +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_RTL8169=y -+CONFIG_NVME=y ++CONFIG_NVME_PCI=y +CONFIG_PCI=y +CONFIG_PCI_TEGRA=y +CONFIG_SYS_NS16550=y @@ -2148,11 +2120,13 @@ index 0000000000..595d270b73 +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p3541-0000_defconfig configs/p3541-0000_defconfig new file mode 100644 -index 0000000000..35dda4228b +index 0000000000..08989ee92c --- /dev/null +++ configs/p3541-0000_defconfig -@@ -0,0 +1,66 @@ +@@ -0,0 +1,68 @@ +CONFIG_ARM=y ++CONFIG_COUNTER_FREQUENCY=19200000 ++CONFIG_SYS_L2CACHE_OFF=y +CONFIG_ARCH_TEGRA=y +CONFIG_SYS_TEXT_BASE=0x80080000 +CONFIG_SYS_MALLOC_LEN=0x2500000 @@ -2186,6 +2160,7 @@ index 0000000000..35dda4228b +CONFIG_ENV_OVERWRITE=y +# CONFIG_ENV_IS_IN_MMC is not set +CONFIG_ENV_IS_IN_SPI_FLASH=y ++CONFIG_ENV_SPI_MAX_HZ=48000000 +CONFIG_DFU_MMC=y +CONFIG_DFU_RAM=y +CONFIG_DFU_SF=y @@ -2195,7 +2170,6 @@ index 0000000000..35dda4228b +CONFIG_SF_DEFAULT_SPEED=24000000 +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_RTL8169=y -+CONFIG_NVME=y +CONFIG_PCI=y +CONFIG_PCI_TEGRA=y +CONFIG_SYS_NS16550=y @@ -2220,11 +2194,13 @@ index 0000000000..35dda4228b +CONFIG_OF_LIBFDT_OVERLAY=y diff --git configs/p3636-0001_defconfig configs/p3636-0001_defconfig new file mode 100644 -index 0000000000..9e90f1ff8a +index 0000000000..127670e65d --- /dev/null +++ configs/p3636-0001_defconfig -@@ -0,0 +1,41 @@ +@@ -0,0 +1,43 @@ +CONFIG_ARM=y ++CONFIG_COUNTER_FREQUENCY=19200000 ++CONFIG_SYS_L2CACHE_OFF=y +CONFIG_ARCH_TEGRA=y +CONFIG_SYS_TEXT_BASE=0x80080000 +CONFIG_ENV_SIZE=0x8000 @@ -2263,10 +2239,10 @@ index 0000000000..9e90f1ff8a +CONFIG_TEGRA186_POWER_DOMAIN=y +CONFIG_SYS_NS16550=y +CONFIG_CMD_CACHE=y -+CONFIG_NVME=y ++CONFIG_NVME_PCI=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git disk/part_efi.c disk/part_efi.c -index 0ca7effc32..e8018ecdc0 100644 +index 5090efd119..1af7f33fd5 100644 --- disk/part_efi.c +++ disk/part_efi.c @@ -57,11 +57,11 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba, @@ -2278,13 +2254,13 @@ index 0ca7effc32..e8018ecdc0 100644 +int is_pte_valid(gpt_entry * pte); +int find_valid_gpt(struct blk_desc *dev_desc, gpt_header *gpt_head, gpt_entry **pgpt_pte); - + -static char *print_efiname(gpt_entry *pte) +char *print_efiname(gpt_entry *pte) { static char name[PARTNAME_SZ + 1]; int i; -@@ -1003,7 +1003,7 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba, +@@ -1082,7 +1082,7 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba, * Description: returns 1 if found a valid gpt, 0 on error. * If valid, returns pointers to PTEs. */ @@ -2293,7 +2269,7 @@ index 0ca7effc32..e8018ecdc0 100644 gpt_entry **pgpt_pte) { int r; -@@ -1086,7 +1086,7 @@ static gpt_entry *alloc_read_gpt_entries(struct blk_desc *dev_desc, +@@ -1165,7 +1165,7 @@ static gpt_entry *alloc_read_gpt_entries(struct blk_desc *dev_desc, * * Description: returns 1 if valid, 0 on error. */ @@ -2301,7 +2277,7 @@ index 0ca7effc32..e8018ecdc0 100644 +int is_pte_valid(gpt_entry * pte) { efi_guid_t unused_guid; - + diff --git drivers/spi/tegra210_qspi.c drivers/spi/tegra210_qspi.c index 5c8c1859cc..d9dacdf5aa 100644 --- drivers/spi/tegra210_qspi.c @@ -2313,7 +2289,7 @@ index 5c8c1859cc..d9dacdf5aa 100644 - for (tm = 0; tm < QSPI_TIMEOUT; ++tm) { + for (tm = 0; tm <= QSPI_TIMEOUT; ++tm) { u32 fifo_status, xfer_status; - + xfer_status = readl(®s->xfer_status); - if (!(xfer_status & QSPI_XFER_STS_RDY)) - continue; @@ -2328,7 +2304,7 @@ index 5c8c1859cc..d9dacdf5aa 100644 + continue; + } + } - + fifo_status = readl(®s->fifo_status); if (fifo_status & QSPI_FIFO_STS_ERR) { @@ -363,7 +372,7 @@ static int tegra210_qspi_xfer(struct udevice *dev, unsigned int bitlen, @@ -2339,10 +2315,10 @@ index 5c8c1859cc..d9dacdf5aa 100644 +done: if (flags & SPI_XFER_END) spi_cs_deactivate(dev); - + @@ -371,7 +380,7 @@ static int tegra210_qspi_xfer(struct udevice *dev, unsigned int bitlen, __func__, tmpdin, readl(®s->fifo_status)); - + if (ret) { - printf("%s: timeout during SPI transfer, tm %d\n", + debug("%s: timeout during SPI transfer, tm %d\n", @@ -2350,13 +2326,13 @@ index 5c8c1859cc..d9dacdf5aa 100644 return -1; } diff --git drivers/usb/host/Kconfig drivers/usb/host/Kconfig -index ccecb5a3b0..ffa92d2262 100644 +index 8f77412cc7..e8eee364ac 100644 --- drivers/usb/host/Kconfig +++ drivers/usb/host/Kconfig @@ -114,6 +114,12 @@ config USB_XHCI_BRCM USB controller based on the Broadcom USB3 IP Core. Supports USB2/3 functionality. - + +config USB_XHCI_TEGRA + bool "Support for NVIDIA Tegra T210 on-chip XHCI USB controller" + depends on ARCH_TEGRA @@ -2364,18 +2340,18 @@ index ccecb5a3b0..ffa92d2262 100644 + Enable support for TegraT210 on-chip XHCI USB controller + endif # USB_XHCI_HCD - + config USB_EHCI_HCD diff --git drivers/usb/host/Makefile drivers/usb/host/Makefile -index eb6fe9f6b3..5a2a8feadd 100644 +index 7785b3744e..b5965d2df6 100644 --- drivers/usb/host/Makefile +++ drivers/usb/host/Makefile -@@ -56,6 +56,7 @@ obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o +@@ -59,6 +59,7 @@ obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o obj-$(CONFIG_USB_XHCI_RCAR) += xhci-rcar.o obj-$(CONFIG_USB_XHCI_STI) += dwc3-sti-glue.o obj-$(CONFIG_USB_XHCI_OCTEON) += dwc3-octeon-glue.o +obj-$(CONFIG_USB_XHCI_TEGRA) += xhci-tegra.o xhci-tegra-padctl.o tegra_xhci_fw.o - + # designware obj-$(CONFIG_USB_DWC2) += dwc2.o diff --git drivers/usb/host/tegra_xhci.h drivers/usb/host/tegra_xhci.h @@ -2768,7 +2744,7 @@ index 0000000000..a439fd9ccb + +#endif /* __TEGRA_XHCI_FW_H__ */ diff --git drivers/usb/host/xhci-mem.c drivers/usb/host/xhci-mem.c -index 0d9da62bab..a41ee5d614 100644 +index 21cd03b662..a66a6cb12f 100644 --- drivers/usb/host/xhci-mem.c +++ drivers/usb/host/xhci-mem.c @@ -66,7 +66,10 @@ void xhci_inval_cache(uintptr_t addr, u32 len) @@ -2780,11 +2756,11 @@ index 0d9da62bab..a41ee5d614 100644 free(seg->trbs); +#endif seg->trbs = NULL; - + free(seg); @@ -111,7 +114,10 @@ static void xhci_scratchpad_free(struct xhci_ctrl *ctrl) ctrl->dcbaa->dev_context_ptrs[0] = 0; - + free(xhci_bus_to_virt(ctrl, le64_to_cpu(ctrl->scratchpad->sp_array[0]))); +#ifdef CONFIG_SYS_NONCACHED_MEMORY +#else @@ -2803,7 +2779,7 @@ index 0d9da62bab..a41ee5d614 100644 +#endif free(ctx); } - + @@ -178,8 +187,12 @@ void xhci_cleanup(struct xhci_ctrl *ctrl) xhci_ring_free(ctrl->cmd_ring); xhci_scratchpad_free(ctrl); @@ -2816,11 +2792,11 @@ index 0d9da62bab..a41ee5d614 100644 +#endif memset(ctrl, '\0', sizeof(struct xhci_ctrl)); } - + @@ -194,7 +207,12 @@ static void *xhci_malloc(unsigned int size) void *ptr; size_t cacheline_size = max(XHCI_ALIGNMENT, CACHELINE_SIZE); - + +#ifdef CONFIG_SYS_NONCACHED_MEMORY + ptr = (void *)noncached_alloc(ALIGN(size, cacheline_size), + cacheline_size); @@ -2829,10 +2805,10 @@ index 0d9da62bab..a41ee5d614 100644 +#endif BUG_ON(!ptr); memset(ptr, '\0', size); - + @@ -404,8 +422,10 @@ static int xhci_scratchpad_alloc(struct xhci_ctrl *ctrl) return 0; - + fail_sp3: +#ifdef CONFIG_SYS_NONCACHED_MEMORY +#else @@ -3649,7 +3625,7 @@ index 0000000000..78903fb90b + .flags = DM_FLAG_ALLOC_PRIV_DMA, +}; diff --git drivers/usb/host/xhci.c drivers/usb/host/xhci.c -index 452dacc0af..240a77b830 100644 +index ad73ba12e2..edc2bf88ef 100644 --- drivers/usb/host/xhci.c +++ drivers/usb/host/xhci.c @@ -679,6 +679,10 @@ static int xhci_address_device(struct usb_device *udev, int root_portnr) @@ -3827,7 +3803,7 @@ index 0000000000..50c9f6950e + +#endif /* __XUSB_MACROS_H__ */ diff --git include/config_distro_bootcmd.h include/config_distro_bootcmd.h -index 3f724aa10f..2169695506 100644 +index c55023889c..3ee4732f61 100644 --- include/config_distro_bootcmd.h +++ include/config_distro_bootcmd.h @@ -201,6 +201,7 @@ @@ -3841,7 +3817,7 @@ index 3f724aa10f..2169695506 100644 @@ -266,6 +267,15 @@ BOOT_TARGET_DEVICES_references_IDE_without_CONFIG_IDE #endif - + +#ifdef CONFIG_CMD_CACHE +#define BOOTENV_RUN_DCACHE_OFF "run boot_dcache_off; " +#define BOOTENV_SHARED_DCACHE \ @@ -3871,7 +3847,7 @@ index 3f724aa10f..2169695506 100644 BOOTENV_SHARED_IDE \ BOOTENV_SHARED_UBIFS \ diff --git include/configs/p2371-2180.h include/configs/p2371-2180.h -index 5e1d50b254..fb1a82ac68 100644 +index 7f942888e7..c68c5dfb1a 100644 --- include/configs/p2371-2180.h +++ include/configs/p2371-2180.h @@ -1,6 +1,6 @@ @@ -3881,11 +3857,11 @@ index 5e1d50b254..fb1a82ac68 100644 + * (C) Copyright 2013-2020 * NVIDIA Corporation */ - + @@ -17,6 +17,15 @@ /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA - + +/* SD, eMMC, USB, NVME, PXE, DHCP */ +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ @@ -3896,10 +3872,10 @@ index 5e1d50b254..fb1a82ac68 100644 + func(DHCP, dhcp, na) + /* Environment in eMMC, at the end of 2nd "boot sector" */ - + /* SPI */ diff --git include/configs/p2771-0000.h include/configs/p2771-0000.h -index 4c3da224c6..b17d674845 100644 +index 84cdd57196..2e09b4dff1 100644 --- include/configs/p2771-0000.h +++ include/configs/p2771-0000.h @@ -1,6 +1,6 @@ @@ -3908,12 +3884,12 @@ index 4c3da224c6..b17d674845 100644 - * Copyright (c) 2013-2016, NVIDIA CORPORATION. + * Copyright (c) 2013-2020, NVIDIA CORPORATION. */ - + #ifndef _P2771_0000_H @@ -15,12 +15,20 @@ - + /* Environment in eMMC, at the end of 2nd "boot sector" */ - + +/* SD, eMMC, NVME, PXE, DHCP */ +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ @@ -3935,7 +3911,7 @@ index 4c3da224c6..b17d674845 100644 @@ -35,6 +43,30 @@ "ramdisk_addr_r_offset=00000000\0" \ "ramdisk_addr_r_size=02000000\0" - + +#ifdef CONFIG_FIT +#undef CONFIG_BOOTCOMMAND +#undef BOARD_EXTRA_ENV_SETTINGS @@ -3961,45 +3937,44 @@ index 4c3da224c6..b17d674845 100644 +#endif /* CONFIG_FIT */ + #include "tegra-common-post.h" - - /* Crystal is 38.4MHz. clk_m runs at half that rate */ + + #endif diff --git include/configs/p3450-0000.h include/configs/p3450-0000.h -index b03d3a433b..be0736c0c3 100644 +index ec1a8634e7..d032bd850b 100644 --- include/configs/p3450-0000.h +++ include/configs/p3450-0000.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * (C) Copyright 2018-2019 NVIDIA Corporation. -+ * (C) * (C) Copyright 2018-2019 NVIDIA Corporation. ++ * (C) Copyright 2018-2020 NVIDIA Corporation. */ - + #ifndef _P3450_0000_H -@@ -10,27 +10,66 @@ - +@@ -10,27 +10,67 @@ + #include "tegra210-common.h" - + -/* High-level configuration options */ -#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0000" - /* Board-specific serial config */ #define CONFIG_TEGRA_ENABLE_UARTA - + +#ifdef CONFIG_P3450_EMMC -+#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0002" ++#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0002" +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(NVME, nvme, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) -+#define CONFIG_SYS_MMC_ENV_DEV 0 -+#define CONFIG_SYS_MMC_ENV_PART 2 -+#define DEFAULT_MMC_DEV "0" ++#define CONFIG_SYS_MMC_ENV_DEV 0 ++#define CONFIG_SYS_MMC_ENV_PART 2 ++#define DEFAULT_MMC_DEV "0" +#else +/* High-level configuration options */ -+#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0000" -+ ++#define CONFIG_TEGRA_BOARD_STRING "NVIDIA P3450-0000" + /* Only MMC/PXE/DHCP for now, add USB back in later when supported */ #define BOOT_TARGET_DEVICES(func) \ @@ -4009,12 +3984,14 @@ index b03d3a433b..be0736c0c3 100644 + func(NVME, nvme, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) - + /* Environment at end of QSPI, in the VER partition */ #define CONFIG_SPI_FLASH_SIZE (4 << 20) -+#define DEFAULT_MMC_DEV "1" ++#define DEFAULT_MMC_DEV "1" +#endif + ++#define CONFIG_PREBOOT ++ +#ifdef CONFIG_FIT +#undef CONFIG_BOOTCOMMAND +/* FIT Image environment settings */ @@ -4036,7 +4013,7 @@ index b03d3a433b..be0736c0c3 100644 +#else +#define FITIMAGE_ENV_SETTINGS +#endif /* CONFIG_FIT */ - + #define BOARD_EXTRA_ENV_SETTINGS \ - "preboot=if test -e mmc 1:1 /u-boot-preboot.scr; then " \ - "load mmc 1:1 ${scriptaddr} /u-boot-preboot.scr; " \ @@ -4046,16 +4023,15 @@ index b03d3a433b..be0736c0c3 100644 - "fi\0" + "fi\0" \ + FITIMAGE_ENV_SETTINGS - - /* General networking support */ - #include "tegra-common-usb-gadget.h" + /* General networking support */ + #include "tegra-common-post.h" diff --git include/configs/p3541-0000.h include/configs/p3541-0000.h new file mode 100644 -index 0000000000..193b7da1b7 +index 0000000000..8f4228e32b --- /dev/null +++ include/configs/p3541-0000.h -@@ -0,0 +1,47 @@ +@@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2018-2019 NVIDIA Corporation. @@ -4095,20 +4071,15 @@ index 0000000000..193b7da1b7 + "source ${scriptaddr}; " \ + "fi\0" + -+/* General networking support */ -+#include "tegra-common-usb-gadget.h" +#include "tegra-common-post.h" + -+/* Crystal is 38.4MHz. clk_m runs at half that rate */ -+#define COUNTER_FREQUENCY 19200000 -+ +#endif /* _P3541_0000_H */ diff --git include/configs/p3636-0001.h include/configs/p3636-0001.h new file mode 100644 -index 0000000000..ba543be98b +index 0000000000..a41bbfb1f8 --- /dev/null +++ include/configs/p3636-0001.h -@@ -0,0 +1,51 @@ +@@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2021, NVIDIA CORPORATION. @@ -4156,9 +4127,6 @@ index 0000000000..ba543be98b + +#include "tegra-common-post.h" + -+/* Crystal is 38.4MHz. clk_m runs at half that rate */ -+#define COUNTER_FREQUENCY 19200000 -+ +#endif diff --git include/configs/tegra186-common.h include/configs/tegra186-common.h index 968501602a..c787f80988 100644 @@ -4170,7 +4138,7 @@ index 968501602a..c787f80988 100644 - * Copyright 2013-2016, NVIDIA CORPORATION. + * Copyright 2013-2021, NVIDIA CORPORATION. */ - + #ifndef _TEGRA186_COMMON_H_ @@ -44,14 +44,44 @@ * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for @@ -4216,7 +4184,7 @@ index 968501602a..c787f80988 100644 + "/trusty/status\0" + +#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ - + #endif diff --git include/configs/tegra210-common.h include/configs/tegra210-common.h index 3ba12bec0e..0cb3442f71 100644 @@ -4229,7 +4197,7 @@ index 3ba12bec0e..0cb3442f71 100644 - * NVIDIA Corporation + * Copyright (c) 2013-2021, NVIDIA CORPORATION. All rights reserved. */ - + #ifndef _TEGRA210_COMMON_H_ @@ -35,16 +34,46 @@ * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for @@ -4276,13 +4244,13 @@ index 3ba12bec0e..0cb3442f71 100644 + "/chosen/linux,initrd-end:" \ + "/serial-number:" \ + "/psci/nvidia,system-lp0-disable\0" - + /* For USB EHCI controller */ #define CONFIG_USB_EHCI_TXFIFO_THRESH 0x10 @@ -52,4 +81,6 @@ /* GPU needs setup */ #define CONFIG_TEGRA_GPU - + +#define CONFIG_SYS_BOOTM_LEN (64 << 20) /* Increase max gunzip size */ + #endif /* _TEGRA210_COMMON_H_ */ @@ -4293,11 +4261,11 @@ index bfb514e179..4c74cb77e7 100755 @@ -20,8 +20,8 @@ if ! which $dtc >/dev/null ; then exit 1 fi - + -MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1) +MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1 | tr -d v) MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2) -PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1) +PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1 | cut -d '+' -f 1) - + printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCH diff --git a/u-boot/pkg.yaml b/u-boot/pkg.yaml index 78de847f8..b51e86dd7 100644 --- a/u-boot/pkg.yaml +++ b/u-boot/pkg.yaml @@ -101,9 +101,9 @@ steps: mkdir ${ROCK_PI_4_RK3399_U_BOOT} tar -xjf u-boot.tar.bz2 --strip-components=1 -C ${ROCK_PI_4_RK3399_U_BOOT} cd ${ROCK_PI_4_RK3399_U_BOOT} - patch -p1 < /pkg/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch - patch -p1 < /pkg/rockpi4/patches/general-add-xtx-spi-nor-chips.patch - patch -p1 < /pkg/rockpi4/patches/enable-boot-from-spi-flash.patch + patch -p0 < /pkg/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch + patch -p0 < /pkg/rockpi4/patches/general-add-xtx-spi-nor-chips.patch + patch -p0 < /pkg/rockpi4/patches/enable-boot-from-spi-flash.patch make rock-pi-4-rk3399_defconfig sed -i "s/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/" .config # rock-pi-4c-rk3399 @@ -111,9 +111,9 @@ steps: mkdir ${ROCK_PI_4C_RK3399_U_BOOT} tar -xjf u-boot.tar.bz2 --strip-components=1 -C ${ROCK_PI_4C_RK3399_U_BOOT} cd ${ROCK_PI_4C_RK3399_U_BOOT} - patch -p1 < /pkg/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch - patch -p1 < /pkg/rockpi4/patches/general-add-xtx-spi-nor-chips.patch - patch -p1 < /pkg/rockpi4/patches/enable-boot-from-spi-flash.patch + patch -p0 < /pkg/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch + patch -p0 < /pkg/rockpi4/patches/general-add-xtx-spi-nor-chips.patch + patch -p0 < /pkg/rockpi4/patches/enable-boot-from-spi-flash.patch make rock-pi-4c-rk3399_defconfig sed -i "s/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/" .config # jetson nano @@ -136,19 +136,28 @@ steps: - | cd ${SUN50I_A64_ARM_TRUSTED_FIRMWARE} make realclean - make -j $(nproc) PLAT=sun50i_a64 DEBUG=0 bl31 + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6424a59e08585af7f8a56f1e16ecc6a6b9e4ad7a + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6ed8f61df3b07bb22a68a0fc189ec3b3f7b00dbd + # https://developer.trustedfirmware.org/T996 + TF_LDFLAGS=--no-warn-rwx-segments CFLAGS=--param=min-pagesize=0 make -j PLAT=sun50i_a64 DEBUG=0 bl31 # rk3328 - | cd ${RK3328_ARM_TRUSTED_FIRMWARE} make realclean - make -j $(nproc) PLAT=rk3328 DEBUG=0 bl31 + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6424a59e08585af7f8a56f1e16ecc6a6b9e4ad7a + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6ed8f61df3b07bb22a68a0fc189ec3b3f7b00dbd + # https://developer.trustedfirmware.org/T996 + TF_LDFLAGS=--no-warn-rwx-segments CFLAGS=--param=min-pagesize=0 make -j $(nproc) PLAT=rk3328 DEBUG=0 bl31 # rk3399 - | cd ${RK3399_ARM_TRUSTED_FIRMWARE} make realclean mkdir -p $(pwd)/build/rk3399/release/ cp -rf /pkg/rockpi4/m0 $(pwd)/build/rk3399/release/ - make -j $(nproc) PLAT=rk3399 DEBUG=0 bl31 + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6424a59e08585af7f8a56f1e16ecc6a6b9e4ad7a + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6ed8f61df3b07bb22a68a0fc189ec3b3f7b00dbd + # https://developer.trustedfirmware.org/T996 + TF_LDFLAGS=--no-warn-rwx-segments CFLAGS=--param=min-pagesize=0 make -j $(nproc) PLAT=rk3399 DEBUG=0 bl31 # libretech_all_h3_cc_h5 - | export BL31=$(pwd)/${SUN50I_A64_ARM_TRUSTED_FIRMWARE}/build/sun50i_a64/release/bl31.bin @@ -162,10 +171,11 @@ steps: # rpi_4_arm-trusted-firmware - | cd ${RPI_4_A64_ARM_TRUSTED_FIRMWARE} - # TODO: remove once ATF compiles fine on gcc 12 - patch -p0 < /pkg/arm-trusted-firmware/patches/gcc-12-build-fix.patch make realclean - make -j $(nproc) PLAT=rpi4 DEBUG=0 bl31 + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6424a59e08585af7f8a56f1e16ecc6a6b9e4ad7a + # https://salsa.debian.org/debian/arm-trusted-firmware/-/commit/6ed8f61df3b07bb22a68a0fc189ec3b3f7b00dbd + # https://developer.trustedfirmware.org/T996 + TF_LDFLAGS=--no-warn-rwx-segments CFLAGS=--param=min-pagesize=0 make -j $(nproc) PLAT=rpi4 DEBUG=0 bl31 # rpi_4 - | cd ${RPI_ARM64_U_BOOT} diff --git a/u-boot/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch b/u-boot/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch index dbfc9ade6..cb626f65f 100644 --- a/u-boot/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch +++ b/u-boot/rockpi4/patches/board-rock-pi-4-enable-spi-flash.patch @@ -1,10 +1,11 @@ -# https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/patch/u-boot/u-boot-rockchip64/board-rock-pi-4-enable-spi-flash.patch -diff --git a/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi b/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi -index c17e769f..30f977db 100644 ---- a/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi -+++ b/arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi -@@ -8,7 +7,27 @@ - +# copied from https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/patch/u-boot/u-boot-rockchip64/board-rock-pi-4-enable-spi-flash.patch +# and modified for u-boot v2022.07 +diff --git arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +index c17e769f64..bd8c60b4cd 100644 +--- arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi ++++ arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +@@ -8,7 +8,27 @@ + / { chosen { - u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; @@ -31,12 +32,12 @@ index c17e769f..30f977db 100644 + u-boot,dm-pre-reloc; }; }; - -diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig -index 764e2b56..11b57434 100644 ---- a/configs/rock-pi-4-rk3399_defconfig -+++ b/configs/rock-pi-4-rk3399_defconfig -@@ -2,12 +2,16 @@ CONFIG_ARM=y + +diff --git configs/rock-pi-4-rk3399_defconfig configs/rock-pi-4-rk3399_defconfig +index 80d1e63b59..5b779f85ec 100644 +--- configs/rock-pi-4-rk3399_defconfig ++++ configs/rock-pi-4-rk3399_defconfig +@@ -4,12 +4,16 @@ CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_SYS_TEXT_BASE=0x00200000 CONFIG_NR_DRAM_BANKS=1 @@ -50,10 +51,10 @@ index 764e2b56..11b57434 100644 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y + CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set - CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4b.dtb" -@@ -16,6 +20,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y +@@ -19,6 +23,7 @@ CONFIG_MISC_INIT_R=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 @@ -61,7 +62,7 @@ index 764e2b56..11b57434 100644 CONFIG_TPL=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y -@@ -26,8 +31,9 @@ CONFIG_CMD_USB=y +@@ -29,8 +34,9 @@ CONFIG_CMD_USB=y CONFIG_CMD_TIME=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" @@ -72,7 +73,7 @@ index 764e2b56..11b57434 100644 CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y -@@ -35,6 +41,10 @@ CONFIG_MMC_DW=y +@@ -39,6 +45,10 @@ CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ROCKCHIP=y @@ -83,7 +84,7 @@ index 764e2b56..11b57434 100644 CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y -@@ -50,6 +60,7 @@ CONFIG_RAM_RK3399_LPDDR4=y +@@ -54,6 +64,7 @@ CONFIG_RAM_RK3399_LPDDR4=y CONFIG_DM_RESET=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 @@ -91,11 +92,11 @@ index 764e2b56..11b57434 100644 CONFIG_SYSRESET=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y -diff --git a/configs/rock-pi-4c-rk3399_defconfig b/configs/rock-pi-4c-rk3399_defconfig -index 671c0c10..874f4061 100644 ---- a/configs/rock-pi-4c-rk3399_defconfig -+++ b/configs/rock-pi-4c-rk3399_defconfig -@@ -2,12 +2,16 @@ CONFIG_ARM=y +diff --git configs/rock-pi-4c-rk3399_defconfig configs/rock-pi-4c-rk3399_defconfig +index bda4b70dbf..f1e2d91a44 100644 +--- configs/rock-pi-4c-rk3399_defconfig ++++ configs/rock-pi-4c-rk3399_defconfig +@@ -4,12 +4,16 @@ CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_SYS_TEXT_BASE=0x00200000 CONFIG_NR_DRAM_BANKS=1 @@ -109,10 +110,10 @@ index 671c0c10..874f4061 100644 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y + CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set - CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4c.dtb" -@@ -16,6 +20,7 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y +@@ -19,6 +23,7 @@ CONFIG_MISC_INIT_R=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 @@ -120,18 +121,18 @@ index 671c0c10..874f4061 100644 CONFIG_TPL=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y -@@ -26,8 +31,9 @@ CONFIG_CMD_USB=y +@@ -29,8 +34,9 @@ CONFIG_CMD_USB=y CONFIG_CMD_TIME=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -+CONFIG_SPL_DM_SEQ_ALIAS=y +++CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y -@@ -35,6 +41,10 @@ CONFIG_MMC_DW=y +@@ -39,6 +45,10 @@ CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ROCKCHIP=y @@ -142,7 +143,7 @@ index 671c0c10..874f4061 100644 CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y -@@ -50,6 +60,7 @@ CONFIG_RAM_RK3399_LPDDR4=y +@@ -54,6 +64,7 @@ CONFIG_RAM_RK3399_LPDDR4=y CONFIG_DM_RESET=y CONFIG_BAUDRATE=1500000 CONFIG_DEBUG_UART_SHIFT=2 diff --git a/u-boot/rockpi4/patches/enable-boot-from-spi-flash.patch b/u-boot/rockpi4/patches/enable-boot-from-spi-flash.patch index ab55fd293..87f3d1294 100644 --- a/u-boot/rockpi4/patches/enable-boot-from-spi-flash.patch +++ b/u-boot/rockpi4/patches/enable-boot-from-spi-flash.patch @@ -1,14 +1,26 @@ # this patch was missing from https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/patch/u-boot/u-boot-rockchip64/board-rock-pi-4-enable-spi-flash.patch # and prevented booting from SPI -diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig -index 2889a7f3ea..f963ec6910 100644 ---- a/configs/rock-pi-4-rk3399_defconfig -+++ b/configs/rock-pi-4-rk3399_defconfig -@@ -11,6 +11,7 @@ CONFIG_ROCKCHIP_RK3399=y +diff --git configs/rock-pi-4-rk3399_defconfig configs/rock-pi-4-rk3399_defconfig +index 5b779f85ec..6717bc8af6 100644 +--- configs/rock-pi-4-rk3399_defconfig ++++ configs/rock-pi-4-rk3399_defconfig +@@ -12,6 +12,7 @@ CONFIG_ROCKCHIP_RK3399=y CONFIG_TARGET_EVB_RK3399=y CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_SPI=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y - CONFIG_DEBUG_UART=y + CONFIG_SYS_LOAD_ADDR=0x800800 +diff --git configs/rock-pi-4c-rk3399_defconfig configs/rock-pi-4c-rk3399_defconfig +index f1e2d91a44..fea29a378f 100644 +--- configs/rock-pi-4c-rk3399_defconfig ++++ configs/rock-pi-4c-rk3399_defconfig +@@ -12,6 +12,7 @@ CONFIG_ROCKCHIP_RK3399=y + CONFIG_TARGET_EVB_RK3399=y + CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 ++CONFIG_SPL_SPI=y + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI_SUPPORT=y + CONFIG_SYS_LOAD_ADDR=0x800800 diff --git a/u-boot/rockpi4/patches/general-add-xtx-spi-nor-chips.patch b/u-boot/rockpi4/patches/general-add-xtx-spi-nor-chips.patch index 561140baa..61fc96bae 100644 --- a/u-boot/rockpi4/patches/general-add-xtx-spi-nor-chips.patch +++ b/u-boot/rockpi4/patches/general-add-xtx-spi-nor-chips.patch @@ -1,34 +1,14 @@ -# https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/patch/u-boot/u-boot-rockchip64/general-add-xtx-spi-nor-chips.patch -diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig -index 018e8c59..8b0033b8 100644 ---- a/drivers/mtd/spi/Kconfig -+++ b/drivers/mtd/spi/Kconfig -@@ -152,6 +152,12 @@ config SPI_FLASH_XMC - Add support for various XMC (Wuhan Xinxin Semiconductor - Manufacturing Corp.) SPI flash chips (XM25xxx) - -+config SPI_FLASH_XTX -+ bool "XTX SPI flash support" -+ help -+ Add support for various XTX (Shenzhen Xin Tian Xia Tech) -+ SPI flash chips (XM25xxx) -+ - endif - - config SPI_FLASH_USE_4K_SECTORS -diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c -index 114ebacd..3526a20b 100644 ---- a/drivers/mtd/spi/spi-nor-ids.c -+++ b/drivers/mtd/spi/spi-nor-ids.c -@@ -319,6 +319,11 @@ const struct flash_info spi_nor_ids[] = { - /* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */ - { INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, - { INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -+#endif -+#ifdef CONFIG_SPI_FLASH_XTX -+ /* XTX (Shenzhen Xin Tian Xia Tech) */ -+ { INFO("XT25F32B", 0x0b4016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, -+ { INFO("XT25F128B", 0x0b4018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, +# copied from https://github.com/armbian/build/blob/09e416e31cc01ece4533a65f02a470a4c21b90ea/patch/u-boot/u-boot-rockchip64/general-add-xtx-spi-nor-chips.patch +# and modified for u-boot v2022.07 +diff --git drivers/mtd/spi/spi-nor-ids.c drivers/mtd/spi/spi-nor-ids.c +index 7050ddc397..1d982c8994 100644 +--- drivers/mtd/spi/spi-nor-ids.c ++++ drivers/mtd/spi/spi-nor-ids.c +@@ -387,6 +387,7 @@ const struct flash_info spi_nor_ids[] = { + #endif + #ifdef CONFIG_SPI_FLASH_XTX + /* XTX Technology (Shenzhen) Limited */ ++ { INFO("xt25f32b", 0x0b4016, 0, 64 * 1024, 64, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { INFO("xt25f128b", 0x0b4018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, #endif { }, - }; diff --git a/util-linux/pkg.yaml b/util-linux/pkg.yaml index d483229bb..9816bbb19 100644 --- a/util-linux/pkg.yaml +++ b/util-linux/pkg.yaml @@ -5,7 +5,7 @@ dependencies: - stage: base steps: - sources: - - url: https://www.kernel.org/pub/linux/utils/util-linux/v{{ .util_linux_version }}/util-linux-{{ .util_linux_version }}.tar.xz + - url: https://www.kernel.org/pub/linux/utils/util-linux/v{{ regexReplaceAll ".\\d+$" .util_linux_version "${1}" }}/util-linux-{{ .util_linux_version }}.tar.xz destination: util-linux.tar.xz sha256: "{{ .util_linux_sha256 }}" sha512: "{{ .util_linux_sha512 }}"