mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bruno Thomsen <bth@kamstrup.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Cc: Bruno Thomsen <bth@kamstrup.com>
Subject: [ptxdist] Runtime issue with busybox init using OSELAS.Toolchain() 2018.02.0
Date: Thu, 3 May 2018 12:50:48 +0000	[thread overview]
Message-ID: <915054555B5659448ACF8A70E114824D036732158F@Exchange2010.kamstrup.dk> (raw)


Hi,

I am build a firmware based on ptxdist-2017.10.0 on Fedora 28 and after upgrading from OSELAS.Toolchain() 2016.06.1 to 2018.02.0 I ran into an issue with busybox init that caused a kernel panic due to a missing shared lib (libm.so.6).


Kernel trace:
[    1.882403] VFS: Mounted root (ext4 filesystem) on device 179:6.
[    1.895099] devtmpfs: mounted
[    1.899448] Freeing unused kernel memory: 148K (c053b000 - c0560000)
[    1.905985] This architecture does not have kernel memory protection.
/bin/sh: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory
[    2.055203] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    2.055203] 
[    2.064447] Rebooting in 1 seconds..HTLFLCMHTLLCLLC


Rootfs using OSELAS.Toolchain() 2016.06.1:
$ ls -l /lib/libm*
-rwxr-xr-x    1 root     root        660888 Oct  1  2017 /lib/libm-2.23.so
lrwxrwxrwx    1 root     root             9 May  2 10:32 /lib/libm.so -> libm.so.6
lrwxrwxrwx    1 root     root            12 May  2 10:32 /lib/libm.so.6 -> libm-2.23.so


Rootfs using OSELAS.Toolchain() 2018.02.0:
$ ls -l /lib/libm*
-rwxrwxrwx    1 root     root        730532 Oct  1  2017 libm.so



Quick and dirty hack (create a reverse symbolic link) makes target boot:
--- /usr/local/lib/ptxdist-2017.10.0/rules/glibc.make	2018-02-20 12:10:19.000000000 +0100
+++ rules/glibc.make	2018-05-03 13:01:13.947383028 +0200
@@ -70,6 +70,7 @@
 
 ifdef PTXCONF_GLIBC_M
 	@$(call install_copy_toolchain_lib, glibc, libm.so)
+	@$(call install_link, glibc, libm.so, /lib/libm.so.6)
 endif
 
 ifdef PTXCONF_GLIBC_NSS_DNS


So it seems like updating PTXCONF_GLIBC_VERSION from 2.23 to 2.27 causes a misbehaviour in shared library installation.

I checked another library (libc) on rootfs.

OSELAS.Toolchain() 2016.06.1:
-rwxr-xr-x    1 root     root       1222192 Oct  1  2017 /lib/libc-2.23.so
lrwxrwxrwx    1 root     root            12 May  2 10:31 /lib/libc.so.6 -> libc-2.23.so

OSELAS.Toolchain() 2018.02.0:
-rwxrwxrwx    1 root     root       1296088 Oct  1  2017 libc.so.6


For reference Fedora 28 looks like this:
-rwxr-xr-x. 1 root root 1963480 Mar 29 13:16 /lib/libc-2.27.so
lrwxrwxrwx. 1 root root      12 Mar 29 13:13 /lib/libc.so.6 -> libc-2.27.so


Has anyone else seen this toolchain shared library issue or am I missing something?


Best regards
Bruno

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2018-05-03 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 12:50 Bruno Thomsen [this message]
2018-05-03 13:35 ` Juergen Borleis
2018-05-03 14:09   ` Bruno Thomsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=915054555B5659448ACF8A70E114824D036732158F@Exchange2010.kamstrup.dk \
    --to=bth@kamstrup.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox