Thursday, 2021-02-11

*** tpb has joined #litex00:00
*** indy has quit IRC00:14
*** lkcl has quit IRC00:21
*** Degi has quit IRC00:22
*** Degi has joined #litex00:25
*** lf has quit IRC00:27
*** lf has joined #litex00:27
*** lkcl has joined #litex00:34
*** futarisIRCcloud has joined #litex00:44
*** lkcl has quit IRC01:02
*** lkcl has joined #litex01:15
*** shorne has quit IRC01:18
*** lkcl has quit IRC01:49
*** FFY00 has quit IRC02:47
*** FFY00 has joined #litex02:47
*** keesj_ has joined #litex02:58
*** lkcl has joined #litex03:00
*** keesj has quit IRC03:01
*** Bertl_oO is now known as Bertl_zZ03:23
*** Degi_ has joined #litex03:54
*** Degi has quit IRC03:56
*** Degi_ is now known as Degi03:56
*** lkcl has quit IRC04:37
*** lkcl has joined #litex05:49
*** lkcl has quit IRC06:19
*** indy has joined #litex06:29
*** lkcl has joined #litex06:32
*** lkcl has quit IRC07:38
geertunickoe: somlo: Just look at the generated images/boot.json07:41
geertulinux-on-litex-vexriscv$ cat images/boot.json07:41
geertu{ "Image":       "0x40000000", "rv32.dtb":    "0x40ef0000", "rootfs.cpio": "0x41000000", "opensbi.bin": "0x40f00000"07:41
geertu}07:41
geertu(hmm, somehow the LFs after commas got lost)07:42
*** lkcl has joined #litex07:51
nickoegeertu: Yeah, thank you. I will try it out when I get home.09:24
*** jimbzy has quit IRC09:30
*** midnight has quit IRC09:32
*** jimbzy has joined #litex09:33
*** midnight has joined #litex10:32
*** Bertl_zZ is now known as Bertl11:03
*** futarisIRCcloud has quit IRC12:34
*** awordnot has quit IRC12:39
*** lkcl has quit IRC12:50
*** lkcl has joined #litex13:04
*** Bertl is now known as Bertl_oO13:25
*** Dolu has joined #litex13:39
*** mikeK_de1_SoC_py has joined #litex14:32
*** zyp has quit IRC15:47
*** zyp has joined #litex15:47
nickoegeertu: Can I put a bitstream on to the sdcard as well?16:42
nickoeOr only things that are to be loaded into memory of the soc?16:42
somlonickoe: loading bitstream from an sdcard is a feature that depends on your board (typically there's a jumper that configures whether the board should search for a .bit file on the first msdos formatted partition of an sdcard, or whether it should wait to be programmed over jtag/usb, etc.)17:05
nickoesomlo: well, it looks like the bios searches for it, but I just tried to reload the bios.bin, but that sorta does not boot properly17:06
nickoesomlo: So I just flashed the bittream on the device, and then https://dpaste.com/GRAQGX2H917:07
tpbTitle: dpaste: GRAQGX2H9 (at dpaste.com)17:07
nickoeit gets stuck in the end of that paste.17:07
somlonickoe: the bios "software" (or "firmware" if you will) is part of the bitstream itself, an gecomes accessible to the SoC as a SRAM "memory" once the FPGA has been programmed17:07
nickoeI am not sure whats up with that.17:07
nickoeyes, so I would expect that I can reload that as is again?17:08
somlohow you get bitstream into the FPGA happens way before this thing even "nows" it's supposed to act out a LiteX SoC, which includes the ROM containing the bios for the "cpu" to "execute" :)17:08
somlo* "knows"17:08
nickoeBut shouldn't I be able to reload and reboot the original bios.bin?17:09
somlolitex_term will under certain circumstances let you load a new bios without needing to rebuild the whole bitstream that includes its default, "burned-in" state17:10
somlobut you asked "can I put a bitstream on the sdcard", which is somewhat orthogonal to "can I update the bios opcodes of a default bios that came as part of the bitstream" :)17:11
somlothe first one is "depends on whether the board will do that for you"; the latter is "yes, via litex_term, and I'm not super familiar with the details of *that*"17:12
nickoesomlo: well, yes, but I wanted to verify that the bin file I am trying to boot from a sdcard works via serialboot fist.17:13
nickoe*first17:13
nickoeI figure, if I can serialboot a bin, it should also work on the sdcard. It is a bit eaasier to serialboot than sdard boot when testing.17:14
*** futarisIRCcloud has joined #litex17:15
somlothat makes sense -- as long as the only things you're changing are in the bios (i.e., *not* in the gateware itself), loading a fresh bios on top of what came default with the bitstream should save you all the vivado synthesis/place/route17:15
futarisIRCcloudhttps://github.com/riscv/meta-riscv/pull/267 - RV32 should be working in meta-riscv openembedded now. Anyone tried it on litex yet?17:15
*** awordnot has joined #litex17:20
nickoehow do I build this demo software? https://github.com/enjoy-digital/litex/tree/master/litex/soc/software/demo17:21
nickoethere appears to be some more documentation about the boot stuff at https://github.com/enjoy-digital/litex/wiki/Load-Application-Code-To-CPU17:22
nickoesimilar issue when booting it from sdcard, https://dpaste.com/CDHDV2V7V17:25
tpbTitle: dpaste: CDHDV2V7V (at dpaste.com)17:25
nickoeit sorta boots, but crashes.17:25
nickoe_florent_: Any hint?17:26
*** mikeK_de1_SoC_py has quit IRC17:35
*** kgugala has quit IRC17:39
nickoeI created a bug abour the demo example seemingly not building https://github.com/enjoy-digital/litex/issues/81418:59
_florent_nickoe: sorry, haven't been able to look at it yet, will do this evening or tomorrow19:08
_florent_nickoe: for the demo, please be sure to first execute the target you want to test with to generate the software headers required by the demo app19:08
nickoe_florent_: What command should I use for the arty? I mean, I was just following the README of the demo project.19:09
nickoeah, ok, now it did build the demo19:13
*** kgugala has joined #litex19:15
nickoeugh, the demo.bin boots fine via serial boot.. somlo :O19:40
nickoeok, that donut is fun19:49
nickoeIs the only way to update the bitstream on artix7 to flash it directly via jtag or popping it on a SPI flash device?20:12
*** duanev has quit IRC20:13
*** peepsalot has quit IRC20:13
nickoegttp://www2.futureware.at/~nickoe/aausat/20210211_205012.mp420:27
nickoeI wonder why the demo.bin is different to the bios.bin... in that the bios.bin when serialbooted boots a bit and crashes, while the demo.bin does not.20:28
*** FFY00 has quit IRC20:32
*** FFY00 has joined #litex20:33
*** FFY00 has quit IRC22:35
*** FFY00 has joined #litex22:36
*** CarlFK has joined #litex22:37
tcalnickoe: maybe check which base address bios.bin was linked for?   You can check by disassembling the .elf.   demo.elf shows that it's compiled for base address 0x40000000, which is where serialboot puts it, so it's happy.22:38
*** esden has quit IRC22:41
*** esden has joined #litex22:41
nickoetcal: like this? https://dpaste.com/CVYEFLJGD22:42
tpbTitle: dpaste: CVYEFLJGD (at dpaste.com)22:42
tcalYeah, I see the .text and .rodata sections in 0x40000000, which is good.22:43
tcalNow try with the bios.elf for the bios.bin that crashes.22:44
tcaloh sorry i missed it22:44
tcalyeah, you might be able to get bios to boot again, at 0x40000000, by adjusting the linker.ld script.   I've never tried that.22:45
tcalIn what you pasted, you can see that the bios is linked to start executing at 0x00000000, which is the ROM for the Arty SoC.22:47
*** FFY00 has quit IRC22:47
nickoetcal: ok. I wil play around with the demo project for a bit22:52
tcal👍22:52
nickoebut that sorta explains why it is wonky.. I mean if the ld config for it is not the same.22:53
nickoealthough I am not sure why they are different by "default"22:53
tcalYep, there's a lot of little details.   BIOS is meant to be the first thing that runs, to enable the SoC to load the actual "user application", so it's built into ROM.   The demo is meant to be such a "user application".   That's why by default they're linked for different memory regions.    Serialboot is for the user app, so by default it sticks things at 0x40000000, although that can be overridden by the lxterm22:56
tcal--kernel-adr option.22:56
nickoeheh, I was like.. . why the hell can't I change this register... I forgot to build the bitstream and load it... --- at least I hope that is the reason.23:04
nickoetcal: Hm, yeah, makes sense.23:05
nickoetcal: is it possible to "sideload" a bitstream like with the firmware?23:05
nickoeI mean the gateware23:06
*** Bertl_oO is now known as Bertl_zZ23:08
tcalLots of things are possible!    I'm pretty new to this area myself, so I'm not the best to answer.   Foboot does some pretty amazing things for example, in a very constrained context.   Do you mean something like load a new bitstream from an sdcard?23:10
nickoetcal: yeah23:16
nickoeok,I think I got my little register thing to work https://dpaste.com/CMNTCGG4R23:17
tpbTitle: dpaste: CMNTCGG4R (at dpaste.com)23:17
nickoenext up, double check that the output matches with a logic analyer for sanity checking, but that must be tomorrow.!23:17
tcalCool!   Reloading a bitstream....that's pretty board and device-dependent...23:18
nickoetcal: yeah, probably, but is as a SPI flash which I think the artix7 can boot from, but dunnot how to do that yet.23:20
*** kgugala has quit IRC23:42
*** FFY00 has joined #litex23:50
*** FFY00 has quit IRC23:51
*** FFY00 has joined #litex23:54

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!