diff options
Diffstat (limited to 'server/build_core')
| -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 |
