--- Log opened Mon Mar 21 00:00:44 2016 | ||
shorne | olofk: I did some more testing on my memcpy routines. Intestingly doing the microblaze type analigned word copies is not that much better than byte copies it seems | 02:59 |
---|---|---|
shorne | In terms of instruction counts at least. | 02:59 |
shorne | But it makes sense I think: with byte copies for 1 word you need to do 4 loads, 4 stores | 03:00 |
shorne | For the unaligned word copy you do: 1 load, (shift, or) (shift, or), 1 store | 03:02 |
shorne | os its maybe 2 instructions less | 03:02 |
shorne | Ill work on posting some findings | 03:03 |
shorne | anyway some numbers: memcpy word copies (supporting non-alignment) with loop unrolls, during linux boot avg cycles 1880.3 | 03:05 |
shorne | memcpy byte copies, during linux boot avg cycles 7603.0 | 03:06 |
-!- heroux_ is now known as heroux | 03:23 | |
wallento | hi all. I am wondering if we support Linux+barebox with device tree | 03:40 |
wallento | or something similar | 03:40 |
shorne | I published some commits on my linux tree | 03:46 |
shorne | has some of the 4.6 merges already though its a bit messy but works | 03:46 |
shorne | https://github.com/stffrdhrn/linux/commits/openrisc | 03:46 |
shorne | The memcpy stuff is here: | 03:46 |
shorne | https://github.com/stffrdhrn/linux/commit/eb6b230a8c0c241a37ba7a8ba014dce47dd4955f | 03:47 |
shorne | wallento: I dont know anything about barebox... | 03:47 |
wallento | I think it is supported upstream | 03:47 |
wallento | like U-Boot | 03:48 |
wallento | it would be ideal to have barebox with device tree for each board (+generic) and a common Linux kernel, right? | 03:48 |
shorne | right, I was just reading the page, I dont use u-boot yet I am just always booting form openocd | 03:48 |
wallento | okay, so barebox and the DTB build | 04:16 |
wallento | don't have the board here for testing | 04:16 |
shorne | WHy do you bring it up? does it do something uboot doesnt? | 04:19 |
shorne | Just reading the manual, it looks like it has a lot built in, I guess first we could try to boot barebox by itself. probably you can do with openocd and play with it | 04:21 |
shorne | I could probably do on de0 nano | 04:22 |
wallento | I always trust the fork ;) | 04:23 |
wallento | I think both u-boot and barebox are okay | 04:24 |
shorne | I see, barebox is a fork of uboot | 04:27 |
wallento | yeah, they claim they did it nicer | 04:27 |
wallento | it is starting in or1ksim | 04:43 |
wallento | one warning, but the shell works | 04:43 |
wallento | I will push the patched one | 04:43 |
wallento | https://github.com/openrisc/barebox/tree/or1k | 04:44 |
wallento | Leaving my comfort zone now. I think we need to build a ramdisk or so, right? | 04:45 |
shorne | wallento: for linux? I am guessing you need to tell barebox where the kernel image is. It can understand file systems, or probably some memory mapped blob | 05:11 |
shorne | like on an spi flash chip | 05:11 |
wallento | I found it has a ramdisk builtin | 05:11 |
wallento | I was hoping there is something like an image elf | 05:12 |
wallento | where I can load the image as binary into the ramdisk | 05:12 |
wallento | but as you can see I have no clue .) | 05:14 |
olofk | wallento, shorne: _franck_ is the barebox expert here | 05:22 |
olofk | wallento: Another thing that I experimented with a while back is how to rebuild the initramfs (busybox) from scratch. It's not really documented anywhere. We ship a pre-built one in our kernel fork, but for upstream kernels we need to build it ourselves | 05:24 |
shorne | olofk: thanks, wallento: I am not looking at barebox, but I am guessing it expects to find the boot image on some kind of flash. You can configure that in the or1ksim.cfg I assume you can point it to simulate a flash with a existing filesystem | 05:25 |
shorne | olofk: I was noticing that too. I think stekern did some work to update libs in there last year. I guess its close to the documentation on the busybox website. | 05:25 |
olofk | shorne: Yeah, I haven't played with or1ksim enough to know the details, but I believe it can emulate flash | 05:25 |
shorne | (2 subjects there, I was noticing busybox too...) | 05:26 |
olofk | shorne: Yes, 2 subjects. Just wrote it while I remembered, since it's a bit connected to the cleanup and tutorials we're doing now | 05:27 |
shorne | One thing in the kernel config is the pointer into the location of initramfs root and config. If you where building your own busybox I guess we could update the kernel to point out of the tree to your busybox location. | 05:28 |
shorne | It is a good point, we should document it | 05:28 |
olofk | That would be nice, so we don't have to shove busybox into the kernel tree | 05:28 |
olofk | Damn, I thought I had written down this stuff :7 | 05:28 |
olofk | :/ | 05:28 |
shorne | I pushed one kernel patch here to my tree for the openrisc.io updates and readmes etc. | 05:29 |
shorne | https://github.com/stffrdhrn/linux/commit/7c4d6d98f1dd6abe3fe6dad58869d21d423cc1ce | 05:29 |
shorne | yeah, it would be nice if our tree didnt have so much stuff marked (not for upstream) | 05:29 |
olofk | ah yes. Thanks. I've been trying for some time to hunt down the last references to openrisc.net | 05:29 |
shorne | I can make a pull request to stekern | 05:30 |
olofk | at least I got a script for rebuilding busybox | 05:30 |
shorne | Also I have my strcpy there. But its currently in RFC state. Its a 1.5 second boot time saver which is good | 05:30 |
olofk | What? 1.5s just by improving strcpy? | 05:31 |
olofk | Or did you mean memcpy? | 05:31 |
shorne | olofk: thats what it loks like. sorry memcpy... | 05:31 |
olofk | (kind of the same I guess) :) | 05:31 |
shorne | its in string.h (so I just typed the wrong thing) | 05:31 |
shorne | well, not in string.h, but some parts of the patch are there | 05:32 |
olofk | Would be great to get that upstreamed as well. memcpy will probably improve things during runtime as well | 05:32 |
olofk | not only at boot | 05:32 |
shorne | yeah, I want to get them both upstreamed | 05:33 |
shorne | stekern has some more important stuff as well though so waiting on that | 05:33 |
_franck__ | shorne: wallento : https://github.com/fjullien/or1ksim/commit/61abfa177cee3f420fd9a44b551b0e2c6231a91a | 05:51 |
_franck__ | ^ you can put your Linux image in a CFI flash | 05:51 |
_franck__ | olofk: I use this: https://github.com/fjullien/build_rootfs all the time for my initramfs. I needs some cleanup but it is very simple and lightweight | 05:52 |
wallento | thanks, _franck__! | 05:54 |
shorne | _franck__: cool, just as I thought | 05:54 |
wallento | is there a path that allows me to have one elf/binary blob with barebox and Linux packed in | 05:55 |
_franck__ | I don't think so | 05:55 |
_franck__ | but I haven't looked at barebox since a long time. You should ask #barebox | 05:56 |
_franck__ | wallento: are you going to use or1ksim or real hardware ? | 05:56 |
wallento | both | 05:56 |
wallento | thanks, I will ask them after I have a clear picture of it | 05:57 |
_franck__ | for hardware, if you don't have ethernet you can use serial protocol like kermit. Never used it myself | 05:57 |
wallento | yeah, thats why I am asking. Just pre-loading the RAM seems so much easier :) | 05:57 |
_franck__ | but yes, that would be great to link an cramfs (because it is supported in barebox) to the barebox binary | 05:58 |
olofk | I tried to implement both a zmodem and a ihex boot loader in assembler | 06:00 |
olofk | That would be really handy to have | 06:00 |
_franck__ | olofk: once you have romcc running that wil be easy :) | 06:01 |
olofk | But I finished the uimage loader at least, so that we can load files that are packed with the u-boot image format | 06:01 |
olofk | _franck_: Haha. Yes. Unfortunately, not a single student seems interested | 06:01 |
wallento | shorne: I will build Linux from your repo for the moment, right? | 06:02 |
shorne | wallento: officially it would be stekern but you can try mine :) | 06:11 |
shorne | its running fine for me | 06:11 |
wallento | I get memcpy undefined :) | 06:12 |
shorne | oh really? can you do "grep OPT_LIB .config" | 06:13 |
wallento | CONFIG_OPT_LIB_FUNCTION=y | 06:13 |
wallento | CONFIG_OPT_LIB_WORD_NONALIGNED=y | 06:13 |
wallento | # CONFIG_OPT_LIB_WORD_UNROLL is not set | 06:13 |
wallento | # CONFIG_OPT_LIB_WORD is not set | 06:13 |
wallento | # CONFIG_OPT_LIB_BYTE_UNROLL is not set | 06:13 |
wallento | # CONFIG_OPT_LIB_BYTE is not set | 06:13 |
shorne | yeah, thats correct | 06:13 |
wallento | I will clean and retry | 06:14 |
wallento | maybe I had something in there from a previous build | 06:14 |
shorne | hmm, it should be rebuilt if anything was there before | 06:14 |
wallento | yep, the problem still exists | 06:17 |
wallento | ERROR: "memcpy" [crypto/sha256_generic.ko] undefined! | 06:17 |
wallento | ERROR: "memcpy" [crypto/jitterentropy_rng.ko] undefined! | 06:17 |
wallento | ERROR: "memcpy" [crypto/hmac.ko] undefined! | 06:17 |
wallento | ERROR: "memcpy" [crypto/echainiv.ko] undefined! | 06:17 |
wallento | ERROR: "memcpy" [crypto/drbg.ko] undefined! | 06:17 |
wallento | scripts/Makefile.modpost:91: recipe for target '__modpost' failed | 06:17 |
wallento | but vmlinux is built :) | 06:18 |
wallento | it during "Building modules, stage 2." | 06:18 |
shorne | ok, maybe I do need to export it | 06:19 |
shorne | I disabled modules | 06:19 |
shorne | let me put a patch for that :) | 06:19 |
wallento | great, thanks | 06:19 |
wallento | it boots, great | 06:24 |
wallento | I will push many updates to the tutorials | 06:25 |
wallento | It unpacks now with a bootstrap-quick-start.sh | 06:25 |
wallento | that downloads prebuilts of the toolchain, or1ksim, fusesoc and openocd | 06:25 |
shorne | wallento: I pushed an update | 06:25 |
wallento | thanks, I will test | 06:25 |
wallento | works! | 06:27 |
wallento | I am really proud of the openrisc community. I feel like the first time I just pull stuff, build it and everything works | 06:28 |
shorne | wallento: you are doing a big part. :) | 06:31 |
wallento | thats just a snapshot :) | 06:31 |
wallento | but it is really great that it is "just" a community of hobbyists and yet we get a lot of cool stuff going | 06:32 |
olofk | wallento: Yeah, we have really cleaned up our stuff since a few years ago :) | 06:36 |
wallento | on next ORCONF we should have a slide that compares irc logs from a few years back and today, starting with "I am new and I want to run Linux" | 06:38 |
olofk | haha | 06:39 |
wallento | olofk: https://rawgit.com/myriadrf/STREAM/master/stream_openrisc_soc/doc/linux.html | 07:54 |
wallento | this is how you can view html in a repository as website | 07:54 |
wallento | just replace github.com in the URL with rawgit.com | 07:54 |
wallento | I switched the theme of openrisc.io | 08:13 |
wallento | this one is responsive, meaning you can also use it on a smartphone ;) | 08:14 |
wallento | from the design I did not like any of the both we had now, but they are shipped with jekyll-bootstrap.. | 08:15 |
wallento | so, here we are: https://github.com/openrisc/tutorials/releases/download/2016.1/openrisc-tutorials.tgz | 09:10 |
wallento | people can download this and follow the quick start instructions: https://github.com/openrisc/tutorials/blob/master/README.md | 09:11 |
olofk | wallento: Cool. Great work | 09:11 |
wallento | from download to Linux on or1ksim and de0 nano in less than five minutes | 09:11 |
wallento | :) | 09:11 |
wallento | thanks, olofk | 09:11 |
olofk | I'll try to do it in four minutes :) | 09:11 |
wallento | hehe | 09:12 |
wallento | the prebuilt stuff is kinda lame, but I think it makes it really easy | 09:12 |
wallento | and we can bundle it with each release | 09:12 |
olofk | I like the new openrisc.io theme, but it's on the border of being too dark | 09:12 |
wallento | so it is reproducable | 09:12 |
wallento | yep, I would also like it lighter | 09:12 |
wallento | changing colors is easy | 09:12 |
olofk | prebuild is excellent. That way you can have known good checkpoints | 09:13 |
wallento | https://github.com/openrisc/openrisc.github.io/blob/master/assets/themes/hooligan/css/style.css | 09:14 |
wallento | yes, I moved a lot of stuff to Github releases now | 09:14 |
wallento | olofk: the verilator feedback is good, not much to change actually | 09:16 |
robtaylor | wallento: nice work :) | 09:18 |
wallento | thanks, rob | 09:28 |
olofk | wallento: Yeah, it looked like he had mostly style complaints | 09:47 |
olofk | regarding verilator | 09:47 |
olofk | I'm almost done with the icestorm backend now too. Just need to find out how to send in top-level parameters there too :) | 09:48 |
wallento | hehe, you cannot trick me into another patch :) | 09:49 |
olofk | haha | 09:49 |
olofk | No worries. Clifford is very responsive | 09:49 |
olofk | wallento: Still got access to questasim, or any modelsim version running on 64-bit? | 10:23 |
wallento | yeah | 10:23 |
wallento | at university, still have remote | 10:23 |
olofk | The free version that Altera supplies only support 32-bit, and there is a bug with the VPI handling | 10:23 |
olofk | I remember that you had to remove some arguments when you used 64-bit modelsim | 10:24 |
olofk | I would like to check if my fix works | 10:24 |
wallento | okay, please send me a mail with the instructions | 10:25 |
olofk | cool. I'll do that later today. | 10:25 |
andrzejr | olofk, you mean it is possible to make Modelsim work on 64 bit Linux? | 10:32 |
andrzejr | what about Icarus Verilog? Does Altera (Cyclone IV, at least) uses any encrypted components? | 10:33 |
andrzejr | Looking at the activity in DE0 Nano development it makes sense to me to dump Xilinx and move to a better supported platform. Especially that 7-series FPGAs are an overkill for my application. | 10:35 |
olofk | andrzejr: No encrypted ip for the de0 nano | 10:37 |
olofk | The only altera IP we use at all is a generated wrapper for the pll, but that is just plain verilog | 10:38 |
olofk | And we `ifdef away the pll when we run icarus | 10:38 |
andrzejr | what about Modelsim? Occasionally I may need to mix in some VHDL modules (although that was usually needed for Xilinx IPs). | 10:39 |
andrzejr | DE0 Nano is no longer that cheap when you want to get it in your hands. Anyone with spare ones? | 10:42 |
olofk | andrzejr: Altera supplies a free 32-bit modelsim that actually supports mixed-language nowadays | 10:45 |
olofk | And they have the same strange thing as Xilinx where you can have an IP where all files except for one is in verilog :) | 10:45 |
_franck__ | andrzejr: I can lend you a Neek board if you want. But it is Cyclone III on it. That means Quartus =< 13.1 | 10:48 |
olofk | andrzejr: Actually, you could borrow my ordb2a board. Haven't powered that up in a while | 10:49 |
olofk | http://opencores.org/or1k/Ordb2a-ep4ce22 | 10:50 |
* _franck__ see how much openrisc people want contributors :) | 10:50 | |
olofk | :) | 10:50 |
olofk | mithro tries to find users for th numato opsis, and I got an Icoboard in the mail some weeks ago | 10:52 |
olofk | So I don't think it's only an OpenRISC thing :) | 10:52 |
olofk | andrzejr: You could also borrow my Stream board, come to think o fit | 10:52 |
olofk | https://github.com/myriadrf/STREAM | 10:53 |
mithro | Hello, hello | 10:55 |
andrzejr | Thank you guys. :-) DE0 Nano became sort of a reference platform for orpsoc, which is tested and kept up to date. In my experience bringing up a new board, solving tooling issues and maintaining it was simply to much work for a newcomer. | 11:00 |
andrzejr | So I want to take step back an *use* orpsoc, contribute fixes, peripherals etc. | 11:01 |
olofk | andrzejr: Yeah, you've done a great amount of fixes to fusesoc itself. Thanks and sorry about that :) | 11:03 |
olofk | Both Stream and Neek already have FuseSoC ports. I never finished the one for ordb2a however | 11:04 |
olofk | It's funny, because ordb2a was supposed to be the first board with a FuseSoC port | 11:04 |
wallento | I definitely want to establish the nexys 4 board as an openrisc reference board too | 11:05 |
olofk | But as you say, the de0 nano turned out to be a reference platform. Talk to jeremybennett and see if he has any boards | 11:06 |
olofk | wallento: Yes, it would be nice to have a cheap Xilinx board too | 11:06 |
andrzejr | wallento, the ddr2 version? | 11:06 |
olofk | Many people have used the Atlys port | 11:06 |
olofk | And the Arty might be quite popular too | 11:06 |
wallento | the nexys 4 ddr | 11:07 |
wallento | its also a reference board for lowRISC | 11:07 |
wallento | and will become for OpTiMSoC | 11:07 |
andrzejr | yay! that would be great. | 11:07 |
wallento | both the latter have the KC705 and Nexys4 DDR as reference board | 11:07 |
wallento | I don't like the DE0 nano because of the lack of an available UART :) | 11:08 |
andrzejr | btw, what lowRISC uses as a memory controller? The AXI4 slave IP? | 11:08 |
olofk | wallento: Yeah, ordb2a is pretty similar to de0 nano, but with built-in UART, ethernet and usb. It's a shame that ORSoC didn't produce more of them | 11:10 |
wallento | I really like the Pmods | 11:10 |
olofk | Because I agree. It's annoying to have to use an extra UART adapter | 11:10 |
wallento | there are also altera boards with it, right? | 11:10 |
andrzejr | olofk, is STREAM board publicly available? | 11:10 |
olofk | andrzejr: Good question. I didn't know actually | 11:11 |
olofk | They were supposed to. Not sure what happpened | 11:11 |
olofk | Didn't someone ( _franck__ ? ) experiment with tunneling UART over JTAG with adv_debug_sys and openocd | 11:12 |
olofk | That would make the de0 nano nicer to use | 11:12 |
wallento | yeah, it should be straight forward | 11:13 |
wallento | I also have one in Open SoC Debug | 11:13 |
wallento | UART device emulator | 11:13 |
wallento | Will create some fusesoc demo systems with this one too | 11:13 |
andrzejr | Things I don't like about Nexys4DDR: DDR2 controller and its encrypted SERDES IPs, proprietary JTAG (fixed), RMII LAN interface, some minor annoyances like QSPI for flash download, single (emulated) PS2 port. | 11:14 |
andrzejr | Arty at least uses regular MII ethernet i/f. Plus it's cheaper so it may be better suited for a reference platform. | 11:15 |
wallento | yes | 11:18 |
wallento | it is also cheaper | 11:18 |
wallento | damn, need to buy another board :) | 11:18 |
wallento | I also have a STREAM | 11:18 |
wallento | I think they are not available still | 11:18 |
wallento | the arty seems to have arduino headers, right? | 11:19 |
andrzejr | wallento, well, you can start with Nexys :-) Disabling some stuff for Arty port should be easy. | 11:20 |
wallento | yeah, I will keep both | 11:20 |
wallento | the arty is pretty small | 11:21 |
wallento | nexys has the largest artix | 11:21 |
wallento | but it should be easy to maintain both | 11:22 |
olofk | wallento: Oh, I didn't know. You got rev1 or rev2? | 11:22 |
olofk | of stream | 11:22 |
wallento | v2 r1 | 11:22 |
wallento | we got a donation for our GSM work | 11:23 |
andrzejr | Has anyone tried to talk to Digilent or Terasic about sponsoring the project? It would be great if we could get a pool of free boards or a discount. | 11:23 |
wallento | but never really got it going | 11:23 |
wallento | no, we haven't | 11:23 |
olofk | cool. I only have v1, and couldn't test the DVI output for v2, so I never pushed support for that | 11:23 |
wallento | its probably something we should try once we have a reference | 11:24 |
olofk | andrzejr: I think that's a good idea. For myself, I have the opposite problem with too many boards right now :) | 11:24 |
wallento | hehe | 11:24 |
olofk | But wallento had an idea of having a pool of boards for contributors. That would be really cool | 11:24 |
wallento | yes, we had this idea where people could request and donate boards to people | 11:25 |
andrzejr | Looks like Digilent has an ambition of making Arty a "reference platform for Artix7", at least for some other applications. | 11:25 |
wallento | like "I would port the SPI controller to the new Xilinx Ultrascale board if anyone donated me one" :) | 11:25 |
wallento | as I am ordering already, I of course should add Pmod :) | 11:27 |
andrzejr | :-) | 11:28 |
wallento | I am going for the OLED | 11:29 |
olofk | The icoboard is pretty cool actually. Hooks into a raspberry pi, and you can run the whole toolchain on the pi | 11:30 |
wallento | yeah, also cool | 11:30 |
olofk | Got 4 pmod connectors and some other stuff too | 11:30 |
wallento | but the ICE40 are pretty small | 11:30 |
olofk | yeah | 11:30 |
olofk | Plan is to port a minimal or1k-based soc for it, even though I guess people will mostly be running riscv | 11:31 |
wallento | yeah, sounds like a good plan | 11:31 |
olofk | So far I haven't got it to route yet. Too big :) | 11:31 |
wallento | so, arty and oled pmod on the way | 11:37 |
_franck__ | olofk: wallento :UART over JTAG is present in openocd and is working. However, there was problem with Linux. It seems to be related to IRQs | 11:43 |
wallento | okay, cool | 11:44 |
wallento | I will add this in the de0 nano then | 11:44 |
_franck__ | https://github.com/fjullien/orpsoc-cores/blob/de1_jsp/systems/de1/rtl/verilog/orpsoc_top.v#L399 | 11:45 |
olofk | damn. Clifford is fast. Top-level parameters are fixed in yosys now :) | 11:45 |
olofk | _franck_: Ah yes. Now I remember | 11:45 |
olofk | It looked like it worked while it was in polling mode | 11:45 |
olofk | It might be a bit tricky to debug. Best way would probably be to see if this can be reproduced with a small bare-metal program. Then we can simulate the whole thing, including JTAG | 11:47 |
olofk | Booting linux in icarus with jtag_vpi is not something I would recommend :) | 11:48 |
olofk | signaltap/chipscope would probably help too | 11:48 |
_franck__ | you can debug under verilator | 11:48 |
olofk | _franck_: Ah cool. Didn't think of that. | 11:49 |
andrzejr | wallento, interesting, lowrisc uses a ddr2 controller with AXI4 i/f generated with MIG from Vivado (not ISE). The options are somewhat different from mine but that doesn't seem critical. More likely some bugs were fixed in later MIG releases. | 16:58 |
andrzejr | Plus having a tested AXI4 wrapper is handy. My WB bridge was causing problems even got rid of all performance enhancements. | 17:00 |
--- Log closed Tue Mar 22 00:00:46 2016 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!