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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
2,478 次查看
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 项奖励
回复
1 解答
2,467 次查看
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 项奖励
回复
2 回复数
2,468 次查看
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 项奖励
回复
2,461 次查看
s153022
Contributor III

Thanks that worked

0 项奖励
回复