diff options
-rwxr-xr-x | mltk | 33 | ||||
-rw-r--r-- | remote/.setup_tools.swp | bin | 0 -> 16384 bytes | |||
-rwxr-xr-x | remote/setup_tools | 10 | ||||
-rw-r--r-- | remote/tools/xorg/.xorg.conf.swp | bin | 0 -> 12288 bytes | |||
-rw-r--r-- | remote/tools/xorg/xorg.build | 34 | ||||
-rw-r--r-- | remote/tools/xorg/xorg.conf | 27 |
6 files changed, 90 insertions, 14 deletions
@@ -1,4 +1,6 @@ +#!/bin/bash # ----------------------------------------------------------------------------- +# # Copyright (c) 2011 - OpenSLX GmbH # # This program is free software distributed under the GPL version 2. @@ -13,27 +15,38 @@ # Mini-Linux Toolkit # # ----------------------------------------------------------------------------- -#!/bin/bash - SELF=$(readlink -f $0) ROOT_DIR=$(dirname ${SELF}) +banner () { + echo -e "\t __ __ __ " + echo -e "\t.--------.| | | |_| |--." + echo -e "\t| || |_| _| < " + echo -e "\t|__|__|__||____|____|__|__|" + echo -e "\t " + echo -e "\t ** OpenSLX Project // 2011 **" + echo -e "\t http://lab.openslx.org/" + echo -e "" +} + print_usage() { echo "Toolkit for creating preboot mini-linux for OpenSLX NG (mltk)" echo "Usage: $(basename ${SELF}) MODULE [OPTION]" - echo -e " MODULE:" - echo -e " \t core \t minimal initramfs (stage 3.1) to mount the system-container (stage 3.2)." - echo -e " \t tools \t minimal systemd-based rootfs including basic tools." + echo " MODULE:" + echo -e " core \t minimal initramfs (stage 3.1) to mount the system-container (stage 3.2)." + echo -e " tools \t minimal systemd-based rootfs including basic tools." echo -e " OPTION:" - echo -e " \t build \t builds [MODULE]" - echo -e " \t clean \t clean build files for [MODULE]" + echo -e " build \t builds [MODULE]" + echo -e " clean \t clean build files for [MODULE]" echo -e "" echo -e " Module specific option:" - echo -e " \t tools \t build [TOOL]" - echo -e " \t \t TOOL can be: \t base, busybox, dbus, udev, systemd, plymouth" + echo -e " tools \t build [TOOL]" + echo -e " TOOL can be: \t base, busybox, dbus, udev, systemd, plymouth" } +banner + if [ "x$1" = "x" ]; then print_usage exit 0 @@ -58,7 +71,7 @@ if [ "x$1" = "xcore" ]; then exit 1 fi elif [ "x$1" = "xtools" ]; then - [ -e ${SETUP_TOOLS} ] && . ${SETUP_TOOLS} + [ -e ${SETUP_TOOLS} ] && . $SETUP_TOOLS shift if [ "x$1" = "xbuild" ]; then # shift away first 2 parameters diff --git a/remote/.setup_tools.swp b/remote/.setup_tools.swp Binary files differnew file mode 100644 index 00000000..c2db4851 --- /dev/null +++ b/remote/.setup_tools.swp diff --git a/remote/setup_tools b/remote/setup_tools index 95e3e0a9..f04f082c 100755 --- a/remote/setup_tools +++ b/remote/setup_tools @@ -49,10 +49,12 @@ copyfileswithdependencies () for FILENAME in ${REQUIRED_BINARIES} do - for f in $(find . -name ${FILENAME} -type f -executable) - do - [ $(file $f |grep -c ELF) -eq 1 ] && FILE=$f - done + FILE=$(find . -name ${FILENAME} -type f -executable | xargs grep -l ELF) + if [ -z "$FILE" ]; then + echo "No Binary found for ${FILENAME}. Skipping." + echo "-----------------------------------------------------------------" + continue + fi echo "Found ${FILENAME} at ${FILE}. Searching libraries..." echo ${FILE} >> ${COPYFILES_LIST} # fetch dependencies diff --git a/remote/tools/xorg/.xorg.conf.swp b/remote/tools/xorg/.xorg.conf.swp Binary files differnew file mode 100644 index 00000000..166943d9 --- /dev/null +++ b/remote/tools/xorg/.xorg.conf.swp diff --git a/remote/tools/xorg/xorg.build b/remote/tools/xorg/xorg.build new file mode 100644 index 00000000..4f8e950d --- /dev/null +++ b/remote/tools/xorg/xorg.build @@ -0,0 +1,34 @@ +#!/bin/bash + +install_dependencies() { + echo "No dependencies." +} + +fetch_source() { + echo "Extracting from running system..." +} + +build() { + + BUILDDIR=$TOOL_DIR/$TOOL/build + + COPYLIST="list_dpkg_output" + [ -e $COPYLIST ] && rm $COPYLIST + + for PACKAGE in ${REQUIRED_PACKAGES} + do + for FILE in $(dpkg -L ${PACKAGE} | grep -v share/doc | grep -v share/man) + do + [ ! -d $FILE ] && echo $FILE >> $COPYLIST + done + done + + # prepare target dir & copy there + [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR + tar -cpv $(cat $COPYLIST|sort -u) | tar -xpv -C $BUILDDIR + +} + +post_copy() { + : +} diff --git a/remote/tools/xorg/xorg.conf b/remote/tools/xorg/xorg.conf new file mode 100644 index 00000000..db547648 --- /dev/null +++ b/remote/tools/xorg/xorg.conf @@ -0,0 +1,27 @@ +REQUIRED_PACKAGES=" xserver-xorg + xserver-xorg-core + xserver-xorg-video-intel + xserver-xorg-video-openchrome + xserver-xorg-video-savage + xserver-xorg-video-trident + xserver-xorg-video-ati + xserver-xorg-video-mach64 + xserver-xorg-video-qxl + xserver-xorg-video-siliconmotion + xserver-xorg-video-vesa + xserver-xorg-video-cirrus + xserver-xorg-video-mga + xserver-xorg-video-r128 + xserver-xorg-video-sis + xserver-xorg-video-vmware + xserver-xorg-video-fbdev + xserver-xorg-video-neomagic + xserver-xorg-video-radeon + xserver-xorg-video-sisusb + xserver-xorg-video-geode + xserver-xorg-video-nouveau + xserver-xorg-video-s3 + xserver-xorg-video-tdfx" +REQUIRED_BINARIES=" Xorg vmwarectrl gtf cvt X" +REQUIRED_DIRECTORIES="/lib/udev /usr/lib /usr/share/X11/xorg.conf.d" +REQUIRED_FILES="" |