Commit Graph

76 Commits

Author SHA1 Message Date
Warner Losh
0c5ec6c2f7 Add LOADER_DEBUG regression test 2018-02-21 23:49:18 +00:00
Kyle Evans
574a8bf981 lua-test: Image the loader test directory if it doesn't exist yet 2018-02-16 20:26:18 +00:00
Kyle Evans
ff8409871e Default to /tmp/loadertest for lua test scripts 2018-02-16 20:23:48 +00:00
Warner Losh
2ec3d49ea3 Simplify building before installing. 2018-02-15 18:58:03 +00:00
Kyle Evans
29cb326c9c Build loader before installing it in lua-img.sh
Slightly more foolproof when all you're wanting to do is quickly get off the
ground with testing the lua loader.
2018-02-15 17:56:45 +00:00
Kyle Evans
f86b2f4817 Set svn:executable on lua-img.sh 2018-02-15 17:47:43 +00:00
Warner Losh
f52add1296 Simple script to image a small test area from a built tree. Build with
'cd stand; make MK_FORTH=no MK_LOADER_LUA=yes' then run this script.
You can then test with lua-test.sh with the same parameter.
2018-02-14 18:21:54 +00:00
Warner Losh
ca72e2e288 A quick test script that we can run to use userboot's test mode to
excersize the load loader. Assumes that we already have a suitable
root area that you pass in with the first arg.
2018-02-14 17:51:51 +00:00
Warner Losh
5ec69a1509 Add lua to build script 2018-02-12 15:32:05 +00:00
Marius Strobl
ba8d50d08b Flesh out the creation of sparc64 UFS images. This has only been verified
to yield working images in a native build as rootgen.sh generally doesn't
support cross-testing so far.
2018-02-05 00:18:21 +00:00
Warner Losh
22cf6021fc Support more images (but still no geli)
Print a qemu line to a shell script to ease testing each image
Start to support multiple architectures (still very green)
Create /etc/rc that echos success and halts the system for better
automation (also include halt)
Create /etc/fstab on a per-boot type to test loader's passing root
to kernel.

This lets me run a test, connect to it with telnet and get either a
timeout, or a report of success.

Sponsored by: Netflix
2017-12-19 00:18:17 +00:00
Warner Losh
328884aef7 Use -h -D in preference to -D so that the serial port gets the
interactive console rather than the video port. qemu has issues with X
on my mac at the moment and this is the easiest path forward.

Sponsored by: Netflix
2017-12-15 23:16:42 +00:00
Warner Losh
16457354e0 Be a little verbose and list the loader files we're putting on the
drive when making zfs roots as a sanity check for what's on there.
2017-12-15 23:16:37 +00:00
Warner Losh
9b544478b1 For now, make the gpart commands verbose so we know exactly what's
being installed.

Fix problem with gpt + zfs installing the wrong loader...

Sponsored by: Netflix
2017-12-15 23:16:27 +00:00
Warner Losh
502742f35a Add missing of=/dev/${dev}s${s} when installing zfsboot. 2017-12-15 06:44:11 +00:00
Warner Losh
082c6764e6 Script to generate minimal boot images for each of the 24 supported
boot images for x86. This will be enhanced to generate all the other
images (u-boot, powerpc CHRP, etc).

At the moment, it's only generating three of them. zfs+gpt+legacy
works with qemu:
	qemu-system-x86_64 --drive file=${file},format=raw -serial telnet::4444,server
but the ufs ones still have issues I'm tracking down.

These images are the boot blocks, /boot/loader, a kernel, maybe a
couple of modules, /sbin/init, /bin/sh, /libexec/ld-elf.so, libc.so,
libedit and libncursesw. This is just enough to get to single user. At
the moment, these come from the host system, but should come from
OBJTOP.

At the moment, this requires root to build since the zfs tools require
it (and GELI will too when we add support for that).

Sponsored by: Netflix
2017-12-15 06:34:27 +00:00
Warner Losh
cfc948287d Script that knows how to put boot blocks onto a device. Eventually,
this will be installed into /usr/sbin, but for now it's just used for
the boot loader regression script. It's still a bit green, and likely
will get edge cases wrong still. It's also x86 centric at the moment,
but will be enhanced shortly for u-boot, CHRP PowerPC and other
methods.

Sponsored by: Netflix
2017-12-15 06:34:11 +00:00
Warner Losh
ac20456c39 Build WITHOUT_FORTH too, at least for amd64 and i386
Sponsored by: Netflix
2017-12-08 19:57:21 +00:00
Warner Losh
1f99cce2b0 Just use the last line of the output from getting .OBJDIR. The
buildenv target prints other stuff too that needs to be ignored.

Sponsored by: Netflix
2017-12-04 16:38:20 +00:00
Warner Losh
02cfd60482 Remove the entire objdir tree to avoid picking up stale binaries from
prior builds. Move GELI to building first.

Sponsored by: Netflix
2017-12-04 01:14:17 +00:00
Warner Losh
ca987d4641 Move sys/boot to stand. Fix all references to new location
Sponsored by:	Netflix
2017-11-14 23:02:19 +00:00
Warner Losh
4728f534ff Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI
Transition to WITH/WITHOUT_LOADER_GELI to flag support or not of GELI
in the boot loaders. Add HAVE_GELI so components can flag they need
support (since it's too large to include everywhere). Add temporary
warnings for the old forms to ease transition.

Also, update test script to build without GELI on x86.

Sponsored by: Netflix
2017-11-10 23:54:48 +00:00
Warner Losh
a179cd9114 Replace LOADER_FIREWIRE_SUPPORT variable
Rename LOADER_FIREWIRE_SUPPORT to MK_LOADER_FIREWIRE. Only build
libfirewire when this is "yes". Add note to updating. Fix build script
to build this for x86 so the option doesn't decay. sparc64 supports
ZFS, so also build it MK_ZFS=no.

Sponsored by: Netflix
2017-11-10 23:54:41 +00:00
Warner Losh
36f1c58dc5 Fix parallel build issues and add MK_ZFS=no case
To ensure that I don't break the MK_ZFS=no case (currently working),
add that to the build, at least for i386 and amd64. Also, out of an
abundance of caution, clean single threaded, and then build in a
separate make. Otherwise, I hit a race where we build before objdir
has been created, which breaks at the moment.

Sponsored by: Netflix
2017-10-30 03:12:34 +00:00
Warner Losh
9bd6ac8da0 Do a chdir to SRCTOP/sys/boot before starting the run. This lets one
run this script from anywhere, but makes it only work on sys/boot.

Sponsored by: Netflix
2017-10-25 15:27:48 +00:00
Warner Losh
c02a64d8be Create a shell script to build sys/boot on all the architectures.
One could run this from any directory, but it's designed to do
regression testing on sys/boot (it only tests on a subset of
architectures since all of them would take a lot longer and not help).
This will also ensure that future commits to sys/boot compile
everywhere.

Sponsored by: Netflix
2017-10-22 22:52:23 +00:00