VERSION?=0 RDSETROOT=openbsd/rdsetroot CONF_DIR=dedibox BSDRD_ORIG=openbsd/bsd.rd BSDRD=bsd${VERSION}.rd BSDRD2=${BSDRD}.new BSDFS=bsd${VERSION}.rd.fs BSDGZ=bsd${VERSION}.gz FS=dedibox${VERSION}.fs MOUNT=mnt${VERSION} SVND=${VERSION} BOOT_ORIG=openbsd/boot BOOT=boot${VERSION} INSTALLBOOT=openbsd/installboot BIOSBOOT=openbsd/biosboot FS_GENERIC=../dedibox.fs.generic BSDRD_GENERIC=../bsd.rd.dedibox ${FS}:${BSDGZ} dd if=/dev/zero of=${FS} bs=10k count=288 vnconfig -v -c svnd${SVND} ${FS} disklabel -w -r svnd${SVND} floppy288 newfs -m0 -o space -i 524288 -c 80 rsvnd${SVND}a mount /dev/svnd${SVND}a ${MOUNT} cp ${BOOT_ORIG} ${BOOT} strip ${BOOT} strip -R .comment ${BOOT} dd if=${BOOT} of=${MOUNT}/boot bs=512 dd if=${BSDGZ} of=${MOUNT}/bsd bs=512 chmod +x ${INSTALLBOOT} chmod 777 ${MOUNT}/bsd ${INSTALLBOOT} -v ${MOUNT}/boot ${BIOSBOOT} /dev/rsvnd${SVND}c umount ${MOUNT} vnconfig -u svnd${SVND} rm -rf ${BSDRD} ${BSDFS} ${BSDGZ} ${MOUNT} ${BSDRD2} ${BOOT} cp ${FS} ${FS_GENERIC} ${BSDGZ}:${BSDRD2} strip ${BSDRD2} strip -R .comment ${BSDRD2} gzip -c9 ${BSDRD2} > ${BSDGZ} ${BSDRD2}:${BSDRD} ${RDSETROOT} ${RDSETROOT} -x ${BSDRD} > ${BSDFS} -@mkdir ${MOUNT} vnconfig svnd${SVND} ${BSDFS} mount /dev/svnd${SVND}a ${MOUNT} (cd ${MOUNT} && rm -f .profile install* upgrade dedibox) cp ${CONF_DIR}/dot.profile ${MOUNT}/.profile cp ${CONF_DIR}/dedibox ${MOUNT} cp ${CONF_DIR}/dedibox.conf ${MOUNT} cp ${CONF_DIR}/install ${MOUNT} cp ${CONF_DIR}/install.sub ${MOUNT} cp ${CONF_DIR}/install.md ${MOUNT} chmod 777 ${MOUNT}/* chmod 777 ${MOUNT}/.profile umount ${MOUNT} vnconfig -u svnd${SVND} cp ${BSDRD} ${BSDRD2} ${RDSETROOT} ${BSDRD2} < ${BSDFS} cp ${BSDRD2} ${BSDRD_GENERIC} ${BSDRD}:${BSDRD_ORIG} cp ${BSDRD_ORIG} ${BSDRD} ${RDSETROOT}:openbsd/elfrdsetroot.c cc -o $@ $? clean: rm -rf ${RDSETROOT} ${BSDRD} ${BSDFS} ${FS} ${BSDGZ} ${MOUNT} ${BSDRD2} ${BOOT} clean-all: clean rm -rf *.fs *.rd mnt*