diff options
Diffstat (limited to 'remote/tools/base/base.build')
| -rw-r--r-- | remote/tools/base/base.build | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/remote/tools/base/base.build b/remote/tools/base/base.build deleted file mode 100644 index b0d567ff..00000000 --- a/remote/tools/base/base.build +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash -fetch_source() { - : -} - -build() { - - BUILDDIR="${TOOL_DIR}/${TOOL}/build" - - FILELIST="list_binaries_and_files" - [ -e "${FILELIST}" ] && rm "${FILELIST}" - - for BIN in ${REQUIRED_BINARIES} - do - BIN_LOCATION=$(which ${BIN}) - if [ ! -z ${BIN_LOCATION} -a -e ${BIN_LOCATION} ]; - then - pdebug "Processing $BIN at $BIN_LOCATION ..." - get_link_chain ${BIN_LOCATION} >> "${FILELIST}" - else - perror "${BIN} not found on the system! Please install it." - fi - done - - for LIB in ${REQUIRED_LIBRARIES} - do - for LIB_LOCATION in $(find /lib/ -name "${LIB}.so*") - do - get_link_chain "${LIB_LOCATION}" >> "${FILELIST}" - done - done - - for FILE in ${REQUIRED_DIRECTORIES} - do - [ ! -d ${FILE} ] && perror "Missing required directory $FILE" - echo ${FILE} >> "${FILELIST}" - done - for FILE in ${REQUIRED_FILES} - do - [ ! -f ${FILE} ] && perror "Missing required file $FILE" - echo ${FILE} >> "${FILELIST}" - done - - local NUMFILES=$(cat "${FILELIST}" | wc -l) - if [ "x$NUMFILES" != "x" -a "x$NUMFILES" != "x0" ]; then - pinfo "File list generated at ${BUILDDIR}/${FILELIST} ($NUMFILES entries)" - tarcopy "$(cat "${FILELIST}")" "${BUILDDIR}" - fi -} - -post_copy() { - - # make basic directory structure - mkdir -p "${TARGET_BUILD_DIR}"/{bin,dev,proc,lib,etc,mnt,sys,var/run,var/lock,var/log,run/lock,run/shm,openslx/mnt} - - # copy devices from running system - cp -a /dev/{console,kmsg,mem,null,shm,tty,tty0,tty1,tty9,fb0,urandom,zero} \ - "${TARGET_BUILD_DIR}"/dev || perror "Copying devices from running system failed." - - # set /etc/environment to include /openslx/bin and /openslx/sbin - echo "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/openslx/sbin:/openslx/bin\"" \ - > "${TARGET_BUILD_DIR}/etc/environment" - - # copy static files - cp -r "${TOOL_DIR}/${TOOL}"/data/* "${TARGET_BUILD_DIR}" || perror "Copying static files from data/* failed." - - # quick fix for /etc/fstab - echo "# no configuration" >> "${TARGET_BUILD_DIR}/etc/fstab" - - # link /etc/mtab, needed for systemd - [ ! -e ${TARGET_BUILD_DIR}/etc/mtab ] && ln -s /proc/self/mounts ${TARGET_BUILD_DIR}/etc/mtab - - # passwd, group, shadow - init_users_and_groups - - # quick fix for missing group in /etc/group - add_group "lock" - - # setup root accoun - USER=root PASSWORD='!r00t' add_user - - mkdir -p ${TARGET_BUILD_DIR}/root - - echo "minilinux-$(hostname)" > "${TARGET_BUILD_DIR}/etc/hostname" - #check for kernel modules, if not present copy from system - if [ ! -d ${TARGET_BUILD_DIR}/lib/modules ]; - then - pinfo "Copying modules for kernel $(uname -r)..." - mkdir -p "${TARGET_BUILD_DIR}/lib/modules" || perror "Cannot create '${TARGET_BUILD_DIR}/lib/modules'" - cp -r "/lib/modules/$(uname -r)" "${TARGET_BUILD_DIR}/lib/modules/" || perror "Cannot copy kernel modules from '/lib/modules/$(uname -r)' '${TARGET_BUILD_DIR}/lib/modules/'" - else - pinfo "Not copying kernel modules from system, as '${TARGET_BUILD_DIR}/lib/modules/' already exists." - fi - - #check for firmware, if not present copy from system - if [ ! -d ${TARGET_BUILD_DIR}/lib/firmware ]; - then - pinfo "Copying firmware for kernel $(uname -r)..." - cp -r "/lib/firmware" "${TARGET_BUILD_DIR}/lib/" || perror "Cannot copy kernel modules from '/lib/firmware' '${TARGET_BUILD_DIR}/lib/'" - else - pinfo "Not copying firmware from system, as '${TARGET_BUILD_DIR}/lib/firmware' already exists." - fi - -} - |
