Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6705CC636CC for ; Tue, 31 Jan 2023 12:34:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0749F85A51; Tue, 31 Jan 2023 13:34:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="bCCCpvkV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB667859BA; Tue, 31 Jan 2023 13:34:37 +0100 (CET) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 93814857E4 for ; Tue, 31 Jan 2023 13:34:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=souajih@baylibre.com Received: by mail-wr1-x42d.google.com with SMTP id q10so14067018wrm.4 for ; Tue, 31 Jan 2023 04:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jK91qSZIC9rXTPpZDw6s0lj03g/+OBu+fRqtUTIOQRM=; b=bCCCpvkV6BQotM2tFR/FLT7qylAFgtOpZZFCeMOtX9vFaUl8+O0zfX7fIgtNa2wD7/ wnmEcPM76nlpi77yB8Guip7/yNSEVLxF0nD37ACYMfInDFtLys3PA8Jc/oeuRMzViAFr ca3kf/Gv1vBZhzuTXvGH5XW5BpUt5d6TMrySPw7AWLDTPh1Vi4BIlUo0ai7yAWJSsQ5J VgxH/wLmxkw+9Z8rZZAZKVmMzYKsacTPOxoSh4dz1zOlrTzR69PB29rKFj2jDxbbZa6Z RFdRC0bIb3kVv5SxlepFlysPMUmqVCD+bvIkzhNIQLlnlym25hvzHHA0Q8LNGcuUDnab hHiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jK91qSZIC9rXTPpZDw6s0lj03g/+OBu+fRqtUTIOQRM=; b=yDFRBEnb683aPb+hPgFJyyzmzuQJrX8Xzu+FTJsO6iItD07GiPXP+Ioh5uOQzBOZeP vAGxIxtfrLLaa6VHgc+SDq1ecFT9SHJoKVTgH+LH71yeHTJsJoLzAqZHEGupFeKlcNxE scHfOVDB5eyRVHNggpLQ6YqGukGxabyyCl2bN7TJbtiOKjrrG5+Wq3VjAnUQf5U58xjM 4WTpuW47djcBhsUEKTUTAZ7Ax/vQCZ5s21tJgj/ooW1wXYIpwHyqNOzWa5LzpM5RDhYu horrM8Xm6idasZVR5WU6J2UBtdrWRzZ7tsmUDM0yeW6/TitH6bBhRs5riIb+GIua2T5Y 8RRg== X-Gm-Message-State: AO0yUKXHcxfEi6Q2iR2i7t9h9VHEo3+dTPuba0VBR4zRpnmkswHw99u+ gt2GEWjn9CHdx6WiEdNH8Z+eAw== X-Google-Smtp-Source: AK7set8oqoVkpio7EW/5Ex+OZccV3KkhEDHfZn1QUo7s1dp+a9JaCYF3dMDDit2WD8loffv/Wp3FxA== X-Received: by 2002:a5d:64a9:0:b0:2bf:cbf5:ac10 with SMTP id m9-20020a5d64a9000000b002bfcbf5ac10mr3886949wrp.11.1675168473892; Tue, 31 Jan 2023 04:34:33 -0800 (PST) Received: from [10.2.3.222] (lfbn-nic-1-295-18.w90-116.abo.wanadoo.fr. [90.116.132.18]) by smtp.gmail.com with ESMTPSA id d3-20020adffbc3000000b002bdd155ca4dsm14585129wrs.48.2023.01.31.04.34.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Jan 2023 04:34:33 -0800 (PST) Message-ID: <63f43819-cfbc-679e-325d-3ecc17df5f83@baylibre.com> Date: Tue, 31 Jan 2023 13:34:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 17/17] test/py: android: extend abootimg test To: Tom Rini Cc: Simon Glass , u-boot@lists.denx.de, sean.anderson@seco.com, r.stratiienko@gmail.com, mkorpershoek@baylibre.com, glaroque@baylibre.com, khilman@baylibre.com References: <20230126160506.1026643-1-souajih@baylibre.com> <20230126160506.1026643-18-souajih@baylibre.com> Content-Language: en-US From: Safae Ouajih In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 27/01/2023 21:37, Tom Rini wrote: > 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 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 >>>> --- >>>> test/py/tests/test_android/test_abootimg.py | 135 ++++++++++++++++++-- >>>> 1 file changed, 122 insertions(+), 13 deletions(-) >>>> >>> Reviewed-by: Simon Glass >>> >>> 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). > Hello Tom, I will add a patch to add that tool in a v3. Thank you, Best regards, Safae