pmOS - build on Fedora
Building pmOS on Fedora.
back to main pmOS page.
Local links
History
2021-10-17: I re-created this page on my self-hosted web server.
2017-08-01: elitebook - try install again
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py install [14:11:29] *** (1/5) PREPARE NATIVE CHROOT *** [14:11:30] (native) install cryptsetup util-linux e2fsprogs parted [14:11:34] *** (2/5) CREATE DEVICE ROOTFS (nokia-rx51) *** [14:11:35] (native) install xz [14:11:36] (native) build x86_64/qemu-user-static-repack-2.8-r6.apk [14:11:47] (native) install qemu-user-static-repack qemu-user-static-repack-binfmt [14:11:49] Register qemu binfmt (arm) [14:11:49] (rootfs_nokia-rx51) install alpine-base [14:11:54] (native) build x86_64/postmarketos-base-2-r1.apk [14:11:55] (native) index armhf repository [14:11:55] (native) index aarch64 repository [14:11:55] (native) build x86_64/postmarketos-ui-weston-1-r1.apk [14:11:55] (native) index armhf repository [14:11:55] (native) index aarch64 repository [14:11:56] (native) build x86_64/postmarketos-ui-weston-1-r1.apk [14:11:56] (native) index armhf repository [14:11:56] (native) index aarch64 repository [14:11:57] (native) build x86_64/postmarketos-mkinitfs-0.1.8-r0.apk [14:11:57] (native) index armhf repository [14:11:57] (native) index aarch64 repository [14:11:57] (native) install perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev [14:12:08] (native) build x86_64/musl-armhf-1.1.16-r15.apk [14:12:11] (native) install gettext libtool autoconf automake bison [14:12:13] (native) build x86_64/binutils-armhf-2.28-r2.apk [14:17:01] (native) install paxmark bison flex texinfo gawk zip mpfr-dev mpc1-dev zlib-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf [14:17:04] (native) build x86_64/gcc-armhf-6.4.0-r4.apk [14:28:05] (native) build x86_64/ccache-cross-symlinks-1-r2.apk [sudo] password for tingo: [14:28:23] (native) index armhf repository [14:28:24] (native) index aarch64 repository [14:28:24] (native) install gcc-armhf g++-armhf ccache-cross-symlinks [14:28:26] (native) build armhf/linux-postmarketos-4.12.3-r1.apk [sudo] password for tingo: [14:52:33] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/tingo/work/nokia_n900/pmwork/log.txt [14:52:33] ERROR: Command failed: % sudo mkdir -p /home/tingo/work/nokia_n900/pmwork/chroot_buildroot_armhf/home/user/git [14:52:33] Run 'pmbootstrap log' for details. [14:52:33] See also: <https://postmarketos.org/troubleshooting>
retry.
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py install [16:00:59] *** (1/5) PREPARE NATIVE CHROOT *** [16:01:00] *** (2/5) CREATE DEVICE ROOTFS (nokia-rx51) *** [sudo] password for tingo: [16:01:08] (buildroot_armhf) install alpine-base [16:01:11] (buildroot_armhf) install abuild build-base ccache [16:01:18] (buildroot_armhf) install wayland-protocols libxkbcommon-dev xkeyboard-config libinput-dev libunwind-dev mtdev-dev libxcursor-dev glu-dev pango-dev colord-dev freerdp-dev libwebp-dev libva-dev dbus-dev [16:01:29] (buildroot_armhf) install distcc [16:01:31] (native) build x86_64/gcc-cross-wrappers-1-r1.apk [16:01:33] (native) index armhf repository [16:01:33] (native) index aarch64 repository [16:01:33] (native) install distcc gcc-cross-wrappers [16:01:34] (native) start distccd (armhf) on 127.0.0.1:33632 [16:01:34] (buildroot_armhf) build armhf/weston-9999-r2.apk [16:07:04] (buildroot_armhf) install gtk+3.0-dev [sudo] password for tingo: [16:08:01] (buildroot_armhf) build armhf/postmarketos-demos-4-r3.apk [16:08:10] (buildroot_armhf) build armhf/postmarketos-splash-1-r1.apk [16:08:13] (rootfs_nokia-rx51) install postmarketos-base ttf-droid device-nokia-rx51 postmarketos-ui-weston [16:09:36] (rootfs_nokia-rx51) mkinitfs postmarketos [16:09:46] *** SET LOGIN PASSWORD FOR: 'user' *** Changing password for user New password: Bad password: too weak Retype password: passwd: password for user changed by root [16:09:59] *** (3/5) PREPARE INSTALL BLOCKDEVICE *** [16:09:59] (native) stop distccd (armhf) [16:09:59] (native) create nokia-rx51.img (835M) [16:09:59] WARNING: Make sure, that your target device's partition table has allocated at least 835M as system partition! [16:09:59] Continue? (y/n) [n]: y [16:10:03] (native) mount /dev/install (nokia-rx51.img) [16:10:03] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/tingo/work/nokia_n900/pmwork/log.txt [16:10:03] ERROR: Command failed: (native) % losetup -f /home/user/rootfs/nokia-rx51.img [16:10:03] Run 'pmbootstrap log' for details. [16:10:03] See also: <https://postmarketos.org/troubleshooting>
one more time
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py install [16:11:11] *** (1/5) PREPARE NATIVE CHROOT *** [16:11:12] *** (2/5) CREATE DEVICE ROOTFS (nokia-rx51) *** [16:11:15] (rootfs_nokia-rx51) mkinitfs postmarketos [16:11:25] *** SET LOGIN PASSWORD FOR: 'user' *** Changing password for user New password: Bad password: too weak Retype password: passwd: password for user changed by root [16:11:33] *** (3/5) PREPARE INSTALL BLOCKDEVICE *** [16:11:33] (native) create nokia-rx51.img (835M) [16:11:33] WARNING: Make sure, that your target device's partition table has allocated at least 835M as system partition! [16:11:33] Continue? (y/n) [n]: y [16:11:35] (native) mount /dev/install (nokia-rx51.img) [16:11:35] ERROR: sequence item 3: expected str instance, NoneType found [16:11:35] Run 'pmbootstrap log' for details. [16:11:35] See also: <https://postmarketos.org/troubleshooting>
nope.
2017-08-01: elitebook - I cleaned up everything with './pmbootstrap.py zap'
2017-08-01: elitebook - update pmbootstrap
[tingo@kg-elitebook pmbootstrap]$ git fetch remote: Counting objects: 878, done. remote: Compressing objects: 100% (69/69), done. remote: Total 878 (delta 234), reused 264 (delta 220), pack-reused 589 Receiving objects: 100% (878/878), 3.86 MiB | 1.85 MiB/s, done. Resolving deltas: 100% (451/451), completed with 68 local objects. From https://github.com/postmarketOS/pmbootstrap 21228a1..d6bf000 master -> origin/master * [new branch] device-lg-bullhead -> origin/device-lg-bullhead * [new branch] feature/config-extra-packages -> origin/feature/config-extra-packages * [new branch] feature/implement-libsparse -> origin/feature/implement-libsparse * [new branch] feature/launch-qemu-vm -> origin/feature/launch-qemu-vm + 6cfb5b2...37981fc feature/plasma-mobile -> origin/feature/plasma-mobile (forced update) * [new branch] feature/support_kernel_incr_updates -> origin/feature/support_kernel_incr_updates * [new branch] fix/linux-postmarketos-arm-dtbs -> origin/fix/linux-postmarketos-arm-dtbs * [new branch] fix/mkinitfs-no-hooks-cant-stat -> origin/fix/mkinitfs-no-hooks-cant-stat * [new tag] 0.1.0 -> 0.1.0
ok.
2017-08-01: elitebook - try install again
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py install [12:01:48] *** (1/5) PREPARE NATIVE CHROOT *** [12:01:48] *** (2/5) CREATE DEVICE ROOTFS (nokia-rx51) *** [sudo] password for tingo: [12:01:55] (buildroot_armhf) install gtk+3.0-dev [12:02:12] (buildroot_armhf) build armhf/postmarketos-demos-4-r3.apk [12:02:23] (buildroot_armhf) build armhf/postmarketos-splash-1-r1.apk [12:02:27] (rootfs_nokia-rx51) install postmarketos-base ttf-droid device-nokia-rx51 postmarketos-ui-weston [12:04:27] (rootfs_nokia-rx51) mkinitfs postmarketos [12:04:39] *** SET LOGIN PASSWORD FOR: 'user' *** Changing password for user New password: Bad password: too weak Retype password: passwd: password for user changed by root [12:04:51] *** (3/5) PREPARE INSTALL BLOCKDEVICE *** [12:04:51] (native) stop distccd (armhf) [12:04:51] (native) create nokia-rx51.img (835M) [12:04:51] WARNING: Make sure, that your target device's partition table has allocated at least 835M as system partition! [12:04:51] Continue? (y/n) [n]: y [12:05:00] (native) mount /dev/install (nokia-rx51.img) [12:05:01] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/tingo/work/nokia_n900/pmwork/log.txt [12:05:01] ERROR: Command failed: (native) % losetup -f /home/user/rootfs/nokia-rx51.img [12:05:01] Run 'pmbootstrap log' for details. [12:05:01] See also: <https://postmarketos.org/troubleshooting>
hmm, why does losetup fail?
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py install [12:56:00] *** (1/5) PREPARE NATIVE CHROOT *** [12:56:01] *** (2/5) CREATE DEVICE ROOTFS (nokia-rx51) *** [sudo] password for tingo: [12:56:07] (rootfs_nokia-rx51) mkinitfs postmarketos [12:56:19] *** SET LOGIN PASSWORD FOR: 'user' *** Changing password for user New password: Bad password: too weak Retype password: passwd: password for user changed by root [12:56:30] *** (3/5) PREPARE INSTALL BLOCKDEVICE *** [12:56:30] (native) create nokia-rx51.img (835M) [12:56:30] WARNING: Make sure, that your target device's partition table has allocated at least 835M as system partition! [12:56:30] Continue? (y/n) [n]: y [12:56:33] (native) mount /dev/install (nokia-rx51.img) [12:56:33] ERROR: sequence item 3: expected str instance, NoneType found [12:56:33] Run 'pmbootstrap log' for details. [12:56:33] See also: <https://postmarketos.org/troubleshooting>
doesn't look consistent.
2017-08-01: elitebook - install
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py install [11:23:15] *** (1/5) PREPARE NATIVE CHROOT *** [11:23:18] (native) install alpine-base [11:23:20] (native) install cryptsetup util-linux e2fsprogs parted [11:23:21] *** (2/5) CREATE DEVICE ROOTFS (nokia-rx51) *** [11:23:21] (native) install qemu-user-static-repack qemu-user-static-repack-binfmt [11:23:24] Register qemu binfmt (arm) [11:23:24] (rootfs_nokia-rx51) install alpine-base [11:23:29] (native) install abuild build-base ccache [11:23:33] (native) install perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev [11:23:34] (native) build x86_64/ccache-cross-symlinks-1-r2.apk [11:23:35] (native) index armhf repository [11:23:35] (native) index aarch64 repository [11:23:35] (native) install gcc-armhf g++-armhf ccache-cross-symlinks [11:23:38] (native) build armhf/linux-postmarketos-4.12.3-r1.apk [sudo] password for tingo: [11:46:13] (buildroot_armhf) install alpine-base [11:46:18] (buildroot_armhf) install abuild build-base ccache [11:46:37] (buildroot_armhf) install wayland-protocols libxkbcommon-dev xkeyboard-config libinput-dev libunwind-dev mtdev-dev libxcursor-dev glu-dev pango-dev colord-dev freerdp-dev libwebp-dev libva-dev dbus-dev [11:47:11] (buildroot_armhf) install distcc [11:47:13] (native) build x86_64/gcc-cross-wrappers-1-r1.apk [11:47:15] (native) index armhf repository [11:47:15] (native) index aarch64 repository [11:47:15] (native) install distcc gcc-cross-wrappers [11:47:16] (native) start distccd (armhf) on 127.0.0.1:33632 [11:47:16] (buildroot_armhf) build armhf/weston-9999-r2.apk [11:53:16] (buildroot_armhf) install gtk+3.0-dev [sudo] password for tingo: [11:58:16] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/tingo/work/nokia_n900/pmwork/log.txt [11:58:16] ERROR: Command failed: (buildroot_armhf) % apk --no-progress add -u gtk+3.0-dev at-spi2-atk-dev atk-dev gdk-pixbuf-dev intltool libepoxy-dev libxcomposite-dev libxi-dev libxinerama-dev libxrandr-dev gtk+3.0 pc:atk pc:atk-bridge-2.0 pc:epoxy pc:gdk-pixbuf-2.0 pc:xi pc:xrandr at-spi2-core-dev at-spi2-atk pc:atspi-2 atk gdk-pixbuf perl-xml-parser file libepoxy libxcomposite compositeproto libxcomposite-doc xineramaproto libxinerama-doc randrproto libxrandr pc:randrproto shared-mime-info gtk-update-icon-cache so:libXcomposite.so.1 so:libXrandr.so.2 so:libatk-1.0.so.0 so:libatk-bridge-2.0.so.0 so:libcups.so.2 so:libepoxy.so.0 so:libgdk_pixbuf-2.0.so.0 libxtst-dev at-spi2-core so:libatspi.so.0 perl-libwww so:libmagic.so.1 hicolor-icon-theme so:libavahi-client.so.3 so:libavahi-common.so.3 so:libgnutls.so.30 recordproto libxtst pc:recordproto so:libXtst.so.6 perl-http-date perl-http-cookies perl-net-http perl-http-daemon perl-html-parser perl-file-listing perl-www-robotrules perl-http-negotiate perl-uri perl-http-message perl-lwp-mediatypes perl-encode-locale perl-try-tiny so:libhogweed.so.4 so:libnettle.so.6 so:libp11-kit.so.0 so:libtasn1.so.6 perl-html-tagset perl-io-html [11:58:16] Run 'pmbootstrap log' for details. [11:58:16] See also: <https://postmarketos.org/troubleshooting>
failed
2017-08-01: elitebook - build device
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py build device-nokia-rx51 [11:21:32] Done
ok, that was quick.
2017-08-01: elitebook - zap chroots
tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py zap [11:17:50] Shutdown complete [11:17:50] Remove /home/tingo/work/nokia_n900/pmwork/chroot_native? (y/n) [n]: y [sudo] password for tingo: [11:18:12] Remove /home/tingo/work/nokia_n900/pmwork/chroot_rootfs_nokia-rx51? (y/n) [n]: y [11:18:18] Done
ok.
2017-07-26: install
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py install [14:40:17] *** (1/5) PREPARE NATIVE CHROOT *** [14:40:18] (native) install cryptsetup util-linux e2fsprogs parted [sudo] password for tingo: [14:40:26] *** (2/5) CREATE DEVICE ROOTFS (nokia-rx51) *** [14:40:28] (native) install xz [14:40:28] (native) build x86_64/qemu-user-static-repack-2.8-r6.apk [14:40:39] (native) install qemu-user-static-repack qemu-user-static-repack-binfmt [14:40:41] Register qemu binfmt (arm) [14:40:41] (rootfs_nokia-rx51) install alpine-base [14:40:47] (native) build x86_64/postmarketos-base-2-r1.apk [14:40:47] (native) index armhf repository [14:40:47] (native) index aarch64 repository [14:40:47] (native) build x86_64/postmarketos-ui-weston-1-r1.apk [14:40:47] (native) index armhf repository [14:40:48] (native) index aarch64 repository [14:40:48] (native) build x86_64/postmarketos-ui-weston-1-r1.apk [14:40:48] (native) index armhf repository [14:40:48] (native) index aarch64 repository [14:40:49] (native) build x86_64/postmarketos-mkinitfs-0.1.8-r0.apk [14:40:49] (native) index armhf repository [14:40:49] (native) index aarch64 repository [14:40:49] (native) install perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev [14:40:58] (native) build x86_64/musl-armhf-1.1.16-r15.apk [14:41:00] (native) install gettext libtool autoconf automake bison [14:41:02] (native) build x86_64/binutils-armhf-2.28-r2.apk [14:45:06] (native) install paxmark bison flex texinfo gawk zip mpfr-dev mpc1-dev zlib-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf [14:45:08] (native) build x86_64/gcc-armhf-6.4.0-r4.apk [14:57:33] (native) build x86_64/ccache-cross-symlinks-1-r2.apk [sudo] password for tingo: [15:02:33] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/tingo/work/nokia_n900/pmwork/log.txt [15:02:33] ERROR: Command failed: (native) % rm -rf /home/user/build [15:02:33] Run 'pmbootstrap log' for details. [15:02:33] See also: <https://postmarketos.org/troubleshooting>
failed line
2017-07-26: build
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py build device-nokia-rx51 [sudo] password for tingo: [13:19:18] Download https://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz [13:19:18] Download https://nl.alpinelinux.org/alpine/edge/main/x86_64/apk-tools-static-2.7.2-r0.apk [13:19:19] (native) install alpine-base [13:19:22] (native) install abuild build-base ccache [13:19:32] (native) generate abuild keys [13:19:33] (native) install uboot-tools [13:19:34] (native) build x86_64/device-nokia-rx51-1-r11.apk [13:19:34] (native) index armhf repository [13:19:34] (native) index aarch64 repository [13:19:34] Done
something happened.
2017-07-26: now, what can pmbootstrap do?
[tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py --help usage: pmbootstrap [-h] [-V] [--no-cross] [-a ALPINE_VERSION] [-c CONFIG] [-d PORT_DISTCCD] [-mp MIRROR_POSTMARKETOS] [-m MIRROR_ALPINE] [-j JOBS] [-p APORTS] [-w WORK] [-l LOG] [-v] [-q] {init,shutdown,index,flasher,initfs,log,log_distccd,zap,stats,build_init,chroot,install,menuconfig,checksum,parse_apkbuild,aportgen,build,challenge,parse_apkindex} ... optional arguments: -h, --help show this help message and exit -V, --version show program's version number and exit --no-cross disable crosscompiler, build only with qemu + gcc (slower!) -a ALPINE_VERSION, --alpine-version ALPINE_VERSION examples: edge, latest-stable, v3.5 -c CONFIG, --config CONFIG -d PORT_DISTCCD, --port-distccd PORT_DISTCCD -mp MIRROR_POSTMARKETOS, --mirror-pmOS MIRROR_POSTMARKETOS -m MIRROR_ALPINE, --mirror-alpine MIRROR_ALPINE -j JOBS, --jobs JOBS parallel jobs when compiling -p APORTS, --aports APORTS postmarketos aports paths -w WORK, --work WORK folder where all data gets stored (chroots, caches, built packages) -l LOG, --log LOG -v, --verbose write even more to the logfiles (this may reduce performance) -q, --quiet do not output any log messages action: {init,shutdown,index,flasher,initfs,log,log_distccd,zap,stats,build_init,chroot,install,menuconfig,checksum,parse_apkbuild,aportgen,build,challenge,parse_apkindex} init initialize config file shutdown umount, unregister binfmt index re-index all repositories with custom built packages (do this after manually removing package files) flasher flash something to the target device initfs do something with the initramfs log follow the pmbootstrap logfile log_distccd follow the distccd logfile zap safely delete chroot folders stats show ccache stats build_init initialize build environment (usually you do not need to call this) chroot start shell in chroot install set up device specific chroot and install to sdcard or image file menuconfig run menuconfig on a kernel aport checksum update aport checksums aportgen generate a package build recipe (aport/APKBUILD) based on an upstream aport from Alpine build create a package for a specific architecture challenge verify, that all files in an apk can be reproduced from the same sources / verify, that an APKINDEX.tar.gz properly lists all apks in a repository folder
ok
2017-07-26: init build
[tingo@kg-elitebook nokia_n900]$ cd pmbootstrap/ [tingo@kg-elitebook pmbootstrap]$ ./pmbootstrap.py init [13:08:55] Target device (either an existing one, or a new one for porting). [13:08:55] Available (13): asus-grouper, htc-bravo, lg-d855, lg-hammerhead, lg-mako, motorola-titan, nokia-rx51, qemu-amd64, qemu-vexpress, samsung-i9070, samsung-i9100, samsung-maguro, sony-amami [13:08:55] Device [samsung-i9100]: nokia-rx51 [13:09:09] Available user interfaces (1): weston, none [13:09:09] User Interface: [weston]: [13:09:26] Location of the 'work' path. Multiple chroots (native, device arch, device rootfs) will be created in there. [13:09:26] Work path [/home/tingo/.local/var/pmbootstrap]: ~/work/nokia_n900/pmwork [13:09:58] How many jobs should run parallel on this machine, when compiling? [13:09:58] Jobs [5]: [13:10:01] Rebuild packages, when the last modified timestamp changed, even if the version did not change? This makes pmbootstrap behave more like 'make'. [13:10:01] Timestamp based rebuilds (y/n) [y]: [13:10:03] WARNING: The applications in the chroots do not get updated automatically. [13:10:03] Run 'pmbootstrap zap' to delete all chroots once a day before working with pmbootstrap! [13:10:03] It only takes a few seconds, and all packages are cached. [13:10:03] Done!
ok.
2017-07-26: getting source code: a suitable place
[tingo@kg-elitebook nokia_n900]$ pwd /zs/tingo/work/nokia_n900
get source
[tingo@kg-elitebook nokia_n900]$ git clone https://github.com/postmarketOS/pmbootstrap.git Cloning into 'pmbootstrap'... remote: Counting objects: 2903, done. remote: Compressing objects: 100% (186/186), done. remote: Total 2903 (delta 111), reused 151 (delta 32), pack-reused 2615 Receiving objects: 100% (2903/2903), 4.82 MiB | 2.12 MiB/s, done. Resolving deltas: 100% (1701/1701), done. Checking connectivity... done.
ok.
2017-07-26: using my work laptop, running Fedora 25:
[tingo@kg-elitebook ~]$ cat /etc/fedora-release Fedora release 25 (Twenty Five) [tingo@kg-elitebook ~]$ uname -a Linux kg-elitebook.kg4.no 4.11.8-200.fc25.x86_64 #1 SMP Thu Jun 29 16:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
ok.