From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15015 invoked by alias); 5 Jan 2017 03:34:23 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 14988 invoked by uid 89); 5 Jan 2017 03:34:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=kennedy, HOST, applets, gnueabihf X-HELO: mx2.elta.co.il Received: from mx2.elta.co.il (HELO mx2.elta.co.il) (199.203.121.22) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Jan 2017 03:34:12 +0000 Received: from mailrelay.elta.co.il (Unknown_Domain [172.16.0.52]) (using TLS with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx2.elta.co.il (;-)) with SMTP id 99.B1.38548.FAEBD685; Thu, 5 Jan 2017 05:34:08 +0200 (IST) Received: from eltidex2.elta.co.il ([fe80::15bc:5498:6e1b:bc2]) by eltihex1.elta.co.il ([fe80::8c04:5572:2959:566b%14]) with mapi id 14.03.0319.002; Thu, 5 Jan 2017 05:34:06 +0200 From: Vered Zvi To: ANDY KENNEDY , "crossgcc@sourceware.org" Subject: RE: ldd for busybox compiled for arm Date: Thu, 05 Jan 2017 03:34:00 -0000 Message-ID: <1EFFBDE6584C794F8A0ADF2CAC8D60E09F90A548@eltidex2.elta.co.il> References: <1EFFBDE6584C794F8A0ADF2CAC8D60E09F909C3C@eltidex2.elta.co.il>, In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00002.txt.bz2 Hi Andy, Thank you for the detailed reply. On the host I ran: cross-compile-ldd /mydir/boot/rootfs/bin/sh and got: libm.so.6 =3D> /lib/libm.so.6 (0xdeadbeef) libc.so.6 =3D> /lib/libc.so.6 (0xdeadbeef) ld-linux-armhf.so.3 =3D> /lib/ld-linux-armhf.so.3 (0xdeadbeef) same result for: cross-compile-ldd /mydir/boot/rootfs/sbin/init I double checked that libm.so.6, libc.so.6 are in /lib On the host I ran: file /mydir/boot/roots/bin/busybox and got: /mydir//boot/rootfs/bin/busybox: ELF 64-bit LSB executable, x86-64, version= 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, Bui= ldID[sha1]=3Dfc40d0187472069db3da93db4b30f9df92a75bbd, stripped Does it make sense ? On the host I tried to run /mydir/boot/rootfs/bin/ls. It runs like the reguar host's ls Does it make sense ? I checked: ./arm-cortex_a15-linux-gnueabihf-gcc -v and got: COLLECT_GCC=3D./arm-cortex_a15-linux-gnueabihf-gcc ... Target: arm-cortex_a15-linux-gnueabihf Using genext2fs I created a ram disk image from the folder that contains: /boot /bin/ /sbin/ /usr ..... Upon boot the kernel displays the following error: /sbin/init exists but couldn't execute it (error -8) /bin/sh exists but couldn't execute it (error -8) Can you tell what can cause this error ? Is it possible that the ramdisk image is not propery created ? Best regards, Z.V ________________________________________ From: ANDY KENNEDY [ANDY.KENNEDY@adtran.com] Sent: Wednesday, January 04, 2017 10:18 PM To: Vered Zvi; crossgcc@sourceware.org Subject: RE: ldd for busybox compiled for arm > -----Original Message----- > From: crossgcc-owner@sourceware.org [mailto:crossgcc-owner@sourceware.org= ] On Behalf Of Vered Zvi > Sent: Tuesday, January 03, 2017 3:49 PM > To: crossgcc@sourceware.org > Subject: ldd for busybox compiled for arm > > > Hello, Hi Vered! > > Using crosstool-ng 1.22.0 I created a toolchain for: arm-cortex_a15-linu= x-gnueabi > The host is Centos 7.2.1511 (64) > > Using this toolchain I compiled busybox. > make ARCH=3Darm CROSS_COMPILE=3D../../../../toolchain/crosstool/release/b= in/arm-cortex_a15-linux- > gnueabihf- defconfig > make ARCH=3Darm CROSS_COMPILE=3D../../../../toolchain/crosstool/release/b= in/arm-cortex_a15-linux- > gnueabihf- After doing this, you should have ended up with two files in the local directory: busybox busybox_unstripped. What does "file" return to you for these two files. > > Is it possible to use ldd from this toolchain to find out the dependencie= s for /bin/sh , /sbin/init > ? > > Strange: both /bin/sh, /sbin/init run under x86. I would hope that to be the case. /bin/sh on the HOST should not have been altered by the above steps. Now, if you mean that you attempted to run these two commands on the target, this is different. On target, you may have to run 'busybox install' to correctly configure the system with the appropriate links. The file /bin/busybox on TARGET should be your NEW busybox prior to executing the install. If you cannot execute your freshly built busybox on the system (busybox without options will display the built-ins applets for busybox), you may have linking issues. The trick there is that you would many of the libs that come with the toolchain before this will work. If you are looking to build a system without libraries, I suggest that you use BuildRoot with an internal toolchain to build your busybox statically. > How it is possible ? > They were compiled for ARM. > > Thank you, > Z.V HTH! Andy The information contained in this communication is proprietary to Israel Ae= rospace Industries Ltd. and/or third parties, may contain confidential or p= rivileged information, and is intended only for the use of the intended add= ressee thereof. If you are not the intended addressee, please be aware that= any use, disclosure, distribution and/or copying of this communication is = strictly prohibited. If you receive this communication in error, please not= ify the sender immediately and delete it from your computer.