LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-25-2017, 03:53 PM   #1
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Rep: Reputation: 89
About chroot'ing in Chapter 6 of Cross-Compiled LFS?


I am trying to get LFS 7.9 on a machine with an arm processor (armv5). Recently I have tried building this natively, but it seems that gcc cannot currently be built that way on arm due to some linking problem with in-tree gmp builds. Perhaps this is fixed with newer versions of gcc and gmp, but on this particular machine 1 SBU is about 43 minutes so I didn't hang around to verify. This led me to try cross-compiling (from BLFS 7.9 x86_64) in the sense of the book "Cross Compiled Linux From Scratch", Version 3.0.0-SYSVINIT. There is no arm book so I roughly referred to this and this for arm-specific things but tried to follow the syntax as close to the letter as possible as http://www.clfs.org/view/CLFS-3.0.0-...-64/index.html but using the versions found in LFS 7.9 (which were usually only marginally newer).

Once in Chapter 6, there are two ways to proceed to building the final system, either to boot or to chroot. Of course chrooting from an x86_64 to arm is out of the question. So I made a tar archive "cd /media/clfs && tar cvfp archive.tar ./*" etc., extracted it on another drive, and mounted it on the arm machine to the same mount point as was built on my build machine.

However I cannot chroot. I have also replicated all of the environment variables from the build laptop onto the arm machine Is this to be expected?

Code:
root@arm-server:~# ldd /tools/bin/env
        libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6d88000)
        /lib/ld-linux.so.3 (0xb6ed1000)
Code:
root@arm-server:~# chroot $CLFS /tools/bin/env -i /bin/bash                         
chroot: failed to run command '/tools/bin/env': No such file or directory
I have seen other similar problems when gcc spec adjustments were not made. I did do this part in Chapter 6 gcc. I am using gcc 5.3 if that matters. Any suggestions?
 
Old 08-26-2017, 03:10 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
I have never tried anything like this but here are a couple of questions/observations.

Quote:
Originally Posted by ordealbyfire83 View Post
... and mounted it on the arm machine to the same mount point as was built on my build machine.
What is the mount point on the arm? And what does $CLFS contain?

Quote:
root@arm-server:~# ldd /tools/bin/env
It looks to me like /tools/bin is mounted under / or you are already chroot'ed.

What is the result of:
Code:
# chroot $CLFS 
# ls -l
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem ssh'ing into Cross LFS on Raspberry Pi Keith Hedger Linux From Scratch 5 01-05-2013 05:43 AM
[SOLVED] LFS 7.2 Chapter 6.4 Chroot Environment Error raza.ajmi Linux From Scratch 11 12-14-2012 01:34 AM
[SOLVED] LFS 7.2, chapter 5., section 5.4.1 Installation of Cross Binutils Lakhan Kumar Linux From Scratch 7 11-12-2012 04:22 PM
LFS 6 Chapter 6.3 chroot error gatblast45 Linux From Scratch 8 01-01-2008 03:12 AM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration