Commit Graph

12 Commits

Author SHA1 Message Date
Jose Quaresma
0e66dee54a mfgtool-initramfs-image: IMAGE_NAME_SUFFIX should by empty for initramfs
INITRAMFS_IMAGE_NAME stay as before but it assumes that all
images used as initramfs will set IMAGE_NAME_SUFFIX to empty.

https://git.yoctoproject.org/poky/commit/?id=6f6c79029bc2020907295858449c725952d560a1

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
2023-07-05 17:06:25 +00:00
Otavio Salvador
2db70b26e5 classes/mfgtool-initramfs-image: remove u-boot-mfgtool dependency
The initramfs image doesn't use the U-Boot binaries so there is no
reason for a dependency on it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2023-04-12 17:12:18 -03:00
Tom Hochstein
cca3a8a7a6 mfgtool-initramfs-image: Fix override of IMAGE_FSTYPES
The fix to allow the user to override the IMAGE_FSTYPES setting for
mfgtool-initramfs-image [1] does break the default behavior by turning
the setting into a no-op:

```
# $IMAGE_FSTYPES [6 operations]
#   set? /.../sources/meta-freescale/conf/machine/include/imx-base.inc:463
#     "${SOC_DEFAULT_IMAGE_FSTYPES}"
#   set /.../sources/poky/meta/conf/documentation.conf:214
#     [doc] "Formats of root filesystem images that you want to have created."
#   set? /.../sources/poky/meta/conf/bitbake.conf:832
#     "tar.gz"
#   set? /.../sources/meta-freescale/classes/mfgtool-initramfs-image.bbclass:16
#     "cpio.zst.u-boot"
#   override[mxs-generic-bsp]:set? /.../sources/meta-freescale/classes/mfgtool-initramfs-image.bbclass:17
#     "cpio.gz.u-boot"
# pre-expansion value:
#     "${SOC_DEFAULT_IMAGE_FSTYPES}"
IMAGE_FSTYPES="wic.bmap wic.gz"
```

The layer uses an extra variable SOC_DEFAULT_IMAGE_FSTYPES to override
IMAGE_FSTYPES [2], so use it here.

[1] 0a29050 classes: IMAGE_FSTYPES as weak variable in mfgtool-initramfs-image
[2] 541b8b8 imx-base.inc: Move IMAGE_FSTYPES override to a SoC variable

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
2022-06-15 12:38:04 -05:00
Walter Bonetti
0a29050d8b classes: IMAGE_FSTYPES as weak variable in mfgtool-initramfs-image
With `IMAGE_FSTYPES` weak variable, we are able to use `cpio.gz` and
generate fsl-image-mfgtool-initramfs as KERNEL_IMAGETYPES = "fitImage".
This weak variable allows use to choose a suitable values for IMAGE_FSTYPES.
(see from poky: image_types.bbclass)
2022-06-09 21:42:37 -04:00
Tom Hochstein
69fd1cee19 mfgtool-initramfs-image: Switch to zstd compression
The initramfs memory size is limited, so use zstd compression level 10
to cut the cpio archive size by some 30%.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
2022-03-22 17:05:12 -05:00
Otavio Salvador
30f5ce1d21 Generalize overrides subsystem for NXP and Mainline support
Essentially, we extend the overrides to a generic-bsp, nxp-bsp, and
mainline-bsp.

So, for example, the mx8mq override is split into:

- imx-generic-bsp: compatible with every i.MX SoC and both BSP variants
- imx-nxp-bsp: compatible with every i.MX SoC but specific to NXP BSP
- imx-mainline-bsp: compatible with every i.MX SoC but specific to Mainline BSP

- mx8-generic-bsp: compatible with every i.MX8 SoC and both BSP variants
- mx8-nxp-bsp: compatible with every i.MX8 SoC but specific to NXP BSP
- mx8-mainline-bsp: compatible with every i.MX8 SoC but specific to Mainline BSP

- mx8m-generic-bsp: compatible with every i.MX8M SoC and both BSP variants
- mx8m-nxp-bsp: compatible with every i.MX8M SoC but specific to NXP BSP
- mx8m-mainline-bsp: compatible with every i.MX8M SoC but specific to Mainline BSP

- mx8mq-generic-bsp: compatible with every i.MX8MQ SoC and both BSP variants
- mx8mq-nxp-bsp: compatible with every i.MX8MQ SoC8 but specific to NXP BSP
- mx8mq-mainline-bsp: compatible with every i.MX8MQ SoC but specific to Mainline BSP

The extender mechanism is responsible for extending the override list to
include the generic overrides. We can then use the three different
variants to handle the metadata correctly.

