首页 > 学院 > 开发设计 > 正文

Linux下poky编译2

2019-11-09 18:28:17
字体:
来源:转载
供稿:网友
1、解开pinky的包2、进入pinky目录输入  source poky-init-build-env3、修改build/conf/local.conf ,主要是修改MACHINE,我用samsung的ARM,所以选了fic-gta01,也就是OPENMOKO的平台4、决定编译什么样子的目标,poky 可以编译好多种image,按照手册上的描述有这些:

poky-image-minimal - A small image, just enough to allow a device to boot,

poky-image-base - console only image with full support of target device hardware,

poky-image-core - X11 image with simple apps like terminal, editor and file manager

poky-image-sato - X11 image with Sato theme and Pimlico applications. Also contains terminal, editor and file manager.

poky-image-sdk - X11 image like poky-image-sato but also include native toolchain and libraries needed to build applications on the device itself. Also includes testing and PRofiling tools and debug symbols.

meta-toolchain - This generates a tarball containing a standalone toolchain which can be used externally to Poky. It is self contained and unpacks to the /usr/local/poky directory. It also contains a copy of QEMU and the scripts neccessary to run poky QEMU images.

meta-toolchain-sdk - This includes everything in meta-toolchain but also includes development headers and libraries forming a complete standalone SDK.See the Developing using the Poky SDK and Developing using the Anjuta Plugin sections for more information. 我因为要首先调试硬件和驱动,所以暂时编译了minimal。

5、在build目录下输入:bitbake poky-image-minimal6、在linux下会出现mmap: Permission denied错误,解决办法是输入suecho 4096 > /proc/sys/vm/mmap_min_addr7、提示你没有安装psyco的话,在Linux里只要sudo apt-get install python-psyco 就可以了。8、在整个image编译完成后,如果修改了某个包的代码,要重新编译整个image,可以删除build/tmp/stamps里面相应的文件,然后重新bitbake <image-name> 即可。比如我要重新编译linux-openmoko-2.6.22.5-moko11+svnr3238-r15这个包,就可以删除linux-openmoko-2.6.22.5-moko11+svnr3238-r15.do_compile这个文件,如果想要让其重新打patch,可以删去linux-openmoko-2.6.22.5-moko11+svnr3238-r15.do_prepatch,甚至删去所有以linux-openmoko-2.6.22.5-moko11+svnr3238-r15开头的文件,bitbake就会重新来一遍(包括解包)9、如果只需要重新编译某个包,而不需要重新生成一遍image,可以对其进行单独的编译,比如如果要编译修改后的内核,可以输入:bitbake virtual/kernel -c compile -f (-c 指定了要执行什么命令,-f则表示不管stamps里的标志强制执行)
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表