From 01febf4f0b3afc3fc8bd4e8fa0dffaf19a85ae70 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Thu, 13 Jan 2022 00:41:11 -0800 Subject: [PATCH] device-purism-librem5: don't use legacy u-boot images for booting (MR 2842) Using uInitrd is no longer necessary. I'm not sure *why*, but it just works using the non-u-boot-image initramfs. The post-upgrade script was changed to clean up the old images from /boot/u{Image,Initrd}, restoring a lot of free space in that partition (~25MB) This also sneaks in a small 1 character change to silence removing the gpsd service from the default runlevel [ci:skip-build]: already built successfully in CI --- device/main/device-purism-librem5/APKBUILD | 6 +++--- .../device-purism-librem5.post-install | 8 +++++++- device/main/device-purism-librem5/deviceinfo | 2 +- device/main/device-purism-librem5/uboot-script.cmd | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/device/main/device-purism-librem5/APKBUILD b/device/main/device-purism-librem5/APKBUILD index 53d4dd3e7..f8f56d1d3 100644 --- a/device/main/device-purism-librem5/APKBUILD +++ b/device/main/device-purism-librem5/APKBUILD @@ -3,7 +3,7 @@ # Co-Maintainer: Bhushan Shah pkgname=device-purism-librem5 pkgdesc="Purism Librem 5 Phone" -pkgver=1.27 +pkgver=1.28 pkgrel=0 _confver=41 _purismrel=1 @@ -139,14 +139,14 @@ sha512sums=" 2e72d9a084ecd6c96cafbbd8fda461ae8b2ebd14ffda601d9f36d73f08f04088213de17da078293ddd958d4c76d33148c7af6e252eb0709f6934855a55578509 00-mesa.sh 8b6fa7b12c15f439c561901f3ffe24a1ef2a0c343401c0a79281060854ab29e08a1fb5e7adae8684b12aa9f535ed99e2dad993dce9724822cb0fbf2497dd86e5 70-wifi-pm.rules 00355d9ad085a77e157f3c62eb4f1bcac2823d3b341e34d1128edbfb1444fba83e8eacd263ea61da9f6d853f1328ab7fbe5ea63bd08c8a1bc9b8eaf44ae1f1c6 77-mm-broadmobi-port-types.rules -bab0effee35df7317ae7bd93aaf35822d830cc7487170874a5300b76e920f1756f5b69094f172d9b5c6826a5ee6a1db563cd9babd45826a210804623341be0f8 deviceinfo +f67ff150e4113b1e4a1432daa52df595ce6a67d52d593918fc25215d138c9f6450b075ff095a49b9bce6391562d2833283742e3574e00fd6ad9a1d808b4e4623 deviceinfo 2703c7a4e7f32cf102dfed644a8213497828ae1fe9f3bd789663157f79c8c8ddb05672e5c9a0c6883e9dee42afcfe9578e611dd1d9fe6cd8129d8d7738d28ad2 flash_script.lst 110630f959e3f3a2acc335d755defeb0f49fb40f46cb2423205511f43d1dfdbb91722271fac34a6cbf04a5f0406e6a34ed77e75555acc3f420041d32224027d6 modprobe.d-ship_mode.conf 3f62c04eb92d850e32d5e1b17534dec753563342ea6c4f9dc2572700d4f6eeb8ae8cd8e8e4f1b0f5c61f21d87bc61c02212f27313986157220003d78e2d69505 modprobe.d_rsi.conf a0740e405781ec6ef765fdc9f5700c95adbb241c45c97b9384ba68cdece662cb216ca5918640042f6e65a5d1b1a9099936382c99b49a44303f7b6d77a075a471 modules-load.d_librem5.conf 8ef4ec7a9e9a4fb801d207e7d94b627aacc9243a93b0ec28e0823a6f44b8102416c040e4ddf499f87bb9dfa960cf6f627b008b79f197f6814b3fd881e18ae8ef pcscd-librem5-reader.conf 2618b40eebd3602066ee75ab85cbdbb4cfee498def9879c95a304f05a6eeedf1ab28c5dd9fa5efc8f88c790f49c96458c61d5dfe8a3ca0f96bcc0e244313ab01 pcscd-librem5.initd -d2005a327a44aac0b56c113eeac72cdb8859b7fa9e5e799d931ccfd685c81f5ec2d4d1e2cae6ed0257e1309167086c3fced6138e51f482f4ffba0e5ebf6d7d89 uboot-script.cmd +5da1e39c36d8d83d159f8f9aa0b77c3de98b5d65054d0c3d376d64d87ef1e21b7570e0039e761b015917d4808e896e102d432dc8229e6189e80104dbd148ae4b uboot-script.cmd 1cbc65cf2cb8fad4b0332d012a0256a266205b9b64371f5c0dae09dbb7f1e45b254e8c43993b896097e9d7035a72d547d9bce1ab2133addc56a5abdb80b44616 xorg.conf f535b43b8defe75e72049e4eee181bfe821f6304a096413bccf6d08c8bb11b947fa1fee305af85616abd778745fadd52ebd610c2d135a4f907915b99ab2c526a 0001-librem5-pm.udev-disable-PM-for-broadmobi-modem.patch 2639da6a7169ed9ad2eb09efd1d2462fe330554b9cf1d44f803a33699970d56f12ceddccf97574d245cb8858b26a4857e3dfbadb20862ada962619814ad058b4 0002-udev-cameras-use-correct-path-for-modprobe-on-Alpine.patch diff --git a/device/main/device-purism-librem5/device-purism-librem5.post-install b/device/main/device-purism-librem5/device-purism-librem5.post-install index 6f9c8a9b7..f87f93592 100644 --- a/device/main/device-purism-librem5/device-purism-librem5.post-install +++ b/device/main/device-purism-librem5/device-purism-librem5.post-install @@ -3,5 +3,11 @@ # Enable GPS support sed -i 's|# nmea-socket=/var/run/gps-share.sock|nmea-socket=/var/run/gnss-share.sock|' /etc/geoclue/geoclue.conf -rc-update -q del gpsd +rc-update -qq del gpsd rc-update -q add gnss-share + +# Clean up any old, unneeded legacy u-boot images from /boot +for f in uInitrd uImage; do + [ ! -f "/boot/$f" ] && continue + rm -f "/boot/$f" +done diff --git a/device/main/device-purism-librem5/deviceinfo b/device/main/device-purism-librem5/deviceinfo index a4e2e4ac1..b5321d9a3 100644 --- a/device/main/device-purism-librem5/deviceinfo +++ b/device/main/device-purism-librem5/deviceinfo @@ -22,6 +22,6 @@ deviceinfo_screen_height="1440" # Bootloader related deviceinfo_flash_method="uuu" -deviceinfo_generate_legacy_uboot_initfs="true" +deviceinfo_generate_legacy_uboot_initfs="false" deviceinfo_sd_embed_firmware="u-boot/librem5/phone-boot.img:2" deviceinfo_boot_part_start="4096" diff --git a/device/main/device-purism-librem5/uboot-script.cmd b/device/main/device-purism-librem5/uboot-script.cmd index ee82478c8..980095166 100644 --- a/device/main/device-purism-librem5/uboot-script.cmd +++ b/device/main/device-purism-librem5/uboot-script.cmd @@ -18,7 +18,7 @@ echo Loading DTB ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${dtb_file} echo Loading Initramfs -ext2load mmc ${mmcdev}:${mmcpart} ${ramdisk_addr_r} uInitrd +ext2load mmc ${mmcdev}:${mmcpart} ${ramdisk_addr_r} initramfs echo Loading Kernel ext2load mmc ${mmcdev}:${mmcpart} ${kernel_addr_r} vmlinuz