summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Neves2013-04-24 18:19:49 +0200
committerMichael Neves2013-04-24 18:19:49 +0200
commit97472f07e21c73e9d767de7960dc1e05ba48b53d (patch)
treee4119718dbddd68664480436767fc12d4a319700
parentfix rsyslog (diff)
parentWe will require wpad for the future ... (diff)
downloadtm-scripts-97472f07e21c73e9d767de7960dc1e05ba48b53d.tar.gz
tm-scripts-97472f07e21c73e9d767de7960dc1e05ba48b53d.tar.xz
tm-scripts-97472f07e21c73e9d767de7960dc1e05ba48b53d.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
-rw-r--r--data/kernel.wanted.config8
-rw-r--r--helper/kernel.inc91
-rw-r--r--helper/system.inc4
-rwxr-xr-xmltk17
-rw-r--r--remote/modules/kernel/.gitignore3
-rw-r--r--remote/modules/kernel/kernel.build81
-rw-r--r--remote/modules/kernel/kernel.conf3
-rw-r--r--remote/modules/systemd/data/etc/systemd/system/udhcpc@.service2
-rw-r--r--remote/rootfs/rootfs-stage31/rootfs-stage31.build1
-rw-r--r--remote/rootfs/rootfs-stage31/rootfs-stage31.conf3
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.build2
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.conf1
-rw-r--r--remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper1
-rwxr-xr-xremote/setup_target10
l---------remote/targets/stage31/kernel1
l---------remote/targets/stage32/kernel1
-rwxr-xr-xserver/export_target4
17 files changed, 145 insertions, 88 deletions
diff --git a/data/kernel.wanted.config b/data/kernel.wanted.config
index 373d8b7a..35aceb6a 100644
--- a/data/kernel.wanted.config
+++ b/data/kernel.wanted.config
@@ -13,12 +13,7 @@ CONFIG_ATL2=y
CONFIG_ATP=y
CONFIG_AUFS_BDEV_LOOP=y
CONFIG_AUFS_BRANCH_MAX_127=y
-CONFIG_AUFS_EXPORT=y
CONFIG_AUFS_FS=y
-CONFIG_AUFS_HFSNOTIFY=y
-CONFIG_AUFS_HNOTIFY=y
-CONFIG_AUFS_INO_T_64=y
-CONFIG_AUFS_RDU=y
CONFIG_AUFS_SBILIST=y
CONFIG_B44_PCI_AUTOSELECT=y
CONFIG_B44_PCICORE_AUTOSELECT=y
@@ -242,6 +237,7 @@ CONFIG_NS83820=y
CONFIG_PARPORT=y
CONFIG_PCH_GBE=y
CONFIG_PCMCIA_XIRCOM=y
+CONFIG_PCNET32=y
CONFIG_QLA3XXX=y
CONFIG_QLCNIC=y
CONFIG_QLGE=y
@@ -285,6 +281,7 @@ CONFIG_TULIP=y
CONFIG_TYPHOON=y
CONFIG_UIO=y
CONFIG_ULI526X=y
+CONFIG_USB_HID=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_VGASTATE=y
@@ -298,3 +295,4 @@ CONFIG_VXGE=y
CONFIG_WINBOND_840=y
CONFIG_XFS_FS=y
CONFIG_ZNET=y
+CONFIG_KERNEL_XZ=y
diff --git a/helper/kernel.inc b/helper/kernel.inc
index 3d1e0dc0..41a9c507 100644
--- a/helper/kernel.inc
+++ b/helper/kernel.inc
@@ -15,48 +15,37 @@
# this code depends on KERNEL_VERSION, this file needs to be sourced after helper/system.inc!
# (TODO: maybe source system.inc if KERNEL_VERSION is empty.
-#[ -z "${KERNEL_VERSION}" ] && perror "KERNEL_VERSION not set. Was helper/system.inc sourced?"
-
-KERNEL_NFS_DIR=""
-mount_kernel_dir() {
- [ -z "$KERNEL_NFS_DIR" ] || return 0
- KERNEL_NFS_DIR="$(mktemp -d)"
- mount -t nfs -o ro "132.230.8.113:/srv/openslx/kernel" "$KERNEL_NFS_DIR"
- local RET=$?
- if [ "x$RET" != "x0" ]; then
- local BROKEN_KERNEL_NFS_DIR="${KERNEL_NFS_DIR}"
- KERNEL_NFS_DIR=""
- perror "Mounting kernel nfs dir to $BROKEN_KERNEL_NFS_DIR failed. Is 'nfs-common' installed?"
- exit 1
- fi
- #pinfo "$KERNEL_NFS_DIR/$SELECTED_KERNEL"
- #qnd_exit
- [ -d "$KERNEL_NFS_DIR/$SELECTED_KERNEL" ] || perror "directory for $KERNEL_VERSION ($SELECTED_KERNEL) does not exist on NFS server"
-}
-
-unmount_kernel_dir() {
- [ -z "$KERNEL_NFS_DIR" ] && return 0
- pinfo "Unmounting kernel nfs stuff....."
- umount "$KERNEL_NFS_DIR" || perror "Could not unmount kernel NFS share at '$KERNEL_NFS_DIR' - check the following lsof output:\n$(lsof -n | grep "$KERNEL_NFS_DIR")\n- End of lsof output -"
- rmdir "$KERNEL_NFS_DIR"
- KERNEL_NFS_DIR=""
+if [ -z "${KERNEL_VERSION}" ]; then
+ . ${ROOT_DIR}/helper/system.inc
+ [ -z "${KERNEL_VERSION}" ] && perror "KERNEL_VERSION still not set after sourcing, something is very wrong..."
+fi
+
+# set global KERNEL_TARGET_NAME
+KERNEL_TARGET_NAME="vmlinuz-${KERNEL_VERSION}-openslx"
+
+check_kernel_build_dir() {
+ [ -d "${MODULES_DIR}/kernel/build" ] && KERNEL_BUILD_DIR="${MODULES_DIR}/kernel/build" \
+ || perror "No build directory set for the kernel. Was is built?"
+ # hack to get the real path of the installed modules
+ KERNEL_NEW_VERSION=$(ls ${KERNEL_BUILD_DIR}/lib/modules)
}
copy_kernel_modules() {
[ -z "${REQUIRED_KERNEL_MODULES}" ] && perror "REQUIRED_KERNEL_MODULES is empty. Check your config file."
-
+ check_kernel_build_dir
#
# process modules list
- #
- mount_kernel_dir
- mkdir -p "${TARGET_BUILD_DIR}/${KERNEL_MODULES_DIR}"
- cd "$KERNEL_NFS_DIR/$SELECTED_KERNEL" || perror "Could not cd to $KERNEL_NFS_DIR/$SELECTED_KERNEL"
- local KERNEL_MODULES_DIR="lib/modules/${KERNEL_VERSION}"
+ #
+ # search for modules in KERNEL_BUILD_DIR
+ cd "${KERNEL_BUILD_DIR}" || perror "Could not cd to ${KERNEL_BUILD_DIR}"
+
+ local KERNEL_MODULES_DIR="lib/modules/${KERNEL_NEW_VERSION}"
local KERNEL_MODULES_LIST=""
+
for KERNEL_MODULE in ${REQUIRED_KERNEL_MODULES}; do
local KERNEL_MODULE_PATH="${KERNEL_MODULES_DIR}/${KERNEL_MODULE}"
- if grep "^${KERNEL_MODULE}$" "${KERNEL_NFS_DIR}/${SELECTED_KERNEL}/${KERNEL_MODULES_DIR}/modules.builtin" >/dev/null; then
+ if grep "^${KERNEL_MODULE}$" "${KERNEL_BUILD_DIR}/${KERNEL_MODULES_DIR}/modules.builtin" >/dev/null; then
pdebug "Already built-in ${KERNEL_MODULE}."
elif [ -e "${KERNEL_MODULE_PATH}" ]; then
pdebug "Copying '${KERNEL_MODULE_PATH}'"
@@ -82,7 +71,7 @@ copy_kernel_modules() {
# copy list of builtin kernel modules
cp "${KERNEL_MODULES_DIR}/modules.builtin" "${TARGET_BUILD_DIR}/${KERNEL_MODULES_DIR}"
# with modules.order and modules.builtin, we can run depmod for the rest of the files
- depmod -b "${TARGET_BUILD_DIR}" -a "${KERNEL_VERSION}"
+ depmod -b "${TARGET_BUILD_DIR}" -a "${KERNEL_NEW_VERSION}"
cd - >/dev/null
}
@@ -90,17 +79,16 @@ copy_kernel_modules() {
copy_firmware() {
[ -z "${REQUIRED_FIRMWARE}" ] && perror "REQUIRED_FIRMWARE is empty. Check your config file."
-
+ check_kernel_build_dir
#
# process firmware list
#
- mount_kernel_dir
- cd "$KERNEL_NFS_DIR/$SELECTED_KERNEL" || perror "Could not cd to $KERNEL_NFS_DIR/$SELECTED_KERNEL"
+ cd "${KERNEL_BUILD_DIR}" || perror "Could not cd!"
local FIRMWARE_DIR="lib/firmware"
local FIRMWARE_LIST=""
for FIRMWARE in ${REQUIRED_FIRMWARE}; do
local FOUND=0
- for CANDIDATE in "${FIRMWARE_DIR}/${FIRMWARE}" "${FIRMWARE_DIR}/${KERNEL_VERSION}/${FIRMWARE}"; do
+ for CANDIDATE in "${FIRMWARE_DIR}/${FIRMWARE}" "${FIRMWARE_DIR}/${KERNEL_NEW_VERSION}/${FIRMWARE}"; do
if [ -e "${CANDIDATE}" ]; then
pdebug "Copying '${CANDIDATE}'"
FIRMWARE_LIST+=" ${CANDIDATE}"
@@ -108,7 +96,7 @@ copy_firmware() {
fi
done
- [ $FOUND -ne 1 ] && pwarning "Neither '${FIRMWARE_DIR}/${FIRMWARE}' nor '${FIRMWARE_DIR}/${KERNEL_VERSION}/${FIRMWARE}' "\
+ [ $FOUND -ne 1 ] && pwarning "Neither '${FIRMWARE_DIR}/${FIRMWARE}' nor '${FIRMWARE_DIR}/${KERNEL_NEW_VERSION}/${FIRMWARE}' "\
" was found on the system. Skipping. (might cause problems on certain clients!)"
done
@@ -122,30 +110,13 @@ copy_firmware() {
copy_kernel() {
- local KERNEL_NAME="vmlinuz-${KERNEL_VERSION}"
-
local TOOL_STR="$TOOL_STR copy_kernel:"
- [ ! -d "${KERNEL_DIR}" ] && mkdir -p "${KERNEL_DIR}"
-
- pinfo "Copying '${KERNEL_NAME}' to '${KERNEL_DIR}'."
- mount_kernel_dir
-
- cp "$KERNEL_NFS_DIR/$SELECTED_KERNEL/bzImage" "$KERNEL_DIR/$KERNEL_NAME" || perror "Could not copy kernel from '$KERNEL_NFS_DIR/$SELECTED_KERNEL/bzImage' to '$KERNEL_DIR/$KERNEL_NAME'"
+ check_kernel_build_dir
+ local KERNEL_DIR="${MODE_DIR}/builds/kernel"
+ pinfo "Copying '${KERNEL_TARGET_NAME}' to '${KERNEL_DIR}'."
+ [ -d "${KERNEL_DIR}" ] || mkdir -p "${KERNEL_DIR}"
+ cp "${KERNEL_BUILD_DIR}/${KERNEL_TARGET_NAME}" "${KERNEL_DIR}" || perror "Could not copy kernel!"
pinfo "You may want to update your systems firmware/modules to match the current kernel."
}
-
-fetch_source() {
-
- if [ "x$PACKET_MANAGER" == "apt" ]; then
- apt-get source linux-image-${KERNEL_VERSION}
- elif [ "x$PACKET_MANAGER" == "zypper" ]; then
- # TODO
- :
- fi
-}
-build_kernel() {
- :
-}
-
diff --git a/helper/system.inc b/helper/system.inc
index 21e92422..4c0ea467 100644
--- a/helper/system.inc
+++ b/helper/system.inc
@@ -11,8 +11,8 @@ ARCH_LIB_DIR=$(ldd $SHELL | grep "libc.so" | sed -r 's#^.*(/lib.*)/libc.so.*$#\1
[ -z "$ARCH_LIB_DIR" -o ! -d "$ARCH_LIB_DIR" ] && perror "Could not determine arch dependent lib dir (where libc.so resides)"
# determine kernel version
-#KERNEL_VERSION=$(uname -r)
-#[ ! -z $KERNEL_VERSION ] || pwarning "Could not determine kernel version."
+KERNEL_VERSION=$(uname -r)
+[ ! -z $KERNEL_VERSION ] || pwarning "Could not determine kernel version."
# determine number of CPU cores
CPU_CORES=$(cat /proc/cpuinfo | grep processor | wc -l)
diff --git a/mltk b/mltk
index 35ddac5a..137b4969 100755
--- a/mltk
+++ b/mltk
@@ -34,13 +34,13 @@ for HELPER in $ROOT_DIR/helper/*.inc; do
done
# TODO: Configurable!
-if [ "$(uname -p)" = "x86_64" ]; then
- KERNEL_VERSION="3.4.0-1.16-default+"
- SELECTED_KERNEL="x86_64/$KERNEL_VERSION"
-else
- KERNEL_VERSION="3.4.0-1.16-default"
- SELECTED_KERNEL="x86_32/$KERNEL_VERSION"
-fi
+#if [ "$(uname -p)" = "x86_64" ]; then
+# KERNEL_VERSION="3.2.40"
+# SELECTED_KERNEL="x86_64/$KERNEL_VERSION"
+#else
+# KERNEL_VERSION="3.2.40"
+# SELECTED_KERNEL="x86_32/$KERNEL_VERSION"
+#fi
banner () {
echo -e "\033[38;5;202m\t __ __ __ "
@@ -237,6 +237,3 @@ initial_checks
read_params $@
run
-
-unmount_kernel_dir
-
diff --git a/remote/modules/kernel/.gitignore b/remote/modules/kernel/.gitignore
new file mode 100644
index 00000000..56c69270
--- /dev/null
+++ b/remote/modules/kernel/.gitignore
@@ -0,0 +1,3 @@
+ksrc
+linux*
+openslx.config
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
new file mode 100644
index 00000000..8b238abf
--- /dev/null
+++ b/remote/modules/kernel/kernel.build
@@ -0,0 +1,81 @@
+fetch_source() {
+ # get the source according to the distro
+ if [ "x$PACKET_MANAGER" == "xapt" ]; then
+ pdebug "apt-ing kernel source"
+ apt-get source linux-image-${KERNEL_VERSION}
+ [ ! -e ksrc ] && ln -s $(ls -d linux-*/) ksrc
+ elif [ "x$PACKET_MANAGER" == "xzypper" ]; then
+ pdebug "zypping kernel source"
+ zypper si kernel-source
+
+ # find src directory
+ local SOURCE_DIR=$(rpm -ql kernel-source |grep -E -o '^/.*src/linux-[^/]+/' |head -1)
+ [ -z "${SOURCE_DIR}" ] && perror "Could not determine directory of kernel source..."
+ ln -sf "${SOURCE_DIR}" ksrc
+
+ else
+ pdebug "Packet manager not determined!"
+ fi
+}
+
+build() {
+ local TARGET_CONFIG_FILE="openslx.config"
+ [ -e "${TARGET_CONFIG_FILE}" ] && rm -f "${TARGET_CONFIG_FILE}"
+ # update config and copy to ksrc
+ pinfo "Updating kernel config..."
+ update_config
+ cp "${TARGET_CONFIG_FILE}" ksrc/.config
+
+ # make kernel with the new config
+ cd ksrc || perror "Could not cd to ksrc, was the kernel source fetched properly?"
+ pinfo "Preparing kernel for new config ('make oldconfig')"
+ yes n | make oldconfig || perror "make oldconfig failed"
+ pinfo "Compiling kernel... (this will take some time)"
+ make || perror "make failed"
+
+ # install modules to build directory
+ pinfo "Installing kernel modules..."
+ make INSTALL_MOD_PATH="${MODULE_BUILD_DIR}" INSTALL_MOD_STRIP=1 modules_install || perror "make modules_install failed in ${MODULE_BUILD_DIR}"
+ cd - 2> /dev/null
+
+ # copy kernel to build
+ cp ksrc/arch/x86/boot/bzImage "${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}"
+ pinfo "Kernel was successfully built at ${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}"
+ [ -z "${KERNEL_BUILD_DIR}" ] && KERNEL_BUILD_DIR="${MODULE_BUILD_DIR}"
+}
+
+post_copy() {
+ :
+}
+
+# helper function to update the current kernel config with our parameters
+update_config() {
+
+ # first we need to update the current config
+ local BASE_CONFIG_FILE="/boot/config-$(uname -r)"
+ [ -e "${BASE_CONFIG_FILE}" ] || perror "$BASE_CONFIG_FILE could not be found! This should not happen."
+
+ # check for our wanted config parameter
+ local OPENSLX_WANTED_CONFIG="${ROOT_DIR}/data/kernel.wanted.config"
+ [ -e "${OPENSLX_WANTED_CONFIG}" ] || perror "$OPENSLX_WANTED_CONFIG does not exist! Please add a list of wanted kernel config parameters."
+
+ # copy basic config file
+ cp "$BASE_CONFIG_FILE" "$TARGET_CONFIG_FILE"
+
+ for WANTED_CONFIG in $(cat $OPENSLX_WANTED_CONFIG|sort -u); do
+ local CONFIG_PARAM_NAME=$(echo $WANTED_CONFIG | awk -F "=" '{print $1}')
+ local SEARCH_RESULT=$(grep "^$CONFIG_PARAM_NAME=" "$BASE_CONFIG_FILE")
+
+ #echo "Process: $SEARCH_RESULT"
+ # analyse results
+ if [ "x$SEARCH_RESULT" == "x" ]; then
+ # no match, add it
+ echo $WANTED_CONFIG >> $TARGET_CONFIG_FILE
+ else
+ # match, change to our setting if they differ
+ if [ "x${SEARCH_RESULT: -1}" != "x${WANTED_CONFIG: -1}" ]; then
+ sed -i "s/$SEARCH_RESULT/$WANTED_CONFIG/" "$TARGET_CONFIG_FILE"
+ fi
+ fi
+ done
+}
diff --git a/remote/modules/kernel/kernel.conf b/remote/modules/kernel/kernel.conf
new file mode 100644
index 00000000..0cd03752
--- /dev/null
+++ b/remote/modules/kernel/kernel.conf
@@ -0,0 +1,3 @@
+REQUIRED_BINARIES=""
+REQUIRED_LIBRARIES=""
+REQUIRED_DIRECTORIES=""
diff --git a/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service b/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service
index e7d4d170..a945e743 100644
--- a/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service
+++ b/remote/modules/systemd/data/etc/systemd/system/udhcpc@.service
@@ -3,7 +3,7 @@ Description=DHCP Client
[Service]
Type=simple
-ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -t 8 -s /etc/udhcpc.openslx.script -i %I
+ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -O wpad -t 8 -s /etc/udhcpc.openslx.script -i %I
[Install]
WantedBy=multi-user.target
diff --git a/remote/rootfs/rootfs-stage31/rootfs-stage31.build b/remote/rootfs/rootfs-stage31/rootfs-stage31.build
index 9030e972..19a5838a 100644
--- a/remote/rootfs/rootfs-stage31/rootfs-stage31.build
+++ b/remote/rootfs/rootfs-stage31/rootfs-stage31.build
@@ -22,6 +22,7 @@ post_copy() {
generate_rootfs
copy_kernel_modules
copy_firmware
+ copy_kernel
# copy busybox that has been under /openslx back to /
cp -r "${TARGET_BUILD_DIR}"/openslx/* "${TARGET_BUILD_DIR}"
diff --git a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
index 6d4af2c9..788ff8b3 100644
--- a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
+++ b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf
@@ -1,4 +1,5 @@
-REQUIRED_MODULES=" busybox"
+REQUIRED_MODULES=" busybox
+ kernel"
REQUIRED_KERNEL_MODULES=" kernel/drivers/video/sis/sisfb.ko
kernel/drivers/video/via/viafb.ko
kernel/drivers/acpi/video.ko
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.build b/remote/rootfs/rootfs-stage32/rootfs-stage32.build
index 8b056e1b..164a3464 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.build
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.build
@@ -105,6 +105,6 @@ post_copy() {
else
pinfo "Not copying firmware from system, as '${TARGET_BUILD_DIR}/lib/firmware' already exists."
fi
-
+ copy_kernel
}
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
index 1ff35bcb..d421cf1b 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf
@@ -1,3 +1,4 @@
+REQUIRED_MODULES=" kernel"
REQUIRED_DEPENDENCIES="nfs-common aufs-tools squashfs-tools whois xfsprogs"
REQUIRED_BINARIES=" bash
more
diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper
index a8a8c1b3..c4c79d73 100644
--- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper
+++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf.zypper
@@ -1,4 +1,5 @@
pinfo "If aufs install fails, run zypper addrepo http://jftp.inai.de/openSUSE_12.3/ j.eng-i586"
+REQUIRED_MODULES=" kernel"
REQUIRED_DEPENDENCIES="nfs-client aufs squashfs"
REQUIRED_PACKAGES="timezone"
REQUIRED_BINARIES=" bash
diff --git a/remote/setup_target b/remote/setup_target
index 1f4840b8..43765ce3 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -3,8 +3,6 @@
MODE_DIR="${ROOT_DIR}/remote"
MODULES_DIR="${MODE_DIR}/modules"
-KERNEL_DIR="${MODE_DIR}/builds/kernel"
-
# Keep track of processed modules
PROCESSED_MODULES=""
@@ -136,7 +134,7 @@ copy_files_with_deps () {
generate_target() {
initial_checks
- copy_kernel
+ #copy_kernel
TARGET=$1 && shift
TARGET_DIR="${MODE_DIR}/targets/${TARGET}"
@@ -218,8 +216,8 @@ process_module() {
pinfo "## Building"
[ -e "${MODULE_DIR}/.built" ] || { build && touch "${MODULE_DIR}/.built"; }
# remove *.la files as they might confuse libtool/linker of other tool packages
- find "${MODULE_BUILD_DIR}" -name '*.la' -exec rm -f {} \;
- [ -d "$TARGET_BUILD_DIR" ] && TARGET_BUILD_SIZE=$(du -bc "${TARGET_BUILD_DIR}" | awk 'END {print $1}') || TARGET_BUILD_SIZE=0
+ [ -d "${MODULE_BUILD_DIR}" ] && find "${MODULE_BUILD_DIR}" -name '*.la' -exec rm -f {} \;
+ [ -d "${TARGET_BUILD_DIR}" ] && TARGET_BUILD_SIZE=$(du -bc "${TARGET_BUILD_DIR}" | awk 'END {print $1}') || TARGET_BUILD_SIZE=0
pinfo "## Copying files with dependencies"
copy_files_with_deps
pinfo "## Copying static module files"
@@ -243,7 +241,7 @@ local TOOL_STR="$TOOL_STR post_process_target:"
#move systemd files from /lib to /etc/lib
pinfo "move systemd files from /lib/systemd to /etc/systemd"
-if [ -d "${TARGET_BUILD_DIR}/lib" ]; then
+if [ -d "${TARGET_BUILD_DIR}/lib/systemd" ]; then
cd "${TARGET_BUILD_DIR}/lib"
tarcopy "systemd" "${TARGET_BUILD_DIR}/etc"
cd - &> /dev/null
diff --git a/remote/targets/stage31/kernel b/remote/targets/stage31/kernel
new file mode 120000
index 00000000..044f086d
--- /dev/null
+++ b/remote/targets/stage31/kernel
@@ -0,0 +1 @@
+../../modules/kernel \ No newline at end of file
diff --git a/remote/targets/stage32/kernel b/remote/targets/stage32/kernel
new file mode 120000
index 00000000..044f086d
--- /dev/null
+++ b/remote/targets/stage32/kernel
@@ -0,0 +1 @@
+../../modules/kernel \ No newline at end of file
diff --git a/server/export_target b/server/export_target
index 6302a3b5..e54a87bb 100755
--- a/server/export_target
+++ b/server/export_target
@@ -33,7 +33,7 @@ initial_checks() {
#check for required tools
for BIN in squashfs-tools
do
- if ! dpkg -l "${BIN}" 2&>/dev/null; then
+ if dpkg -l "${BIN}" 2&>/dev/null; then
pinfo "Installing ${BIN}..."
apt-get -y install ${BIN}
fi
@@ -86,7 +86,7 @@ generate_addons() {
export_target() {
initial_checks
-copy_kernel
+#copy_kernel
TARGET=$1
[ -d ${SERVER_BUILD_DIR}/${TARGET} ] || perror "Given target directory does not exist: ${SERVER_BUILD_DIR}/${TARGET}"