Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Buildroot to 2022.02 #148

Closed
wants to merge 10,000 commits into from

Conversation

sfoster1
Copy link
Member

@sfoster1 sfoster1 commented Mar 24, 2022

There are a lot of changes in here! This updates buildroot to 2022.02, choosing newer versions than ours where conflicts occurred. I'm sure there's a lot more changes and definitely a lot more testing to come, but this is now a clean merge.

Major changes:

  • python 3.10 (was 3.7)
  • numpy 1.21.2 (was 1.15.1)
  • openssl instead of libressl (needed for python 3.10 ssl module)
  • systemd 250.3 (was 239)
  • wpa_supplicant 2.10 (was 2.9)
  • refactors that hopefully change nothing in uboot scripts and raspberry pi firmware build infra

Testing

Environments

All below tests should be run on the following environments:

  • Update using update-server and a build output
  • Do a fresh flash of an sd card

Tests

  • Connect to an 802.11 network using wpa2-psk
  • Connect to an 802.11 network using RADIUS
  • ssh to the dev
  • retrieve an HTTPS webpage
  • Run a protocol, especially one that connects to a module
  • Test the robot lights
  • Interact with the robot via jupyter
  • Install a python package in /var

panicking and others added 30 commits February 12, 2022 21:45
The easrc firmware is used for audio resampling. The firmware for now
exists only for imx8mn device

Signed-off-by: Michael Trimarchi <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Commit 56d9b88 forgot to add gcc >= 5
dependency to fastboot:

Makefile:591: *** libsepol is in the dependency chain of libselinux that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in.  Stop.

Fixes:
 - http://autobuild.buildroot.org/results/2430ba4afb40569ed54506201494baeebf6c5d42

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
As suggested by Peter Seiderer package util-linux doesn't need raw support
when built for host, so let's remove:
HOST_UTIL_LINUX_POST_PATCH_HOOKS += UTIL_LINUX_FIX_DISK_UTILS_COMPILE
in favor of:
HOST_UTIL_LINUX_CONF_OPTS += --disable-raw
This is a better approach than my commit:
https://git.buildroot.net/buildroot/commit/?id=d895bd973b35fde10d3dd7db530d9e4782926497

Suggested-by: Peter Seiderer <[email protected]>
Tested-by: Peter Seiderer <[email protected]>
Reviewed-by: Peter Seiderer <[email protected]>
Signed-off-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Actually genimage fails to create final image with:
```
ERROR: hdimage(disk.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition boot (offset 0x0, size 0x200)
ERROR: hdimage(disk.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
```

This is because genimage 15 is less permissive than before, so let's add
holes = {"(440; 512)"} to leave room to MBR.

The generated image is identical to the image generated by the previous
version of genimage.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/1865935249

Signed-off-by: Giulio Benetti <[email protected]>
Tested-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Changes:
* Exclude FAT partition, it is no longer needed for U-Boot.
* Switch the rootfs partition from MBR to GPT for partition-uuid to work.
* Switch to extlinux, this is convenient for debugging.
* Create common scenarios for multiple boards to create an SD image:
  board/orangepi/common. Currently only orangepi_zero makes use of the
  common infrastructure.

Signed-off-by: Sergey Kuzminov <[email protected]>
Reviewed-by: Giulio Benetti <[email protected]>
Tested-by: Giulio Benetti <[email protected]>
[Arnout: remove rootfs size = 63M and remount rw]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
…o 5.15.21 and add host openssl for linux

Fixes:
https://gitlab.com/ymorin/buildroot/-/jobs/2035821098

Signed-off-by: Giulio Benetti <[email protected]>
Tested-by: Eugen Hristev <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
…on to 5.15.21 and add host openssl for linux

Fixes:
https://gitlab.com/ymorin/buildroot/-/jobs/2035821100

Signed-off-by: Giulio Benetti <[email protected]>
Tested-by: Eugen Hristev <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
When building package guile with BR2_ENABLE_LOCALE=n
we get the following error:

```
In file included from filesys.c:95:
ports-internal.h:26:10: fatal error: iconv.h: No such file or directory
   26 | #include <iconv.h>
      |          ^~~~~~~~~
compilation terminated.
```

