Skip to content

Commit

Permalink
debos: Support rpi4 with debian firmware
Browse files Browse the repository at this point in the history
pinball-arm64-rpi_4.img was tested on:
Raspberry Pi 4 Model B Rev 1.4

Professor table is ~20 FPS (same with tux)

Similar Perfomance on same rpi_4
with pinball-arm64-rpi_3_64b.img

Just like on rpi_3:

- prof ~20 : (oscilating between 10 and 22)
- gnu ~16
- hurd ~11
- tux ~19

U-boot might cause issues,
so config loads kernel instead (update ramfs)
this should be investigated after release.

Bug: #16
Signed-off-by: Philippe Coval <[email protected]>
Change-Id: Ic2284ef1587ef429b4f62e21b70ead09caf53f53
  • Loading branch information
rzr committed Jun 10, 2021
1 parent e934038 commit d4f515d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 33 deletions.
64 changes: 31 additions & 33 deletions extra/debos/machine/rpi_2/actions.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
{{- $architecture := or .architecture "armhf" -}}
{{- $firmware_version := or .firmware_version "1.20210108" -}}
{{- $cmdline := or .cmdline "root=LABEL=root rootwait ro fsck.mode=auto fsck.repair=yes console=ttyS1,115200" -}}
{{- $machine := or .machine "rpi_2" -}}
{{- $project := or .project "pinball" -}}
{{- $suite := or .suite "bullseye" -}}
{{- $uboot_machine := or .uboot_machine "rpi_2" -}}
{{- $uboot_machine := or .uboot_machine (printf "%s" $machine) -}}
{{- $image := or .image (printf "%s-%s-%s.img" $project $architecture $machine) -}}

architecture: {{$architecture}}

actions:

- action: download
url: https://github.com/raspberrypi/firmware/archive/{{$firmware_version}}.tar.gz
unpack: true
name: firmware

- action: image-partition
imagename: {{$image}}
imagesize: 2GB
Expand All @@ -29,16 +24,25 @@ actions:
- name: firmware
fs: fat32
start: 0%
end: 64MB
end: 128MB
- name: root
fs: ext4
start: 64MB
start: 128MB
end: 100%
flags: [boot]

- action: apt
packages:
- initramfs-tools
- e2fsprogs
{{if eq $suite "stretch"}}
{{else}}
- u-boot-menu
- u-boot-rpi
{{end}}

- action: apt
packages: [
firmware-brcm80211,
{{if eq $suite "unstable" "sid" "testing" "bullseye"}}
linux-image-generic,
{{else}}
Expand All @@ -50,31 +54,21 @@ actions:
{{end}}
{{end}}
{{end}}
{{if eq $suite "stretch"}}
{{else}}
u-boot-menu,
{{end}}
u-boot-rpi
]

- action: overlay
origin: firmware
source: firmware-{{$firmware_version}}/boot
destination: /boot/firmware

- action: run
chroot: true
command: >
rm -rfv /boot/firmware/kernel*.img
&& rm -rfv /boot/firmware/overlays
&& echo TODO rm -rfv /boot/firmware/*.dtb
&& find /boot/firmware/ -type f
- action: apt
packages:
- firmware-brcm80211
- raspi-firmware

- action: run
chroot: true
command: >
find /usr/lib/u-boot/
mkdir -p /boot/firmware
&& cp -av /usr/lib/raspi-firmware/* /boot/firmware/
&& cp -av /usr/lib/linux-image-*-*/broadcom/* /boot/firmware/
&& cp -av /usr/lib/u-boot/{{$uboot_machine}}/* /boot/firmware/
&& echo 'ROOTPART="LABEL=root"' >> /etc/default/raspi-firmware
- action: run
chroot: true
Expand All @@ -90,14 +84,14 @@ actions:
{{end}}
&& echo 'enable_uart=1'
| tee -a /boot/firmware/config.txt
&& echo 'uart_2ndstage'
| tee -a /boot/firmware/config.txt
&& echo 'kernel=u-boot.bin'
| tee -a /boot/firmware/config.txt
&& echo 'upstream_kernel=1'
| tee -a /boot/firmware/config.txt
&& cat /boot/firmware/config.txt
- action: run
chroot: true
command: echo 'console=ttyS0,115200' > /etc/kernel/cmdline

- action: run
chroot: true
command: >
Expand All @@ -117,7 +111,7 @@ actions:
{{end}} \
{{end}} \
&& echo 'U_BOOT_MENU_LABEL="Debian ({{$project}}) GNU/Linux: "' >> /etc/default/u-boot
&& echo 'U_BOOT_PARAMETERS="root=LABEL=root ro rootwait"' >> /etc/default/u-boot
&& echo 'U_BOOT_PARAMETERS="{{$cmdline}}"' >> /etc/default/u-boot
&& echo 'U_BOOT_ROOT=""' >> /etc/default/u-boot
&& echo 'U_BOOT_TIMEOUT="50"' >> /etc/default/u-boot
&& echo 'U_BOOT_UPDATE="true"' >> /etc/default/u-boot
Expand All @@ -130,3 +124,7 @@ actions:
chroot: true
command: u-boot-update
{{end}}

- action: run
chroot: true
command: update-initramfs -u
3 changes: 3 additions & 0 deletions extra/debos/pinball.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- $architecture := or .architecture "i386" -}}
{{- $cmdline := or .cmdline "root=LABEL=root rootwait ro fsck.mode=auto fsck.repair=yes console=ttyS1,115200" -}}
{{- $machine := or .machine "generic" -}}
{{- $mirror := or .mirror "https://deb.debian.org/debian" -}}
{{- $project := or .project "pinball" -}}
Expand Down Expand Up @@ -74,6 +75,8 @@ actions:
script: ../../extra/profile/pinball/etc/pinball/setup.sh
- action: filesystem-deploy
description: Deploying filesystem onto image
setup-kernel-cmdline: true
append-kernel-cmdline: {{$cmdline}}

- action: recipe
recipe: machine/{{$machine}}/image.yaml
Expand Down

0 comments on commit d4f515d

Please sign in to comment.