Changes between Version 6 and Version 7 of buildroot
- Timestamp:
- 11/08/2018 06:13:55 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
buildroot
v6 v7 1 1 [[PageOutline]] 2 2 3 = Buildroot =3 = Buildroot 4 4 A Linux kernel without a root filesystem (aka rootfs) is useless. There are many sources for root filesystems including complete Linux distributions like Ubuntu (often too big, or limited in arch availability), pre-built root filesystems from vendors (often too limited), root filesystems built manually with Busybox (still often too limited) and more. There are Embedded Linux build systems which try to be more flexible like !OpenEmbedded, Yocto, and OpenWrt but these tend to be not easy to understand or quick to setup. Buildroot tends to be a much more simplistic approach using standard makefiles, can produce a root filesystem in minutes, and has 1000+ userspace libs/apps available. 5 5 6 Using a buildroot rootfs is extremely useful for kernel development because you can build a rootfs small enough to embed it into the kernel via [#initramfs initramfs]. 6 Using a buildroot rootfs is extremely useful for: 7 * small fast booting self-contained systems (the default busybox rootfs is typically ~1.5MB) 8 * kernel development (using [#initrd initrd] or [#initramfs initramfs] options 9 * using its toolchain externally 7 10 8 11 suggested tools to include for kernel development: … … 24 27 * see sections below on configuration tips for various platforms 25 28 29 For platform specific notes see below: 30 * [#ventana Gateworks Ventana (imx6)] 31 * [#newport Gateworks Newport (cn80xx)] 32 26 33 References: 27 34 * https://buildroot.org … … 30 37 31 38 39 [=#initrd] 40 == initrd (initial ramdisk) 41 The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available. The initrd is bound to the kernel and loaded as part of the kernel boot procedure. 42 43 An {{{initrd}}} is a 'cpio' image (an archive created with the Unix {{{cpio}}} tool) thus you need to have 44 BR2_TARGET_ROOTFS_CPIO enabled and optionally one of the compression formats supported by your kernel). 45 46 If using U-Boot 'bootm' be sure to enable BR2_TARGET_ROOTFS_CPIO_UIMAGE which runs 'mkimage' on output/images/rootfs.cpio to create a 'uramdisk'. 47 48 Example booting Linux kernel with device-tree and initrd using U-Boot 'bootm': 49 * Bootloader: 50 {{{#!bash 51 setexpr fdt_addr $loadaddr 52 setexpr linux_addr $fdt_addr + 0x20000 # allow 128KB for FDT 53 setexpr rd_addr $linux_addr + 0x4000000 # allow 64MB for kernel 54 setenv bootargs "console=${console},${baudrate}" 55 setenv fsload tftpboot # for network load 56 $fsload $fdt_addr $fdt_file2 && $fsload $linux_addr uImage && $fsload $rd_addr uramdisk && bootm $linux_addr $rd_addr $fdt_addr 57 }}} 58 - In the above example you can modify fsload to load for your storage interface, device, and filesystem (ie "setenv fsload 'fatload mmc 0:1'" for loading from fist mmc controller first partition fatfs filesystem) 59 60 32 61 [=#initramfs] 33 == initramfs ==34 Using buildroot to create a very small (typically ~1.5MiB) root filesystem that can be embeeded in a kernel via {{{initramfs}}} is very popular for kernel development.62 == initramfs 63 The buildroot root filesystem can also be built statically into a kernel eliminating the need to have a separate kernel and ramdisk as in the [#initrd initrd] option above. 35 64 36 65 To build a rootfs suitable for use as an initramfs: … … 74 103 75 104 [=#busybox] 76 == Busybox config ==105 == Busybox config 77 106 Busybox is used by default for all of the tools in the rootfs built by buildroot. If you want to alter the default configuration of busybox itself you can access it via {{{make menuconfig}}}: 78 107 * Target packages -> !BusyBox -> !BusyBox configuration file to use … … 81 110 82 111 [=#newport] 83 == Newport (CN80XX /CN81XX) ==112 == Newport (CN80XX) 84 113 The following details pertain to buildroot 2017.11 although newer versions will likely be similar if not the same. 85 114 … … 117 146 118 147 [=#ventana] 119 == Ventana (IMX6) ==148 == Ventana (IMX6) 120 149 The following details pertain to buildroot 2017.08 although newer versions will likely be similar if not the same. 121 150