Update build-2.sh
This commit is contained in:
parent
0ea74861a7
commit
1c6fb12408
@ -2,6 +2,9 @@
|
||||
# Everest Linux 1.0.0-busybox - Stage 2 Installation Script
|
||||
# This program is free software: See the GNU GPL v3.0 for details
|
||||
|
||||
printf "[ !!! ] WARNING! DO NOT RUN THIS SCRIPT AS ROOT!\n"
|
||||
printf "[ i ] Starting in 10 seconds.\n"
|
||||
sleep 10
|
||||
printf "[ i ] Starting stage 2 installation...\n"
|
||||
sleep 0.5
|
||||
|
||||
@ -46,10 +49,10 @@ printf "[ i ] Creating sysroot directory...\n"
|
||||
|
||||
printf "[ i ] Moving tarballs to cross-tools directory...\n"
|
||||
cd /home/everest/everest-install/scripts/tempfiles
|
||||
mv -rv * $EVEREST/cross-tools
|
||||
mv -rv * $EVEREST/sources
|
||||
|
||||
printf "[ i ] Preparing to build initial toolchain...\n"
|
||||
cd $EVEREST/cross-tools
|
||||
cd $EVEREST/sources
|
||||
|
||||
printf "[ i ] Starting build of >>> Linux-Headers-4.9.22 <<<\n"
|
||||
sleep 3
|
||||
@ -178,3 +181,75 @@ printf "[ i ] Setting toolchain variables...\n"
|
||||
echo export STRIP=\""${EVEREST_TARGET}-strip\"" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
printf "[ i ] Starting build of system...\n"
|
||||
sleep 3
|
||||
|
||||
printf "[ i ] Creating system directories...\n"
|
||||
mkdir -pv ${EVEREST}/targetfs/{bin,boot,dev,etc,home,lib/{firmware,modules}}
|
||||
mkdir -pv ${EVEREST}/targetfs/{mnt,opt,proc,sbin,srv,sys}
|
||||
mkdir -pv ${EVEREST}/targetfs/var/{cache,lib,local,lock,log,opt,run,spool}
|
||||
install -dv -m 0750 ${EVEREST}/targetfs/root
|
||||
install -dv -m 1777 ${EVEREST}/targetfs/{var/,}tmp
|
||||
mkdir -pv ${EVEREST}/targetfs/usr/{,local/}{bin,include,lib,sbin,share,src}
|
||||
ln -svf ../proc/mounts ${EVEREST}/targetfs/etc/mtab
|
||||
cat > ${EVEREST}/targetfs/etc/passwd << "EOF"
|
||||
root::0:0:root:/root:/bin/ash
|
||||
EOF
|
||||
cat > ${CLFS}/targetfs/etc/group << "EOF"
|
||||
root:x:0:
|
||||
bin:x:1:
|
||||
sys:x:2:
|
||||
kmem:x:3:
|
||||
tty:x:4:
|
||||
tape:x:5:
|
||||
daemon:x:6:
|
||||
floppy:x:7:
|
||||
disk:x:8:
|
||||
lp:x:9:
|
||||
dialout:x:10:
|
||||
audio:x:11:
|
||||
video:x:12:
|
||||
utmp:x:13:
|
||||
usb:x:14:
|
||||
cdrom:x:15:
|
||||
EOF
|
||||
touch ${EVEREST}/targetfs/var/log/lastlog
|
||||
chmod -v 664 ${EVEREST}/targetfs/var/log/lastlog
|
||||
|
||||
printf "[ i ] Starting build of >>> libgcc-6.2.0 <<<\n"
|
||||
cp -v ${EVEREST}/cross-tools/${EVEREST_TARGET}/lib/libgcc_s.so.1 ${EVEREST}/targetfs/lib/
|
||||
${EVEREST_TARGET}-strip ${EVEREST}/targetfs/lib/libgcc_s.so.1
|
||||
printf "[ i ] Finished build of >>> libgcc-6.2.0 <<<\n"
|
||||
sleep 1
|
||||
|
||||
printf "[ i ] Starting build of >>> musl-1.1.16 <<<\n"
|
||||
rm -rf musl-1.1.16
|
||||
tar -xvf musl-1.1.16.tar.gz
|
||||
cd musl-1.1.16
|
||||
./configure \
|
||||
CROSS_COMPILE=${EVEREST_TARGET}- \
|
||||
--prefix=/ \
|
||||
--disable-static \
|
||||
--target=${EVEREST_TARGET}
|
||||
make
|
||||
DESTDIR=${EVEREST}/targetfs make install-libs
|
||||
cd ..
|
||||
printf "[ i ] Finished build of >>> musl-1.1.16 <<<\n"
|
||||
sleep 1
|
||||
|
||||
printf "[ i ] Starting build of >>> busybox-1.24.2 <<<\n"
|
||||
tar -xvf busybox-1.24.2.tar.bz2
|
||||
cd busybox-1.24.2
|
||||
make distclean
|
||||
make ARCH="${EVEREST_ARCH}" defconfig
|
||||
sed -i 's/\(CONFIG_\)\(.*\)\(INETD\)\(.*\)=y/# \1\2\3\4 is not set/g' .config
|
||||
sed -i 's/\(CONFIG_IFPLUGD\)=y/# \1 is not set/' .config
|
||||
sed -i 's/\(CONFIG_FEATURE_WTMP\)=y/# \1 is not set/' .config
|
||||
sed -i 's/\(CONFIG_FEATURE_UTMP\)=y/# \1 is not set/' .config
|
||||
sed -i 's/\(CONFIG_UDPSVD\)=y/# \1 is not set/' .config
|
||||
sed -i 's/\(CONFIG_TCPSVD\)=y/# \1 is not set/' .config
|
||||
make ARCH="${EVEREST_ARCH}" CROSS_COMPILE="${EVEREST_TARGET}-"
|
||||
make ARCH="${EVEREST_ARCH}" CROSS_COMPILE="${EVEREST_TARGET}-"\
|
||||
CONFIG_PREFIX="${EVEREST}/targetfs" install
|
||||
cp -v examples/depmod.pl ${EVEREST}/cross-tools/bin
|
||||
chmod -v 755 ${EVEREST}/cross-tools/bin/depmod.pl
|
||||
|
Loading…
Reference in New Issue
Block a user