Software habits

From Rockchip open source Document
Revision as of 06:29, 9 October 2017 by Jacob (talk | contribs) (Created page with " 简单记录下Linux sdk上软件的设计思路和规则, 有需要可以往下面添加   = Loader/Firmware = == 1.[https://github.com/rockchip-linux/rkbin rkbin]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

简单记录下Linux sdk上软件的设计思路和规则, 有需要可以往下面添加

 

Loader/Firmware

1.rkbin

暂时需要注意很多地方我们用了通配符, 所以除了ddr.bin可以传不同频率的, 其他的最好不要一个芯片同时存在两个版本的binary, 不然通配符会选到两个以上的文件。

2.build-debian

build debian里是使用rkbin下的prebuilt tool生成需要的文件, 具体步骤和我们wiki上描述的是一样的。

分区表:https://github.com/rockchip-linux/build/blob/debian/partitions.sh

板级配置: https://github.com/rockchip-linux/build/blob/debian/board_configs.sh

idbloader, uboot.img, trust.img的制作:https://github.com/rockchip-linux/build/blob/debian/mk-uboot.sh

一体image的制作,还有uboot的制作:https://github.com/rockchip-linux/build/blob/debian/mk-image.sh

根据 分区,芯片 封装了 rkdeveloptool的烧写脚本: https://github.com/rockchip-linux/build/blob/debian/flash_tool.sh

3.Build-Yocto

yocto里制作image和debian差不多

烧写脚本(同debian):https://github.com/rockchip-linux/build/blob/yocto/flash_tool.sh

一体image的制作(包含idbloader) : https://github.com/rockchip-linux/meta-rockchip/blob/master/classes/rockchip-gpt-img.bbclass

ddr, trust, loader的载入和预处理: https://github.com/rockchip-linux/meta-rockchip/blob/master/recipes-bsp/rk-binary/rk-binary-native_git.bb

prebuilt工具 (不过很多native prebuilt工具都不能用在yocto的环境下): https://github.com/rockchip-linux/meta-rockchip/blob/master/recipes-bsp/rk-binary/rk-binary-loader_git.bb

需要注意的是yocto里直接用trust_meger打包完后的trust.img, 因为prebuilt trust_meger放到yocto环境用不起来, 大概是库的版本有差。。所以传了新的bl31.bin, 最好这个trust.img和rk-binary-native_git.bb的rev都更新下。

 

Debian

 

Yocto 

yocto的思路是两个layer,meta-rockchip, meta-rockchip-extra

(yocto要编译测试单独软件可以bitbake linux-rockchip -c compile -f, 然后要重新生成image的话就是再执行一遍bitbake xxximage, bitbake -s)

 

meta-rockchip用于添加, 目的是提供rockchip bsp, 大部分的新增软件和软件配置都放在这里,还有kernel/u-boot相关的软件和配置也都是放到这里。这个layer主要避免放置侵入性的修改(放到extra里)。

板级 芯片级配置 : https://github.com/rockchip-linux/meta-rockchip/tree/master/classes

内核 : https://github.com/rockchip-linux/meta-rockchip/tree/master/recipes-kernel

u-boot : https://github.com/rockchip-linux/meta-rockchip/tree/master/recipes-kernel/linux

 

meta-rockchip-extra除了放firmware和 rootfs image配置以外, 最主要的功能就是配置”rockchip sdk“发行版-----就是开机启动, 挂载规则,适用什么版本的软件(比如xserver , wayland,gstreamer), 实际开发者在做改动比较大项目的时候, 这个extra是预期要被他们自己的project layer替代的。

发行版配置 : https://github.com/rockchip-linux/meta-rockchip-extra/tree/master/conf

image : https://github.com/rockchip-linux/meta-rockchip-extra/tree/master/recipes-qt/images

自启规则 : https://github.com/rockchip-linux/meta-rockchip-extra/tree/master/recipes-rk/autostart