@@ -14,17 +14,11 @@ Start in a **new empty directory** with plenty of free disk space - at least 30G
1414
15152 . apply downstream patches to dependent layers:
1616
17- - ` poky ` : add support for wic images without partition table (for xspi image)
18-
19- ```
20- pushd sources/poky
21- git am ../meta-solidrun-arm-lx2xxx/patches/poky/0001-wic-add-supppport-for-generating-images-without-part.patch
22- popd
23- ```
17+ TBD.
2418
25193 . Initialise a build directory with example configuration files based on lx2160ardb, and appropriate shell environment variables:
2620
27- source ./setup-env -m lx2160ardb-rev2 -b build_lx2160a-rev2-honeycomb
21+ source ./setup-env -m lx2160ardb-rev2 -b build
2822
29234 . Adapt example configuration files for SolidRun LX2160A Honeycomb:
3024
@@ -43,47 +37,30 @@ Start in a **new empty directory** with plenty of free disk space - at least 30G
4337 +MACHINE ??= 'lx2160a-rev2-honeycomb'
4438 ```
4539
40+ Enable generating sd bootable image (wic). append:
41+
42+ ```
43+ IMAGE_FSTYPES:append = " wic.gz wic.bmap "
44+ # break dependency cycle with core-image-minimal used as initramfs
45+ IMAGE_FSTYPES:remove:pn-core-image-minimal = "wic.gz wic.bmap"
46+ ```
47+
4648 - See below for additional configuration options.
4749
48505. Build nxp image `fsl-image-networking`:
4951
5052 bitbake fsl-image-networking
5153
52- 6. Generate bootable disk image:
53-
54- NXP QorIQ Layers by default do not assemble full bootable disk images,
55- users are expected to install all components to various offsets manually.
56-
57- SolidRun provides [wic](https://docs.yoctoproject.org/dev/dev-manual/wic.html) configuration files for generating bootable disk images from the build artifacts.
58- This process can be launched after a successful build:
59-
60- - SD-Card / eMMC (includes rootfs):
61-
62- wic create lx2160a-bootimg-mmc -e fsl-image-networking
54+ 6. Find resulting image ready for programming:
6355
64- This generates a bootable disk image named `lx2160a-bootimg-mmc.wks-<timestamp>-mmcblk.direct` that is suitable
65- for writing to SD-Card or eMMC data partition, from the previously built `fsl-image-networking` target.
66-
67- - SPI Flash (without rootfs):
68-
69- wic create lx2160a-bootimg-xspi -e fsl-image-networking
70-
71- This generates a bootable spi flash image named `lx2160a-bootimg-xspi.wks-<timestamp>-mmcblk.direct` that is suitable
72- for writing to SPI flash, from the previously built `fsl-image-networking` target's bootloader parts.
73-
74- - SD-Card / eMMC / USB / SATA / NVMe (rootfs only):
75-
76- wic create lx2160a-rootimg -e fsl-image-networking
77-
78- This generates a bootable disk image named `lx2160a-rootimg.wks-<timestamp>-mmcblk.direct` that is suitable
79- for writing to any block storage, from the previously built `fsl-image-networking`.
80- It comes with kernel + rootfs only, use on separate media, together with an SD or SPI boot image.
56+ ls -lh tmp/deploy/images/
57+ ls -lh tmp/deploy/images/lx2160a-clearfog-cx/
8158
8259Note: The build environment and ability to run `bitbake` is lost when closing the terminal or rebooting.
8360It can be restored at any time by entering the build directory and sourcing the aut-generated `SOURCE_THIS` file:
8461
8562```
86- cd <insert-your-workdir >/build_lx2160acex7-rev2
63+ cd <insert-your-workdir >/build
8764source SOURCE_THIS
8865```
8966
@@ -100,7 +77,9 @@ This Layer supports the following machines:
10077| lx2160a-rev2-cex6-evb | SolidRun-internal Evaluation Board, LX2160A Silicon 2.0 (production version) |
10178| lx2160a-rev2-clearfog-cx | LX2160A COM-Express 7 on Clearfog-CX, LX2160A Silicon 2.0 (production version) |
10279| lx2160a-rev2-honeycomb | LX2160A COM-Express 7 on Honeycomb, LX2160A Silicon 2.0 (production version) |
80+ | lx2160a-rev2-half-twins | LX2160A COM-Express 7 on Twins, LX2160A Silicon 2.0 (production version) |
10381| lx2162a-rev2-clearfog | LX2162A SoM on Clearfog |
82+ | lx216xa-solidrun | Generic LX2160A & LX2162A without Bootloader |
10483
10584### Supported Images
10685
@@ -111,6 +90,14 @@ This Layer supports the following images:
11190| fsl-image-networking | Typical networking features and basic cli utilities |
11291| fsl-image-networking-full | Demo of all packages tested by NXP including dpdk, dpdk examples and vpp |
11392
93+ ### Image Types (wic)
94+
95+ This layer can generate a range of image types by `WKS_FILE` in local.conf:
96+
97+ - `lx2160a-bootimg-mmc.wks.in` (default): Bootloader & Kernel & RootFS, for SD or eMMC.
98+ - `lx2160a-bootimg-xspi.wks.in`: Bootloader only, for SPI Flash.
99+ - `lx2160a-rootimg.wks.in`: Kernel & RootFS only, for any block storage.
100+
114101### DDR Clock
115102
116103DDR Clock can be configured in local.conf using `LX2160A_DDR_SPEED`, supported values are:
@@ -152,6 +139,57 @@ Additional configurations are added by patching `mc-utils` package and adding fi
152139
153140## Known Issues
154141
142+ ### `setup-env` script requires bash
143+
144+ On shells other than bash the nxp `setup-env` script fails unintuitively, e.g. below with zsh:
145+
146+ ```
147+ source ./setup-env -m lx2160ardb-rev2 -b build
148+ ./setup-env:159: no matches found: /opt/workspace/YOCTO/lx2k-scarthgap/sources/meta-fsl* /* /* /conf/machine
149+ lx2160ardb-rev2 is not supported by this build setup.
150+ Usage: . setup-env -m <machine >
151+ usage:3: no matches found: /opt/workspace/YOCTO/lx2k-scarthgap/sources/meta-fsl* /* /* /conf/machine
152+
153+ Supported machines:
154+
155+
156+ Optional parameters:
157+ * [-m machine]: the target machine to be built.
158+ * [-j jobs]: number of jobs for make to spawn during the compilation stage.
159+ * [-t tasks]: number of BitBake tasks that can be issued in parallel.
160+ * [-b path]: non-default path of project build folder.
161+ * [-d path]: non-default path of DL_DIR (downloaded source)
162+ * [-c path]: non-default path of SSTATE_DIR (shared state Cache)
163+ * [-h]: help
164+ ```
165+
166+ Ensure using a `bash` shell.
167+
168+ ### permission error in disable_network
169+
170+ Bitbake can fail with a confusing permission error while trying to disable it's child processes network access:
171+
172+ ```
173+ ERROR: PermissionError: [ Errno 1] Operation not permitted
174+
175+ During handling of the above exception, another exception occurred:
176+
177+ Traceback (most recent call last):
178+ File "/opt/workspace/YOCTO/imx8-scarthgap/sources/poky/bitbake/bin/bitbake-worker", line 278, in child
179+ bb.utils.disable_network(uid, gid)
180+ File "/opt/workspace/YOCTO/imx8-scarthgap/sources/poky/bitbake/lib/bb/utils.py", line 1696, in disable_network
181+ with open("/proc/self/uid_map", "w") as f:
182+ PermissionError: [ Errno 1] Operation not permitted
183+
184+ ERROR: Task (virtual:native:/opt/workspace/YOCTO/imx8-scarthgap/sources/poky/meta/recipes-devtools/autoconf/autoconf_2.72e.bb: do_unpack ) failed with exit code '1'
185+ ```
186+
187+ See [Ubuntu Bug 2056555](https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2056555) for more details.
188+
189+ As a workaround apparmor "unprivileged_userns" profile can be temporarily disabled:
190+
191+ sudo apparmor_parser -R /etc/apparmor.d/unprivileged_userns
192+
155193## Maintainer Notes
156194
157195### Patching Linux / U-Boot / ATF / RCW / DPL / DPC / etc.:
0 commit comments