flyxtop
Posts: 2
Joined: Mon Jun 29, 2020 10:05 am

cross-compiling raspbian and installing it to SD card on ubuntu (don't boot)

Tue Jun 30, 2020 12:22 am

Hello,
I was following https://www.raspberrypi.org/documentati ... uilding.md to cross compile raspbian and boot RPI4B using it for test.
I ran the install command but all I see in the ext4 partition is {lib and lost+found}. and in fat32 partition, there are only bunch of .dtb files and overlays directory. Of course, my RPI4B board doesn't boot with that SD card. I partitioned the SD card myself and didn't copy the MBR(master boot record, the first 512 bytes) to the new SD card so I think I have to do that for booting. But files under ext4 and fat32(what's this for?) partitions look not normal. What have I missed?

User avatar
waveform80
Posts: 359
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK
Contact: Website Twitter

Re: cross-compiling raspbian and installing it to SD card on ubuntu (don't boot)

Thu Jul 02, 2020 2:13 pm

Please note those instructions are for building the Raspbian kernel, not an entire Raspbian image. Further, the "install" target is typically for installing a built kernel image on your host system which is almost certainly not what you want here. The end of those instructions includes notes on copying the resulting zImage (and dtbs) to the boot partition of a mounted SD card (which presumably already has a version of Raspbian installed on it), so that you can attempt your built kernel with the rest of the OS.
Author of / contributor to a few pi related things (picamera, Sense HAT emulator, gpio-zero, piwheels, etc.), and currently a software engineer at Canonical responsible for Ubuntu Server and Core on the Raspberry Pi.

flyxtop
Posts: 2
Joined: Mon Jun 29, 2020 10:05 am

Re: cross-compiling raspbian and installing it to SD card on ubuntu (don't boot)

Wed Jul 08, 2020 8:04 am

Hi, Thanks for the reply. Yes, I forget the copy part at the end. I copied the files and I changed the partition UUID in the fat32/cmdline.txt and ext4/etc/fstab. In the first boot try, I saw the 4 raspberrys and some scroll of texts and a whilte box and then just the black screen. When I try rebooting, it's just black screen (cursor is deemly blinking at the top left). Is there something I have omitted? (BTW, this guide is not complete because it doesn't mention the UUID thing, I found it on viewtopic.php?f=28&t=246455&p=1508429)
Do I have to install something for the GPU thing? (I remember seeing something like that..)

Return to “Raspberry Pi OS”