All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH v7 0/3] Add a new bbclass that abstracts the generation of FIT blobs
@ 2020-05-27  6:05 Nandor Han
  2020-05-27  6:05 ` [OE-core][PATCH v7 1/3] python-fdt: add a recipe for `python3-fdt` package Nandor Han
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Nandor Han @ 2020-05-27  6:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nandor Han

Description
----------
Add a new class and unittest for generating FIT blobs.


Testing
-------

    1. linux-yocto_5.4.bbappend was modified to have the following configuration:

    ```
    inherit fit-image

    KERNEL_IMAGE_NODE[name] = "kernel"
    KERNEL_IMAGE_NODE[description] = "${PF}"
    KERNEL_IMAGE_NODE[data] = '/incbin/("./arch/${ARCH}/boot/zImage")'
    KERNEL_IMAGE_NODE[type] = "kernel"
    KERNEL_IMAGE_NODE[arch] = "${ARCH}"
    KERNEL_IMAGE_NODE[os] = "linux"
    KERNEL_IMAGE_NODE[compression] = "none"
    KERNEL_IMAGE_NODE[load] = "${UBOOT_LOADADDRESS}"
    KERNEL_IMAGE_NODE[entry] = "${UBOOT_ENTRYPOINT}"
    KERNEL_IMAGE_NODE[hash] = "sha256"

    FDT_IMAGE_NODE[name] = "fdt"
    FDT_IMAGE_NODE[description] = "FDT blob"
    FDT_IMAGE_NODE[data] = '/incbin/("./arch/${ARCH}/boot/dts/am335x-bone.dtb")'
    FDT_IMAGE_NODE[type] = "flat_dt"
    FDT_IMAGE_NODE[arch] = "${ARCH}"
    FDT_IMAGE_NODE[compression] = "none"
    FDT_IMAGE_NODE[hash] = "sha256"

    CONF1_CONF_NODE[name] = "conf"
    CONF1_CONF_NODE[description] = "Linux kernel and FDT blob"
    CONF1_CONF_NODE[kernel] = "kernel"
    CONF1_CONF_NODE[fdt] = "fdt"

    FIT_IMAGES_NODE = "KERNEL_IMAGE_NODE FDT_IMAGE_NODE"
    FIT_CONFIGURATIONS_NODE = "CONF1_CONF_NODE"
    FIT_CONFIGURATIONS_NODE[default] = "${@d.getVarFlag('CONF1_CONF_NODE', 'name') or ""}"
    ```
    2. Build the kernel: `bitbake virtual/kernel`
    3. Verify that `image-fit.itb` is present in the build directory: PASS
    4. Disassemble the image using the command: `dtc -I dtb -O dts image-fit.itb`
    5. Verify that the FIT source contains the expected configuration: PASS
    6. Run the unittest using the command: `oe-selftest --run-tests fit_image.FitImage`
    7. Verify that is successfully: PASS
    ```
    2020-05-26 16:54:34,996 - oe-selftest - INFO - SUMMARY:
    2020-05-26 16:54:34,996 - oe-selftest - INFO - oe-selftest () - Ran 13
    tests in 1956.639s
    2020-05-26 16:54:34,997 - oe-selftest - INFO - oe-selftest - OK - All
    required tests passed (successes=13, skipped=0, failures=0, errors=0)
    ```         
 

    Changes since v1:
    ----------------
    - Change the format of short-log to "<target>: <summary>"

    Changes since v2:
    ----------------
    - rename the file from `fit-image` to `fit_image` to successfully export the class functions.
    - adding new sanity checks.
    - add missing dependency.
    - fix a variable reference in a debug log.
    
    Changes since v3:
    ----------------
    - unit-test added
    - class updated to support also properties for U-Boot image

    Changes since v4:
    ----------------
    - remove a wrong patch

    Changes since v5:
    ----------------
    - something went wrong with generation of the patches. regenerate

    Changes since v6:
    ----------------
    - fix the shortlog for one of the patches

Nandor Han (3):
  python-fdt: add a recipe for `python3-fdt` package
  classes: Add a new bbclass that abstracts the generation of FIT blobs
  selftest: add a unit-test for fit-image bbclass

 .../fit-image-test/files/dt-fake.dtb          |   3 +
 .../fit-image-test/files/zImage-fake          |   3 +
 .../fit-image-test/fit-image-test.bb          |  17 +
 meta/classes/fit_image.bbclass                | 387 ++++++++++++++++++
 meta/lib/oeqa/selftest/cases/fit_image.py     | 212 ++++++++++
 .../python/python3-fdt_0.2.0.bb               |  14 +
 6 files changed, 636 insertions(+)
 create mode 100644 meta-selftest/recipes-test/fit-image-test/files/dt-fake.dtb
 create mode 100644 meta-selftest/recipes-test/fit-image-test/files/zImage-fake
 create mode 100644 meta-selftest/recipes-test/fit-image-test/fit-image-test.bb
 create mode 100644 meta/classes/fit_image.bbclass
 create mode 100644 meta/lib/oeqa/selftest/cases/fit_image.py
 create mode 100644 meta/recipes-devtools/python/python3-fdt_0.2.0.bb

-- 
2.24.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-05 10:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27  6:05 [OE-core][PATCH v7 0/3] Add a new bbclass that abstracts the generation of FIT blobs Nandor Han
2020-05-27  6:05 ` [OE-core][PATCH v7 1/3] python-fdt: add a recipe for `python3-fdt` package Nandor Han
2020-05-27  6:06 ` [OE-core][PATCH v7 2/3] classes: Add a new bbclass that abstracts the generation of FIT blobs Nandor Han
2020-05-27  6:06 ` [OE-core][PATCH v7 3/3] selftest: add a unit-test for fit-image bbclass Nandor Han
2020-05-27  6:32 ` ✗ patchtest: failure for Add a new bbclass that abstracts the generation of FIT blobs (rev8) Patchwork
2020-05-27  6:40   ` Nandor Han
2020-06-05  6:34 ` [OE-core][PATCH v7 0/3] Add a new bbclass that abstracts the generation of FIT blobs Richard Purdie
2020-06-05 10:36   ` Nandor Han

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.