Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Post pandemic Raspberry Pi4's don't seem to work.: (18 Items)
   
Post pandemic Raspberry Pi4's don't seem to work.  
Hi,

We managed to get our hands on three RPi4 model B's from Amazon. To our dismay they won't start when the pre pandemic SD
 cards are inserted (that we know work fine).

Has anyone else found this?

I'm going to bring the 5V/3.3V USB/serial cable into work tomorrow and see if I can see anything meaningful on the 
terminal. I imagine that something has changed slightly in the architecture preventing them from starting. 

Hopefully we can get these things working without too much bother. Maybe a tweak of the config.txt file? I've still got 
about four pre pandemic Pi's that I will be extra careful with!

Geoff.
Re: Post pandemic Raspberry Pi4's don't seem to work.  
> We managed to get our hands on three RPi4 model B's from Amazon
I feel your pain. They are not cheap on Amazon. Somebody is getting rich off these.

> To our dismay they won't start when the pre pandemic SD cards are inserted
Can you be more specific about what doesn't work? I know that the SD card is not recognized in some variant of RPi4. We 
haven't managed to figure out what is different on this variant and why. That said, it only prevents the file system on 
the card from being mounted by devb-sdmmc but the board does boot and the IFS works.

Does raspbian boot on these?

--Elad

Re: Post pandemic Raspberry Pi4's don't seem to work.  
You may want to make sure you get up to date firmware. I've seen cases where older Pi's will boot but newer ones 
wouldn't until the firmware was updated.

The latest can be obtained from https://github.com/raspberrypi/firmware.
Currently only three files are required. These can be obtained using:

wget https://github.com/raspberrypi/firmware/raw/master/boot/bcm2711-rpi-4-b.dtb
wget https://github.com/raspberrypi/firmware/raw/master/boot/start4.elf
wget https://github.com/raspberrypi/firmware/raw/master/boot/fixup4.dat
Re: Post pandemic Raspberry Pi4's don't seem to work.  
Hi Elad, Roger,

Thanks for your responses.

I brought a suitable USB/serial cable into work today and using the firmware files Roger pointed me to was able to see 
the RPi trying to get started. I have attached a screenshot of the terminal output.

From startup where the first line is "MMU: 16-bit ASID..." it gets to the final line where it says"All ClockCycles 
offsets within tolerance", pauses for a couple of seconds, and then repeats from the MMU: line. Just keeps going around 
and around.

I don't think it's getting to where it wants to load the IFS file. I looked into the BSP for "All ClockCycles" and 
couldn't find anything like that.

I am not sure if I'm using the very latest BSP (as the one I'm using has up until now been very stable) so when I can 
I'll check that out and see what happens. But as I said, I don't think it's getting to load the IPL.

Geoff.
Attachment: Image rpi4_terminal.png 304.62 KB
Re: Post pandemic Raspberry Pi4's don't seem to work.  
I am not sure what prompted me to compare the checksums of the ifs-bin files but I did. And discovered they were 
different! Somehow the copy (using cp on the FAT32 partition) didn't do the job properly.

So I repeated the process and now ifs-qnx is loading. But I have the problem Elad mentioned where the sdmmc driver can't
 find the hardware. I have seen this before with the Compute Module 4.

I may be able to find a workaround for this using a USB thumbdrive that hopefully I can mount as / like I do with the 
Xilinx boards I have. For which the SD cards are read-only.

Geoff.

> Hi Elad, Roger,
> 
> Thanks for your responses.
> 
> I brought a suitable USB/serial cable into work today and using the firmware 
> files Roger pointed me to was able to see the RPi trying to get started. I 
> have attached a screenshot of the terminal output.
> 
> From startup where the first line is "MMU: 16-bit ASID..." it gets to the 
> final line where it says"All ClockCycles offsets within tolerance", pauses for
>  a couple of seconds, and then repeats from the MMU: line. Just keeps going 
> around and around.
> 
> I don't think it's getting to where it wants to load the IFS file. I looked 
> into the BSP for "All ClockCycles" and couldn't find anything like that.
> 
> I am not sure if I'm using the very latest BSP (as the one I'm using has up 
> until now been very stable) so when I can I'll check that out and see what 
> happens. But as I said, I don't think it's getting to load the IPL.
> 
> Geoff.


Re: Post pandemic Raspberry Pi4's don't seem to work.  
You may want to try a few different SD card brands, if you have any around. We found that some work and some don't.

