Clone from GitHub, continuing devel here...
commit
89c9d7d5ff
|
@ -0,0 +1,3 @@
|
||||||
|
xterm.VT100.Translations:
|
||||||
|
Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
|
||||||
|
Ctrl Shift <Key>C: copy-selection(CLIPBOARD)
|
|
@ -0,0 +1,5 @@
|
||||||
|
/pkgsrc/*
|
||||||
|
/pkgs/*
|
||||||
|
/src/*
|
||||||
|
*.iso
|
||||||
|
*.img
|
|
@ -0,0 +1,19 @@
|
||||||
|
=== Freon build script ===
|
||||||
|
|
||||||
|
Simple script that, as of right now, builds Freon Linux distribution that is shipped with glibc, busybox, and a hand full of other utilities.
|
||||||
|
|
||||||
|
Changelog:
|
||||||
|
* v0.4.2: Adding some functionality to thaw (package manager). Using TinyCoreLinux 9.x package repository for some extension to the OS without bloating the disk size.
|
||||||
|
* v0.4.1: Added a couple of utilities to build-extensions. dropbear SSH2 client, htop, as well as reconfiguring chttpd for web hosting.
|
||||||
|
* v0.4.0:
|
||||||
|
Freon Linux is now functional with the capabilities of installing on most hardware. Kernel is mostly static, no modules for devices.
|
||||||
|
Also included the following updates: kernel-5.1.12 update, liblzma is built in for grub2, and some software added in build-extensions.
|
||||||
|
* v0.3.0: Taking a new route with Freon, and now making it a standalone distribution for embedded servers.
|
||||||
|
* v0.2.1b: Added build-pkg, in dev. Successfully builds TCC for Freon's package manager.
|
||||||
|
* v0.2.1: Update: Linux kernel 4.19, GNU C library 2.28. Functioning x64 builds, with built-in onboard network drivers.
|
||||||
|
* v0.2.0: Major update, added refer feature. Rebuilds rootfs with freon scripts. Linux headers no longer shipped with finished ISO.
|
||||||
|
* v0.1.0: Name change and overhaul. Now Freon build script.
|
||||||
|
* v0.0.2: Still basic, working on 64 bit host systems, generated box working.
|
||||||
|
* v0.0.1: Simple, --verbose added, not fully working
|
||||||
|
|
||||||
|
This software is released under the GPLv3 and is to be used "as is". There is no warranty with this software and is to be used by an experienced GNU/Linux developer.
|
|
@ -0,0 +1,285 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Build Freon Linux software from source.
|
||||||
|
# Version: 0.1.0
|
||||||
|
# (C) Chris Dorman, 2018 GPLv3+
|
||||||
|
|
||||||
|
#### Variables ###
|
||||||
|
# mirrors
|
||||||
|
tccmirror="http://download.savannah.gnu.org/releases/tinycc"
|
||||||
|
nanomirror="https://www.nano-editor.org/dist/v3"
|
||||||
|
chttpdmirror="https://github.com/Pentium44/chttpd.git"
|
||||||
|
ftpmirror="https://github.com/Harlonxl/minFTPD.git"
|
||||||
|
ncursesmirror="https://ftp.gnu.org/pub/gnu/ncurses"
|
||||||
|
bashmirror="https://ftp.gnu.org/gnu/bash"
|
||||||
|
zlibmirror="https://zlib.net"
|
||||||
|
termcapmirror="https://ftp.gnu.org/gnu/termcap"
|
||||||
|
dropbearmirror="https://matt.ucc.asn.au/dropbear/releases"
|
||||||
|
htopmirror="https://hisham.hm/htop/releases/2.2.0"
|
||||||
|
|
||||||
|
# filenames
|
||||||
|
tcc="tcc-0.9.27.tar.bz2"
|
||||||
|
nano="nano-3.1.tar.xz"
|
||||||
|
ncurses="ncurses-6.1.tar.gz"
|
||||||
|
bash="bash-5.0.tar.gz"
|
||||||
|
zlib="zlib-1.2.11.tar.xz"
|
||||||
|
termcap="termcap-1.3.1.tar.gz"
|
||||||
|
dropbear="dropbear-2019.78.tar.bz2"
|
||||||
|
htop="htop-2.2.0.tar.gz"
|
||||||
|
|
||||||
|
# folders
|
||||||
|
tmpdir="`pwd`/pkgsrc"
|
||||||
|
softwaredir="`pwd`/src/rootfs"
|
||||||
|
tccsrcdir=${tcc//.tar.bz2}
|
||||||
|
nanosrcdir=${nano//.tar.xz}
|
||||||
|
ncursessrcdir=${ncurses//.tar.gz}
|
||||||
|
bashsrcdir=${bash//.tar.gz}
|
||||||
|
zlibsrcdir=${zlib//.tar.xz}
|
||||||
|
termcapsrcdir=${termcap//.tar.gz}
|
||||||
|
dropbearsrcdir=${dropbear//.tar.bz2}
|
||||||
|
htopsrcdir=${htop//.tar.gz}
|
||||||
|
|
||||||
|
# Build simple C toolchain for Freon Linux (tcc)
|
||||||
|
|
||||||
|
if [ ! -d "$tmpdir" ]; then
|
||||||
|
echo "Warning: package source directory not found, creating."
|
||||||
|
mkdir $tmpdir > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $tmpdir
|
||||||
|
|
||||||
|
bash()
|
||||||
|
{
|
||||||
|
# Downloading TCC source
|
||||||
|
if [ ! -f "$bash" ]; then
|
||||||
|
echo "Downloading bash sources..."
|
||||||
|
wget $bashmirror/$bash
|
||||||
|
tar -xf $bash
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $bashsrcdir
|
||||||
|
./configure --prefix=$softwaredir \
|
||||||
|
--without-bash-malloc
|
||||||
|
make -j20
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
tcc()
|
||||||
|
{
|
||||||
|
# Downloading TCC source
|
||||||
|
if [ ! -f "$tcc" ]; then
|
||||||
|
echo "Downloading TCC sources..."
|
||||||
|
wget $tccmirror/$tcc
|
||||||
|
tar -xf $tcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure TCC
|
||||||
|
cd $tccsrcdir
|
||||||
|
./configure --prefix=$softwaredir
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
make -j20
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
sleep 2
|
||||||
|
}
|
||||||
|
|
||||||
|
htop()
|
||||||
|
{
|
||||||
|
# Downloading TCC source
|
||||||
|
if [ ! -f "$htop" ]; then
|
||||||
|
echo "Downloading TCC sources..."
|
||||||
|
wget $htopmirror/$htop
|
||||||
|
tar -xf $htop
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure TCC
|
||||||
|
cd $htopsrcdir
|
||||||
|
./configure --prefix=$softwaredir
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
make -j20
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
dropbear()
|
||||||
|
{
|
||||||
|
# Downloading dropbear source
|
||||||
|
if [ ! -f "$dropbear" ]; then
|
||||||
|
echo "Downloading Dropbear sources..."
|
||||||
|
wget $dropbearmirror/$dropbear
|
||||||
|
tar -xf $dropbear
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure dropbear
|
||||||
|
cd $dropbearsrcdir
|
||||||
|
|
||||||
|
cp -v options.h options.h.backup
|
||||||
|
sed -e "s@/dev/random@/dev/urandom@" options.h.backup > options.h
|
||||||
|
./configure --prefix=$softwaredir
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1
|
||||||
|
make MULTI=1 PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" install
|
||||||
|
|
||||||
|
mkdir -pv $softwaredir/etc/dropbear
|
||||||
|
rm $softwaredir/sbin/dropbear
|
||||||
|
rm $softwaredir/bin/{dropbearconvert,dropbearkey,scp,dbclient}
|
||||||
|
|
||||||
|
cd $softwaredir/bin
|
||||||
|
|
||||||
|
ln -svf dropbearmulti dropbear
|
||||||
|
ln -svf dropbearmulti dbclient
|
||||||
|
ln -svf dropbearmulti dropbearkey
|
||||||
|
ln -svf dropbearmulti dropbearconvert
|
||||||
|
ln -svf dropbearmulti scp
|
||||||
|
|
||||||
|
cd $tmpdir
|
||||||
|
}
|
||||||
|
|
||||||
|
termcap()
|
||||||
|
{
|
||||||
|
# Downloading termcap source
|
||||||
|
if [ ! -f "$termcap" ]; then
|
||||||
|
echo "Downloading termcap sources..."
|
||||||
|
wget $termcapmirror/$termcap
|
||||||
|
tar -xf $termcap
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure TCC
|
||||||
|
cd $termcapsrcdir
|
||||||
|
./configure --prefix=$softwaredir --with-shared --without-normal
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
make -j20
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
nano()
|
||||||
|
{
|
||||||
|
# Downloading nano source
|
||||||
|
if [ ! -f "$nano" ]; then
|
||||||
|
echo "Downloading nano editor sources..."
|
||||||
|
wget $nanomirror/$nano
|
||||||
|
tar -xf $nano
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Confingure
|
||||||
|
cd $nanosrcdir
|
||||||
|
./configure --prefix=$softwaredir
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
make -j20
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
ncurses()
|
||||||
|
{
|
||||||
|
# Downloading nano source
|
||||||
|
if [ ! -f "$ncurses" ]; then
|
||||||
|
echo "Downloading ncurses sources..."
|
||||||
|
wget $ncursesmirror/$ncurses
|
||||||
|
tar -xf $ncurses
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure
|
||||||
|
cd $ncursessrcdir
|
||||||
|
./configure --prefix=$softwaredir \
|
||||||
|
--with-shared \
|
||||||
|
--without-debug \
|
||||||
|
--without-normal \
|
||||||
|
--enable-widec
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
make -j20
|
||||||
|
make install
|
||||||
|
|
||||||
|
make distclean
|
||||||
|
./configure --prefix=/usr \
|
||||||
|
--with-shared \
|
||||||
|
--without-normal \
|
||||||
|
--without-debug \
|
||||||
|
--without-cxx-binding \
|
||||||
|
--with-abi-version=5 \
|
||||||
|
--with-versioned-syms
|
||||||
|
|
||||||
|
make sources libs
|
||||||
|
cp -av lib/lib*.so.5* ../../src/rootfs/lib
|
||||||
|
|
||||||
|
cd ../../src/rootfs/lib
|
||||||
|
|
||||||
|
ln -s libncurses.so.6 libtinfo.so.6
|
||||||
|
ln -s libtinfo.so.6 libtinfo.so
|
||||||
|
|
||||||
|
ln -s libncurses.so.5 libtinfo.so.5
|
||||||
|
ln -s libtinfo.so.5 libtinfo.so
|
||||||
|
|
||||||
|
ln -s libncursesw.so.6 libncursesw.so.5
|
||||||
|
|
||||||
|
cd ../../../pkgsrc
|
||||||
|
}
|
||||||
|
|
||||||
|
zlib()
|
||||||
|
{
|
||||||
|
# Downloading zlib source
|
||||||
|
if [ ! -f "$zlib" ]; then
|
||||||
|
echo "Downloading zlib sources..."
|
||||||
|
wget $zlibmirror/$zlib
|
||||||
|
tar -xf $zlib
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Confingure
|
||||||
|
cd $zlibsrcdir
|
||||||
|
./configure --prefix=$softwaredir
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
make -j20
|
||||||
|
make install
|
||||||
|
|
||||||
|
# mv -v ../../src/rootfs/usr/lib/libz.so.* ../../src/rootfs/lib
|
||||||
|
# ln -sfv ../../src/rootfs/lib/libz.so ../../src/rootfs/usr/lib/libz.so
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
chttpd()
|
||||||
|
{
|
||||||
|
if [ ! -d "chttpd" ]; then
|
||||||
|
git clone $chttpdmirror
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd chttpd
|
||||||
|
make -j20
|
||||||
|
|
||||||
|
cp chttpd ../../src/rootfs/sbin/
|
||||||
|
cp inc/chttpd.conf ../../src/rootfs/etc
|
||||||
|
cp inc/chttpd ../../src/rootfs/etc/init.d
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
ftp()
|
||||||
|
{
|
||||||
|
if [ ! -d "minFTPD" ]; then
|
||||||
|
git clone $ftpmirror
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd minFTPD
|
||||||
|
make -j20
|
||||||
|
|
||||||
|
cp minFTPD ../../src/rootfs/sbin/
|
||||||
|
cp miniFTPD.conf ../../src/rootfs/etc/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
all ) echo "Building all!"
|
||||||
|
ncurses; nano; chttpd; tcc; bash; termcap; zlib; dropbear; cd $tmpdir/../;;
|
||||||
|
* ) echo "Building $1..."
|
||||||
|
$1;;
|
||||||
|
esac
|
|
@ -0,0 +1,719 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Build linux system and generate ISO
|
||||||
|
# Version: 0.2.1
|
||||||
|
# (C) Chris Dorman, 2014-2018 - GPLv3+
|
||||||
|
|
||||||
|
workdir=`pwd`
|
||||||
|
corecount=25
|
||||||
|
|
||||||
|
# Download mirrors
|
||||||
|
syslinuxmirror="https://www.kernel.org/pub/linux/utils/boot/syslinux"
|
||||||
|
kernelmirror="https://cdn.kernel.org/pub/linux/kernel/v5.x"
|
||||||
|
busyboxmirror="http://busybox.net/downloads"
|
||||||
|
libcmirror="http://ftp.gnu.org/gnu/libc"
|
||||||
|
grubmirror="http://alpha.gnu.org/gnu/grub"
|
||||||
|
xzmirror="https://tukaani.org/xz"
|
||||||
|
|
||||||
|
# endtag used for iso filename, and some rootfs configs
|
||||||
|
endtag=`date +"%Y%m%d-%H%M"`
|
||||||
|
|
||||||
|
# Source code filenames
|
||||||
|
kernel="linux-5.1.12.tar.xz"
|
||||||
|
syslinux="syslinux-6.03.tar.gz"
|
||||||
|
busybox="busybox-1.27.0.tar.bz2"
|
||||||
|
libc="glibc-2.28.tar.xz"
|
||||||
|
grub="grub-2.02~rc2.tar.xz"
|
||||||
|
xz="xz-5.2.4.tar.xz"
|
||||||
|
|
||||||
|
# Source directory names
|
||||||
|
kerneldir=${kernel//.tar.xz}
|
||||||
|
busyboxdir=${busybox//.tar.bz2}
|
||||||
|
syslinuxdir=${syslinux//.tar.gz}
|
||||||
|
libcdir=${libc//.tar.xz}
|
||||||
|
grubdir=${grub//.tar.xz}
|
||||||
|
xzdir=${xz//.tar.xz}
|
||||||
|
|
||||||
|
# Echo colors
|
||||||
|
NORMAL="\e[0m"
|
||||||
|
RED="\e[0;31m"
|
||||||
|
GREEN="\e[0;32m"
|
||||||
|
BLUE="\e[0;34m"
|
||||||
|
YELLOW="\e[1;33m"
|
||||||
|
MAGENTA="\e[0;35m"
|
||||||
|
CYAN="\e[0;36m"
|
||||||
|
|
||||||
|
# function to check if errors occurred
|
||||||
|
status()
|
||||||
|
{
|
||||||
|
local CHECK=$?
|
||||||
|
echo -en "\033[68G"
|
||||||
|
if [ $CHECK = 0 ] ; then
|
||||||
|
echo -e "[ \e[0;32mOK\e[0m ]"
|
||||||
|
else
|
||||||
|
echo -e "[ \e[0;31mFAILED\e[0m ]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# same as above but doesn't output [ OK ]
|
||||||
|
status_silent()
|
||||||
|
{
|
||||||
|
local CHECK=$?
|
||||||
|
echo -en "\033[68G"
|
||||||
|
if [ $CHECK != 0 ] ; then
|
||||||
|
echo -e "[ \e[0;31mFAILED\e[0m ]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
echo -e "[$RED Error $NORMAL] This script needs to be executed by root."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "src" ]; then
|
||||||
|
echo -e "[$YELLOW Warning $NORMAL] No source directory!"
|
||||||
|
echo -n "Creating source directory..."
|
||||||
|
mkdir src > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check to see if source dir exists, if not create
|
||||||
|
if [ ! -d src ]; then
|
||||||
|
mkdir src
|
||||||
|
status_silent
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if called, print everything instead of hiding. Debugging purposes
|
||||||
|
case $1 in
|
||||||
|
--verbose|-v) verbose=1;;
|
||||||
|
*) verbose=0;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Download source code
|
||||||
|
get_files()
|
||||||
|
{
|
||||||
|
if [ -d "rootfs" ]; then
|
||||||
|
echo -e "[$YELLOW Warning $NORMAL] Rootfs tree still exists."
|
||||||
|
echo -n "Cleaning build tree..."
|
||||||
|
rm -r rootfs > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
#echo " " # This is used to keep next echo from moving around
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Downloading needed files..."
|
||||||
|
if [ ! -f $kernel ]; then
|
||||||
|
echo -n "$kernel..."
|
||||||
|
wget $kernelmirror/$kernel > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $busybox ]; then
|
||||||
|
echo -n "$busybox..."
|
||||||
|
wget $busyboxmirror/$busybox > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $syslinux ]; then
|
||||||
|
echo -n "$syslinux..."
|
||||||
|
wget $syslinuxmirror/$syslinux > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $xz ]; then
|
||||||
|
echo -n "$xz..."
|
||||||
|
wget $xzmirror/$xz > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $libc ]; then
|
||||||
|
echo -n "$libc..."
|
||||||
|
wget $libcmirror/$libc > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $grub ]; then
|
||||||
|
echo -n "$grub..."
|
||||||
|
wget $grubmirror/$grub > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build linux kernel
|
||||||
|
do_kernel()
|
||||||
|
{
|
||||||
|
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Configuring & building Linux kernel"
|
||||||
|
if [ ! -d $kerneldir ]; then
|
||||||
|
echo -n "Unpacking..."
|
||||||
|
tar xf $kernel > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Configuring..."
|
||||||
|
cd $kerneldir
|
||||||
|
cp ../../files/$kerneldir.conf .config
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Building kernel base..."
|
||||||
|
if [ "$verbose" == "1" ]; then
|
||||||
|
make bzImage -j$corecount
|
||||||
|
status
|
||||||
|
else
|
||||||
|
make bzImage -j$corecount > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
#echo -n "Building kernel modules..."
|
||||||
|
#if [ "$verbose" == "1" ]; then
|
||||||
|
# make modules -j20
|
||||||
|
# status
|
||||||
|
#else
|
||||||
|
# make modules -j20 > /dev/null 2>&1
|
||||||
|
# status
|
||||||
|
#fi
|
||||||
|
|
||||||
|
#echo -n "Installing kernel modules..."
|
||||||
|
#make INSTALL_MOD_PATH=`pwd`/_pkg modules_install > /dev/null 2>&1
|
||||||
|
#status
|
||||||
|
|
||||||
|
echo -n "Installing kernel headers..."
|
||||||
|
make INSTALL_HDR_PATH=`pwd`/_hdr headers_install > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build busybox
|
||||||
|
do_busybox()
|
||||||
|
{
|
||||||
|
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Configuring & building system utilities"
|
||||||
|
if [ ! -d $busyboxdir ]; then
|
||||||
|
echo -n "Unpacking..."
|
||||||
|
tar xf $busybox > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Configuring..."
|
||||||
|
cd $busyboxdir
|
||||||
|
cp ../../files/$busyboxdir.conf .config
|
||||||
|
status_silent
|
||||||
|
|
||||||
|
make oldconfig > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Building..."
|
||||||
|
if [ "$verbose" == "1" ]; then
|
||||||
|
make -j$corecount
|
||||||
|
status
|
||||||
|
else
|
||||||
|
make -j$corecount > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Installing..."
|
||||||
|
if [ ! -d ../rootfs ]; then
|
||||||
|
mkdir ../rootfs
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$verbose" == "1" ]; then
|
||||||
|
make install
|
||||||
|
status
|
||||||
|
else
|
||||||
|
make install > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Finishing up..."
|
||||||
|
chmod 4755 _install/bin/busybox
|
||||||
|
cp -a _install/* ../rootfs
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build system wide dependencies
|
||||||
|
do_libc()
|
||||||
|
{
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Configuring & building libc"
|
||||||
|
if [ ! -d $libcdir ]; then
|
||||||
|
echo "Unpacking..."
|
||||||
|
tar xf $libc > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $libcdir-build ]; then
|
||||||
|
mkdir $libcdir-build
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d rootfs/lib ]; then
|
||||||
|
mkdir rootfs/lib
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $libcdir-build
|
||||||
|
echo -n "Configuring..."
|
||||||
|
if [ "$verbose" == "1" ]; then
|
||||||
|
`pwd`/../$libcdir/configure \
|
||||||
|
--prefix=`pwd`/../rootfs \
|
||||||
|
--build=$MACHTYPE \
|
||||||
|
--host=x86_64-linux \
|
||||||
|
--target=x86_64-linux
|
||||||
|
#--with-headers=../$kerneldir/_hdr/include
|
||||||
|
status
|
||||||
|
else
|
||||||
|
`pwd`/../$libcdir/configure \
|
||||||
|
--prefix=`pwd`/../rootfs \
|
||||||
|
--build=$MACHTYPE \
|
||||||
|
--host=x86_64-linux \
|
||||||
|
--target=x86_64-linux > /dev/null 2>&1
|
||||||
|
#--with-headers=../$kerneldir/_hdr/include > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Building..."
|
||||||
|
if [ "$verbose" == "1" ]; then
|
||||||
|
make install-bootstrap-headers=yes install-headers
|
||||||
|
status
|
||||||
|
|
||||||
|
make -j$corecount csu/subdir_lib
|
||||||
|
status
|
||||||
|
|
||||||
|
install csu/crt1.o csu/crti.o csu/crtn.o `pwd`/../rootfs/lib
|
||||||
|
status
|
||||||
|
|
||||||
|
gcc \
|
||||||
|
-nostdlib \
|
||||||
|
-nostartfiles -shared -x c /dev/null -o `pwd`/../rootfs/lib/libc.so
|
||||||
|
status
|
||||||
|
|
||||||
|
make -j$corecount
|
||||||
|
status
|
||||||
|
else
|
||||||
|
make install-bootstrap-headers=yes install-headers > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
|
||||||
|
make -j$corecount csu/subdir_lib > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
|
||||||
|
install csu/crt1.o csu/crti.o csu/crtn.o `pwd`/../rootfs/lib > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
|
||||||
|
gcc \
|
||||||
|
-nostdlib \
|
||||||
|
-nostartfiles -shared -x c /dev/null -o `pwd`/../rootfs/lib/libc.so 2>&1
|
||||||
|
status_silent
|
||||||
|
|
||||||
|
make -j$corecount > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Copying to rootfs..."
|
||||||
|
if [ "$verbose" == "1" ]; then
|
||||||
|
make install
|
||||||
|
status
|
||||||
|
else
|
||||||
|
make install > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Cleaning files..."
|
||||||
|
#strip -v lib/* > /dev/null 2>&1
|
||||||
|
mkdir ../rootfs/lib64
|
||||||
|
cd ../rootfs/lib64
|
||||||
|
ln -s /lib/ld-2.28.so ld-linux-x86-64.so.2
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ../..
|
||||||
|
}
|
||||||
|
|
||||||
|
# Build grub legacy bootloader and install
|
||||||
|
do_grub()
|
||||||
|
{
|
||||||
|
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Configuring & building bootloader"
|
||||||
|
|
||||||
|
echo -n "Extracting..."
|
||||||
|
if [ ! -d "$xzdir" ]; then
|
||||||
|
tar xf $xz > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$grubdir" ]; then
|
||||||
|
tar xf $grub > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $grubdir
|
||||||
|
|
||||||
|
echo -n "Configuring..."
|
||||||
|
./configure --prefix=`pwd`/../rootfs \
|
||||||
|
--disable-efiemu \
|
||||||
|
--disable-werror > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
|
||||||
|
cd ../$xzdir
|
||||||
|
|
||||||
|
./configure --prefix=`pwd`/../rootfs \
|
||||||
|
--disable-static > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ../$grubdir
|
||||||
|
|
||||||
|
echo -n "Compiling..."
|
||||||
|
make -j$corecount > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
|
||||||
|
cd ../$xzdir
|
||||||
|
|
||||||
|
make -j$corecount > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ../$grubdir
|
||||||
|
|
||||||
|
echo -n "Copying to rootfs..."
|
||||||
|
make install > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
cd ../$xzdir
|
||||||
|
make install > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
cd ../$grubdir
|
||||||
|
|
||||||
|
echo -n "Installing patched grub-mkconfig..."
|
||||||
|
rm ../rootfs/sbin/grub-mkconfig > /dev/null 2>&1
|
||||||
|
status_silent
|
||||||
|
cp ../../files/sbin/grub-mkconfig ../rootfs/sbin > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ../rootfs
|
||||||
|
|
||||||
|
#echo -n "Stripping grub..."
|
||||||
|
#strip -s rootfs/bin/grub-* > /dev/null 2>&1
|
||||||
|
#strip -s rootfs/sbin/grub-* > /dev/null 2>&1
|
||||||
|
cd ..
|
||||||
|
#status
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install Freon utilities
|
||||||
|
do_utilities() {
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Installing Freon utilities"
|
||||||
|
echo -n "Copying files..."
|
||||||
|
|
||||||
|
cp -a ../files/bin/* rootfs/bin
|
||||||
|
status
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Configure rootfs for live boot
|
||||||
|
configure_system()
|
||||||
|
{
|
||||||
|
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Configuring root filesystem"
|
||||||
|
echo -n "Linking init..."
|
||||||
|
cd rootfs
|
||||||
|
if [ -f linuxrc ]; then
|
||||||
|
rm linuxrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f init ]; then
|
||||||
|
ln -s bin/busybox init
|
||||||
|
fi
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Laying out filesystem tree..."
|
||||||
|
mkdir -p dev etc root home proc media mnt sys tmp var
|
||||||
|
mkdir -p usr/{lib,local,share,games} \
|
||||||
|
var/{cache,lib,lock,log,games,run,spool,www} \
|
||||||
|
media/{cdrom,flash,usbdisk}
|
||||||
|
|
||||||
|
echo -n "Filling /dev..."
|
||||||
|
cp ../../files/bin/mkdevs bin/mkdevs
|
||||||
|
./bin/mkdevs dev > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Configuring networking..."
|
||||||
|
echo "127.0.0.1 localhost" > etc/hosts
|
||||||
|
echo "localhost 127.0.0.1" > etc/networks
|
||||||
|
echo "linux" > etc/hostname
|
||||||
|
echo "order hosts,bind" > etc/host.conf
|
||||||
|
echo "multi on" >> etc/host.conf
|
||||||
|
|
||||||
|
mkdir etc/network
|
||||||
|
mkdir etc/network/if-up.d
|
||||||
|
mkdir etc/network/if-down.d
|
||||||
|
mkdir etc/network/if-pre-up.d
|
||||||
|
mkdir etc/network/if-post-down.d
|
||||||
|
|
||||||
|
echo "# loopback
|
||||||
|
auto lo
|
||||||
|
iface lo inet loopback
|
||||||
|
|
||||||
|
# Ethernet // this is default and can be changed for per system
|
||||||
|
auto eth0
|
||||||
|
iface eth0 inet dhcp
|
||||||
|
" > etc/network/interfaces
|
||||||
|
|
||||||
|
echo "
|
||||||
|
# /etc/nsswitch.conf: GNU Name Service Switch config.
|
||||||
|
#
|
||||||
|
|
||||||
|
passwd: files
|
||||||
|
group: files
|
||||||
|
shadow: files
|
||||||
|
|
||||||
|
hosts: files dns
|
||||||
|
networks: files
|
||||||
|
" > etc/nsswitch.conf
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Setting up default users and groups..."
|
||||||
|
echo "root:x:0:0:root:/root:/bin/sh" > etc/passwd
|
||||||
|
echo "root::13525:0:99999:7:::" > etc/shadow
|
||||||
|
echo "root:x:0:" > etc/group
|
||||||
|
echo "root:*::" > etc/gshadow
|
||||||
|
chmod 640 etc/shadow
|
||||||
|
chmod 640 etc/gshadow
|
||||||
|
status
|
||||||
|
|
||||||
|
#echo -n "Copying kernel modules..."
|
||||||
|
#cp -a ../$kerneldir/_pkg/* .
|
||||||
|
#status
|
||||||
|
|
||||||
|
#echo -n "Copying kernel headers..."
|
||||||
|
#cp -a ../$kerneldir/_hdr/* .
|
||||||
|
#status
|
||||||
|
|
||||||
|
echo -n "Compiling termtypes for core terminfo...."
|
||||||
|
tic -o ./usr/share/terminfo ../../files/terminfo/termtypes > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Finishing up..."
|
||||||
|
echo "# /etc/securetty: List of terminals on which root is allowed to login.
|
||||||
|
#
|
||||||
|
console
|
||||||
|
|
||||||
|
# For people with serial port consoles
|
||||||
|
ttyS0
|
||||||
|
|
||||||
|
# Standard consoles
|
||||||
|
tty1
|
||||||
|
tty2
|
||||||
|
tty3
|
||||||
|
tty4
|
||||||
|
tty5
|
||||||
|
tty6
|
||||||
|
tty7" > etc/securetty
|
||||||
|
|
||||||
|
echo "/bin/sh" > etc/shells
|
||||||
|
echo "/bin/ash" >> etc/shells
|
||||||
|
|
||||||
|
echo "Freon Linux $endtag \r \l" > etc/issue
|
||||||
|
echo "" >> etc/issue
|
||||||
|
|
||||||
|
echo "Freon Linux, welcome..." > etc/motd
|
||||||
|
|
||||||
|
echo "[SUID]
|
||||||
|
# Allow command to be run by anyone.
|
||||||
|
su = ssx root.root
|
||||||
|
passwd = ssx root.root
|
||||||
|
loadkmap = ssx root.root
|
||||||
|
mount = ssx root.root
|
||||||
|
reboot = ssx root.root
|
||||||
|
halt = ssx root.root" > etc/busybox.conf
|
||||||
|
|
||||||
|
chmod 600 etc/busybox.conf
|
||||||
|
|
||||||
|
echo "::sysinit:/etc/init.d/rc.init
|
||||||
|
::respawn:-/bin/sh
|
||||||
|
tty2::askfirst:-/bin/sh
|
||||||
|
::ctrlaltdel:/bin/umount -a -r
|
||||||
|
::ctrlaltdel:/sbin/reboot" > etc/inittab
|
||||||
|
|
||||||
|
echo "# /etc/profile: system-wide .profile file for the Bourne shells
|
||||||
|
|
||||||
|
PATH=\"/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin\"
|
||||||
|
LD_LIBRARY_PATH=\"/usr/lib:/lib:/usr/local/lib\"
|
||||||
|
TERM=\"xterm\"
|
||||||
|
TERMINFO=\"/usr/local/share/terminfo\"
|
||||||
|
|
||||||
|
NORMAL=\"\\[\\e[0m\\]\"
|
||||||
|
RED=\"\\[\\e[0;31m\\]\"
|
||||||
|
GREEN=\"\\[\\e[0;32m\\]\"
|
||||||
|
BLUE=\"\\[\\e[0;34m\\]\"
|
||||||
|
YELLOW=\"\\[\\e[1;33m\\]\"
|
||||||
|
MAGENTA=\"\\[\\e[0;35m\\]\"
|
||||||
|
CYAN=\"\\[\\e[0;36m\\]\"
|
||||||
|
|
||||||
|
if [ \"\`id -u\`\" -eq 0 ]; then
|
||||||
|
PS1=\"$RED\\u$GREEN@$BLUE\\h [ $MAGENTA\\w$BLUE ]# \$NORMAL\"
|
||||||
|
else
|
||||||
|
PS1=\"$RED\\u$GREEN@$BLUE\\h [ $MAGENTA\\w$BLUE ]\\\$ \$NORMAL\"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH LD_LIBRARY_PATH PS1 DISPLAY ignoreeof
|
||||||
|
umask 022
|
||||||
|
|
||||||
|
export G_FILENAME_ENCODING=iso8859-1
|
||||||
|
" > etc/profile
|
||||||
|
|
||||||
|
echo "proc /proc proc defaults 0 0
|
||||||
|
sysfs /sys sysfs defaults 0 0
|
||||||
|
devpts /dev/pts devpts defaults 0 0
|
||||||
|
tmpfs /dev/shm tmpfs defaults 0 0" > etc/fstab
|
||||||
|
|
||||||
|
cp -a ../../files/etc/* etc
|
||||||
|
|
||||||
|
cd usr/share
|
||||||
|
mkdir kmap
|
||||||
|
|
||||||
|
cp -av ../../../../files/share/* .
|
||||||
|
|
||||||
|
chmod +x udhcpc/default.script
|
||||||
|
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# mkdir x86_64-linux-gnu
|
||||||
|
|
||||||
|
# cd x86_64-linux-gnu
|
||||||
|
|
||||||
|
# ln -s ../libm-2.22.so libm.so.6
|
||||||
|
# ln -s ../libc-2.22.so libc.so.6
|
||||||
|
|
||||||
|
status
|
||||||
|
|
||||||
|
rm lib/*.a # In base-dev package
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
# generate initramfs for live boot.
|
||||||
|
gen_rootfs()
|
||||||
|
{
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Generating filesystem..."
|
||||||
|
|
||||||
|
cd src/rootfs
|
||||||
|
|
||||||
|
echo -n "Stripping build..."
|
||||||
|
strip -s lib/*.so > /dev/null 2>&1
|
||||||
|
strip -s lib/*.so* > /dev/null 2>&1
|
||||||
|
strip -s bin/busybox > /dev/null 2>&1
|
||||||
|
strip -s bin/bash > /dev/null 2>&1
|
||||||
|
strip -s sbin/chttpd > /dev/null 2>&1
|
||||||
|
rm lib/*.a
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Compressing filesystem..."
|
||||||
|
find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
regen_rootfs_bare()
|
||||||
|
{
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Generating filesystem..."
|
||||||
|
|
||||||
|
cd rootfs
|
||||||
|
|
||||||
|
echo -n "Compressing filesystem..."
|
||||||
|
find . -print | cpio -o -H newc | gzip -9 > ../rootfs.gz 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
# setup bootloader for iso
|
||||||
|
do_isolinux()
|
||||||
|
{
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Setting up bootloader."
|
||||||
|
if [ ! -d $syslinuxdir ]; then
|
||||||
|
echo -n "Unpacking $syslinuxdir..."
|
||||||
|
tar -xzf $syslinux > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d cdroot ]; then
|
||||||
|
mkdir cdroot
|
||||||
|
mkdir cdroot/boot
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $syslinuxdir
|
||||||
|
|
||||||
|
echo -n "Copying isolinux files to iso..."
|
||||||
|
cp bios/core/isolinux.bin ../cdroot
|
||||||
|
cp bios/com32/elflink/ldlinux/ldlinux.c32 ../cdroot
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Generating isolinux config..."
|
||||||
|
echo "Freon Linux $endtag
|
||||||
|
Press <enter> to boot" > ../cdroot/display.txt
|
||||||
|
echo "display display.txt
|
||||||
|
default Freon
|
||||||
|
label Freon
|
||||||
|
kernel /boot/bzImage
|
||||||
|
append initrd=/boot/rootfs.gz rw root=/dev/null vga=788
|
||||||
|
implicit 0
|
||||||
|
prompt 1
|
||||||
|
timeout 5" > ../cdroot/isolinux.cfg
|
||||||
|
status
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
# generate complete iso ready for boot
|
||||||
|
gen_iso()
|
||||||
|
{
|
||||||
|
|
||||||
|
echo -e -n "[$YELLOW Working $NORMAL] Generating bootable ISO image."
|
||||||
|
|
||||||
|
cp rootfs.gz cdroot/boot
|
||||||
|
cp $kerneldir/arch/x86/boot/bzImage cdroot/boot/bzImage
|
||||||
|
|
||||||
|
genisoimage -R -o ../freon-$endtag.iso -b isolinux.bin \
|
||||||
|
-c boot.cat -no-emul-boot -boot-load-size 4 \
|
||||||
|
-V "Freon Linux" -input-charset iso8859-1 -boot-info-table cdroot > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
do_refer()
|
||||||
|
{
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Reconfiguring root filesystem"
|
||||||
|
|
||||||
|
cd rootfs
|
||||||
|
|
||||||
|
rm etc/init.d/*
|
||||||
|
rm etc/conf.d/*
|
||||||
|
cp -av ../../files/etc/* etc/ # Copy files/etc to filesystem (init scripts)
|
||||||
|
cp -av ../../files/bin/* bin/ # Copy installer and package manager
|
||||||
|
cp -av ../../files/share/* share/ # Stuffs
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
cd src
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
refer) do_refer
|
||||||
|
regen_rootfs_bare
|
||||||
|
do_isolinux
|
||||||
|
gen_iso;;
|
||||||
|
|
||||||
|
*) get_files
|
||||||
|
do_kernel
|
||||||
|
do_busybox
|
||||||
|
do_libc
|
||||||
|
do_grub
|
||||||
|
configure_system
|
||||||
|
do_utilities
|
||||||
|
cd $workdir
|
||||||
|
./build-extensions all
|
||||||
|
cd $workdir
|
||||||
|
gen_rootfs
|
||||||
|
do_isolinux
|
||||||
|
gen_iso;;
|
||||||
|
esac
|
|
@ -0,0 +1,135 @@
|
||||||
|
#!/bin/sh
|
||||||
|
### FreezeDry ###
|
||||||
|
# Hand written installer for Freon Linux
|
||||||
|
# (C) Chris Dorman, 2017 LGPLv2
|
||||||
|
|
||||||
|
# Include Freon Linux's config
|
||||||
|
. /etc/conf.d/main.conf
|
||||||
|
. /etc/conf.d/status
|
||||||
|
|
||||||
|
# Check if script was ran by root
|
||||||
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
echo -e "[$RED Error $NORMAL] This script needs to be executed by root."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Move to root of filesystem
|
||||||
|
cd /
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
install)
|
||||||
|
if [ ! -f "$2" ]; then
|
||||||
|
echo "Error: $2 doesn't exist. exit."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Include config file
|
||||||
|
. $2
|
||||||
|
|
||||||
|
# Make directories if they don't exist
|
||||||
|
if [ ! -d "/mnt/inst" ]; then
|
||||||
|
mkdir /mnt/inst
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "/mnt/target" ]; then
|
||||||
|
mkdir /mnt/target
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Format device partition
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Formatting installation partition"
|
||||||
|
echo -n "Formatting..."
|
||||||
|
mkfs.ext2 $DEVPARTITION > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Mounting filesystems for installation"
|
||||||
|
echo -n "Installation media..."
|
||||||
|
mount $INSTMEDIA /mnt/inst > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Device: $DEVPARTITION..."
|
||||||
|
mount $DEVPARTITION /mnt/target > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Copying and extracting system files"
|
||||||
|
echo -n "Copying filesystem..."
|
||||||
|
cd /mnt/inst
|
||||||
|
|
||||||
|
cp boot/rootfs.gz /mnt/target
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Copying Linux kernel..."
|
||||||
|
|
||||||
|
mkdir /mnt/target/boot
|
||||||
|
cp boot/bzImage /mnt/target/boot
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Extracting filesystem..."
|
||||||
|
cd ../target
|
||||||
|
|
||||||
|
zcat rootfs.gz | cpio -id > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Removing filesystem archive..."
|
||||||
|
rm rootfs.gz
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -e "[$YELLOW Working $NORMAL] Installing bootloader to $DEVICE"
|
||||||
|
echo -n "Executing grub-install..."
|
||||||
|
|
||||||
|
grub-install --root-directory=/mnt/target /dev/hda --directory=/lib/grub/i386-pc > /dev/null 2>&1
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Generating makefile..."
|
||||||
|
|
||||||
|
echo "#
|
||||||
|
# /boot/grub/grub.cfg - freon grub2 config file
|
||||||
|
|
||||||
|
# Set menu colors
|
||||||
|
set menu_color_normal=white/blue
|
||||||
|
set menu_color_highlight=light-blue/white
|
||||||
|
|
||||||
|
# Set menu display time
|
||||||
|
set timeout=10
|
||||||
|
|
||||||
|
# Set the default boot entry (first is 0)
|
||||||
|
set default=0
|
||||||
|
|
||||||
|
|
||||||
|
# Boot entries:
|
||||||
|
|
||||||
|
# CRUX
|
||||||
|
menuentry \"Freon Linux $FREONVERSION\" {
|
||||||
|
linux /boot/bzImage root=$DEVPARTITION
|
||||||
|
}
|
||||||
|
" >> /mnt/target/boot/grub/grub.cfg
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
|
||||||
|
config)
|
||||||
|
case $2 in
|
||||||
|
*)
|
||||||
|
echo "### FreezeDry configuration file ###
|
||||||
|
# Installation media device (Hardware with Freon's system files)
|
||||||
|
# Examples:
|
||||||
|
# CDROM: /dev/cdrom
|
||||||
|
# USB: /dev/sda1
|
||||||
|
INSTMEDIA=\"/dev/cdrom\"
|
||||||
|
|
||||||
|
# Installation device (Hardware used for the Freon installation)
|
||||||
|
# Example: /dev/hda
|
||||||
|
DEVICE=\"/dev/hda\"
|
||||||
|
|
||||||
|
# Device partition (Used for the Freon installation)
|
||||||
|
# Example: /dev/hda1: First partition of device hda
|
||||||
|
DEVPARTITION=\"/dev/hda1\"" >> $2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
help|*)
|
||||||
|
echo "FreezeDry: Freon Installer ~ Install Freon Linux to a device"
|
||||||
|
echo "Usage: "
|
||||||
|
echo " freezedry install <path to config file>: Install Freon Linux"
|
||||||
|
echo " freezedry config <path to config> : Create a default config";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,193 @@
|
||||||
|
#! /bin/bash
|
||||||
|
# Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||||
|
# This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
# The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
# The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with the GNU C Library; if not, see
|
||||||
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
# This is the `ldd' command, which lists what shared libraries are
|
||||||
|
# used by given dynamically-linked executables. It works by invoking the
|
||||||
|
# run-time dynamic linker as a command and setting the environment
|
||||||
|
# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.
|
||||||
|
|
||||||
|
# We should be able to find the translation right at the beginning.
|
||||||
|
TEXTDOMAIN=libc
|
||||||
|
TEXTDOMAINDIR=/usr/share/locale
|
||||||
|
|
||||||
|
RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2"
|
||||||
|
warn=
|
||||||
|
bind_now=
|
||||||
|
verbose=
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case "$1" in
|
||||||
|
--vers | --versi | --versio | --version)
|
||||||
|
echo 'ldd (Debian GLIBC 2.24-11+deb9u4) 2.24'
|
||||||
|
printf $"Copyright (C) %s Free Software Foundation, Inc.
|
||||||
|
This is free software; see the source for copying conditions. There is NO
|
||||||
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
" "2016"
|
||||||
|
printf $"Written by %s and %s.
|
||||||
|
" "Roland McGrath" "Ulrich Drepper"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--h | --he | --hel | --help)
|
||||||
|
echo $"Usage: ldd [OPTION]... FILE...
|
||||||
|
--help print this help and exit
|
||||||
|
--version print version information and exit
|
||||||
|
-d, --data-relocs process data relocations
|
||||||
|
-r, --function-relocs process data and function relocations
|
||||||
|
-u, --unused print unused direct dependencies
|
||||||
|
-v, --verbose print all information
|
||||||
|
"
|
||||||
|
printf $"For bug reporting instructions, please see:\\n%s.\\n" \
|
||||||
|
"<http://www.debian.org/Bugs/>"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
|
||||||
|
--data-rel | --data-relo | --data-reloc | --data-relocs)
|
||||||
|
warn=yes
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-r | --f | --fu | --fun | --func | --funct | --functi | --functio | \
|
||||||
|
--function | --function- | --function-r | --function-re | --function-rel | \
|
||||||
|
--function-relo | --function-reloc | --function-relocs)
|
||||||
|
warn=yes
|
||||||
|
bind_now=yes
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v | --verb | --verbo | --verbos | --verbose)
|
||||||
|
verbose=yes
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-u | --u | --un | --unu | --unus | --unuse | --unused)
|
||||||
|
unused=yes
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--v | --ve | --ver)
|
||||||
|
echo >&2 $"ldd: option \`$1' is ambiguous"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
--) # Stop option processing.
|
||||||
|
shift; break
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
echo >&2 'ldd:' $"unrecognized option" "\`$1'"
|
||||||
|
echo >&2 $"Try \`ldd --help' for more information."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
nonelf ()
|
||||||
|
{
|
||||||
|
# Maybe extra code for non-ELF binaries.
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_env="LD_TRACE_LOADED_OBJECTS=1 LD_WARN=$warn LD_BIND_NOW=$bind_now"
|
||||||
|
add_env="$add_env LD_LIBRARY_VERSION=\$verify_out"
|
||||||
|
add_env="$add_env LD_VERBOSE=$verbose"
|
||||||
|
if test "$unused" = yes; then
|
||||||
|
add_env="$add_env LD_DEBUG=\"$LD_DEBUG${LD_DEBUG:+,}unused\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# The following command substitution is needed to make ldd work in SELinux
|
||||||
|
# environments where the RTLD might not have permission to write to the
|
||||||
|
# terminal. The extra "x" character prevents the shell from trimming trailing
|
||||||
|
# newlines from command substitution results. This function is defined as a
|
||||||
|
# subshell compound list (using "(...)") to prevent parameter assignments from
|
||||||
|
# affecting the calling shell execution environment.
|
||||||
|
try_trace() (
|
||||||
|
output=$(eval $add_env '"$@"' 2>&1; rc=$?; printf 'x'; exit $rc)
|
||||||
|
rc=$?
|
||||||
|
printf '%s' "${output%x}"
|
||||||
|
return $rc
|
||||||
|
)
|
||||||
|
|
||||||
|
case $# in
|
||||||
|
0)
|
||||||
|
echo >&2 'ldd:' $"missing file arguments"
|
||||||
|
echo >&2 $"Try \`ldd --help' for more information."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
single_file=t
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
single_file=f
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
result=0
|
||||||
|
for file do
|
||||||
|
# We don't list the file name when there is only one.
|
||||||
|
test $single_file = t || echo "${file}:"
|
||||||
|
case $file in
|
||||||
|
*/*) :
|
||||||
|
;;
|
||||||
|
*) file=./$file
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test ! -e "$file"; then
|
||||||
|
echo "ldd: ${file}:" $"No such file or directory" >&2
|
||||||
|
result=1
|
||||||
|
elif test ! -f "$file"; then
|
||||||
|
echo "ldd: ${file}:" $"not regular file" >&2
|
||||||
|
result=1
|
||||||
|
elif test -r "$file"; then
|
||||||
|
RTLD=
|
||||||
|
ret=1
|
||||||
|
for rtld in ${RTLDLIST}; do
|
||||||
|
if test -x $rtld; then
|
||||||
|
dummy=`$rtld 2>&1`
|
||||||
|
if test $? = 127; then
|
||||||
|
verify_out=`${rtld} --verify "$file"`
|
||||||
|
ret=$?
|
||||||
|
case $ret in
|
||||||
|
[02]) RTLD=${rtld}; break;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
case $ret in
|
||||||
|
0|2)
|
||||||
|
try_trace "$RTLD" "$file" || result=1
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
# This can be a non-ELF binary or no binary at all.
|
||||||
|
nonelf "$file" || {
|
||||||
|
echo $" not a dynamic executable"
|
||||||
|
result=1
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo 'ldd:' $"error: you do not have read permission for" "\`$file'" >&2
|
||||||
|
result=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $result
|
||||||
|
# Local Variables:
|
||||||
|
# mode:ksh
|
||||||
|
# End:
|
|
@ -0,0 +1,221 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# mktazdevs.sh: Make device files for SliTaz GNU/Linux
|
||||||
|
# 2007/01/25
|
||||||
|
#
|
||||||
|
|
||||||
|
# Script functions.
|
||||||
|
status()
|
||||||
|
{
|
||||||
|
local CHECK=$?
|
||||||
|
echo -en "\033[68G"
|
||||||
|
if [ $CHECK = 0 ] ; then
|
||||||
|
echo -e "\033[1mOK\033[0m"
|
||||||
|
else
|
||||||
|
echo -e "\033[1mFailed\033[0m"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# We do our work in the dev/ directory.
|
||||||
|
if [ -z "$1" ] ; then
|
||||||
|
echo "usage: `basename $0` path/to/dev"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# script start.
|
||||||
|
echo -n "Moving to $1... "
|
||||||
|
cd $1
|
||||||
|
status
|
||||||
|
|
||||||
|
# make usfull directories.
|
||||||
|
echo -n "Starting to build directories... "
|
||||||
|
mkdir pts input net usb shm
|
||||||
|
status
|
||||||
|
|
||||||
|
# script start.
|
||||||
|
#
|
||||||
|
echo -n "Starting to build devices... "
|
||||||
|
|
||||||
|
# input devs.
|
||||||
|
#
|
||||||
|
mknod input/event0 c 13 64
|
||||||
|
mknod input/event1 c 13 65
|
||||||
|
mknod input/event2 c 13 66
|
||||||
|
mknod input/mouse0 c 13 32
|
||||||
|
mknod input/mice c 13 63
|
||||||
|
mknod input/ts0 c 254 0
|
||||||
|
|
||||||
|
# miscellaneous one-of-a-kind stuff.
|
||||||
|
#
|
||||||
|
mknod logibm c 10 0
|
||||||
|
mknod psaux c 10 1
|
||||||
|
mknod inportbm c 10 2
|
||||||
|
mknod atibm c 10 3
|
||||||
|
mknod console c 5 1
|
||||||
|
mknod full c 1 7
|
||||||
|
mknod kmem c 1 2
|
||||||
|
mknod mem c 1 1
|
||||||
|
mknod null c 1 3
|
||||||
|
mknod port c 1 4
|
||||||
|
mknod random c 1 8
|
||||||
|
mknod urandom c 1 9
|
||||||
|
mknod zero c 1 5
|
||||||
|
mknod rtc c 10 135
|
||||||
|
mknod sr0 b 11 0
|
||||||
|
mknod sr1 b 11 1
|
||||||
|
mknod agpgart c 10 175
|
||||||
|
mknod dri c 10 63
|
||||||
|
mknod ttyS0 c 4 64
|
||||||
|
mknod audio c 14 4
|
||||||
|
mknod beep c 10 128
|
||||||
|
mknod ptmx c 5 2
|
||||||
|
mknod nvram c 10 144
|
||||||
|
ln -s /proc/kcore core
|
||||||
|
|
||||||
|
# net/tun device
|
||||||
|
#
|
||||||
|
mknod net/tun c 10 200
|
||||||
|
|
||||||
|
# framebuffer devs.
|
||||||
|
#
|
||||||
|
mknod fb0 c 29 0
|
||||||
|
mknod fb1 c 29 32
|
||||||
|
mknod fb2 c 29 64
|
||||||
|
mknod fb3 c 29 96
|
||||||
|
mknod fb4 c 29 128
|
||||||
|
mknod fb5 c 29 160
|
||||||
|
mknod fb6 c 29 192
|
||||||
|
|
||||||
|
# usb/hiddev
|
||||||
|
#
|
||||||
|
mknod usb/hiddev0 c 180 96
|
||||||
|
mknod usb/hiddev1 c 180 97
|
||||||
|
mknod usb/hiddev2 c 180 98
|
||||||
|
mknod usb/hiddev3 c 180 99
|
||||||
|
mknod usb/hiddev4 c 180 100
|
||||||
|
mknod usb/hiddev5 c 180 101
|
||||||
|
mknod usb/hiddev6 c 180 102
|
||||||
|
|
||||||
|
# IDE HD devs
|
||||||
|
# with a fiew concievable partitions; you can do
|
||||||
|
# more of them yourself as you need 'em.
|
||||||
|
#
|
||||||
|
|
||||||
|
# hda devs
|
||||||
|
#
|
||||||
|
mknod hda b 3 0
|
||||||
|
mknod hda1 b 3 1
|
||||||
|
mknod hda2 b 3 2
|
||||||
|
mknod hda3 b 3 3
|
||||||
|
mknod hda4 b 3 4
|
||||||
|
mknod hda5 b 3 5
|
||||||
|
mknod hda6 b 3 6
|
||||||
|
mknod hda7 b 3 7
|
||||||
|
mknod hda8 b 3 8
|
||||||
|
mknod hda9 b 3 9
|
||||||
|
|
||||||
|
# hdb devs
|
||||||
|
#
|
||||||
|
mknod hdb b 3 64
|
||||||
|
mknod hdb1 b 3 65
|
||||||
|
mknod hdb2 b 3 66
|
||||||
|
mknod hdb3 b 3 67
|
||||||
|
mknod hdb4 b 3 68
|
||||||
|
mknod hdb5 b 3 69
|
||||||
|
mknod hdb6 b 3 70
|
||||||
|
mknod hdb7 b 3 71
|
||||||
|
mknod hdb8 b 3 72
|
||||||
|
mknod hdb9 b 3 73
|
||||||
|
|
||||||
|
# hdc and hdd with cdrom symbolic link.
|
||||||
|
#
|
||||||
|
mknod hdc b 22 0
|
||||||
|
mknod hdd b 22 64
|
||||||
|
ln -s hdc cdrom
|
||||||
|
|
||||||
|
# sda devs
|
||||||
|
#
|
||||||
|
mknod sda b 8 0
|
||||||
|
mknod sda1 b 8 1
|
||||||
|
mknod sda2 b 8 2
|
||||||
|
mknod sda3 b 8 3
|
||||||
|
mknod sda4 b 8 4
|
||||||
|
mknod sda5 b 8 5
|
||||||
|
mknod sda6 b 8 6
|
||||||
|
mknod sda7 b 8 7
|
||||||
|
mknod sda8 b 8 8
|
||||||
|
mknod sda9 b 8 9
|
||||||
|
ln -s sda1 flash
|
||||||
|
|
||||||
|
# sdb devs
|
||||||
|
#
|
||||||
|
mknod sdb b 8 16
|
||||||
|
mknod sdb1 b 8 17
|
||||||
|
mknod sdb2 b 8 18
|
||||||
|
mknod sdb3 b 8 19
|
||||||
|
mknod sdb4 b 8 20
|
||||||
|
mknod sdb5 b 8 21
|
||||||
|
mknod sdb6 b 8 22
|
||||||
|
mknod sdb7 b 8 23
|
||||||
|
mknod sdb8 b 8 24
|
||||||
|
mknod sdb9 b 9 25
|
||||||
|
|
||||||
|
# Floppy device.
|
||||||
|
#
|
||||||
|
mknod fd0 b 2 0
|
||||||
|
|
||||||
|
# loop devs
|
||||||
|
#
|
||||||
|
for i in `seq 0 7`; do
|
||||||
|
mknod loop$i b 7 $i
|
||||||
|
done
|
||||||
|
|
||||||
|
# ram devs
|
||||||
|
#
|
||||||
|
for i in `seq 0 7`; do
|
||||||
|
mknod ram$i b 1 $i
|
||||||
|
done
|
||||||
|
ln -s ram1 ram
|
||||||
|
|
||||||
|
# tty devs
|
||||||
|
#
|
||||||
|
mknod tty c 5 0
|
||||||
|
for i in `seq 0 7`; do
|
||||||
|
mknod tty$i c 4 $i
|
||||||
|
done
|
||||||
|
|
||||||
|
# virtual console screen devs
|
||||||
|
#
|
||||||
|
for i in `seq 0 7`; do
|
||||||
|
mknod vcs$i b 7 $i
|
||||||
|
done
|
||||||
|
ln -s vcs0 vcs
|
||||||
|
|
||||||
|
# virtual console screen w/ attributes devs
|
||||||
|
#
|
||||||
|
for i in `seq 0 7`; do
|
||||||
|
mknod vcsa$i b 7 $i
|
||||||
|
done
|
||||||
|
ln -s vcsa0 vcsa
|
||||||
|
|
||||||
|
status
|
||||||
|
|
||||||
|
# Symlinks.
|
||||||
|
#
|
||||||
|
ln -snf /proc/self/fd fd
|
||||||
|
ln -snf /proc/self/fd/0 stdin
|
||||||
|
ln -snf /proc/self/fd/1 stdout
|
||||||
|
ln -snf /proc/self/fd/2 stderr
|
||||||
|
|
||||||
|
# Changes permissions.
|
||||||
|
#
|
||||||
|
echo -n "Changing permissions on devices... "
|
||||||
|
chmod 0666 ptmx
|
||||||
|
chmod 0666 null
|
||||||
|
chmod 0622 console
|
||||||
|
chmod 0666 tty*
|
||||||
|
status
|
||||||
|
|
||||||
|
# script end
|
||||||
|
echo ""
|
||||||
|
echo "All devices are build..."
|
||||||
|
date
|
|
@ -0,0 +1,178 @@
|
||||||
|
#!/bin/sh
|
||||||
|
### Thaw ###
|
||||||
|
#
|
||||||
|
# Freon Linux package manager
|
||||||
|
# (C) Chris Dorman, 2017 LGPLv2
|
||||||
|
#
|
||||||
|
### END ####
|
||||||
|
|
||||||
|
# Include Freon Linux's config
|
||||||
|
. /etc/conf.d/main.conf
|
||||||
|
. /etc/conf.d/status
|
||||||
|
|
||||||
|
# Nutrapak root
|
||||||
|
THAWROOT="/share/thaw"
|
||||||
|
# Package list
|
||||||
|
PKGLIST="/share/thaw/info.lst"
|
||||||
|
# Package list name (could change in the future)
|
||||||
|
PKGLISTNAME="info.lst"
|
||||||
|
# Mirror file
|
||||||
|
MIRRORFILE="/share/thaw/mirror.txt"
|
||||||
|
# TCZ mount point
|
||||||
|
TCZMOUNT="/mnt/pkg"
|
||||||
|
# Temp path
|
||||||
|
TMPPATH="/tmp/thaw"
|
||||||
|
# Installed package dir
|
||||||
|
INSTALLEDPKG="/share/thaw/installed"
|
||||||
|
|
||||||
|
if [ $(id -u) != "0" ]; then
|
||||||
|
echo "Error: must be root to operate this command."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check Thaw root directory
|
||||||
|
if [ ! -d "$TCZMOUNT" ]; then
|
||||||
|
mkdir $TCZMOUNT
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check Thaw tmp directory
|
||||||
|
if [ ! -d "$TMPPATH" ]; then
|
||||||
|
mkdir $TMPPATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if any packages are installed, if not fix before break
|
||||||
|
if [ ! -d "$INSTALLEDPKG" ]; then
|
||||||
|
mkdir $INSTALLEDPKG
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
get-install )
|
||||||
|
echo ""
|
||||||
|
# check package list
|
||||||
|
if [ ! -s $PKGLIST ]; then
|
||||||
|
rm $PKGLIST
|
||||||
|
echo "Getting package list... "
|
||||||
|
wget $(cat $MIRRORFILE)/$PKGLISTNAME -P $THAWROOT
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check if package is already installed
|
||||||
|
if [ -f "$INSTALLEDPKG/$2" ]; then
|
||||||
|
echo "${2} is already installed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $TMPPATH/$2 ]; then
|
||||||
|
mkdir $TMPPATH/$2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check to see if package exists, if so download
|
||||||
|
echo "Checking ${2}'s existence... "
|
||||||
|
if grep "$2" $PKGLIST > /dev/null
|
||||||
|
then
|
||||||
|
echo ""
|
||||||
|
echo "Downloading ${2}..."
|
||||||
|
|
||||||
|
wget $(cat $MIRRORFILE)/$2.tcz -P $TMPPATH/$2
|
||||||
|
wget $(cat $MIRRORFILE)/$2.tcz.dep -P $TMPPATH/$2
|
||||||
|
else
|
||||||
|
echo "${2} was not found in repository."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Examine dependencies for package
|
||||||
|
if [ -f "$TMPPATH/$2/$2.tcz.dep" ]; then
|
||||||
|
i=1
|
||||||
|
echo ""
|
||||||
|
echo "++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
echo "Examining dependencies... "
|
||||||
|
echo "++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
while read line; do
|
||||||
|
if [ -f "$INSTALLEDPKG/$line" ]; then
|
||||||
|
echo "$line - INSTALLED"
|
||||||
|
else
|
||||||
|
echo "$line"
|
||||||
|
fi
|
||||||
|
done < $TMPPATH/$2/$2.tcz.dep
|
||||||
|
echo "++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
echo "Installing dependencies..."
|
||||||
|
echo "++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
while read line; do
|
||||||
|
if [ -f "$INSTALLEDPKG/$line" ]; then
|
||||||
|
echo "${line} already installed"
|
||||||
|
else
|
||||||
|
echo "Installing ${line} for ${2}"
|
||||||
|
thaw get-install ${line%.tcz}
|
||||||
|
fi
|
||||||
|
done < $TMPPATH/$2/$2.tcz.dep
|
||||||
|
echo "++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Extracting package to tmp... "
|
||||||
|
|
||||||
|
mount -o loop $TMPPATH/$2/$2.tcz $TCZMOUNT
|
||||||
|
status_serious
|
||||||
|
|
||||||
|
echo -n "Installing ${2}..."
|
||||||
|
if [ -f "$TMPPATH/$2/$2.tcz.dep" ]; then
|
||||||
|
rm $TMPPATH/$2/$2.tcz.dep
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -av $TCZMOUNT/* /
|
||||||
|
status_serious
|
||||||
|
|
||||||
|
#if [ -f "$TMPPATH/$2/execute.sh" ]; then
|
||||||
|
# echo "Running ${2}'s execution script..."
|
||||||
|
# $TMPPATH/$2/execute.sh
|
||||||
|
#fi
|
||||||
|
|
||||||
|
#if [ -f "/execute.sh" ]; then
|
||||||
|
# rm /execute.sh
|
||||||
|
#fi
|
||||||
|
|
||||||
|
echo -n "Cleaning up..."
|
||||||
|
rm -r $TMPPATH/$2
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Marking ${2} in the installation database..."
|
||||||
|
touch $INSTALLEDPKG/$2
|
||||||
|
status
|
||||||
|
|
||||||
|
echo "${2} Installed!"
|
||||||
|
echo ""
|
||||||
|
;;
|
||||||
|
|
||||||
|
update )
|
||||||
|
if [ -f $PKGLIST ]; then
|
||||||
|
rm $PKGLIST
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Getting package list... "
|
||||||
|
wget $(cat $MIRRORFILE)/$PKGLISTNAME -P $THAWROOT
|
||||||
|
status_serious
|
||||||
|
;;
|
||||||
|
|
||||||
|
search )
|
||||||
|
if [ ! -s $PKGLIST ]; then
|
||||||
|
rm $PKGLIST
|
||||||
|
echo "Getting package list... "
|
||||||
|
wget $(cat $MIRRORFILE)/$PKGLISTNAME -P $THAWROOT
|
||||||
|
status_serious
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Searching results..."
|
||||||
|
echo "++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
grep -i "$2" $PKGLIST
|
||||||
|
echo "++++++++++++++++++++++++++++++++++++++++"
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
* )
|
||||||
|
echo "Usage:
|
||||||
|
thaw get-install <package> : Install a package
|
||||||
|
thaw update : Update system package list
|
||||||
|
thaw search <query> : Search for a package in the database
|
||||||
|
"
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,13 @@
|
||||||
|
# config
|
||||||
|
LOG_KERNEL="yes"
|
||||||
|
KMAP="en_US"
|
||||||
|
SYSLOGD_LENGTH="40"
|
||||||
|
NETINTERFACE="eth0"
|
||||||
|
NETTYPE="dynamic"
|
||||||
|
NORMAL="\e[0m"
|
||||||
|
RED="\e[0;31m"
|
||||||
|
GREEN="\e[0;32m"
|
||||||
|
BLUE="\e[0;34m"
|
||||||
|
YELLOW="\e[1;33m"
|
||||||
|
MAGENTA="\e[0;35m"
|
||||||
|
CYAN="\e[0;36m"
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Static network config
|
||||||
|
|
||||||
|
IP="192.168.0.6"
|
||||||
|
MASK="255.255.255.0"
|
||||||
|
GATEWAY="192.168.0.1"
|
||||||
|
DNS_SERVER="192.168.0.1"
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
status_serious()
|
||||||
|
{
|
||||||
|
local CHECK=$?
|
||||||
|
echo -en "\033[68G"
|
||||||
|
if [ $CHECK = 0 ] ; then
|
||||||
|
echo -e "[ \e[0;32mOK\e[0m ]"
|
||||||
|
else
|
||||||
|
echo -e "[ \e[0;31mFAILED\e[0m ]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
status()
|
||||||
|
{
|
||||||
|
local CHECK=$?
|
||||||
|
echo -en "\033[68G"
|
||||||
|
if [ $CHECK = 0 ] ; then
|
||||||
|
echo -e "[ \e[0;32mOK\e[0m ]"
|
||||||
|
else
|
||||||
|
echo -e "[ \e[0;31mFAILED\e[0m ]"
|
||||||
|
echo "Errors where found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Start dropbear services - Freon Linux
|
||||||
|
|
||||||
|
. /etc/conf.d/status
|
||||||
|
|
||||||
|
DROPBEAR_PORT=22
|
||||||
|
DROPBEAR_RSAKEY=/etc/dropbear/dropbear_rsa_host_key
|
||||||
|
DROPBEAR_DSSKEY=/etc/dropbear/dropbear_dss_host_key
|
||||||
|
DROPBEAR_RECEIVE_WINDOW=65535
|
||||||
|
|
||||||
|
if [ ! -f /etc/dropbear/dropbear_rsa_host_key ]; then
|
||||||
|
dropbearkey -t rsa -f $DROPBEAR_RSAKEY
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /etc/dropbear/dropbear_dss_host_key ]; then
|
||||||
|
dropbearkey -t dss -f $DROPBEAR_DSSKEY
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
start ) echo -n "Starting dropbear services..."; dropbear -d $DROPBEAR_DSSKEY -r $DROPBEAR_RSAKEY -p $DROPBEAR_PORT -W $DROPBEAR_RECEIVE_WINDOW; status;;
|
||||||
|
stop ) echo -n "Stopping dropbear services..."; killall dropbear; status;;
|
||||||
|
* ) echo "Usage: dropbear [start|stop].";;
|
||||||
|
esac
|
|
@ -0,0 +1,92 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. /etc/conf.d/status
|
||||||
|
. /etc/conf.d/main.conf
|
||||||
|
. /etc/conf.d/static_network.conf
|
||||||
|
|
||||||
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
||||||
|
export LD_LIBRARY_PATH=/lib:/lib64:/usr/lib
|
||||||
|
|
||||||
|
# clear
|
||||||
|
clear
|
||||||
|
|
||||||
|
# Welcome message!
|
||||||
|
echo "Welcome to Freon Linux!"
|
||||||
|
|
||||||
|
# mount proc on boot
|
||||||
|
echo -n "Mounting /proc..."
|
||||||
|
/bin/mount -t proc proc /proc -o nosuid,noexec,nodev
|
||||||
|
status
|
||||||
|
|
||||||
|
# mount /sys
|
||||||
|
echo -n "Mounting /sys..."
|
||||||
|
/bin/mount -t sysfs sys /sys -o nosuid,noexec,nodev
|
||||||
|
status
|
||||||
|
|
||||||
|
# Remount rootfs with read and write
|
||||||
|
echo -n "Remounting rootfs... "
|
||||||
|
/bin/mount -o remount,rw / > /dev/null
|
||||||
|
status
|
||||||
|
|
||||||
|
echo -n "Checking some local paths..."
|
||||||
|
|
||||||
|
# Check if mtab is linked to mounts
|
||||||
|
if [ ! -L /etc/mtab ]; then
|
||||||
|
ln -s /proc/mounts /etc/mtab
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check to see if keymap exists
|
||||||
|
if [ ! -f /usr/share/kmap/$KMAP.kmap ]; then
|
||||||
|
/bin/dumpkmap > /usr/share/kmap/$KMAP.kmap
|
||||||
|
fi
|
||||||
|
|
||||||
|
status
|
||||||
|
|
||||||
|
# Deal with mdev
|
||||||
|
/sbin/mdev -s
|
||||||
|
echo /sbin/mdev > /proc/sys/kernel/hotplug
|
||||||
|
|
||||||
|
# Set hostname
|
||||||
|
echo -n "Setting hostname... "
|
||||||
|
/bin/hostname -F /etc/hostname > /dev/null
|
||||||
|
status
|
||||||
|
|
||||||
|
# Configure network loopback
|
||||||
|
echo -n "Configuring network loopback... "
|
||||||
|
/sbin/ifconfig lo 127.0.0.1 up
|
||||||
|
/sbin/route add 127.0.0.1 lo
|
||||||
|
status
|
||||||
|
|
||||||
|
# Get eth0 linked up
|
||||||
|
echo -n "Prepare $NETINTERFACE... "
|
||||||
|
/sbin/ifconfig $NETINTERFACE up > /dev/null
|
||||||
|
status
|
||||||
|
|
||||||
|
# Start network
|
||||||
|
if [ "$NETTYPE" = "dynamic" ] ; then
|
||||||
|
echo -n "Starting UDHCPC... "
|
||||||
|
/sbin/udhcpc -b -i $NETINTERFACE -p /var/run/udhcpc.$NETINTERFACE.pid > /dev/null
|
||||||
|
status
|
||||||
|
else
|
||||||
|
echo -n "Static IP set, starting $IP on $NETINTERFACE... "
|
||||||
|
/sbin/ifconfig $NETINTERFACE $IP netmask $MASK up
|
||||||
|
/sbin/route add default gateway $GATEWAY
|
||||||
|
echo -n "nameserver $DNS_SERVER" > /etc/resolv.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "Loading Keymap..."
|
||||||
|
/sbin/loadkmap < /usr/share/kmap/$KMAP.kmap
|
||||||
|
status
|
||||||
|
|
||||||
|
/etc/init.d/dropbear start
|
||||||
|
|
||||||
|
/etc/init.d/chttpd start
|
||||||
|
|
||||||
|
export TERM="xterm"
|
||||||
|
export TERMINFO="/share/terminfo"
|
||||||
|
|
||||||
|
# clear screen before getty is enabled
|
||||||
|
clear
|
||||||
|
|
||||||
|
# Show login prompt
|
||||||
|
getty 9600 tty1
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,282 @@
|
||||||
|
#! /bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Generate grub.cfg by inspecting /boot contents.
|
||||||
|
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# GRUB is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# GRUB is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
datarootdir="/share"
|
||||||
|
|
||||||
|
prefix=""
|
||||||
|
exec_prefix=""
|
||||||
|
sbindir="/sbin"
|
||||||
|
bindir="/bin"
|
||||||
|
sysconfdir="/etc"
|
||||||
|
PACKAGE_NAME=GRUB
|
||||||
|
PACKAGE_VERSION=2.02~rc2
|
||||||
|
host_os=gnu-linux
|
||||||
|
datadir="/"
|
||||||
|
if [ "x$pkgdatadir" = x ]; then
|
||||||
|
pkgdatadir="${datadir}/@PACKAGE@"
|
||||||
|
fi
|
||||||
|
# export it for scripts
|
||||||
|
export pkgdatadir
|
||||||
|
|
||||||
|
grub_cfg=""
|
||||||
|
grub_mkconfig_dir="${sysconfdir}"/grub.d
|
||||||
|
|
||||||
|
self=`basename $0`
|
||||||
|
|
||||||
|
grub_probe="${sbindir}/@grub_probe@"
|
||||||
|
grub_file="${bindir}/@grub_file@"
|
||||||
|
grub_editenv="${bindir}/@grub_editenv@"
|
||||||
|
grub_script_check="${bindir}/@grub_script_check@"
|
||||||
|
|
||||||
|
export TEXTDOMAIN=@PACKAGE@
|
||||||
|
export TEXTDOMAINDIR="@localedir@"
|
||||||
|
|
||||||
|
. "${pkgdatadir}/grub-mkconfig_lib"
|
||||||
|
|
||||||
|
# Usage: usage
|
||||||
|
# Print the usage.
|
||||||
|
usage () {
|
||||||
|
gettext_printf "Usage: %s [OPTION]\n" "$self"
|
||||||
|
gettext "Generate a grub config file"; echo
|
||||||
|
echo
|
||||||
|
print_option_help "-o, --output=$(gettext FILE)" "$(gettext "output generated config to FILE [default=stdout]")"
|
||||||
|
print_option_help "-h, --help" "$(gettext "print this message and exit")"
|
||||||
|
print_option_help "-v, --version" "$(gettext "print the version information and exit")"
|
||||||
|
echo
|
||||||
|
gettext "Report bugs to <bug-grub@gnu.org>."; echo
|
||||||
|
}
|
||||||
|
|
||||||
|
argument () {
|
||||||
|
opt=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
gettext_printf "%s: option requires an argument -- \`%s'\n" "$self" "$opt" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo $1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check the arguments.
|
||||||
|
while test $# -gt 0
|
||||||
|
do
|
||||||
|
option=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
case "$option" in
|
||||||
|
-h | --help)
|
||||||
|
usage
|
||||||
|
exit 0 ;;
|
||||||
|
-V | --version)
|
||||||
|
echo "$self (${PACKAGE_NAME}) ${PACKAGE_VERSION}"
|
||||||
|
exit 0 ;;
|
||||||
|
-o | --output)
|
||||||
|
grub_cfg=`argument $option "$@"`; shift;;
|
||||||
|
--output=*)
|
||||||
|
grub_cfg=`echo "$option" | sed 's/--output=//'`
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
# Explicitly ignore non-option arguments, for compatibility.
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "x$EUID" = "x" ] ; then
|
||||||
|
EUID=`id -u`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$EUID" != 0 ] ; then
|
||||||
|
root=f
|
||||||
|
case "`uname 2>/dev/null`" in
|
||||||
|
CYGWIN*)
|
||||||
|
# Cygwin: Assume root if member of admin group
|
||||||
|
for g in `id -G 2>/dev/null` ; do
|
||||||
|
case $g in
|
||||||
|
0|544) root=t ;;
|
||||||
|
esac
|
||||||
|
done ;;
|
||||||
|
esac
|
||||||
|
if [ $root != t ] ; then
|
||||||
|
gettext_printf "%s: You must run this as root\n" "$self" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
set $grub_probe dummy
|
||||||
|
if test -f "$1"; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
gettext_printf "%s: Not found.\n" "$1" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Device containing our userland. Typically used for root= parameter.
|
||||||
|
GRUB_DEVICE="`${grub_probe} --target=device /`"
|
||||||
|
GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true
|
||||||
|
|
||||||
|
# Device containing our /boot partition. Usually the same as GRUB_DEVICE.
|
||||||
|
GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
|
||||||
|
GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
|
||||||
|
|
||||||
|
# Filesystem for the device containing our userland. Used for stuff like
|
||||||
|
# choosing Hurd filesystem module.
|
||||||
|
GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
|
||||||
|
|
||||||
|
if [ x"$GRUB_FS" = xunknown ]; then
|
||||||
|
GRUB_FS="$(stat -f --printf=%T / || echo unknown)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f ${sysconfdir}/default/grub ; then
|
||||||
|
. ${sysconfdir}/default/grub
|
||||||
|
fi
|
||||||
|
|
||||||
|
# XXX: should this be deprecated at some point?
|
||||||
|
if [ "x${GRUB_TERMINAL}" != "x" ] ; then
|
||||||
|
GRUB_TERMINAL_INPUT="${GRUB_TERMINAL}"
|
||||||
|
GRUB_TERMINAL_OUTPUT="${GRUB_TERMINAL}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
termoutdefault=0
|
||||||
|
if [ "x${GRUB_TERMINAL_OUTPUT}" = "x" ]; then
|
||||||
|
GRUB_TERMINAL_OUTPUT=gfxterm;
|
||||||
|
termoutdefault=1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
for x in ${GRUB_TERMINAL_OUTPUT}; do
|
||||||
|
case "x${x}" in
|
||||||
|
xgfxterm) ;;
|
||||||
|
xconsole | xserial | xofconsole | xvga_text)
|
||||||
|
# make sure all our children behave in conformance with ascii..
|
||||||
|
export LANG=C;;
|
||||||
|
*) echo "Invalid output terminal \"${GRUB_TERMINAL_OUTPUT}\"" >&2 ; exit 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
GRUB_ACTUAL_DEFAULT="$GRUB_DEFAULT"
|
||||||
|
|
||||||
|
if [ "x${GRUB_ACTUAL_DEFAULT}" = "xsaved" ] ; then GRUB_ACTUAL_DEFAULT="`"${grub_editenv}" - list | sed -n '/^saved_entry=/ s,^saved_entry=,,p'`" ; fi
|
||||||
|
|
||||||
|
|
||||||
|
# These are defined in this script, export them here so that user can
|
||||||
|
# override them.
|
||||||
|
export GRUB_DEVICE \
|
||||||
|
GRUB_DEVICE_UUID \
|
||||||
|
GRUB_DEVICE_BOOT \
|
||||||
|
GRUB_DEVICE_BOOT_UUID \
|
||||||
|
GRUB_FS \
|
||||||
|
GRUB_FONT \
|
||||||
|
GRUB_PRELOAD_MODULES \
|
||||||
|
GRUB_ACTUAL_DEFAULT
|
||||||
|
|
||||||
|
# These are optional, user-defined variables.
|
||||||
|
export GRUB_DEFAULT \
|
||||||
|
GRUB_HIDDEN_TIMEOUT \
|
||||||
|
GRUB_HIDDEN_TIMEOUT_QUIET \
|
||||||
|
GRUB_TIMEOUT \
|
||||||
|
GRUB_TIMEOUT_STYLE \
|
||||||
|
GRUB_DEFAULT_BUTTON \
|
||||||
|
GRUB_HIDDEN_TIMEOUT_BUTTON \
|
||||||
|
GRUB_TIMEOUT_BUTTON \
|
||||||
|
GRUB_TIMEOUT_STYLE_BUTTON \
|
||||||
|
GRUB_BUTTON_CMOS_ADDRESS \
|
||||||
|
GRUB_BUTTON_CMOS_CLEAN \
|
||||||
|
GRUB_DISTRIBUTOR \
|
||||||
|
GRUB_CMDLINE_LINUX \
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT \
|
||||||
|
GRUB_CMDLINE_XEN \
|
||||||
|
GRUB_CMDLINE_XEN_DEFAULT \
|
||||||
|
GRUB_CMDLINE_LINUX_XEN_REPLACE \
|
||||||
|
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT \
|
||||||
|
GRUB_CMDLINE_NETBSD \
|
||||||
|
GRUB_CMDLINE_NETBSD_DEFAULT \
|
||||||
|
GRUB_CMDLINE_GNUMACH \
|
||||||
|
GRUB_TERMINAL_INPUT \
|
||||||
|
GRUB_TERMINAL_OUTPUT \
|
||||||
|
GRUB_SERIAL_COMMAND \
|
||||||
|
GRUB_DISABLE_LINUX_UUID \
|
||||||
|
GRUB_DISABLE_RECOVERY \
|
||||||
|
GRUB_VIDEO_BACKEND \
|
||||||
|
GRUB_GFXMODE \
|
||||||
|
GRUB_BACKGROUND \
|
||||||
|
GRUB_THEME \
|
||||||
|
GRUB_GFXPAYLOAD_LINUX \
|
||||||
|
GRUB_DISABLE_OS_PROBER \
|
||||||
|
GRUB_INIT_TUNE \
|
||||||
|
GRUB_SAVEDEFAULT \
|
||||||
|
GRUB_ENABLE_CRYPTODISK \
|
||||||
|
GRUB_BADRAM \
|
||||||
|
GRUB_OS_PROBER_SKIP_LIST \
|
||||||
|
GRUB_DISABLE_SUBMENU
|
||||||
|
|
||||||
|
if test "x${grub_cfg}" != "x"; then
|
||||||
|
rm -f "${grub_cfg}.new"
|
||||||
|
oldumask=$(umask); umask 077
|
||||||
|
exec > "${grub_cfg}.new"
|
||||||
|
umask $oldumask
|
||||||
|
fi
|
||||||
|
gettext "Generating grub configuration file ..." >&2
|
||||||
|
echo >&2
|
||||||
|
|
||||||
|
cat << EOF
|
||||||
|
#
|
||||||
|
# DO NOT EDIT THIS FILE
|
||||||
|
#
|
||||||
|
# It is automatically generated by $self using templates
|
||||||
|
# from ${grub_mkconfig_dir} and settings from ${sysconfdir}/default/grub
|
||||||
|
#
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
for i in "${grub_mkconfig_dir}"/* ; do
|
||||||
|
case "$i" in
|
||||||
|
# emacsen backup files. FIXME: support other editors
|
||||||
|
*~) ;;
|
||||||
|
# emacsen autosave files. FIXME: support other editors
|
||||||
|
*/\#*\#) ;;
|
||||||
|
*)
|
||||||
|
if grub_file_is_not_garbage "$i" && test -x "$i" ; then
|
||||||
|
echo
|
||||||
|
echo "### BEGIN $i ###"
|
||||||
|
"$i"
|
||||||
|
echo "### END $i ###"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test "x${grub_cfg}" != "x" ; then
|
||||||
|
if ! ${grub_script_check} ${grub_cfg}.new; then
|
||||||
|
# TRANSLATORS: %s is replaced by filename
|
||||||
|
gettext_printf "Syntax errors are detected in generated GRUB config file.
|
||||||
|
Ensure that there are no errors in /etc/default/grub
|
||||||
|
and /etc/grub.d/* files or please file a bug report with
|
||||||
|
%s file attached." "${grub_cfg}.new" >&2
|
||||||
|
echo >&2
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# none of the children aborted with error, install the new grub.cfg
|
||||||
|
mv -f ${grub_cfg}.new ${grub_cfg}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
gettext "done" >&2
|
||||||
|
echo >&2
|
|
@ -0,0 +1 @@
|
||||||
|
http://192.168.0.57/pub/freon/pkgs
|
|
@ -0,0 +1,63 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
|
||||||
|
|
||||||
|
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
|
||||||
|
|
||||||
|
RESOLV_CONF="/etc/resolv.conf"
|
||||||
|
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
|
||||||
|
[ -n "$subnet" ] && NETMASK="netmask $subnet"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
deconfig)
|
||||||
|
grep -q -v ip= /proc/cmdline
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
/sbin/ifconfig $interface up
|
||||||
|
fi
|
||||||
|
grep -q -v nfsroot= /proc/cmdline
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
/sbin/ifconfig $interface 0.0.0.0
|
||||||
|
fi
|
||||||
|
if [ -x /usr/sbin/avahi-autoipd ]; then
|
||||||
|
/usr/sbin/avahi-autoipd -k $interface
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
leasefail|nak)
|
||||||
|
if [ -x /usr/sbin/avahi-autoipd ]; then
|
||||||
|
/usr/sbin/avahi-autoipd -wD $interface --no-chroot
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
renew|bound)
|
||||||
|
if [ -x /usr/sbin/avahi-autoipd ]; then
|
||||||
|
/usr/sbin/avahi-autoipd -k $interface
|
||||||
|
fi
|
||||||
|
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
|
||||||
|
|
||||||
|
if [ -n "$router" ] ; then
|
||||||
|
echo "deleting routers"
|
||||||
|
while route del default gw 0.0.0.0 dev $interface ; do
|
||||||
|
:
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in $router ; do
|
||||||
|
route add default gw $i dev $interface
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /root/.xbmc/myResolv.conf ] ; then
|
||||||
|
echo overriding dns with myResolv.conf
|
||||||
|
cp -f /root/.xbmc/myResolv.conf $RESOLV_CONF
|
||||||
|
else
|
||||||
|
echo -n > $RESOLV_CONF
|
||||||
|
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
|
||||||
|
for i in $dns ; do
|
||||||
|
echo adding dns $i
|
||||||
|
echo nameserver $i >> $RESOLV_CONF
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
tar -vcf $1.tar $1
|
||||||
|
xz -z $1.tar
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Packing $1"
|
||||||
|
cd $1/
|
||||||
|
tar -czf $1.tgz *
|
||||||
|
mv $1.tgz ../
|
||||||
|
cd ..
|
||||||
|
mv $1.tgz $1.pak
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sort -t $'\t' -k5,5rn package.list
|
Loading…
Reference in New Issue