From owner-svn-src-all@freebsd.org Tue Sep 3 14:07:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80608DCCCA; Tue, 3 Sep 2019 14:06:37 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N7zd0vNFz4PkT; Tue, 3 Sep 2019 14:06:37 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id BDC401A90B; Tue, 3 Sep 2019 14:06:12 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 66407E9BC; Wed, 10 Apr 2019 13:41:38 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 255F7712F3; Wed, 10 Apr 2019 13:41:38 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 0DF21E9BB; Wed, 10 Apr 2019 13:41:38 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id BB28EE9B9 for ; Wed, 10 Apr 2019 13:41:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C3CC712E3; Wed, 10 Apr 2019 13:41:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 250ED234C4; Wed, 10 Apr 2019 13:41:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3ADfZdM030122; Wed, 10 Apr 2019 13:41:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3ADfZBm030108; Wed, 10 Apr 2019 13:41:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201904101341.x3ADfZBm030108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346080 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 346080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 255F7712F3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Status: O X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:07:20 -0000 X-Original-Date: Wed, 10 Apr 2019 13:41:35 +0000 (UTC) X-List-Received-Date: Tue, 03 Sep 2019 14:07:20 -0000 Author: emaste Date: Wed Apr 10 13:41:34 2019 New Revision: 346080 URL: https://svnweb.freebsd.org/changeset/base/346080 Log: Add a smoke test QEMU boot script for CI Reviewed by: imp, lwhsu (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D19661 Added: head/tools/boot/ci-qemu-test.sh (contents, props changed) Added: head/tools/boot/ci-qemu-test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/boot/ci-qemu-test.sh Wed Apr 10 13:41:34 2019 (r346080) @@ -0,0 +1,63 @@ +#!/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. +# +# $FreeBSD$ + +set -e + +# Root directory for minimal FreeBSD installation. +ROOTDIR=$(pwd)/fat-root + +# Create minimal directory structure. +rm -f $ROOTDIR/efi/boot/BOOTx64.EFI +for dir in dev bin efi/boot etc lib libexec sbin 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; do + make -DNO_ROOT DESTDIR=$ROOTDIR INSTALL="install -U" \ + WITHOUT_MAN= \ + WITHOUT_PROFILE= \ + WITHOUT_TESTS= \ + WITHOUT_TOOLCHAIN= \ + -C $dir install +done + +# Put loader in standard EFI location. +mv $ROOTDIR/boot/loader.efi $ROOTDIR/efi/boot/BOOTx64.EFI + +# Configuration files. +cat > $ROOTDIR/boot/loader.conf < $ROOTDIR/etc/rc <&1 | tee boot.log +grep -q 'Hello world.' boot.log +echo OK