--Elad
Re: Post pandemic Raspberry Pi4's don't seem to work.  
Hi Elad,

I generally use SanDisk's as that's what the local shop mainly stocks. I haven't to date had any problems with them.

Anyway, I have managed to get a viable workaround going by formatting up a mini USB "thumbdrive", shoving some relevant 
files onto it, and after configuring the USB system in the IFS to find it, simply mount it as root. From thereonin the 
SD card is effectively bypassed and the USB drive become the primary. Not the way I'd run an airline but it lets me keep
 going.

The production target system (not a Pi) will eventually not have any writable filesystem on it at all.

BTW, the Pi's cost us about US$200 just for the boards. These had 8Gb memory installed. They used to cost us about US$80


Many thanks Roger! Without you pointing me in the right direction I would have hit a brick wall today!

Cheers,

Geoff.


> You may want to try a few different SD card brands, if you have any around. We
>  found that some work and some don't.
> 
> --Elad



Re: Post pandemic Raspberry Pi4's don't seem to work.  
We too have been struggling with this.  It's hit or miss with the sd driver, which is frustrating to be sure.  If there 
were cards that (nearly?) always worked, it would be great to know which ones!  In our case, we are actually mounting 
NFS drives for some shared data, and makes me think it would be safest to just mount root filesystem specifically for 
each Pi across the network (sort of like our QNX4 nodes did to their host)?

To answer a question earlier in the thread - these machines all seem to work find with raspian/linux installs from the 
SD cards.  
Re: Post pandemic Raspberry Pi4's don't seem to work.  
> We too have been struggling with this.  It's hit or miss with the sd driver, 
> which is frustrating to be sure.  If there were cards that (nearly?) always 
> worked, it would be great to know which ones!  In our case, we are actually 
> mounting NFS drives for some shared data, and makes me think it would be 
> safest to just mount root filesystem specifically for each Pi across the 
> network (sort of like our QNX4 nodes did to their host)?

This is pretty much what I do. QNET is an absolute secret weapon that saves me so much time that it's not funny! But 
sadly the intention is for QNET to be removed from QNX after close to 40 years of use across QNX2/3, 4, 6, and 7. I have
 four Raspberry Pi's - along with a couple of Xilinx and x86_64 - all networked so that I can quickly and easily copy 
files around across all of them (if need be). When I get back to my Linux environment it's often "bugger"! Back to SCP 
that doesn't seem to deal with things like soft links and file modes very well.

> 
> To answer a question earlier in the thread - these machines all seem to work 
> find with raspian/linux installs from the SD cards.  

I think we're very lucky to have QNX 7.1 working on the RPi4. I don't know who put the BSP together but I sure do 
appreciate it! Sure, some things don't seem to work quite right but being able to develop ARM code on a cheap platform 
instead of the very expensive Xilinx board has been a godsend for me personally. Being able to simply mount a QNX6 USB 
and adopt/mount it as root has saved my bacon this week. Along with QNET. I guess one day the SD card issues will be 
resolved.

Geoff.



Re: Post pandemic Raspberry Pi4's don't seem to work.  
Geoff, David ,

You can try this one little trick SD device drivers really hate: comment out lines 607-609 in src/hardware/devb/sdmmc/
sdiodi/sd.c and rebuild devb-sdmmc. These are the lines in question:

    if( ( status = sd_switch( dev, SD_SF_MODE_SET, SD_SF_GRP_BUS_SPD,
                1, sw_status ) ) == EOK ) {
//        if( ( sw_status[16] & 0xF ) != 0x1 ) {
//            status = EIO;
//        }
    }

Let me know if it fixes the problem (though if it does it would be a hack and not a real solution).

--Elad
Re: Post pandemic Raspberry Pi4's don't seem to work.  
Hi Elad,

I tried it. Instead of complaining with the error message "xpt_configure: No sdmmc interfaces found" it returns "
xpt_configure: sdmmc SIM attach failure"

I haven't had a chance to delve further into this myself. Beside I don't know anything about SDMMC drivers so I'll leave
 this to experts!

Geoff.


