-
Notifications
You must be signed in to change notification settings - Fork 38
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
how to use fsbl.bin in HighFive Unleashed board ? #9
Comments
Start with my gptfdisk patches and create a partition on the sdcard and
flip the right switch, that way you can test by just DDing fsbl.bin to the
fsbl partition without having to deal with the spi flash write commands
…On Thu, Sep 20, 2018, 1:13 PM Atish Patra ***@***.***> wrote:
I have made some changes to the device tree and generated the fsbl.bin.
How do I update that in Unleashed ?
Chapter 6 in Unleashed starting guide only talks about steps to update
complete firmware hifive-unleashed-a00-A.B-YYYY-MM-DD.gpt. This also
contains the FSBL, DTB, and recovery kernel.
What is the best procedure to generate the .gpt file ?
@palmer-dabbelt <https://github.com/palmer-dabbelt> @terpstra
<https://github.com/terpstra> @tmagik <https://github.com/tmagik>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGAQEN6pHRUjoI9WXOWRHbiyhqnv2I_lks5uc9rggaJpZM4WyqOQ>
.
|
Thanks for the prompt response @tmagik. How do I find your gptdisk patches ? |
… On Thu, Sep 20, 2018, 1:30 PM Atish Patra ***@***.***> wrote:
Thanks for the prompt response @tmagik <https://github.com/tmagik>. How
do I find your gptdisk patches ?
I don't see anything in the git log.
https://github.com/sifive/freedom-u540-c000-bootloader/commits/master
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGAQEMlTTQc1-N6NYKSpiwLfZIUOgahtks5uc966gaJpZM4WyqOQ>
.
|
Thanks. What is the fsbl partition? I see three partitions. /dev/mtd0 - I think this is the one. But the Unleashed starting guide says use this to flash the complete firmware for spiflash as well. |
We need to document this a little (or maybe a lot?) better.
WIth MSEL2 in the position towards the outside of the board, the zsbl will load the fsbl from the SDcard, which in the way I have my development system partitioned is /dev/mmcblk0p4
cat /proc/partitions
major minor #blocks name
31 0 32768 mtdblock0
259 0 250059096 nvme0n1
179 0 7761920 mmcblk0
179 1 20480 mmcblk0p1
179 2 7629807 mmcblk0p2
179 4 1024 mmcblk0p4
So if you can get a pretty nice flow for FSBL development (that involves manually swapping SDcards, for now) by putting it on a small partition.
The ‘.gpt’ data that goes into the flash is basically just a disk image with a GPT partition map that would also work if written to an SDcard.
There is scripting and documentation that needs to be worked out better after we have u-boot running, which is what I’m trying to get done now.
… On Sep 20, 2018, at 8:34 PM, Atish Patra ***@***.***> wrote:
Thanks. What is the fsbl partition? I see three partitions.
/dev/mtd0 - I think this is the one. But the Unleashed starting guide says use this to flash the complete firmware for spiflash as well.
/dev/mtd0ro
/dev/mtdblock0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I am still confused. Apologies for the requesting repeated clarification.
so it should be 010000 (MSEL 0110000 position is for flash update only?)
If I understand correctly, zsbl will load fsbl from /dev/mmcblk0p4?
Thanks for the details.
Here are the all steps as per my understanding
|
On Fri, Sep 21, 2018 at 12:06 PM Atish Patra ***@***.***> wrote:
If I understand correctly, zsbl will load fsbl from /dev/mmcblk0p4?
I will be creating that partition using gdisk. I did not quite understand
how zsbl will know to load the fsbl from that. I thought it will load from
mtdblock0 or something. Can you please clarify little more on this ?
It looks at the partition codes.
tmagik/gptfdisk@27f5602
You can also find the partition codes in the freedom-u-sdk Makefile.
I haven't done this myself though. It really needs better documentation
somewhere.
Jim
|
FSBL and ZSBL share the same code, which understands GPT partitions:
https://github.com/sifive/freedom-u540-c000-bootloader/blob/master/ux00boot/ux00boot.c#L24
to summarize the ones we (probably) care about:
- = switch toward the top of the board (ethernet connector as ‘top’)
_ = switch toward the bottom of the board
#define MODESELECT_ZSBL_SPI2_SDCARD_FSBL_SPI2_SDCARD 11 // 1011 __-_
#define MODESELECT_ZSBL_SPI0_MMAP_QUAD_FSBL_SPI2_SDCARD 15 // 1111 ____
… On Sep 21, 2018, at 2:38 PM, Jim Wilson ***@***.***> wrote:
On Fri, Sep 21, 2018 at 12:06 PM Atish Patra ***@***.***>
wrote:
> If I understand correctly, zsbl will load fsbl from /dev/mmcblk0p4?
>
> I will be creating that partition using gdisk. I did not quite understand
> how zsbl will know to load the fsbl from that. I thought it will load from
> mtdblock0 or something. Can you please clarify little more on this ?
>
It looks at the partition codes.
tmagik/gptfdisk@27f5602
You can also find the partition codes in the freedom-u-sdk Makefile.
I haven't done this myself though. It really needs better documentation
somewhere.
Jim
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ahh. Now it makes sense. Thanks @tmagik @jim-wilson I tried as per discussed above. However I couldn't boot into unleashed board. Partition table scan: Found valid GPT with protective MBR; using GPT. Command (? for help): i I verified the partition3 by dumping to a text file. It looks like a have a correct fsbl. |
ok. I got it working. Thanks @tmagik Here are the steps in case anybody is also trying to do the same.
Here is my partition table. The new partition should be of SiFive FSBL (type 5201)
|
I have made some changes to the device tree and generated the fsbl.bin. How do I update that in Unleashed ?
Chapter 6 in Unleashed starting guide only talks about steps to update complete firmware hifive-unleashed-a00-A.B-YYYY-MM-DD.gpt. This also contains the FSBL, DTB, and recovery kernel.
What is the best procedure to generate the .gpt file ?
@palmer-dabbelt @terpstra @tmagik
The text was updated successfully, but these errors were encountered: