Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144371145
D24276.id76667.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D24276.id76667.diff
View Options
Index: tools/boot/ci-qemu-test.sh
===================================================================
--- tools/boot/ci-qemu-test.sh
+++ tools/boot/ci-qemu-test.sh
@@ -1,11 +1,12 @@
#!/bin/sh
-# Install loader, kernel, and enough of userland to boot in QEMU and echo
-# "Hello world." from init, as a very quick smoke test for CI. Uses QEMU's
-# virtual FAT filesystem to avoid the need to create a disk image. While
-# designed for CI automated testing, this script can also be run by hand as
-# a quick smoke-test. The rootgen.sh and related scripts generate much more
-# extensive tests for many combinations of boot env (ufs, zfs, geli, etc).
+# Install pkgbase packages for loader, kernel, and enough of userland to boot
+# in QEMU and echo "Hello world." from init, as a very quick smoke test for CI.
+# Uses QEMU's virtual FAT filesystem to avoid the need to create a disk image.
+# While designed for CI automated testing, this script can also be run by hand
+# as a quick smoke-test as long as pkgbase packages have been built. The
+# rootgen.sh and related scripts generate much more extensive tests for many
+# combinations of boot env (ufs, zfs, geli, etc).
#
# $FreeBSD$
@@ -26,31 +27,21 @@
tempdir_setup()
{
# Create minimal directory structure and populate it.
- # Caller must cd ${SRCTOP} before calling this function.
for dir in dev bin efi/boot etc lib libexec sbin usr/lib usr/libexec; do
mkdir -p ${ROOTDIR}/${dir}
done
# Install kernel, loader and minimal userland.
-
- make -DNO_ROOT DESTDIR=${ROOTDIR} \
- MODULES_OVERRIDE= \
- WITHOUT_DEBUG_FILES=yes \
- WITHOUT_KERNEL_SYMBOLS=yes \
- installkernel
- for dir in stand \
- lib/libc lib/libedit lib/ncurses \
- libexec/rtld-elf \
- bin/sh sbin/init sbin/shutdown sbin/sysctl; do
- make -DNO_ROOT DESTDIR=${ROOTDIR} INSTALL="install -U" \
- WITHOUT_DEBUG_FILES= \
- WITHOUT_MAN= \
- WITHOUT_PROFILE= \
- WITHOUT_TESTS= \
- WITHOUT_TOOLCHAIN= \
- -C ${dir} install
- done
+ cat<<EOF >${ROOTDIR}/pkg.conf
+REPOS_DIR=[]
+repositories={local {url = file://$(dirname $OBJTOP)/repo/\${ABI}/latest}}
+EOF
+ ASSUME_ALWAYS_YES=true INSTALL_AS_USER=true pkg \
+ -o ABI_FILE=$OBJTOP/bin/sh/sh \
+ -C ${ROOTDIR}/pkg.conf -r ${ROOTDIR} install \
+ FreeBSD-kernel-generic FreeBSD-bootloader \
+ FreeBSD-clibs FreeBSD-runtime
# Put loader in standard EFI location.
mv ${ROOTDIR}/boot/loader.efi ${ROOTDIR}/efi/boot/BOOTx64.EFI
@@ -81,6 +72,10 @@
if [ -z "${SRCTOP}" ]; then
die "Cannot locate top of source tree"
fi
+: ${OBJTOP:=$(make -V OBJTOP)}
+if [ -z "${OBJTOP}" ]; then
+ die "Cannot locate top of object tree"
+fi
# Locate the uefi firmware file used by qemu.
: ${OVMF:=/usr/local/share/uefi-edk2-qemu/QEMU_UEFI_CODE-x86_64.fd}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 2:34 AM (15 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28527097
Default Alt Text
D24276.id76667.diff (2 KB)
Attached To
Mode
D24276: ci-qemu-test.sh: use pkgbase
Attached
Detach File
Event Timeline
Log In to Comment