-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update for BCM2711 / CM4 MSD #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor nitpicks.
Since using rpiboot with bootcode.bin files newer than March don't get to stage two with a Pi Zero/CM3+/etc. any chance it could still fall back to using the old built-in bootcode.bin when -d is used and there's no bootcode.bin in the directory? |
@burtyb I think it would be better to fix bootcode.bin Please could you try the attached? It looks like fallout from the move to the common branch where BCM2711 PHY behaviour was selected on 2835 |
* Add 2711 bootcode and FW binaries with the 4 suffix. * Use the device descriptor to select the correct bootcode and hack it so that bootcode.bin translates to bootcode4.bin on a Pi4 allowing the files to remain in the same directory. * Add the latest best for recovery.bin and pieeprom.bin for CM4 * Update the installer. Move the second stage preparation until after the device descriptor has been retrieved because BCM2711 needs a different bootcode.bin. If the '-d' argument specified then check for bootcode.bin in the specified directory and don't fail over to the embedded fmem files. Remove the default 'msd' directory and the references to /usr/share because the behaviour conflicts with the original change to use the fmem files.
I agree :).
No joy using this bootcode.bin but it's different to what I'd reported in the issue as it doesn't have any "new full-speed USB device number" lines.
|
Can I check exactly rpiboot was run? To test this I used a PI4 and copied the attached recovery.bin and the start.elf from the msd directory into a temporary directory then ran the new rpiboot executable pointed at this directory. |
I'm using the overlay option which is what caused my confusion as previously with -o enabled it would load bootcode.bin from the -d directory once but with this patch it's checking bootcode.bin exists in the "-d" directory on startup and then tries loading it from the overlay directory if there's a bootcode.bin in there (which I hadn't updated when I tested yesterday). For me (probably the main/only user of the overlay option) I'd be happy for bootcode[4].bin to only load from the "-d" dir by ignoring the bootcode files on the overlay check with something like if(overlay&&(pathname[0] != 0)&&(strcmp(fname, "bootcode4.bin") != 0)&&(strcmp(fname, "bootcode.bin") != 0)) Or alternatively skip the bootcode[4].bin exists check when overlay is enabled and remove the "(bootcode.bin is always preloaded from the base directory)" help line. |
Sorry, I forgot to say with the bootcode.bin in the zip it works OK now once I'd updated it in all locations. |
@burtyb I have to admit that I didn't try the overlay option :) I've added the patch that you suggested and made the logging slightly more verbose to indicate where the file was actually loaded from. |
@pelwell Can you merge this? |
I've submitted the changes via a separate PR |
@XECDesign