initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start.elf
|
||||
fixup_file=fixup.dat
|
||||
|
||||
kernel=zImage
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
# enable autoprobing of Bluetooth driver without need of hciattach/btattach
|
||||
dtoverlay=krnbt=on
|
||||
@@ -0,0 +1,29 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start.elf
|
||||
fixup_file=fixup.dat
|
||||
|
||||
kernel=zImage
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
# enable autoprobing of Bluetooth driver without need of hciattach/btattach
|
||||
dtoverlay=krnbt=on
|
||||
@@ -0,0 +1,32 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start.elf
|
||||
fixup_file=fixup.dat
|
||||
|
||||
kernel=Image
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
# enable autoprobing of Bluetooth driver without need of hciattach/btattach
|
||||
dtoverlay=krnbt=on
|
||||
|
||||
# enable 64bits support
|
||||
arm_64bit=1
|
||||
@@ -0,0 +1,26 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start.elf
|
||||
fixup_file=fixup.dat
|
||||
|
||||
kernel=zImage
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=200
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
@@ -0,0 +1,29 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start4.elf
|
||||
fixup_file=fixup4.dat
|
||||
|
||||
kernel=zImage
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
# enable autoprobing of Bluetooth driver without need of hciattach/btattach
|
||||
dtoverlay=krnbt=on
|
||||
@@ -0,0 +1,36 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start4.elf
|
||||
fixup_file=fixup4.dat
|
||||
|
||||
kernel=Image
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
# enable autoprobing of Bluetooth driver without need of hciattach/btattach
|
||||
dtoverlay=krnbt=on
|
||||
|
||||
dtoverlay=vc4-kms-v3d-pi4
|
||||
dtoverlay=imx219
|
||||
#dtoverlay=ov5647
|
||||
|
||||
# enable 64bits support
|
||||
arm_64bit=1
|
||||
@@ -0,0 +1,26 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start4.elf
|
||||
fixup_file=fixup4.dat
|
||||
|
||||
kernel=zImage
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
@@ -0,0 +1,30 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start4.elf
|
||||
fixup_file=fixup4.dat
|
||||
|
||||
kernel=Image
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
|
||||
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
|
||||
dtoverlay=miniuart-bt
|
||||
|
||||
# enable 64bits support
|
||||
arm_64bit=1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Please note that this is only a sample, we recommend you to change it to fit
|
||||
# your needs.
|
||||
# You should override this file using BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE.
|
||||
# See http://buildroot.org/manual.html#rootfs-custom
|
||||
# and http://elinux.org/RPiconfig for a description of config.txt syntax
|
||||
|
||||
start_file=start.elf
|
||||
fixup_file=fixup.dat
|
||||
|
||||
kernel=zImage
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
# Disable overscan assuming the display supports displaying the full resolution
|
||||
# If the text shown on the screen disappears off the edge, comment this out
|
||||
disable_overscan=1
|
||||
|
||||
# How much memory in MB to assign to the GPU on Pi models having
|
||||
# 256, 512 or 1024 MB total memory
|
||||
gpu_mem_256=100
|
||||
gpu_mem_512=100
|
||||
gpu_mem_1024=100
|
||||
@@ -0,0 +1,33 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2708-rpi-b.dtb",
|
||||
"bcm2708-rpi-b-plus.dtb",
|
||||
"bcm2708-rpi-cm.dtb",
|
||||
"rpi-firmware/bootcode.bin",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"zImage"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2708-rpi-zero.dtb",
|
||||
"rpi-firmware/bootcode.bin",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"zImage"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2708-rpi-zero-w.dtb",
|
||||
"rpi-firmware/bootcode.bin",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"zImage"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2709-rpi-2-b.dtb",
|
||||
"rpi-firmware/bootcode.bin",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"zImage"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2710-rpi-3-b.dtb",
|
||||
"bcm2710-rpi-3-b-plus.dtb",
|
||||
"bcm2837-rpi-3-b.dtb",
|
||||
"rpi-firmware/bootcode.bin",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"Image"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2710-rpi-3-b.dtb",
|
||||
"bcm2710-rpi-3-b-plus.dtb",
|
||||
"bcm2710-rpi-cm3.dtb",
|
||||
"rpi-firmware/bootcode.bin",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup.dat",
|
||||
"rpi-firmware/start.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"zImage"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2711-rpi-4-b.dtb",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup4.dat",
|
||||
"rpi-firmware/start4.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"Image"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2711-rpi-4-b.dtb",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup4.dat",
|
||||
"rpi-firmware/start4.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"zImage"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2711-rpi-cm4.dtb",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup4.dat",
|
||||
"rpi-firmware/start4.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"Image"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2711-rpi-cm4.dtb",
|
||||
"rpi-firmware/cmdline.txt",
|
||||
"rpi-firmware/config.txt",
|
||||
"rpi-firmware/fixup4.dat",
|
||||
"rpi-firmware/start4.elf",
|
||||
"rpi-firmware/overlays",
|
||||
"zImage"
|
||||
}
|
||||
}
|
||||
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -u
|
||||
set -e
|
||||
|
||||
# Add a console on tty1
|
||||
if [ -e ${TARGET_DIR}/etc/inittab ]; then
|
||||
grep -qE '^tty1::' ${TARGET_DIR}/etc/inittab || \
|
||||
sed -i '/GENERIC_SERIAL/a\
|
||||
tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab
|
||||
fi
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
BOARD_NAME="$(basename ${BOARD_DIR})"
|
||||
GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
# Pass an empty rootpath. genimage makes a full copy of the given rootpath to
|
||||
# ${GENIMAGE_TMP}/root so passing TARGET_DIR would be a waste of time and disk
|
||||
# space. We don't rely on genimage to build the rootfs image, just to insert a
|
||||
# pre-built one in the disk image.
|
||||
|
||||
trap 'rm -rf "${ROOTPATH_TMP}"' EXIT
|
||||
ROOTPATH_TMP="$(mktemp -d)"
|
||||
|
||||
rm -rf "${GENIMAGE_TMP}"
|
||||
|
||||
genimage \
|
||||
--rootpath "${ROOTPATH_TMP}" \
|
||||
--tmppath "${GENIMAGE_TMP}" \
|
||||
--inputpath "${BINARIES_DIR}" \
|
||||
--outputpath "${BINARIES_DIR}" \
|
||||
--config "${GENIMAGE_CFG}"
|
||||
|
||||
exit $?
|
||||
@@ -0,0 +1,148 @@
|
||||
Raspberry Pi
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
These instructions apply to all models of the Raspberry Pi:
|
||||
- the original models A and B,
|
||||
- the "enhanced" models A+ and B+,
|
||||
- the model B2 (aka Raspberry Pi 2)
|
||||
- the model B3 (aka Raspberry Pi 3).
|
||||
- the model B4 (aka Raspberry Pi 4).
|
||||
- the model CM4 (aka Raspberry Pi Compute Module 4 and IO Board).
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure Buildroot
|
||||
-------------------
|
||||
|
||||
There are two RaspberryPi defconfig files in Buildroot, one for each
|
||||
major variant, which you should base your work on:
|
||||
|
||||
For models A, B, A+ or B+:
|
||||
|
||||
$ make raspberrypi_defconfig
|
||||
|
||||
For model Zero (model A+ in smaller form factor):
|
||||
|
||||
$ make raspberrypi0_defconfig
|
||||
|
||||
For model 2 B:
|
||||
|
||||
$ make raspberrypi2_defconfig
|
||||
|
||||
For model 3 B and B+:
|
||||
|
||||
$ make raspberrypi3_defconfig
|
||||
|
||||
or for model 3 B and B+ (64 bit):
|
||||
|
||||
$ make raspberrypi3_64_defconfig
|
||||
|
||||
For model 4 B:
|
||||
|
||||
$ make raspberrypi4_defconfig
|
||||
|
||||
or for model 4 B (64 bit):
|
||||
|
||||
$ make raspberrypi4_64_defconfig
|
||||
|
||||
For model CM4 (on IO Board):
|
||||
|
||||
$ make raspberrypicm4io_defconfig
|
||||
|
||||
or for CM4 (on IO Board - 64 bit):
|
||||
|
||||
$ make raspberrypicm4io_64_defconfig
|
||||
|
||||
Build the rootfs
|
||||
----------------
|
||||
|
||||
Note: you will need to have access to the network, since Buildroot will
|
||||
download the packages' sources.
|
||||
|
||||
You may now build your rootfs with:
|
||||
|
||||
$ make
|
||||
|
||||
(This may take a while, consider getting yourself a coffee ;-) )
|
||||
|
||||
Result of the build
|
||||
-------------------
|
||||
|
||||
After building, you should obtain this tree:
|
||||
|
||||
output/images/
|
||||
+-- bcm2708-rpi-b.dtb [1]
|
||||
+-- bcm2708-rpi-b-plus.dtb [1]
|
||||
+-- bcm2709-rpi-2-b.dtb [1]
|
||||
+-- bcm2710-rpi-3-b.dtb [1]
|
||||
+-- bcm2710-rpi-3-b-plus.dtb [1]
|
||||
+-- bcm2711-rpi-4-b.dtb [1]
|
||||
+-- bcm2711-rpi-cm4.dtb [1]
|
||||
+-- boot.vfat
|
||||
+-- rootfs.ext4
|
||||
+-- rpi-firmware/
|
||||
| +-- bootcode.bin
|
||||
| +-- cmdline.txt
|
||||
| +-- config.txt
|
||||
| +-- fixup.dat [1]
|
||||
| +-- fixup4.dat [1]
|
||||
| +-- start.elf [1]
|
||||
| +-- start4.elf [1]
|
||||
| `-- overlays/ [2]
|
||||
+-- sdcard.img
|
||||
+-- Image [1]
|
||||
`-- zImage [1]
|
||||
|
||||
[1] Not all of them will be present, depending on the RaspberryPi
|
||||
model you are using.
|
||||
|
||||
[2] Only for the Raspberry Pi 3/4 Models (overlay miniuart-bt is needed
|
||||
to enable the RPi3 serial console otherwise occupied by the bluetooth
|
||||
chip). Alternative would be to disable the serial console in cmdline.txt
|
||||
and /etc/inittab.
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image called "sdcard.img"
|
||||
in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
Insert the SDcard into your Raspberry Pi, and power it up. Your new system
|
||||
should come up now and start two consoles: one on the serial port on
|
||||
the P1 header, one on the HDMI output where you can login using a USB
|
||||
keyboard.
|
||||
|
||||
How to write to CM4 eMMC memory
|
||||
===============================
|
||||
|
||||
For CM4 modules without eMMC memory see above for booting from SD card,
|
||||
for CM4 moduels with eMMC memory proceed as following:
|
||||
|
||||
- fit jumper on IO Board header J2 to disable eMMC boot
|
||||
- connect IO Board micro USB port (J11 USB slave) to your host linux system
|
||||
- power up CM4/IO Board (lsusb command should show a '0a5c:2711 Broadcom Corp.
|
||||
BCM2711 Boot' device)
|
||||
- run 'sudo ./host/bin/rpiboot', output should look like the following:
|
||||
Waiting for BCM2835/6/7/2711...
|
||||
Loading embedded: bootcode4.bin
|
||||
Sending bootcode.bin
|
||||
Successful read 4 bytes
|
||||
Waiting for BCM2835/6/7/2711...
|
||||
Loading embedded: bootcode4.bin
|
||||
Second stage boot server
|
||||
Loading embedded: start4.elf
|
||||
File read: start4.elf
|
||||
Second stage boot server done
|
||||
|
||||
- a USB mass storage device should show up (the CM4 eMMC memory), proceed
|
||||
as described above to copy sdcard.img to it
|
||||
- power down CM4/IO Board
|
||||
- remove jumper on IO Board header J2 to re-enable eMMC boot
|
||||
- power up CM4/IO Board
|
||||
Reference in New Issue
Block a user