So let's fix it by selecting BR2_PACKAGE_LIBICONV and
adding libiconv package as dependency.

Signed-off-by: Pedro Aguilar <[email protected]>
Reviewed-by: Giulio Benetti <[email protected]>
Tested-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Select BR2_TARGET_UBOOT_NEEDS_OPENSSL to fix the following build
error:

include/image.h:1178:12: fatal error: openssl/evp.h: No such file or directory
 1178 | #  include <openssl/evp.h>
      |            ^~~~~~~~~~~~~~~

Fixes:
- https://gitlab.com/buildroot.org/buildroot/-/jobs/2076475033

Signed-off-by: Clément Péron <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
Add rng tools. Without this, when booting, prompt will not
appear until 'random: crng init done' appears.
Avoid this by using rng tools without the libjitterentropy.
Libjitterentropy is a jitter source of entropy which does
not help for AT91 cpus as the jitter does not have
enough variance to generate fast enough entropy.

Signed-off-by: Eugen Hristev <[email protected]>
Reviewed-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
…120M

Default 60M for rootfs are not enough and generate a build failure, so
let's expand rootfs size to 120M.

Fixes:
https://gitlab.com/ymorin/buildroot/-/jobs/2035821088

Signed-off-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Now that host-python2 is gone and the corresponding logic in pkg-python.

Signed-off-by: Peter Korsgaard <[email protected]>
Now that host-python2 is gone and the corresponding logic in pkg-python.

Signed-off-by: Peter Korsgaard <[email protected]>
Update indentation in hash file (two spaces)

Gregwar/fatcat@v1.1.0...v1.1.1

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
The doc-asciidoc infra allows document to define sources and resources,
and those can only be local (there is no download support for documents).
The currently documented way to specify those is to use the $(pkgdir)
macro to point to the document sources and resources when they are along
the .mk.

However, this works only for sources and not for resources.

Indeed, sources are used to generate Makefile dependency rules, so
$(pkgdir) is expanded and evaluated during the call to $(doc-asciidoc),
while resources are expanded and evaluated when the rules are executed,
which always happen after all the parsing has be done, at which point
$(pkgdir) expands to the last Makefile that was parsed, which is always
Buildroot's own manual.

This went unnoticed so far because Buildroot's manual is 1) the last to
be parsed, and 2) not using $(pkgdir) anyway.

Additionally, $(pkgdir) is mostly an internal macro, that is, as this
change demonstrates, difficult to use, and thus should not be used, in
packages or in documents.

We fix that by introducing $(FOO_DOCDIR), similar to $(FOO_PKGDIR),
which points to the document directory. We choose not to name the
variable FOO_PKGDIR, because it semantically is not a package.

As a consequence, the last argument to the doc-asciidoc macro is now
superfluous, so it is removed, which causes a little bit of churn in
the main macro. As a further consequence, the third argument in the
inner macro is no longer needed either, so it too is removed, which
causes a bit more churn yet in the inner macro.

Signed-off-by: Yann E. MORIN <[email protected]>
Cc: Frederic GARDES <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Signed-off-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Signed-off-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Martin Hicks asked to not maintain cryptsetup anymore:
https://lists.buildroot.org/pipermail/buildroot/2022-February/635413.html

Also he doesn't mantain any other package, so let's remove him from this
file.

Signed-off-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Signed-off-by: Andre Renaud <[email protected]>
[Arnout: reorder .mk so conditional parts come after unconditional, and
use += within conditions]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Signed-off-by: James Hilliard <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
This will be needed by qt5webengine.

Signed-off-by: James Hilliard <[email protected]>
[Peter: explicitly disable gif/gl/jpeg/png/tiff support]
Signed-off-by: Peter Korsgaard <[email protected]>
Webp nowadays has explicit configure options for jpeg/png/tiff, so use those
to explicitly enable/disable support.

Signed-off-by: Peter Korsgaard <[email protected]>
Webp has optional SDL support. Explicitly disable it for now.

Signed-off-by: Peter Korsgaard <[email protected]>
Fix the following build failure raised since addition of icu support in
libxml2 through commit 49d7c85:

