Commit graph

6 commits

Author SHA1 Message Date
cfig
791378cda1
extract_kernel: make it py2/py3 compatible
use py3 for AOSP build, while the script itself can be
executed under py2/py3 environment directly.

TEST: extract info from Pixel 4 kernel

Change-Id: I00db6dabb1ff93f0758017a666c476816caefae7
2021-02-07 17:05:53 +08:00
Yongqin Liu
2c8b8eca5e extract_kernel.py: add support to output compiler information
Test: tested with android-mainline gki kernel from
    https://android.googlesource.com/kernel/prebuilts/mainline/arm64/

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: Ibf3eeb3679b233cd0d54501d385f442e0c0c34ec
2020-08-08 17:15:19 +08:00
Yifan Hong
351b6b811d Let extract_kernel return full kernel release.
Also add relevant soong rules for genrules to use it.

Test: use it in GKI APEX
Bug: 161563386
Change-Id: I04f80ba91748ee5783088d4e20e6438418863f62
2020-07-30 23:53:25 +00:00
Yifan Hong
8b72776511 extract-kernel: Fix indexing
The original script always tries to extract from index
0 even if header is found in positive indices. Fix that.

Also, continue to try other positions if previous run failed.

Test: builds
Bug: 139348603

Change-Id: Ia54fc709de9ae587fc64b59d94a1fa4ae669c14f
2019-09-16 16:30:35 -07:00
Andrew Chant
5d323c1714 Catch unicode decode errors search for kernel ver
If a kernel happens to decode to gibberish (including
non-ascii bytes), catch the decoding error when
searching for the kernel version.

Bug: 137041171
Merged-In: Ic035b3a5c8c80025cb3cede7b0fdcf8a2e5a35fd
Change-Id: Ic035b3a5c8c80025cb3cede7b0fdcf8a2e5a35fd
2019-07-09 17:02:48 +00:00
Yifan Hong
770ab053b0 Add kernel info to compatibility.zip
Add kernel configs / version to verified_assembled_vendor_manifest.xml
so that the kernel of the incoming package can be checked against
the framework. Previously, the running kernel was used instead.

Bug: 111125947
Test: test_extract_kernel
Test: manual OTA on Pixel 3 from build:
      Android P (kernel version 4.9.96)
      to ToT build:
      device kernel version = (manually modified) framework requirement = latest,
      PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS = true

Change-Id: Id524a58e94bdb6bba348ca461c9d33614ce451a9
2019-01-30 13:28:03 -08:00