The Google Pixel 3a automatically appends console=null to the command
line. In the kernel, the preferred console is set to ttynull. Since
ttynull is not automatically enabled, a warning is currently emitted:
[ 0.909853] Warning: unable to open an initial console.
This also causes stdin, stdout, and stderr to be missing from the init
process.
In the busybox implementation, syslogd creates the /dev/log socket and
opens /dev/kmsg. This happens just before daemonizing, which opens
/dev/null and aliases stdin, stdout, and stderr to it. After daemonizing
and potentially closing the socket, stdin is aliased to the socket to
save stack memory. If the program starts without stdin under Linux, the
socket gains the constant STDIN_FILENO file descriptor, which is cleared
when daemonizing.
Syscalls when the 0, 1, 2 file descriptors aren't open:
socket(AF_UNIX, SOCK_DGRAM, 0) = 0
openat(AT_FDCWD, "/dev/kmsg", O_WRONLY|O_LARGEFILE) = 1
openat(AT_FDCWD, "/dev/null", O_RDWR|O_LARGEFILE) = 2
Enable the CONFIG_NULL_TTY option and update the configuration to allow
the kernel to open stdin, stdout, and stderr for the init and (by
inheritance) syslogd processes. It's technically an expert option but
isn't enabled by default (and can be enabled in config fragments).
Closes#3269
[ci:skip-build]: already built successfully in CI
The main goal of switching LightDM to slick-greeter is to ease
enabling/disabling autologin. With "lightdm-settings" installed, there
is an administration/settings GUI "Login Window" available that allows
among others to configure autologin. Contrary to its general purpose
name, it works on LightDM greeter "slick-greeter" only.
[ci:skip-build]: already built successfully in CI
Use install "-t" option, avoiding to repeat the file name and allowing to add
more than one file per command. Additionally sort the commands alphabetically
per path.
Exception is the lightdm autologin config file because it does a file renaming.
Put this command to the end.
bq27xxx_battery has a check for status flags in order to detect changes
and report to userspace. However, the cached flags are updated before
checking for changes, hence no flag-related events are ever sent. This
patch fixes this behavior, and has been sent upstream.
[ci:skip-build]: already built successfully in CI
Add a workaround so the kernel compile output is not silent (which leads
to pmbootstrap aborting the build). This will be fixed once upgrading to
linux >= 6.2.
Related: pmaports issue 1990
[ci:skip-build]: already built successfully in CI
In linux-postmarketos-qcom-msm8916 this is fixed properly thanks to a patch
from Jakob Hauser. The cmdline parameter is no longer necessary, and just
causes the display to be horizontally flipped again.
[ci:skip-build]: already built successfully in CI
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
[ci:ignore-count]: We meant to change many packages
[ci:skip-build]: already built successfully in CI
Linux 4.14.186 has no ZSTD support and is therefore too old to have full
support for our default ZRAM configuration. ZRAM will likely still work,
but fall back to the default compression method. This is not something we
can actively test or support, so drop the pmb:kconfigcheck-zram.
[ci:skip-vercheck]: no rebuild needed
Linux 3.18.14 has no ZSTD support and is therefore too old to have full
support for our default ZRAM configuration. ZRAM will likely still work,
but fall back to default compression method. This is not something we
can actively test or support, so drop the pmb:kconfigcheck-zram.
[ci:skip-vercheck]: no rebuild needed
main/postmarketos-base/rootfs-etc-conf.d-zram-init configures zstd as our
default ZRAM configuration, but the kconfigcheck only checks for LZ4 at the
moment. Because of this some of our kernels don't actually have ZSTD
support enabled and end up using the default compression algorithm.
For Linux >=4.18 we should enable CONFIG_CRYPTO_ZSTD to enable ZSTD support
for ZRAM.
In Linux >=6.12 the configuration was changed to CONFIG_ZRAM_BACKEND_ZSTD.
This requires manual edits while upgrading, otherwise only LZO support will
remain enabled.
Checking for >=3.14.0 additionally does not make any sense, because the
kconfig check should not be enabled for kernels that cannot satisfy our
minimum requirements.
Describe this properly in kconfigcheck.toml to ensure kernels are
configured correctly.
The following kernels are currently missing the correct options:
config-htc-flounder.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-postmarketos-amlogic.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-postmarketos-grate.armv7: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-postmarketos-qcom-msm8974.armv7: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-postmarketos-qcom-sc7280.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-postmarketos-qcom-sm6115.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-postmarketos-qcom-sm6350.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-purism-librem5.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
The following kernels are too old to support CONFIG_CRYPTO_ZSTD:
config-samsung-jxelte.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
config-volla-mimameid.aarch64: CONFIG_CRYPTO_ZSTD should be set (category:zram)
Many parts of the Linux desktop (apps, tools, scripts, etc) all expect
xdg-open and friends to be installed.
Since these utilities are tiny and (usually) ubiquitous, let's make sure
our UIs all depend on them.
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
We haven't had kernels in main/ for soon three years[1], so no need
to bother checking this location.
[1]: See commits 47d8f823..8f24fe3a
[ci:skip-build]: already built successfully in CI
Add qbootctl as dependency msm-firmware-loader needs it
for A/B devices like xiaomi-daisy and xiaomi-tissot.
[ci:skip-build]: already built successfully in CI
init_functions.sh makes use of the mass_storage and acm USB gadget
functions for error reporting, but the necessary kernel modules are not
included in the initramfs at the moment. Because of this, the functionality
works only on kernels where all these USB gadget functions are built-in and
not built as modules.
Add the missing modules and fix the sort order while at it.
[ci:skip-build]: bug in CI prevents build testing armv7, succeeded locally