diff --git a/device-lg-d855/APKBUILD b/device-lg-d855/APKBUILD index 1d9bae60f..613b6ee15 100644 --- a/device-lg-d855/APKBUILD +++ b/device-lg-d855/APKBUILD @@ -1,11 +1,11 @@ pkgname=device-lg-d855 pkgver=1 -pkgrel=2 +pkgrel=3 pkgdesc="LG G3 International" url="https://github.com/postmarketOS" arch="noarch" license="MIT" -depends="linux-lg-d855" +depends="linux-lg-d855 mkbootimg" makedepends="" install="" subpackages="" @@ -23,5 +23,5 @@ package() { "$pkgdir"/etc/udev/rules.d/90-android.rules } -sha512sums="e47683c1e7ada0d8df36eb141d1fea06dd32f47415746bd1e98b8c0abe41e9067df4cd55bbe1590b7f670749854d235b8dbaae9db083d4b7c51db59a22c48227 deviceinfo +sha512sums="6eca0ffe60327ea13273a380273ebc8022a3501289a14d80a1d1d7d771961c0c5745ad631b2588eccec7f38f309e7cfe5a5f50b119bceda2af5b19fee20e5a56 deviceinfo ee25f3d0377f027d108593eb7953b8db49d7f05a5c36a0c8ca7e7849d15e3c217bc1ac97d77a66e28d2db4b81c0f50b905639911276da40321d2b6cca7f797df 90-android.rules" diff --git a/device-lg-d855/deviceinfo b/device-lg-d855/deviceinfo index 54421c469..5237672d0 100644 --- a/device-lg-d855/deviceinfo +++ b/device-lg-d855/deviceinfo @@ -18,6 +18,7 @@ deviceinfo_arch="armhf" # You can for example extract these from an existing boot.img +deviceinfo_generate_bootimg="true" deviceinfo_flash_offset_base="0x00000000" deviceinfo_flash_offset_kernel="0x00008000" deviceinfo_flash_offset_ramdisk="0x02000000" diff --git a/device-lg-hammerhead/APKBUILD b/device-lg-hammerhead/APKBUILD index 11f0a3470..535acd782 100644 --- a/device-lg-hammerhead/APKBUILD +++ b/device-lg-hammerhead/APKBUILD @@ -1,11 +1,11 @@ pkgname=device-lg-hammerhead pkgver=1 -pkgrel=3 +pkgrel=4 pkgdesc="Google Nexus 5" url="https://github.com/postmarketOS" arch="noarch" license="MIT" -depends="linux-lg-hammerhead linux-firmware" +depends="linux-lg-hammerhead linux-firmware mkbootimg" makedepends="" install="" subpackages="" @@ -35,7 +35,7 @@ package() { "$pkgdir"/etc/wifi/bcmdhd.cal } -sha512sums="01a20f5286444b5d9616ddc541a84bc32a7c7f51a4b56e1015adcea5b238197c95863f68b783e06f83f423be2aeaff73f70ccc041da85b8a7987591cf97b94f4 deviceinfo +sha512sums="cc8df47de1ad33593ca7e9a6cfdb27543e1c4239d316eb85edab62430f5e81d2ec3a59aee671fc4a7c7c8213461cc736e3ed77fb1319ea5b12daf8828523de17 deviceinfo 8590967fa10388a890fdfafdb1070b9ab22dc89e06a3a8834806c772191e3b67de7b914b0d68e5ddf581cee715cb90f3f24abcb8762c415ff328c6da23e55d52 initfs-hook.sh ee25f3d0377f027d108593eb7953b8db49d7f05a5c36a0c8ca7e7849d15e3c217bc1ac97d77a66e28d2db4b81c0f50b905639911276da40321d2b6cca7f797df 90-android-touch-dev.rules c3d0182161c33047e0af4fd7cc557037e10380896a771446f055a13813e50e4e6c9d5992de7b275a8373a053cca02cb96bcb50c732709a2e9909f903b5fba249 profile.sh diff --git a/device-lg-hammerhead/deviceinfo b/device-lg-hammerhead/deviceinfo index 1950fff10..5afd04bef 100644 --- a/device-lg-hammerhead/deviceinfo +++ b/device-lg-hammerhead/deviceinfo @@ -18,6 +18,7 @@ deviceinfo_arch="armhf" # You can for example extract these from an existing boot.img +deviceinfo_generate_bootimg="true" deviceinfo_flash_offset_base="0" deviceinfo_flash_offset_kernel="0x00008000" deviceinfo_flash_offset_ramdisk="0x2900000" diff --git a/device-lg-mako/APKBUILD b/device-lg-mako/APKBUILD index 572d3c7fd..ae989a2ec 100644 --- a/device-lg-mako/APKBUILD +++ b/device-lg-mako/APKBUILD @@ -1,11 +1,11 @@ pkgname=device-lg-mako pkgver=2 -pkgrel=2 +pkgrel=3 pkgdesc="Google Nexus 4" url="https://github.com/postmarketOS" arch="noarch" license="MIT" -depends="linux-lg-mako" +depends="linux-lg-mako mkbootimg" makedepends="" install="" subpackages="" @@ -27,7 +27,7 @@ package() { "$pkgdir"/etc/profile.d/00-$pkgname.sh } -sha512sums="180b1cab6b0ed8c1448a1582dbb6081c81aa598bd923449293d8e41eb0dd245c92cea9b5bd30ce59009ce60801881952e9ac3a3ec6e971a894e24e22d42dee52 deviceinfo +sha512sums="df3c422615189e4c392a141928740ed212711ec68bf310086b843ece033df37ea70643a6df3f5fd08c4b8b3aaa6b2299a1ea5d2d26911b464305670cc0ecd6b5 deviceinfo 8590967fa10388a890fdfafdb1070b9ab22dc89e06a3a8834806c772191e3b67de7b914b0d68e5ddf581cee715cb90f3f24abcb8762c415ff328c6da23e55d52 initfs-hook.sh ee25f3d0377f027d108593eb7953b8db49d7f05a5c36a0c8ca7e7849d15e3c217bc1ac97d77a66e28d2db4b81c0f50b905639911276da40321d2b6cca7f797df 90-android-touch-dev.rules c3d0182161c33047e0af4fd7cc557037e10380896a771446f055a13813e50e4e6c9d5992de7b275a8373a053cca02cb96bcb50c732709a2e9909f903b5fba249 profile.sh" diff --git a/device-lg-mako/deviceinfo b/device-lg-mako/deviceinfo index e706f0c47..77838abc1 100644 --- a/device-lg-mako/deviceinfo +++ b/device-lg-mako/deviceinfo @@ -18,6 +18,7 @@ deviceinfo_arch="armhf" # You can for example extract these from an existing boot.img +deviceinfo_generate_bootimg="true" deviceinfo_flash_offset_base="0" deviceinfo_flash_offset_kernel="0x80208000" deviceinfo_flash_offset_ramdisk="0x81800000" diff --git a/device-motorola-titan/APKBUILD b/device-motorola-titan/APKBUILD index 72654127e..788abcf68 100644 --- a/device-motorola-titan/APKBUILD +++ b/device-motorola-titan/APKBUILD @@ -1,6 +1,6 @@ pkgname=device-motorola-titan pkgver=1 -pkgrel=4 +pkgrel=5 pkgdesc="Motorola Moto G 2014" url="https://github.com/postmarketOS" arch="noarch" @@ -27,7 +27,7 @@ package() { "$pkgdir"/etc/profile.d/00-$pkgname.sh } -sha512sums="43973f535bc40d50ab6897129d711713a0fc0e56972addc33874c9db33269ae9e868a963b56669e7533cb7a9224fc86a6388338142a419dd852e2f74088db5c9 deviceinfo +sha512sums="a04d2c5f546594f1a11a6949785f3d404f2c8e2e61c088f69275e9ab399f8465a3ccd5404c6cb4d97d2d37e051000e016ad1b26da3acbbdbc25e939208db05c5 deviceinfo f37e6324abf0b0fc8a3d360d6d11bb0648090a438a55ca7f04a9d494719e687ce445ae107ace642edf293afb6ca82615bcb5d0ddb6c46c1a7f8ee3c213b7c5c4 90-android-touch-dev.rules 8590967fa10388a890fdfafdb1070b9ab22dc89e06a3a8834806c772191e3b67de7b914b0d68e5ddf581cee715cb90f3f24abcb8762c415ff328c6da23e55d52 initfs-hook.sh 4fd7fceda05b9a7e5a7d32f737126c335de883d9caed799345c1016164e04d05819436a0dfd9e624499bbc1a9d0d56ba6e738f4458bc92ef1fe135845ae1aa85 profile.sh" diff --git a/device-motorola-titan/deviceinfo b/device-motorola-titan/deviceinfo index b9bd51a4e..d1cf77606 100644 --- a/device-motorola-titan/deviceinfo +++ b/device-motorola-titan/deviceinfo @@ -18,6 +18,7 @@ deviceinfo_arch="armhf" # You can for example extract these from an existing boot.img +deviceinfo_generate_bootimg="true" deviceinfo_flash_offset_base="0" deviceinfo_flash_offset_kernel="0x00008000" deviceinfo_flash_offset_ramdisk="0x01000000" diff --git a/device-samsung-maguro/APKBUILD b/device-samsung-maguro/APKBUILD index 471dcdfcf..4b8bc51e0 100644 --- a/device-samsung-maguro/APKBUILD +++ b/device-samsung-maguro/APKBUILD @@ -1,11 +1,11 @@ pkgname=device-samsung-maguro pkgver=2 -pkgrel=2 +pkgrel=3 pkgdesc="Google Galaxy Nexus (GSM)" url="https://github.com/postmarketOS" arch="noarch" license="MIT" -depends="linux-samsung-tuna" +depends="linux-samsung-tuna mkbootimg" makedepends="" install="" subpackages="" @@ -21,4 +21,4 @@ package() { "$pkgdir"/etc/deviceinfo } -sha512sums="eaeafab8e394c95c007d00e97b9b3563aedb006013f22b2fae500026700f009a3ef871a911b423103ef59cfae12bfeef96542e75bc22bcace8e17c308cbbddf6 deviceinfo" +sha512sums="73044501c5f9be32c46a169b71292b9ddcb278a27e7e6665dd7e1a8ee02951d7d9a7b2f1b4aa8890c201b9055dabd3a23f5d4f1919e6694f6976958ccaa2181d deviceinfo" diff --git a/device-samsung-maguro/deviceinfo b/device-samsung-maguro/deviceinfo index c84f702c6..b03a3bd08 100644 --- a/device-samsung-maguro/deviceinfo +++ b/device-samsung-maguro/deviceinfo @@ -18,6 +18,7 @@ deviceinfo_arch="armhf" # You can for example extract these from an existing boot.img +deviceinfo_generate_bootimg="true" deviceinfo_flash_offset_base="0x80000000" deviceinfo_flash_offset_kernel="0x00008000" deviceinfo_flash_offset_ramdisk="0x01000000" diff --git a/postmarketos-mkinitfs/APKBUILD b/postmarketos-mkinitfs/APKBUILD index 6d5dbada4..8d150b257 100644 --- a/postmarketos-mkinitfs/APKBUILD +++ b/postmarketos-mkinitfs/APKBUILD @@ -1,5 +1,5 @@ pkgname=postmarketos-mkinitfs -pkgver=0.1.2 +pkgver=0.1.3 pkgrel=0 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://github.com/postmarketOS" @@ -29,7 +29,7 @@ package() { } sha512sums="22418d8869448b456a775f03b18d7b4e13f3cac1129233ced42caf67c3aea4abcc6488fcba2acb5e20dd72f2a6da6419938ac44751a5ba175f02eab586573c43 init.sh.in 66f442648fb38529ec594e62ee2307269ca875c7f9340726adcb211e9be42a6ba60fd296af0503a65c7f230c25cf3494783e4282f2468c63116b9500f5d184c6 init_functions.sh -dd3c86c6ba4f91e20b72f4180049960a58dc01002f69ad9e5d98c752da3b34711c2bbe6e0c7d003eb6a4a8d9e185796aa2fe84c0231a3057b204912c439140f7 mkinitfs.sh +75c59da74b7b17c9bbe8edca1b15fec55cf2882e11e4dcd9d257e6a72331ba4efbb9e67a330d166c43c2931f07ff30088a24eca521ac32122cfab3d6a6e8781e mkinitfs.sh 81d001ab185a8db1b9335d7c8c278d49ab0446bc15bb00dd22e4de16633433a183888f3f1096399bfe361ed719dcc4203afdf4b4f10e74a9c1e50bbbfc46951c 10-usb-unlock.sh 35a8eabad947347afec7e3f5860d31ab9e3534972c0960ccf553c7e1cc9262316bfdddb8d61d3588db1ee2261077597617806080b9956798b3e5088d6f9b596b splash1.ppm.gz bf11d8b3a50db984cfbb2cafe6687de327242c1f6f56c6fdd02ca579b05213f9c886aa1c0527530fdec21b16e65e68962e40a600c4ce155819df2f610b435087 splash2.ppm.gz" diff --git a/postmarketos-mkinitfs/mkinitfs.sh b/postmarketos-mkinitfs/mkinitfs.sh index 8c7101919..727ab3850 100644 --- a/postmarketos-mkinitfs/mkinitfs.sh +++ b/postmarketos-mkinitfs/mkinitfs.sh @@ -134,6 +134,33 @@ create_cpio_image() | gzip -1 > "$outfile" } +# Legacy u-boot images +create_uinitrd() +{ + [ "${deviceinfo_generate_legacy_uboot_initfs}" == "true" ] || return + echo "==> initramfs: creating uInitrd" + mkimage -A arm -T ramdisk -C none -n uInitrd -d "$outfile" "${outfile/initramfs-/uInitrd-}" +} + +# Android devices +create_bootimg() +{ + [ "${deviceinfo_generate_bootimg}" == "true" ] || return + echo "==> initramfs: creating boot.img" + mkbootimg \ + --kernel "${outfile/initramfs-/vmlinuz-}" \ + --ramdisk "$outfile" \ + --second_offset "${deviceinfo_flash_offset_second}" \ + --cmdline "${deviceinfo_kernel_cmdline}" \ + --base "${deviceinfo_flash_offset_base}" \ + --kernel_offset "${deviceinfo_flash_offset_kernel}" \ + --ramdisk_offset "${deviceinfo_flash_offset_ramdisk}" \ + --tags_offset "${deviceinfo_flash_offset_tags}" \ + --pagesize "${deviceinfo_flash_pagesize}" \ + -o "${outfile/initramfs-/boot.img-}" +} + + # initialize source_deviceinfo parse_commandline $1 $2 $3 @@ -159,12 +186,8 @@ done # finish up replace_init_variables create_cpio_image - -# create uInitrd if the device uses legacy u-boot images -if [ "${deviceinfo_generate_legacy_uboot_initfs}" == "true" ]; then - echo "==> initramfs: creating uInitrd" - mkimage -A arm -T ramdisk -C none -n uInitrd -d "$outfile" $(dirname "$outfile")/uInitrd -fi +create_uinitrd +create_bootimg rm -rf "$tmpdir" exit 0