In file included from /home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/unicode/ptypes.h:52:0,
                 from /home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/unicode/umachine.h:46,
                 from /home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/unicode/utypes.h:38,
                 from /home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/unicode/ucnv_err.h:88,
                 from /home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/unicode/ucnv.h:51,
                 from /home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/bin/../../usr/include/libxml2/libxml/encoding.h:31,
                 from /home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/bin/../../usr/include/libxml2/libxml/parser.h:812,
                 from conftest.cpp:61:
/home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/unicode/localpointer.h:224:41: error: 'noexcept' does not name a type
     LocalPointer(LocalPointer<T> &&src) U_NOEXCEPT : LocalPointerBase<T>(src.ptr) {
                                         ^
/home/peko/autobuild/instance-1/output-1/host/mips64el-buildroot-linux-gnu/sysroot/usr/include/unicode/localpointer.h:224:41: note: C++11 'noexcept' only available with -std=c++11 or -std=gnu++11

Fixes:
 - http://autobuild.buildroot.org/results/be043792e6e5501631517881b10096291a654364

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Add local patch pending upstream[1] to fix the build failure after my
suggestion[2] to imitate what I've done with libfuse[3].

[1]: https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/275?commit_id=5f71b3d63181aa88a68f7f71eab8801f2d8d2cde
[2]: https://gitlab.com/cryptsetup/cryptsetup/-/issues/709
[3]: libfuse/libfuse@3aba09a

Fixes:
http://autobuild.buildroot.net/results/bad/bad4d01fde3191e4d481a8e9dae18df3b1a94537/

Signed-off-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Building galileo_defconfig throws error:
```
/usr/bin/ld: arch/x86/tools/relocs_64.o:(.bss+0x0): multiple definition of `per_cpu_load_addr'; arch/x86/tools/relocs_32.o:(.bss+0x0): first defined here
```

To fix this let's add an upstreamed patch[1] and add BR2_GLOBAL_PATCH_DIR
to galileo_defconfig to point to where patch is.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eeeda4cd06e828b331b15741a204ff9f5874d28d.patch

Fixes:
https://gitlab.com/ymorin/buildroot/-/jobs/2035821039

Signed-off-by: Giulio Benetti <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Remove the obsolete patch as docutils is now a setuptools package.

The package also includes code licensed under BSD-3-Clause licence.
COPYING.txt has the following changes:

* copyright year
* more exceptions from the Public Domain added
* BSD-3-Clause license added
* emacs mode is GPL-3.0+ instead of just GPL-3.0
* added Python-2.0 for roman.py

The "other" license is removed since the list covers all licenses
mentioned in COPYING.txt.

Also update hash file whitespace to two spaces.

Fixes:
http://autobuild.buildroot.net/results/02dd94c09dabdbdd8b47673393577a7fd3af3aeb

Signed-off-by: Yegor Yefremov <[email protected]>
Signed-off-by: James Hilliard <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Fix the following build failure raised since the addition of fourth
patch in commit 8251d8c:

1 out of 22 hunks FAILED -- saving rejects to file CMakeLists.txt.rej

Fixes:
 - http://autobuild.buildroot.org/results/44f6d7c61316e90d22e75cb1fb77c3bc5b31ad66

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
The cmake build appears to be missing features, such as pkg-config
generation support which is needed for some packages to find re2, like
qt5webengine.

Upstream is not keen on fixing the CMake-based buildsystem [0]

Instead of patching it on our side, and then have to carry the patch
forever, we switch to the Makefile-based generic buildsystem.

Note that previously some packages like grpc failed when the generic
Makefile was used, because they would not find the cmake-equivalent
of pkg-config, but this is now fixed [1].

[0] google/re2#349
[1] grpc/grpc@45e413d

Signed-off-by: James Hilliard <[email protected]>
[Peter: Reword commit message as suggested by Yann]
Signed-off-by: Peter Korsgaard <[email protected]>
angeloc and others added 8 commits March 7, 2022 23:22
Signed-off-by: Angelo Compagnucci <[email protected]>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
…for > year 2038 support"

This reverts commit 6e33e59.

This unfortunately breaks a number of packages, as glibc errors out if 64bit
time_t is used without 64bit file offsets, and some packages undefine
_FILE_OFFSET_BITS leading to build breakage:

 #  if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
 #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
..

So revert it for 2022.02.

Signed-off-by: Peter Korsgaard <[email protected]>
Drop custom install rules which were added since commit
676797d. Indeed, they result in a
broken installation. Especially, they are trying to "guess" what must
be installed based on BR2_ARCH but oprofile has its own logic. For
example, goldmont microarchitecture files must be installed in i386
directory even if this architecture is 64 bits:
https://sourceforge.net/p/oprofile/oprofile/ci/0ad5a9e6af86a88e1dd41180f45bc48b646eba6a

This will result in the following runtime failure:

oprofile: could not open unit mask description file /usr/share/oprofile//i386/goldmont/unit_masks
Unable to find info for event cpu_clk_unhalted

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=14641

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
The default currently is to rely on the package name to decide what to
build and install if not specified by the caller. This works nice for
target packages, where a 'foo' package will by default build and
install a 'foo' executable.

However, for host packages, that will build and install a 'host-foo'
exzcutable, which is not really, even really not, what would be
expected.

We fix that by using the package raw name, i.e. the package name with
the host- prefix yanked away.

It is very improbable that there already are many host-golang packages in
the wild (in br2-external trees), but if there are, they would forcibly
define those variables to a sane value.  This change is not incompatible, as
the values provided by packages take precedence; it's just that those
packages now carry superfluous, if innocuous, variable assignments.

Signed-off-by: Yann E. MORIN <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
This is a patch release for version 2 & 2.4, fixing a regression
introduced in 2.4.1.

https://github.com/cisco/libsrtp/releases/tag/v2.4.2

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
Fix the following build failure on armv7 and sparc raised since bump to
version 3.7.1 in commit cc27267 and
rurban/safeclib@b90c52b:

In file included from perf_memcpy32_s.c:7:
perf_private.h: In function 'rdtsc':
perf_private.h:72:3: error: 'asm' undeclared (first use in this function)
   72 |   asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren));
      |   ^~~

Fixes:
 - http://autobuild.buildroot.org/results/ceb13c071b1461eb6d73f5940d6b010095127f41

Signed-off-by: Fabrice Fontaine <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
Signed-off-by: Peter Korsgaard <[email protected]>
@sfoster1 sfoster1 requested a review from a team March 24, 2022 21:40
@sfoster1 sfoster1 force-pushed the buildroot-update-2022.02 branch from 744602b to f2486f1 Compare March 25, 2022 20:08
@sfoster1 sfoster1 marked this pull request as ready for review March 25, 2022 20:14
sfoster1 added 10 commits March 28, 2022 12:27
RPI_WIFI_FIRMWARE was consolidated in
7527324 to the upstream
brcmfmca_sdio-firmware-rpi and friends.  Other rpi firmware options were
also changed around and we need to accomodate all those changes.
In 2a057339cc124bbf7c6a3e567fd57413bed3dd5d the curl binary was moved
out of its own package and into a suboption of libcurl.
The config option for setting a u-boot boot script was moved in
db2b684 to host tools implementation.
That means we need to move the config options and add host tools.
In glibc 2.35 the default locale C.UTF-8 was merged into source instead
of being an external localegen file, so it doesn't have to (and can't)
be compiled by localegen (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8)
This has a couple different config elements than 3.7; explicitly
enabling openssl lets us compile things like the ssl and hash modules.
Since we have to use openssl anyway (and openssl 1.1.1 isn't as much of
a horrorshow as it used to be) dump libressl.

Some overlays that were into 3.7 now also need to be in 3.10.
Jupyter needs to import itself and many of its dependencies during build
time which means those dependencies have to be available at build time.
Most of these used to be but got lost in the merge.
Python 3.10 contains some recent PEPs that are intended to make the C
API a little more friendly to having multiple instances in the same
process; these took the form of making the inc/decref c macros not
return lvalues anymore, which broke some extensions like pandas. Update
pandas to a recent enough version that it can handle the change.
These were incorrect because the hashes didn't get updated in the merge.
It's just too big. We can try and find a way to reenable it later, but
let's get some builds going.
@sfoster1
Copy link
Member Author

sfoster1 commented Aug 9, 2022

Superceded by #166

@sfoster1 sfoster1 closed this Aug 9, 2022
@sfoster1 sfoster1 deleted the buildroot-update-2022.02 branch August 9, 2022 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.