mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Runtime issue with busybox init using OSELAS.Toolchain() 2018.02.0
@ 2018-05-03 12:50 Bruno Thomsen
  2018-05-03 13:35 ` Juergen Borleis
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Thomsen @ 2018-05-03 12:50 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] Runtime issue with busybox init using OSELAS.Toolchain() 2018.02.0
  2018-05-03 12:50 [ptxdist] Runtime issue with busybox init using OSELAS.Toolchain() 2018.02.0 Bruno Thomsen
@ 2018-05-03 13:35 ` Juergen Borleis
  2018-05-03 14:09   ` Bruno Thomsen
  0 siblings, 1 reply; 3+ messages in thread
From: Juergen Borleis @ 2018-05-03 13:35 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Hi Bruno,

On Thursday 03 May 2018 14:50:48 Bruno Thomsen wrote:
> [...]
> Rootfs using OSELAS.Toolchain() 2018.02.0:
> $ ls -l /lib/libm*
> -rwxrwxrwx    1 root     root        730532 Oct  1  2017 libm.so

Did you copy this toolchain from a different host?

How does "ls -l <path-to-your-toolchain>/sysroot-*/lib/libm*" looks like?

Cheers
Jürgen

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] Runtime issue with busybox init using OSELAS.Toolchain() 2018.02.0
  2018-05-03 13:35 ` Juergen Borleis
@ 2018-05-03 14:09   ` Bruno Thomsen
  0 siblings, 0 replies; 3+ messages in thread
From: Bruno Thomsen @ 2018-05-03 14:09 UTC (permalink / raw)
  To: ptxdist

Hi Jürgen,

> Did you copy this toolchain from a different host?

Yes, it's build in another Jenkins pipeline.

> How does "ls -l <path-to-your-toolchain>/sysroot-*/lib/libm*" looks like?

-rwxr-xr-x. 1 bth bth 2386164 May  2 13:44 dependencies/imx28-toolchain-x86_64/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v5te-linux-gnueabi/lib/libm-2.27.so
-rwxrwxrwx. 1 bth bth 2386164 May  2 13:44 dependencies/imx28-toolchain-x86_64/OSELAS.Toolchain-2018.02.0/arm-v5te-linux-gnueabi/gcc-7.3.1-glibc-2.27-binutils-2.30-kernel-4.15-sanitized/sysroot-arm-v5te-linux-gnueabi/lib/libm.so.6

Okay, symbolic links was lost in Gradle zip. Thanks for reminding me of the zip limitations :)

I will just tar.xz before zip so it fits nicely into Artifactory.

Thanks for the quick help.

Cheers
Bruno
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-03 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 12:50 [ptxdist] Runtime issue with busybox init using OSELAS.Toolchain() 2018.02.0 Bruno Thomsen
2018-05-03 13:35 ` Juergen Borleis
2018-05-03 14:09   ` Bruno Thomsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox