Commit 927ff798 authored by Yi-Yo Chiang's avatar Yi-Yo Chiang
Browse files

unpack_bootimg: Create symlink as alternate vendor ramdisk names

The unpacked vendor ramdisk files are named as
`out/vendor_ramdisk${idx}`. For example,

  out/vendor_ramdisk00
  out/vendor_ramdisk01

The idx reflect the actual order within the vendor_boot.img. In other
words, `cat out/vendor_ramdisk* > entire_ramdisk_section` could recover
the entire vendor ramdisk section within vendor boot, which is exactly
the concatenation of all vendor ramdisks.

This CL adds symlinks as alternate names for these ramdisks, named as
`out/ramdisk/by-name/ramdisk_${ramdisk_name}`. For example,
if vendor_boot contains two ramdisks, the default platform ramdisk whose
name is "" and an additional ramdisk "foo", then,

  out/ramdisk/by-name/ramdisk_ -> ../../vendor_ramdisk00
  out/ramdisk/by-name/ramdisk_foo -> ../../vendor_ramdisk01

Bug: 184400360
Test: unpack_bootimg and check `tree out/`
Change-Id: Ia4068826dffd75b26e78467fc9cb014fc198ff33
parent 8852a3af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment