The current invocation doesn't work:
$ busybox dc "100" "5" / p
dc: can't open '100': No such file or directory
Fix it so that it does:
$ busybox dc -e "100 5 / p"
20
One of the messages that is printed on failure was missing
the "WARNING:" prefix. Address that too.
Signed-off-by: Andrea Bolognani <eof@kiyuko.org>
How to boot from USB drives:
1. Make sure the extcon has OTG support and included in initramfs
2. Make sure the PMIC supports the power to OTG devices, and included in initramfs. Otherwise, a hub with external power supply is required.
3. Make sure module `usb-storage` is enabled in initramfs
4. `pmbootstrap install --sdcard=/dev/<usb_drive>`
- postmarketOS/pmbootstrap@942ee20789 is required to ignore sdcard check. Thanks @ollieparanoid for the patch.
5. `pmbootstrap flasher flash_kernel`
6. Insert the USB drive to OTG and boot
[ci:skip-build]: already built successfully in CI
The postmarketos-artwork-wallpapers-gnome package no longer exists. Now
we just depend on the postmarketos-artwork-wallpapers package.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Only temporarilly. This is in pmb_recommends, so does not need pkgver
bump. We can swap them back once it's built for armv7 in alpine, but
it's now blocking all MRs from merging.
[ci:skip-vercheck]
Reading the `ifname` of a gadget that has not been configured with a UDC
succeeds with the content `(unnamed net_device)` instead of failing.
So we need to explicitly check that a UDC was configured before we read
the interface name.
Ref: #2648
[ci:skip-build]: already built successfully in CI
Reading the `ifname` of a gadget that has not been configured with a UDC
succeeds with the content `(unnamed net_device)` instead of failing.
So we need to explicitly check that a UDC was configured before we read
the interface name.
Ref: #2648
Sometimes, there can be more than 10M of stuff collected for logging,
which breaks things.. bump the size to 32M which should still be small
enough for low end / old devices.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
A bunch of override files in postmarketos-base-ui-plasma seem to have come from the plasma-mobile ui package, which probably shouldn't be on desktop and bigscreen.
With Plasma 6, a lot of the overrides are now no longer necessary for Plasma Mobile.
Situation with each file:
- 000-gschema.override - This likely was for changing maliit themes and GTK title bar layout for Plasma Mobile, maliit theming was dropped (https://github.com/maliit/keyboard/pull/108), and title bar layout is now handled within Plasma Mobile
- kdeglobals - This was for setting the look-and-feel on Plasma Mobile and default browser, it's now handled within Plasma Mobile envmanager
- kwinrc - These were settings for disabling window decorations and setting the vkbd to maliit, which is now handled in Plasma Mobile envmanager
- kscreenlockerrc - This is to autolock the screen after login (tinydm autologs in), the file was for Plasma Mobile, I don't think we want it for Desktop since SDDM is used there
Drop duplicated dependencies, which have been already included
in postmarketos-base-ui-plasma:
- dnsmasq
- elogind
- elogind-openrc
- polkit-kde-agent-1
[ci:skip-build]: already built successfully in CI
All of Plasma Bigscreen was removed from aports[1]. It will return with
KDE 6.1, according to PureTryOut. But for now, disable this package by
making it build on no architectures so that CI works again.
[1]: 4e7fa26ea2
[ci:skip-vercheck]: Version does not need to change when changin arches.
This reverts commit 518e62df34
"main/postmarketos-base-ui: add tinydm subpackage to pull in xinit (MR 4814)"
aports/tinydm now provides its own -x11 subpackage to do this since
7df6d02609
/dev/pmsg0 may be created by pstore driver. When it is available,
write logs into it so logs can be recovered through pstore after
a failed boot. This is useful for devices without console or hard
to get console.
Crappy workaround, it's better than having DNS broken...
See: https://gitlab.com/postmarketOS/pmaports/-/issues/2601
Also removed it from shellcheck, because SC doesn't like all of the
unused/unreachable things after the `exit 0`. This commit should be
reverted when the issue is actually fixed later...
[ci:skip-build] already built successfully in CI
tinydm uses startx for Xorg UIs, which is provided by the xinit package.
The xinit package used to be pulled in automatically by
the xorg-server package, but this stopped being the case with
1fd2d70696
this allows to opt-out of usb-tethering on pmOS devices with
`apk add !postmarketos-base-ui-networkmanager-usb-tethering`
this is useful for developers with laptops on pmOS / dailydriving
those laptops on pmOS.
[ci:skip-build]: Already built successfully in CI.
These apps are useful to have on the full GNOME desktop too, and this
removes the need to duplicate package lists across UI meta packages that
depend on the base gnome UI package.
Some devices take time to initialize storage, e.g. Qualcomm laptops
using ADSP need to load firmware firstly, and initramfs script does
not always manage to mount boot partition in time.
Unfortunately, there is no reliable way to reproduce the issue, but
this patch should fix cases like this.
Which replaces /lib/udev/rules.d/60-persistent-v4l.rules (from the
eudev package) with a symlink to /dev/null. Around 20 devices need
this to fix a kernel panic with downstream kernel when starting udev.
Issue happens due to that camera firmware is missing and/or not loaded
properly.
The configfs gadget can provide the actual interface name, which may not be
the default "usb0" since another gadget driver might have claimed "usb0".
This code is based on the `start_unudhcpd` function in `init_functions.sh`
[ci:skip-build] already built successfully in CI
Before this change the script assumed that the device has only one UDC.
However it is possible for a device to have multiple UDCs, in which case
the deviceinfo is the appropriate place to specify which one should be used.
This change adds an optional deviceinfo variable `deviceinfo_usb_network_udc`
to specify the UDC that should be used.
Also, before this change the script assumed the USB network interface name is
"usb0". But other gadget drivers like `g_cdc` can claim USB interfaces
before the initramfs script gets around to creating one for USB networking,
so the interface might be "usb1" or something else. The configfs gadget itself
can provide the actual interface name, so this change makes the script
use that.
In many cases, when fw is installed in /lib/firmware, some of it ends up
in the initramfs. In those situations, mkinitfs should run so that the
initramfs gets the latest fw. This will result in mkinitfs possibly
running in cases where it doesn't matter (i.e. device has fw in
/lib/firmware but none is used in the initramfs), but I think the
trade-off is worth it.
This also breaks the triggers= line into multiple lines so that it's
easier to review/maintain. We can't prepend whitespace on these lines
since the apkbuild parser expects dirs to be separated by ":"
This is a device-specific package. The only device that depends on
this, device-nokia-n900, is in community, so let's move it there too.
[ci:skip-build]: already built successfully in CI
This is a device-specific package. No need to keep it in main where it
gets included in stable releases unnecessarily. The only device that
depends on this, device-inet-a33, is in testing, so let's move it there
too.
Dependencies:
- Add dependency "xfce4-screensaver" to provide virtual keyboard at screen
unlock. As a dependency because several settings need to be implemented to
integrate it well in LXQt.
- Add dependency "setxkbmap" to make keyboard layout settings work
- Add dependency "upower" to make battery icon in panel work
Recommends:
- Add recommend "pulseaudio" to make sound work
- Add recommend "adwaita-icon-theme" because that's used by xfce4-screensaver
- Remove recommend "pavucontrol" because there is already "pavucontrol-qt"
Sources:
- Add autostart desktop file for xfce4-screensaver
- Add autostart desktop file to override lxqt-xscreensaver-autostart
- Modify autostart desktop file for onboard, a startup delay mitigates
an issue with the onboard panel icon not showing up at the first boot
- Modify lxqt-tablet.sh to include custom XDG_DATA_DIRS
- Add application desktop file to override xfce4-screensaver-preferences,
adding it to the menu
- Add application desktop file to override xscreensaver-settings, removing it
from the menu
- Change install location of "lxqt-tablet" repository configs from
/etc/skel/.config to /etc/xdg/lxqt-tablet. That way they are handled as
distribution-specific configs and are separated from the user configs in
~/.config.
- Upgrade to version 0.3 of "lxqt-tablet" repository:
- Change theme to "Dark" to fix panel look
- Increase panel size
- Change wallpaper mode to "zoom" to avoid deforming the picture
- Disable global single click to not interfere with PCManFM
- Add terminal and file manager launchers to panel
- Rename openbox xml file to apply the configs
- Set lock command to xfce4-screensaver
- Add xfconf files to configure xfce4-screensaver
- Clean up configs by removing default values
[ci:skip-build]: Already built successfully in CI.
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>
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.
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
Notification daemon; provides nice HUD for volume control and allows
Blueman to normally send notifications instead of opening separate
windows (which can get very annoying for frequently-reconnecting
devices).
There are three changes from the config source "xfce4-phone":
- Move whiskermenu settings to xfconf (required by an upstream change)
- Hide tooltips by workaround (opacity and font size)
- Increase double-click distance tolerance
And one change in postmarketOS files:
- Enable mouse key buttons on onboard keyboard by default (eases
right-clicking)
[ci:skip-build]: Already built successfully in CI.
This allows GNOME Settings to display our wallpapers. And most
remarkably, it allows people to switch back to the original wallpaper
if they ever happen to change it.
[ci:skip-build]: already built successfully in CI
Logging is important, we want our users to have logging, so make sure we
enable the new logbookd service on existing installation.
We check that we're upgrading from a postmarketos-base version that
predates logbookd and only enable the service in this case. This way we
won't enable it again for folks who disabled it manually.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
[ci:skip-vercheck]
Use logbookd to replace the busybox in-memory logger. The default
configuration of logbookd still logs in-memory but writes out the log on
shutdown or manual trigger.
The logread command is also replaced by a drop-in replacement for the
busybox tool.
The post-upgrade script in pmos-base isn't symlinked to the post-install
script, so zram-init wasn't being enabled on systems that upgraded to
the pmos-base version that intro'd this feature. I think this should
have been enabled by default on upgraded systems. There's a deviceinfo
toggle for it, so users who won't want to use this can set that var to
disable it, in that case having the service enabled is basically a
no-op.
Update by Oliver: add a comment to mention the deviceinfo variable
[ci:skip-build]: already built successfully in CI
This was a fallout from the /usr/share relocation, only found and
reported now by z3ntu. If the device package happened to be installed
later, then the link would point to the wrong location.
Fixes 1d748a93dd
Allows things like podman/docker to work out of the box.
I looked at /etc/init.d/cgroups, and having this service enabled isn't a
problem if the kernel doesn't have cgroup support... in that situation,
the service script just simply exits (success).
[ci:skip-build] already built successfully in CI
The riscv64 builder in Alpine is currently stuck, let's disable the
package for riscv64 temporarily so bpo isn't stuck on it for master. I
doubt anybody is using it on riscv64 currently.
[ci:skip-vercheck]
[ci:skip-build]: already built successfully in CI
Co-developed-by: Jakob Hauser <jahau@rocketmail.com>
Co-developed-by: Pablo Correa Gomez <ablocorrea@hotmail.com>
[ci:skip-build]: Already built successfully in CI.
As described in [0] let's switch away from RNDIS and use NCM instead.
Since we cannot force all kernels to switch at the same time, let's keep
a fallback to RNDIS in the setup function.
We can also remove usb_f_rndis from modprobe as the module gets loaded
automatically when needed, but instead we need to load libcomposite
manually so that $configfs/usb_gadget gets created.
[0] https://gitlab.com/postmarketOS/pmaports/-/issues/1797
[ci:skip-build] already built successfully in CI
Since mkinitfs / boot-deploy install sd-boot in the ESP, it makes sense
to always trigger mkinitfs when sd-boot is upgraded so that we always
boot with the latest supported version.
[ci:skip-build]: already built successfully in CI
This shows the OS version (from /etc/os-release), e.g. "edge", on the splash
screen. os-release is a tiny text file, adding it to the initramfs doesn't seem
too bad, and having this information on the splash screen can be helpful.
Note that this uses "VERSION" and not "PRETTY_NAME" from the os-release file,
since the splash already shows "postmarketOS" (and the pretty name includes
that too), it seemed redundant and took up valuable display space.
[ci:skip-build]: already built successfully in CI
Add a subpackage that sets the pmOS wallpaper, instead of always setting
the wallpaper that was added for giving GNOME Shell on Mobile a better
contrast.
Add a test for CI that:
* ensures unl0kr runs for 10 seconds without crashing
* ensures that it doesn't print any errors
This sure isn't an "ideal" test, but it at least validates that the
framebuffer interface doesn't die horribly...
With a little more effort we should be able to run unl0kr and then pull
the framebuffer and check it against some known good unl0kr screenshot.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
bootrr is a simple shell script tool for validating that a given board
has booted correctly. It checks that all expected drivers are loaded.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Enable using the postmarketOS initramfs for boot-testing devices, in
this scenario we don't care about some components like the splash, mdev,
or subpartitions, instead we want to run full udev (to load all devices)
and then run hooks. The ci hook will deadloop after running tests.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Add a helper to generate a post-install script for device pmtest
subpackages. This script configures the console and enables logging in
the initramfs for images running in CI.
[ci:ignore-count]
This package provides a helper for writing a pmtest subpackage, as well
as being a place to write generic tests that aren't specific to a device
(e.g. a suspend test).
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
[ci:ignore-count]
Add a new initramfs hook for running tests in a CI environment.
This hook automatically runs any scripts from /usr/libexec/ci-tests.
Tests should be installed as a subpackage of some other package (e.g.
qrtr) with an install_if clause to install them when this hook is
installed.
This allows platform specific packages like device packages to define
tests that will automatically be installed and executed when building
the initramfs for that device. See
device/community/device-oneplus-enchilada for an example.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Explicitly pull in the blkid package (we already added it to
00-initramfs-base.files), and replace uses of busybox findfs. Full fat
blkid supports PARTLABEL (so the /dev/disk/by-partlabel symlinks will
work consistently now), and has some nice optimisations that make the
lookup times a lot faster than busybox findfs.
[ci:skip-build]: already built successfully in CI
The "pmos_[br]oot(_uuid)?" kernel cmdline args can be used to specify
how to mount the root and boot partitions. During a previous rework, the
behaviour of these was made inconsistent (becoming dependent on the
order they were specified on the cmdline).
Undo the previous "optimisation" by splitting them back out into two
FOR loops, where the _uuid variants take precedence.
All devices that use downstream kernels should depend on this package.
We will to start with use it to fix so that lightdm+x11 work again
when using downstream kernels.
See also https://gitlab.com/postmarketOS/pmaports/-/issues/2102.
The only new thing in this version is the addition of a deprecation warning
when osk-sdl is installed in the initramfs.
Also see: https://gitlab.com/postmarketOS/pmaports/-/issues/2319
[ci:skip-build]: already built successfully in CI
EFI bootloader from systemd, with hacks to build it on Alpine/pmOS.
Cross compilation (using a meson cross file) is used for building
32-bit version on x86_64, for systems that have a 32-bit EFI. Everything
else assumes that the EFI arch matches the CPU arch.
Besides supporting all the archs we need, another major goal was to
minimize the number of changes to systemd's build system required to
build only the bootloader, so that maintaining/rebasing isn't *too*
painful...
I am adding this to the "main" category, because I don't think there's a
way to add it to Alpine. It requires cross compiling to x86 on x86_64
(to support 32-bit EFI on this arch), and Alpine doesn't support this.
It requires stuff in pmaports/cross.
--- Research notes ---
I started looking at all of this because I wanted to come up with a
single way to boot Linux via EFI, that supports all (or as many as possible)
devices in pmaports. I looked at quite a few different options, and have
some notes below about my observations and conclusions for each.
Of everything I looked at, systemd-boot was the clear winner that met
the most requirements ("pro" below) with the fewest downsides ("con"
below).
Using a Unified Kernel Image (UKI) was a close second place, however
systemd-boot can also support booting UKI images quite easily (while
also giving us more flexibility to boot other things easily too), so I
think it wins over UKI.
The capitalization (or lack thereof) of the "pro" and "con" markers
below is significant: "PRO" / "CON" are major pros or cons for each
point (e.g. a major downside that blocks using the option), and
"pro"/"con" are minor (e.g. a downside that I'm willing to overlook.)
---- Requirements ----
- Arch support:
- x86_64
- x86 (nice to have, but not sure if necessary...)
- armv7
- aarch64
- riscv64
- EFI support:
- support 32-bit EFI on x86_64 CPU (includes being able to build
32-bit .efi app on x86_64)
- Easy to configure
- Easy to maintain
- Any changes to the bootloader required to get it working in
pmOS
- Config for it
---- Evaluated options ----
------ grub ------
- (PRO) can target all required archs
- (CON) grub can't be installed in pmb chroot, it calls grub-install and
that fails due to something missing in /dev. Maybe this could be worked
around in pmb?
- (CON) grub-mkimage exe is integrated in grub package, grub-efi depends on
grub
- don't want to install all of grub just for 1 exe and/or the EFI modules
- downsides of installing all of grub is that I think it can mislead
users into thinking we use grub the "normal way". this might cause them
to have the wrong expectations and break pmOS boot on their
system
- have POC "fixing" this
- I'm not sure upstream Alpine will like this, it's ugly
- (CON) grub x86 EFI support for x86_64 is currently in pmaports, that's
pretty ugly.
- IMHO forking grub (or grub components) for this purpose signals
to me that grub is the wrong tool for this job
------- kernel's efistub -------
- (PRO) already included in the kernel, nothing else required
- (pro) initrd and dtb can be passed in the kernel cmdline...
however....
- (CON) kernel cmdline can only be set at compile time
- (con) not all kernels may have EFISTUB set?
- (con) can't do measured/secure boot
- (con) requires a fairly recent kernel on aarch w/ efi_zboot support
enabled since we compress the kernel
------- UKI -------
- (PRO) very simple, 1 file thing
- (PRO) supports adding dtb, setting kernel cmdline and so on
- (pro) can do measured/secure boot
- (CON) requires an EFI stub loader
- can't find a stub loader that meets all requirements (other than
the one from systemd-boot...)
- (con) requires efi-mkuki or dealing with objcopy directly (eww)
- (con) requires a fairly recent kernel on aarch w/ efi_zboot support
------- limine -------
- (PRO) easy to install/configure, already have boot-deploy and pmaports
patches
- (PRO) can be cross compiled easily
- evidence is in aports
- ...but I couldn't reproduce building aarch64 and riscv64 on x86_64
- (pro) can do measured/secure boot (I think?)
- (CON) doesn't target all required archs
- can't do "linux boot" on aarch64, only "chainload"
- what about using chainload everywhere?
- requires using efistub in kernel
- what about dtb= and upstream recommendation to not use it except for
debug?
- no kernel compression support on aarch64
- see efi-stub.txt kernel doc
- (CON) vendors libgcc to support cross compilation
- probably not a good idea to trust binaries produced in microsoft
github's CI for some random project
------- stubbyboot -------
- (PRO) a straight forward stub loader
- (pro) can do measured/secure boot
- (CON) doesn't target all required archs
- (CON) cross compiling doesn't work.
- gcc can't do 32-bit on x86_64 Alpine...
- gnu-efi-dev needs to be fixed to package both 32-bit and 64-bit on x86_64...
- have patch in ~/src/aports that kinda does it.. but needs to be
fixed/finished
- maybe limine-efi works with it?
- tried, but fails due to missing efilib.h in limine-efi
------- systemd-stub -------
- (PRO) another straight forward stub loader
- (PRO) many (many) people using it, as part of systemd-boot
- (pro) can do measured/secure boot
- (con) requires a fairly recent kernel on aarch w/ efi_zboot support
enabled since we compress the kernel
- (con) doesn't target all required archs
- but does claim to support most... missing armv7.. maybe it
works?
- (con) will end up maintaining some downstream patch to build it
- hopefully the patch (if I can even make a working one!) is not too
complex!
- (CON) can't be built outside of systemd's silly large build system.
- UPDATE: largely resolved this in pmaports
- was able to build for native arch!
- can't build 32-bit on x86_64, no gcc multilib support in Alpine...
Couldn't get clang to work properly, but maybe it can somehow...
- https://github.com/mintsuki/libgcc-binaries ? NO! (don't want
bootloader binaries that depend on code compiled by microsoft /
github...)
------- DIY stub / bootloader -----
- (PRO) **might** target all required archs and other meet
requirements
- (CON) lots of time required to learn, design, do, debug, test
- (CON) lots of time required to learn, design, do, debug, test
- (CON) lots of time required to learn, design, do, debug, test
- (CON) (get the hint yet???)
- (CON) written in C, probably (there's a rust EFI lib, lol...)
[ci:skip-build]: Already built successfully in CI
htc-memul needs a special build with a different scratch address set. So
generalize the build function so we can make multiple builds with
parameters without duplicating too much code.
Adjust the trigger script to only check for the new deviceinfo path. The
purpose of this check is to make sure that a full device package is
installed, and only in that case run mkinitfs. Otherwise, it will fail
because e.g. no kernels may be installed.
With recent changes, /etc/deviceinfo is a part of devicepkg-utils and
only /usr/share/deviceinfo/deviceinfo really indicates that a device
package is installed.
Remove the "exit 0" at the end while at it, it did not do anything since
the script runs with "/bin/sh -e". Add a comment to make this clear.
[ci:skip-build]: already built successfully in CI
Previously, every device package would package its own /etc/deviceinfo
file, generating a conflict with every other device package. In a
previous commit we have moved the path to /usr/share/deviceinfo, but
we still want to install a sample "/etc/deviceinfo" file to guide
users on how to use the new features. This has the additional benefit
that there is only one of those files in the whole distro. However,
there is no dependency ordering between the device packages and
devicepkg-utils, so there's no warranty of which will be installed
first. Therefore, to avoid a conflict on most likely every user
upgrade, we use postmarketos-mvcfg.
In the process, add some tests and do some renaming on the existing ones, and
remove the workaround for #2228, will be solved appropriately in a follow-up
commit.
Fixes#1836
The port 7236 for TCP is registered with IANA by the
Wi-Fi Alliance for use for the Wi-Fi Display Protocol,
a.k.a. Miracast.
To establish the connection, the local DHCP server has to
be allowed to respond to requests on peer-to-peer Wi-Fi
networks.
Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
[ci:skip-build]: already built successfully in CI
`url` and `pkgdesc` do affect the resulting package and as such
`pkgver` should be incremented, but it wasn't.
Fixes 0dfb1219f8
[ci:skip-build]: already built successfully in CI
Some change (I think some tools switching from the coreutils to busybox
versions?) subtly broke debug-shell behaviour. Try to fix it.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
[ci:skip-build]: already built successfully in CI
Hides this error when FDE is *not* enabled, and ultimately skips the
block of logic for detecting the luks partition:
/init: line 437: cryptsetup: not found
This error has confused some users in the past, who were reporting
issues with the initramfs.
There's probably a minor speedup on non-FDE systems as well from
bailing early.
If a file exists in the initramfs at runtime, cpio won't overwrite it
by default when extracting the initramfs-extra archive. This adds the -u
option to cpio, to overwrite any existing files in the destination.
This is meant to fix issues where the -extra archive has an app that is
meant to replace a busybox app, busybox --install creates it in the
initramfs and gzip will skip it since it's newer than what is in the
archive.
With full-fat mdev supporting by-partlabel lookups, there is a small
delay during startup. As mdev and dynamic partitions aren't actually
needed for the framebuffer device, move show_splash earlier.
Furthermore, slightly rework setup_framebuffer to not dump the verbose
message about waiting for the framebuffer unless the framebuffer isn't
found.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
This removes the possibility that multiple resize root partition methods
could be invoked. I'm not sure how likely this is in practice, but it
seems like we should avoid the possiblity altogether.
This also adds some more helpful printing to stdout when the partition
resize is skipped / not done.
findfs might produce a block device path like /dev/dm-3, these can
change across boots and devices. Make things more readable and
consistent by mapping from the /dev/dm-* path to the equivalent
/dev/mapper/xyz path. Combined with invoking kpartx from a
/dev/disk/by-partlabel/abc symlink, this results in the final block
device having a name like /dev/mapper/userdata2 on an Android device.
Whilst this is just nicer to work with, this will be especially useful for
the upcoming ondev2 postmarketOS installer to make device-specific
configuration and detection easier.
Save the root/boot partition paths once found, and optimise a few loops.
Additionally, fall-back to other search methods when the pmos_boot or
pmos_uuid_boot cmdline args are set but fail.
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Drop in mdev.conf and the /lib/mdev/persistent-storage script, these
cause /dev/disk/by-* to be populated in the ramdisk, making it
possible to do look up partition by-label and by-partlabel for free,
compared to findfs which can take some time.
As a first optimisation based on this, check for some partitions using
these paths and prioritise them when looking for subpartitions. Drop the
first find_boot_partition call as it doesn't really save time over the
call in the while loop.
The mdev config also handles setting up /dev/null, /dev/random, etc, so
these don't have to be done manually.
These files aren't owned by mkinitfs, or used to configure mkinitfs, so
I think it makes sense that they belong in a dir specific to this
package instead of cluttering up mkinitfs's config dirs.
Mount /dev (and /run) in initramfs so util-linux switch_root can move
the mounts over to the new sysroot before changing root.
BusyBox switch_root doesn't even attempt to move anything so use
util-linux's switch_root for this.
Explicitly disable tests too...
While a lot of Phosh development still happens on and for the Librem 5
we (thankfully) have lots of users and contributors using other devices.
Update the description to reflect that.
Ideally we'd emphasize that this is GNOME technology based and uses
wlroots but let's not make the description too long.
Instead of Purism's generic home page point the URL to phosh.mobi which
has some more details. An alternative URL would be
https://puri.sm/pureos/phosh/ but that points to a page that is a
currently a bit dated.
[ci:skip-vercheck]
[ci:skip-build] already built successfully in CI
* Don't use "cargo install", as it leads to building a second time.
* Make the build very verbose, as this package is mainly used to debug
and develop the crossdirect scripts for rust.
A welcoming application. It can be extended with custom pages which
we'll do later for a pmOS specific page, but for now it at least tells
the user a bit about Plasma
[ci:skip-vercheck]
Fix a bug where find_dtb() would fail if find encounters any errors,
even if it correctly found the dtb.
Signed-off-by: Caleb Connolly <caleb@connolly.tech>
In some cases, the dispatcher script fails if unudhcpd is already running.
Forcefully killing unudhcpd resolves the issue.
Fixes#2267.
Tested-by: Sicelo A. Mhlongo <absicsz@gmail.com>
[ci:skip-build]: already built successfully in CI
With the recent changes in commit 80fff9242, it's possible that the
client IP address is customized. Use the same code as in
init_functions.sh to get the this potentially customized IP address to
use for the nbd-client.
[ci:skip-build]: already built successfully in CI
With the recent changes in commit 80fff9242, there's no longer an $IP
variable we can use. Use the same code as in init_functions.sh to get
the potentially customized IP address to use for telnet.
The dependency xdg-desktop-portal-gnome has been reenabled in Alpine:
902360a184
> The linking issue was caused by libudev-zero being pulled in as
> dependency instead of eudev. This has been fixed in the meantime.
This reverts commit a48d4dac62.
[ci:skip-vercheck]
[ci:skip-build]: already built successfully in CI
See previous commit for rationale.
[ci:skip-vercheck]: No need to increment pkgrel when only changing
_pmb_recommends.
[ci:skip-build]: already built successfully in CI
Loupe is the new image viewer for GNOME. It also works better on phones
than Eye of GNOME and does not require any gschema overrides to fit the
narrow screens of phones.
So that old installations that run setup-timezone without "-i" do not
need to execute manual steps to get sensible timezone configurations.
See https://gitlab.com/postmarketOS/pmaports/-/issues/2168 for more context
Fixes#2168
[ci:skip-build]: already built successfully in CI
Since the modules are going to be installed into the initfs, it makes
sense to use a more verbose naming for the file. Otherwise there's the
risk of getting confused with other type of module files that exist in
device packages.
Fixes 65be0d7e81