yannickb
Posts: 4
Joined: Tue May 07, 2019 7:00 pm

Strange CM3 booting issue

Mon Jul 22, 2019 11:28 pm

Hello,

We have a buildroot image that we plan rolling on all our embedded systems quite soon.
Except... we have an issue with *SOME* CM3s (about 4 every 50 units processed).

Basically, when these "faulty" CM3s are booted, the activity LED stays always ON.
From what I understand this means there is a corruption issue.

Except when we flash these CM3s we checksum them after and compare the checksum
to the image's checksum (our image, the buildroot one) and the checksums match perfectly
every single time, which means the image was written OK (we use direct IO to checksum,
so no buffering gets in the way here).
Yet they won't boot (act. LED always ON when booting, no blinking whatsoever).
Please note that only 4 in 50 do this, the 46 others work perfectly fine.

Now when we flash Raspbian Buster into these "faulty" CM3s, they work!!! So we wonder
what it could be. I have almost zero means to test anything because well I can't boot them
(all I get is a black screen on the "faulty" ones).

Perhaps someone with a better RPi experience than mine can give me some insights, I know
this isn't something easy to diagnose given the info I gave.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1425
Joined: Sat Sep 10, 2011 11:43 am

Re: Strange CM3 booting issue

Tue Jul 23, 2019 6:40 am

Can you try changing your image to be fat32 rather than fat16?
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2317
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Strange CM3 booting issue

Tue Jul 23, 2019 7:54 am

How old is the firmware in your buildroot image? Try copying the bootcode.bin from the Buster image, in case there are subtle board differences that the older version doesn't understand.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1425
Joined: Sat Sep 10, 2011 11:43 am

Re: Strange CM3 booting issue

Tue Jul 23, 2019 9:19 am

Looking at the buildroot partition creation it suggests that it will create a FAT32 partition:

https://github.com/buildroot/buildroot/ ... rrypi3.cfg

This contains partition-type=0xc which suggests it is correct...

But I've seen such partitions causing this problem... I would suggest you try to create a FAT32 partition directly using parted and mkfs.vfat -F32 then copy the files across to see if this changes the effect...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

yannickb
Posts: 4
Joined: Tue May 07, 2019 7:00 pm

Re: Strange CM3 booting issue

Wed Jul 24, 2019 12:07 am

Indeed it was a FAT16 issue. Buildroot makes a 16-bit VFAT partition by default, had to use extraargs="-F 32" to force 32-bit VFAT creation AND bump the partition size from 32M to 64M because of FAT32 minimum partition size requirements.

What I wonder is why 4 out of 50 CM3s "don't like" FAT16. Is it related to a eventual first stage bootloader update that was done along the route and made the CM3 compatible with FAT16?
I really would like to understand. This isn't a critic in any way, just that I like understanding the causes of issues, helps make sense of things.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1425
Joined: Sat Sep 10, 2011 11:43 am

Re: Strange CM3 booting issue

Wed Jul 24, 2019 6:17 am

My experimentation hasn't revealed the problem, but I believe it's to do with the timing differences between reading from the different sectors on the SD card... Basically the code tries to read from the first sector of the FAT partition and locks up!

Can you put in a pull request to the buildroot code to make this change, and CC me (@ghollingworth) I'll add a little there

Thanks

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Return to “Compute Module”