Hello,
I tested the board (MangoPi-MQ1PH) and it boots Ubuntu for RISC-V Nezhra
fine, so the problem is not in U-boot and not in the board.
What else left to be tested is DTS file. Probably it contains incorrect
memreserve. However I attepted to force the elfloader to place itself to
0x0000000042e00000 but it places itself where it wants.
File 'dump.txt' at seL4test is an output from serial console.
I decided that it would be easier to upload all code to the repository
(including U-boot and OpenSBI which I am using):
https://gitlab.com/ohisee/sel4testriscv
How to compile u-boot:
make CROSS_COMPILE=riscv64-linux-gnu- mangopi_mq_pro_defconfig
make CROSS_COMPILE=riscv64-linux-gnu-
OPENSBI=/home/alex/sel4/test/seL4test/build-riscv64/opensbi/platform/generic/firmware/fw_dynamic.bin
Dump uboot-with-spl to mmc
dd if =./u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=512 seek16
Building sel4:
../init-build.sh -DPLATFORM=allwinnerD1 -DRISCV64=1
ninja
place a elfloader and archive.cpio to mmc vfat partition or ext4 partition.
U-boot prompt (it is hardcoded this way)
fatload mmc 0 0x40a2c000 elfloader
fatload mmc 0 0x40a32940 archive.archive.o.cpio
bootelf 0x40a2c000
I decided that if I will not be able to boot it, then I will giveup.
This project has too complex build system. The code of the project is
simpler than the build scripts. Layout of project is also... too
complex. And I did not found any documentation on build system what is
generating what. It is pain especially after FreeBSD build system and Linux.
On 1/14/23 22:08, Axel Heider wrote:
Alex,
Could you make your patches for the D1 available, then I can have a
look into this?
Axel
Am 14. Januar 2023 02:24:17 MEZ schrieb alex--- via Devel
<devel@sel4.systems>:
Hello,
I just have a small question because I found the documentation about
booting the Sel4 on RISC-V systems a bit confusing and not answering my
questions.
1) I have ported all necessary code and I have successful compiled the
`sel4test`.
2) I have flashed a SPL and U-Boot to 'mmc' which was built including
OpenSBI fw_dynamic.bin but against most recent version (Sel4 was also compiled
against most recent version OpenSBI v1.2 U-Boot SPL
2022.10-38338-g528ae9bc6c-dirty (Jan 11 2023 - 01:07:54 +0100)).
3) SPL and U-boot runs perfectly.
4) Sel4 does not want to boot. Why?
So, in the DTS which I extracted from SDK it is said:
`
/memreserve/ 0x40000000 0x200000; /* opensbi */
/memreserve/ 0x42000000 0x100000; /* dsp used 1MB */
memory@40000000 {
device_type = "memory";
reg = <0x0 0x40000000 0x0 0x8000000>;
};
`
For the elfloader objdump reports the `_start at 0x40a21000` so I hardcoded
it into the following
#define CONFIG_BOOTCOMMAND \
"if mmc rescan; then " \
"echo SD/MMC found on device ${mmc_dev};" \
"fatload mmc 0 0x40a21000 elfloader;" \
"fatload mmc 0 0x40a27940 archive.archive.o.cpio;" \
"bootelf 0x40a21000;" \
"fi;" \
And it reported an error:
"Unhandled exception: Load access fault
EPC: 000000007ffbd308 RA: 000000007ffbd33a TVAL: 00000005c66db5aa
EPC: 0000000042e50308 RA: 0000000042e5033a reloc adjusted
Code: 69a2 6145 8082 7480 1793 0069 9426 943e (641c)
resetting ..."
It seems that it relocates itself to 42e5033a (or not?) what actually I was
trying to do manually.
U-boot reports (for the domain0) the next address which is
0x0000000042e00000. And when I am loading elfloader there, it exists back to
uboot shell without any errors and nothing happens.
I can not understand what I am doing wrong, because FreeBSD and Linux
starts normally.
The #define seL4_UserTop is generated from DTS file if I understood
correctly. But it seems it is incorrect.
I will be happy for any hint. Thank you.
------------------------------------------------------------------------
Devel mailing list --devel@sel4.systems
To unsubscribe send an email todevel-leave@sel4.systems
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems