oem-* packages put fw into the initramfs, which allows for display/gpu
to work properly early during boot. On x64cros, there's not enough space
in the boot partition to hold gpu firmware so this patch duplicates some
things from oem-* packages in order to put the fw into initramfs-extra
[ci:skip-build]: already built successfully in CI
Split the post-install scripts for the main package and the openrc subpackage.
They act on different things.
[ci:skip-build]: already built successfully in CI
This is a stylistic change only.
Generated by this program, which takes care to treat '_' and '-' as the
same character for the purpose of sorting:
perl -e 'print sort {($a =~ s/_/-/r) cmp ($b =~ s/_/-/r)} <>' modules-initfs | uniq | sponge modules-initfs
Add configs to get the PinePhone to boot and some functionality such as
wifi. A number of components, including the modem, sound, and usb, don't
yet work without patches, so are left out here.
Fixes a bug where the kernel thinks the boot partition is still mounted
and it's unavailable for mounting in the rootfs
If you look at what the initramfs was doing before !5635, it was
explicitly umounting the boot partition from /boot in the initramfs and
then mounting it under /boot in the rootfs:
c45d7ec0a5/main/postmarketos-initramfs/init.sh (L87)
With this patch, we're now back to umounting /boot in the initramfs.
The second part of that original logic is now handled elsewhere now, and
that seems to be working OK.
The bug was reported here:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3279#note_454346
[ci:skip-build]: already built successfully in CI
This module is necessary for cpu frequency scaling on Qualcomm
platforms, let's make it available earlier so we have cpu frequency
scaling up sooner.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
importing all udev rules doesn't make sense here. Only add the needed
ones.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
[ci:ignore-count]
[ci:skip-build]: already built successfully in CI
make the logging nicer and remove some irrelevant errors.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Note: this includes a breaking change in pmaports if pmos-initramfs isn't changed to support merging the initramfs+initramfs-extra. Do not cherry-pick without the required initramfs changes!
Drop the fork, nothing depends on it and we can use the new multi-stage
initramfs instead
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:ignore-count]
[ci:skip-vercheck]
Make use of the new multi-stage initramfs rather than the minimal
variant, and inform mkinitfs that the initramfs-extra archive should be
created to save space.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:ignore-count]
We previously forked the initramfs into a minimal variant for highly
space constrained devices, to allow the normal variant to gain
additional functionality like the debug-shell (With OSK). Initially the
hope was that only a handful of devices would need the minimal variant,
but in practise this has not been the case.
Trying to maintain two diverging forks of the initramfs is absoutely
unsustainable and (to be frank) a bit silly.
Based on discussion with craftyguy and newbyte, let's re-architect the
initramfs to run in two stages, with the second stage being part of
initramfs-extra. By itself this doesn't make a lot of sense, since
requiring the boot partition be mounted for the debug-shell to be useful
is a major downgrade.
However this can be used in tandem with pending support for a new
deviceinfo_create_initfs_extra variable, this is default false in
mkinitfs which finally gets rid of initramfs-extra entirely for devices
that don't need it.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
We need to use ls to check if the hooks dir contains any hooks
(otherwise the wildcard doesn't work). But ls prints an error if the dir
is missing or empty. Hide the error to not pollute the log.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This was only added recently, is likely not used by anyone, and
introduces hard to resolve dependencies on /boot being mounted which we
may not want in the future.
Remove it to drop some complexity.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Alpine's abuild runs build() without fakeroot, and package() with
fakeroot. From the APKBUILD reference page in the Alpine wiki:
> Note: Building in fakeroot will reduce performance for parallel
> builds dramatically. It is for this reason that we split the build
> and package process into two separate functions.
Every now and then we see a package that tries to run a compiler (gcc,
g++, clang, ...) during package() in the APKBUILD. This is a bug in the
APKBUILD / build system of the program we are packaging. All compiling
should be done during build().
Let crossdirect print the following when this happens:
============================================================================================
ERROR: crossdirect was called with: LD_PRELOAD=libfakeroot.so
This means your package tried to run a compiler during package().
This is not supported by crossdirect, and usually not a good idea.
* Try to fix your APKBUILD so it does not run the compiler during package(), only in build()
* If you're using meson install, try to add '--no-rebuild'
* If this is not possible, you can work around it by setting options="!pmb:crossdirect"
(compilation will be slower!)
============================================================================================
Instead of:
ERROR: crossdirect: can't handle LD_PRELOAD: libfakeroot.so
Please report this at: https://gitlab.com/postmarketOS/pmaports/issues
As a workaround, you can compile without crossdirect.
In the past I've also tried to add 'strcmp(ldPreload, "libfakeroot.so") == 0'
(pmaports MR 2231), and today I made the same patch. The current code
looks like it would then work by just using libfakeroot.so from the
native chroot, but it does not work. And as mentioned, if we hit this
then we are compiling in package() which is something we should not do
anyway!
Fixes: pmb issue 2039
Related: pma issue 2351, pma MR 5738
Follow up to MR 5562, which introduced category:librem5. Add the related
option, so CI actually enforces this category for the Librem 5.
[ci:skip-vercheck]: no need to rebuild for this
pmbootstrap used to exit with 0 if "pmbootstrap lint" failed. This was
the case in 2.3.x too, but I assumed this was a regression and fixed it
recently in pmbootstrap MR 2398.
It turns out that the CI code relied on this assumption, it captured the
output of "pmbootstrap lint", and only after it is done it checks if the
output wasn't empty and prints it in that case followed by exit 1.
Now that pmbootstrap actually exits with 1, CI already fails at
"common.run_pmbootstrap" and doesn't get to the part where it would be
printed.
I think "exit 1" on error is actually the right thing to do in
pmbootstrap, so I'll leave that in. Adjust CI to just run "pmbootstrap
lint", removing the additional output capture logic that isn't used
anywhere besides here. This also has the advantage that we get the
output "live", without buffering it completely first.
Qemu by default starts a GTK window in VGA resolution 640x480. The content
adapts to this resolution, thus X11 shows up in resolution 640x480 as well.
This resolution causes some handling issues. In Xfce4 the shutdown button of
the menu isn't reachable. Even worse in MATE, where the "Apply" button for
changing the resolution is out of the screen, making it difficult to change
the resolution.
The default resolution for X11 can be set by a config file. The Qemu GTK
window resolution remains independently at default 640x480. Setting the X11
resolution to default 800x600 mitigates the issue: Most of the screen content
becomes accessible while font size and button sizes are still large enough.
From this point the user can adjust the resolutions of the Qemu GTK window
and X11 content as desired.
[ci:skip-build]: already built successfully in CI
This adds the wlr and GTK portal backends so that apps using portals will work OOTB.
The GTK backend is added because the wlr backend does not provide some essential portals, e.g. for camera
[ci:skip-build]: already built successfully in CI
This reverts 622140965c, which basically broke installkenrel because
the kernel build system is hardcoded to look for installkernel in /
sbin/installkernel.
We'll have to move then once usr merge is complete and the symlink is
created for /sbin
[ci:skip-build]: already built successfully in CI
Some kconfig changes to reduce kernel size to avoid conflict of 0x8000
(kernel load address) + uncompressed kernel size (arch/arm/boot/Image) +
compressed kernel size (arch/arm/boot/zImage) being bigger than
0x1e00000 (tags address).
This causes mostly silent boot failures, with CONFIG_DEBUG_LL messages
such as "no ATAGS support: can't continue" or "Error: invalid dtb and
unrecognized/unsupported machine ID" can be seen on UART, though they're
not very clear that the kernel image is essentially too big for what lk
is setting up.
Manual kconfig changes:
* Convert some =y to =m to reduce kernel size, mostly NFS_FS and CIFS
since those are quite big and there's no point in having them
built-in.
* Disable EXT2_FS & EXT3_FS - handled by EXT4 driver
* Disable PCI - unused
[ci:skip-build]: already built successfully in CI
Update the bot email address, and don't enable the script for local CI
since it relies on protected GitLab CI variables. This could be fixed in
the future by safely handling these not being available.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Per the flatpak manpage, repos can be configured OOTB by dropping config under /etc/flatpak/remotes.d. Using the install script requires doing stuff over the internet, which may not always work at image build time. By using the drop-in file, we avoid having to connect to flathub.
The manpage only mentions /etc/flatpak, and nothing about /usr ...
Quite a messy upgrade due to changes in both abuild and in the upstream
gcc APKBUILD breaking various things. Pmbootstrap also seems to
misbehave in GitLab CI making it difficult to validate.
Manual fixups:
* Set !tracedeps - changed behavior in abuild
* Manually add "so:" dependencies to avoid issues with !tracedeps set
(becomes obvious with crossdirect)
* Add back makedepends="$makedepends_build $makedepends_host"
* Disable move of some files into usr/lib to avoid
ERROR: gcc-aarch64-14.2.0-r4: trying to overwrite usr/lib/libgcc_s.so.1 owned by libgcc-14.2.0-r4.
[ci:skip-build] # pmbootstrap bugs will prohibit this from building
# anyways, don't even attempt
Co-developed-by: Luca Weiss <luca@lucaweiss.eu>
And re-enable riscv64 as the latest commits have added
support for riscv64.
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
[ci:skip-build]: already built successfully in CI