- Shell 96.6%
- C 2.9%
- Lua 0.5%
|
Caleb Connolly
4e3c5f3658
Add some more missing services, also make packages that enable services in their post-install explicitly depend on the service. The pbsplash-kill service doesn't seem to work. Signed-off-by: Caleb Connolly <caleb@connolly.tech> |
||
|---|---|---|
| device/main | services fixes | |
| main | services fixes | |
| temp | services fixes | |
| .editorconfig | Initial commit | |
| channels.cfg | Initial commit | |
| COMMITSTYLE.md | Initial commit | |
| LICENSE | Initial commit | |
| pmaports.cfg | Initial commit | |
| README.md | README: more stuff | |
Canopy aports
Packages repo for Canopy.
Getting started
Huge thanks for Jane for bootstrapping systemd on top of postmarketOS, almost all of the initial packages were set up by her.
You should check out the initramfs-log-to-kmsg pmaports branch if building for
an sdm845 device.
You will need to use the fork of pmbootstrap too to enable support for multiple aports directories and various additional fixes (and hacks..) for usrmerge, Canopy, and systemd.
Then clone caports into $PMBWORK/cache_git/ and edit
~/.config/pmbootstrap.cfg to match:
[pmbootstrap]
aports = /home/<MY_USER>/.local/var/pmbootstrap/cache_git/caports,/home/<MY_USER>/.local/var/pmbootstrap/cache_git/pmaports
...
Testing using my (temporary) binary repo
Security here is FAR from ideal, but hopefully good enough for testing.
Fetch the temporary key I used for signing and put it in $PMBWORK/config_apk_keys.
https://calebs.dev/canopy/pmos%40local-64aef6f1.rsa.pub
Then configure pmbootstrap.cfg to add my mirror:
mirrors_postmarketos = http://calebs.dev/canopy/edge,http://mirror.postmarketos.org/postmarketos/
You should be able to generate a rootfs for qemu-amd64 or for the shift6mq with minimal effort.
Bootstrapping from source
You can bootstrap from just the source repo following roughly these steps.
pmbootstrap config ui gnome-mobile
pmbootstrap config device shift-axolotl # Or whatever
# We need to bootstrap without merge-usr so we can build the forked packages
# for usrmerge support
pmbootstrap config merge_usr False
pmbootstrap build --force tar abuild coreutils busybox
pmbootstrap config merge_usr True
# canopy-base provides os-release which systemd needs
# avoid the dependency cycle by building it first with --ignore-depends
# cycle: postmarketos-base ->
# postmarketos-initramfs -> multipath-tools -> systemd
# postmarketos-initramfs also needs to be built this way
pmbootstrap build --ignore-depends canopy-base postmarketos-initramfs
# dbus and linux-pam need to built without systemd first (and without eudev/elogind)
pmbootstrap build --bootstrap dbus linux-pam
# Build systemd \o/
pmbootstrap build alpine-base systemd
# build the real versions of the bootstrap packages as they can now pull in systemd-dev
pmbootstrap build --force dbus linux-pam
# Attempt to install and pray
pmbootstrap install --password 147147
Issues
apk breaks on upgrade. libssl.so.3 and libcrypto.so.3 both become symlinks to themselves. May need to fork them both to fix this.
rc-update is missing, the alpine-base fork includes a wrapper which invokes systemd instead, this is so that "enable" commands will work in the chroot. sysv-init compatibility only works on a running system. Packages to fix:
- call_audio_idle_suspend_workaround <- soc-qcom-sdm845
- deferred-initcalls <- not sure where this comes from
- hkdm
- postmarketos-tweakd
- swapfile
Additionally, some important services don't get enabled automatically. Either their relevant service file from systemd-services package doesn't get installed, or the (bridged) call to systemctl enable happens too early. Notably:
- sshd
- NetworkManager
These need to be enabled explicitly on first boot.
- first boot (at least) is pretty slow, UART is enabled and there's probably some places for optimisation, it should take about a minute
- wifi won't work ootb, you'll need to do
sudo systemctl enable --now NetworkManager rmtfs pd-mapper tqftpserv, should be fixed soon - gnome software doesn't work ootb, you need to manually install
apk-polkit-rs-serviceand enable theapk-polkit-serversystem service systemd-timesyncdisn't installed by default, you'll need it to fix the timezone :P
Footguns
When porting a new device, ensure that all mkinitfs files (e.g. firmware files!)
have their paths adjusted to be /usr/lib/firmware, /usr/bin/... etc.
Specifying /bin, /lib, /sbin, /usr/sbin explicitly will cause mkinitfs
not to create the symlink and chance are the initramfs will fail.