diff options
| author | Michael Neves | 2013-02-15 17:09:04 +0100 |
|---|---|---|
| committer | Michael Neves | 2013-02-15 17:09:04 +0100 |
| commit | 3de31c7d1005a97ce539df96b3926efa224f65e1 (patch) | |
| tree | 4b808cf35fe213ff02ef291f92a5a57f73bb9481 /server | |
| parent | ldm (diff) | |
| parent | debug output cleaned a bit (diff) | |
| download | tm-scripts-3de31c7d1005a97ce539df96b3926efa224f65e1.tar.gz tm-scripts-3de31c7d1005a97ce539df96b3926efa224f65e1.tar.xz tm-scripts-3de31c7d1005a97ce539df96b3926efa224f65e1.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'server')
| -rwxr-xr-x | server/build_core | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/server/build_core b/server/build_core index c9aa7add..6367e9e5 100755 --- a/server/build_core +++ b/server/build_core @@ -28,7 +28,7 @@ STAGE32_DIR=${ROOT_DIR}/remote/stage3.2 initial_checks() { if [ ! -d ${STAGE32_DIR} ]; then - echo "No stage3.2 directory found. Please run setup_tools first." + echo "No stage3.2 directory found. Please run \"./mltk tools build\" first." exit 1 fi @@ -53,6 +53,7 @@ initial_checks() { cp -r /lib/modules/$(uname -r) ${STAGE32_DIR}/lib/modules/ fi + # TODO: check for aufs and squaskfs modules } generate_initramfs() { @@ -70,6 +71,10 @@ generate_initramfs() { # copy busybox, its libs and static data to stage3.1 cp -r ${STAGE32_DIR}/openslx/* ${STAGE31_STATIC_DIR}/* ${STAGE31_DIR} + # fix for aufs & squashfs modules needed for stage 3.1 + cp /lib/modules/$(uname -r)/kernel/fs/squashfs/squashfs.ko ${STAGE31_DIR}/lib/modules + cp /lib/modules/$(uname -r)/kernel/ubuntu/aufs/aufs.ko ${STAGE31_DIR}/lib/modules + # fetch the libraries needed for busybox BASICLIBS="" for i in $(ldd ${STAGE31_DIR}/bin/busybox); @@ -77,18 +82,16 @@ generate_initramfs() { if [ $(echo $i | grep '^/' | grep -c ld) -eq 1 \ -o $(echo $i | grep '^/' | grep -c libc.so) -eq 1 ]; then - echo $i BASICLIBS="$BASICLIBS $i $(readlink -f "$i")" fi done - tar cpv $BASICLIBS | tar xpv -C ${STAGE31_DIR} &>/dev/null + (tar cpv $BASICLIBS | tar xpv -C ${STAGE31_DIR}) &>/dev/null } generate_squashfs() { # finalize the initramfs target - [ ! -d ${STAGE32_DIR} ] && echo "No stage3.2 directory found. Please run setup_tools first." && exit 1 [ -e ${STAGE31_DIR}/mnt/openslx.sqfs ] && rm ${STAGE31_DIR}/mnt/openslx.sqfs mksquashfs ${STAGE32_DIR} ${STAGE31_DIR}/mnt/openslx.sqfs -comp xz -b 1M -no-recovery 2>/dev/null |
