Commit Graph

120 Commits

Author SHA1 Message Date
Trammell Hudson
9322dbef2d
use default qemu config, parameterize bin_modules 2017-03-31 12:06:59 -04:00
Trammell Hudson
c40748aa25
Build time configuration for startup scripts and modules.
This addresses multiple issues:

* Issue #63: initrd is build fresh each time, so tracked files do not matter.
* Issue #144: build time configuration
* Issue #123: allows us to customize the startup experience
* Issue #122: manual start-xen will go away
* Issue #25: tpmtotp PCRs are updated after reading the secret
* Issue #16: insmod now meaures modules
2017-03-31 11:18:46 -04:00
Trammell Hudson
d8ab8ecfe8
Rebuild sub-modules on each build (issue #143).
The .INTERMEDIATE target seemed to causing the problem with
make thinking it didn't have to descend into the sub-module
directories.  Removing it allows it to work correctly.
2017-03-30 18:39:18 -04:00
Trammell Hudson
8343130e9a
Merge branch 'moc' - kernel modules, flashrom and other enhancements. 2017-03-30 17:32:47 -04:00
Trammell Hudson
8589370708
Flash writing from userspace works (issue #17).
Reduce the size of flashrom by commenting out most flash chips,
boards and programmers.

Wrapper script to make it easier to rewrite the ROM on the x230
using the flashrom layout.

Keep the entire 12 MB ROM for flashing.
2017-03-30 17:12:22 -04:00
Trammell Hudson
9feb094701
enable flashrom and pciutils to allow the boot ROM to be re-written (issue #17) 2017-03-30 14:35:30 -04:00
Trammell Hudson
9666f52e44
bioswrite tool (beta, untested!) 2017-03-30 11:59:55 -04:00
Trammell Hudson
4901ccd89c
major rearranging of Makefile, bin, library and busybox installation 2017-03-29 16:58:45 -04:00
Trammell Hudson
ab0476ad2f
Remove populate-lib, rework libraries and kernel module installation.
The populate-lib program was buggy on some systems and could accidentally
introduce unwanted libraries into the initrd.  The Makefile now uses the
modules' $(module_libraries) variable to select which libraries should be
installed into the initrd.

Kernel modules are now stripped and installed using a similar system.
2017-03-29 15:15:03 -04:00
Trammell Hudson
418ceaf733
make USB a module, strip debug info (issue #139) 2017-03-28 17:05:04 -04:00
Trammell Hudson
8384201e9c
Change ethernet drivers to be modules and measure them when they are loaded.
This is a step towards unifying the server and laptop config (issue #139)
and also makes it possible to later remove the USB modules from the
normal boot path.
2017-03-28 16:32:58 -04:00
Trammell Hudson
664c0ebc24
initrd.cpio.tmp is no longer necessary 2017-03-28 12:05:45 -04:00
Trammell Hudson
291e28b040
initrd.cpio.tmp is no longer necessary 2017-03-27 18:02:27 -04:00
Trammell Hudson
7b76ac6f95
report sha256sum of generated fimrware after build 2017-03-22 11:53:43 -04:00
Trammell Hudson
c136f1f76b
include configure and make command lines in logs 2017-03-22 11:53:35 -04:00
Trammell Hudson
aa473a0dea
limit parallel make load (issue #131) 2017-03-22 11:53:08 -04:00
Trammell Hudson
cbb85c645e
bzImage source was wrong (issue #62) 2017-03-22 11:52:55 -04:00
Trammell Hudson
9d638c8f8d
use relative outputs for musl-gcc and cross-gcc, clean up coreboot.rom (issue #62) 2017-03-22 11:52:45 -04:00
Trammell Hudson
8494488416
report sha256sum of generated fimrware after build 2017-03-21 14:31:36 -04:00
Trammell Hudson
1331e2475f
include configure and make command lines in logs 2017-03-21 14:29:45 -04:00
Trammell Hudson
db3a8e8c2e
limit parallel make load (issue #131) 2017-03-21 14:29:07 -04:00
Trammell Hudson
2befac7e13
bzImage source was wrong (issue #62) 2017-03-20 18:02:05 -04:00
Trammell Hudson
e7f2bca297
use relative outputs for musl-gcc and cross-gcc, clean up coreboot.rom (issue #62) 2017-03-20 17:57:20 -04:00
Trammell Hudson
936f6d6c9c
Fix small annoyances.
Issue #129: set pipefail so that intermediate failures in a pipeline
will cause the build to fail. Otherwise they are silently swallowed
by the tee into the build log.

Issue #128: strip was updating timestamps, making some files look
like they didn't need to be replaced.

No issue: configure was reading from stdin, which would make builds
hang forever if a new option was present.

No issue: print the cbfstool output on a successful ROM build.
2017-03-20 15:06:50 -04:00
Trammell Hudson
8fa9fc25a1
Fix small annoyances.
Issue #129: set pipefail so that intermediate failures in a pipeline
will cause the build to fail. Otherwise they are silently swallowed
by the tee into the build log.

Issue #128: strip was updating timestamps, making some files look
like they didn't need to be replaced.

No issue: configure was reading from stdin, which would make builds
hang forever if a new option was present.

No issue: print the cbfstool output on a successful ROM build.
2017-03-20 14:47:47 -04:00
Trammell Hudson
54cded7f59
pass extra parameters to xz to compress initrd.cpio for Linux kernel (issue #127) 2017-03-18 10:50:43 -04:00
Trammell Hudson
356e9307a2
parameterize number of parallel make jobs (issue #125) 2017-03-18 10:50:37 -04:00
Trammell Hudson
ef89302095
Quiet build unless V=1 is set (issue #114).
This logs all of the sub-modules into $(build)/log/$(module).log
instead of to stdout, unless the user sets `V=1` on the make
environment.  It produces a much quieter build, which should
allow integration into CI systems.
2017-02-28 18:02:10 -05:00
Trammell Hudson
0843d30097
Use a pre-built /dev/console initrd image.
This fixes issue #111 which led to problems if /dev/console on
a container had a virtualized device that didn't match the
device major/minor that the Heads kernel was expecting.
2017-02-28 15:18:57 -05:00
Trammell Hudson
e051915707
use musl-libc cross compiler strip (issue #100) 2017-01-31 14:57:41 -05:00
Trammell Hudson
bac717407f
Patch git checkouts, if a patch exists for a module. Add a per-module clean target. 2017-01-31 13:12:21 -05:00
Trammell Hudson
1411dffb6a
Make modules not depend on build path (issue #1).
Use --prefix="" to ensure that no destination paths are in libraries.

Use -fdebug-prefix-map to rewrite build path so that it does not
appear in the executables.

Use -gno-record-gcc-switches to ensure that the -fdebug-prefix-map
does not appear in the executables.
2017-01-28 13:14:56 -05:00
Trammell Hudson
24e54a65f6
Build GNU make-4.2 if the system make is the wrong version (issue #88).
Change all of the builds to use $(MAKE) instead of the /usr/bin/make.

Download and build GNU make-4.2 if the wrong version is installed
on the system.

Re-invoke build/make-4.2/make with the target that was passed in once
the correct make has been built.
2017-01-27 18:00:50 -05:00
Trammell Hudson
7294fa9438
use two spaces in sha256sum command (issue #89) 2017-01-27 18:00:45 -05:00
Trammell Hudson
84064debbe
musl-libc patches to build a successfull qemu image 2017-01-04 10:31:27 -05:00
Trammell Hudson
9273e252f6
Build initrd tools with musl-libc (issue #77).
This adds compilations modules for musl-libc and kernel-headers.
The entire initrd (busybox, cryptsetup, gpgv, kexec, etc) can be built
with the much smaller libc and it appears to work with chroot.

Library paths are not set correctly and files are installed into
heads/install to make them accessible to other modules.  This prevents
the initrd from working without manual fixup; need to fix before
merging into master.

Build times have gone up since everything is being rebuilt more
often for some reason.
2016-12-29 18:23:08 -05:00
Trammell Hudson
19721db935
strip libraries after populating initrd/lib (issue #74) 2016-12-28 16:47:35 -05:00
Trammell Hudson
5fd9878d28
Download and build almost all dependencies.
As part of issue #1, we should build all libraries and programs that we
deploy into the Heads initrd.  This modifies the module configurations
for all of them to install into heads/install so that we can build
against them.

Add dmsetup, cryptsetup and veritysetup (issue #46).

Build gpgv 1.4 as a standalone tool (issue #23).

Modify populate-lib to use the install directory by setting
LD_LIBRARY_PATH (issue #35).
2016-12-28 12:45:12 -05:00
Paul Menzel
92b20bdfb6 Strip trailing whitespace 2016-12-13 19:10:21 +01:00
Paul Menzel
aa3375f5ef Spell coreboot all lowercase
[coreboot](https://www.coreboot.org/) is officially spelled all
lowercase.
2016-12-13 18:02:35 +01:00
Trammell Hudson
ff5639a542
Build cryptsetup and install it into the initrd 2016-12-01 14:03:55 -05:00
Trammell Hudson
e55a6a4df4
Rework Makefile a bit.
rename TARGET to BOARD (fix #55)
use .INTERMEDIATE trick to avoid building multiple times (fix #52)
Don't touch build/*/.config if we don't have to (fix #51)
2016-11-29 11:28:05 -05:00
Trammell Hudson
4fbd6ca58b
Make coreboot building modular to support multiple boards.
This touches most of the module configurations since the
coreboot build process had to add a few new features.
The Linux kernel could make use of it as well if we need
separate x230/chell/qemu kernels, for instance.
2016-11-23 12:11:08 -05:00
Trammell Hudson
1414023e6e
include cryptsetup in build, will break 4M ROM images 2016-11-23 10:46:04 -05:00
Trammell Hudson
24ef1e1a0a
Created initrd/bin and initrd/lib directories (fix issue #33) 2016-09-26 14:55:48 -04:00
Trammell Hudson
4b2064f193
improve library/binary handling in building initrd (issue #21) 2016-09-10 17:36:36 -04:00
Trammell Hudson
05d1c66d8d
extreme compression 2016-09-09 13:26:52 -04:00
Trammell Hudson
b228290ae1
checkout coreboot from github, rather than downloading release file 2016-08-19 11:31:07 -04:00
Trammell Hudson
74e21567d4
use cpio-clean to make a reproducible makefile 2016-08-14 16:02:15 -04:00
Trammell Hudson
80b82fdfc4
extract and verify gpg signature on the boot script 2016-08-06 17:13:22 -04:00
Trammell Hudson
99830f7dd3
touch all files, including symlinks to reset the date for reproducible builds 2016-08-04 18:07:36 -04:00
Trammell Hudson
6f1a7e2a5b
bring in cbmem from coreboot utils to be able to see the coreboot console 2016-08-04 17:38:00 -04:00
Trammell Hudson
a81a002abb
Build and bundle the patched xen 4.6.3 kernel 2016-08-03 18:10:44 -04:00
Trammell Hudson
24fc2bbc9a
minimal /dev for initrd is /dev/console, fix dep on canary versus output 2016-08-03 10:47:48 -04:00
Trammell Hudson
f184c8e7f9
unpack tar files silently 2016-08-03 08:52:23 -04:00
Trammell Hudson
1c64e4ce09
module ordering works, so include entire module/* directory; fix initrd/bin mkdir; correct spelling of coreboot dep on bzImage 2016-08-03 08:40:51 -04:00
Trammell Hudson
397aa4a9f8
ensure that the initrd/bin dir exists 2016-08-02 23:48:18 -04:00
Trammell Hudson
4589e5d1d3
copy the bzImage into the coreboot build directory 2016-08-02 21:59:14 -04:00
Trammell Hudson
224a835b99
fix library path in initrd build 2016-08-02 21:53:23 -04:00
Trammell Hudson
62c544ea96
coreboot build (might) work; need to do a test from clean while online 2016-08-02 21:49:22 -04:00
Trammell Hudson
3fde9759f3
coreboot-4.4 binary blobs 2016-08-02 21:39:24 -04:00
Trammell Hudson
426cd8f94f
build the linux kernel after building the initrd 2016-08-02 21:23:18 -04:00
Trammell Hudson
0ffa65d2f2
busybox configuration 2016-08-02 19:29:33 -04:00
Trammell Hudson
00559def5d
porting Makefile to use a modular build system for each package 2016-08-02 19:25:47 -04:00
Trammell Hudson
b3786d256a
tpmtotp and qrencode deps 2016-07-31 22:39:07 -04:00
Trammell Hudson
2471e15109
cleanup initrd, improve population of lib directories, remove some extra drivers, add notes on /dev 2016-07-28 00:08:33 -04:00
Trammell Hudson
13c4d98971
remove double bzImage build and unneeded initrd.img buld 2016-07-26 15:01:16 -04:00
Trammell Hudson
a8761d4c83
deps for coreboot.rom 2016-07-25 14:50:22 -04:00
Trammell Hudson
4dded24fb7
build almost works 2016-07-25 13:36:15 -04:00
Trammell Hudson
a6d9902a2d
started on automated build process 2016-07-25 10:08:53 -04:00