Revert to original upstream, and merge no-initrd patch

This commit is contained in:
Bailey Fox 2019-03-12 03:42:07 -05:00
parent 37207d8540
commit 71902297cc
3 changed files with 54 additions and 11 deletions

View File

@ -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

View File

@ -1,25 +1,31 @@
# Maintainer: ajs124 < aur AT ajs124 DOT de >
# Maintainer: Bailey Fox <bfox200012@gmail.com>
# Contributor: ajs124 < aur AT ajs124 DOT de >
# Contributor: Benoit Favre <benoit.favre@gmail.com>
# Contributor: Thomas Hebb <tommyhebb@gmail.com>
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() {

35
no-initrd.patch Normal file
View File

@ -0,0 +1,35 @@
This patch incorporates a patch made by John Stultz <https://github.com/johnstultz-work> 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 <bootimg> [-c \"param=value\"] [-f <bootimg.cfg>] -k <kernel> -r <ramdisk> [-s <secondstage>]\n"
+ " abootimg --create <bootimg> [-c \"param=value\"] [-f <bootimg.cfg>] -k <kernel> [-r <ramdisk>] [-s <secondstage>]\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;
}