Buildroot
来自百问网嵌入式Linux wiki
buildroot版本为2018.02LTS版 官网使用手册 #https://buildroot.org/downloads/manual/manual.html
配置单板架构
Target options --->
cortex-A8配置
Target Architecture (ARM (little endian)) ---> Target Binary Format (ELF) ---> Target Architecture Variant (cortex-A8) ---> Target ABI (EABIhf) ---> Floating point strategy (VFPv3-D16) ---> ARM instruction set (ARM) --->
cortex-A9配置
Target Architecture (ARM (little endian)) ---> Target Binary Format (ELF) ---> Target Architecture Variant (cortex-A9) ---> [*] Enable NEON SIMD extension support [*] Enable VFP extension support Target ABI (EABIhf) ---> Floating point strategy (VFPv3-D16) ---> ARM instruction set (ARM) --->
构建配置
Build options --->
Commands ---> (/ti/mini437x_buildroot/configs/mini4378_defconfig) Location to save buildroot config ($(TOPDIR)/dl) Download dir ($(BASE_DIR)/host) Host dir Mirrors and Download locations ---> (0) Number of jobs to run simultaneously (0 for auto) [ ] Enable compiler cache [ ] build packages with debugging symbols [*] strip target binaries () executables that should not be stripped () directories that should be skipped when stripping gcc optimization level (optimize for size) ---> [ ] Enable google-breakpad support libraries (shared only) ---> ($(CONFIG_DIR)/local.mk) location of a package override file (board/mini437x/patches) global patch directories Advanced ---> *** Security Hardening Options *** Stack Smashing Protection (None) ---> RELRO Protection (None) ---> Buffer-overflow Detection (FORTIFY_SOURCE) (None) --->
配置工具链
Toolchain type (External toolchain) --->
( ) Buildroot toolchain (X) External toolchain
在线下载的
Toolchain type (External toolchain) ---> *** Toolchain External Options *** Toolchain (Custom toolchain) ---> Toolchain origin (Toolchain to be downloaded and installed) ---> (https://publishing-ap-linaro-org.s3.amazonaws.com/...) ($(ARCH)-linux-gnueabihf) Toolchain prefix External toolchain gcc version (5.x) ---> External toolchain kernel headers series (4.0.x) ---> External toolchain C library (glibc/eglibc) ---> [*] Toolchain has SSP support? [*] Toolchain has RPC support? [*] Toolchain has C++ support? () Extra toolchain libraries to be copied to target [ ] Copy gdb server to the Target *** Host GDB Options *** [ ] Build cross gdb for the host *** Toolchain Generic Options *** [ ] Copy gconv libraries [*] Enable MMU support () Target Optimizations () Target linker options [ ] Register toolchain within Eclipse Buildroot plug-in
系统配置
System configuration --->
Root FS skeleton (default target skeleton) ---> (mini437x) System hostname (Welcome to Mini437x) System banner Passwords encoding (md5) ---> Init system (systemV) ---> /dev management (Dynamic using devtmpfs + mdev) ---> (system/device_table.txt) Path to the permission tables [ ] support extended attributes in device tables [ ] Use symlinks to /usr for /bin, /sbin and /lib [*] Enable root login with password () Root password /bin/sh (bash) ---> [*] Run a getty (login prompt) after boot ---> [*] remount root filesystem read-write during boot (eth0) Network interface to configure through DHCP [*] Purge unwanted locales (C en_US) Locales to keep () Generate locale data [ ] Enable Native Language Support (NLS) -*- Install timezone info (default) timezone list (Etc/UTC) default local time () Path to the users tables (board/mini437x/rootfs-overlay) Root filesystem overlay directories (board/mini437x/post-build.sh) Custom scripts to run before creating filesystem images () Custom scripts to run inside the fakeroot environment (board/mini437x/post-image.sh) Custom scripts to run after creating filesystem images () Extra arguments passed to custom scripts
配置登陆信息
(mini437x) System hostname (Welcome to Mini437x) System banner Passwords encoding (md5) ---> [*] Enable root login with password () Root password
配置登陆串口
[*] Run a getty (login prompt) after boot --->
--- Run a getty (login prompt) after boot (ttyS0) TTY port Baudrate (keep kernel default) ---> (vt100) TERM environment variable () other options to pass to getty
其它配置
(board/mini437x/rootfs-overlay) Root filesystem overlay directories (board/mini437x/post-build.sh) Custom scripts to run before creating filesystem images () Custom scripts to run inside the fakeroot environment (board/mini437x/post-image.sh) Custom scripts to run after creating filesystem images
配置linuxkernel
Kernel --->
[*] Linux Kernel *** Linux kernel in thumb mode may be broken with binutils >= 2.29 *** Kernel version (Custom Git repository) ---> (https://git.coding.net/codebug8/mini437x_kernel.git) URL of custom repository (master) Custom repository version () Custom kernel patches Kernel configuration (Using an in-tree defconfig file) ---> (mini437x) Defconfig name () Additional configuration fragment files Kernel binary format (zImage) ---> Kernel compression format (gzip compression) ---> [*] Build a Device Tree Blob (DTB) (am437x-sk-evm) In-tree Device Tree Source file names () Out-of-tree Device Tree Source file paths [*] Install kernel image to /boot in target [ ] Needs host OpenSSL [ ] Needs host libelf Linux Kernel Extensions ---> Linux Kernel Tools --->
包的管理
Target packages --->
-*- BusyBox (package/busybox/busybox.config) BusyBox configuration file to use? () Additional BusyBox configuration fragment files -*- Show packages that are also provided by busybox [ ] Enable SELinux support [ ] Individual binaries [ ] Install the watchdog daemon startup script Audio and video applications ---> Compressors and decompressors ---> Debugging, profiling and benchmark ---> Development tools ---> Filesystem and flash utilities ---> Fonts, cursors, icons, sounds and themes ---> Games ---> Graphic libraries and applications (graphic/text) ---> Hardware handling ---> Interpreter languages and scripting ---> Libraries ---> Mail ---> Miscellaneous ---> Networking applications ---> Package managers ---> Real-Time ---> Security ---> Shell and utilities ---> System tools ---> Text editors and viewers --->
添加蓝牙工具
[*] bluez-tools [ ] bluez-utils [*] bluez-utils 5.x [*] build OBEX support [*] build CLI client [*] install deprecated tool [*] build experimental obexd plugin [*] build health plugin [*] build midi profile [*] build nfc plugin [*] build sap plugin
[*] openobex
添加wifi工具
> Target packages > Networking applications
[*] wpa_supplicant [*] Enable nl80211 support [*] Enable AP mode [*] Enable Wi-Fi Display [*] Enable mesh networking [*] Enable autoscan [*] Enable EAP [*] Enable HS20 [*] Enable syslog support [*] Enable WPS [*] Install wpa_cli binary [*] Install wpa_client shared library [*] Install wpa_passphrase binary [*] Enable support for old DBus control interface [*] Enable support for new DBus control interface [*] Introspection support
添加http+php工具
添加httpd工具包
[*] lighttpd [*] openssl support [*] zlib support [*] bzip2 support [*] pcre support [*] webdav support
添加php工具包
> Target packages > Interpreter languages and scripting
[*] php
[*] CGI interface
[ ] CLI interface
[*] FPM interface
Extensions --->
[*] Readline
[*] Session
*** Compression extensions ***
[*] zlib
*** Cryptography extensions ***
[ ] hash
[ ] mcrypt
[ ] openssl
*** Database extensions ***
[ ] DBA
[ ] Mysqli
[ ] SQLite3
[ ] PDO
*** Human language and character encoding support ***
*** Gettext support needs NLS enabled ***
[ ] iconv
[ ] intl
[ ] mbstring
*** Image processing ***
[ ] EXIF
[ ] GD
*** Mathematical extensions ***
[ ] BC math
[ ] GMP
*** Other basic extensions ***
[*] JSON
[ ] Tokenizer
*** Other services ***
[ ] cURL
[ ] FTP
[ ] SNMP
[*] sockets
*** Process Control ***
[ ] PCNTL
[*] Posix
External php extensions --->
配置http+php
添加Qt
添加can-until
添加ssh工具
选中包
> Target packages > Networking applications
[*] openssh
修改配置文件
添加mkfs格式化工具
添加自己的bin文件
编译bootloader
Bootloaders --->
[ ] afboot-stm32 [ ] Barebox [ ] mxs-bootlets [ ] s500-bootloader [ ] ts4800-mbrboot [*] U-Boot [ ] CRC image for Altera SoC FPGA (mkpimage) [ ] Environment image ---- [ ] Generate a U-Boot boot script () Device Tree Source file paths [ ] X-loader
u-boot编译
[*] U-Boot Build system (Kconfig) ---> U-Boot Version (Custom Git repository) ---> (https://git.coding.net/codebug8/mini437x_uboot.git) URL of custom repository (master) Custom repository version () Custom U-Boot patches U-Boot configuration (Using an in-tree board defconfig file) ---> (mini437x) Board defconfig () Additional configuration fragment files [*] U-Boot needs dtc [ ] U-Boot needs pylibfdt [ ] U-Boot needs OpenSSL U-Boot binary format ---> [ ] produce a .ift signed image (OMAP) [*] Install U-Boot SPL binary image (MLO) U-Boot SPL/TPL binary image name(s)
系统镜像的生成
[ ] axfs root filesystem [ ] cloop root filesystem for the target device [*] cpio the root filesystem (for use as an initial RAM filesystem) Compression method (gzip) ---> [*] Create U-Boot image of the root filesystem [ ] cramfs root filesystem [*] ext2/3/4 root filesystem ext2/3/4 variant (ext4) ---> () filesystem label (300M) exact size (0) exact number of inodes (leave at 0 for auto calculation) (5) reserved blocks percentage (-O ^64bit) additional mke2fs options Compression method (no compression) ---> [ ] initial RAM filesystem linked into linux kernel [ ] jffs2 root filesystem [ ] romfs root filesystem [ ] squashfs root filesystem [*] tar the root filesystem Compression method (gzip) ---> () other random options to pass to tar [ ] ubi image containing an ubifs root filesystem [ ] ubifs root filesystem [ ] yaffs2 root filesystem