完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
准备源码包(prepare source code pacakge)
3.10.79版本代码(3.10.79 version code)u-boot源码(u-boot source code)文件名:rk32-myzr_uboot_2014.10_201803028.tar.bz2 name of file:rk32-myzr_uboot_2014.10_201803028.tar.bz2 kernel源码(kernel source code)文件名:rk32-myzr_kernel_3.10_201803028.tar.bz2 name of file:rk32-myzr_kernel_3.10_201803028.tar.bz2 交叉编译工具 (cross compifer tool)文件名:gcc-arm-eabi-4.6.tar.bz2 name of file:gcc-arm-eabi-4.6.tar.bz2 配置编译环境(configuration of compifer environment) 准备源码(prepare source code)准备源码包 (prepare source code package)1)创建工作目录 create working directory 创建 ~/my-rk3288 作为工作目录 create ~/my-rk3288 as working directory $ mkdir ~/my-rk3288 创建 ~/my-rk3288/02_source 作为源码目录 create ~/my-rk3288/02_source as source code directory $ mkdir ~/my-rk3288/02_source 创建 ~/my-rk3288/03_tools 作为工具目录 create ~/my-rk3288/03_tools as tool directory $ mkdir ~/my-rk3288/03_tools 2)复制源码包到开发主机中 copy source code package to the development host 这一步骤自己采取相应的方式进行。 do it in this step in your own way。 提示:这里将网盘中“02_源码”复制到Linux开发主机的“~/my-rk3288/02_source”,将网盘中“03_工具”复制到Linux开发主机的“~/my-rk3288/03_tools”,将网盘中“01_应用”复制到Linux开发主机的“~/my-rk3288/01_application”。 tip:this step is to copy “02_source code”from network disk to “~/my-rk3288/02_source”in development host, copy “03_tool”to “~/my-rk3288/03_tools, and copy “01_application”to “~/my-rk3288/01_application”。in development host 解压源码包 (decompress source code package)1)解压u-boot源码和内核源码 decompress u-boot source code and kernel source code $ cd ~/my-rk3288/02_source $ tar jxf rk32-myzr_uboot_2014.10_201803028.tar.bz2 $ tar jxf rk32-myzr_kernel_3.10_201803028.tar.bz2 2)解压交叉编译工具 decompress cross compiler tool $ cd ~/my-rk3288/03_tools/ $ tar jxf gcc-arm-eabi-4.6.tar.bz2 开发环境配置(development environment configuration)安装需要的包 (install package needed)1)更新源列表 list of updated source $ sudo apt-get update 更新完成后如下图所示: after update,it will look like below: 2)安装aptitude包管理工具和ia32-libs install aptitude package management tool and ia32-libs 提示:如果编译主机的Linux是32位的,可以跳过此步骤。 tips:if Linux of compiler host is 32bit,you can skip this step。
$ sudo apt-get –y install aptitude
$ sudo aptitude –y install ia32-libs 提示:下图为安装过aptitude和ia32-libs后,再次执行安装命令的截图。 tips:following is the screenshots with re-execution of installation command after installation of aptitude and ia32-libs is finished。 3)安装mkimage工具 install mkimage tool $ sudo apt-get -y install uboot-mkimage 提示:下图为安装过mkimage工具后,再次执行安装命令的截图。 tips:following is the screenshots with re-execution of installation command after installation of mkimage tool is finished。 4)安装ncurses-dev install ncurses-dev 说明:make menuconfig对其具有依赖性质。 instruction:make menuconfig is dependent on it。 $ sudo aptitude -y install ncurses-dev 提示:下图为安装过ncurses-dev工具后,再次执行安装命令的截图。 tips:following is the screenshots with re-execution of installation command after installation of ncurses-dev tool is finished。 编译u-boot(compile u-boot) 进入u-boot源码目录(enter u-boot source code directory)$ cd ~/my-rk3288/02_source/rk32-myzr_uboot_2014.10/ 使配置文件生效(validate configured file)
$ source ~/my-rk3288/03_tools/gcc-arm-eabi-4.6-env
$ echo $ARCH $ echo $CROSS_COMPILE 提示:可看到ARCH和CROSS_COMPILE被设置 tips:you can see that ARCH和CROSS_COMPILE is configured
$${CROSS_COMPILE}gcc –v 提示:执行命令后可以看到终端显示出交叉编译工具的版本信息。如下图: tips:you can see version information of cross compiler tool shown on terminal after execution of command.as below: 清除u-boot配置(remove u-boot configuration)$ make distclean u-boot配置(u-boot configuration)
$ make rk3288_defconfig 编译(compilation)
$ make 提示:这里为了提高编译速度,在make后面加了“-j4”。这里编译的Linux主机是双核4线程的,所以“-j”后面用了4,也就是采用4线程编译。“-j”后面的数字可以根据系统资源分配,但是不应该超过编译主机最大支持的线程数。 Tips:To speed up the compilation,add "-j4" after make.The Linux host used to compile is dual-core ,4 threads .So "-j" is followed by 4, which takes 4 threads to compile. The number behind "-j" is allocated based on system resources,but It should not exceed the maximum threads the host support。
提示:u-boot编译过程大概需要十几秒钟的时间。 tips:u-boot compilation process will take a few minustes or so。 目标文件(target file)编译完成后通过ls命令即可看到编译得到的目标文件RK3288UbootLoader_V2.30.10.bin you can get the compiled file u-boot.bin with ls command after compilation $ ls 编译内核(compile kernel) 进入内核源码目录(enter kernel source directory)$ cd ~/my-rk3288/02_source/rk32-myzr_kernel_3.10/ 使配置文件生效(validate configured file)
$ source ~/my-rk3288/03_tools/gcc-arm-eabi-4.6-env
$ echo $ARCH $ echo $CROSS_COMPILE 提示:可看到ARCH和CROSS_COMPILE被设置 tips:you can see that ARCH和CROSS_COMPILE is configured
$ ${CROSS_COMPILE}gcc –v 提示:执行命令后可以看到终端显示出交叉编译工具的版本信息。如下图: tips:you can see version information of cross compiler tool shown on terminal after execution of command.as below: 准备配置内核(prepare for kernel configuration)
$ make distclean
说明:MY-RK3288-EK314系列评估板使用的配置文件是rk3288-myzr-linux_defconfig instructions:configuration files used for MY-RK3288-EK314 seires of evaluation board is rk3288-myzr-linux_defconfig $ make rk3288-myzr-linux_defconfig 编译内核zImage和设备树dtb(compile kernel)
$ make -j8 rk3288-myzr_rh568_lvds_linux.img 说明:截图中使用了8线程编译。 instruction:8 threads compilation is used in the screenshots。
arch/arm/boot/uImage即为编译得到的目标文件,使用ls命令可查看文件信息。 arch/arm/boot/zImage is the target file through compilation,you can view the file information with ls command。 $ ls arch/arm/boot/zImage -la 编译模块(compile module)
$ make modules 说明:截图中使用了4线程编译。 instruction:4 threads compilation is used in the screenshots。
编译完成后各模块的.ko文件位于代码所在的目录,通过find命令可以找出编译完成的模块,参考命令如下: .ko file of each module is in the directory where code is located after compilation ,you can find the module compiled with find command after compilation,refering command as below: $ find -name *.ko 打包linux-boot.img(pack linux-boot.img) 编译rockchip-mkbootimg(compile rockchip-mkbootimg)1) 创建应用程序目录 create application directory $ mkdir ~/my-rk3288/01_application $ cd ~/my-rk3288/01_application 2) 解压和编译rockchip-mkbootimg unpack and compile rockchip-mkbootimg $ tar jxf rockchip-mkbootimg.tar.bz2 $ cd rockchip-mkbootimg/ $ make && sudo make install 打包initrd.img(pack initrd.img)1) 压缩为img格式 compresse to img format $ cd ~/my-rk3288/01_application/ $ tar jxf initrd.tar.bz2 $ make -C initrd/ 2) 显示结果 show results 打包linux-boot.img(pack linux-boot.img)$ mkbootimg --kernel ../02_source/rk32-myzr_kernel_3.10/arch/arm/boot/zImage --ramdisk initrd.img --second ../02_source/rk32-myzr_kernel_3.10/resource.img -o linux-boot.img 文件系统(file system)文件系统包位于网盘对应的镜像文件夹中。支持的文件系统类型及下载方式可参照《MY-RK3288-EK314 烧录手册》。 file system package is located in image file folder in the network disk。as to type of file system supported and way of download please refer to《MY-RK3288-EK314 buring guide》。 打包批量文件relase_update.img(pack relase_update.img) 编译打包工具(compile packaging tools)$ cd ~/my-rk3288/01_application $ tar jxf rk2918_tools.tar.bz2 $ cd rk2918_tools/ $ make -j4 $ sudo cp afptool img_unpack img_maker mkkrnlimg /usr/local/bin/ 新建文件夹和复制镜像(new folder and copy image)test/Image/的文件对应烧写工具Imagelinux文件,rk3288box-3.10-uboot-ubuntu.parameter.txt重命名为parameter,RESERVED是空文件,RK3288UbootLoader_V2.30.10.bin对应RKLoader.bin,update-script和recover-script在烧写工具复制,package-file的内容重新按对应的文件重命名,如下: The file of "test/Image/" corresponds to the file of "Imagelinux", rk3288box-3.10-uboot-ubuntu.parameter.txt is renamed to parameter, RESERVED is the empty file, RK3288UbootLoader_V2.30.10.bin corresponds to RKLoader.bin, update-script and The recover-script is copied by the burning tool. The contents of the package-file are renamed according to the corresponding file, as follows: $ mkdir ~/my-rk3288/04_rootfs/ $ cd ~/my-rk3288/04_rootfs/ $ mkdir -p ubuntu/Image $ cp test/Image/* ubuntu/Image/ $ cp ubuntu/Image/RKLoader.bin ubuntu/ $ cd ubuntu/ 打包relase_update.img文件(pack relase_update.img)$ cd Image/ $ afptool -pack . ../update.img $ cd .. $ img_maker -rk32 RKLoader.bin update.img relase_update.img |
||
相关推荐
|
||
FacenetPytorch人脸识别方案--基于米尔全志T527开发板
395 浏览 0 评论
飞凌嵌入式ElfBoard ELF 1板卡-CAN编程示例之开发板测试
1061 浏览 0 评论
该问题是用APP给芯海科技的CST92F25芯片发指令是出现的
3583 浏览 1 评论
880 浏览 0 评论
1746 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 12:55 , Processed in 0.670946 second(s), Total 68, Slave 51 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号