Hi everybody,
We're working on a DSbD project to provide build support within the Yocto ecosystem,
We've been getting up the curve with the codebase and we see that whilst the current code in GitLab uses build scripts a year or two ago it was making use of some Yocto builds.
Ruben over at the Slack channel referred us to ask here. Could somebody have a chat with me about what was supported with the Yocto build and what the challenges were that lead to the removal of Yocto bitbake support in favour of the build scripts?
Thanks!
Alex Lennon
Director
Dynamic Devices Ltd
Hello Alex,
Yocto in past was used to build the stack , The stack release was a busybox and an android file system , While android had its own build system , and we used the morello ack kernel, Yocto then was only exercised to have only building the firmware.
Having said that the way the firmware was used with the parteners (exercising the binaries) a Yocto based firmware build was a costly things for maintanace and developemnt.Also we didnot use yocto for its USP for managing various dependencies, as firmware (scp,TFA,EDK2) build is indeed very light and simple.
So with this view for firmware build we moved away from yocto to the proprietary based build system , which was easy and simple.
Hi Deepak,
Thanks very much for your response. That's really helpful. Yes I understand why you'd move away from the complexity of Yocto given your use case.
For us, trying to provide some level of Yocto support can you help me to understand exactly what was supported in release 1.1 ?
We've built a core-image-minimal and have a .wic file output.
Should we expect to be able to write this to a USB stick and boot this on the Morello board to a shell?
Will this be running with CHERI protection enabled?
Alex
Hello Alex,morello/release-1.1 supported only the Morello-FVP and was done in initial phases of the project in 2021.We didnot had the Morello Hardware then , and only the Morello FVP platform was supported.
Link to the release-1.1 User Guide : git.morello-project.org/.../user-guide.rstLink to release-1.1 release-notes: https://git.morello-project.org/morello/docs/-/blob/morello/release-1.1/release-notes.rst
For running on the Board potentially you would need the disk Image to be formatted to one of the bootable media and board firmware to the sd card.
Please refer to the user guide : https://git.morello-project.org/morello/docs/-/blob/morello/mainline/user-guide.rst of how to boot up a board and flush out the board-firmware..
best regards
Deepak
We have the image booting to a shell on the Morello board which is great news!
Can you perhaps just help me to understand - should we now be able to compile up a test application, eg that overwrites outside an array on the stack and have CHERI trap this?
We have done a quick test but it seems we're being caught by gcc internal stack smashing trapping at the moment which we need to disable.
I guess you have taken the latest code from mainline or latest code and not trying with release-1.1 , ( as the previous release only supported FVP).
Apologies if it was not clear in previous reply
Basically you need to use the right Tool chains and library for application compiling
You would like to have a look @https://git.morello-project.org/morello/morello-aarch64/ to give you an examples of the tools required.
Disclaimer :This morello-aarch pure cap environment is likely to change so just for the reference purpose
Coming on to running that sample test . Exactly same sample test you have at : https://git.morello-project.org/morello/morello-aarch64/-/blob/morello/mainline/morello/examples/morello-stack-app/main.c
No we have booted release-1.1. This is running a shell OK ?
Please use the Latest release or the mainline to experiment on SoC .
Unfortunately Yocto support has been removed from erverything after 1.1. Is there a problem using 1.1?
Got you - that morello-aarch64 looks really helpful. Will try building the examples :)
Hi Alex,
We have talked a little offline but I'll try to summarise a few aspects here. As Deepak mentioned, 1.1 is an old release and therefore isn't recommended as a base for new developments. However your case is obviously a special one as you would like to experiment with Yocto, and Yocto isn't used from 1.2 onwards. It is therefore sensible for you to explore the 1.1 Yocto setup, however keep in mind that it is a frozen / unmaintained setup. You will likely want to create your own setup when attempting to port Poky in a systematic way.
Everything about Poky in 1.1 is vanilla, there isn't any purecap enablement there. However as Deepak pointed out, you should be able to build (static) example applications using morello-aarch64, which you can run in any Linux filesystem, including Poky.
Most importantly, this forum is not ideal to discuss forward-looking topics such as strategies to port a distro. To that effect, we have just created a new mailing list: https://op-lists.linaro.org/mailman3/lists/linux-morello-distros.op-lists.linaro.org/ Make sure to subscribe to this list and feel free to start a new conversation there. Both kernel and distro experts (including Yocto) are on this list and will try to help you. Note that someone has already inaugurated the list with a Yocto-related question, see the archive: https://op-lists.linaro.org/archives/list/linux-morello-distros@op-lists.linaro.org/
Hope that helps,
Kevin
Thanks very much for the overview Kevin. I'll join the list now and move Yocto chat over there!