Adding a new component in Flexbuild

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding a new component in Flexbuild

501 Views
LSDK_user
Contributor I

Hi,

I'm trying to add a new 'hello world' component into my build just to see how it's done. I created a hello world c program and add the build into Makefile under packages/apps. However, even though I followed the instructions, new rootfs image does not include my component.

The steps that I followed from the documentation are:

Step1: Add a new CONFIG_APP_<component>=y and configure <component>_repo_url and <component>_repo_branch in configs/build_lsdk.cfg, you can directly create the new component git repository in packages/apps/<your-component> as well, ensure there is an appropriate Makefile in your new component git repository. (I directly create my component under packages/apps instead of git repo, while adding build of this component into Makefile)

Step2: Add build target support for the new component in packages/apps/Makefile

Step3: Run 'flex-builder -c <component_name> -a <arch>' to build new component

Step4: Run 'flex-builder -i merge-component -a <arch>' to merger new component package into distro userland

Step5: Run 'flex-builder -i packrfs -a <arch>' to pack the target distro userland for deployment

After running the last command, I unzip rootfs image to check whether my component is inside, but it's not.

What am I doing wrong? How to check whether my component exists in the new rootfs image?

Thnx

0 Kudos
1 Reply

484 Views
bpe
NXP Employee
NXP Employee

There is nothing wrong with the steps you mentioned, but you need to keep in
mind that LSDK supports several types of target userland images. If you
wish your new program to appear in a specific userland, you need to add your
package to that userland. Therefore, once flex-builder -c <component> -a <arch>
succeeds, study the instructions given Section 4.3.13 of
Layerscape Software Development Kit User Guide. Note that flex-builder usually
displays an error message when it fails to do something. Checking the console
output should give you some ideas on what goes wrong. And last, but not the least,
flex-builder, although we keep it reasonably simple, requires a multistep configuration.
Using an existing LSDK software component as a template can save you time.

Hope this helps,
Platon

 

 

0 Kudos