> Geoff, David ,
> 
> You can try this one little trick SD device drivers really hate: comment out 
> lines 607-609 in src/hardware/devb/sdmmc/sdiodi/sd.c and rebuild devb-sdmmc. 
> These are the lines in question:
> 
>     if( ( status = sd_switch( dev, SD_SF_MODE_SET, SD_SF_GRP_BUS_SPD,
>                 1, sw_status ) ) == EOK ) {
> //        if( ( sw_status[16] & 0xF ) != 0x1 ) {
> //            status = EIO;
> //        }
>     }
> 
> Let me know if it fixes the problem (though if it does it would be a hack and 
> not a real solution).
> 
> --Elad


Re: Post pandemic Raspberry Pi4's don't seem to work.  
Figured I would try to just mount the USB stick instead of the sd cards on the newer pis, but I'm not sure I have the 
options right for the io-usb-otg / devb-mass (or ustor?) drivers.  Any pointers for making sure I load these correctly?

In some cases, I can enumerate the partitions, and can mount my efi (dos) partition.  I can't mount qnx6 partitions 
though.  And should fdisk /dev/hd0 actually work for a USB drive?

Thanks!
Re: Post pandemic Raspberry Pi4's don't seem to work.  
The following works for me. In the build file (of the BSP) and assuming the usb_start.sh routine has successfully 
started io-usb-otg:

devb-umass cam pnp mem name=below1G disk name=usb
waitfor /dev/usb0t177 5
mount -t qnx6 -o sync=ignore /dev/usb0t177 /
waitfor /

I put this between the qconn and [+session] ksh & commands  (in the section called "Remote Debug".

I actually comment out the [+session ] ksh & command and instead run /etc/rc.d/rc.local so that some other stuff gets started from outside of the IFS. Eventually, if I want it, the shell gets started on /dev/ser1. I generally ssh in via the network and rarely use the serial port terminal connection.

I hope this helps!

Geoff.



> Figured I would try to just mount the USB stick instead of the sd 
cards on the
>  newer pis, but I'm not sure I have the options right for the io-usb-otg / 
> devb-mass (or ustor?) drivers.  Any pointers for making sure I load these 
> correctly?
> 
> In some cases, I can enumerate the partitions, and can mount my efi (dos) 
> partition.  I can't mount qnx6 partitions though.  And should fdisk /dev/hd0 
> actually work for a USB drive?
> 
> Thanks!


Re: Post pandemic Raspberry Pi4's don't seem to work.  
Got it, thanks!  Without the sync=ignore option I was unable to mount the qnx6 partitions.  I also continue to be 
puzzled about the below1G name?!  I substituted devb-ustor in place of devb-umass because it seems like that might 
manage high speed flash?

Regardless, at least we have an approach that will let us work around the sdmmc issues!

Thanks again for the help.

-David
Re: Post pandemic Raspberry Pi4's don't seem to work.  
One update is that I used the Raspberry Pi Imager to burn a new boot loader for the Pi4 that allows it to boot from USB 
(and then try the SD).  This works well so with the formatted USB stick I put the EFI partition followed by my qnx6 
partitions and works like a charm - no need for the SD card.

Also intrigued by the network boot possibilities :-)
Re: Post pandemic Raspberry Pi4's don't seem to work.  
Hi David,

I might be interested in how you do this but right now I am grappling with usblauncher_otg on the RPi4 and I'm hoping 
you can help as you indicated earlier on that you had this working. I will create a new thread for this however.

Geoff.

> One update is that I used the Raspberry Pi Imager to burn a new boot loader 
> for the Pi4 that allows it to boot from USB (and then try the SD).  This works
>  well so with the formatted USB stick I put the EFI partition followed by my 
> qnx6 partitions and works like a charm - no need for the SD card.
> 
> Also intrigued by the network boot possibilities :-)


Re: Post pandemic Raspberry Pi4's don't seem to work.  
In regards to our inability to write to the SD card using post-pandemic RPi4's, my colleague here has managed to resolve
 it. We can now write to any partition type (in our case 12 and 177).  The following works for us with only a slight 
loss of read/write performance.

devb-sdmmc-bcm2711 mem name=below1G sdio addr=0xfe340000,irq=158 disk name=sd blk mntperms=755

Basically, he removed everything to do with the bus master.

Geoff.
Re: Post pandemic Raspberry Pi4's don't seem to work.  
We have managed to figure out how to write to the SD card in teh post-pandemic RPi4's by starting the SDMMC driver as 
follows:

devb-sdmmc-bcm2711 mem name=below1G sdio addr=0xfe340000,irq=158 disk name=sd blk mntperms=755

We notice a small loss of read/write performance but it's acceptable. It works for us!

Geoff.