|
| 1 | +This README file has specific instructions for the NXP FRDM-IMX93 development board. |
| 2 | +It is separated from the other README, to allow for more specific instructions, and overrides, that can be useful for demonstrating additional RAUC constructs. |
| 3 | +The author has separated the effort to avoid touching the previous authors architecture, and he would be glad to rearchitect the layer. |
| 4 | + |
| 5 | +The file only specifies things that are not already specified in the README.rst file, and keeps the section numbers identical to those in that file, |
| 6 | +making the gaps here intentional. |
| 7 | +We use the exact same instructions and style. Obviously, you would better add what you need in your respective distro file, and not in local.conf. |
| 8 | + |
| 9 | +The main construct added in this example is a dual (A/B) boot/rootfs partition update scheme, where the disk layout is as follows: |
| 10 | + |
| 11 | +* p1 - BOOT_A |
| 12 | +* p2 - BOOT_B |
| 13 | +* p3 - RES (e.g., for rescue or recovery image) |
| 14 | +* p5 - ROOTFS_A |
| 15 | +* p6 - ROOTFS_B |
| 16 | +* p7 - DATA |
| 17 | + |
| 18 | +This of course means another kickstart file needs to be implemented, but it also means, that another image class, for getting the required boot files (i.e. what U-Boot expects |
| 19 | +to be on a vfat partition) needs to be implemented, so we can populate it and add it to the ``IMAGE_FSTYPES``. |
| 20 | + |
| 21 | +We will introduce a new ``DISTRO_FEATURE``, with the amazing (sorry not sorry) name ``rauc-ab-bootrootfs`` and add all of the above only if it exists, by adding it to the overrides. |
| 22 | +This way, the existing recipe code will remain untouched (I would separate it, but I can't test it, and I just wanted to give this example). |
| 23 | + |
| 24 | +**Note** The implementation could be more elegant if we just used another layer or did not bother about the one boot/2rootfs scheme that is in the overall meta-rauc-community repo. |
| 25 | +However, to keep things simple for comparison, I made the extra effort to have the previous behavior (one boot, 2 rootfs partitions) the default one. |
| 26 | +In the dual boot/rootfs solution (i.e. the ``rauc-ab-bootrootfs`` override), everything is identical except for the partition scheme with the following exceptions: |
| 27 | +* No autogrowing the data partition - and renaming the relevant recipe to a common include. Otherwise more work needs to be done |
| 28 | +* Less hardcoding otherwise |
| 29 | +* U-Boot is fully aware of which device it is running from, and not hardcoded to the sdcard. |
| 30 | + * This can and should be done for the rest of the components - but to keep it very similar to the previous version prior to introducing this feature, the sdcard is assumed. |
| 31 | + This is the first thing I would change if I have time, and it may happen soon enough (hopefully soon enough so you don't even see this line) |
| 32 | + |
| 33 | + |
| 34 | +II. Build NXP Demo System |
| 35 | +=============================================== |
| 36 | + |
| 37 | +For FRDM-IMX93 set in local.conf:: |
| 38 | + |
| 39 | + MACHINE = "imx93frdm" |
| 40 | + INIT_MANAGER = "systemd" |
| 41 | + ACCEPT_FSL_EULA = "1" |
| 42 | + |
| 43 | + #---------------------------------------------- |
| 44 | + # RAUC example. It is strongly recommended to |
| 45 | + # not put these things in your local.conf |
| 46 | + # (it is however good for explanations) |
| 47 | + #---------------------------------------------- |
| 48 | + # Add RAUC support |
| 49 | + DISTRO_FEATURES:append = " rauc" |
| 50 | + IMAGE_FSTYPES:append = " ext4" |
| 51 | + IMAGE_BOOT_FILES:append = " boot.scr" |
| 52 | + WKS_FILE:imx93frdm = "dual-imx-boot-bootpart.wks.in" |
| 53 | + |
| 54 | + # Allow selection of the bundle rather than hardcoding it |
| 55 | + BUNDLE_IMAGE_NAME ?= "core-image-base" |
| 56 | + |
| 57 | + # Add RAUC support for a dual boot, dual rootfs partition scheme |
| 58 | + # First let's add a little cheatcode: make up a little machine override, so that we son't need to use bb.utils.contains more than this time |
| 59 | + MACHINEOVERRIDES:append:imx93frdm = "${@bb.utils.contains('DISTRO_FEATURES', 'rauc-ab-bootrootfs', ':rauc-ab-bootrootfs', '', d)}" |
| 60 | + DISTRO_FEATURES:append = " rauc-ab-bootrootfs" |
| 61 | + BOOT_PARTITION_SIZE_MIB:rauc-ab-bootrootfs = "64" |
| 62 | + RES_PARTITION_SIZE_MIB:rauc-ab-bootrootfs = "10" |
| 63 | + DATA_PARTITION_SIZE_MIB:rauc-ab-bootrootfs = "100" |
| 64 | + IMAGE_CLASSES:append:rauc-ab-bootrootfs = " boot-vfat-image" |
| 65 | + IMAGE_FSTYPES:append:rauc-ab-bootrootfs = " boot.vfat" |
| 66 | + WKS_FILE:rauc-ab-bootrootfs = "imx-2boot-res-2rootfs-data.wks.in" |
| 67 | + |
| 68 | +Build your bundle. It will also build your your respective wic image:: |
| 69 | + |
| 70 | + $ bitbake update-bundle |
| 71 | + |
| 72 | + |
0 commit comments