User avatar
Akeo
Posts: 54
Joined: Wed Aug 14, 2019 7:17 pm
Contact: Website

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Tue Jun 15, 2021 11:43 am

kpf wrote:
Tue Jun 15, 2021 10:17 am
The only 'hiccup' in the installation process was that the installer claimed one of the system devices needed non-free firmware (brcm/brcmfmac43455-sdio.bin), and I told it to load from the USB drive, but it could not do so.

Yes, these are the WiFi firmware blobs. They are provided in the UEFI archive, but it looks like the Debian Installer needs a bit more bugfixes, as it's unable to detect that they are provided, at the expected location, unless you unplug and replug the USB.

Also, parts of D-I seems to choke on spaces in the blobs name, even though it does generate these names itself. For instance, it's supposed to generate a request for brcmfmac43455-sdio.Raspberry Pi Foundation-Raspberry Pi 4 Model B.txt (I believe it generates this from the ACPI data) but the chokes on the first space and asks for brcmfmac43455-sdio.Raspberry.
This didn't impact the installation though, the wired Ethernet connection worked just fine.

Indeed. It's only for WiFi, which I don't think has a stable kernel driver anyway (last time I tried after I made D-I accept all the blobs by unplugging/replugging the USB, it still wasn't able to connect to WiFi).
One small note: in the post-install section about eliminating the 3GB RAM limit, the raspberry logo displayed by the UEFI firmware is now in color, not black-and-white :)

Good point. The logo changed since I first wrote the guide. I have now updated it.

geev03
Posts: 261
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Jun 17, 2021 4:32 pm

There is a new ""UEFI Firmware v1.28 date: 06/16/2021"

Code: Select all

System:
  Kernel: 5.10.0-7-arm64 aarch64 bits: 64 compiler: gcc v: 10.2.1 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 
  dm: LightDM 1.26.0 Distro: Debian GNU/Linux 11 (bullseye) 
Machine:
  Type: Embedded-pc System: Raspberry Pi Foundation 
  product: Raspberry Pi 4 Model B v: D03114 serial: <filter> 
  Chassis: Sony UK type: 34 v: Raspberry Pi 4 Model B serial: <filter> 
  Mobo: Sony UK model: Raspberry Pi 4 Model B v: D03114 serial: <filter> 
  UEFI: https://github.com/pftf/RPi4 v: UEFI Firmware v1.28 date: 06/16/2021 
CPU:
  Info: Quad Core model: N/A bits: 64 type: MCP arch: ARMv8 rev: 3 
  bogomips: 432 
  Speed: N/A min/max: N/A volts: 5.0 V 
  Core speeds (MHz): No speed data found for 4 cores. 
  Features: asimd cpuid crc32 evtstrm fp 
Graphics:
  Message: No ARM data found for this feature. 
  Display: x11 server: X.Org 1.20.11 driver: loaded: fbdev 
  unloaded: modesetting resolution: 1920x1080~50Hz s-dpi: 96 
  OpenGL: renderer: llvmpipe (LLVM 11.0.1 128 bits) v: 4.5 Mesa 20.3.4 
  compat-v: 3.1 direct render: Yes 
Audio:
  Message: No ARM data found for this feature. 
Network:
  Message: No ARM data found for this feature. 
  IF-ID-1: enabcm6e4ei0 state: up speed: 100 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 232.83 GiB used: 4.18 GiB (1.8%) 
  ID-1: /dev/sda type: USB model: USB3.0 Generic USB Device size: 232.83 GiB 
  serial: <filter> rev: 8105 scheme: GPT 
Partition:
  ID-1: / size: 226.8 GiB used: 3.83 GiB (1.7%) fs: ext4 dev: /dev/sda2 
  ID-2: /boot/efi size: 382.2 MiB used: 351.4 MiB (91.9%) fs: vfat 
  dev: /dev/sda1 
Swap:
  ID-1: swap-1 type: partition size: 976 MiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/sda3 
Sensors:
  System Temperatures: cpu: 54.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 212 Uptime: 1h 12m Memory: 7.62 GiB used: 1.63 GiB (21.4%) 
  Init: systemd v: 247 runlevel: 5 Compilers: gcc: N/A Packages: apt: 1384 
  Shell: Bash v: 5.1.4 running in: xfce4-terminal inxi: 3.3.01 


 

Pudi_Pudi
Posts: 1
Joined: Fri Jul 09, 2021 10:20 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Fri Jul 09, 2021 11:32 am

Hello everyone,

Just bought a Pi 4 and tried this guide (really love the idea of keeping things "vanilla").

I tried combining multiple firmware 1.28/1.22/1.26/1.27 and iso versions daily/weekly builds/alpha/rc2... none worked except :
- the 2021-06-28 weekly,
- with firmware 1.28,
- using a minimal install (not sure of the name, well not the graphical anyway),
- without networking,
- using a random 32Gb stick I had laying around (probably USB 2.0).

Thing is I was trying to install the OS on a spare m.2 Sata SSD I had laying around (original 'no name' that came with my Asus laptop and ended up never using as I changed it on arrival).

To plug this SDD in the Pi I tried an Oricon USB 3.0 enclosure and a dedicated Raspberry expansion board (X200 something on aliexpress, sata version of course).

In both cases the m.2 is recognized, and is able to launch the installer after being written with Rufus 14.0 (with the oricon enclosure, Windows 10, using GPT, iso to esp mode). Using all the automatic partitionning options.

