main/postmarketos-mkinitfs: aarch64 uboot initrd (!141)

Support generating the aarch64 legacy uboot initrd files, not only the
armhf version. Use deviceinfo_arch to choose the right arch.
This commit is contained in:
Clayton Craft 2019-01-09 22:24:51 -08:00 committed by Oliver Smith
parent b24a2a4c96
commit 018e28cc66
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 10 additions and 5 deletions

View file

@ -1,6 +1,6 @@
pkgname=postmarketos-mkinitfs pkgname=postmarketos-mkinitfs
pkgver=0.7.3 pkgver=0.7.4
pkgrel=2 pkgrel=0
pkgdesc="Tool to generate initramfs images for postmarketOS" pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org" url="https://postmarketos.org"
# multipath-tools: kpartx # multipath-tools: kpartx
@ -26,4 +26,4 @@ package() {
sha512sums="c8ed2697ba0368b907eaefe7544bff8539adc7e8247af6bd425c722e3cedeb34e303f6bd9e00f283921352bc43dff3db83f3b3c1f427ef597ac15323f1e9c3eb init.sh.in sha512sums="c8ed2697ba0368b907eaefe7544bff8539adc7e8247af6bd425c722e3cedeb34e303f6bd9e00f283921352bc43dff3db83f3b3c1f427ef597ac15323f1e9c3eb init.sh.in
3c72a9a5cfef0591dd27c88a76df4db0f50b98f002672c061e77bdb2e6f4ac48d10b5cd85563a89d778a013da6d5a508e5ea70f131971d61545ba18e7094ab8b init_functions.sh 3c72a9a5cfef0591dd27c88a76df4db0f50b98f002672c061e77bdb2e6f4ac48d10b5cd85563a89d778a013da6d5a508e5ea70f131971d61545ba18e7094ab8b init_functions.sh
4c8a999009bc7e909bc1848c8c2421cb5f79f2603ee210b8f8c145f47c31a9e56e1861cffe742fcfd3c7bbb315e37dbe347bb5ac602f45eeccc0e40516889618 mkinitfs.sh" 5ad842720e7f322bab43aa585103f5bd7e4b11e2e8cce553d406123e4379c160a1b8d7ed1b6aae75b040b2df309c105c412826a8467d552576d6d9ac1f6792ab mkinitfs.sh"

View file

@ -213,11 +213,16 @@ require_package()
# Legacy u-boot images # Legacy u-boot images
create_uboot_files() create_uboot_files()
{ {
arch="arm"
if [ "${deviceinfo_arch}" == "aarch64" ]; then
arch="arm64"
fi
[ "${deviceinfo_generate_legacy_uboot_initfs}" == "true" ] || return [ "${deviceinfo_generate_legacy_uboot_initfs}" == "true" ] || return
require_package "mkimage" "uboot-tools" "generate_legacy_uboot_initfs" require_package "mkimage" "uboot-tools" "generate_legacy_uboot_initfs"
echo "==> initramfs: creating uInitrd" echo "==> initramfs: creating uInitrd"
mkimage -A arm -T ramdisk -C none -n uInitrd -d "$outfile" \ mkimage -A $arch -T ramdisk -C none -n uInitrd -d "$outfile" \
"${outfile/initramfs-/uInitrd-}" || exit 1 "${outfile/initramfs-/uInitrd-}" || exit 1
echo "==> kernel: creating uImage" echo "==> kernel: creating uImage"
@ -225,7 +230,7 @@ create_uboot_files()
if [ -n "${deviceinfo_dtb}" ]; then if [ -n "${deviceinfo_dtb}" ]; then
kernelfile="${kernelfile}-dtb" kernelfile="${kernelfile}-dtb"
fi fi
mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 \ mkimage -A $arch -O linux -T kernel -C none -a 80008000 -e 80008000 \
-n postmarketos -d $kernelfile "${outfile/initramfs-/uImage-}" || exit 1 -n postmarketos -d $kernelfile "${outfile/initramfs-/uImage-}" || exit 1
} }