
On Fri, Jan 27, 2023 at 04:51:41PM +0100, Safae Ouajih wrote:
On 27/01/2023 01:55, Simon Glass wrote:
Hi Safae,
On Thu, 26 Jan 2023 at 09:05, Safae Ouajih souajih@baylibre.com wrote:
test_abootimg is extended to include the testing of boot images version 4. For this, boot.img and vendor_boot.img have been generated using mkbootimg tool with setting the header version to 4.
This tests:
- Getting the header version using abootimg
- Extracting the load address of the dtb
- Extracting the dtb start address in RAM
Running test: $ ./test/py/test.py --bd sandbox --build -k test_abootimg
Signed-off-by: Safae Ouajih souajih@baylibre.com
test/py/tests/test_android/test_abootimg.py | 135 ++++++++++++++++++-- 1 file changed, 122 insertions(+), 13 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Question below
diff --git a/test/py/tests/test_android/test_abootimg.py b/test/py/tests/test_android/test_abootimg.py index 43a7099c46..a5c734b9c5 100644 --- a/test/py/tests/test_android/test_abootimg.py +++ b/test/py/tests/test_android/test_abootimg.py @@ -32,6 +32,23 @@ Now one can obtain original boot.img from this hex dump like this:
$ xxd -r -p boot.img.gz.hex boot.img.gz $ gunzip -9 boot.img.gz
+For boot image header version 4, these tests rely on two images that are generated +using the same steps above :
+1- boot.img :
- $ mkbootimg --kernel ./kernel --ramdisk ./ramdisk.img \
--cmdline "cmdline test" --dtb ./dtb.img \
--os_version R --os_patch_level 2019-06-05 \
--header_version 4 --output ./boot.img
+2- vendor_boot.img
- $ mkbootimg --kernel ./kernel --ramdisk ./ramdisk.img \
--cmdline "cmdline test" --dtb ./dtb.img \
--os_version R --os_patch_level 2019-06-05 \
--pagesize 4096 --vendor_ramdisk ./ramdisk.img \
--header_version 4 --vendor_boot ./vboot.img \
Is it possible for us to run these commands in the test, to avoid hassle when we want to change the disk image? See test_ut.py
Hi Simon,
I think that it is possible to run these commands in the test. However,
this requires adding "mkbootimg" android tool with the last updates
Please update tools/docker/Dockerfile to include this tool then, so we can run it in CI (or locally using the images).