Currently, when postmarketOS fails to boot up, retrieving any
information necessary to root cause the issue is non-trivial, requiring
building a custom initramfs with debug-shell enabled and then manually
copying out data.
Let's improve the situation by exporting logs automatically on boot
failure. This is safer than just exposing a root shell but still
provides a whole lot of useful info that should make duplicating and
triaging issues much easier for developers.
This commit implements the functionality and includes some generally
useful data. We then generate a README and expose files for each command/log
as well as an archive that can be easily attached to a GitLab issue.
To help with triaging, also record the version of the postmarketos-initramfs
package and hash the init.sh and init_functions.sh files.
For testing purposes, you can trigger the log recovery mode on-time by
creating an empty file named ".pmos_export_logs" in the /boot partition.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Always write logs to the ramdisk, adjust setup_log() to spawn "tail" to
pipe the log to the console device when PMOS_NO_OUTPUT_REDIRECT is set.
This is necessary to ensure that the initramfs logs can be extracted on
a failed boot.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
In preparation of new sdm660-mainline kernel release all
downstream ports will become irrelevant.
If needed, downstream port can still be chosen as
'xiaomi-lavender-downstream' during pmbootstrap init.
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
[ci:skip-build]: already built successfully in CI
non-free firmware not (yet?) submitted to linux-firmware, this is pulled
directly from the latest versions distributed by lenovo, instead of some
probably outdated repo distributed by random folks.
The bt firmware here fixes an issue where the bt range on the 21bx is
extremely poor (like ~1 meter or less)
linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section-xz-supplementation.patch
contains an addition that was not part of
linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
simply because error did not occur with the config I tested with.
[ci:skip-build]: already built successfully in CI
Upgrade to upstrem version 3.24.37-2pureos4.
Apply an explicit list of patches from the PureOS upstream sources.
These upstream patches were skipped in the previous version and are now
applied:
pureos/adaptive/Add-the-view-sidebar-symbolic-icon.patch
pureos/events-Compress-touch-update-events.patch
Remove upstreamed gdk-wayland-Track-last-touch-serial-on-seat.patch.
Add a fixed version of 'Port file chooser to phones' patch:
https://source.puri.sm/Librem5/debs/gtk/-/blob/pureos/byzantium/debian/patches/pureos/adaptive/Port-file-chooser-to-phones.patch
The original did not apply cleanly and was disabled by PureOS upstream:
f7dfd6e7b6
[ci:skip-build] already built successfully in CI
This device package is intended to replace the tablet-x*uefi device
packages. It was made by basically merging config from those two
packages.
One important change (besides the name, covered later) is that it
replaces grub-efi with sd-boot for these devices.
The pkgver is starting at '8' to get ahead of the packages this is meant
to replace.
Because package names, especially for device packages(!), is important,
here's a long explanation of why the name is "device-generic-x86_64":
"uefi" was excluded from the device package name, because it should (in
theory at least...) be able to simultaneously support EFI and non-EFI
boot in 1 device package. The device-qemu-amd64 package kiiiinda does
this already and could be a useful example for how to do that, though in
this situation we'd need to support syslinux for legacy boot instead of
what qemu does (bypass installed bootloader and directly boot the
kernel). In other words, the packages this one is meant to replace only
support EFI boot, they currently don't support legacy boot. So IF we
need to support legacy boot in the future and IF there's no way to
support both in one package, THEN we can consider changing the name of
this one or calling the other "-legacy" or something.
"x86_64" instead of "amd64" (like the device-qemu-amd64 device package),
because "x86_64" is what Alpine uses to refer to this arch, and it
doesn't have a hw vendor name baked into it.
"tablet" was dropped from the name, because there are many other x86_64 devices
out there that people might want to install pmOS. For example, it might be
confusing if you want to install pmOS on an x86_64 toaster but best
pmOS image for it is named "device-tablet-..."
* Check for space indentation instead of tabs
* Check that an entry actually exists
* Check that a directory ends in a slash, otherwise GitLab seems to
ignore it
This was enabled in the "default" runlevel during upgrades, which is an
error, since it depends on bootmisc, which is in "boot" runlevel
Fixes#2473
[ci:skip-build]: Already built successfully in CI.
This replaces the outdated blobs extracted from Android vendor partitions with more recent firmware provided in the linux-firmware-brcm package.
[ci:skip-build]: Already built successfully in CI.
Add the Portugese/Spanish keymap. Similarly to the Finnish/Swedish
keymap, it's compatible with both Portugese and Spanish keyboards.
Also, modify x11-keymap so that the Portugese/Spanish map will use
Alt+Shift to enter an underscore in the F key and a backslash in the C
key, which was done to avoid redundancy with the "Ñ" key.
Signed-off-by: Lux Aliaga <lux@nixgoat.me
[ci:skip-build] already built successfully in CI
And enable it by default, since it's a sensible thing to do.
This makes the bootmisc config file unnecessary, since it was only
used before to make sure that /tmp was wiped on every boot.
Mounting /tmp as a tmpfs will be skipped if:
* The user or maintainer configured deviceinfo_tmp_as_tmpfs_size=0
* If they didn't but the device has less than 2GB of RAM
* And in any case, if it is already mounted, to respect users that
might have it in /etc/fstab
The options for mounting /tmp has been copied from my local debian
tmp.mount service. The only real difference is that we are mounting it
after /etc/fstab, and they do so before.
Fixes#2233