Generate boot.img files in mkinitfs
* Only, when deviceinfo_generate_bootimg="true" in the deviceinfo * It respects a new deviceinfo_kernel_cmdline parameter from the deviceinfo
This commit is contained in:
parent
6485278d95
commit
eb51b544a2
2 changed files with 31 additions and 8 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue