"error -5 whilst initializing SD card"@20220315 aarch64 img

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

"error -5 whilst initializing SD card"@20220315 aarch64 img

Postby tamjan » Sat Apr 09, 2022 9:27 pm

I'm trying to setup a newly bought Raspberry Pi 4 B with 8GB memory and a 32GB sd-card using the instructions at
https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4 (so, fdisk, msdos partition layout, etc.), with the $this->bbcode_second_pass_code('', 'ArchLinuxARM-rpi-aarch64-latest.tar.gz') image.

So, I followed the guide, but on the first boot I get
$this->bbcode_second_pass_code('', 'error -5 whilst initializing SD card')
and hangs. Actually, the message is repeated ad infinitum. The sd-card is brand new, and thorough fsck of its boot and root partitions do not indicate any problems on my Linux laptop. dmesg also does not complain.

I'm not new to Arch Linux ARM and have been running it for years on my RPi 1 B units - until it was recently decided to end Arch Linux ARM support for them. Guess it was time to buy new units anyway. I run Gentoo on my x86_64 systems... The point is that I'm pretty sure that I set things up as instructed.

I haven't tried the 32-bit variant yet... but I'm not sure what the gain would be anyway. I might rather go for the 64-bit variant of the Debian-based Raspberry Pi OS if I can't run Arch Linux ARM.

I noticed that kernel8.img is almost a year old, but I guess that just contains u-boot, which might not be updated that often.
Googling the issue doesn't turn up anything really useful, unfortunately...

So, is there anything to be done to get it working? Any hints? TIA! :)
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby tamjan » Sun Apr 10, 2022 11:30 am

Well, Raspberry Pi OS (64-bit) does work. But, there is no u-boot in that.
I'll try to make a Arch Linux ARM bootfs without u-boot.
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby lategoodbye » Sun Apr 10, 2022 8:17 pm

Can you please confirm that your Raspberry Pi 4 B has the BCM2711 Stepping C0?

https://www.jeffgeerling.com/blog/2021/ ... 0-stepping
lategoodbye
 
Posts: 119
Joined: Sat Dec 29, 2018 1:24 am

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby robg » Sun Apr 10, 2022 11:10 pm

The generic kernel (linux-aarch64) sometimes has trouble with the RPI. If you have another ARMv8 device, or a suitable VM setup, chroot into the RPI image and install linux-rpi; this provides the upstream RPI kernel along with their bootloader.
robg
 
Posts: 187
Joined: Tue Jan 05, 2021 8:22 am

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby tamjan » Mon Apr 11, 2022 5:22 am

I'll confirm the processor when I have a system again (I wiped Rasperry Pi OS from the sd-card already, and the board is inside a Flirc case).
My plan is exactly to chroot, but I ran out of time. I have setup an aarch64-chroot setup with qemu now and will resume experimentation later today. Was thinking of just upgrading the kernel first, but perhaps it's easier to change to the rpi-variant.
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby tamjan » Mon Apr 11, 2022 9:21 am

Ok, after a
$this->bbcode_second_pass_code('', '
sed -i -E 's@^#(en_US[\.\ ].*)@\1@' /etc/locale.gen && locale-gen \
&& pacman-key --init && pacman-key --populate archlinuxarm \
&& pacman -Syy && pacman -S --needed f2fs-tools \
&& pacman -S --needed linux-rpi raspberrypi-bootloader raspberrypi-firmware
')
in an aarch64-qemu chroot it booted - after I had put the sd-card back into the board ;) . My rootfs is f2fs, hence the addition of f2fs-tools. Also,
$this->bbcode_second_pass_code('', '
[alarm@alarm ~]$ od -An -tx1 /proc/device-tree/emmc2bus/dma-ranges
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
fc 00 00 00
')
indicates that the board is equipped with a BCM2711 Stepping C0.
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby checkmate » Sun Apr 17, 2022 7:11 am

Hi tamjan,

just wondering, as you did not execute the mkinitcpio command for building the f2fs module into the initramfs, is f2fs built into the kernel8 nowadays?

Thanks.
checkmate
 
Posts: 6
Joined: Mon Nov 29, 2021 1:25 pm

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby tamjan » Sun Apr 17, 2022 7:15 am

mkinitcpio is run by the post-install stage of linux-rpi. :)
And I have an f2fs entry in fstab. So, there is no real magic here.
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby checkmate » Sun Apr 17, 2022 7:47 am

Did you put f2fs into the MODULES section of mkinitramfs.conf?
If not, I understand f2fs support is built into the kernel.
checkmate
 
Posts: 6
Joined: Mon Nov 29, 2021 1:25 pm

Re: "error -5 whilst initializing SD card"@20220315 aarch64

Postby tamjan » Sun Apr 17, 2022 8:07 am

I think mkinitcpio reads fstab and includes modules. But you seem to be right anyway. It’s compiled in.
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Next

Return to ARMv8

Who is online

Users browsing this forum: No registered users and 15 guests