Sunday, December 27, 2020

Chapter 19 : Compile and Install Bash - Cross Compiling Temporary Tools

Hi,

In this chapter we are going to discuss on compiling and installing BASH package.

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

Before we unpack the package to compile and install, let us create a directory called bin and let the lfs user owns it.

$ cd /mnt/lfs
$ sudo mkdir bin
$ sudo chown lfs bin

Now change directory to sources and unpack the bash package.
$ tar -xvf bash-5.0-tar.gz

Changing directory to bin-5.0
$ cd bin-5.0

Prepare the bash for compilation.
$ ./configure --prefix=/usr                   \
            --build=$(support/config.guess) \
            --host=$LFS_TGT                 \
            --without-bash-malloc

Compile the package.
$ make -j4

Install the package.
$ make DESTDIR=$LFS install

Move the executable to bin directory created
$ mv $LFS/usr/bin/bash $LFS/bin/bash

Make a soft link to the executable for those programs which uses "sh"
$ ln -sv bash $LFS/bin/sh

You can also refer the explanation on compiling and installing bash at the below mentioned location.




3 comments:

How to change the root password in linux when it is forgotten/to change

This blog is all about changing the root password of the Linux system when it is forgotten or to reset the password...   Let's get it ...