Closed mathmax12 closed 5 years ago
The released Linux image(4.2) works. Is the flow used for this image is different from the one in the readme of ariane-sdk? I'd like to make this image-building flow work in case I need to modify the kernel.
Thanks
No, the build flow is the same. I have no idea why it would not work. Maybe @zarubaf can help?
Here is a difference between the prebuilt of Ariane 4.2 and the one using the built flow. after copying boot image ................................ done! I didn't see the bbl loader. why?
pre-built of Ariane4.2 `Hello World! init SPI status: 0x0000000000000025 status: 0x0000000000000025 SPI initialized! initializing SD... SD command cmd0 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 00 sd initialized! gpt partition table header: signature: 5452415020494645 revision: 00010000 size: 0000005C crc_header: F284C891 reserved: 00000000 current lba: 0000000000000001 backup lda: 0000000001DACBFF partition entries lba: 0000000000000002 number partition entries: 00000080 size partition entries: 00000080 gpt partition entry 00 partition type guid: D5F7127456A1134B81DC867174929325 partition guid: 20E0BAC71CE97A4E8BF623A69B0E12FA first lba: 0000000000000800 last lba: 00000000000107FF attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 01 partition type guid: AF3DC60F838472478E793D69D8477DE4 partition guid: 49D055D751AA814AB6A35C50080FF12E first lba: 0000000000010800 last lba: 0000000001DACBDE attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 02 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 03 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 copying boot image ................................ done! bbl loader
.shh+
.yMMMMMm+
.yMMMMMMMMMN+
.yMMMMMMMMMMMMMN+`
.yMMMMMdooooosmMMMMN+`
-yMMMMMMMy +sss.-MMMMMMN+`
-hMMMMMMMMMy +ooo.-MMMMMMMMNo`
-hMMMMMMMMMMMy osssymMMMMMMMMMMNo
..` NMMMMMMMMMMMMy.mMMMMMMMMMMMMMMMMMs.
-osss+. -dMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMmhhy:
-osssssss+. `+ss+- :dMMMN+:+dMMMMMMMMMMMMMMMMMMmhhhhhhy:
:osssssssssss+sssssso` :hy` :NMMMMMMMMMMMMMMmhhhhhhhhhhy:
:osssssssssssssssssssss- sMMMMMMMMMMMMMMMNdhhhhhhhhhhy:
:ossssssydMMdssssssssss/. .odMMMMMMMMMMMMMMMMMNhhhhhhhhhhhhy/
:ossssssshMMMMMNyssssssss+. -hMMMMMMMMMMmmMMMMMNhhh-:hhhhhhhhhhy/
`
The one from built following the fellow.
Hello World! init SPI status: 0x0000000000000025 status: 0x0000000000000025 SPI initialized! initializing SD... SD command cmd0 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 01 SD command cmd55 response : 01 SD command cmd41 response : 00 sd initialized! gpt partition table header: signature: 5452415020494645 revision: 00010000 size: 0000005C crc_header: 0E7898B5 reserved: 00000000 current lba: 0000000000000001 backup lda: 0000000001DACBFF partition entries lba: 0000000000000002 number partition entries: 00000080 size partition entries: 00000080 gpt partition entry 00 partition type guid: D5F7127456A1134B81DC867174929325 partition guid: BEA260EF42C7F3409303BE8B69A53C05 first lba: 0000000000000800 last lba: 00000000000107FF attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 01 partition type guid: AF3DC60F838472478E793D69D8477DE4 partition guid: 4F4051873F1CF747BE33C871AA779846 first lba: 0000000000010800 last lba: 0000000001DACBDE attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 02 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 gpt partition entry 03 partition type guid: 00000000000000000000000000000000 partition guid: 00000000000000000000000000000000 first lba: 0000000000000000 last lba: 0000000000000000 attributes: 0000000000000000 name: 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 copying boot image ................................ done! [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000 [ 0.000000] Linux version 5.1.0-rc7 (root@msl-mip-dev18) (gcc version 8.2.0 (GCC)) #4 SMP Tue Aug 27 13:41:16 PDT 2019 [ 0.000000] initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
I also tried to use openocd . Here is the output
# openocd -f ./ariane.cfg
Open On-Chip Debugger 0.10.0+dev-00629-g5173ddf (2019-08-27-15:47)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : clock speed 1000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Info : datacount=2 progbufsize=8
Error: unable to halt hart 0
Error: dmcontrol=0x80000001
Error: dmstatus =0x00000c82
Error: Fatal: Hart 0 failed to halt during examine()
Info : Listening on port 3333 for gdb connections
Error: Target not examined yet
Hm, no idea actually. Especially as it boots relatively far.
Thanks anyway! I switched to lowerisc-chip and found that the build bbl works.
@mathmax12
Hi, I am trying to load bbl with gdb to Ariane on a FPGA and hope you or someone can give me some pointers. DDR on my board starts from 0x200000000 for 8GB. I have modified PAGE_OFFSET to 0xfffffffe00000000 (2's complement of 0x200000000) when I built vmlinux. After I built bbl, I loaded bbl to address 0x280000000 with riscv64-unknown-elf-gdb. I wonder what should I do next to have it run, to copy code to 0x20000000, etc. Thanks a lot in advance!
I post this issue under Ariane but can't find a way to delete it there. Can I get help with this issue? https://github.com/pulp-platform/ariane/issues/309
Thanks.