abootimg: add no initrd patch
This makes abootimg usable for newer devices which can potentially have no ramdisk starting with Android 7. Additionally fixes building the package from source.
This commit is contained in:
parent
7a27861811
commit
bc4aed7d9c
|
@ -0,0 +1,37 @@
|
|||
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
|
||||
|
||||
Source: https://aur.archlinux.org/cgit/aur.git/tree/no-initrd.patch?h=abootimg
|
||||
--- a/abootimg.c 2019-03-12 03:16:42.335616885 -0500
|
||||
+++ b/abootimg.c 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;
|
||||
}
|
|
@ -1,17 +1,17 @@
|
|||
# Template file for 'abootimg'
|
||||
pkgname=abootimg
|
||||
version=0.6.20160512
|
||||
revision=2
|
||||
revision=3
|
||||
_commit="1ebeb393252ab5aeed62e34bc439b6728444f06e"
|
||||
wrksrc="abootimg-$_commit-$_commit"
|
||||
wrksrc="abootimg-$_commit"
|
||||
build_style=gnu-makefile
|
||||
makedepends="libblkid-devel"
|
||||
short_desc="Manipulate Android Boot Images"
|
||||
maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="http://gitorious.org/ac100/abootimg"
|
||||
distfiles="https://gitlab.com/ajs124/abootimg/repository/archive.tar.gz?ref=$_commit>archive.tar.gz"
|
||||
checksum=36efff208101a8d04cc84085849cda3300cea71f062c8d425c534e5f85f6cc3f
|
||||
distfiles="https://gitlab.com/ajs124/abootimg/-/archive/$_commit/$_commit.tar.gz"
|
||||
checksum=9f6d84b9d1bf9404168145f59754608c7e568138510fb638467c6b822e94ca07
|
||||
|
||||
do_install() {
|
||||
local BIN
|
||||
|
|
Loading…
Reference in New Issue