Alexey Orishko | 17 Feb 17:26 2014
Picon

Re: Mounting Kernel Filesystems

On Mon, Feb 17, 2014 at 7:05 AM, Chris Staub <chris <at> beaker67.com> wrote:
> Looks like you didn't chown the /tools and /cross-tools directory to root.
>
no cross tools mentioned in chapter 8.5 Entering the Chroot Environment (CLFS):
chroot "${CLFS}" /tools/bin/env -i \
    HOME=/root TERM="${TERM}" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h

/alexey
Alexey Orishko | 17 Feb 01:40 2014
Picon

Mounting Kernel Filesystems

Hi guys,

I'm doing chroot CLFS 2.1.0 x86 variant and I need a clarification in
the chapter 8.10.1 for two mount commands:
mount -vt devpts -o gid=5,mode=620 none /dev/pts
mount -vt tmpfs none /dev/shm

Am I supposed to run them in chroot environment or would it be
sufficient to do similar commands in 8.3 executed as host's root user?

While doing them in chroot I got an error:
chroot. root:/$ id
uid=0(root) gid=0(root) groups=0(root)
chroot. root:/$ mount -vt tmpfs none /dev/shm
mount: only root can use "--types" option (effective UID is 2xxx)

where 2xxx is the UID of the local clfs user on host system.
How could clfs user be involved?

Regards,
Alexey
Alexey Orishko | 16 Feb 22:24 2014
Picon

CLFS eudev vs LFS udev

Hi guys,

I have an old LFS 6.3 system I'm going to upgrade.
I've noticed that LFS-7.4 and CLFS 2.1.0 have two different udev variants.

A few questions related to that:
- Will CLFS and LFS go different ways in package selection? (udev in particular)
- Which one udev variant CLFS Eudev-1.3 or LFS Udev-206 (Extracted
from systemd-206)
  would you recommend?
  I'm aiming at minimum changes needed while moving from legacy udev.

Regards,
Alexey
Sela Selah | 13 Feb 13:59 2014

issue about gcc and e2fsprogs

In chapter 6.10, after modify the Makefile by sed:

If xxxLIBS & xxxINC = /tools/, make will results the header error.

If xxxLIBS & xxxINC = /cross-tools/, make will results the wrong lib format error.

Only xxxLIBS = /tools/ && xxxINC=/cross-tools/, the compiling could complete.

This issue I had meet ever. Now I do the compiling in a new platform (hardware and os), the same issue remains.

 

In chapter 7.7

The compiling results error: conflict type.

in the build/lib/ext2fs/ext2_type.h, the _u64 typedef with unsigned long long,

but in the kernel header, the _u64 typedef with unsigned long.

The type _s64 has similar comfliction

Maybe it’s a e2fsprogs bug:

In file root/lib/ext2fs/ext2_types.h.in

Line 89, the comment about SIZEOF_LONG_LONG/SIZEOF_LONG is *NOT* consists with the if-else branch:

#ifdef __U64_TYPEDEF

typedef __U64_TYPEDEF __u64;

#else

#if ( <at> SIZEOF_INT <at> == 8)

typedef unsigned int        __u64;

#else

#if ( <at> SIZEOF_LONG_LONG <at> == 8) // < ------- should long branch

typedef unsigned long long      __u64;

#else

#if ( <at> SIZEOF_LONG <at> == 8)

typedef unsigned long     __u64;  // < ------- should long long branch

#endif /* SIZEOF_LONG_LONG == 8 */

#endif /* SIZEOF_LONG == 8 */

#endif /* SIZEOF_INT == 8 */

#endif /* __U64_TYPEDEF */

 

#ifdef __S64_TYPEDEF

typedef __S64_TYPEDEF __s64;

#else

#if ( <at> SIZEOF_INT <at> == 8)

typedef int                 __s64;

#else

#if ( <at> SIZEOF_LONG_LONG <at> == 8)

#if defined(__GNUC__)    // < --------------- should long branch

typedef __signed__ long long __s64;

#else

typedef signed long long __s64;

#endif /* __GNUC__ */

#else

#if ( <at> SIZEOF_LONG <at> == 8)

typedef long              __s64; // < ------------ should long long branch

#endif /* SIZEOF_LONG_LONG == 8 */

#endif /* SIZEOF_LONG == 8 */

#endif /* SIZEOF_INT == 8 */

#endif /* __S64_TYPEDEF */

 

After I exchange the inconsist branches, all things work fine.

 

_______________________________________________
Clfs-support mailing list
Clfs-support <at> lists.cross-lfs.org
http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org
Alexey Orishko | 12 Feb 20:57 2014
Picon

Test failed for 10.7. EGLIBC-2.18

Hi all,

