Il 01/05/24 19:05, Michael ha scritto:
I've built the cross toolchain with 'crossdev --taget
aarch64-unknown-linux-gnu' per wiki [2]. I've selected a 23.0-split-usr
profile on the Pi since this is the one supported by the crossdev (or so
I understood from the error message when I tried with the non-split-usr
profile on the desktop).
Did you download the correct stage3?  There are split-usr and merged-usr tar
archives.  Since split-usr is or will be soon deprecated you better start with
merged-usr.
I wasn't clear: when I tried to select the merged-usr profile on the host and on the target I got an error invoking emerge-aarch64-unknown-linux-gnu on the _host_  telling me that the profile was 'merged-usr' but the directory layout wasn't. So the problem is in the directory layout created by crossdev on the host.The host has a merged-usr profile, I believe the problem is in crossdev itself. I tried to manually copy files in the crossdev environment to recreate the merged-usr layout but then the error on the host was even worse (I forgot what it was) so I went back to split.
The crossdev environment on the desktop knows nothing about the packages
installed on the Pi, so I copied /var/db/pkg from Pi to
/usr/aarch64-unknown-linux-gnu/var/db/pkg on the desktop. I ran emerge
--sync on the Pi and on the desktop approximatively at the same time.

==== Now If I try a @system update on the Pi I get: ====

pihole ~ # emerge -uDvN --ask @system
Why didn't you try '--usepkg y', or '--usepkgonly y' to emerge the precompiled
binaries on the pi?
That is the intention, after I'll manage to set up a workflow to crossbuild binary packages on the host :-)
==== What am I missing to make the desktop use the same list of packages
to be upgraded as the Pi? ====

thanks,

raffaele

[1] https://pi-hole.net/
[2] https://wiki.gentoo.org/wiki/Crossdev
Check the selected make.profile and the stage3 fs are the same on both
buildhost and guest.  Also diff the two /var/lib/portage/world and don't
forget to compare/grep for different USE flags between the two systems.
/etc/portage/make.conf on the pi and in /usr/aarch64-unknown-linux-gnu/etc/portage/make.conf on the host are almost identical except for host-only feature (e.g. buildpkg is only specified on the host side) and number of emerge jobs.
Finally, if nothing works as intended consider compiling in QEMU:

https://wiki.gentoo.org/wiki/Embedded_Handbook/General/
Compiling_with_QEMU_user_chroot

For the moment I am trying a different approach: create a list of packages to be updated on the pi and use it as input to the emerge-aarch64-unknown-linux-gnu command on the host.

Wow, even an emerge --sync takes forever on the pi, I was no longer used to such long delays!

raffaele


Reply via email to