aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootstrap.sh66
1 files changed, 33 insertions, 33 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index f9614f8..138e85c 100644
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -10,7 +10,7 @@ cd ${MELVIX}
export LC_ALL=POSIX
export PATH=${MELVIX}/cross-tools/bin:/bin:/usr/bin
-mkdir -pv ${MELVIX}/sources
+mkdir -p ${MELVIX}/sources
cd ${MELVIX}/sources
curl -SL "http://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz" | tar xJ
curl -SL "https://busybox.net/downloads/busybox-1.31.0.tar.bz2" | tar xj
@@ -24,28 +24,28 @@ curl -SL "http://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz" | tar xJ
curl -SL "https://www.zlib.net/zlib-1.2.11.tar.xz" | tar xJ
cd ${MELVIX}
-mkdir -pv ${MELVIX}/{bin,boot{,grub},dev,{etc/,}opt,home,lib/{firmware,modules},lib64,mnt}
-mkdir -pv ${MELVIX}/{proc,media/{floppy,cdrom},sbin,srv,sys}
-mkdir -pv ${MELVIX}/var/{lock,log,mail,run,spool}
-mkdir -pv ${MELVIX}/var/{opt,cache,lib/{misc,locate},local}
-install -dv -m 0750 ${MELVIX}/root
-install -dv -m 1777 ${MELVIX}{/var,}/tmp
-install -dv ${MELVIX}/etc/init.d
-mkdir -pv ${MELVIX}/usr/{,local/}{bin,include,lib{,64},sbin,src}
-mkdir -pv ${MELVIX}/usr/{,local/}share/{doc,info,locale,man}
-mkdir -pv ${MELVIX}/usr/{,local/}share/{misc,terminfo,zoneinfo}
-mkdir -pv ${MELVIX}/usr/{,local/}share/man/man{1,2,3,4,5,6,7,8}
+mkdir -p ${MELVIX}/{bin,boot{,grub},dev,{etc/,}opt,home,lib/{firmware,modules},lib64,mnt}
+mkdir -p ${MELVIX}/{proc,media/{floppy,cdrom},sbin,srv,sys}
+mkdir -p ${MELVIX}/var/{lock,log,mail,run,spool}
+mkdir -p ${MELVIX}/var/{opt,cache,lib/{misc,locate},local}
+install -d -m 0750 ${MELVIX}/root
+install -d -m 1777 ${MELVIX}{/var,}/tmp
+install -d ${MELVIX}/etc/init.d
+mkdir -p ${MELVIX}/usr/{,local/}{bin,include,lib{,64},sbin,src}
+mkdir -p ${MELVIX}/usr/{,local/}share/{doc,info,locale,man}
+mkdir -p ${MELVIX}/usr/{,local/}share/{misc,terminfo,zoneinfo}
+mkdir -p ${MELVIX}/usr/{,local/}share/man/man{1,2,3,4,5,6,7,8}
for dir in ${MELVIX}/usr{,/local}; do
- ln -sv share/{man,doc,info} ${dir}
+ ln -s share/{man,doc,info} ${dir}
done
-install -dv ${MELVIX}/cross-tools{,/bin}
-ln -svf /proc/mounts ${MELVIX}/etc/mtab
+install -d ${MELVIX}/cross-tools{,/bin}
+ln -sf /proc/mounts ${MELVIX}/etc/mtab
echo "melvix" > ${MELVIX}/etc/HOSTNAME
touch ${MELVIX}/var/run/utmp ${MELVIX}/var/log/{btmp,lastlog,wtmp}
-chmod -v 664 ${MELVIX}/var/run/utmp ${MELVIX}/var/log/lastlog
+chmod 664 ${MELVIX}/var/run/utmp ${MELVIX}/var/log/lastlog
unset CFLAGS
unset CXXFLAGS
@@ -59,15 +59,15 @@ cd ${MELVIX}/sources/linux-5.1/
make mrproper
make ARCH=${MELVIX_ARCH} headers_check
make ARCH=${MELVIX_ARCH} INSTALL_HDR_PATH=dest headers_install
-cp -rv dest/include/* ${MELVIX}/usr/include
+cp -r dest/include/* ${MELVIX}/usr/include
mkdir ${MELVIX}/sources/binutils-build/
cd ${MELVIX}/sources/binutils-build/
../binutils-2.32/configure --prefix=${MELVIX}/cross-tools --target=${MELVIX_TARGET} --with-sysroot=${MELVIX} --disable-nls --enable-shared --disable-multilib
make configure-host && make
-ln -sv lib ${MELVIX}/cross-tools/lib64
+ln -s lib ${MELVIX}/cross-tools/lib64
make install
-cp -v ../binutils-2.32/include/libiberty.h ${MELVIX}/usr/include
+cp ../binutils-2.32/include/libiberty.h ${MELVIX}/usr/include
cd ${MELVIX}/sources/
mv gmp-6.1.2 gcc-9.1.0/gmp/
@@ -89,7 +89,7 @@ AR=ar LDFLAGS="-Wl,-rpath,${MELVIX}/cross-tools/lib" \
--disable-multilib --with-arch=${MELVIX_CPU}
make all-gcc all-target-libgcc
make install-gcc install-target-libgcc
-ln -vs libgcc.a `${MELVIX_TARGET}-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`
+ln -s libgcc.a `${MELVIX_TARGET}-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`
mkdir ${MELVIX}/sources/glibc-build
cd ${MELVIX}/sources/glibc-build
@@ -122,7 +122,7 @@ AR=ar LDFLAGS="-Wl,-rpath,${MELVIX}/cross-tools/lib" \
--with-mpfr-lib=$(pwd)/mpfr/src/.libs \
--disable-multilib --with-arch=${MELVIX_CPU}
make && make install
-cp -v ${MELVIX}/cross-tools/${MELVIX_TARGET}/lib64/libgcc_s.so.1 ${MELVIX}/lib64
+cp ${MELVIX}/cross-tools/${MELVIX_TARGET}/lib64/libgcc_s.so.1 ${MELVIX}/lib64
export CC="${MELVIX_TARGET}-gcc"
export CXX="${MELVIX_TARGET}-g++"
export CPP="${MELVIX_TARGET}-gcc -E"
@@ -138,7 +138,7 @@ make CROSS_COMPILE="${MELVIX_TARGET}-" defconfig
# make CROSS_COMPILE="${MELVIX_TARGET}-" menuconfig
make CROSS_COMPILE="${MELVIX_TARGET}-"
make CROSS_COMPILE="${MELVIX_TARGET}-" CONFIG_PREFIX="${MELVIX}" install
-cp -v examples/depmod.pl ${MELVIX}/cross-tools/bin
+cp examples/depmod.pl ${MELVIX}/cross-tools/bin
chmod 755 ${MELVIX}/cross-tools/bin/depmod.pl
cd ${MELVIX}/sources/linux-5.1
@@ -146,30 +146,30 @@ make ARCH=${MELVIX_ARCH} CROSS_COMPILE=${MELVIX_TARGET}- x86_64_defconfig
# make ARCH=${MELVIX_ARCH} CROSS_COMPILE=${MELVIX_TARGET}- menuconfig
make ARCH=${MELVIX_ARCH} CROSS_COMPILE=${MELVIX_TARGET}-
make ARCH=${MELVIX_ARCH} CROSS_COMPILE=${MELVIX_TARGET}- INSTALL_MOD_PATH=${MELVIX} modules_install
-cp -v arch/x86/boot/bzImage ${MELVIX}/boot/vmlinuz
-cp -v System.map ${MELVIX}/boot/System.map
-cp -v .config ${MELVIX}/boot/config
+cp arch/x86/boot/bzImage ${MELVIX}/boot/vmlinuz
+cp System.map ${MELVIX}/boot/System.map
+cp .config ${MELVIX}/boot/config
${MELVIX}/cross-tools/bin/depmod.pl -F ${MELVIX}/boot/System.map -b ${MELVIX}/lib/modules/5.1.0
cd ${MELVIX}/sources/bootscripts-embedded-master
make DESTDIR=${MELVIX}/ install-bootscripts
-ln -sv ../rc.d/startup ${MELVIX}/etc/init.d/rcS
+ln -s ../rc.d/startup ${MELVIX}/etc/init.d/rcS
cd ${MELVIX}/sources/zlib-1.2.11
sed -i 's/-O3/-Os/g' configure
./configure --prefix=/usr --shared
make && make DESTDIR=${MELVIX}/ install
-mv -v ${MELVIX}/usr/lib/libz.so.* ${MELVIX}/lib
-ln -svf ../../lib/libz.so.1 ${MELVIX}/usr/lib/libz.so
-ln -svf ../../lib/libz.so.1 ${MELVIX}/usr/lib/libz.so.1
-ln -svf ../lib/libz.so.1 ${MELVIX}/lib64/libz.so.1
+mv ${MELVIX}/usr/lib/libz.so.* ${MELVIX}/lib
+ln -sf ../../lib/libz.so.1 ${MELVIX}/usr/lib/libz.so
+ln -sf ../../lib/libz.so.1 ${MELVIX}/usr/lib/libz.so.1
+ln -sf ../lib/libz.so.1 ${MELVIX}/lib64/libz.so.1
# Cleanup
cp -rf ${MELVIX}/ ${MELVIX}-copy
-rm -rfv ${MELVIX}-copy/cross-tools
-rm -rfv ${MELVIX}-copy/usr/src/*
-rm -rfv ${MELVIX}-copy/sources
+rm -rf ${MELVIX}-copy/cross-tools
+rm -rf ${MELVIX}-copy/usr/src/*
+rm -rf ${MELVIX}-copy/sources
FILES="$(ls ${MELVIX}-copy/usr/lib64/*.a)"
for file in ${FILES};
do rm -f ${file}