Sunday, 2017-10-01

*** tpb has joined #timvideos00:00
*** medicalwei has quit IRC00:29
*** medicalwei has joined #timvideos00:31
mithroshenki: poke?02:28
mithroshenki: Actually that should be my or1k-fixing branch02:29
mithroshenki: https://github.com/mithro/HDMI2USB-litex-firmware/tree/or1k-fixing02:29
tpbTitle: GitHub - mithro/HDMI2USB-litex-firmware at or1k-fixing (at github.com)02:29
mithroshenki: Any luck?02:59
shenkimithro: okay. and which linux tree?03:09
mithrohttps://github.com/mithro/linux-litex/tree/temp03:11
tpbTitle: GitHub - mithro/linux-litex at temp (at github.com)03:11
shenki$ export JIMMO=1 PORT=/dev/ttyACM1 CPU=or1k PLATFORM=mimasv2 TARGET=base03:12
shenkidoes that look correct?03:12
mithroMimas doesn't work yet03:13
shenkiwhich board can I use?03:13
mithroOnly the Opsis at the moment03:13
shenki:(03:14
shenkiI don't have a power supply at home for that03:14
mithroDon't have a 12V supply?03:14
shenkiI will have to find one03:14
mithroI recommend looking at your old routers / switches / etc03:15
mithroYay! tftp booting Linux on the Opsis03:19
shenkimithro: nice03:23
shenkiok, i have my opsis powered up03:24
mithro\o/03:24
mithroexport PLATFORM=opsis TARGET=net03:24
mithroexport PLATFORM=opsis TARGET=net CPU=or1k03:24
shenkimithro: hrm. usb is not enumerating03:26
mithroshenki: Try moving JFX2-RST to pins 1-203:26
shenkimithro: hrm. where is that?03:28
shenkiah i see03:28
shenkimithro: no luck03:29
mithroshenki: You are using the large USB port on the front?03:30
shenkino :)03:31
* shenki gets printer cable03:31
mithroshenki: The other one can't be used for programming03:31
shenkimithro: cool. which make target should I use to load it up?03:33
mithromake flash03:33
shenkimithro: that worked. make firmware-connect did not tho03:37
shenkimithro: do i need to reset it?03:37
mithroshenki: After flashing need to power cycle03:37
shenkimithro: is there a button?03:37
mithroNope03:37
mithroI need to figure out why03:38
shenkimithro: hrm, power cycling didn't seem to work03:42
mithroshenki: Once you have power cycled, you do a "make firmare-connect" then hit the button03:43
shenkiah, cool03:43
shenkiworking03:43
shenkiBooting from flash...03:43
shenkiLoading 81700 bytes from flash...03:43
shenkiExecuting booted program at 0x4000010003:43
shenkithen nothing03:43
mithroshenki: Yeah - it's jumping into the middle of nowhere now03:44
mithroshenki: Do a "hdmi2usb-mode-switch --clear-softcpu-firmware" then power cycle again03:44
shenkimithro: cool03:46
shenkimithro: any tips for setting up network booting?03:46
mithroshenki: Make sure you disable network manager from controlling the device03:46
mithroshenki: As it will loose link every reset and network manager gets unhappy03:47
mithroThen you should be able to do03:47
mithro"make tftpd_start"03:47
mithroand "make tftp"03:47
shenkimithro: should it work if i directly attach the board to my laptop?03:57
mithroshenki: Yes03:57
shenkiok. i'm not getting any packets03:57
mithroshenki: Assuming you have gigabit Ethernet?03:57
shenkiyeah03:57
mithroWhat is the console showing?03:57
shenkiLocal IP : 192.168.100.5003:58
shenkiRemote IP: 192.168.100.10003:58
shenkiUnable to download boot.bin over TFTP03:58
shenkiNetwork boot failed03:58
shenkiNo boot medium found03:58
shenki2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 100003:58
shenki    inet 192.168.100.100/32 brd 192.168.100.255 scope global eth003:58
shenkino-carrier doesn't sound good03:58
shenki       valid_lft forever preferred_lft forever03:58
mithroshenki: What ethtool show?03:59
shenkiLink detected: no03:59
shenkihttps://pastebin.com/zaftRE3w03:59
tpbTitle: $ ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link mo - Pastebin.com (at pastebin.com)03:59
mithroshenki: Are the ethernet lights on?04:00
shenkithey are on the opsis04:00
shenkinothing on the X1's dongle04:00
shenkioh, i lied. there are now04:00
shenkiit wasn't connected properly04:00
shenki:)04:00
shenkiit's sending packets from my laptop really slowly04:01
shenkimithro: i assume my laptop should be on 192.168.100.100 ?04:01
mithroshenki: or1k booting on mimasv2 !04:01
shenkisweet04:01
mithrodies when it tries to do a divide :-/04:02
mithroOh... maybe it is working...04:02
mithroInitializing SDRAM... Memtest OK <-- that seems to take a very long time...04:03
shenkimithro: any ideas about my network configuration?04:04
mithro192.168.100.100 is correct04:04
mithroWhat tftp server are you using?04:05
shenkinot sure. i have my laptop configured to run one via xinetd04:05
shenkiit's not getting a connection04:06
mithrohrm?04:06
mithroWhat does ethtool show now?04:06
shenkiit shows a link04:06
mithroatftpd gives you a bunch of debug info...04:06
shenkimithro: does it need to be running at 1000mbit?04:12
shenkiethtool says it's at 10004:12
mithroshenki: It should be running at 1000mbit04:12
mithroI'm going to run find some lunch04:13
mithrobe back in 30 minutes04:14
shenkimithro: ok. i forced 1000 and turned off negotiation, and i got two packets from the opsis04:14
mithroIt should have negotiated at 1000 -- I'm a bit worried about your network....04:14
shenkiim using the cable you gave me the other day04:14
mithroshenki: What does ethtool show?04:15
mithroSpeed / Duplex have proper values now?04:15
shenkisec, have to move inside04:20
shenkimithro: ok, it's detecting 1000 now04:23
mithroThat change anything?04:25
shenkigetting packets04:27
shenkibut no tftp connection04:27
shenkigetting packets full of zero04:28
shenki14:56:44.006739 ARP, Unknown Hardware (0) (len 0), Unknown Protocol (0x0000) (len 0), Unknown (0)04:28
shenki0x0000:  0000 0000 0000 0000 0000 0000 0000 0000  ................04:28
shenki0x0010:  0000 0000 0000 0000 0000 0000 0000 0000  ................04:28
shenki0x0020:  0000 0000 0000 0000 0000 0000 0000       ..............04:28
mithroHrm...04:30
mithroWhat does the console say?04:30
shenkiBIOS> netboot04:30
shenkiBooting from network...04:30
shenkiLocal IP : 192.168.100.5004:30
shenkiRemote IP: 192.168.100.10004:30
shenkiUnable to download boot.bin over TFTP04:30
shenkiNetwork boot failed04:30
mithroHrm...04:31
shenkimithro: i uninstalled my tftp daemon and installed yours, and used your makefile recipie. still didn't work04:34
shenkiwhich makes sense, as it looks like i'm getting bad data from the opsis04:35
shenkithere's no 'tftp get' packet04:35
shenkimithro: can we get any info out of the opsis? is there a way to make it respond to ping packets?04:39
mithroshenki: I pushed a small fix for the atftpd04:43
shenkiok. that's not the issue here, because it's not getting any connections04:44
mithrohttps://www.irccloud.com/pastebin/Mx3AIiWf/04:44
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)04:44
mithroThat is what mine looks like?04:44
mithroshenki: Can you run memtest?04:45
shenkimemtest ok04:45
shenki$ sudo tcpdump -i eth004:46
shenkitcpdump: verbose output suppressed, use -v or -vv for full protocol decode04:46
shenkilistening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes04:46
shenki15:15:14.130676 ARP, Request who-has aurora tell 192.168.100.50, length 4604:46
shenki15:15:18.891495 ARP, Unknown Hardware (0) (len 0), Unknown Protocol (0x0000) (len 0), length 4604:46
shenki15:15:23.651331 ARP, Request who-has aurora tell 192.168.100.50, length 4604:46
shenki15:15:28.410642 ARP, Unknown Hardware (0) (len 0), Unknown Protocol (0x0000) (len 0), length 4604:47
mithroshenki: Did you get any timing errors when building the gateware?04:47
shenkidoesnt look like it04:48
shenkimithro: ozlabs.org/~joel/opsis_net_or1k.bin04:49
shenkimithro: want to try my binary? (can I have yours?)04:50
mithroshenki: That your gateware?04:50
shenkiyeah04:50
shenkigate+bios+firm04:50
shenkimithro: what does ifconfig usb0 show for you?04:51
mithrohttps://www.irccloud.com/pastebin/Eso7TF13/04:52
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)04:52
shenkimithro: ok. how about ip route show?04:52
mithro192.168.100.0/24 dev usb0  proto kernel  scope link  src 192.168.100.10004:52
shenkiok. i lost my route before04:53
shenkiwhen i moved desks04:53
shenkii assume that's the problem04:53
mithromaybe?04:53
shenkimithro: how do you set up the interface?04:53
mithroIn /etc/network/interface04:53
shenkimithro: ok. can you paste?04:53
mithrohttps://www.irccloud.com/pastebin/izgBBwqV/04:53
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)04:53
shenkihrm still nothing in my routes04:55
shenkimithro: ok, now it works04:56
shenkithe first time i twas a bad physical connection04:56
shenkisecond time it was no route added04:56
mithro:-/04:56
shenkiturns out you need both :)04:56
shenkiully downloaded 81700 bytes from boot.bin over TFTP04:56
shenkiUnable to download cmdline.txt over TFTP04:56
shenkiNo command line parameters found04:56
shenkiUnable to download initrd.bin over TFTP04:56
shenkiNo initial ramdisk found04:56
shenkiExecuting booted program at 0x4000010004:57
shenkiit stops there04:57
mithroWhat did you use are your boot.bin?04:58
shenkiwhatever the build process created04:58
mithroshenki: Okay, you need to put your linux kernel there04:58
shenkiadd make = ARCH=openrisc04:59
shenkiadd make = /home/joel/dev/timvideos/HDMI2USB-litex-firmware/build/conda/bin/or1k-elf-gcc04:59
shenkiops04:59
shenkisorry04:59
mithroshenki: cp arch/openrisc/boot/vmlinux.bin ~tansell/foss/timvideos/hdmi2usb/HDMI2USB-merge/build/tftpd/boot.bin05:01
shenkimithro: do you have a rootfs i can borrow?05:01
mithroshenki: I used yours :-P05:01
shenkiah05:02
mithroshenki-openrisc-rootfs.cpio :-P05:02
shenkii have it here still, luckily05:02
shenki  LD      vmlinux.o05:02
shenki/home/joel/dev/timvideos/HDMI2USB-litex-firmware/build/conda/bin/or1k-elf-ld: cannot find libgcc.a: No such file or directory05:02
shenkimithro: which toolchain are you using?05:03
mithroshenki: The one in conda...05:03
shenkiconda/bin/or1k-elf-ld --version05:04
shenkiGNU ld (GNU Binutils) 2.2805:04
mithroYeap05:04
shenkiboo05:04
mithroWhy?05:04
shenkiit doesn't build05:04
mithroThat is 1 version behind.....05:04
mithroshenki: in What way?05:05
shenki15:31 <+shenki>   LD      vmlinux.o05:05
shenki15:31 <+shenki> /home/joel/dev/timvideos/HDMI2USB-litex-firmware/build/conda/bin/or1k-elf-ld: cannot find05:05
shenki                libgcc.a: No such file or directory05:05
shenkifrom 2 minutes ago :)05:05
mithroTry "conda install gcc-or1k-elf-newlib"05:06
shenkiok05:06
shenkiwhich toolchain are you using?05:06
mithromake KBUILD_IMAGE=zImage CROSS_COMPILE=or1k-elf- ARCH=openrisc05:08
shenkimithro: do you have build/conda/bin/../lib/gcc/or1k-elf/5.4.0/libgcc.a in your conda dir?05:10
shenkiah. it appears i do now, after installing the netlib toolchain05:10
shenkimithro: my conda env is screwed up or something now05:14
mithroshenki: Hrm?05:14
shenkiPython 3.6.2 :: Continuum Analytics, Inc.05:14
shenkipython (version 3.5) *NOT* found05:14
shenkiPlease try running the /home/joel/dev/timvideos/HDMI2USB-litex-firmware/scripts/download-env.sh script again.05:14
shenkiit can't find litex in the env i already had entered05:14
mithroshenki: Ahh - I fixed that05:14
shenkiok. im doing enter env and now it's downloading libgcc05:15
shenkiand lots of stuff05:15
*** rohitksingh has joined #timvideos05:15
shenkiCondaVerificationError: The package for pyserial located at /home/joel/dev/timvideos/HDMI2USB-litex-firmware/build/conda/pkgs/pyserial-2.7-py35_005:17
shenkiappears to be corrupted. The path 'lib/python3.5/site-packages/serial/urlhandler/__pycache__/protocol_socket.cpython-35.pyc'05:17
mithroshenki: Hrm, just "rm -rf build/conda; rm build/Miniconda3-latest-Linux-x86_64.sh" and then run the download-env.sh script again...05:17
shenkiok05:18
shenkior1k-elf-ld: command not found05:27
shenkior1k-elf-ld (version 2.28) *NOT* found05:27
shenkii guess i have to install it manually?05:27
mithropj05:28
mithrooh05:28
mithroexport CPU=or1k before running the download-env.sh script05:28
shenki$ conda list  |grep or1k05:28
shenkiits' gone?05:28
shenkiok05:28
mithroI should remove the check which prevents download-env.sh running inside the env probably....05:31
mithro3717636 bytes takes a long time to upload at 115200 :-/05:33
mithroAbout 4 minutes apparently....05:34
shenkipretty big. you could use a much smaller initrd, and trim the kernel config05:37
mithroNo compression05:37
shenkimithro: how did you build your .bin?05:38
shenkibootconsole [litex_uart_a0] disabled05:40
shenkiand then junk05:40
shenkimithro: is that what you get?05:40
mithroshenki: Yeah05:40
shenkicool05:40
mithromake CROSS_COMPILE=or1k-elf- ARCH=openrisc -j 128 zImage05:41
shenkiyeah, zImage errored but still created the .bin05:42
mithroYeah05:42
mithroif you do a05:42
mithro"export FIRMWARE=linux; mkdir build/opsis_net_or1k/software/linux; cp vmlinux.bin build/opsis_net_or1k/software/linux/firmware.bin; make image" you should get an image with the kernel baked in05:44
mithroshenki: you should also be able to do ./scripts/build-qemu.sh to get a qemu which is configured in the same way...05:50
shenkiok05:52
shenkiLinux version 4.14.0-rc2-00025-g939421e8a8cb-dirty (joel@aurora) (gcc version 5.4.0 (GCC)) #46 Sun Oct 1 16:19:43 ACDT 201705:52
shenkii rebased on the latest upstream05:52
mithrohttps://github.com/mithro/qemu-litex/tree/timer-fix <- I think that fixes the litex timer in qemu05:55
tpbTitle: GitHub - mithro/qemu-litex at timer-fix (at github.com)05:55
shenkiok05:56
mithroIf we can disable the or1k timer, that would be good05:56
shenkii thought we were going to go down the or1k timer path for now?05:57
mithroshenki: Until we got something booting / going05:57
mithroshenki: You got it all going now?06:07
shenkigot it going until the panic. no userspace06:09
mithroYeah - it panics on real hardware - gets to userspace in qemu06:09
mithroshenki: Fixing the uart past post early printk would help us see what the panic is06:16
shenkiyeah06:17
shenkimithro: which device tree file does it use currently?06:18
mithroDunno... the one committed? :-P06:20
shenkithere are two that you have been modifying06:20
shenkiit looks like the build process uses or1klitex.dts06:20
mithrorm arch/openrisc/boot/dts/or1klitex.dtb.S arch/openrisc/boot/dts/or1klitex.dtb06:21
mithroI assume that means we using that?06:22
mithroWouldn't surprise me if the IRQ is configured wrong06:22
shenkiyeah. i tested by removing or1ksim06:22
mithroshenki: Think you can make progress now?06:26
shenkiyeah06:27
shenkii will make sure irqs are working06:27
shenkiand then look at the serial driver06:27
shenkimithro: how did you come up with the changes you made to arch/openrisc/kernel/head.S ?09:42
shenkimithro: here's where i got to today https://pastebin.com/LE0VFY8K15:18
tpbTitle: Executing booted program at 0x40000100 Compiled-in FDT at c02c0b20 Linux versi - Pastebin.com (at pastebin.com)15:18
*** CarlFK has quit IRC16:33
shenkihttps://pastebin.com/S4j569dw16:34
tpbTitle: Executing booted program at 0x40000100 [ 0.000000] Compiled-in FDT at c02c0b - Pastebin.com (at pastebin.com)16:34
*** sb0 has quit IRC17:30
*** fumblehool_ has joined #timvideos17:51
*** fumblehool_ has quit IRC21:38
*** techman83 has quit IRC22:01
*** techman83 has joined #timvideos22:03
*** ChanServ sets mode: +v techman8322:03
mithroshenki: is getting JTAG or arty support more useful for you?22:20
mithroBtw, flterm should be able to do gdb pass thru, so if you have kdb working that could also help22:21
mithroBtw did you also get qemu working?22:21
mithroThe changes to head.S are all about adding support for the evbar feature which allows the interrupt vector table to be at a non-zero location22:23
*** medicalwei has quit IRC22:43
*** medicalwei has joined #timvideos23:00

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!