summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2013-03-13 17:33:57 +0100
committerJonathan Bauer2013-03-13 17:33:57 +0100
commit1efcd9ce0605ed8694f621b9889843ceca673b10 (patch)
tree92890797e88f3f4e7153811f800b3acf87aa62be /remote
parentstage3.1 'debug' to drop a shell (diff)
downloadtm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.tar.gz
tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.tar.xz
tm-scripts-1efcd9ce0605ed8694f621b9889843ceca673b10.zip
plymouth for stage3.1
Diffstat (limited to 'remote')
-rw-r--r--remote/core/core.conf2
-rwxr-xr-xremote/core/data/init22
-rwxr-xr-xremote/setup_core25
-rwxr-xr-xremote/setup_tools49
-rw-r--r--remote/tools/plymouth/plymouth.build2
-rw-r--r--remote/tools/plymouth/plymouth.conf3
6 files changed, 85 insertions, 18 deletions
diff --git a/remote/core/core.conf b/remote/core/core.conf
index 40f6aedb..3298bfee 100644
--- a/remote/core/core.conf
+++ b/remote/core/core.conf
@@ -1,5 +1,6 @@
REQUIRED_MODULES=" kernel/drivers/video/sis/sisfb.ko
kernel/drivers/video/via/viafb.ko
+ kernel/drivers/video/uvesafb.ko
kernel/drivers/acpi/video.ko
kernel/drivers/ssb/ssb.ko
kernel/drivers/gpu/drm/ttm/ttm.ko
@@ -17,6 +18,7 @@ REQUIRED_MODULES=" kernel/drivers/video/sis/sisfb.ko
kernel/drivers/gpu/drm/mga/mga.ko
kernel/drivers/gpu/drm/i915/i915.ko
kernel/drivers/gpu/drm/r128/r128.ko
+ kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko
kernel/drivers/i2c/algos/i2c-algo-bit.ko
kernel/drivers/net/netconsole.ko
kernel/drivers/net/ethernet/realtek/8139too.ko
diff --git a/remote/core/data/init b/remote/core/data/init
index 54044938..25508e66 100755
--- a/remote/core/data/init
+++ b/remote/core/data/init
@@ -34,6 +34,8 @@ for opts in ${KCL}; do
case ${opts} in
debug*)
DEBUG=1;;
+ splash*)
+ SPLASH=1;;
ip=*)
# process IP info
ipinfo=${opts#ip=};;
@@ -47,13 +49,16 @@ done
while ps | grep -v grep | grep -q " hwinfo --gfxcard" ; do usleep 10 ; done
+# always load framebuffer
+modprobe uvesafb mode_option=1024x768-32 mtrr=3 scroll=ywrap
+
case $(cat /etc/hwinfo) in
*i915*)
modprobe -a i915 2>/dev/null
;;
*intel*|*Intel*)
modprobe -a i810 i830 i915 2>/dev/null
- ;;
+ ;;
*nvidia*|*NVidia*|*nouveau*)
modprobe -q nouveau 2>/dev/null
;;
@@ -63,13 +68,19 @@ case $(cat /etc/hwinfo) in
*mga*|*matrox*|*Matrox*)
modprobe -q mga 2>/dev/null
;;
- *VMWARE*)
- ;;
- *)
+ *VMWARE*)
+ modprove -q vmwgfx 2>/dev/null
+ ;;
+ *)
modprobe -qa r128 savage sis tdfx ttm via viafb
;;
esac
-( modprobe -a drm fbcon; mdev -s ) &
+(modprobe -a drm; mdev -s ) &
+
+if [ "x$SPLASH" == "x1" ]; then
+ # start plymouth
+ plymouthd && plymouth show-splash
+fi
# load required network and usb controller drivers, filter out wireless adaptors
while ps | grep -v grep | grep -q " hwinfo --netcard" ; do usleep 10 ; done
@@ -149,5 +160,6 @@ for mnt in proc sys run ; do
done
unset BOOT_IMAGE initrd
+[ "x$SPLASH" = "x1" ] && plymouth update-root-fs --new-root-dir=/mnt
# new style of pivoting (switch_root or run-init)
exec /sbin/switch_root -c /dev/console /mnt /usr/lib/systemd/systemd
diff --git a/remote/setup_core b/remote/setup_core
index 4f809968..31854db6 100755
--- a/remote/setup_core
+++ b/remote/setup_core
@@ -132,7 +132,30 @@ install_basic_tools() {
# get busybox from tools/ we checked earlier if its there.
pinfo "Copying busybox to ${STAGE31_DIR}."
cp -r "${MODULE_DIR}"/tools/busybox/build/openslx/* "${STAGE31_DIR}"
-
+
+ # install plymouth
+ pinfo "Copying plymouth to ${STAGE31_DIR}."
+ rm -f list.ply
+ cd "${MODULE_DIR}"/tools/plymouth/build
+ echo ./bin/plymouth >> list.ply
+ echo ./sbin/plymouthd >> list.ply
+ get_dynamic_dependencies -l "${MODULE_DIR}"/tools/plymouth/build ./bin/plymouth >> list.ply
+ get_dynamic_dependencies -l "${MODULE_DIR}"/tools/plymouth/build ./sbin/plymouthd >> list.ply
+ for i in $(find lib/plymouth -name \*.so); do
+ get_link_chain "${MODULE_DIR}"/tools/plymouth/build/"$i" "${MODULE_DIR}"/tools/plymouth/build >> list.ply
+ get_dynamic_dependencies -l "${MODULE_DIR}"/tools/plymouth/build $i >> list.ply
+ done
+ tarcopy "$(cat list.ply | sort -u)" "${STAGE31_DIR}"
+ cd - &> /dev/null
+ cp -r "${MODULE_DIR}"/tools/plymouth/data/* "${STAGE31_DIR}"
+
+ # copy debugging tools
+ STRACE=$(which strace)
+ [ "x${STRACE}" != "x" ] && tarcopy "$(get_link_chain ${STRACE})" "${STAGE31_DIR}"
+
+ LDD=$(which ldd)
+ [ "x${LDD}" != "x" ] && tarcopy "$(get_link_chain ${LDD})" "${STAGE31_DIR}"
+
# get hwinfo and the required libx86emu
[ ! -d "${MODULE_DIR}"/core/src ] && mkdir -p "${MODULE_DIR}"/core/src
cd "${MODULE_DIR}"/core/src
diff --git a/remote/setup_tools b/remote/setup_tools
index 63fa3f09..a009fdff 100755
--- a/remote/setup_tools
+++ b/remote/setup_tools
@@ -10,18 +10,27 @@ INIT_DIR="${MODULE_DIR}/stage3.2"
# Keep track of processed modules
PROCESSED_MODULES=""
-initial_checks ()
-{
+initial_checks () {
+
+ # check for target directory
+ [ -d $TARGET ] || perror "Given target directory does not exist: $TARGET"
+ [[ $TARGET == "${MODULE_DIR}"/build || $TARGET == "${MODULE_DIR}"/modules ]] && \
+ perror "Target directory 'modules' invalid, used internally."
+
+
+ # check for required tools
for BIN in git locate
do
local TEST=$(which ${BIN})
[ -z "$TEST" ] && pinfo "Installing $BIN..." && apt-get install $BIN
done
+
+
+
}
-read_config ()
-{
+read_config () {
unset REQUIRED_BINARIES
unset REQUIRED_LIBRARIES
unset REQUIRED_DIRECTORIES
@@ -43,8 +52,7 @@ read_config ()
fi
}
-read_build ()
-{
+read_build () {
local BUILD_SCRIPT="${TOOL_DIR}/${TOOL}/${TOOL}.build"
[ ! -e "${BUILD_SCRIPT}" ] && perror "Build script for specified tool not found."
@@ -52,8 +60,7 @@ read_build ()
. "${BUILD_SCRIPT}" || perror "Sourcing '${BUILD_SCRIPT}' failed."
}
-copyfileswithdependencies ()
-{
+copyfileswithdependencies () {
[ ! -d build ] && pinfo "No build directory found, skipping dependency copying" && return 0
cd build
@@ -132,6 +139,32 @@ copyfileswithdependencies ()
fi
}
+generate_target() {
+
+ [ "x$1" = "xstage31" -o "x$1" = "xstage32" ] || perror "generate_stage requires 'stage31' or 'stage32', but $1 given."
+
+ initial_checks
+
+ TARGET_DIR="${MODULE_DIR}/build/$1"
+
+
+ # copy basic libs
+ tarcopy "$(list_basic_libs)" "${MODULE_DIR}/build/$1"
+
+ # if no arguments assume all.
+ if [ "x$1" = "x" -o "x$1" = "xall" ]; then
+ tools=$(ls ${TOOL_DIR})
+ set -- $tools
+ fi
+
+ # now iterate over given tools and copy them
+ while (( "$#" )); do
+ process_module "$1"
+ shift
+ done
+ TOOL_STR=""
+}
+
generate_stage32 () {
initial_checks
diff --git a/remote/tools/plymouth/plymouth.build b/remote/tools/plymouth/plymouth.build
index 31ce3038..6b89f058 100644
--- a/remote/tools/plymouth/plymouth.build
+++ b/remote/tools/plymouth/plymouth.build
@@ -10,7 +10,7 @@ build() {
BUILDDIR=$TOOL_DIR/$TOOL/build
cd src/$VERSION
pinfo "Running configure"
- ./configure --enable-systemd-integration --disable-gtk --prefix="" || perror "failed."
+ ./configure --enable-systemd-integration --disable-gtk --disable-static --prefix="" || perror "failed."
pinfo "Running make"
make -j5 || perror "failed"
pinfo "Running make install"
diff --git a/remote/tools/plymouth/plymouth.conf b/remote/tools/plymouth/plymouth.conf
index 04144a0f..026aff9c 100644
--- a/remote/tools/plymouth/plymouth.conf
+++ b/remote/tools/plymouth/plymouth.conf
@@ -9,9 +9,6 @@ REQUIRED_BINARIES=" plymouth
plymouthd"
REQUIRED_DIRECTORIES=" /bin
/etc
- /include
/lib
- /libexec
/sbin
- /share/plymouth
/var"