Skip to content

Commit

Permalink
Merge tag 'v1.23.0' into main
Browse files Browse the repository at this point in the history
v1.23.0 release
  • Loading branch information
pojiro committed Jul 28, 2023
2 parents 0a2c151 + 0cff1d8 commit 0d087d7
Show file tree
Hide file tree
Showing 11 changed files with 230 additions and 145 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exec: &exec
name: build-tools/nerves-system-br
version: 1.22.5
elixir: 1.14.4-otp-25
version: 1.23.1
elixir: 1.15.2-otp-26

version: 2.1

Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ follows:
releases, and Linux kernel updates. They're also made to fix bugs and add
features to the build infrastructure.

## v1.23.0

This is a major update that brings in Erlang/OTP 26, Buildroot 2023.02.2, Linux
6.1, and Raspberry Pi firmware updates.

* New features
* The Raspberry Pi cameras now work with libcamera. The libcamera apps are
included. See the [Raspberry Pi Camera docs](https://www.raspberrypi.com/documentation/computers/camera_software.html).
* CA certificates are included for OTP 26.

* Changes
* The `start.elf` and `fixup.dat` files were renamed to `start4.elf` and
`fixup4.dat` to be more consistent with the RaspberryPi OS naming.

* Updated dependencies
* [nerves_system_br v1.23.1](https://github.com/nerves-project/nerves_system_br/releases/tag/v1.23.1)
* [Buildroot 2023.02.2](https://lore.kernel.org/buildroot/[email protected]/T/)
* [Erlang/OTP 26.0.2](https://erlang.org/download/OTP-26.0.2.README)
* Linux 6.1.21 (Raspberry Pi Linux tag 1.20230405)

## v1.22.2

This is a bug and security fix update. It should be a low risk upgrade from
Expand Down
46 changes: 32 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ This is the base Nerves System configuration for the Raspberry Pi 4 Model B.
<br><sup>[Michael Henzler / Wikimedia Commons / CC BY-SA
4.0](https://en.wikipedia.org/wiki/File:Raspberry_Pi_4_Model_B_-_Top.jpg)</sup>

| Feature | Description |
| -------------------- | ------------------------------- |
| Feature | Description |
| -------------------- | -------------------------------- |
| CPU | 1.5 GHz quad-core Cortex-A72 (64-bit mode) |
| Memory | 1 GB, 2 GB, 4 GB DRAM |
| Storage | MicroSD |
| Linux kernel | 5.10 w/ Raspberry Pi patches |
| Memory | 1 GB, 2 GB, 4 GB DRAM |
| Storage | MicroSD |
| Linux kernel | 6.1 w/ Raspberry Pi patches |
| IEx terminal | HDMI and USB keyboard (can be changed to UART) |
| GPIO, I2C, SPI | Yes - [Elixir Circuits](https://github.com/elixir-circuits) |
| ADC | No |
| PWM | Yes, but no Elixir support |
| UART | 1 available - `ttyS0` |
| Display | HDMI or 7" RPi Touchscreen |
| Camera | Untested |
| Ethernet | Yes |
| WiFi | Yes - VintageNet |
| Bluetooth | Untested |
| Audio | HDMI/Stereo out |
| ADC | No |
| PWM | Yes, but no Elixir support |
| UART | 1 available - `ttyS0` |
| Display | HDMI or 7" RPi Touchscreen |
| Camera | Official RPi Cameras (libcamera) |
| Ethernet | Yes |
| WiFi | Yes - VintageNet |
| Bluetooth | Untested |
| Audio | HDMI/Stereo out |

## Using

Expand All @@ -43,6 +43,24 @@ systems](https://hexdocs.pm/nerves/customizing-systems.html).
The base image includes drivers for the onboard Raspberry Pi 4 wifi module
(`brcmfmac` driver).

## Camera

This system supports the official Raspberry Pi camera modules via
[`libcamera`](https://libcamera.org/). The `libcamera` applications are included so it's
possible to replicate many of the examples in the official [Raspberry Pi Camera
Documentation](https://www.raspberrypi.com/documentation/computers/camera_software.html).

Here's an example commandline to run:

```elixir
cmd("libcamera-jpeg -n -v -o /data/test.jpeg")
```

On success, you'll get an image in `/data` that you can copy off with `sftp`.

Since `libcamera` is being used instead of MMAL, the Elixir
[picam](https://hex.pm/packages/picam) library won't work.

## Audio

The Raspberry Pi has many options for audio output. This system supports the
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.2
1.23.0
8 changes: 5 additions & 3 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
arm_64bit=1

# We always use the same names. The variant is selected in fwup.conf.
start_file=start.elf
fixup_file=fixup.dat
start_file=start4.elf
fixup_file=fixup4.dat

# Disable the boot rainbow
disable_splash=1
Expand All @@ -24,9 +24,11 @@ disable_splash=1
# configuration. See Target packages->Hardware handling->Firmware.
gpu_mem=192

# Enable I2C, SPI, and audio
# Enable I2C and SPI
dtparam=i2c_arm=on
dtparam=spi=on

# Enable audio (loads snd_bcm3825)
dtparam=audio=on

# Automatically load overlays for detected cameras
Expand Down
2 changes: 1 addition & 1 deletion fwup-revert.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ define(ROOTFS, "${NERVES_SYSTEM}/images/rootfs.squashfs")
# | (formatted as uboot env) |
# +----------------------------+
# | p0*: Boot A (FAT32) |
# | kernel8.img, start.elf, |
# | kernel8.img, start4.elf, |
# | config.txt, etc. |
# +----------------------------+
# | p0*: Boot B (FAT32) |
Expand Down
58 changes: 42 additions & 16 deletions fwup.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define(NERVES_FW_PRODUCT, "Nerves Firmware")
define(NERVES_FW_DESCRIPTION, "")
define(NERVES_FW_VERSION, "${NERVES_SDK_VERSION}")
define(NERVES_FW_PLATFORM, "rpi4")
define(NERVES_FW_ARCHITECTURE, "arm")
define(NERVES_FW_ARCHITECTURE, "arm") # Not "aarch64" for historical reasons
define(NERVES_FW_AUTHOR, "The Nerves Team")

define(NERVES_FW_DEVPATH, "/dev/mmcblk0")
Expand All @@ -38,7 +38,7 @@ define(ROOTFS, "${NERVES_SYSTEM}/images/rootfs.squashfs")
# | (formatted as uboot env) |
# +----------------------------+
# | p0*: Boot A (FAT32) |
# | kernel8.img, start.elf, |
# | kernel8.img, start4.elf, |
# | config.txt, etc. |
# +----------------------------+
# | p0*: Boot B (FAT32) |
Expand Down Expand Up @@ -93,10 +93,10 @@ meta-misc = ${NERVES_FW_MISC}
# File resources are listed in the order that they are included in the .fw file
# This is important, since this is the order that they're written on a firmware
# update due to the event driven nature of the update system.
file-resource fixup.dat {
file-resource fixup4.dat {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/fixup4x.dat"
}
file-resource start.elf {
file-resource start4.elf {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/start4x.elf"
}
file-resource config.txt {
Expand Down Expand Up @@ -132,9 +132,6 @@ file-resource w1-gpio-pullup.dtbo {
file-resource miniuart-bt.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/miniuart-bt.dtbo"
}
file-resource vc4-fkms-v3d.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/vc4-fkms-v3d.dtbo"
}
file-resource vc4-kms-v3d.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/vc4-kms-v3d.dtbo"
}
Expand All @@ -153,6 +150,21 @@ file-resource dwc2.dtbo {
file-resource ramoops.dtbo {
host-path = "${NERVES_SYSTEM}/images/ramoops.dtb"
}
file-resource imx219.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/imx219.dtbo"
}
file-resource imx477.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/imx477.dtbo"
}
file-resource imx708.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/imx708.dtbo"
}
file-resource ov5647.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/ov5647.dtbo"
}
file-resource i2c-mux.dtbo {
host-path = "${NERVES_SYSTEM}/images/rpi-firmware/overlays/i2c-mux.dtbo"
}

file-resource rootfs.img {
host-path = ${ROOTFS}
Expand Down Expand Up @@ -245,8 +257,8 @@ task complete {

on-resource config.txt { fat_write(${BOOT_A_PART_OFFSET}, "config.txt") }
on-resource cmdline.txt { fat_write(${BOOT_A_PART_OFFSET}, "cmdline.txt") }
on-resource start.elf { fat_write(${BOOT_A_PART_OFFSET}, "start.elf") }
on-resource fixup.dat { fat_write(${BOOT_A_PART_OFFSET}, "fixup.dat") }
on-resource start4.elf { fat_write(${BOOT_A_PART_OFFSET}, "start4.elf") }
on-resource fixup4.dat { fat_write(${BOOT_A_PART_OFFSET}, "fixup4.dat") }
on-resource kernel8.img { fat_write(${BOOT_A_PART_OFFSET}, "kernel8.img") }
on-resource bcm2711-rpi-4-b.dtb { fat_write(${BOOT_A_PART_OFFSET}, "bcm2711-rpi-4-b.dtb") }
on-resource bcm2711-rpi-cm4.dtb { fat_write(${BOOT_A_PART_OFFSET}, "bcm2711-rpi-cm4.dtb") }
Expand All @@ -256,13 +268,17 @@ task complete {
on-resource rpi-backlight.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/rpi-backlight.dtbo") }
on-resource w1-gpio-pullup.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo") }
on-resource miniuart-bt.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/miniuart-bt.dtbo") }
on-resource vc4-fkms-v3d.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-fkms-v3d.dtbo") }
on-resource vc4-kms-v3d.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-kms-v3d.dtbo") }
on-resource vc4-kms-v3d-pi4.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-kms-v3d-pi4.dtbo") }
on-resource vc4-kms-dsi-7inch.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-kms-dsi-7inch.dtbo") }
on-resource tc358743.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/tc358743.dtbo") }
on-resource dwc2.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/dwc2.dtbo") }
on-resource ramoops.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/ramoops.dtbo") }
on-resource imx219.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx219.dtbo") }
on-resource imx477.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx477.dtbo") }
on-resource imx708.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx708.dtbo") }
on-resource ov5647.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/ov5647.dtbo") }
on-resource i2c-mux.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/i2c-mux.dtbo") }

on-resource rootfs.img {
# write to the first rootfs partition
Expand Down Expand Up @@ -317,8 +333,8 @@ task upgrade.a {
# won't hurt anything.
on-resource config.txt { fat_write(${BOOT_A_PART_OFFSET}, "config.txt") }
on-resource cmdline.txt { fat_write(${BOOT_A_PART_OFFSET}, "cmdline.txt") }
on-resource start.elf { fat_write(${BOOT_A_PART_OFFSET}, "start.elf") }
on-resource fixup.dat { fat_write(${BOOT_A_PART_OFFSET}, "fixup.dat") }
on-resource start4.elf { fat_write(${BOOT_A_PART_OFFSET}, "start4.elf") }
on-resource fixup4.dat { fat_write(${BOOT_A_PART_OFFSET}, "fixup4.dat") }
on-resource kernel8.img { fat_write(${BOOT_A_PART_OFFSET}, "kernel8.img") }
on-resource bcm2711-rpi-4-b.dtb { fat_write(${BOOT_A_PART_OFFSET}, "bcm2711-rpi-4-b.dtb") }
on-resource bcm2711-rpi-cm4.dtb { fat_write(${BOOT_A_PART_OFFSET}, "bcm2711-rpi-cm4.dtb") }
Expand All @@ -328,13 +344,18 @@ task upgrade.a {
on-resource rpi-backlight.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/rpi-backlight.dtbo") }
on-resource w1-gpio-pullup.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo") }
on-resource miniuart-bt.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/miniuart-bt.dtbo") }
on-resource vc4-fkms-v3d.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-fkms-v3d.dtbo") }
on-resource vc4-kms-v3d.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-kms-v3d.dtbo") }
on-resource vc4-kms-v3d-pi4.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-kms-v3d-pi4.dtbo") }
on-resource vc4-kms-dsi-7inch.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/vc4-kms-dsi-7inch.dtbo") }
on-resource tc358743.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/tc358743.dtbo") }
on-resource dwc2.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/dwc2.dtbo") }
on-resource ramoops.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/ramoops.dtbo") }
on-resource imx219.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx219.dtbo") }
on-resource imx477.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx477.dtbo") }
on-resource imx708.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/imx708.dtbo") }
on-resource ov5647.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/ov5647.dtbo") }
on-resource i2c-mux.dtbo { fat_write(${BOOT_A_PART_OFFSET}, "overlays/i2c-mux.dtbo") }

on-resource rootfs.img {
delta-source-raw-offset=${ROOTFS_B_PART_OFFSET}
delta-source-raw-count=${ROOTFS_B_PART_COUNT}
Expand Down Expand Up @@ -396,8 +417,8 @@ task upgrade.b {
# won't hurt anything.
on-resource config.txt { fat_write(${BOOT_B_PART_OFFSET}, "config.txt") }
on-resource cmdline.txt { fat_write(${BOOT_B_PART_OFFSET}, "cmdline.txt") }
on-resource start.elf { fat_write(${BOOT_B_PART_OFFSET}, "start.elf") }
on-resource fixup.dat { fat_write(${BOOT_B_PART_OFFSET}, "fixup.dat") }
on-resource start4.elf { fat_write(${BOOT_B_PART_OFFSET}, "start4.elf") }
on-resource fixup4.dat { fat_write(${BOOT_B_PART_OFFSET}, "fixup4.dat") }
on-resource kernel8.img { fat_write(${BOOT_B_PART_OFFSET}, "kernel8.img") }
on-resource bcm2711-rpi-4-b.dtb { fat_write(${BOOT_B_PART_OFFSET}, "bcm2711-rpi-4-b.dtb") }
on-resource bcm2711-rpi-cm4.dtb { fat_write(${BOOT_B_PART_OFFSET}, "bcm2711-rpi-cm4.dtb") }
Expand All @@ -407,13 +428,18 @@ task upgrade.b {
on-resource rpi-backlight.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/rpi-backlight.dtbo") }
on-resource w1-gpio-pullup.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/w1-gpio-pullup.dtbo") }
on-resource miniuart-bt.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/miniuart-bt.dtbo") }
on-resource vc4-fkms-v3d.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/vc4-fkms-v3d.dtbo") }
on-resource vc4-kms-v3d.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/vc4-kms-v3d.dtbo") }
on-resource vc4-kms-v3d-pi4.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/vc4-kms-v3d-pi4.dtbo") }
on-resource vc4-kms-dsi-7inch.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/vc4-kms-dsi-7inch.dtbo") }
on-resource tc358743.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/tc358743.dtbo") }
on-resource dwc2.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/dwc2.dtbo") }
on-resource ramoops.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/ramoops.dtbo") }
on-resource imx219.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/imx219.dtbo") }
on-resource imx477.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/imx477.dtbo") }
on-resource imx708.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/imx708.dtbo") }
on-resource ov5647.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/ov5647.dtbo") }
on-resource i2c-mux.dtbo { fat_write(${BOOT_B_PART_OFFSET}, "overlays/i2c-mux.dtbo") }

on-resource rootfs.img {
delta-source-raw-offset=${ROOTFS_A_PART_OFFSET}
delta-source-raw-count=${ROOTFS_A_PART_COUNT}
Expand Down
Loading

0 comments on commit 0d087d7

Please sign in to comment.