Remove the "pmOS_deleteme" partition left behind by the on-device
installer, if it exists. Let the existing resize_root_partition() extend
the root partition over the newly gained space (and rest of the storage
device) right afterwards.
Mount the boot partition at /sysroot/boot and keep it mounted, when
running the switch_root command. This way, OpenRC doesn't need to mount
it and possibly use the wrong partition. The OpenRC service does not use
the same logic to find the boot partition, in particular it does not
support the pmos_boot kernel parameter.
While at it, print the mountpoint and read-only/read-write arguments in
the mounting log message for both root and boot.
Fixes: #664
If (a) the kernel command line parameters include PMOS_BOOTCHART2 and
(b) /sbin/bootchartd exists (i.e., the bootchart2 package has been
installed), run /sbin/bootchartd instead of /sbin/init.
The initramfs needs ext4 (to mount the rootfs) and usb_f_rndis
(to enable USB networking on devices that use USB configfs).
If these are built as modules, they need to be included in initramfs.
[ci:skip-build]: already built successfully in CI
Currently we rely on the fact, that the kernel asks user space to load
the firmware for it, so we can use the /lib/firmware/postmarketos
directory for firmware.
As the kernel has support for loading the firmware itself since
v3.7, and the parameter for adding an additional path to the search
paths was added with v3.10, we can use that to not rely on
CONFIG_FW_LOADER_USER_HELPER being set.
Adds a new initfs hook, verbose-initfs, which doesn't do anything on its
own. Modify postmarketos-mkinitfs to check if this hook is installed and
if so run `set -x`.
It's done this way so verbose boot is enabled as early as possible,
before hooks are loaded.
Tested on the qemu-aarch64 device.
- pmboostrap initfs hook_add verbose-initfs
- pmbootstrap qemu --arch aarch64
- confirmed that commands are echoed to the console
Fix Nexus 5 (hammerhead) boot and framebuffer issues at startup by
waiting up to 10 seconds until the rootfs and /dev/fb0 have been
found. Waiting for the framebuffer device can be disabled by setting
deviceinfo_no_framebuffer=true in the deviceinfo.
The `msm-fb-refresher` updates the screen for msm based devices. It is
not needed for all devices, so we had some extra code in the initramfs,
that would only add it when the `deviceinfo_msm_refresher` variable was
set. However, we are able now to add files to initramfs hooks, so this
hack can be removed and simplify everything.
Changes:
* Remove `deviceinfo_msm_refresher` from all deviceinfos
* Add sanity check for it
* Move all `deviceinfo` sanity checks to an extra function
* `postmarketos-mkinitfs`: remove code for msm refresher
* `msm-fb-refresher`: add initramfs hook
* Add charging-sdl package
* Include charging-sdl into the initramfs-extra
* [initramfs] Detect charging mode and use triggerhappy to start
charging-sdl when the power key is pressed
* Changed usb-shell behavior, it wait for some user action before continue booting
* Rename usb-shell to debug-shell and changed port to 23
* Add `20-debug-shell.sh` script to static code analysis
* Enable eth0 interface in initramfs (qemu)
* Add additional script to run a shell in order to be able to kill it from a telnet session
* Add msm-fb-refresher package and initfs config
* Bump version for pmos-mkinitfs
* Create msm-fb-refresher openrc service
* kill refresher when initfs is done
When modules are surrounded with quotes, modprobe seems to be treating
them as all one module and none of them are actually loaded.
On the N900, where a watchdog module MUST be loaded on boot, this
results in the device shutting down after 30 seconds. This commit
corrects this in init.sh.in
* Automatically compute the minimum size for the partitions
* Automatically resize the pmOS_root partition during the boot process
* Resize root partition only if there is unallocated space at the end of the device.
* Added more echos to make debugging easier while looking at the pmOS_init.log.
* Updated static_code_analysis.sh script to run shellcheck with `-x` option.