Sunday, December 27, 2020

Chapter 20 : Compile and Install CoreUtils - Cross Compiling Temporary Tools

Hi,
In this chapter we are going to compile and install coreutils package.

Note :
- Please check the version of the package when you compile and install, at the time of writing the package was at version 8.32
- You should be logged in as lfs user, when you perform the actions described here.
- Change directory to the sources folder (/mnt/lfs/sources)

Unpacking the coreutils package
$ tar -xvf coreutils-8.32.tar.xz

Change directory
$ cd coreutils-8.32

Preparing for compilation.
$ ./configure --prefix=/usr                     \
            --host=$LFS_TGT                   \
            --build=$(build-aux/config.guess) \
            --enable-install-program=hostname \
            --enable-no-install-program=kill,uptime

Compiling Coreutils.
$ make -j4

Installing Coreutils.
$ make DESTDIR=$LFS install

Move programs to their final expected locations
$ mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin
$ mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm}        $LFS/bin
$ mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname}               $LFS/bin
$ mv -v $LFS/usr/bin/{head,nice,sleep,touch}                    $LFS/bin
$ mv -v $LFS/usr/bin/chroot                                     $LFS/usr/sbin
$ mkdir -pv $LFS/usr/share/man/man8
$ mv -v $LFS/usr/share/man/man1/chroot.1                        $LFS/usr/share/man/man8/chroot.8
$ sed -i 's/"1"/"8"/'                                           $LFS/usr/share/man/man8/chroot.8


You can refer the following link for detailed explanation.



No comments:

Post a Comment

Addressing Modes of 8080 / 8085 MicroProcessor

Hi,   In this post I am going to talk about different addressing modes of 8080/8085...without much talking let us get into the topic.   Ther...