pmb.parse.bootimg: fix kernel detection (!1846)
Adjust to new text that "file" outputs for ARM linux kernels: "ARM OpenFirmware FORTH Dictionary..." Make test_bootimg_kernel pass again, which was failing with: AssertionError: assert 'heimdall-isorec' in 'File is not an Android ...
This commit is contained in:
parent
efdfc33dec
commit
a790900e31
|
@ -55,7 +55,8 @@ def bootimg(args, path):
|
||||||
" boot.img file, you could force the analysis"
|
" boot.img file, you could force the analysis"
|
||||||
" with: 'pmbootstrap bootimg_analyze " + path +
|
" with: 'pmbootstrap bootimg_analyze " + path +
|
||||||
" -f'")
|
" -f'")
|
||||||
if "linux kernel" in file_output.lower():
|
if ("linux kernel" in file_output.lower() or
|
||||||
|
"ARM OpenFirmware FORTH Dictionary" in file_output):
|
||||||
raise RuntimeError("File is a Kernel image, you might need the"
|
raise RuntimeError("File is a Kernel image, you might need the"
|
||||||
" 'heimdall-isorec' flash method. See also:"
|
" 'heimdall-isorec' flash method. See also:"
|
||||||
" <https://wiki.postmarketos.org/wiki/"
|
" <https://wiki.postmarketos.org/wiki/"
|
||||||
|
|
Loading…
Reference in New Issue