]> git.proxmox.com Git - efi-boot-shim.git/blob - BUILDING
efi bins: add an easy way for vendors to add .sbat data
[efi-boot-shim.git] / BUILDING
1 It's pretty straightforward:
2
3 cp $MY_DER_ENCODED_CERT pub.cer
4 make VENDOR_CERT_FILE=pub.cer
5 make EFIDIR=my_esp_dir_name install
6
7 There are a couple of ways to customize the build:
8
9 Install targets:
10 - install
11 installs shim as if to a hard drive, including installing MokManager and
12 fallback appropriately.
13 - install-as-data
14 installs shim files to /usr/share/shim/$(EFI_ARCH)-$(VERSION)/
15
16 Variables you should set to customize the build:
17 - EFIDIR
18 This is the name of the ESP directory. The install targets won't work
19 without it.
20 - DESTDIR
21 This will be prepended to any install targets, so you don't have to
22 install to a live root directory.
23 - DEFAULT_LOADER
24 defaults to \\\\grub$(EFI_ARCH).efi , but you could set it to whatever.
25 Be careful with the leading backslashes, they can be hard to get
26 correct.
27
28 Variables you could set to customize the build:
29 - ENABLE_SHIM_CERT
30 if this variable is defined one the make command line, shim will
31 generate keys during the build and sign MokManager and fallback with
32 them, and the signed version will be what gets installed with the
33 install targets
34 - ENABLE_HTTPBOOT
35 build support for http booting
36 - REQUIRE_TPM
37 if tpm logging or extends return an error code, treat that as a fatal error.
38 - ARCH
39 This allows you to do a build for a different arch that we support. For
40 instance, on x86_64 you could do "setarch linux32 make ARCH=ia32" to get
41 the ia32 build instead. (DEFAULT_LOADER will be automatically adjusted
42 in that case.)
43 - TOPDIR
44 You can use this along with make -f to build in a subdir. For instance,
45 on an x86_64 machine you could do:
46
47 mkdir build-ia32 build-x64 inst
48 cd build-ia32
49 setarch linux32 make TOPDIR=.. ARCH=ia32 -f ../Makefile
50 setarch linux32 make TOPDIR=.. ARCH=ia32 \
51 DESTDIR=../inst EFIDIR=debian \
52 -f ../Makefile install
53 cd ../build-x64
54 make TOPDIR=.. -f ../Makefile
55 make TOPDIR=.. DESTDIR=../inst EFIDIR=debian \
56 -f ../Makefile install
57
58 That would get you x86_64 and ia32 builds in the "inst" subdir.
59 - OSLABEL
60 This is the label that will be put in BOOT$(EFI_ARCH).CSV for your OS.
61 By default this is the same value as EFIDIR .
62
63 Vendor SBAT data:
64 It will sometimes be requested by reviewers that a build includes extra
65 .sbat data. The mechanism to do so is to add a CSV file in data/ with the
66 name sbat.FOO.csv, where foo is your EFI subdirectory name. The build
67 system will automatically include any such files.
68
69 # vim:filetype=mail:tw=74