先认识一下什么是Lichee: Lichee表示全志科技A10芯片的开发代号,英 [,laɪ'tʃiː] 美 [,laɪ'tʃi] 荔枝的意思, 跟魔兽里面的巫妖lich没有关系哈 ^_^!
目录结构
├── boot
├── buildroot
├── build.sh
├── linux-3.0
├── out
├── README
├── tools
└── u-boot
buildroot
它的主要作用是
- 管理包之间的依赖关系
- 生成ARM交叉工具链
- 生成U-Boot
- 制作根文件系统,可以包含strace, directfb, oprofile等非常丰富的应用软件和测试软件
- 生成最终用于烧写的固件包
它的目录结构如下
buildroot/
|-- board
|-- boot
|-- CHANGES
|-- Config.in
|-- configs
|-- COPYING
|-- dl
|-- docs
|-- fs
|-- linux
|-- Makefile
|-- package
|-- readme.txt
|-- scripts
|-- target
|-- tools
`-- toolchain
其中,boot目录里存放Boot代码,config目录里存放预定义好的配置文件,比如我们的sun4i_defconfig,dl目录里存放已经下载好的软件包,scripts目录里存放buildroot运作的代码,target目录里存放用于生成根文件系统的一些规则文件,在tools目录中存放的是用于打包和量产的pc工具。对于我们来说最为重要的是package目录,里面存放了将近3000个软件包的生成规则,我们可以在里面添加我们自己的软件包或者是中间件。更多关于buildroot的介绍,可以到buildroot的官方网站http://buildroot.uclibc.org/获取。
linux-3.0
目录结构如下,
linux-3.0/
|-- arch
|-- block
|-- build
|-- COPYING
|-- CREDITS
|-- crypto
|-- Documentation
|-- drivers
|-- firmware
|-- fs
|-- include
|-- init
|-- ipc
|-- Kbuild
|-- kernel
|-- lib
|-- MAINTAINERS
|-- Makefile
|-- mm
|-- modules
|-- net
|-- output
|-- README
|-- REPORTING-BUGS
|-- rootfs
|-- samples
|-- scripts
|-- security
|-- sound
|-- tools
|-- usr
`-- virt
以上目录结构跟标准的Linux内核是一致的,除了多一个modules目录。modules目录是我们扩展用来存放没有跟内核的menuconfig集成的外部模块的地方。我们目前放了example, mali和wifi这3个外部模块,其中example是示例用的,mali是我们的3D GPU驱动。
├── cedarx
├── example
├── gps
├── mali
├── nand
└── wifi
├── daily_build
├── pack
└── tools_win
├── android_clean.sh
├── auto_crane_2.6.sh
├── auto_crane_3.0.sh
├── auto_linux_2.6.sh
├── auto_linux_3.0.sh
├── auto_linux_3.0_sun5i_a12.sh
├── auto_linux_3.0_sun5i_a13.sh
├── build_android4.0.sh
└── clean.sh
├── chips
├── out
├── pack
├── pack.bat
├── pctools
├── sun4i_crane_test1.img
└── sun4i_crane_test2.img
├── api
├── arch
├── board
├── boards.cfg
├── build.sh
├── common
├── config.mk
├── COPYING
├── CREDITS
├── disk
├── doc
├── drivers
├── examples
├── fs
├── include
├── lib
├── MAINTAINERS
├── MAKEALL
├── Makefile
├── mkconfig
├── mmc_spl
├── nand_spl
├── nand_sunxi
├── net
├── onenand_ipl
├── post
├── README
├── rules.mk
├── snapshot.commit
├── spl
├── System.map
├── tools
├── u-boot
├── u-boot.bin
├── u-boot.lds
├── u-boot.map
└── u-boot.srec

NAME
build - The top level build script for Lichee Linux BSP
SYNOPSIS
build [-h] | [-p platform] [-k kern_version] [-m module] | pack
OPTIONS
-h Display help message
-p [platform] platform, e.g. sun4i, sun4i-lite, sun4i-debug, sun4i_crane
sun4i: full linux bsp
sun4i-lite: linux bsp with less packages
sun4i-debug: linux bsp for debug
sun4i_crane: android kernel
-k [kern_ver] 2.6.36(default), or 3.0 [OPTIONAL]
-m [module] Use this option when you dont want to build all. [OPTIONAL]
e.g. kernel, buildroot, uboot, all(default)...
pack To start pack program
Examples:
./build.sh -p sun4i
./build.sh -p sun4i_crane
./build.sh -p sun4i-lite
./build.sh pack
我们当前的平台是android,所以platform 要选 sun4i_crane 当前的内核版本是linux3.0 ,所以kern_ver 是3.0 如果不带-k参数,当然就是默认的2.6.36
所以我们的编译命令就是
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ji-chu/77198.html