How to add a cross compiled binary in the rootfs at build time.

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

How to add a cross compiled binary in the rootfs at build time.

Jump to solution
1,964 Views
s153022
Contributor III

 

Hi,

I am building MPC8548CDS_20071214-ltib.iso on Centos 7 x86_64

The build is successful and everything is good.

However, I want to compile one of my programs and add the binary in `/sbin` folder in the rootfs . I want to add this at build time.

my app has only one file and I cross-compiled following steps:

powerpc-linux-gnuspe-gcc  hello_world.c -o hello_world

 

Currently, I am mounting the rootfs and manually copying the cross-compiled binary (hello_world) in the `/sbin` folder.

 

Is there any standard way to do this change before the ltib build so that I don't have to mount it and copy it manually after the build?

Best Regards

0 Kudos
Reply
1 Solution
1,953 Views
yipingwang
NXP TechSupport
NXP TechSupport

You could put your file in folder config/platform/mpc8548cds/merge/, then your file will be merged into rootfs after building.

In folder config/platform/mpc8548cds/merge/ you could create "sbin" folder, then put your file in sbin folder.

View solution in original post

0 Kudos
Reply
2 Replies
1,954 Views
yipingwang
NXP TechSupport
NXP TechSupport

You could put your file in folder config/platform/mpc8548cds/merge/, then your file will be merged into rootfs after building.

In folder config/platform/mpc8548cds/merge/ you could create "sbin" folder, then put your file in sbin folder.

0 Kudos
Reply
1,947 Views
s153022
Contributor III

Thanks that worked

0 Kudos
Reply