go-debos / debos-recipes

Collection of debos recipes
Apache License 2.0
47 stars 24 forks source link

rpi64 recipe for RaspberryPi Compute Module 4 #22

Open obachtos opened 3 years ago

obachtos commented 3 years ago

I'm would to use debos to build an image for a Raspberry Pi Compute Module 4. When I naively just use the rpi64 recipe the system fails to boot properly. u-boot starts with the following:

U-Boot 2021.01+dfsg-4 (Mar 12 2021 - 23:00:43 +0000)

DRAM:  3.9 GiB                          
RPI: Board rev 0x14 outside known range 
RPI Unknown model (0xc03140)            
MMC:   mmcnr@7e300000: 1, emmc2@7e340000: 0
Loading Environment from FAT... In:    serial
Out:   vidconsole                       
Err:   vidconsole                       
Net:   eth0: ethernet@7d580000
PCIe BRCM: link down
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)
switch to partitions #0, OK
mmc0(part 0) is current device
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)

*** repeating same error a lot ***

MMC: block number 0x1 exceeds max(0x0)
MMC: block number 0x44 exceeds max(0x0)
** Bad device size - mmc 0 **
Card did not respond to voltage select! : -110
starting USB...
No working controllers found
USB is stopped. Please issue 'usb start' first.
starting USB...
No working controllers found
PCIe BRCM: link down
ethernet@7d580000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
bcmgenet: PHY startup failed: -110
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-dc-a6-32-fe-c3-47

*** repeating similar error ***
....

So apparently the eMMC memory is not detected properly. Also when I do mmc info I get 0 Bytes capacity:

U-Boot> mmc info
Device: emmc2@7e340000
Manufacturer ID: 15
OEM: 100
Name: 8GTF4 
Bus Speed: 25000000
Mode: MMC legacy
Rd Block Len: 512
MMC version 4.0
High Capacity: Yes
Capacity: 0 Bytes
Bus Width: 4-bit
Erase Group Size: 104 MiB

Any suggestions on how I could adapt the recipe to work for a CM4?

hacor commented 1 year ago

Hi @obachtos

Did you eventually get this to work? I'm trying to build a Debos image for CM4 and stumbling upon the same problems

Thanks! Hacor

obachtos commented 1 year ago

Unfortunately no, we ended up building an image by hand.

hacor commented 1 year ago

Ok thank you for the info!