Changed subsctipts paths. mkrescue should now work when called from
outside it's directory.
This commit is contained in:
parent
02e5c7c901
commit
de8d469f2c
@ -6,6 +6,7 @@ OUTPUT=$3
|
|||||||
NOFIRMWARE=$4
|
NOFIRMWARE=$4
|
||||||
|
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
SCRIPTDIR="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
APPEND_FIRMWARE="/rescue/firmware.img"
|
APPEND_FIRMWARE="/rescue/firmware.img"
|
||||||
FILENAME="wmirescue_$ARCH.iso"
|
FILENAME="wmirescue_$ARCH.iso"
|
||||||
@ -61,7 +62,7 @@ echo
|
|||||||
TEMP_DIR_GRUB=$(mktemp -d)
|
TEMP_DIR_GRUB=$(mktemp -d)
|
||||||
|
|
||||||
#BIOS
|
#BIOS
|
||||||
cp media/black.png $TEMP_DIR/boot/
|
cp ${SCRIPTDIR}/../media/black.png $TEMP_DIR/boot/
|
||||||
cp /usr/share/grub/unicode.pf2 $TEMP_DIR/boot/bios/fonts/
|
cp /usr/share/grub/unicode.pf2 $TEMP_DIR/boot/bios/fonts/
|
||||||
|
|
||||||
grub-mkimage -O i386-pc -p /boot/bios/ -o ${TEMP_DIR_GRUB}/core.img iso9660 biosdisk
|
grub-mkimage -O i386-pc -p /boot/bios/ -o ${TEMP_DIR_GRUB}/core.img iso9660 biosdisk
|
||||||
|
@ -14,26 +14,27 @@ if [ -z "${TARGET}" ]; then
|
|||||||
exit 255
|
exit 255
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
SCRIPTDIR="$(dirname "$(realpath "$0")")"
|
||||||
|
|
||||||
mkdir ${TARGET}
|
mkdir ${TARGET}
|
||||||
mkdir ${TARGET}/ramdisk
|
mkdir ${TARGET}/ramdisk
|
||||||
mkdir ${TARGET}/firmware
|
mkdir ${TARGET}/firmware
|
||||||
mkdir -p ${OUTPUT}/netboot/${ARCH}
|
mkdir -p ${OUTPUT}/netboot/${ARCH}
|
||||||
|
|
||||||
./bin/basefs_init ${TARGET}/basefs ${DEBIAN_CODENAME}
|
${SCRIPTDIR}/bin/basefs_init ${TARGET}/basefs ${DEBIAN_CODENAME}
|
||||||
|
|
||||||
cp -a ${TARGET}/basefs ${TARGET}/rootfs
|
cp -a ${TARGET}/basefs ${TARGET}/rootfs
|
||||||
cp -a ${TARGET}/basefs ${TARGET}/helperfs
|
cp -a ${TARGET}/basefs ${TARGET}/helperfs
|
||||||
|
|
||||||
./bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION}
|
${SCRIPTDIR}/bin/helperfs_config ${TARGET}/helperfs ${KERNEL_VERSION}
|
||||||
|
|
||||||
# ROOTFS
|
# ROOTFS
|
||||||
|
|
||||||
mkdir -p ${TARGET}/rootfs/lib/modules
|
mkdir -p ${TARGET}/rootfs/lib/modules
|
||||||
rsync -aS ${TARGET}/helperfs/lib/modules/ ${TARGET}/rootfs/lib/modules/
|
rsync -aS ${TARGET}/helperfs/lib/modules/ ${TARGET}/rootfs/lib/modules/
|
||||||
./bin/rootfs_config ${TARGET}/rootfs ${DEBIAN_CODENAME}
|
${SCRIPTDIR}/bin/rootfs_config ${TARGET}/rootfs ${DEBIAN_CODENAME}
|
||||||
./bin/rootfs_clear ${TARGET}/rootfs
|
${SCRIPTDIR}/bin/rootfs_clear ${TARGET}/rootfs
|
||||||
./bin/rootfs_mksquashfs ${TARGET}/rootfs ${TARGET}/ramdisk/rootfs.squash
|
${SCRIPTDIR}/bin/rootfs_mksquashfs ${TARGET}/rootfs ${TARGET}/ramdisk/rootfs.squash
|
||||||
|
|
||||||
# RAMDISK
|
# RAMDISK
|
||||||
|
|
||||||
@ -43,13 +44,13 @@ mkdir -p ${TARGET}/ramdisk/lib/modules
|
|||||||
mkdir -p ${TARGET}/ramdisk/proc
|
mkdir -p ${TARGET}/ramdisk/proc
|
||||||
mkdir -p ${TARGET}/ramdisk/sys
|
mkdir -p ${TARGET}/ramdisk/sys
|
||||||
cp ${TARGET}/helperfs/bin/busybox ${TARGET}/ramdisk/bin/busybox
|
cp ${TARGET}/helperfs/bin/busybox ${TARGET}/ramdisk/bin/busybox
|
||||||
./bin/ramdisk_modules ${TARGET}/ramdisk ${TARGET}/rootfs ${KERNEL_VERSION}
|
${SCRIPTDIR}/bin/ramdisk_modules ${TARGET}/ramdisk ${TARGET}/rootfs ${KERNEL_VERSION}
|
||||||
./bin/ramdisk_config ${TARGET}/ramdisk ${KERNEL_VERSION}
|
${SCRIPTDIR}/bin/ramdisk_config ${TARGET}/ramdisk ${KERNEL_VERSION}
|
||||||
./bin/ramdisk_make ${OUTPUT}/netboot/${ARCH}/initrd.img ${TARGET}/ramdisk
|
${SCRIPTDIR}/bin/ramdisk_make ${OUTPUT}/netboot/${ARCH}/initrd.img ${TARGET}/ramdisk
|
||||||
|
|
||||||
# FIRMWARE
|
# FIRMWARE
|
||||||
tar cf ${TARGET}/firmware/firmware.tar --owner=root --group=root -C ${TARGET}/helperfs ./lib/firmware
|
tar cf ${TARGET}/firmware/firmware.tar --owner=root --group=root -C ${TARGET}/helperfs ./lib/firmware
|
||||||
./bin/ramdisk_make ${OUTPUT}/netboot/firmware.img ${TARGET}/firmware
|
${SCRIPTDIR}/bin/ramdisk_make ${OUTPUT}/netboot/firmware.img ${TARGET}/firmware
|
||||||
|
|
||||||
# KERNEL
|
# KERNEL
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ cp ${TARGET}/helperfs/boot/vmlinuz-${KERNEL_VERSION} ${OUTPUT}/netboot/${ARCH}/v
|
|||||||
|
|
||||||
# DIST
|
# DIST
|
||||||
tar cvf ${OUTPUT}/wmirescue_${ARCH}-netboot.tar -C ${OUTPUT}/netboot .
|
tar cvf ${OUTPUT}/wmirescue_${ARCH}-netboot.tar -C ${OUTPUT}/netboot .
|
||||||
./bin/dist_ipxe ${VERSION} ${OUTPUT}
|
${SCRIPTDIR}/bin/dist_ipxe ${VERSION} ${OUTPUT}
|
||||||
./bin/dist_ipxe ${VERSION} ${OUTPUT} --nofirmware
|
${SCRIPTDIR}/bin/dist_ipxe ${VERSION} ${OUTPUT} --nofirmware
|
||||||
./bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT}
|
${SCRIPTDIR}/bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT}
|
||||||
./bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} --nofirmware
|
${SCRIPTDIR}/bin/dist_iso ${VERSION} ${ARCH} ${OUTPUT} --nofirmware
|
||||||
|
Loading…
Reference in New Issue
Block a user