Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "assignment-autotest"]
path = assignment-autotest
url = https://github.com/cu-ecen-5013/assignment-autotest
[submodule "buildroot"]
path = buildroot
url = https://github.com/buildroot/buildroot.git
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Overview
# buildroot-rpi

This repository contains assignment starter code for buildroot based assignments for the course Advanced Embedded Software Design, ECEN 5713

It also contains instructions related to modifying your buildroot project to use with supported hardware platforms. See [this wiki page](https://github.com/cu-ecen-5013/buildroot-assignments-base/wiki/Supported-Hardware) for details.
We will be using rpi3

Configuration of rpi for Buildroot:
----------------------------
Other configuration of rpi:
----------------------------
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

For model 4 B:

$ make raspberrypi4_defconfig
1 change: 0 additions & 1 deletion assignment-autotest
Submodule assignment-autotest deleted from 83e5df
Empty file added base_external/Config.in
Empty file.
26 changes: 26 additions & 0 deletions base_external/configs/aesd_rpi_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
BR2_arm=y
BR2_cortex_a53=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_SYSTEM_DHCP="eth0"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y
BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypi3/config_3.txt"
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
2 changes: 2 additions & 0 deletions base_external/external.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: assignment_base
description: Base customization for assignment
1 change: 1 addition & 0 deletions base_external/external.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(sort $(wildcard $(BR2_EXTERNAL_assignment_base_PATH)/package/*/*.mk))
1 change: 1 addition & 0 deletions buildroot
Submodule buildroot added at 0f4884
2 changes: 1 addition & 1 deletion conf/assignment.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
assignment4-buildroot
final-project
34 changes: 34 additions & 0 deletions runqemu-rpi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Shell script to start Raspberry Pi 3 (64-bit) on QEMU
#!/bin/sh

KERNEL="buildroot/output/images/Image"
DTB="buildroot/output/images/bcm2710-rpi-3-b.dtb"
ROOTFS="buildroot/output/images/rootfs.ext2"

if [ ! -e $KERNEL ]
then
echo "$KERNEL does not exist"
exit 1
fi

if [ ! -e $DTB ]
then
echo "$DTB does not exist"
exit 1
fi

if [ ! -e $ROOTFS ]
then
echo "$ROOTFS does not exist"
exit 1
fi


qemu-system-aarch64 \
-M raspi3 \
-kernel $KERNEL \
-dtb $DTB \
-m 1024 -nographic \
-append "rw console=ttyAMA0,115200 root=/dev/mmcblk0 fsck.repair=yes rootwait" \
-device sd-card,drive=mycard -drive if=none,file=$ROOTFS,format=raw,id=mycard

15 changes: 0 additions & 15 deletions runqemu.sh

This file was deleted.

12 changes: 10 additions & 2 deletions shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@

# The defconfig from the buildroot directory we use for qemu builds
QEMU_DEFCONFIG=configs/qemu_aarch64_virt_defconfig
# The default hardware platform, when building for hardware
RPI_DEFCONFIG=configs/raspberrypi3_defconfig
# The place we store customizations to the qemu configuration
MODIFIED_QEMU_DEFCONFIG=base_external/configs/aesd_qemu_defconfig
# The place we store customizations for the project current target

# The place we store customizations to the rpi configuration
MODIFIED_RPI_DEFCONFIG=base_external/configs/aesd_rpi_defconfig


# The defconfig from the buildroot directory we use for the project
AESD_DEFAULT_DEFCONFIG=${QEMU_DEFCONFIG}
AESD_MODIFIED_DEFCONFIG=${MODIFIED_QEMU_DEFCONFIG}
AESD_DEFAULT_DEFCONFIG=${RPI_DEFCONFIG}
AESD_MODIFIED_DEFCONFIG=${MODIFIED_RPI_DEFCONFIG}
AESD_MODIFIED_DEFCONFIG_REL_BUILDROOT=../${AESD_MODIFIED_DEFCONFIG}