I'm building i686-pc-linux-gnu-gcc target on Ubuntu 64-bit (intel).
While running test suite for EGLIBC ch.10.7 I've got some errors:
....
make[2]: Leaving directory `/sources/eglibc-2.18/elf'
scripts/check-c++-types.sh sysdeps/unix/sysv/linux/i386/nptl/c++-types.data g++
-march=i686
...
      > /sources/eglibc-build/c++-types-check.out
AWK='gawk' scripts/check-local-headers.sh \
  "/usr/include" "/sources/eglibc-build/" >
/sources/eglibc-build/check-local-headers.out
/usr/bin/perl scripts/begin-end-check.pl argp/argp.h assert/assert.h
...
wctype/wctype.h > /sources/eglibc-build/begin-end-check.out
make[1]: Target `check' not remade because of errors.
make[1]: Leaving directory `/sources/eglibc-2.18'
make: *** [check] Error 2
make[2]: *** [/sources/eglibc-build/posix/tst-getaddrinfo4.out] Error 1
make[2]: [/sources/eglibc-build/posix/annexc.out] Error 1 (ignored)
make[1]: *** [posix/tests] Error 2
make[2]: [/sources/eglibc-build/conform/run-conformtest.out] Error 1 (ignored)
make[2]: *** [/sources/eglibc-build/debug/tst-backtrace6.out] Error 1
make[1]: *** [debug/tests] Error 2
make: *** [check] Error 2

posix/annexc.out has a lot of messages:
Tested files:
=== aio.h ===
*  invalid macro `SIGEV_THREAD_ID'
*  invalid macro `sigev_notify_function'
*  invalid macro `sigev_notify_attributes'
** macro `FD_CLOEXEC' not defined
** macro `F_DUPFD' not defined
....
=== dirent.h ===
*  invalid macro `d_fileno'
=== errno.h ===
=== fcntl.h ===
*  invalid macro `F_EXLCK'
=== limits.h ===
*  invalid macro `SSIZE_MAX'
*  invalid macro `XATTR_SIZE_MAX'
*  invalid macro `HOST_NAME_MAX'
...

I'm building clfs exactly as book says for x86 on x86_64, so should I really
worry about these negative test results or simply ignore them?

Regards,
Alexey
thomas kaeding | 12 Feb 02:30 2014
Picon

typos+

These refer to git-20140202, x86_64 multilib

1.  sec 10.37: the patch makes 'make get' unnecessary

2.  sec 10.36:  "check" is missing from "make NON_ROOT_USERNAME=dummy"

3.  sec 10.26 & 27:  the symlinks and includes make an
     infinite loop involving libcurses.so & libcursesw.so
thomas kaeding | 10 Feb 06:02 2014
Picon

final gcc build failing in git-20140202 x86_64 multilib

Help!

final gcc build failing in git-20140202 x86_64 multilib in section 10.23

configure: error: in `/sources/gcc-build/x86_64-unknown-linux-gnu/32/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
Makefile:14626: recipe for target 'configure-stage1-target-libgcc' failed
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory '/sources/gcc-build'
Makefile:18767: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/sources/gcc-build'
Makefile:885: recipe for target 'all' failed
make: *** [all] Error 2

