- Nov 13, 2024
-
-
Clayton Craft authored
Alpine TSC decided to keep /usr/sbin for now, so let's not break paths to stuff under /usr/sbin in the meantime.
-
Clayton Craft authored
see: pmaports!5766
-
- Sep 28, 2024
-
-
Clayton Craft authored
I hate this, but it's the only good way I could find to allow working around this ugly QEMU bug: https://gitlab.com/qemu-project/qemu/-/issues/2560
-
- Sep 27, 2024
-
-
Clayton Craft authored
This uses a "deviceinfo_create_initfs_extra" to allow including initramfs-extra files in the initramfs and skip creating a separate initramfs-extra archive when it's set to "false". If this variable is unset, mkinitfs uses a default value of "false".
-
- Jul 11, 2024
-
-
Clayton Craft authored
Fixes issues with leading/trailing whitespaces really messing with mkinitfs
-
- Jun 25, 2024
-
-
Arnav Singh authored
-
- Jun 18, 2024
-
-
Casey authored
[ci:skip-build]: already built successfully in CI
-
- May 29, 2024
-
-
Clayton Craft authored
Co-authored-by:
Caleb Connolly <caleb@postmarketos.org>
-
-
Clayton Craft authored
This is very crude, but in lieu of an actual spec for usr merge or some standard way to detect whether it's done, this will have to do for now. We can and should improve it later!
-
There were some subtle bugs when handling symlinks to directories, and other usrmerge bits. Rework the symlink handling to deal with this properly and produce a sane ramdisk on usrmerge systems. Signed-off-by:
Caleb Connolly <caleb@connolly.tech> Co-authored-by:
Clayton Craft <clayton@craftyguy.net>
-
This is the path used on usrmerge distros, try it first as /lib/modules will implicitly follow the /lib symlink. Signed-off-by:
Caleb Connolly <caleb@connolly.tech>
-
Improve errors when writing out the cpio archive fails. Signed-off-by:
Caleb Connolly <caleb@connolly.tech>
-
- May 15, 2024
-
-
Clayton Craft authored
This library has a convenient "source file" method designed for sourcing shell envs and returning values set in them. deviceinfo's syntax every where else seems to be "whatever sh can 'source'", so using this library seems a lot nicer than trying to implement a parser/interpreter here (and almost certainly missing corner cases, functionality, etc) [ci:skip-build]: already built successfully in CI
-
Clayton Craft authored
-
Clayton Craft authored
fixes #41
-
- Mar 20, 2024
-
-
Clayton Craft authored
fixes #28
-
- Mar 14, 2024
-
-
Initially I thought of breaking off the Stat + error check call into its own function as to reduce repetition, but given that it's only useful in this situation where it only happens twice anyway, I'm not sure it actually would reduce complexity. Additionally, this means that .zst-compressed variants of files will be searched for in all contexts where this function is used. I'm not sure this is desirable. Tested and works with arrow-db820c. I didn't test it on actual hardware, but I verified that the firmware ended up in the initramfs via $ pmbootstrap initfs ls. I choose this device because it uses firmware from linux-firmware and also needs said firmware present in the initramfs. Closes https://gitlab.com/postmarketOS/postmarketos-mkinitfs/-/issues/39
-
- Jan 29, 2024
-
-
Clayton Craft authored
Some kernel packages (e.g. linux-lts in Alpine) don't ship linux.efi, so this needs to fallback to "vmlinuz" or else it won't be able to find a kernel for boot-deploy.
-
Clayton Craft authored
There are several valid extensions that kernel modules can have, and the list I had here was not complete... this meant that mkinitfs would fail to include modules with extensions like ".ko.gz" when searching directories. This makes the check for a "valid" module file name a lot simpler, allowing any file with ".ko" in the file name. While it's possible for a non-module file to have ".ko" somewhere in the file name, it seems unlikely if it's in the kernel modules directory... and this is an OK compromise for now.
-
- Jan 26, 2024
-
-
As we move towards UEFI on more devices, we want to use systemd-boot and kernel images built with CONFIG_ZBOOT. However, these images aren't compatible with existing Android bootloaders. As a result, we must install both the old vmlinuz image for old bootloaders, and the fancy new self-extracting EFI image. When using systemd_boot, use linux.efi as the kernel file name instead of globbing on vmlinuz*. Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
This will be used to adjust behaviour when using systemd boot Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
-
Clayton Craft authored
Yay, one less deviceinfo var!
-
Clayton Craft authored
This deviceinfo var is no longer used in mkinitfs (see previous commits).
- Nov 25, 2023
-
-
Clayton Craft authored
This removes code specific to installing osk-sdl in the initramfs archive. osk-sdl has been deprecated / removed from postmarketOS for FDE unlocking (in favor of using the app "unl0kr"), and other distros should consider doing the same.
-
This variable will dissappear from the deviceinfo at some point: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/4169 so after it does, it would not make much sense to keep its use around
-
- Oct 13, 2023
-
-
Clayton Craft authored
Co-authored-by:
Oliver Smith <ollieparanoid@postmarketos.org>
-
- Aug 25, 2023
-
-
Clayton Craft authored
This prints the error when the work dir can't be removed. This also changes mkinitfs so that it does't fail in this situation. The reasoning for this change in behavior is that mkinitfs returning non-zero will signal to the caller that there's potentially a problem with configuring boot-related stuff on their system, and a failure to rm the work dir is just noise. If the cause of that failure is a deeper problem, the log message should help figure it out. fixes #35
-
Clayton Craft authored
-
Clayton Craft authored
fixes #36
-
Clayton Craft authored
-
- Jun 18, 2023
-
-
-
Relates https://gitlab.com/postmarketOS/pmaports/-/issues/1836 The error checking for the detection of both files is not ideal, but there are no obvious better solutions. For now, we want to avoid requiring one by default, since it allows this change to be forward compatible so not all MRs related to /usr/share have to go in at once. I followed the same pattern as in boot-deploy!29 although there we check for "deviceinfo_arch" to make sure that at least one of those files is complete. The other alternative would be to add an Arch field to DeviceInfo struct, and use it to check that at least one of the files was complete, and ignore any errors if it exists. Since this is not ideal either, keep the double test, and let's take care of fixes once one of them is compulsory.
-
This is mostly a preparatory commit to later be able to read the deviceinfo from multiple places. It has a bit better encapsulation, and makes the functions methods, so that they can update deviceinfo file in-place.
-
-
- Apr 11, 2023
- Apr 07, 2023
-
-
Clayton Craft authored
When testing on pmOS with qemu/x86_64, this results in some nice reduction in size of the initramfs-extra (gzip'd, default compression): Before: /mkinitfs # ls -la /boot/initramfs-extra -rw-r--r-- 1 root root 3544429 Mar 19 23:06 /boot/initramfs-extra After: /mkinitfs # ls -la /boot/initramfs-extra -rw-r--r-- 1 root root 2234020 Mar 19 23:08 /boot/initramfs-extra Fixes #23
-
Clayton Craft authored
There's some repetition that's added by unrolling this, but it will allow passing the main initramfs archive's filelister to archive.AddItemsExclude when generating the initramfs-extra. I looked at several ways to implement this, this seems like least terrible thing to do... The runner-up was to return a FileList from archive.AddItems, and pass that around... Eww.
-
Clayton Craft authored
This allows passing a filelister of things to exclude from the archive
-