Generically speaking, the conversion mainly was automated (with a lot of
back and forth until getting it right).

To convert an existing layer, the following script can be used:

```sh
  git ls-files classes recipes-* \
      | xargs sed -i \
              -e 's,:\(mx[6-8]\w*\),:\1-nxp-bsp,g' \
              -e 's,(\(mx[6-8]\w*\)),(\1-nxp-bsp),g' \
              -e 's,\(mx[6-8]\w*\)|,\1-nxp-bsp|,g' \
              -e 's,|\(mx[6-8]\w*\)),|\1-nxp-bsp),g' \
              \
              -e 's,:\(mx[5s]\w*\),:\1-generic-bsp,g' \
              -e 's,(\(mx[5s]\w*\)),(\1-generic-bsp),g' \
              -e 's,\(mx[5s]\w*\)|,\1-generic-bsp|,g' \
              -e 's,|\(mx[5s]\w*\)),|\1-generic-bsp),g' \
              \
              -e 's,:\(vf\w*\),:\1-generic-bsp,g' \
              -e 's,:\(vf[56]0\w*\),:\1-generic-bsp,g' \
              -e 's,\(vf\w*\)|,\1-generic-bsp|,g' \
              -e 's,|\(vf\w*\)),|\1-generic-bsp),g' \
              -e 's,\(vf[56]0\w*\)|,\1-generic-bsp|,g' \
              -e 's,|\(vf[56]0\w*\)),|\1-generic-bsp),g' \
              \
              -e 's,:\(imx\) ,:\1-nxp-bsp ,g' \
              -e 's,(\(imx\)),(\1-nxp-bsp),g' \
              -e 's,\(imx\)|,\1-nxp-bsp|,g' \
              -e 's,|\(imx\)),|\1-nxp-bsp),g'

  for d in $(find -type d | egrep '/mx[6-8]w*'); do
      git mv $d $d-nxp-bsp
  done

  for d in $(find -type d | egrep '/imx$'); do
      git mv $d $d-nxp-bsp
  done

  for d in $(find -type d | egrep '/mx[5s]w*'); do
      git mv $d $d-generic-bsp
  done
```

Fixes: #791.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2022-02-21 20:06:28 -03:00
Khem Raj
59d36c9832 layer: Convert to new override syntax
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-12 10:08:24 -07:00
Otavio Salvador
54544ad1ff Stop using image_types_uboot class
OE-Core now uses the CONVERSION TYPES to implement the U-Boot support
so the class has been removed. This commit removes the code which
inherits it so allowing it to keep working with the new code base.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-07-31 15:51:45 -03:00
Mirza Krak
4d18c54ff8 mfgtool-initramfs-image.bbclass: do not overwrite IMAGE_CLASSES
Use the += operator instead to add image_types_uboot to IMAGE_CLASSES
which will correctly append that image type.

Signed-off-by: Mirza Krak <mirza.krak@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2017-01-16 16:26:45 -02:00
Otavio Salvador
6bd357c1b3 mfgtool-initramfs-image.bbclass: Fix parsing when using a barebox based machine
When building for cfa100xx machines, for meta-fsl-arm-extra, the
parsing is aborted with:

,----
| ERROR: No IMAGE_CMD defined for IMAGE_FSTYPES entry
|     'barebox.mxsboot-sdcard' - possibly invalid type name or missing
|     support class
| ERROR: Failed to parse recipe:
|     .../sources/meta-fsl-arm/recipes-fsl/images/fsl-image-mfgtool-initramfs.bb
`----

This error was caused by the image not providing all the filesystem
types as in fact it generates a Gzipped CPIO filesystem and does not
inherit the default ones.

To solve the error we ought to include the override for 'mxs' SoC
family so the right setting is used as well in this set of SoCs.

Change-Id: If6e657793ed7af07decac217f6b3371fad1f521c
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2016-04-19 15:06:34 -03:00
Otavio Salvador
31ac693433 mfgtool-initramfs-image.bbclass: Add f2fs feature option
The f2fs feature allows the use of Flash-Friendly File System
during the installation.

The feature is disabled by default as the f2fs-tools is offered by
meta-filesystem layer which shouldn't be made as a hard dependency
of meta-fsl-arm.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-28 23:26:59 -03:00
Otavio Salvador
f8517afc7a Move meta-fsl-arm content to layer root
The meta-fsl-arm is going to be used as the base for this layer. It
contains a clean history and allowing a more granullar set of changes.

This commit is just a rename of all contents of meta-fsl-arm
subdirectory to this layer's root, subsequent changes are based on top
of that.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2015-07-16 15:01:29 -03:00