Skip to content

Commit

Permalink
CI: Add step to build Raspberry Pi3 image using the built Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
simonvanderveldt committed Dec 4, 2019
1 parent 5cd4178 commit bc30f44
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ jobs:
- name: Checkout
uses: actions/checkout@master
- name: Build Docker image
run: docker build .
run: docker-compose build buildroot
- name: Test Docker image
run: docker-compose run buildroot
22 changes: 22 additions & 0 deletions .github/workflows/raspberrypi3_test_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
BR2_arm=y
BR2_cortex_a53=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_TOOLCHAIN_EXTERNAL=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_ROOTFS_POST_SCRIPT_ARGS="--add-pi3-miniuart-bt-overlay"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,83b36f98e1a48d143f0b466fcf9f8c4e382c9a1c)/linux-83b36f98e1a48d143f0b466fcf9f8c4e382c9a1c.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_PACKAGE_RPI_FIRMWARE=y
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ docker run -ti -e BR2_EXTERNAL=/mycustombuildroot -v `pwd`:/mycustombuildroot si
```

Now you can issue your regular buildroot commands, like `make menuconfig` or `make <boardname>_defconfig` followed by `make`.

## Development
### Building the image
Either simply issue `docker build -t <name> .` or alternatively use the included Docker Compose file using `docker-compose build buildroot`.

### Testing
To validate that the image works correctly a simple test that builds a Raspberry Pi3 image using the default external toolchain can be run using the included Docker Compose file `docker-compose run --rm buildroot`.
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "2.4"
services:
buildroot:
build: .
volumes:
- ./.github/workflows/raspberrypi3_test_defconfig:/buildroot/configs/raspberrypi3_test_defconfig
command: sh -c "make raspberrypi3_test_defconfig && make"

0 comments on commit bc30f44

Please sign in to comment.