Tuesday, 2019-02-19

*** tpb has joined #timvideos00:00
*** TheAssassin has quit IRC00:33
*** TheAssassin has joined #timvideos00:38
*** cr1901_modern has quit IRC00:59
*** cr1901_modern has joined #timvideos01:23
*** cr1901_modern1 has joined #timvideos01:45
*** cr1901_modern has quit IRC01:48
*** cr1901_modern1 has quit IRC02:45
*** cr1901_modern has joined #timvideos02:45
*** rohitksingh_work has joined #timvideos04:07
*** Toba has quit IRC04:17
*** Toba has joined #timvideos04:17
*** Toba is now known as Guest9584404:18
*** futarisIRCcloud has joined #timvideos05:18
CarlFKflterm --port=/dev/ttyUSB1  ... [FLTERM] Starting... ^c   exits, echo $?  => 13006:25
CarlFKflterm.c int main(int argc, char *argv[])    return 0;06:25
CarlFK https://github.com/timvideos/flterm/blob/master/flterm.c#L97306:25
tpbTitle: flterm/flterm.c at master · timvideos/flterm · GitHub (at github.com)06:25
CarlFKwhy is  $?  => 130 ?06:25
CarlFKIts making make abort (or something that breaks my tests)06:26
xobsCarlFK: 130 is EOWNERDEAD. Could be that it's missing a shared library, or that it doesn't have permission to open /dev/ttyUSB1, or any number of things.06:28
xobsAh, or maybe something else is using /dev/ttyUSB106:28
CarlFKflterm runs and functions, I hit ^c to exit it, and make aborts06:29
CarlFK130 is ^c https://www.tldp.org/LDP/abs/html/exitcodes.html06:29
tpbTitle: Exit Codes With Special Meanings (at www.tldp.org)06:29
CarlFKbut I don't see how flterm returns 13006:29
CarlFKunless read() does an exit(13) inside it and flterm doesn't get a chance to handle it, but according to read docs it returns on 'evertyhing'06:31
xobsThat's what you get when you quit a program with Control-C and it doesn't exit normally.06:31
xobsFor example, this program will also return 130 if you control-C: int main(int argc, char **argv) { while (1) read(1, &argc, 1); return 0; }06:32
tpbTitle: I/O Primitives (The GNU C Library) (at www.gnu.org)06:32
CarlFKso read() calls exit(130)?06:32
xobsMore likely, hitting Control-C sends a SIGINT to the program, which probably has no default handler, so it does exit(EOWNERDEAD). But I'm still looking for the documentation on that.06:34
xobsAh, my mistake. "When a command terminates on a fatal signal whose number is N, Bash uses the value 128+N as the exit status" so it's a SIGINT (signal 2), plus 128.06:42
xobsBecause yes, the default behavior of SIGINT when it's untrapped (according to signal(7)) is to terminate with that signal.06:43
CarlFKwould ^c kill  int main(int argc, char **argv) { while (1); return 0; }06:45
xobsYes, and with bash, that also returns 13006:45
CarlFKah, so reading read() docs isnt' helping me06:46
CarlFKhttp://ix.io/aQn  trap date INT eats the ^c06:52
CarlFK(not sure dont' care where the ouput from date goes)06:52
xobsYou can "trap true INT"06:53
CarlFK(trap true INT; flterm --port=/dev/ttyUSB1 --kernel=build/arty_net_or1k.linux//software/firmware/firmware.bin --speed=115200) || true06:58
mithroCarlFK: why not just modify flterm to have a signal handler to exit gracefully on SIGINT?06:59
CarlFKmithro: I have no idea how to add a signal handler07:00
mithro man signal07:00
mithroI'm pretty sure there is an example in there that is almost copy and pastable..07:01
mithroOtherwise Google and stack overflow should take you like 30 seconds to find a solution07:01
CarlFK10 hits later, best 2:07:09
tpbTitle: c++ - Ctrl+c kills process, despite signal handling, works on different machine - Stack Overflow (at stackoverflow.com)07:09
tpbTitle: c - Correct way to use signal handlers - Stack Overflow (at stackoverflow.com)07:09
mithroCarlFK: LGTM! Ship it07:32
CarlFKmithro: really?07:33
mithroCarlFK: yes, you really only need probably 5 lines in total07:33
CarlFK  write(1, "Caught signal 11\n", 17);  what is 11 ?07:33
xobsCarlFK: SIGSEGV, i.e. segfault07:34
xobs(you can see it by looking at "man 7 signal")07:34
CarlFKah.. I need to change signal(SIGSEGV07:34
xobsI thought you wanted to trap SIGINT (i.e. Ctrl-C)?07:35
CarlFKright.  I thought that code I found trapped all of them07:36
CarlFKwhat ... lib? is signal in?07:37
xobsI thought it was a syscall, but it might just be in libc.07:41
xobsmithro: so the problems with CSR in simulation were just related to `write_from_dev=True` not behaving properly?  Or were there other issues as well?07:46
CarlFKis this going to eat the ^c but not exit flterm ?07:49
xobsCarlFK: it will. you probably want to add `exit(0)` to it.07:49
*** cr1901_modern1 has joined #timvideos07:52
CarlFKflterm.c:703:12: error: ‘SIGINT’ undeclared07:55
*** cr1901_modern has quit IRC07:55
*** cr1901_modern1 has quit IRC07:55
*** cr1901_modern has joined #timvideos07:56
CarlFKman snglal fixed:       #include <signal.h>07:57
CarlFKbah.need to call tcsetattr(0, TCSANOW, &otty) or my term is broken (no keyboard echo)08:02
CarlFKhow does ^c reset that?08:02
CarlFKnever mind - this yak is too smelly08:04
xobsCarlFK: why are you pressing control-C? isn't this part of an automated setup process?08:05
CarlFKit boots the hdmi2usb firmware and I'm left at a H2U 01:51:38> prompt08:07
xobsCarlFK: sounds you want to just add another argument to flterm to exit after xmodem. Check the flag value, and break if true at https://github.com/timvideos/flterm/blob/master/flterm.c#L79908:11
tpbTitle: flterm/flterm.c at master · timvideos/flterm · GitHub (at github.com)08:11
CarlFKxobs: I kinda want to see if it works.  I think ;)08:12
CarlFKlike, I think the or1k cpu is throwing an exception? or throwing a fit: http://paste.ubuntu.com/p/k5KVYzZFQk/08:13
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)08:13
*** futarisIRCcloud has quit IRC08:17
*** m4ssi has joined #timvideos08:40
CarlFKhow did building qemu break?!!08:45
CarlFK/home/juser/tv/litex-buildenv/third_party/qemu-litex/ui/gtk.c:1957:5: error: ‘vte_terminal_set_encoding’ is deprecated [-Werror=deprecated-declarations]08:46
CarlFKderp - I forgot I was trying a different repo and didn't put it back09:00
CarlFKmake still aborts: http://paste.ubuntu.com/p/F36PZwy8dN/09:40
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)09:40
CarlFKI'm going to abort and go to bed... Zzzzzz09:41
xobsCarlFK: abort(); sleep();09:41
CarlFKlol yep09:42
*** futarisIRCcloud has joined #timvideos10:01
futarisIRCcloud_florent_: That was quick. Check out @enjoy_digital’s Tweet: https://twitter.com/enjoy_digital/status/1097755857666883584 ... mithro / xobs, this might be useful for fomu too.10:03
*** tsglove2 is now known as tsglove11:54
*** futarisIRCcloud has quit IRC12:20
*** Kripton has quit IRC12:31
*** Kripton has joined #timvideos12:46
*** rohitksingh_work has quit IRC12:55
*** rohitksingh has joined #timvideos13:52
*** rohitksingh has quit IRC15:39
*** rohitksingh has joined #timvideos16:07
*** m4ssi has quit IRC17:33
*** rohitksingh has quit IRC19:12
CarlFKhuh - hdmi2usb on qemu: the uptime goes up to 00:00:42 and then stops.22:30
CarlFKI'm guessing this is nothing new. i've noticed 42 in the past, just now noticed it starts at 0 and goes up for 42 seconds.22:31

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