aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorYi-Yo Chiang <yochiang@google.com>2021-04-20 19:39:25 +0800
committerYi-Yo Chiang <yochiang@google.com>2021-04-23 16:22:24 +0800
commita333d3af92180b85a8ecd1c8a4d3b7933fdd55ab (patch)
tree8475750b0ccf59c6b1197c04177f1456da2728a8 /build
parent33257c127ac8f70f8f3ec5eb8f4f4470c0b162d9 (diff)
downloadcuttlefish-a333d3af92180b85a8ecd1c8a4d3b7933fdd55ab.tar.gz
Reland: assemble_cvd: Use toybox cpio to unpack vendor ramdisk
Since GNU cpio could break the "while cpio -idu; do :;done <cpio.concatenated" loop due to its buffered IO reading too much of the input. Use "mkbootfs" to pack ramdisk as it yields more stable output than "find | cpio". The archive generated by "mkbootfs" has its entry sorted, assigned stable inode number, cleared mtime, uid and gid. Also format some lines of code to make clang-format happy. Bug: 185883642 Bug: 173134558 Test: launch_cvd -kernel_path kernel && check ~/cuttlefish_assembly Test: Run launch_cvd again and check that the repacked stripped_ramdisk.cpio is deterministic. Test: adb reboot recovery Change-Id: Ie9f17787017e4e6a73038c98688a5eb0a1fdbf56
Diffstat (limited to 'build')
-rw-r--r--build/Android.bp2
1 files changed, 2 insertions, 0 deletions
diff --git a/build/Android.bp b/build/Android.bp
index b056360ff..7ef7e3a75 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -59,6 +59,7 @@ cvd_host_tools = [
"lz4",
"make_f2fs",
"metrics",
+ "mkbootfs",
"mkbootimg",
"mkenvimage",
"modem_simulator",
@@ -73,6 +74,7 @@ cvd_host_tools = [
"stop_cvd",
"tapsetiff",
"tombstone_receiver",
+ "toybox",
"unpack_bootimg",
"vnc_server",
"webRTC",