summarylogtreecommitdiffstats
path: root/no-initrd.patch
diff options
context:
space:
mode:
authorBailey Fox2019-03-12 03:42:07 -0500
committerBailey Fox2019-03-12 03:42:07 -0500
commit71902297cca0719b95cc0857474ec181f5bf9054 (patch)
tree0bd069ae5bcdcf35ea09ff8800cc1481162d66e5 /no-initrd.patch
parent37207d85402bdf0d29f7dbf6298891f2287566c7 (diff)
downloadaur-abootimg-git.tar.gz
Revert to original upstream, and merge no-initrd patch
Diffstat (limited to 'no-initrd.patch')
-rw-r--r--no-initrd.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/no-initrd.patch b/no-initrd.patch
new file mode 100644
index 000000000000..a523845fbc69
--- /dev/null
+++ b/no-initrd.patch
@@ -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;
+ }