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,476件の閲覧回数
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,465件の閲覧回数
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,466件の閲覧回数
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,459件の閲覧回数
s153022
Contributor III

Thanks that worked

0 件の賞賛
返信