--- Log opened Wed Jan 15 00:00:54 2014 | ||
olofk_ | Does anyone have a linux hex file for that poor guy on the opencores forum? | 06:13 |
---|---|---|
olofk_ | For de0 nano | 06:13 |
stekern | I guess we could just objcopy one from the pre-built linux image from the workshop | 06:22 |
stekern | I wonder why he want a hex though | 06:30 |
stekern | maybe he's just confused and a link to the elf will suffice | 06:30 |
olofk_ | Probably | 06:35 |
olofk_ | I found an interesting hack yesterday here https://github.com/rseal/BitPatternGenerator/blob/master/fpga/sim/simulationHowto.txt | 06:45 |
olofk_ | Someone managed to compile the Xilinx simulation libraries so that they could be used with icarus | 06:46 |
stekern | does that include the annoying "secure" ones too? | 06:48 |
olofk_ | Can't get it to work though. Have to make the Xilinx tools believe that ncsim is installed, but they might have changed the way for identifying that since the howto was written | 06:48 |
olofk_ | Good question | 06:48 |
olofk_ | I know that at least one of the simulation IP's we bought here used VPI for the business logic, so in that case it should just be to supply the correct .so file | 06:49 |
olofk_ | But encrypted verilog is probably not that easy to handle in icarus | 06:49 |
olofk_ | It's extra annoying now that Xilinx don't even provide a branded modelsim anymore since their toy simulator ISim don't support VPI | 06:51 |
stekern | proprietary external encrypted simulation libraries wasn't what I had in mind though, I was more thinking about xilinx's own core libraries for their hard ip | 06:56 |
olofk_ | Yes, I'm mostly interested in the easy stuff like clock buffers, block RAM and stuff like that | 07:07 |
olofk_ | and of course the hard memory controllers | 07:07 |
olofk_ | ok, now I'm confused. The verilog code for the Xilinx primitives seem to be available in the installation. That would mean that no precompiled libs are needed at all for the basic stuff | 08:05 |
stekern | ...except for the annoying secure ones | 08:07 |
olofk_ | true | 08:11 |
olofk_ | I'm feeling more and more how awesome it would be with a FPGA that has open specifications and toolchain | 08:15 |
olofk_ | Any potential startups in that area can have my money | 08:15 |
stekern | mine too | 08:34 |
olofk_ | Great! Now we have two money | 08:38 |
olofk_ | I wonder how many money we need? | 08:38 |
stekern | one more could be enough, if it's a big one | 08:46 |
blueCmd_ | another one bites the dust: linux-libc-dev_3.12.6-2.1_or1k.deb | 08:56 |
_franck_web_ | olofk_: https://github.com/fjullien/orpsoc/commits/script last three commits are for you | 09:10 |
_franck_web_ | now I need to work for my boss ;) | 09:10 |
olofk_ | _franck_web_: Awesome. I'll take a look at it after $dayjob | 09:36 |
olofk_ | blueCmd_: Still waiting for skype_or1k.deb ;) | 09:37 |
stekern | it seems like it's a packet a day business blueCmd_ =) | 09:56 |
olofk_ | blueCmd_: How does your environment look for building .debs? Is it some chroot/qemu mumbo jumbo, or building inside or1ksim with native gcc? | 10:44 |
blueCmd_ | stekern: yes, slow and steady | 11:30 |
blueCmd_ | it's a lot of quirks :P I could do a day and just compile like 100 lib-debs, but that would be cheating - at least this is useful :) | 11:31 |
maxpaln | Hi, trying to work out if Linux is able to communiate with the SPI Flash - I am not convinced at the moment. Any ideas where the device should be in the Linux file system - I was expecting to see something under /dev that I could mount | 13:48 |
_franck_web_ | did you add the flash device under your spi node like this: http://pastie.org/private/x8vvhly9rogo8fn2wbpdta | 13:59 |
maxpaln | _franck_web_ - I have something similar, although every example I see looks a little different | 14:11 |
maxpaln | Here is what I have: | 14:11 |
maxpaln | spi0: spi0@b0000000 { | 14:12 |
maxpaln | compatible = "opencores,spi-simple"; | 14:12 |
maxpaln | reg = <0xb0000000 0x5>; | 14:12 |
maxpaln | interrupts = <6>; | 14:12 |
maxpaln | When Linux boots I get the message to say the Opencores Simple SPI Driver has been loaded | 14:13 |
maxpaln | "OpenCores Simple SPI controller (c) 2010 South Pole AB" | 14:13 |
_franck_web_ | did you enable the SPI flash driver in your config ? | 14:13 |
_franck_web_ | is it probed ? | 14:14 |
maxpaln | good question - how do I check that? | 14:14 |
_franck_web_ | a printk ? :) | 14:15 |
maxpaln | :-) | 14:15 |
maxpaln | but where? I was just trying to find the entry point to the SPI device drivers - | 14:16 |
maxpaln | I have enabled the MTD drivers in the config but I haven't got as far as how the device itself gets probed | 14:16 |
LoneTech | you can probe via spi, if you have the appropriate driver | 14:17 |
_franck_web_ | can you paste your hole SPI devicetree node ? | 14:17 |
maxpaln | you mean in the dts file? | 14:18 |
LoneTech | I think it's usually m25p80 | 14:18 |
_franck_web_ | yes, the dts file | 14:18 |
maxpaln | I posted it above - here it is again: | 14:18 |
maxpaln | spi0: spi0@b0000000 { | 14:18 |
maxpaln | compatible = "opencores,spi-simple"; | 14:18 |
maxpaln | reg = <0xb0000000 0x5>; | 14:18 |
maxpaln | interrupts = <6>; | 14:18 |
_franck_web_ | it that all ? | 14:18 |
LoneTech | oops | 14:19 |
_franck_web_ | your SPi flash won't be probed | 14:19 |
LoneTech | but you can do that via sysfs | 14:19 |
_franck_web_ | look at what I pasted | 14:19 |
maxpaln | hmmm, that was strange - I logged out and back in again, can you see the DTS contents | 14:19 |
LoneTech | we only saw the spi0 block, nothing on the eeprom | 14:19 |
maxpaln | ah, you want the whole dts? | 14:20 |
maxpaln | here it is: | 14:20 |
_franck_web_ | use this: http://pastie.org/ | 14:20 |
maxpaln | perfect - nice link: here it is | 14:20 |
maxpaln | http://pastie.org/8635771 | 14:20 |
LoneTech | right, that does contain a description of the flash and two partitions | 14:22 |
_franck_web_ | that should work | 14:22 |
maxpaln | I can see several differences with the link you posted _frank_web_ | 14:22 |
maxpaln | but nothing that should obviously prevent it from working | 14:22 |
maxpaln | ok, so we think it should work - this is good, I came to the same conclusoin | 14:22 |
maxpaln | so, I have assumed Linux won't auto mount the SPI Flash - is this a far assumption? | 14:23 |
LoneTech | so it might show up in /dev/mtd* or /sys/bus/spi* | 14:23 |
_franck_web_ | ./mtd/devices/m25p80.o do you have this ? (to be sure your config is ok) | 14:23 |
LoneTech | it may be built in, should show up at /sys/bus/spi/drivers/m25p80 | 14:24 |
maxpaln | ok so /sys/bus/drivers is empty | 14:24 |
blueCmd_ | olofk_: sorry, I missed your question | 14:25 |
LoneTech | can you modprobe m25p80? | 14:25 |
blueCmd_ | olofk_: chroot with a shitload of mumbo jumbo | 14:25 |
maxpaln | Here is the result: | 14:26 |
blueCmd_ | I'm going to cross compile as much as I can and the longer term is making qemu work with it so you can do native compilation through that | 14:26 |
maxpaln | # modprobe m25p80 | 14:26 |
maxpaln | modprobe: chdir(/lib/modules): No such file or directory | 14:26 |
LoneTech | sounds like the kernel you have has the SPI driver but not the driver for SPI flash chips, and you don't have modules in the filesystem for it to add either | 14:27 |
_franck_web_ | another one: cat .config | grep M25P80 | 14:27 |
maxpaln | _franck_web_ - you may have it | 14:28 |
maxpaln | # cat marvell_phy_and_spi.config | grep M25P80 | 14:28 |
maxpaln | # CONFIG_MTD_M25P80 is not set | 14:28 |
LoneTech | right. that's the driver for spi flash | 14:28 |
maxpaln | BUT i have enabled MTD drivers in the config | 14:28 |
_franck_web_ | not enough | 14:28 |
_franck_web_ | "Self-contained MTD device drivers" | 14:29 |
LoneTech | MTD is the subsystem for flashes in general, m25p80 is the driver for most SPI ones in particular | 14:29 |
LoneTech | from your DTS, we have: compatible = "stm,m25p64"; | 14:30 |
LoneTech | /sbin/modinfo m25p80|grep m25p64 shows: alias: spi:m25p64 | 14:30 |
maxpaln | ok, so under "Self-Contained MTD Device Drivers" I have included "Support for most ..." | 14:32 |
maxpaln | I now get | 14:32 |
maxpaln | ]# cat marvell_phy_and_spi.config | grep M25P80 | 14:32 |
maxpaln | CONFIG_MTD_M25P80=y | 14:32 |
_franck_web_ | great | 14:32 |
maxpaln | This looks promising - I will rebuild and retry | 14:33 |
LoneTech | mounting is another layer, though. you might want to have ubifs, jffs2 or some other flash adapted filesystem if you really want it mounted directly, but that's so slow we usually just load initrds or some such | 14:35 |
maxpaln | aha - SPI related info during booting so something has definitely changed | 14:36 |
maxpaln | thanks so far - this has helped a lot | 14:41 |
maxpaln | I am now getting errors about partitions extending beyond the end of the device: | 14:42 |
maxpaln | "mtd: partition "free_space" extends beyond the end of device "spi32766.0" -- size truncated to 0x400000" | 14:42 |
maxpaln | How does Linux determine the size of the device? Is it from the device itself? or from the drivers? | 14:42 |
maxpaln | the SPI is 64Mbit, 0x400000 is only a small section of it | 14:43 |
_franck_web_ | AFAIR, it compare what you told him m25p64 and what is read from the device | 14:44 |
maxpaln | hmmm, odd! | 14:44 |
_franck_web_ | 0x03000000 if far after 64Mbits, no ? | 14:45 |
maxpaln | you could be right - I was just redoing the calcs now | 14:45 |
_franck_web_ | 0x00800000 is your last address | 14:45 |
maxpaln | agreed - not sure how I came up with the range in my DTS file! | 14:47 |
_franck_web_ | :) | 14:47 |
maxpaln | ok, this appears to be working - all the ranges are valid and so on | 14:59 |
maxpaln | now to mounting - I know it will be slow but it's the only Flash device on the target board so I'll live with it for now! | 14:59 |
stekern | blueCmd_: have sebastian mackes qemu patches made it to upstream? if not, are you using them? | 15:15 |
stekern | not sure if anything was um related, but he found a bunchload of bugs in it | 15:15 |
stekern | + he did a lot of optimisations | 15:16 |
blueCmd_ | stekern: haven't tried using them | 15:19 |
blueCmd_ | yeah, I saw the patches | 15:19 |
blueCmd_ | I haven't tried using qemu* | 15:19 |
blueCmd_ | I know I will need to patch it anyway since I have a new syscall that is or1k specific | 15:20 |
stekern | blueCmd_: now I'm confused, I thought you were using um qemu in the chrooted environment | 15:45 |
blueCmd_ | stekern: nope, all cross compiled for now | 15:45 |
stekern | ok, yeah I see now that you wrote that ;) | 15:45 |
stekern | but how is a new syscall something that would affect qemu? | 15:46 |
blueCmd_ | stekern: pretty sure it does not contain my additions to or1k_atomic that I haven't even sent to Jonas yet :P | 17:10 |
blueCmd_ | which everything using pthreads will use | 17:11 |
stekern | blueCmd_: that doesn't answer my question, does qemu care about syscalls? | 17:42 |
blueCmd_ | stekern: it would have to right? | 18:04 |
blueCmd_ | since it's not running a kernel (i'm talking about the user-space qemu) | 18:05 |
stekern | yeah, I think I've come to the same conclusion now when I started to think about it more | 18:13 |
stekern | slightly related, I just noticed that nios 2 does that testandset in a weird way, it disables interrupts directly in that function | 18:20 |
stekern | in uclibc that is | 18:20 |
stekern | can you disable interrupts from userspace in nios2? | 18:21 |
blueCmd_ | stekern: gcc-4.8-or1k-linux-gnu_4.8.2-13.1_amd64.db, libgcc+4.8-dev-or1k-cross_4.8.2-13.1_all.deb cpp-4.8-or1k-linux-gnu_4.8.2-13.1_amd64.deb | 22:48 |
blueCmd_ | so I'm breaking your '1 package per day' | 22:49 |
olofk | blueCmd_: That's really cool. How much work (I guess a lot) would it be to bootstrap a debian that can install those packages? | 23:23 |
_franck_ | olofk: wait, I have a question | 23:25 |
_franck_ | when you have a SimulatorIcarus(Simulator) class | 23:27 |
_franck_ | SimulatorIcarus is herited from Simulator (? right, kind of) | 23:27 |
_franck_ | both class have def run | 23:28 |
_franck_ | which one is called when you do xxx.run() ? | 23:28 |
_franck_ | ok I found my error :) | 23:31 |
blueCmd_ | olofk: those packages are for amd64, so those are just the crosscompilers atm | 23:46 |
blueCmd_ | you need to add a repository or download the debs yourself | 23:47 |
blueCmd_ | but it's a very simple way of installing a cross compiler which is nice | 23:48 |
--- Log closed Thu Jan 16 00:00:56 2014 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!