update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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,30 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2708-rpi-b-plus.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,30 @@
|
||||
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,31 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"bcm2710-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",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
11
bsp/buildroot-2017.02.11/board/raspberrypi/post-build.sh
Executable file
11
bsp/buildroot-2017.02.11/board/raspberrypi/post-build.sh
Executable file
@@ -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
|
||||
30
bsp/buildroot-2017.02.11/board/raspberrypi/post-image.sh
Executable file
30
bsp/buildroot-2017.02.11/board/raspberrypi/post-image.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
BOARD_NAME="$(basename ${BOARD_DIR})"
|
||||
GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
case "${2}" in
|
||||
--add-pi3-miniuart-bt-overlay)
|
||||
if ! grep -qE '^dtoverlay=' "${BINARIES_DIR}/rpi-firmware/config.txt"; then
|
||||
echo "Adding 'dtoverlay=pi3-miniuart-bt' to config.txt (fixes ttyAMA0 serial console)."
|
||||
cat << __EOF__ >> "${BINARIES_DIR}/rpi-firmware/config.txt"
|
||||
|
||||
# fixes rpi3 ttyAMA0 serial console
|
||||
dtoverlay=pi3-miniuart-bt
|
||||
__EOF__
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
rm -rf "${GENIMAGE_TMP}"
|
||||
|
||||
genimage \
|
||||
--rootpath "${TARGET_DIR}" \
|
||||
--tmppath "${GENIMAGE_TMP}" \
|
||||
--inputpath "${BINARIES_DIR}" \
|
||||
--outputpath "${BINARIES_DIR}" \
|
||||
--config "${GENIMAGE_CFG}"
|
||||
|
||||
exit $?
|
||||
92
bsp/buildroot-2017.02.11/board/raspberrypi/readme.txt
Normal file
92
bsp/buildroot-2017.02.11/board/raspberrypi/readme.txt
Normal file
@@ -0,0 +1,92 @@
|
||||
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).
|
||||
|
||||
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:
|
||||
|
||||
$ make raspberrypi3_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]
|
||||
+-- boot.vfat
|
||||
+-- rootfs.ext4
|
||||
+-- rpi-firmware/
|
||||
| +-- bootcode.bin
|
||||
| +-- cmdline.txt
|
||||
| +-- config.txt
|
||||
| +-- fixup.dat
|
||||
| +-- start.elf
|
||||
| `-- overlays/ [2]
|
||||
+-- sdcard.img
|
||||
`-- zImage
|
||||
|
||||
[1] Not all of them will be present, depending on the RaspberryPi
|
||||
model you are using.
|
||||
|
||||
[2] Only for the Raspberry Pi 3 Model (overlay pi3-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.
|
||||
Reference in New Issue
Block a user