cancel
Showing results for 
Search instead for 
Did you mean: 

Custom machine outside /meta-st/

allard.potma
Associate II

Hi,

I want to create a custom machine for my board. I've found the wiki page "how to create your own machine" but this assumes you create your own layer/machine inside meta-st, but I want my machine to be inside /layers/.

I want this outside meta-st because I want to add the machine inside a git repo, meta-st-stm32mp-addons is already a git repo on its own.

I want to setup my distribution package the following way, is this possible, and how?

repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mp1-v23.06.21
repo sync
git clone <git server/repo that contains custom layer + machine> ./layers/meta-mylayer/
DISTRO=openstlinux-weston MACHINE=my-custom-machine(inside meta-mylayer) source layers/meta-st/scripts/envsetup.sh
bitbake st-image-core

 

2 REPLIES 2
Erwan SZYMANSKI
ST Employee

Hello @allard.potma ,
Regarding your wish, I think there are only 2 solutions to get what you want : 

1) (Easiest one) - Create your own manifest based on the one ST provides, to add your own git repo inside, and then avoid to first clone the repo manifest, sync and then clone your own git. It is is not so difficult to modify.

2) (Hard one) - Modify the envsetup script to extend the scope of machine research, but I really think you will face troubles to process like this.

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MScor.1
Associate II

I am also trying to do something similar to OP's goal.

I have also gone through the "create your own machine" guide and I managed to generate a custom machine, except a couple of snags (e.g. CubeMX 6.12 adds a CA7/ element to the generated device tree path, which the guide seems to ignore, I guess it's out of date?).

Now, this work needs to go to source control somehow, and the guide doesn't provide any guidance on how to do that.

  1. One option would be to fork meta-st-stm32mp-addons, point your manifest to your fork and store your work there. This has a minor drawback (the need to keep your fork up-to-date with the official meta-st-stm32mp-addons), but also it seems to be explicitly discouraged by the meta-st-stm32mp-addons repo, since it puts the mx folder in .gitignore
  2. Another option, which would be more "yocto-like" is to have a separate layer that overlays on top of meta-st-stm32mp-addons. Your manifest would always point to the original, ST-provided meta-st-stm32mp-addons, and also point to your own "meta-custom-machine" layer. I am not sure how to go about that, though, because I am not sure about the assumptions that envseup.sh (and more generally, the build system) makes about where machines are defined, where devicetrees are found, etc etc

TL;DR: is there an "ST approved" method to put have the CubeMX project AND generated code under source control?