交叉链sdkx86软件开发工具包.pdfVIP

  • 6
  • 0
  • 约6.8千字
  • 约 9页
  • 2023-10-09 发布于北京
  • 举报
Content 1 Introduction 3 2 Install the x86 toolchain 4 3 Test if “ o world” worked in x86 tform 5 4 Cross-compiling and testing your application 6 4.1 Cross-compiling your application 6 4.2 Testing the binary of your application 6 4.3 Running your own application at startup 6 5 Additional libraries 7 6 Important Notes 8 1 Introduction This provides detailed description to create the cross compile environment and build your application for QNAP NAS. It also provides how to run your own application at startup in QNAP NAS system. 2 Install the x86 toolchain Please follow the steps to install/uninstall toolchain on your host Linux machine To Install: As root, decompress the toolchain to the “/” folder tar zxvf cross-project-x86.u7tar.gz -C / To Uninstall: As root, remove /opt/cross-project/x86 rm –rf /opt/cross-project/x86 3 Test if “ o world” worked in x86 tform Please follow the steps to test “ o world” program A. chroot /opt/cross-project/x86/sys-root B. cd /src/ o_world_project C. gcc -o o_world o_world.c D. scp o_world admin@xxx.xxx.xxx.xxx:/root (xxx.xxx.xxx.xxx is your NAS IP) E. ssh admin@xxx.xxx.xxx.xxx /root/ o_world (xxx.xxx.xxx.xxx is your NAS IP) (It works if you can see the output “ o World!!”) 4 Cross-compiling and testing your application 4.1 Cross-compiling your application Please follow the steps A. Put your project in /opt/cross-project/x86/sys-root/src/myproject B. chroot /opt/cross-project/x86/sys-root C. cd /src/myproject D. use gcc or make to compile your project 4.2 Testing the binary of your application Please follow the steps A. scp y

文档评论(0)

1亿VIP精品文档

相关文档