even after doing `ln -s /tools/bin/cpp /lib/' and rerunning the configuration:

In file included from /usr/include/features.h:388:0,
                 from /usr/include/stdio.h:27,
                 from ../../../../gcc-4.8.2/libgcc/../gcc/tsystem.h:87,
                 from ../../../../gcc-4.8.2/libgcc/libgcc2.c:27:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such
file or directory
 # include <gnu/stubs-32.h>
                           ^
compilation terminated.
Makefile:460: recipe for target '_muldi3.o' failed
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory
'/sources/gcc-build/x86_64-unknown-linux-gnu/32/libgcc'
Makefile:1104: recipe for target 'multi-do' failed
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory '/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
Makefile:113: recipe for target 'all-multi' failed
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory '/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
Makefile:14905: recipe for target 'all-stage1-target-libgcc' failed
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/sources/gcc-build'
Makefile:18767: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/sources/gcc-build'
Makefile:885: recipe for target 'all' failed
make: *** [all] Error 2
Alexey Orishko | 9 Feb 16:21 2014
Picon

Errata for CLFS 2.1.0

Hi Guys,

I have a couple of questions regarding errata for CLFS 2.1

1. While reading ch.8.2 and errata "Boot and Chroot method Util-Linux"
" ..Hosts with Pkg-config installed Add PKG_CONFIG= before ./configure
PKG_CONFIG= ./configure ... "

I'm a bit confused about errata meaning. Having space after equal sign and
no `` signs, what are we supposed to do in bash with PKG_CONFIG env var?

2. In 8.4.1 it was suggested to extract the "Automake-1.12.4" tarball and cd
into the created directory. Then execute the following to see what the
detected target triplet is by config.guess:
build-aux/config.guess

Well, I don't see build-aux in extracted tar ball.
After extracting tar ball and cd into extracted dir I found
./lib/config.guess

Should command in ch. 8.4.1 be corrected?

Regards,
Alexey
Kevyn-Alexandre Paré | 7 Feb 01:25 2014

Fwd: CLFS support

FWI

---------- Forwarded message ----------
From: Kevyn-Alexandre Paré <kapare <at> rogue-research.com>
Date: Thu, Feb 6, 2014 at 6:54 PM
Subject: Re: [Clfs-support] CLFS support
To: Andrew Bradford <andrew <at> bradfordembedded.com>

Andrew,

On Thu, Feb 6, 2014 at 2:17 PM, Andrew Bradford
<andrew <at> bradfordembedded.com> wrote:
> On 02/06/2014 02:08 PM, Kevyn-Alexandre Paré wrote:
>
>> no symlink for /lib/ld-musl-armhf.so.1 in the target. When this
>> symlink is suppose to be created?
>
> In section 4.8 (musl-libc), the 'make install' should create it for you
> properly as long as you're using DESTDIR as specified in the book.
>

Here what I'm using in my script:
CC=${CLFS_TARGET}-gcc ./configure \
  --prefix=/ \
  --target=${CLFS_TARGET}
CC=${CLFS_TARGET}-gcc make
DESTDIR=${CLFS}/cross-tools/${CLFS_TARGET} make install

> So long as you're using a book newer than 20131023, this should work.
> Books prior to 20131023 which were musl based required a manual creation
> of this symlink due to incorrect 'make install' instructions for the way
> musl's install works.

I'm using your git repo directly:

Version GIT-20131024-arm

thx

-KA
Andrew Bradford | 6 Feb 20:17 2014

Re: CLFS support

On 02/06/2014 02:08 PM, Kevyn-Alexandre Paré wrote:

> no symlink for /lib/ld-musl-armhf.so.1 in the target. When this
> symlink is suppose to be created?

In section 4.8 (musl-libc), the 'make install' should create it for you
properly as long as you're using DESTDIR as specified in the book.

So long as you're using a book newer than 20131023, this should work.
Books prior to 20131023 which were musl based required a manual creation
of this symlink due to incorrect 'make install' instructions for the way
musl's install works.

-Andrew
Kevyn-Alexandre Paré | 6 Feb 17:04 2014

CLFS support

Trying to boot my board with the CLFS procedure and I'm stuck at
init/main.c : Kernel panic - not syncing: No init found.

Here my kernel parameters:

[    0.000000] Kernel command line: console=ttyO2,115200n8
init=/sbin/init debug mpurate=500 vram=12M
omapfb.mode=lcd43:480x272MR-24 <at> 60 omapdss.def_disp=lcd43
root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

Here we see the problem is that kernel_execve return code: -2 ?

[    4.784484] EXT3-fs (mmcblk0p2): using internal journal
[    4.790039] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    4.798065] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    4.810119] devtmpfs: mounted
[    4.814239] Freeing init memory: 232K
[    4.818115] [KA]: args_init[0]: (null)
[    4.835113] usb 1-2.2: skipped 1 descriptor after interface
[    4.841217] usb 1-2.2: skipped 1 descriptor after interface
[    4.851226] usb 1-2.2: default language 0x0409
[    4.856445] [KA]: kernel_execve return code: -2
[    4.861602] Failed to execute /sbin/init.  Attempting defaults...
[    4.878021] usb 1-2.2: udev 3, busnum 1, minor = 2
[    4.883087] usb 1-2.2: New USB device found, idVendor=05ac, idProduct=0220
[    4.891632] [KA]: kernel_execve return code: -2
[    4.905212] usb 1-2.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[    4.913513] usb 1-2.2: Product: Apple Keyboard
[    4.918945] usb 1-2.2: Manufacturer: Apple, Inc
[    4.924072] [KA]: kernel_execve return code: -2
[    4.939453] usb 1-2.2: usb_probe_device
[    4.943511] usb 1-2.2: configuration #1 chosen from 1 choice
[    4.949768] [KA]: kernel_execve return code: -2
[    4.963806] usb 1-2.2: adding 1-2.2:1.0 (config #1, interface 0)
[    4.971282] usbtest 1-2.2:1.0: usb_probe_interface
[    4.977386] [KA]: kernel_execve return code: -2
[    4.982421] usbtest 1-2.2:1.0: usb_probe_interface - got id
[    4.988708] Kernel panic - not syncing: No init found.  Try passing
init= option to kernel. See Linux Documentation/init.txt for guidance.

I see that /sbin/init exist have right permissions:
knight <at> knight:/media/sdc/rootfs$ ls -al sbin/init
lrwxrwxrwx 1 root root 14 Feb  4 14:50 sbin/init -> ../bin/busybox
knight <at> knight:/media/sdc/rootfs$ ls -al bin/busybox
-rwxr-xr-x 1 root root 879500 Feb  4 14:50 bin/busybox
file bin/busybox
bin/busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), stripped
file ./lib/libc.so
./lib/libc.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV),
dynamically linked, not stripped

Any recommendation ?

BR,

-KA

Gmane