Raspberry Pi 3 microSD support missing from the installer

Bug #1729128 reported by William Grant on 2017-11-01
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Status tracked in Bionic
Paolo Pisati

Bug Description


Without this module in block-modules.udeb, the default generic arm64 image cannot install on a raspberrypi3 board.

[Test case]

Build the block-modules.udeb with and without the attached patch and check for the presence of the drivers/mmc/host/bcm2835.ko.

[Regression Potential]

None, we are adding a ko to a udeb, not removing it.


Please add bcm2835 to block-modules on arm64 (and armhf?).

artful's arm64 d-i mini.iso works fine on Raspberry Pi 3 when booting with a UEFI-capable u-boot, except for one detail: mmc/host/bcm2835.ko is missing from block-modules, so you can't install to microSD without manually grabbing and loading the module.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1729128

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
affects: linux (Ubuntu) → ubiquity (Ubuntu)
Changed in ubiquity (Ubuntu):
status: Incomplete → New
William Grant (wgrant) wrote :

The linux source package produces the udebs that are installed by d-i.

affects: ubiquity (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Paolo Pisati (p-pisati) wrote :

Your suggestion makes sense, but can you give me the exact steps on how to test it afterward?

I gave a quick glance at u-boot master, but i couldn't find any 'uefi' or 'rpi3-uefi' target in configs. Or shall i just build the rpi3 target and then pass a UEFI fw as a payload? And where do i get the UEFI fw from? Instructions on how to setup the system are welcome.

Paolo Pisati (p-pisati) on 2017-11-06
Changed in linux (Ubuntu Bionic):
assignee: nobody → Paolo Pisati (p-pisati)
Download full text (3.2 KiB)

On 06/11/17 23:03, Paolo Pisati wrote:
> Your suggestion makes sense, but can you give me the exact steps on how
> to test it afterward?
> I gave a quick glance at u-boot master, but i couldn't find any 'uefi'
> or 'rpi3-uefi' target in configs. Or shall i just build the rpi3 target
> and then pass a UEFI fw as a payload? And where do i get the UEFI fw
> from? Instructions on how to setup the system are welcome.

It was lot easier to get working than I had expected. There are a couple
of gotchas left, but it works great (and is the cheapest way I know to
run arm64...) once you get through them... I intend to look at fixing
most of these for bionic.

Prepare an MBR-partitioned microSD card with a FAT16 or FAT32 partition
at the start to be used for firmware and as the UEFI ESP; 100MB is
ample. The only gotcha here is that the firmware doesn't seem to know
about partition type 0xEF (ESP), but u-boot will happily load GRUB from
a 0xE (FAT16 LBA) that the platform firmware is happy with.

Then give it firmware:

  git clone git://git.denx.de/u-boot.git
  pushd u-boot
  make rpi_3_defconfig
  make CROSS_COMPILE=aarch64-linux-gnu-
  # kernel8.img is important -- the 8 forces start.elf to do aarch64.
  cp u-boot.bin /PATH/TO/MICROSD/FAT16_OR_32/PART/kernel8.img

  git clone --depth 1 gh:raspberrypi/firmware raspberrypi-firmware
  pushd raspberrypi-firmware
  cp bootcode.bin start.elf fixup.dat /PATH/TO/MICROSD/FAT16_OR_32_PART/

None of the dtbs are required.

Insert the microSD card into the RPi3. Also insert a USB mass storage
device with
written to it.

Boot the RPi3 with Ethernet, HDMI and a USB keyboard. After a few
seconds of u-boot, a hideous looking, bright red, awfully corrupt, but
still readable GRUB 2 prompt will appear. d-i will automatically start,
with no visual issues.

Switch to another VT and grab bcm2835.ko for the relevant kernel. For
artful's 4.13.0-16.19:

  wget --no-check-certificate https://williamgrant.id.au/f/1/2017/bcm2835.ko
  insmod bcm2835.ko

Then switch back to tty0 and proceed with the install. The partitioner
will see the internal microSD, but care is required with partitioning:
if you recreate the partition table it will default to GPT, which the
RPi3 firmware can't read, and if you recreate the boot partition it'll
end up with no firmware and type 0xEF (both of which are fixable
afterwards from another machine). The easiest way is to just set the
existing boot partition as an ESP in the installer, which won't change
the type. Then create a partition for / etc. as, and proceed with the
install as normal.

Everything will now work fine, except nothing will be visible on HDMI
unless GRUB initialises the EFI console, which you can force after the
install by commenting out GRUB_HIDDEN_TIMEOUT in /etc/default/grub and
running update-grub, and you might also need to disable plymouth be
removing "splash".

I haven't tested GPU bits, but the only hardware I found that didn't
work was the WiFi chip, since linux-firmware is missing
brcmfmac43430-sdio.txt (it just has the .bin). But I grabbed a new


Paolo Pisati (p-pisati) wrote :

I guess i'm doing something wrong here:

1) dd-ed the mini.iso to a usb stick
2) partitioned a microsd card:

$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 14,9 GiB, 15931539456 bytes, 31116288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa4f08fe7

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 526335 524288 256M c W95 FAT32 (LBA)

3) built u-boot (v2017.09) using the rpi3_defconfig and copied u-boot.bin as kernel8.img to the vfat partition
4) copied the relevant raspberry-firmware files to the vfat partition

This is how my sd card looks like:

$ ls -la /media/flag/F8EC-BAD1/
total 3228
drwxr-xr-x 2 flag flag 16384 gen 1 1970 .
drwxr-x---+ 3 root root 4096 nov 13 17:31 ..
-rw-r--r-- 1 flag flag 50248 nov 13 15:47 bootcode.bin
-rw-r--r-- 1 flag flag 6551 nov 13 15:47 fixup.dat
-rw-r--r-- 1 flag flag 397344 nov 13 15:43 kernel8.img
-rw-r--r-- 1 flag flag 2820196 nov 13 15:47 start.elf

5) popped the sd card into rpi3 and applied power

6) the board starts booting, executes u-boot but instead of looking for the usb storage, it tries pxe booting, and after several attempts, it fails. (see attached img).

Any chance i'm missing something in uboot boot script? Like some tweaks to uboot env? Or is it supposed to boot from usb storage by default and without any modification?

William Grant (wgrant) wrote :

Hm, what if you manually "run usb_boot" once PXE fails?

Paolo Pisati (p-pisati) wrote :

Ok, it appears uboot couldn't recognize my usb pen (it was an old 4GB usb2.0) but worked fine with a more recent 16GB stick, go figure.

After that, I followed all the steps above, and i got to the point of partitioning the disk, but even after inserting the bcm2835 module, i coudln't see any /dev/mmc* device and, indeed, the installer could only find the usb pen as a viable installation media.

Anyhow, i'm not sure how to test it, but here is the bionic generic kernel (and relative debs and udebs) if you want to try it out:


Paolo Pisati (p-pisati) wrote :
description: updated
tags: added: patch
Seth Forshee (sforshee) on 2018-04-10
Changed in linux (Ubuntu Bionic):
status: Confirmed → Fix Committed
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:

tags: added: iso-testing
Adam Smith (adamsmith) wrote :

Thanks Paolo and Seth for looking into this and the patches. There's a few things that could be done to make life on the pi better. For example, are there any plans to add support for the relatively new pi3b+ to bionic? Adding efi stub to the raspi2 kernels would be great. The upstream and downstream mmc modules are both enabled on the raspi2 kernels and they conflict - I'm going to file a more detailed bug about that later today.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers