# 00:15:54 |
sh[4]rm4 |
joins #crosstool-ng |
# 00:17:45 |
sh4rm4 |
quits : Ping timeout: 256 seconds |
# 00:49:07 |
djerome |
joins #crosstool-ng |
# 02:58:03 |
djerome |
quits : Remote host closed the connection |
# 03:03:52 |
rofl__ |
joins #crosstool-ng |
# 03:05:29 |
sh[4]rm4 |
quits : Ping timeout: 256 seconds |
# 03:24:26 |
nandub |
joins #crosstool-ng |
# 03:25:00 |
nandub |
quits : Client Quit |
# 03:45:14 |
nandub |
joins #crosstool-ng |
# 03:45:22 |
sh[4]rm4 |
joins #crosstool-ng |
# 03:47:59 |
rofl__ |
quits : Ping timeout: 256 seconds |
# 04:04:23 |
memleak |
joins #crosstool-ng |
# 04:04:36 |
memleak |
quits : Changing host |
# 04:04:36 |
memleak |
joins #crosstool-ng |
# 04:11:10 |
perr |
joins #crosstool-ng |
# 04:49:55 |
perr |
quits : Ping timeout: 255 seconds |
# 04:57:51 |
perr |
joins #crosstool-ng |
# 05:45:52 |
diorcety |
joins #crosstool-ng |
# 05:54:17 |
diorcety |
quits : Read error: Connection reset by peer |
# 06:04:29 |
ovf |
quits : Ping timeout: 272 seconds |
# 06:13:45 |
ovf |
joins #crosstool-ng |
# 06:24:07 |
ovf |
quits : Ping timeout: 272 seconds |
# 06:28:54 |
ovf |
joins #crosstool-ng |
# 07:21:11 |
aalv |
joins #crosstool-ng |
# 07:22:24 |
aalv |
quits : Client Quit |
# 07:22:41 |
aalv |
joins #crosstool-ng |
# 07:40:05 |
rofl__ |
joins #crosstool-ng |
# 07:42:01 |
sh[4]rm4 |
quits : Ping timeout: 256 seconds |
# 08:09:52 |
memleak |
quits : Quit: Leaving |
# 08:53:07 |
perr |
quits : Ping timeout: 245 seconds |
# 09:03:15 |
UukGoblin |
quits : Read error: Connection reset by peer |
# 09:08:58 |
perr |
joins #crosstool-ng |
# 09:08:58 |
perr |
quits : Changing host |
# 09:08:58 |
perr |
joins #crosstool-ng |
# 09:12:19 |
UukGoblin |
joins #crosstool-ng |
# 09:38:06 |
sh4rm4 |
joins #crosstool-ng |
# 09:39:53 |
rofl__ |
quits : Ping timeout: 256 seconds |
# 09:48:47 |
maxime__ |
is now known as: maxime |
# 09:49:36 |
maxime |
quits : Changing host |
# 09:49:36 |
maxime |
joins #crosstool-ng |
# 11:12:15 |
sh4rm4 |
quits : Ping timeout: 256 seconds |
# 11:55:02 |
perr |
quits : Ping timeout: 255 seconds |
# 11:59:44 |
sh4rm4 |
joins #crosstool-ng |
# 12:09:05 |
sh4rm4 |
daggs1-work, never heard of prints(). is that a windows extension? |
# 12:09:50 |
sh4rm4 |
or were you asking whether musl is littered with debug printf statement that can be activated with a magic configure switch ? |
# 12:10:12 |
sh4rm4 |
if the latter, than no |
# 12:10:27 |
sh4rm4 |
you have to add the dprintf's yourself |
# 12:11:17 |
sh4rm4 |
or just compile musl with CFLAGS="-O0 -g3" ./configure... |
# 12:11:28 |
sh4rm4 |
then you can comfortably singlestep |
# 12:11:44 |
daggs1-work |
sh4rm4, managed, used fprintf to stdout |
# 12:12:02 |
daggs1-work |
found out that musl doesn't interprets scripts |
# 12:12:14 |
sh4rm4 |
scripts? |
# 12:12:37 |
sh4rm4 |
btw to debug libc you should use dprintf(2, "...") rather then fprintf |
# 12:12:44 |
sh4rm4 |
the former is threadsafe |
# 12:13:05 |
daggs1-work |
if I compile busybox linked to musl and try to run a script by calling the file name directly (like in bash) I get Exec format error |
# 12:13:42 |
sh4rm4 |
with /bin/sh symlinked to musl-linked busybox ? |
# 12:13:50 |
daggs1-work |
yes |
# 12:14:05 |
sh4rm4 |
weird |
# 12:14:07 |
daggs1-work |
happened with uclibc too |
# 12:14:16 |
sh4rm4 |
on which arch ? |
# 12:14:22 |
daggs1-work |
x86_64 |
# 12:14:50 |
sh4rm4 |
is it dynamically linked ? |
# 12:15:03 |
daggs1-work |
looking as musl code, it gets the cmd directly from busybox and pass to the kernel |
# 12:15:09 |
sh4rm4 |
if so /lib/ld-musl-$ARCH.so.1 must exist |
# 12:15:41 |
daggs1-work |
created a musl based cross compiler, made sure busybox with be created with that compiler and linked to that lib |
# 12:16:04 |
sh4rm4 |
so it is dynamically linked ? |
# 12:16:13 |
daggs1-work |
it does or else the image won't boot as it run busybox on start |
# 12:16:15 |
daggs1-work |
yes |
# 12:16:33 |
sh4rm4 |
hmm ? how would a statically linked binary not boot ? |
# 12:16:43 |
daggs1-work |
statically? |
# 12:16:56 |
sh4rm4 |
yes, static linked |
# 12:17:07 |
daggs1-work |
I'm not using a statically linked busybox |
# 12:17:21 |
daggs1-work |
I'm using a dynamically linked busybox |
# 12:17:29 |
sh4rm4 |
i.e. using libc.a rather than libc.so to create a free-standing binary without any external dependencies |
# 12:18:04 |
daggs1-work |
I need to use dynamically linked busybox due to licensing issues |
# 12:18:22 |
perr |
joins #crosstool-ng |
# 12:18:23 |
perr |
quits : Changing host |
# 12:18:23 |
perr |
joins #crosstool-ng |
# 12:18:29 |
daggs1-work |
also I have limited size in the image |
# 12:19:47 |
sh4rm4 |
yes but a statically linked busybox is much smaller than a dynamic linked one + libc.so |
# 12:20:22 |
sh4rm4 |
anyway, your problem is probably related to one of 2 problems: |
# 12:20:33 |
daggs1-work |
I understand but my boss wants all to be dynamic linked one |
# 12:20:40 |
sh4rm4 |
1) lack to compile kernel with a recently added flag that allows to run scripts directly |
# 12:21:06 |
sh4rm4 |
2) bogus linker that uses mappings > PAGE_SIZE |
# 12:21:15 |
daggs1-work |
well me img kernel is rather new but the cross compiler kernel is old |
# 12:21:25 |
daggs1-work |
bogus linker that uses mappings? |
# 12:21:29 |
daggs1-work |
how can that happen? |
# 12:21:33 |
sh4rm4 |
for 2, i cant remember the exact details and waiting for the details in #musl |
# 12:22:04 |
daggs1-work |
this happened to me with uclibc, same scenario worked in glibc |
# 12:22:16 |
sh4rm4 |
daggs1-work, iirc some ppl use an ld option that makes the dynlinker use huge pages to speed up loadingextremely bloated C++ libs |
# 12:22:56 |
sh4rm4 |
daggs1-work, maybe the glibc scenario used a different kernel version |
# 12:23:10 |
daggs1-work |
nope, same kernel usage |
# 12:23:39 |
sh4rm4 |
anyway, the option is CONFIG_BINFMT_SCRIPT=y |
# 12:23:49 |
sh4rm4 |
if this is missing in your kernel config, its the reason |
# 12:23:52 |
daggs1-work |
in the kernel? |
# 12:23:57 |
sh4rm4 |
yup |
# 12:24:21 |
daggs1-work |
ok, I see, it isn't set, wil enable it. |
# 12:24:31 |
daggs1-work |
and try, that might be the issue |
# 12:25:26 |
sh4rm4 |
seems it was introduced in 3.10 |
# 12:25:41 |
daggs1-work |
there goes... it will be extremely bad (for me) if it works, this means I've wasted most of the day :( |
# 12:28:45 |
sh4rm4 |
otoh it means you dont have to waste another day |
# 12:28:46 |
daggs1-work |
:facepalm: it works ;( |
# 12:28:59 |
sh4rm4 |
but you can thank the kernel guys for this surprise |
# 12:29:06 |
daggs1-work |
I had the patch ready... |
# 12:29:11 |
sh4rm4 |
i was quite wtf when i encountered this myself |
# 12:29:38 |
daggs1-work |
when I encountered this first, I wrote a busybox patch that does it |
# 12:29:52 |
sh4rm4 |
how could that work ? |
# 12:33:47 |
daggs1-work |
by trying to read the first few bytes and looking for the shebang format, crude but it suited our needs |
# 12:34:46 |
sh4rm4 |
you mean in the ash code ? |
# 12:34:57 |
daggs1-work |
hush code rather |
# 12:35:02 |
sh4rm4 |
ok that could work as long as you dont start another shell |
# 12:35:13 |
sh4rm4 |
or you dont use a shell script for init |
# 12:35:20 |
sh4rm4 |
I need to use dynamically linked busybox due to licensing issues |
# 12:35:21 |
daggs1-work |
worked even we started anothe rshell |
# 12:35:33 |
sh4rm4 |
^ are you sure the license issues apply with musl as well ? |
# 12:36:04 |
sh4rm4 |
as musl's MIT-licensed, you can link it to anything and distribute the binaries under the license of the programs |
# 12:36:18 |
daggs1-work |
that are my boss asked me to do. |
# 12:36:28 |
sh4rm4 |
because of GPL fear |
# 12:36:30 |
daggs1-work |
but afaik busybox isn't mit license |
# 12:36:37 |
sh4rm4 |
busybox is GPL |
# 12:36:53 |
sh4rm4 |
and it will stay that whether you link dynamically or statically |
# 12:37:19 |
daggs1-work |
I know |
# 12:37:56 |
daggs1-work |
ask said, my boss handles the licensing issues, I implement. |
# 12:38:01 |
sh4rm4 |
but if for example bb was GPL 2 only, and your libc GPL3, you couldnt distribute the resulting static linked binary |
# 12:38:13 |
sh4rm4 |
because the licenses are incompatible |
# 12:38:23 |
daggs1-work |
as we are constantly understaffed and I'm swamp with work, I don't have timeslot to argue with him :) |
# 12:38:35 |
daggs1-work |
after all he pays my wage |
# 12:38:39 |
sh4rm4 |
k |
# 12:38:55 |
daggs1-work |
thanks for the help :)\ |
# 12:38:56 |
daggs1-work |
thanks for the help :) |
# 12:39:02 |
sh4rm4 |
welcome |
# 13:34:09 |
tlwoerner |
quits : Quit: Leaving |
# 13:50:28 |
daggs1-work |
sh4rm4, question, I'm typing ping dagg in the image but I get this: "ping: bad address 'dagg'", in glibc I was missing libresolv and libnss_dns libs, what are the equivalent in musl? |
# 13:51:35 |
perr |
quits : Quit: Leaving |
# 13:53:03 |
sh4rm4 |
musl doesnt need those legacy resolver libs to work |
# 13:53:07 |
sh4rm4 |
and doesnt provide them |
# 13:53:18 |
sh4rm4 |
*everything* is in libc.so |
# 13:53:23 |
sh4rm4 |
including the dynlinker |
# 13:54:03 |
daggs1-work |
sh4rm4, so I guess I'm missing something... |
# 13:55:13 |
sh4rm4 |
maybe resolv.conf ? |
# 13:55:16 |
sh4rm4 |
try strace |
# 13:55:46 |
daggs1-work |
don't have strace on the system |
# 13:56:18 |
daggs1-work |
got resolv.conf |
# 13:57:35 |
daggs1-work |
in the img |
# 13:59:43 |
sh4rm4 |
no debug tools in the image ? so how are you supposed to debug it ? |
# 13:59:53 |
daggs1-work |
as said, size limitation |
# 13:59:58 |
sh4rm4 |
http://landley.net/aboriginal/downloads/binaries/extras |
# 14:00:01 |
daggs1-work |
will try to find strace |
# 14:00:03 |
sh4rm4 |
get one from here |
# 14:00:10 |
sh4rm4 |
it's 400 KB statically linked |
# 14:01:42 |
daggs1-work |
thanks |
# 14:01:48 |
daggs1-work |
seems handy |
# 14:05:01 |
daggs1-work |
ok, it tries /etc/hosts, then opens resolv.conf |
# 14:06:24 |
sh4rm4 |
and then, does it send udp packets to your configured dns server ? |
# 14:06:30 |
daggs1-work |
well, frankly I don't know, I see it sends a pkg, gets one but no getting the ip |
# 14:07:07 |
sh4rm4 |
maybe the response is malformed ? |
# 14:08:14 |
sh4rm4 |
https://github.com/rofl0r/hardcore-utils/blob/master/host.c |
# 14:08:21 |
daggs1-work |
not sure what to expect, the image is using kernel 3.12.5 but the cross compiler is build with kernel 2.6.22, I had to tweak the headers when I was building busybox, can that be the issue? |
# 14:08:24 |
sh4rm4 |
you could try if this host program works |
# 14:08:41 |
sh4rm4 |
oh, yes this could be an issue. |
# 14:08:58 |
sh4rm4 |
anyway this host program doesnt rely on kernel headers |
# 14:09:06 |
daggs1-work |
ok, sec |
# 14:10:34 |
daggs1-work |
testing in a sec |
# 14:13:46 |
daggs1-work |
sh4rm4, how do I run it? host ? |
# 14:14:03 |
sh4rm4 |
yup |
# 14:15:35 |
daggs1-work |
didn't linked it statically, trying again |
# 14:18:09 |
daggs1-work |
getting Host not found |
# 14:19:28 |
aalv |
quits : Ping timeout: 250 seconds |
# 14:20:16 |
sh4rm4 |
huh |
# 14:20:52 |
sh4rm4 |
can you sniff the packets ? (wireshark,tcpdump...) |
# 14:25:08 |
daggs1-work |
can I do it from outside the image? |
# 14:26:34 |
sh4rm4 |
yes |
# 14:27:19 |
sh4rm4 |
you could run tcpdump on the dns server |
# 14:27:23 |
sh4rm4 |
if it's inhouse |
# 14:27:34 |
sh4rm4 |
or on the router/gateway if its outside |
# 14:29:10 |
sh4rm4 |
alternatively you can use an old hub (predecessor of network switch) because there all packets are sent to all ports |
# 14:29:23 |
RushPL |
quits : Ping timeout: 264 seconds |
# 14:29:43 |
daggs1-work |
maybe I can find static tcpdump |
# 14:29:49 |
RushPL |
joins #crosstool-ng |
# 14:29:53 |
sh4rm4 |
yeah i'm just trying to build one for you |
# 14:30:35 |
daggs1-work |
thanks |
# 14:33:08 |
sh4rm4 |
sigh... pcap is resisting my attempts to build it without usb support |
# 14:37:24 |
aalv |
joins #crosstool-ng |
# 14:39:33 |
sh4rm4 |
http://ftp.barfooze.de/pub/sabotage/bin/tcpdump-static-x86_64.xz |
# 14:42:10 |
daggs1-work |
thanks |
# 14:42:23 |
daggs1-work |
how do I use it? |
# 14:42:39 |
sh4rm4 |
there must be an option to log into pcap files |
# 14:42:54 |
daggs1-work |
ok |
# 14:43:16 |
sh4rm4 |
those you can inspect comfortably on a box with wireshark on it |
# 14:43:28 |
daggs1-work |
ok |
# 14:45:10 |
sh4rm4 |
tcpdump -w dump.pcap -i eth0 |
# 14:51:40 |
daggs1-work |
got the file |
# 14:51:58 |
daggs1-work |
I need to go, will check later on with wireshark, thanks for the help |
# 14:54:10 |
sh4rm4 |
daggs1-work, still there ? |
# 14:54:18 |
sh4rm4 |
you could send me the pcap via email |
# 14:54:23 |
sh4rm4 |
so i can take a look |
# 14:56:35 |
loide |
joins #crosstool-ng |
# 15:39:07 |
memleak |
joins #crosstool-ng |
# 15:41:07 |
feepbot |
quits : Remote host closed the connection |
# 15:41:58 |
feepbot |
joins #crosstool-ng |
# 17:13:35 |
aalv |
quits : Quit: Leaving. |
# 17:35:40 |
sh4rm4 |
quits : Remote host closed the connection |
# 17:38:31 |
sh4rm4 |
joins #crosstool-ng |
# 17:53:01 |
sh4rm4 |
quits : Remote host closed the connection |
# 17:58:52 |
y_morin |
joins #crosstool-ng |
# 18:04:06 |
sh4rm4 |
joins #crosstool-ng |
# 18:16:38 |
sh4rm4 |
quits : Remote host closed the connection |
# 18:26:48 |
sh4rm4 |
joins #crosstool-ng |
# 19:12:32 |
sh4rm4 |
quits : Remote host closed the connection |
# 19:43:38 |
mingwandroid |
joins #crosstool-ng |
# 19:45:09 |
sh4rm4 |
joins #crosstool-ng |
# 19:50:09 |
sh4rm4 |
quits : Remote host closed the connection |
# 19:55:41 |
sh4rm4 |
joins #crosstool-ng |
# 19:57:29 |
maxime__ |
joins #crosstool-ng |
# 19:59:12 |
maxime |
quits : Ping timeout: 260 seconds |
# 20:05:44 |
sh4rm4 |
quits : Remote host closed the connection |
# 20:15:38 |
diorcety |
joins #crosstool-ng |
# 20:21:56 |
sh4rm4 |
joins #crosstool-ng |
# 20:23:34 |
sh4rm4 |
quits : Remote host closed the connection |
# 20:32:42 |
sh4rm4 |
joins #crosstool-ng |
# 20:32:42 |
bhundven |
y_morin: I've updated my branch with the thread fix |
# 20:32:46 |
bhundven |
https://bitbucket.org/bhundven/crosstool-ng/branch/musl |
# 20:33:03 |
bhundven |
I'm in the middle of relocating to a different place to work |
# 20:33:12 |
bhundven |
and found there is some problem with saveconfig |
# 20:34:00 |
bhundven |
besides that, here is my current arm .config http://dpaste.com/1E1CNRK |
# 20:34:07 |
bhundven |
which failed saveconfig |
# 20:34:12 |
bhundven |
bbiab |
# 20:35:08 |
sh4rm4 |
quits : Remote host closed the connection |
# 20:41:00 |
sh4rm4 |
joins #crosstool-ng |
# 20:45:15 |
sh4rm4 |
quits : Remote host closed the connection |
# 20:54:14 |
sh4rm4 |
joins #crosstool-ng |
# 20:54:56 |
y_morin |
bhundven: OK, I'll have a look. Thanks! :-) |
# 21:36:43 |
loide |
quits : Ping timeout: 256 seconds |
# 22:01:49 |
Guma |
joins #crosstool-ng |
# 22:17:46 |
diorcety |
quits : Quit: Leaving. |
# 23:01:51 |
y_morin |
quits : Quit: Nighty Night! |
# 23:07:51 |
Guma |
quits : Quit: Leaving... |