Hi
I am trying to run Keystone on the PolarFire Icicle Kit. TL;DR: it doesn't work yet, the kernel does not start after u-boot starts on uart1.
While
Gui Andrade's guide is helpful, its Keystone compilation step no longer works (I assume it was written for Keystone <1.x).
Here is what I did so far:
1) Follow Keystone documentation to compile it. The Makefile is created from cmake -DSM_PLATFORM=mpfs .. . I've used the dev-mono branch as it seems more up-to-date. What is the advantage/disadvantage of this branch compared to master?
2) Flash the firmware with Keystone security monitor. I've followed Andrade's guide
"Flashing OpenSBI + Keystone" section. Do not forget to close jumper J9 on the board.
Here I've tried with different files (fw_[jump|payload].[elf|bin]), but the same problem appeared when booting the board.
3) Create the fitImage file that contains the Linux kernel image.
$ cd keystone/build/linux.build/
$ cp path/to/fitImage-its-[...].its ./fitImage.its
$ mkimage -f "fitImage.its" fitImage
Then upload fitImage to the board (in my case, I copied it to my sdcard boot partition that has been previously created when installing yocto).
4) Copy the rootfs in build/buildroot.build/images/rootfs.ext2 to the root partition of the eMMC/SD card (the latter in my case).
5) Start the board. Hart0 executes correctly, then u-boot starts on hart1, prints "Starting kernel ...", and nothing more happens.
Changing the following line in src/sm.c does not fix the problem:
@@ -167,7 +167,7 @@ void sm_init(bool cold_boot)
/* below are executed by all harts */
pmp_init();
- pmp_set_keystone(sm_region_id, PMP_NO_PERM);
+ pmp_set_keystone(sm_region_id, PMP_ALL_PERM);
Please find attached the uart0 and uart1 log files.
Would you know how to debug (or even fix) this problem? Do you know how I can use OpenOCD to debug the board?
Best
Pierre Louis Aublin