Index: tools/ec2.conf =================================================================== --- tools/ec2.conf (revision 0) +++ tools/ec2.conf (working copy) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# Set to a list of packages to install. +export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs" + +# Set to a list of third-party software to enable in rc.conf(5). +export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs" + +# Build with a 1.5 GB UFS partition; we'll expand it later. +export VMSIZE=1536M + +# No swap space; EC2 images allocate that on ephemeral disks. +export NOSWAP=YES + +# Don't install a copy of the FreeBSD.org pkg repo database; it will be +# be out of date long before this image is used. +export NOREPOSQLITE=YES + +vm_extra_pre_umount() { + echo 'growfs_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + echo 'firstboot_pkgs_list="awscli"' >> ${DESTDIR}/etc/rc.conf + + echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf + echo 'debug.debugger_on_panic=0' >> ${DESTDIR}/etc/sysctl.conf + echo 'kern.panic_reboot_wait_time=0' >> ${DESTDIR}/etc/sysctl.conf + + echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf + echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + echo 'console="comconsole"' >> ${DESTDIR}/boot/loader.conf + echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf + + touch ${DESTDIR}/firstboot + + return 0 +} Index: Makefile.vm =================================================================== --- Makefile.vm (revision 274909) +++ Makefile.vm (working copy) @@ -11,9 +11,11 @@ VMBASE?= vm CLOUDWARE?= AZURE \ + EC2 \ OPENSTACK AZURE_FORMAT= vhdf OPENSTACK_FORMAT=qcow2 +EC2_FORMAT= raw .if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) . for _CW in ${CLOUDWARE}