The problem seems to be at the "basic system" installation (sorry don't know the exact name in the installer, I use the french version), when it tries to unpack/decompress the files. At some point it just freezes and never complete the install.
Also the freeze isn't always happening at the same step/percentage.

The error state (sorry I'm translating some parts) : "bootstrap warning" - "warning : failure while unpacking required packages. This will be attempted up to five times"
And after some more attempts : "the deboostrap program has ended with an error (return value 1)." "Please see file /var/log/syslog or the fourth virtual console for more informations".

Booting the Pi with a raspbian SD card, I see that there's no syslog file.

I also use another daughter board like in the Argon ONE, to have all the plugs at the back (and regular HDMI) and an on/off switch between the official Pi 4 3A charger and the Pi 4. Could it be sucking power and not giving enough to the SSD ? Don't think so but I'm trying to keep all options open.

Any idea as to where I should look to make it work ?

EDIT :

Finally got it to work using @botpet method (page 4) !

Only difference is, I had to run on last fdisk write on the disk after the dd command (something about GPT not being the right size).

As he did :
- I installed Debian on my 32Gb stick,
- added the "usb-storage.quirks" to the grub,
- clone the drive with a 'dd' command,
- run 'fdisk' on the ssd and just write it with 'w'.

Now it seems to boot perfectly and faster using the ssd drive.

Bonus question : I'm not familiar with the blobs issues mentionned in the first post concerning the wifi, is it manually fixable once the OS is running ?

stafwag
Posts: 1
Joined: Sun Jul 25, 2021 8:38 am

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Sun Jul 25, 2021 9:23 am

Is cpu frequency scaling working for somebody?

I loaded the raspberrypi_cpufreq & cpufreq_dt kernel modules.

root@debpi001:~# lsmod | grep -i cpu
raspberrypi_cpufreq 16384 0
cpufreq_dt 20480 0
root@debpi001:~#

But cpupower frequency-info, lscpu, /proc don't report the cpu frequency

root@debpi001:~# cpupower frequency-info
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
CPUs which run at the same hardware frequency: Not Available
CPUs which need to have their frequency coordinated by software: Not Available
maximum transition latency: Cannot determine or is not supported.
Not Available
available cpufreq governors: Not Available
Unable to determine current policy
current CPU frequency: Unable to call hardware
current CPU frequency: Unable to call to kernel
root@debpi001:~#


root@debpi001:~# lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: ARM
Model: 3
Model name: Cortex-A72
Stepping: r0p3
BogoMIPS: 108.00
L1d cache: 128 KiB
L1i cache: 192 KiB
L2 cache: 1 MiB
NUMA node0 CPU(s): 0-3
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Branch predictor hardening
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fp asimd evtstrm crc32 cpuid
root@debpi001:~#

root@debpi001:~# ls -l /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
ls: cannot access '/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq': No such file or directory
root@debpi001:~#

herbthom
Posts: 22
Joined: Sun Mar 10, 2013 6:10 pm

Re: Guide: Installation of *VANILLA* Debian 11 (or later) on a Raspberry Pi 4

Thu Jul 29, 2021 11:36 pm

@Akeo, Thank you for posting your guide. Following the approach outlined in your guide I was able to install the bullseye release candidate 2 and get wifi working by adding a few extra steps. I'm using it, running Gnome and wifi, to submit this post.

In case it might be helpful to someone else, the exact steps I used to prepare the installation media are listed below. These steps were performed on a Pi4 running RPi OS.

Code: Select all

# --- !!! BEWARE: This procedure will wipe out the contents of /dev/sdX !!! --- #
# --- !!! If the meaning of /dev/sdXY is not obvious to you, then this procedure is not for you. !!! --- #

# --- Get files --- #

wget https://cdimage.debian.org/cdimage/bullseye_di_rc2/arm64/iso-cd/debian-bullseye-DI-rc2-arm64-netinst.iso

wget https://github.com/pftf/RPi4/releases/download/v1.28/RPi4_UEFI_Firmware_v1.28.zip

# --- Prepare the USB media --- #

sudo wipefs -a /dev/sdX

sudo gdisk /dev/sdX
n<Enter>
1<Enter>
<Enter>
400M<Enter>
ef00<Enter>
w<Enter>
y<Enter>

sudo mkfs.fat -F32 /dev/sdXY

# --- Copy netinst & firmware to USB media --- #

sudo mount /dev/sdXY /mnt

mkdir /tmp/temploop

sudo mount debian-bullseye-DI-rc2-arm64-netinst.iso /tmp/temploop

sudo cp -prTL /tmp/temploop /mnt  # --- Ignore the "cp: cannot copy cyclic symbolic link '/tmp/temploop/debian'" message after this step. --- #

sudo unzip -d/mnt RPi4_UEFI_Firmware_v1.28.zip

sudo eject /dev/sdX

# --- Copy wifi blobs etc. to second USB device so that wifi can be enabled during the installation process --- #

unzip -d/tmp RPi4_UEFI_Firmware_v1.28.zip firmware/brcm/*

cp -pr /tmp/firmware/brcm /media/<MOUNTPOINT_FOR_USB_FOR_BRCM>

Installation Notes:
(1) When the installer prompts for wifi firmware, plug-in the second usb device prepared above.
(2) It is necessary to click "yes" several times for the installer to copy all of the necessary wifi related files.
(3) After the installation of the wifi files is complete remove the second USB device so that it is not seen by the installer at the partitioning stage of the installation.

Return to “Debian”