From 71902297cca0719b95cc0857474ec181f5bf9054 Mon Sep 17 00:00:00 2001 From: Bailey Fox Date: Tue, 12 Mar 2019 03:42:07 -0500 Subject: [PATCH] Revert to original upstream, and merge no-initrd patch --- .SRCINFO | 8 +++++--- PKGBUILD | 22 ++++++++++++++-------- no-initrd.patch | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 no-initrd.patch diff --git a/.SRCINFO b/.SRCINFO index 587767c..9093a6c 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,8 +1,8 @@ pkgbase = abootimg-git pkgdesc = A tool to read/write/update android boot images - pkgver = 0.6.r6.g1ebeb39 + pkgver = r38.7e127fe pkgrel = 1 - url = http://gitorious.org/ac100/abootimg + url = https://github.com/ggrandou/abootimg arch = i686 arch = x86_64 arch = arm @@ -12,8 +12,10 @@ pkgbase = abootimg-git depends = util-linux depends = cpio provides = abootimg - source = git+https://gitlab.com/ajs124/abootimg.git + source = git+https://github.com/ggrandou/abootimg.git + source = no-initrd.patch sha256sums = SKIP + sha256sums = 5fe9400e71f1ade170c1e0e99f343881edca2022300c7e7a1d34d776c22cc126 pkgname = abootimg-git diff --git a/PKGBUILD b/PKGBUILD index fc8cc37..3ef45df 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,25 +1,31 @@ -# Maintainer: ajs124 < aur AT ajs124 DOT de > +# Maintainer: Bailey Fox +# Contributor: ajs124 < aur AT ajs124 DOT de > # Contributor: Benoit Favre # Contributor: Thomas Hebb pkgname=abootimg-git -pkgver=0.6.r6.g1ebeb39 +pkgver=r38.7e127fe pkgrel=1 pkgdesc="A tool to read/write/update android boot images" arch=('i686' 'x86_64' 'arm' 'armv7h') -url="http://gitorious.org/ac100/abootimg" +url="https://github.com/ggrandou/abootimg" license=('GPL') depends=('util-linux' 'cpio') makedepends=('git') provides=('abootimg') -# upstream seems dead and gitorious is about to shut down -> use my mirror -#source=('git+https://gitorious.org/ac100/abootimg.git') -source=('git+https://gitlab.com/ajs124/abootimg.git') -sha256sums=('SKIP') +source=('git+https://github.com/ggrandou/abootimg.git' + 'no-initrd.patch') +sha256sums=('SKIP' + '5fe9400e71f1ade170c1e0e99f343881edca2022300c7e7a1d34d776c22cc126') pkgver() { cd "abootimg" - git describe --long --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "${srcdir}/abootimg" + patch -p0 --binary < ../no-initrd.patch } build() { diff --git a/no-initrd.patch b/no-initrd.patch new file mode 100644 index 0000000..a523845 --- /dev/null +++ b/no-initrd.patch @@ -0,0 +1,35 @@ +This patch incorporates a patch made by John Stultz to allow abootimg to +work with newer Android aboots that do not include an initrd +--- abootimg.c 2019-03-12 03:16:42.335616885 -0500 ++++ abootimg.c.1 2019-03-12 03:18:01.550892862 -0500 +@@ -163,7 +163,7 @@ + "\n" + " bootimg has to be valid Android Boot Image, or the update will abort.\n" + "\n" +- " abootimg --create [-c \"param=value\"] [-f ] -k -r [-s ]\n" ++ " abootimg --create [-c \"param=value\"] [-f ] -k [-r ] [-s ]\n" + "\n" + " create a new image from scratch.\n" + " if the boot image file is a block device, sanity check will be performed to avoid overwriting a existing\n" +@@ -291,7 +291,11 @@ + + if (!(img->header.ramdisk_size)) { + fprintf(stderr, "%s: ramdisk size is null\n", img->fname); +- return 1; ++ /* ++ * On newer AOSP devices, system can be used as rootfs, ++ * resulting in no initrd being used. Thus this case should ++ * not be fatal. ++ */ + } + + unsigned page_size = img->header.page_size; +@@ -932,7 +936,7 @@ + break; + + case create: +- if (!bootimg->kernel_fname || !bootimg->ramdisk_fname) { ++ if (!bootimg->kernel_fname) { + print_usage(); + break; + }