fvdw-sl on WD My Cloud

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 9:24 pm

can you give output of (within /chroot/bin)
Code: Select all
ls -al busybox
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 9:27 pm

The binaries are arm5v based they should compatible with armada arm7 cpu, I believe the comcerto cpu is an arm7 (I run these binaries also on an armada 370 cpu (arm7) and they run just fine
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 9:33 pm

Code: Select all
root@fvdwsl-sg-pc:/chroot2/bin # cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 41.55
Features        : half thumb fastmult vfp edsp vfpv3 vfpv3d16 tls idivt
CPU implementer : 0x56
CPU architecture: 7
CPU variant     : 0x1
CPU part        : 0x581
CPU revision    : 1

Hardware        : Marvell Armada 370/XP (Device Tree)
Revision        : 0000
Serial          : 0000000000000000
root@fvdwsl-sg-pc:/chroot2/bin #
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby matt_max » Sun Aug 21, 2022 9:34 pm

Here you go:
Code: Select all
WDMyCloud:/chroot/bin# ls -al busybox
-rwxr-xr-x 1 root root 933180 Jul 30  2019 busybox
WDMyCloud:/chroot/bin#

...and my cpu
Code: Select all
WDMyCloud:/chroot/bin# cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 1 (v7l)
processor       : 0
BogoMIPS        : 1292.69

processor       : 1
BogoMIPS        : 1292.69

Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x2
CPU part        : 0xc09
CPU revision    : 1

Hardware        : Comcerto 2000 EVM
Revision        : 0001
Serial          : 0000000000000000
WDMyCloud:/chroot/bin#
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 9:41 pm

I think I understand the ldd erro. ldd is build to different glibc version an fails then to analyze my busybox
Also that /chroot/bin/busybox doesn't run is because it tries to load wd shared libs which are from different glibc version.
My busybox need the libs present in chroot folder.

What we need to solve is why chroot command fails. It seems wd cloud firmware doesn't have bash shell
Can you check folder /bin of wd firmware if bash is present
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby matt_max » Sun Aug 21, 2022 9:44 pm

There is bash in WD system:
Code: Select all
WDMyCloud:~# ls -al /bin/bash
-rwxr-xr-x 1 root root 674736 Oct  1  2014 /bin/bash
WDMyCloud:~#

Code: Select all
WDMyCloud:~# ldd /bin/bash
        libtinfo.so.5 => /lib/arm-linux-gnueabihf/libtinfo.so.5 (0x40c60000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x40ce0000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x40b20000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x40d10000)
        /lib/ld-linux-armhf.so.3 (0x40320000)
WDMyCloud:~#

...and about glic version:
Code: Select all
WDMyCloud:~# ldd --version
ldd (Debian EGLIBC 2.17-93) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
WDMyCloud:~#
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 9:49 pm

my glib version is also 2.17

Code: Select all
root@fvdwsl-sg-pc:/chroot2/bin # ldd --version
ldd (GNU libc) 2.17
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
root@fvdwsl-sg-pc:/chroot2/bin #


difficult to analyze what going on here... :thinking
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby fvdw » Sun Aug 21, 2022 10:38 pm

from internet I read that the dependencies of /bin/bash must be available within the chroot
That means that these libs must be available in the chroot
Code: Select all
        libtinfo.so.5 => /lib/arm-linux-gnueabihf/libtinfo.so.5 (0x40c60000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x40ce0000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x40b20000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x40d10000)
        /lib/ld-linux-armhf.so.3 (0x40320000)

What you could try is making a folder
/chroot/lib/arm-linux-gnueabihf
and copy the following files from folder/lib/arm-linux-gnueabihf to this folder
libtinfo.so.5
libdl.so.2
libgcc_s.so.1
libc.so.6

And also copy /lib/ld-linux-armhf.so.3 to /chroot/lib

(check that copies are executable)

In my case I don't need it as the chrooted file system contains the dependencies of bash. The chrooted linux system has the same lib files as the filesystem were chroot command is called
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby fvdw » Mon Aug 22, 2022 5:52 pm

I also compiled the wd kernel using gpl source, can you test it?
Unpack the zip archive and write uImage to /dev/sdb6 using your linux pc (assuming sd5 is still empty !)

The idea is to add an initram filesystem to the kernel to let it boot the book they way we want.
To make it work, if that works new users only have to exchange the kernel on the disk to be able to runn fvdw-sl

Of course assuming we can solve the issue with armv5 binaries.
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: fvdw-sl on WD My Cloud

Postby matt_max » Mon Aug 22, 2022 6:18 pm

Ok then that is my /chroot/lib/arm-linux-gnueabihf/ folder:
Code: Select all
WDMyCloud:~# ls -ll /chroot/lib/arm-linux-gnueabihf/
total 1368
-rwxr-xr-x 1 root root 134452 Aug 22 20:00 ld-2.17.so
-rwxr-xr-x 1 root root 922896 Aug 22 19:45 libc-2.17.so
lrwxrwxrwx 1 root root     44 Aug 22 19:55 libc.so.6 -> /chroot/lib/arm-linux-gnueabihf/libc-2.17.so
-rw-r--r-- 1 root root  67168 Aug 22 19:43 libdl-2.17.so
lrwxrwxrwx 1 root root     45 Aug 22 19:53 libdl.so.2 -> /chroot/lib/arm-linux-gnueabihf/libdl-2.17.so
-rw-r--r-- 1 root root 112712 Aug 22 19:44 libgcc_s.so.1
lrwxrwxrwx 1 root root     47 Aug 22 19:51 libtinfo.so.5 -> /chroot/lib/arm-linux-gnueabihf/libtinfo.so.5.9
-rw-r--r-- 1 root root 133744 Aug 22 19:40 libtinfo.so.5.9
WDMyCloud:~#

It looks like original /lib/arm-linux-gnueabihf/
Code: Select all
WDMyCloud:~# ls -ll /lib/arm-linux-gnueabihf/libc*
-rwxr-xr-x 1 root root 922896 Oct 19  2013 /lib/arm-linux-gnueabihf/libc-2.17.so
lrwxrwxrwx 1 root root     12 Oct 19  2013 /lib/arm-linux-gnueabihf/libc.so.6 -> libc-2.17.so
WDMyCloud:~#
WDMyCloud:~# ls -ll /lib/arm-linux-gnueabihf/libdl*
-rw-r--r-- 1 root root 67168 Oct 19  2013 /lib/arm-linux-gnueabihf/libdl-2.17.so
lrwxrwxrwx 1 root root    13 Oct 19  2013 /lib/arm-linux-gnueabihf/libdl.so.2 -> libdl-2.17.so
WDMyCloud:~#
WDMyCloud:~# ls -ll /lib/arm-linux-gnueabihf/libgcc*
-rw-r--r-- 1 root root 112712 Sep 26  2013 /lib/arm-linux-gnueabihf/libgcc_s.so.1
WDMyCloud:~#
WDMyCloud:~# ls -ll /lib/arm-linux-gnueabihf/libtinfo*
lrwxrwxrwx 1 root root     15 Nov  5  2014 /lib/arm-linux-gnueabihf/libtinfo.so.5 -> libtinfo.so.5.9
-rw-r--r-- 1 root root 133744 Sep 11  2013 /lib/arm-linux-gnueabihf/libtinfo.so.5.9
WDMyCloud:~#

And the same with ld-linux-armhf.so.3 original:
Code: Select all
WDMyCloud:~# ls -ll /lib/ld-linux-armhf.so.3
lrwxrwxrwx 1 root root 30 Oct 19  2013 /lib/ld-linux-armhf.so.3 -> arm-linux-gnueabihf/ld-2.17.so
WDMyCloud:~#

...and after I make a copy:
Code: Select all
WDMyCloud:~# ls -ll /chroot/lib/ld-linux-armhf.so.3
lrwxrwxrwx 1 root root 42 Aug 22 20:00 /chroot/lib/ld-linux-armhf.so.3 -> /chroot/lib/arm-linux-gnueabihf/ld-2.17.so
WDMyCloud:~#

After I restarted drive I still cannot run busybox:
Code: Select all
WDMyCloud:~# /chroot/bin/busybox
Killed
WDMyCloud:~#
matt_max
Donator VIP
Donator VIP
 
Posts: 124
Joined: Fri Apr 03, 2015 9:56 am
Location: Warsaw, Poland

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 14 guests