Problem while booting dev-branch on hifive unleashed

125 views
Skip to first unread message

Christian Baumann

unread,
Jan 13, 2020, 4:30:41 AM1/13/20
to Keystone Enclave Forum
Hello,

I tried to setup keystone on an hifive unleashed with the current dev branch. But the boot gets stuck while loading the bbl.

The output looks like the following, but the last few lines are always different (and always broken):

SiFive FSBL:       2020-01-13-bbfcc28
Using FSBL DTB
HiFive-U serial #: 00000xxx
Loading boot payload................................

bbl loader

                SIFIVE, INC.
 <correct sifive-logo>

           SiFive RISC-V Core IP
gmnniitiniiniittitailiialazliiiazzliniingnzg i gs snmsm

i  siinniitm
 i
  tnianiliititaizeaildlai izslzemied
smm d sm s


With qemu it works just fine.

Any idea what could cause this strange output or how to debug it?

My build:
cd keystone
./fast-setup.sh
mkdir builb && cd build
cmake .. -Dplatform=fu540 && make && make image

Except that I changed PART_FSBL=$DISK"4" to PART_FSBL=$DISK"3", because the script just created three partitions.

Kind regards
Christian

Christian Baumann

unread,
Jan 13, 2020, 11:28:42 AM1/13/20
to Keystone Enclave Forum
I already did some further testing.

It seems like the strange output also comes with the master branch, which afterwards successfully starts the kernel. So maybe there is just a problem with the serial output.

I tested vmlinux-file from the master branch (the 4.15? kernel) with the bbl from the dev branch, which seems to work.
So I guess it is a problem with the current 5.4 kernel?

Dayeol Lee

unread,
Jan 13, 2020, 1:25:42 PM1/13/20
to Christian Baumann, Keystone Enclave Forum
Hi,


To summarize, Linux 5.4 will not work anymore with bbl, because of the format change in the device tree.
bbl is now no longer maintained officially, so we are now moving to opensbi (https://github.com/riscv/opensbi).

If you want to boot Linux 5.4 with current Keystone + bbl, you need to see the above thread and do some hacks, 
but I'm not sure if their patch will just work without any issues.

Happy to answer further questions.

Thanks!
Dayeol


--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/8d85cc15-ca82-4176-994e-2961f57d9c1e%40googlegroups.com.

Christian Baumann

unread,
Jan 13, 2020, 3:19:30 PM1/13/20
to Keystone Enclave Forum
Hallo Dayeol,

thank you for your answer!

That means, that you are no longer trying to get Linux 5.4 with bbl working? Maybe a hint in the git would be good, because master suggest using dev, but dev is knowingly not working. I spent way too much time trying to search the problem on my side :D

I would like to apply those hacks, but I have limited knowledge in this field, so I don't think it will work for me without too much effort.

For now I will use the master branch and wait for OpenSBI.

Best regards
Christian

Dayeol Lee

unread,
Jan 13, 2020, 4:01:15 PM1/13/20
to Christian Baumann, Keystone Enclave Forum
Hi, Christian,

Sorry to hear that. It's been frustrating for us as well, but right now, it would be best to work on master.
We will update the README.md to guide people to use master at this moment.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

Dayeol Lee

unread,
Jan 28, 2020, 10:21:21 PM1/28/20
to Christian Baumann, Keystone Enclave Forum
Hi Christian,

we were able to fix the issue by applying some patch to make Linux 5.3 compatible with the DTB passed from FSBL.
There was also some update in FSBL.
We have just pushed the fix to the master,
so please check out the master documentation.

Let me know if you encounter any issues.

Thanks!

Christian Baumann

unread,
Jan 29, 2020, 6:45:26 AM1/29/20
to Keystone Enclave Forum
Hi Dayeol,

great, thank you for the information!

I already tried the new kernel and at least it boots.

But I have problems rebooting the board. I already had the problem with older versions of keystone/fsbl/bbl, but now it seems to be worse.
With the old revision (before the update yesterday), after the reboot the fsbl comes up, but failed to load the bbl. It stops after "Loading boot payload................................".
In the current version, it doesn't even load the fsbl. Do you have any idea what could cause the problem? I used the current master and the current version of freedom-u540-c000-bootloader.

The goal is to put the board inside a rack, so it would be great if I have a reliable reboot.

Other problems I encountered:
- Ethernet doesn't come up. I get this error message: macb 10090000.ethernet: failed to get macb_clk (-517)
- The LED doesn't flash after booting
And with these two problems I can't figure out if the board really isn't booting or if I just can't see anything on the serial interface.

Best regards
Christian
Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

Dayeol Lee

unread,
Jan 29, 2020, 1:41:19 PM1/29/20
to Christian Baumann, Keystone Enclave Forum
To make sure, did you reflash the FSBL with current master of the keystone-enclave fork (https://github.com/keystone-enclave/freedom-u540-c000-bootloader)?
All of these problems are basically due to new DTB format in newer Linux, and has nothing to do with Keystone.
The change I made to FSBL is very minor and may not affect whether FSBL loads or not.

I will also test again on my side just in case I missed something.

LED / ethernet seems solvable. Let me reproduce it.

Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/7f234230-84aa-4d03-984d-b955cc04f462%40googlegroups.com.

Dayeol Lee

unread,
Jan 29, 2020, 1:45:03 PM1/29/20
to Christian Baumann, Keystone Enclave Forum
+ Could you confirm that you see these messages when you boot the board?

image.png

Christian Baumann

unread,
Jan 29, 2020, 8:20:22 PM1/29/20
to Keystone Enclave Forum

Hello Dayeol,

yes, I used the forked fsbl from the keystone-enclave project (and I also recognized the minor changes). At the first boot, I got the correct output from the FSBL like in your screenshot and the system boots just fine. But if I use the reboot command, I don't get any output after the shutdown has completed, not even the output from FSBL.

Could you reproduce the problem?

Kind Regards
Christian
Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

Dayeol Lee

unread,
Jan 29, 2020, 9:04:56 PM1/29/20
to Christian Baumann, Keystone Enclave Forum
Yes, I was able to reproduce this.
I think Linux hangs on "reboot" command.
I suspect this is another DTB-related issue if not this one https://forums.sifive.com/t/rack-mount-hifive-unleashed/1673/3

I would consider power-switch mentioned in the thread.
Even if reboot works, there might be cases where the machine hangs (given that Keystone bbl is still in an experimental stage).

Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/d6c568aa-90e6-4cc1-bc05-76e17ef84310%40googlegroups.com.

Christian Baumann

unread,
Jan 31, 2020, 1:08:29 PM1/31/20
to Keystone Enclave Forum
I did some research and even the riscv linux build from sifive doesn't reboot correctly. For now I'll use the power-switch.

Do you have any updates on the Ethernet problem? Because without network access I can't really work with the board and I have to use an old version.
Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-forum+unsub...@googlegroups.com.

Christian Baumann

unread,
Aug 27, 2020, 9:57:32 AM8/27/20
to Keystone Enclave Forum
Hello,

I just tried deploying an (almost) current dev branch (Commit a2d7e02b377ac029b9be70987cedecba54bcaa3c from 24th Jun).

I booted the hifive unleashed board, but the etherent doesn't work and I got the same error message from january: "macb 10090000.ethernet: failed to get macb_clk (-517)"
Has this issue been fixed in the meantime and this is a new error? Because I don't want to use a really old version of Keystone.

Developing an eapp inside qemu is nice, but to really use the features of a TEE, it should also run on hardware which has a working ethernet connection.

Best regards
Christian

Dayeol Lee

unread,
Aug 28, 2020, 12:47:01 PM8/28/20
to Christian Baumann, Keystone Enclave Forum
This is the same error, and hasn't got resolved...
We're looking for someone who is familiar with this matter to help.

To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/cab6cf1e-2226-42cf-a10b-484d775c9f98n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages