On 15/10/14 0:54, Bruce Dubbs wrote:
> No.  There is no arch/x86_64 directory, even on a 64-bit system in the
> standard LFS build.  Also, if it were the problem, you wouldn't have
> gotten far enough to to get it to search for /sbin/init (unless it is
> a 32-bit kernel).  I'm not sure about CLFS though.
>

The CLFS instructions refer to an arch/x86_64 directory, and it looks
like I must have created one, judging by the scripts I used.

Within the 32-bit system, I just compiled a kernel, and (as you said),
there is no arch/x86_64 directory, just arch/x86.  My build scripts copy
the .config file (renamed) to the /boot directory, and I just had a look
at the .config file from my attempt at a 64-bit build, and, there it is,
about line 5 of the .config file, the 64-bit option is not set.

So it looks like it is possible to build a 32-bit kernel from within a
64-bit system, and it also looks like that's what I did :(

I tried to recompile with the 64-bit option set, from within my 32-bit
system, and that produced an error.  So it looks to me like 64-bits can
build 32-bits, but 32-bits can't build 64-bits.  (I did check multiple
times during the build of my partial CLFS that I really was building a
64-bit system, and "uname" told me I was.  Just as a double-check, the
executables from my 64-bit build don't work when I try to execute them
from within my 32-bit system.)

So I guess I have to figure out how to cross-compile the kernel only, or
rebuild my partial 64-bit CLFS, so I can then build a 64-bit kernel.

> No. You have to start with the architecture you are running with.  You
> probably want to divide up the partition so you have extra space, but
> you didn't list your partitioning so we can't give a good recommendation.
>

I have one quite large ext4 partition, which has my 32-bit LFS.  There
is also a much smaller ext4 partition, which is big enough to hold a
working LFS, but may not be big enough to compile one (about 60% full
with a bare-bones LFS in it).  This smaller partition currently has my
non-functioning attempt at a 64-bit build.

So if I can't figure out how to cross-compile a 64-bit kernel from
within the 32-bit system, I guess I'll have to tar up the broken 64-bit
system, build a 64-bit partial CLFS in the smaller partition (again),
and compile a 64-bit kernel in that partition.  (Or just pinch the CLFS
kernel.)  Then tar the CLFS system up, move the tar file to the big ext4
partition, and untar the broken 64-bit LFS into the smaller partition,
move the newly compiled and hopefully working kernel into that
partition, and see whether it boots.

I'm really wishing I hadn't accidentally deleted my tarred up half-CLFS :(

OK, thanks for the advice.  Unfortunately not physically present with
the machine for another week.  I'd like to chroot into the 64-bit
system, and build DHCP, openssl, and openssh, but the chroot doesn't
work, since it is a different architecture than the currently
functioning system . . .

Thanks again.

РК
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to