73 lines
1.6 KiB
Bash
Executable file
73 lines
1.6 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
|
|
#-----
|
|
# Packages
|
|
#-----
|
|
|
|
echo "------------------"
|
|
echo "Primary packages"
|
|
echo "------------------"
|
|
|
|
packages=(mksh bmake gmake busybox toybox libressl cmake curl rsync linux flex byacc om4 zlib expat samurai libffi python ca-certificates)
|
|
root=$(pwd)/root/
|
|
|
|
for pkg in ${packages[@]};do
|
|
echo "$pkg"
|
|
source ${root}/iglunix/pkgs/${pkg}/build.sh
|
|
cd ${root}/iglunix/pkgs/${pkg}/
|
|
#Only needed if you want to clean
|
|
#sudo rm -rf src
|
|
if test -d "src"; then
|
|
echo "Already got the source for ${pkg}?! No need to download.."
|
|
else
|
|
rm src 2> /dev/null
|
|
#src could be a file (file != dir)
|
|
|
|
mkdir src
|
|
cd src
|
|
fetch
|
|
fi
|
|
done
|
|
|
|
|
|
#-----
|
|
# tmp Packages
|
|
#-----
|
|
|
|
echo "------------------"
|
|
echo "Temporary packages"
|
|
echo "------------------"
|
|
mkdir ${root}/iglunix/tmp_pkgs/
|
|
|
|
#echo "ibara baseutils"
|
|
#cd ${root}/iglunix/tmp_pkgs/
|
|
#git clone https://github.com/ibara/baseutils.git
|
|
|
|
echo "------------------------------------"
|
|
echo " shell scripts/single files"
|
|
echo "------------------------------------"
|
|
|
|
cp ${root}/../dont_use_here/inside_chroot ${root}
|
|
cp ${root}/../dont_use_here/linux_header_only_patch ${root}
|
|
cp ${root}/../dont_use_here/inittab ${root}/etc/inittab
|
|
|
|
mkdir ${root}/etc
|
|
mkdir ${root}/etc/profile.d
|
|
|
|
cp ${root}/../dont_use_here/profile ${root}/etc/profile
|
|
|
|
|
|
cat << EOF > ${root}/login_shell
|
|
exec -a "-sh" /bin/sh
|
|
EOF
|
|
|
|
sudo cp /etc/resolv.conf ${ROOT}/etc/resolv.conf
|
|
echo "Copied the host resolv.conf into the target"
|
|
echo "Feel free to override the generated network settings prior to chrooting into the system"
|
|
|
|
echo "---------------------"
|
|
echo "finished chroot_fetch"
|
|
echo "---------------------"
|
|
|