Comments (33)
So booting from SDcard still doesn't work. It seems not to recognise the boot image.
When I try to boot from serial, it starts but fails with this message:
sL5DdSMmkekro
[LITEX-TERM] Received firmware download request from the device.
[LITEX-TERM] Uploading boot.bin to 0x40000000 (17920552 bytes)...
[LITEX-TERM] Upload calibration... (inter-frame: 10.00us, length: 64)
[LITEX-TERM] Got unexpected response from device 'b'E''
I use this command:
litex_term /dev/ttyUSB1 --serial-boot --kernel boot.bin
In Litex BIOS command line, I can detect the SD-card, but when I try to init it it fails:
litex> sdcard_init
Initialize SDCard... Failed.
This was with a SoC generated with --with-sdcard
I am now trying with --with-spi-sdcard
from linux-on-litex-rocket.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
Thanks, so the loading of the bitstream works then. But apparently the BIOS cannot read from the SD/USB. This is the process I would like to debug. Is there a way to do that? I realise now that even though I can load the FPGA bitstream from the USB-stick, the BIOS can probably not read from the USB (but I got the same problem when I bit the boot.bin
on the SDcard.
I will try to send the boot.bin
over the serial port instead.
from linux-on-litex-rocket.
I just found this that you wrote on your web page "Booting from a µSD card (in SPI mode) is also currently supported.". I did not build the system with --with-spi-sdcard
so I will try that.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
Ok, I got progress with --with-spi-sdcard
--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
Timeout
Booting from SDCard in SPI-Mode...
Booting from boot.json...
boot.json file not found.
Booting from boot.bin...
Copying boot.bin to 0x80000000 (17920552 bytes)...
[########################################]
Executing booted program at 0x80000000
--============= Liftoff! ===============--
But it is still tuck at this stage and I will rebuild busybox, the kernel and BBL to see if it helps.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
The pre-built images did not work booting from an SD-card (because the SoC was not built for SPI, I presume). But thanks to your comment that I must load the boot image at 0x800000, I could specify that to litex_term
and I am now loading your boot image serially which is horribly slow. I don't know if it will work.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
It's been a while, but IIRC the nexys4ddr bitstream was built using
--with-ethernet --with-sdcard
(note: not spi-sdcard!).
Yes, this was the issue I had to start boot at all. The board did not recognize that. Switching to spi-sdcard
made it start booting but it's still stuck at Liftoff
.
from linux-on-litex-rocket.
I have come as far as to figure out that the boot loader gets stuck right after calling the uart_sync()
in boot.c
.
I have put a printout right before and right after, and this is the printout:
--============= Liftoff! ===============--
Before uart sync
Af
It should have printed After uart_sync
instead of just Af
.
As far as I can see the uart is set up properly and it can load a boot binary over the serial interface just right (with the same behaviour as when loading the file from the SD card.
Changing to define UART_POLLING
got the boot process a little further but it still hangs.
It should be noted that I can boot with the prebuilt bitstream and I am using the prebuilt boot.bin
. So there's something wrong in how the SoC is built.
Any pointers, please?
Also, is there a way to change the BIOS without re-building the entire SoC?
from linux-on-litex-rocket.
from linux-on-litex-rocket.
But the BIOS works well. I can interact with it.
from linux-on-litex-rocket.
In the generated documentation the UART has address: 0x12004800 while in the .dts file (in the conf directory) it is 0x12006800.
I wonder how the bios worked as it goes through the uart as well. I will try to change the dts.
from linux-on-litex-rocket.
Thanks! That brought me one step further. The output now ends with:
bbl loader
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvv
rr vvvvvvvvvvvvvvvvvvvvvvvv rr
rrrr vvvvvvvvvvvvvvvvvvvvvvvvvv rrrr
rrrrrr vvvvvvvvvvvvvvvvvvvvvv rrrrrr
rrrrrrrr vvvvvvvvvvvvvvvvvv rrrrrrrr
rrrrrrrrrr vvvvvvvvvvvvvv rrrrrrrrrr
rrrrrrrrrrrr vvvvvvvvvv rrrrrrrrrrrr
rrrrrrrrrrrrrr vvvvvv rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr vv rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrr
INSTRUCTION SETS WANT TO BE FREE
Now it remains to see why it's stuck there.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
I enabled that flag, which did not really change anything. However, loading the bitstream from the USB instead of the SD-card made a difference and now it starts to boot Linux but hangs after:
[ 15.994106] handlers:
[ 15.996340] [<(____ptrval____)>] liteuart_interrupt
[ 16.001204] Disabling IRQ #1
I have attached the build log of the bitstream and the full boot log. If you have time to look at it, I would appreciate it very much.
boot.log
build.log
from linux-on-litex-rocket.
I will be trying that.
A question: when I set CONFIG_RISCV_SBI_V01=y I get two questions I do not really know what they are:
Early console using RISC-V SBI (SERIAL_EARLYCON_RISCV_SBI) [N/y/?] (NEW)
and
RISC-V SBI console support (HVC_RISCV_SBI) [N/y/?] (NEW)
What is the proper answer to these?
from linux-on-litex-rocket.
I answered y to both of the questions before and with the next to last commit for the linux image, I can now boot to prompt.
Thanks for all the help.
from linux-on-litex-rocket.
from linux-on-litex-rocket.
In the generated documentation the UART has address: 0x12004800 while in the .dts file (in the conf directory) it is 0x12006800. I wonder how the bios worked as it goes through the uart as well. I will try to change the dts.
Hello, @matsbror. I met the same issue with you, can you give me some help, thank you!
The printf worked before uart sync, while failed after uart sync.
I have checked the uart addresses in the generated csr.csv (0x12005800)
csr_base,ctrl,0x12000000,, csr_base,ddrphy,0x12000800,, csr_base,identifier_mem,0x12001000,, csr_base,leds,0x12001800,, csr_base,sdcard_block2mem,0x12002000,, csr_base,sdcard_core,0x12002800,, csr_base,sdcard_irq,0x12003000,, csr_base,sdcard_mem2block,0x12003800,, csr_base,sdcard_phy,0x12004000,, csr_base,sdram,0x12004800,, csr_base,timer0,0x12005000,, csr_base,uart,0x12005800,,
and .dts file (0x12005800).
` bootargs = "console=liteuart earlycon=liteuart,0x12005800 rootwait root=/dev/ram0";
.......
liteuart0: serial@12005800 {
compatible = "litex,liteuart";
reg = <0x12005800 0x100>;
status = "okay";
};`
So I am really confused about that. @gsomlo Did you patch 'json2dts' successfully? Can you give me some help, thank you!
from linux-on-litex-rocket.
from linux-on-litex-rocket.
Related Issues (20)
- Debug system instabilities HOT 2
- Simulator UART address HOT 3
- Which cpu architecture to use in BBL building when full rocket (with fp) is used? HOT 2
- Documentation of the varying rocket cpu-variants HOT 2
- Simulation (using Verilator) failed HOT 1
- Unable to boot Linux - userspace cannot write to console, no busybox shell HOT 7
- litex_sim fails loading opensbi: Liftoff hangs HOT 4
- Unable to boot into linux on simulated SoC - Kernel panic HOT 11
- zifencei + zicsr needed to build BBL HOT 3
- Has anyone tried having this fabricated on the OpenMPW shuttle? HOT 6
- RocketChip standalone build support is deprecated upstream, requires use of SoC frameworks HOT 5
- Unable to build rocket cpu for terrasic de2 115 HOT 1
- genesys2: full4q CPU variant not supported HOT 2
- build busybox : fatal error:crypt.h No such file HOT 3
- Repo status HOT 5
- Arty A7-100T Boot Linux Panic about irqchip. HOT 1
- Booting linux panic on Arty A7-100T 【uart and irq error】 HOT 2
- Running Bare Metal application code on litex with cpu type rocket HOT 1
- Booting a lightweight image of linux on the litex simulator HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linux-on-litex-rocket.