### BusyBox/SysV Init Start Script Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/adding-packages-directory.adoc This is a reference example for a BusyBox/SysV init start script. It should follow the style and composition of existing scripts like S01syslogd. Ensure the start order number (NN) is chosen carefully to respect dependencies. ```sh include::S01syslogd[] ``` -------------------------------- ### Package Makefile Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/customize-outside-br.adoc Defines version, site, and license for 'pkg-1', and includes an init script installation. ```makefile PKG_1_VERSION = 1.2.3 PKG_1_SITE = /some/where/to/get/pkg-1 PKG_1_LICENSE = blabla define PKG_1_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 $(PKG_1_PKGDIR)/S99my-daemon \ $(TARGET_DIR)/etc/init.d/S99my-daemon endef $(eval $(autotools-package)) ``` -------------------------------- ### Download and Start Buildroot VM (Linux/macOS) Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/getting.adoc Use this command to download the Vagrantfile and start a Buildroot virtual machine on Linux or macOS. ```bash curl -O https://buildroot.org/downloads/Vagrantfile; vagrant up ``` -------------------------------- ### Init System Selection Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/customize-outside-br.adoc Selects a custom init system and potentially a skeleton init if the default skeleton is chosen. ```kconfig config BR2_INIT_MINE bool "my custom init" select BR2_PACKAGE_MY_INIT select BR2_PACKAGE_SKELETON_INIT_MINE if BR2_ROOTFS_SKELETON_DEFAULT ``` -------------------------------- ### Example flasher.sh Usage Source: https://github.com/buildroot/buildroot/blob/master/board/atmel/readme.txt An example of how to use the flasher.sh script for an out-of-tree build targeting the sama5d3 Xplained board. ```bash board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained ``` -------------------------------- ### Build System Image Source: https://github.com/buildroot/buildroot/blob/master/board/acmesystems/acqua-a5/readme.txt Execute this command to start the build process for the system image after configuration. ```bash $ make ``` -------------------------------- ### U-Boot Console Output Example Source: https://github.com/buildroot/buildroot/blob/master/board/sipeed/maix-bit/readme.txt This is an example of the console output you can expect after successfully programming and rebooting the Sipeed Maix-Bit board with U-Boot. ```text U-Boot 2022.04 (May 24 2022 - 17:08:34 +0900) DRAM: 8 MiB Core: 34 devices, 17 uclasses, devicetree: separate WDT: Not starting watchdog@50400000 MMC: spi@53000000:slot@0: 0 Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment In: serial@38000000 Out: serial@38000000 Err: serial@38000000 Hit any key to stop autoboot: 0 1668562 bytes read in 933 ms (1.7 MiB/s) 10468 bytes read in 11 ms (928.7 KiB/s) ``` -------------------------------- ### Example .hash file content Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/adding-packages-directory.adoc This example demonstrates the format of a .hash file, including multiple hash types for a single file, hashes for binary blobs and patches, and handling of archives without hashes. It also shows how to include comments for locally computed hashes or version-specific notes. ```makefile # Hashes for libfoo-1.2.3.tar.bz2 published by upstream sha1 a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0 libfoo-1.2.3.tar.bz2 sha256 f1e2d3c4b5a6f7e8d9c0b1a2f3e4d5c6b7a8f9e0d1c2b3a4f5e6d7c8b9a0f1e2 libfoo-1.2.3.tar.bz2 # Hashes for a binary blob # Locally computed sha256 hash, as upstream only provided md5 md5 1234567890abcdef1234567890abcdef myblob.bin sha256 abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef myblob.bin # Hash for a downloaded patch sha256 fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210 foo.patch # Archive with no hash provided by upstream # sha256 ... another-archive.zip ``` -------------------------------- ### U-Boot Console Output Example Source: https://github.com/buildroot/buildroot/blob/master/board/avnet/s6lx9_microboard/readme.txt This is an example of the U-Boot console output during the TFTP transfer and kernel loading process. ```text U-Boot Start:0x83f00000 SF: Got idcode 20 ba 18 10 01 *** Warning - bad CRC, using default environment Net: Xilinx_Emaclite MAC: 00:0a:35:00:63:37 U-BOOT for Avnet-LX9-Microboard-AXI-tiny-13.1 BOOTP broadcast 1 DHCP client bound to address 192.168.11.122 Hit any key to stop autoboot: 0 U-Boot-PetaLinux> tftp br12.2a.ub Using Xilinx_Emaclite device TFTP from server 192.168.11.10; our IP address is 192.168.11.122 Filename 'br12.2a.ub'. Load address: 0x80002000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################## done Bytes transferred = 5207724 (4f76ac hex) U-Boot-PetaLinux> bootm ## Booting kernel from Legacy Image at 80002000 ... Image Name: Linux-3.1.0 Image Type: MicroBlaze Linux Kernel Image (uncompressed) Data Size: 5207660 Bytes = 5 MB Load Address: 80000000 Entry Point: 80000000 Verifying Checksum ... OK Loading Kernel Image ... OK OK ## Transferring control to Linux (at address 80000000), 0x80000000 ramdisk 0x00000000, FDT 0x00000000... Early console on uartlite at 0x40600000 ..... boot log skipped Welcome to Microblaze Buildroot Microblaze login: ``` -------------------------------- ### Download and Start Buildroot VM (Windows PowerShell) Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/getting.adoc Use this PowerShell command to download the Vagrantfile and start a Buildroot virtual machine on Windows. ```powershell (new-object System.Net.WebClient).DownloadFile("https://buildroot.org/downloads/Vagrantfile","Vagrantfile"); vagrant up ``` -------------------------------- ### Run QEMU Emulation for PPC e500mc Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/ppc-e500mc/readme.txt Use this command to start the QEMU system emulation for the ppce500 board with an e500mc CPU. Ensure the kernel and root filesystem are correctly built and located in the output/images directory. The login prompt will appear in the terminal after emulation starts. ```bash qemu-system-ppc -M ppce500 -cpu e500mc -m 256 -kernel output/images/uImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -net nic,model=virtio-net-pci -net user -append "console=ttyS0 rootwait root=/dev/vda" -serial mon:stdio -nographic # qemu_ppc_e500mc_defconfig ``` -------------------------------- ### Package Configuration Example (Config.in) Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/customize-outside-br.adoc Defines a boolean configuration option for a package named 'pkg-1' and provides help text for it. ```kconfig config BR2_PACKAGE_PKG_1 bool "pkg-1" help Some help about pkg-1 ``` -------------------------------- ### Package Provides Example (Config.in) Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/customize-outside-br.adoc Defines a configuration option that provides the 'jpeg' functionality, defaulting to 'my-jpeg' if 'BR2_PACKAGE_MY_JPEG' is selected. ```kconfig config BR2_PACKAGE_PROVIDES_JPEG default "my-jpeg" if BR2_PACKAGE_MY_JPEG ``` -------------------------------- ### Run QEMU MIPS64R6EL Malta Emulation Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/mips64r6el-malta/readme.txt Use this command to start the QEMU system emulation for the MIPS64R6EL Malta board. Ensure the kernel and root filesystem are correctly built and located in the output/images directory. The login prompt will appear in the terminal after QEMU starts. ```bash qemu-system-mips64el -M malta -cpu I6400 -kernel output/images/vmlinux -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda" -nographic # qemu_mips64r6el_malta_defconfig ``` -------------------------------- ### Basic Go Package Makefile Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/adding-packages-golang.adoc This is a minimal Makefile example for a Go package. It defines the package version, site, license, and invokes the `golang-package` macro to generate build rules. ```makefile ################################################################################ # # foo # ################################################################################ FOO_VERSION = 1.0 FOO_SITE = $(call github,bar,foo,$(FOO_VERSION)) FOO_LICENSE = BSD-3-Clause FOO_LICENSE_FILES = LICENSE $(eval $(golang-package)) ``` -------------------------------- ### Config.in Entry Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/writing-rules.adoc Defines a configurable option in Buildroot's configuration system. Ensure proper indentation and wrapping for help text. ```kconfig config BR2_PACKAGE_LIBFOO bool "libfoo" depends on BR2_PACKAGE_LIBBAZ select BR2_PACKAGE_LIBBAR help This is a comment that explains what libfoo is. The help text should be wrapped. http://foosoftware.org/libfoo/ ``` -------------------------------- ### Provider .mk File Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/adding-packages-virtual.adoc The .mk file for a provider package must declare the SOME_PROVIDER_PROVIDES variable, listing the virtual packages it implements. ```makefile SOME_PROVIDER_PROVIDES = something-virtual ``` -------------------------------- ### Run QEMU x86 Emulation Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/x86/readme.txt Use this command to start the QEMU system emulation. Ensure the paths to 'bzImage' and 'rootfs.ext2' are correct. The 'virtio' model is recommended for network and disk interfaces for better performance. ```bash qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user ``` -------------------------------- ### Connect GDB to QEMU Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/arm-vexpress-tz/readme.txt Steps to launch the GDB client and connect to the QEMU GDB server. ```bash ./output/host/bin/arm-linux-gdb ``` -------------------------------- ### Basic CMake Package Makefile Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/adding-packages-cmake.adoc Defines a CMake-based package 'libfoo' with version, source, site, staging/target installation preferences, custom CMake options, and dependencies. It concludes by invoking the cmake-package macro to generate build rules. ```makefile ################################################################################ # # libfoo # ################################################################################ LIBFOO_VERSION = 1.0 LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz LIBFOO_SITE = http://www.foosoftware.org/download LIBFOO_INSTALL_STAGING = YES LIBFOO_INSTALL_TARGET = NO LIBFOO_CONF_OPTS = -DBUILD_DEMOS=ON LIBFOO_DEPENDENCIES = libglib2 host-pkgconf $(eval $(cmake-package)) ``` -------------------------------- ### Run QEMU with EBBR Firmware and OS Installer ISO Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-ebbr/readme.txt Command to run Qemu for installing a new OS using an installer ISO. The installer will be available as /dev/vda and the destination disk as /dev/vdb within the OS. ```bash qemu-system-aarch64 \ -M virt,secure=on,acpi=off \ -bios output/images/flash.bin \ -cpu cortex-a53 \ -device virtio-blk-device,drive=hd1 \ -device virtio-blk-device,drive=hd0 \ -device virtio-net-device,netdev=eth0 \ -device virtio-rng-device,rng=rng0 \ -drive file=,if=none,format=raw,readonly=on,id=hd0 \ -drive file=disk.qcow2,if=none,id=hd1 \ -m 2048 \ -netdev user,id=eth0 \ -nographic \ -object rng-random,filename=/dev/urandom,id=rng0 \ -rtc base=utc,clock=host \ -smp 2 ``` -------------------------------- ### Configure and Build Buildroot Image Source: https://github.com/buildroot/buildroot/blob/master/board/freescale/imx93-evk/readme.txt Use these commands to configure Buildroot with the imx93-evk defconfig and then build the system image. ```bash make imx93-evk_defconfig ``` ```bash make ``` -------------------------------- ### Copy PRU Example Firmware Source: https://github.com/buildroot/buildroot/blob/master/package/pru-software-support/readme.txt Copy a PRU example output file to the directory where the kernel looks for firmware. This is a common step for testing specific PRU examples. ```bash # cp /usr/share/pru-software-support/am335x/PRU_gpioToggle/gen/PRU_gpioToggle.out \ /lib/firmware/am335x-pru0-fw ``` -------------------------------- ### Install SeaBIOS on Debian Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-sbsa/readme.txt If using a distribution-provided QEMU, install the SeaBIOS package for necessary drivers. ```bash # apt install seabios ``` -------------------------------- ### Run QEMU x86_64 Emulation Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/x86_64/readme.txt Use this command to start the QEMU system emulation. Ensure the kernel and rootfs paths are correct. The 'rootwait', 'root=/dev/vda', and 'console' parameters are essential for booting the system. ```bash qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append "rootwait root=/dev/vda console=tty1 console=ttyS0" -serial stdio -net nic,model=virtio -net user ``` -------------------------------- ### Toolchain Dependency Comment Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/adding-packages-directory.adoc Example of a comment used to explain toolchain option dependencies for a package. ```kconfig foo needs a toolchain w/ featA, featB, featC ``` -------------------------------- ### Configure and Build Buildroot Image Source: https://github.com/buildroot/buildroot/blob/master/board/freescale/imx8mp-evk/readme.txt Use these commands to configure Buildroot with the imx8mp-evk defconfig and then build the image. ```bash make imx8mp-evk_defconfig ``` ```bash make ``` -------------------------------- ### Configure and Build Buildroot Image Source: https://github.com/buildroot/buildroot/blob/master/board/freescale/imx8mm-evk/readme.txt Use these commands to configure Buildroot with the imx8mm-evk default configuration and then build the image. ```bash make imx8mm-evk_defconfig make ``` -------------------------------- ### Start DHCP Client Source: https://github.com/buildroot/buildroot/blob/master/board/warp7/readme.txt Starts the DHCP client to obtain an IP address for the specified Wi-Fi interface. ```bash # udhcpc -i wlan0 ``` -------------------------------- ### Boot the System Source: https://github.com/buildroot/buildroot/blob/master/board/openblocks/a6/readme.txt Initiates the boot process after all configurations and writes to NAND have been completed. ```bash boot ``` -------------------------------- ### Start wpa_supplicant Source: https://github.com/buildroot/buildroot/blob/master/board/warp7/readme.txt Starts the wpa_supplicant service to manage Wi-Fi connections using the specified interface and configuration file. ```bash # wpa_supplicant -iwlan0 -c /etc/wpa.conf & ``` -------------------------------- ### Configure Buildroot for LicheePi Nano Source: https://github.com/buildroot/buildroot/blob/master/board/sipeed/licheepi_nano/readme.txt Run this command to set up the Buildroot environment with the LicheePi Nano configuration. This prepares the system for building the image. ```bash make sipeed_licheepi_nano_defconfig ``` -------------------------------- ### Buildroot Configuration and Build Source: https://github.com/buildroot/buildroot/blob/master/board/orangepi/orangepi-zero3/readme.txt Run these commands to set up the default configuration for the Orangepi Zero3 and then build the project. An internet connection is required for downloading sources. ```bash make orangepi_zero3_defconfig ``` ```bash make ``` -------------------------------- ### Example Package Source Directory Overrides Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/using-buildroot-development.adoc Concrete examples of setting the override source directory for the Linux kernel and BusyBox. ```makefile LINUX_OVERRIDE_SRCDIR = /home/bob/linux/ BUSYBOX_OVERRIDE_SRCDIR = /home/bob/busybox/ ``` -------------------------------- ### Genimage Configuration Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/writing-rules.adoc Example of a genimage.cfg file defining image layout for bootable media, including EFI partitions and rootfs. ```genimage.cfg image efi-part.vfat { vfat { file EFI { image = "efi-part/EFI" } file Image { image = "Image" } } size = 32M } image sdimage.img { hdimage { } partition u-boot { image = "efi-part.vfat" offset = 8K } partition root { image = "rootfs.ext2" size = 512M } } ``` -------------------------------- ### Run QEMU Emulation for LX60 (defconfig) Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/xtensa-lx60/readme.txt Use this command to start QEMU emulation for the Xtensa LX60 board with the default configuration. The login prompt will appear in the terminal. ```bash qemu-system-xtensa -M lx60 -cpu dc233c -monitor null -nographic -kernel output/images/Image.elf # qemu_xtensa_lx60_defconfig ``` -------------------------------- ### Buildroot Configuration and Build Source: https://github.com/buildroot/buildroot/blob/master/board/bananapi/bananapi-m2-ultra/readme.txt Run these commands to set up the default configuration for the Bananapi M2 Ultra and initiate the build process. An internet connection is required for downloading sources. ```bash make bananapi_m2_ultra_defconfig ``` ```bash make ``` -------------------------------- ### Install SYSLINUX Bootloader MBR Source: https://github.com/buildroot/buildroot/blob/master/board/technologic/ts5500/readme.txt Copy the Master Boot Record (MBR) to the Compact Flash card device to prepare for SYSLINUX installation. ```bash # cat output/images/syslinux/mbr.bin > /dev/sdX ``` -------------------------------- ### Configure and Build Buildroot Image Source: https://github.com/buildroot/buildroot/blob/master/board/freescale/imx8mn-evk/readme.txt Use these commands to configure Buildroot with the imx8mn-ddr4-evk defconfig and then build the image. ```bash make imx8mn-ddr4-evk_defconfig make ``` -------------------------------- ### Mender Configuration Example for Hosted Mender Source: https://github.com/buildroot/buildroot/blob/master/package/mender/readme.txt Example mender.conf options for connecting to Hosted Mender. Ensure the TenantToken is replaced with your actual token. ```json { ... "ServerURL": "https://hosted.mender.io", "TenantToken": "" ... ``` -------------------------------- ### Run QEMU Emulation for ppc64le pseries Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/ppc64le-pseries/readme.txt Use this command to start the QEMU emulation for the ppc64le pseries architecture. Ensure the kernel and rootfs paths are correct. The login prompt will appear in the terminal. ```shell qemu-system-ppc64 -M pseries,x-vof=on -cpu POWER8 -m 256 -kernel output/images/vmlinux -append "console=hvc0 rootwait root=/dev/sda" -drive file=output/images/rootfs.ext2,if=scsi,index=0,format=raw -serial stdio -display curses ``` -------------------------------- ### Install SYSLINUX Bootloader Files Source: https://github.com/buildroot/buildroot/blob/master/board/technologic/ts5500/readme.txt Install the SYSLINUX bootloader files into the mounted partition of the Compact Flash card. This command requires the extlinux utility. ```bash # mount /dev/sdX1 /mnt # output/host/sbin/extlinux --install /mnt/boot/syslinux # umount /mnt ``` -------------------------------- ### Run QEMU Emulation for MIPS64EL Malta Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/mips64el-malta/readme.txt Use this command to start the QEMU system emulation for the MIPS64EL Malta board. Ensure the kernel and root filesystem paths are correct. The login prompt will appear in the terminal where QEMU was launched. ```bash qemu-system-mips64el -M malta -kernel output/images/vmlinux -serial stdio -drive file=output/images/rootfs.ext2,format=raw -append "rootwait root=/dev/sda" # qemu_mips64el_malta_defconfig ``` -------------------------------- ### U-Boot Console Output Example Source: https://github.com/buildroot/buildroot/blob/master/board/sipeed/maix-dock/readme.txt This is an example of the output seen in the U-Boot console after flashing. It shows memory information, device detection, and bootloader status. ```text U-Boot 2022.04 (Apr 21 2022 - 15:59:50 +0900) DRAM: 8 MiB Core: 34 devices, 17 uclasses, devicetree: separate WDT: Not starting watchdog@50400000 MMC: spi@53000000:slot@0: 0 Loading Environment from SPIFlash... SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment In: serial@38000000 Out: serial@38000000 Err: serial@38000000 Hit any key to stop autoboot: 0 1717730 bytes read in 957 ms (1.7 MiB/s) 10382 bytes read in 11 ms (920.9 KiB/s) ``` -------------------------------- ### Configure Custom psu_init_gpl File in menuconfig Source: https://github.com/buildroot/buildroot/blob/master/board/zynqmp/readme.txt Navigate the Buildroot menuconfig to specify a custom psu_init_gpl.c/h file for U-Boot, which is essential for generating a functional boot.bin image. This is typically found under Bootloaders -> U-Boot. ```bash BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE ``` -------------------------------- ### Install Grub2 for BIOS Platforms Source: https://github.com/buildroot/buildroot/blob/master/boot/grub2/readme.txt Installs Grub2 onto a disk image for BIOS-based systems. Ensure sufficient free space before the first partition for Grub2. ```bash sudo ./output/host/sbin/grub-bios-setup \ -b ./output/host/lib/grub/i386-pc/boot.img \ -c ./output/images/grub.img -d . "$loop_dev" ``` -------------------------------- ### Create Destination Disk Image for OS Installation Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/aarch64-ebbr/readme.txt Command to create a qcow2 disk image of a specified size, which will serve as the destination for installing a new OS. ```bash qemu-img create -f qcow2 disk.qcow2 10G ``` -------------------------------- ### Run Qt5 Hellowindow OpenGL Demo Source: https://github.com/buildroot/buildroot/blob/master/board/beagleboard/beaglebone/readme.txt Set environment variables and run the Qt5 hellowindow opengl demo. Ensure the eglfs_kms_cfg.json path is correct for your system. ```bash # export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs_kms_cfg.json # export QT_QPA_PLATFORM=eglfs # export QT_QPA_EGLFS_INTEGRATION=none # /usr/lib/qt/examples/opengl/hellowindow/hellowindow ``` -------------------------------- ### Configure and Build Cubieboard1 Source: https://github.com/buildroot/buildroot/blob/master/board/cubietech/cubieboard1/readme.txt Run these commands to configure the build for Cubieboard1 and then compile the project. ```bash make cubieboard1_defconfig make ``` -------------------------------- ### External Tree Directory Structure Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/customize-outside-br.adoc An example layout for an external Buildroot tree, demonstrating the placement of key files and directories like external.desc, Config.in, and package subdirectories. ```makefile /path/to/br2-ext-tree/ |- external.desc | |name: BAR_42 | |desc: Example br2-external tree | `---- | |- Config.in | |source "$BR2_EXTERNAL_BAR_42_PATH/toolchain/toolchain-external-mine/Config.in.options" | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-1/Config.in" | |source "$BR2_EXTERNAL_BAR_42_PATH/package/pkg-2/Config.in" | |source "$BR2_EXTERNAL_BAR_42_PATH/package/my-jpeg/Config.in" | | | |config BAR_42_FLASH_ADDR | | hex "my-board flash address" ``` -------------------------------- ### Run AST2500 EVB with QEMU (Kernel, Initrd, DTB) Source: https://github.com/buildroot/buildroot/blob/master/board/aspeed/ast2500-evb/readme.txt This QEMU command boots the AST2500 EVB simulation using a separate kernel, initrd, and device tree blob. ```bash qemu-system-arm -M ast2500-evb \ -kernel output/images/zImage \ -initrd output/images/rootfs.cpio \ -dtb output/images/aspeed-ast2500-evb.dtb \ -nographic ``` -------------------------------- ### Run QEMU MCF5208evb Emulation Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/m68k-mcf5208/readme.txt Use this command to start the QEMU system emulation for the MCF5208evb board with a specific kernel image. The login prompt will appear in the terminal after QEMU starts. ```bash qemu-system-m68k -M mcf5208evb -cpu m5208 -kernel output/images/vmlinux -nographic ``` -------------------------------- ### Create Custom Boot Configuration Source: https://github.com/buildroot/buildroot/blob/master/board/zynq/readme.txt Create a 'uEnv.txt' file on the root of the SD card to customize the booting procedure. Use the '=' format, one per line. ```text kernel_image=myimage modeboot=myboot myboot=... ``` -------------------------------- ### Kernel Boot Output Example Source: https://github.com/buildroot/buildroot/blob/master/board/canaan/kd233/readme.txt This is an example of the console output observed after the kernel image is programmed and the board is rebooted. It shows the Linux kernel version, machine model, and early boot messages. ```text [ 0.000000] Linux version 5.17.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #2 SMP Thu Apr 21 16:40:44 JST 2022 [ 0.000000] Machine model: Kendryte KD233 [ 0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8') [ 0.000000] printk: bootconsole [sifive0] enabled [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080000000-0x00000000807fffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080000000-0x00000000807fffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff] [ 0.000000] riscv: ISA extensions acdfim [ 0.000000] riscv: ELF capabilities acdfim [ 0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0 [ 0.000000] percpu: Embedded 11 pages/cpu s15264 r0 d29792 u45056 [ 0.000000] percpu: wasting 10 pages per chunk [ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 2020 [ 0.000000] Kernel command line: earlycon console=ttySIF0 [ 0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear) [ 0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 5984K/8192K available (964K kernel code, 137K rwdata, 205K rodata, 546K init, 66K bss, 2208K reserved, 0K cma-reserved) [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] riscv-intc: 64 local interrupts mapped [ 0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts. [ 0.000000] k210-clk: clock-controller: CPU running at 390 MHz [ 0.000000] clint: timer@2000000: timer running at 7800000 Hz [ 0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns [ 0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns [ 0.008178] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200) [ 0.018251] pid_max: default: 4096 minimum: 301 [ 0.022861] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.029971] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear) ``` -------------------------------- ### Start GDB Server on Target Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/using-buildroot-debugger.adoc Run this command on the target device to start the GDB server, which will listen on a specified TCP port for incoming connections from the host's GDB client. Ensure the program 'foo' is present on the target. ```shell gdbserver :2345 foo ``` -------------------------------- ### Build RISC-V 64bit UEFI QEMU Demo Source: https://github.com/buildroot/buildroot/blob/master/board/qemu/riscv64-virt-efi/readme.txt Use this command to configure and build the RISC-V 64bit UEFI QEMU demo. ```bash make qemu_riscv64_virt_efi_defconfig make ``` -------------------------------- ### Buildroot Configuration and Build Source: https://github.com/buildroot/buildroot/blob/master/board/friendlyarm/nanopi-r2s/readme.txt Run these commands to configure and build the project for the Nanopi R2S. Ensure you have internet access to download sources. ```bash make friendlyarm_nanopi_r2s_defconfig ``` ```bash make ``` -------------------------------- ### Configure Buildroot for AM574x IDK Source: https://github.com/buildroot/buildroot/blob/master/board/ti/am574x-idk/readme.txt Run this command to apply the default configuration for the AM574x IDK board. ```bash make am574x_idk_defconfig ``` -------------------------------- ### External Kernel Driver Configuration Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/customize-outside-br.adoc Enables an example external driver for the Linux kernel. ```kconfig config BR2_LINUX_KERNEL_EXT_EXAMPLE_DRIVER bool "example-external-driver" help Example external driver ``` -------------------------------- ### Rootfs Skeleton Selection Example Source: https://github.com/buildroot/buildroot/blob/master/docs/manual/customize-outside-br.adoc Selects a custom rootfs skeleton and the corresponding package. ```kconfig config BR2_ROOTFS_SKELETON_MINE bool "my custom skeleton" select BR2_PACKAGE_SKELETON_MINE ``` -------------------------------- ### Build Minimal Support for NXP i.MX6SX SDB Source: https://github.com/buildroot/buildroot/blob/master/board/freescale/imx6sxsdb/readme.txt Use these commands to configure and build a minimal system for the NXP i.MX6SX SDB board. This process generates a bootable 'sdcard.img' file. ```bash make imx6sx-sdb_defconfig make ``` -------------------------------- ### Buildroot Build Command Source: https://github.com/buildroot/buildroot/blob/master/board/acmesystems/aria-g25/readme.txt Execute this command to start the Buildroot compilation process after configuration. ```bash make ``` -------------------------------- ### Buildroot Configuration and Build Source: https://github.com/buildroot/buildroot/blob/master/board/orangepi/orangepi-zero2w/readme.txt Run these commands to configure and build the Buildroot environment for the OrangePi Zero2W. An internet connection is required to download sources. ```bash make orangepi_zero2w_defconfig make ```