diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-08-05 05:00:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-08-05 05:00:05 +0000 |
commit | 74558646f79f736d0cb82242e44604874e76b322 (patch) | |
tree | 89a8a72cc1a7c2c35615a2b368123c15611433de /distrib/powerpc64 | |
parent | 140ea815d4db79906e623af39c98364e16bbbd20 (diff) |
build installXX.{img,iso} files are like miniroot, but contain the sets
in a X.X/powerpc64 directory. Like miniroot, these skip the "boot -> bsd.rd"
sequence, and boot bsd.rd directly because of disk-discovery issues not
yet resolved in the boot code.
with debugging help from gkoehler and kettenis
Diffstat (limited to 'distrib/powerpc64')
-rw-r--r-- | distrib/powerpc64/Makefile | 6 | ||||
-rw-r--r-- | distrib/powerpc64/iso/Makefile | 92 |
2 files changed, 97 insertions, 1 deletions
diff --git a/distrib/powerpc64/Makefile b/distrib/powerpc64/Makefile index bd4e37b7022..5ede005b72f 100644 --- a/distrib/powerpc64/Makefile +++ b/distrib/powerpc64/Makefile @@ -1,7 +1,11 @@ -# $OpenBSD: Makefile,v 1.1 2020/07/04 21:11:04 kettenis Exp $ +# $OpenBSD: Makefile,v 1.2 2020/08/05 05:00:03 deraadt Exp $ SUBDIR= ramdisk +.if make(obj) || make(cleandir) || make(clean) +SUBDIR+= iso +.endif + unconfig: cd ramdisk; ${MAKE} unconfig diff --git a/distrib/powerpc64/iso/Makefile b/distrib/powerpc64/iso/Makefile new file mode 100644 index 00000000000..836effdb722 --- /dev/null +++ b/distrib/powerpc64/iso/Makefile @@ -0,0 +1,92 @@ +# $OpenBSD: Makefile,v 1.1 2020/08/05 05:00:04 deraadt Exp $ + +FS= install${OSrev}.img +FSSIZE= 1032192 +FSTYPE= install360 +CDROM= install${OSrev}.iso + +MOUNT_POINT= /mnt + +RELXDIR?= /home/relx-${MACHINE} +RELDIR?= /home/rel-${MACHINE} + +BASE= ${RELDIR}/base${OSrev}.tgz ${RELDIR}/comp${OSrev}.tgz \ + ${RELDIR}/game${OSrev}.tgz ${RELDIR}/man${OSrev}.tgz \ + ${RELDIR}/bsd ${RELDIR}/bsd.rd \ + ${RELDIR}/INSTALL.${MACHINE} +XBASE= ${RELXDIR}/xbase${OSrev}.tgz ${RELXDIR}/xfont${OSrev}.tgz \ + ${RELXDIR}/xshare${OSrev}.tgz ${RELXDIR}/xserv${OSrev}.tgz + +MSDOSSTART= 64 +MSDOSSIZE= 30000 +TOTALSIZE!= expr ${FSSIZE} + ${MSDOSSIZE} + +NEWFS_ARGS_msdos=-L boot +MOUNT_ARGS_msdos=-o-l + +all: ${FS} ${CDROM} + +${FS}: ${BASE} ${XBASE} + dd if=/dev/zero of=${FS} bs=512 count=${TOTALSIZE} + vnconfig -v ${FS} > vnd + echo 'u\ne 0\nc\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \ + | fdisk -e `cat vnd` >/dev/null + echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i + mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} + echo 'menuentry "OpenBSD install" {' > ${MOUNT_POINT}/grub.cfg + echo '\tlinux /boot' >> ${MOUNT_POINT}/grub.cfg + echo '\tinitrd /boot' >> ${MOUNT_POINT}/grub.cfg + echo '}' >> ${MOUNT_POINT}/grub.cfg + cp ${RELDIR}/bsd.rd ${MOUNT_POINT}/boot + umount ${MOUNT_POINT} + + newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a + mount /dev/`cat vnd`a ${MOUNT_POINT} + mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE} + cp -p ${BASE} ${MOUNT_POINT}/${OSREV}/${MACHINE} + cp -p ${XBASE} ${MOUNT_POINT}/${OSREV}/${MACHINE} + ln ${MOUNT_POINT}/${OSREV}/${MACHINE}/bsd.rd ${MOUNT_POINT}/bsd.rd + ln ${MOUNT_POINT}/${OSREV}/${MACHINE}/bsd.rd ${MOUNT_POINT}/bsd + + cat ${RELDIR}/SHA256 ${RELXDIR}/SHA256 > \ + ${MOUNT_POINT}/${OSREV}/${MACHINE}/SHA256 + # XXX no SHA256.sig + df -i ${MOUNT_POINT} + umount ${MOUNT_POINT} + vnconfig -u `cat vnd` + rm -f vnd + +${CDROM}: ${BASE} ${XBASE} + rm -rf ${.OBJDIR}/cd-dir + mkdir -p ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + echo 'menuentry "OpenBSD install" {' > ${.OBJDIR}/cd-dir/grub.cfg + echo '\tlinux /boot' >> ${.OBJDIR}/cd-dir/grub.cfg + echo '\tinitrd /boot' >> ${.OBJDIR}/cd-dir/grub.cfg + echo '}' >> ${.OBJDIR}/cd-dir/grub.cfg + cp ${RELDIR}/bsd.rd ${.OBJDIR}/cd-dir/boot + + cp -p ${BASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + cp -p ${XBASE} ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE} + ln ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/bsd.rd ${.OBJDIR}/cd-dir/bsd.rd + ln ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/bsd.rd ${.OBJDIR}/cd-dir/bsd + + cat ${RELDIR}/SHA256 ${RELXDIR}/SHA256 > \ + ${.OBJDIR}/cd-dir/${OSREV}/${MACHINE}/SHA256 + # XXX no SHA256.sig + + mkhybrid -a -R -T -L -l -d -D -N -o ${.OBJDIR}/${CDROM} \ + -A "OpenBSD ${OSREV} ${MACHINE} Install CD" \ + -P "Copyright (c) `date +%Y` Theo de Raadt, The OpenBSD project" \ + -p "Theo de Raadt <deraadt@openbsd.org>" \ + -V "OpenBSD/${MACHINE} ${OSREV} Install CD" \ + ${.OBJDIR}/cd-dir + +install: + cp ${CDROM} ${FS} ${RELDIR}/ + +clean cleandir: + rm -f ${CDROM} ${FS} + rm -rf cd-dir + +.include <bsd.obj.mk> |