Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: chromeos-base/vboot_reference/vboot_reference-9999.ebuild

Issue 3799003: vboot_reference: refine ebuild and add new dev tools (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/chromiumos-overlay.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Distributed under the terms of the GNU General Public License v2 2 # Distributed under the terms of the GNU General Public License v2
3 3
4 inherit cros-workon 4 inherit cros-workon
5 5
6 DESCRIPTION="Chrome OS verified boot tools" 6 DESCRIPTION="Chrome OS verified boot tools"
7 LICENSE="GPL-3" 7 LICENSE="GPL-3"
8 SLOT="0" 8 SLOT="0"
9 KEYWORDS="~amd64 ~arm ~x86" 9 KEYWORDS="~amd64 ~arm ~x86"
10 IUSE="minimal rbtest tpmtests" 10 IUSE="minimal rbtest tpmtests"
11 EAPI="2" 11 EAPI="2"
12 12
13 DEPEND="app-crypt/trousers 13 DEPEND="app-crypt/trousers
14 dev-libs/openssl 14 dev-libs/openssl
15 sys-apps/util-linux" 15 » sys-apps/util-linux"
16 16
17 src_compile() { 17 src_compile() {
18 tc-export CC AR CXX 18 tc-export CC AR CXX
19 local err_msg="${PN} compile failed. " 19 local err_msg="${PN} compile failed. "
20 err_msg+="Try running 'make clean' in the package root directory" 20 err_msg+="Try running 'make clean' in the package root directory"
21 emake || die "${err_msg}" 21 emake || die "${err_msg}"
22 if use rbtest; then 22 » if use rbtest; then
23 emake rbtest || die "${err_msg}" 23 » » emake rbtest || die "${err_msg}"
24 fi 24 » fi
25 } 25 }
26 26
27 src_install() { 27 src_install() {
28 local dst_dir
29
28 if use minimal ; then 30 if use minimal ; then
29 # Installing on the target. Cherry pick programs generated 31 # Installing on the target. Cherry pick programs generated
30 # by src_compile in the source tree build/ subdirectory 32 # by src_compile in the source tree build/ subdirectory
33 einfo "Installing target programs"
31 local progs='utility/dump_kernel_config' 34 local progs='utility/dump_kernel_config'
32 progs+=' utility/dev_sign_file' 35 progs+=' utility/dev_sign_file'
33 progs+=' utility/tpm_init_temp_fix' 36 progs+=' utility/tpm_init_temp_fix'
34 progs+=' utility/tpmc' 37 progs+=' utility/tpmc'
35 progs+=' utility/vbutil_key' 38 progs+=' utility/vbutil_key'
36 progs+=' utility/vbutil_kernel' 39 progs+=' utility/vbutil_kernel'
37 progs+=' utility/vbutil_firmware' 40 progs+=' utility/vbutil_firmware'
38 progs+=' utility/gbb_utility' 41 progs+=' utility/gbb_utility'
39 progs+=' utility/dump_fmap' 42 progs+=' utility/dump_fmap'
40 progs+=' utility/dev_debug_vboot' 43 progs+=' utility/dev_debug_vboot'
41 progs+=' cgpt/cgpt' 44 progs+=' cgpt/cgpt'
42 45
43 » » into "/usr" 46 » » into /usr
44 for prog in ${progs}; do 47 for prog in ${progs}; do
45 dobin "${S}"/build/"${prog}" 48 dobin "${S}"/build/"${prog}"
46 done 49 done
47 50
51 einfo "Installing dev tools"
52 dst_dir='/usr/share/vboot/bin'
53 local src_dir='scripts/image_signing'
54 dodir "${dst_dir}"
55 exeinto "${dst_dir}"
56 doexe "${src_dir}/common.sh"
57 doexe "${src_dir}/resign_firmwarefd.sh"
58 doexe "${src_dir}/make_dev_firmware.sh"
59 doexe "${src_dir}/make_dev_ssd.sh"
60
61 # TODO(hungte) Since we now install all keyset into
62 # /usr/share/vboot/devkeys, maybe SAFT does not need to install
63 # its own keys anymore.
64 einfo "Installing keys for SAFT"
48 local keys_to_install='recovery_kernel_data_key.vbprivk' 65 local keys_to_install='recovery_kernel_data_key.vbprivk'
49 keys_to_install+=' firmware.keyblock ' 66 keys_to_install+=' firmware.keyblock '
50 keys_to_install+=' firmware_data_key.vbprivk' 67 keys_to_install+=' firmware_data_key.vbprivk'
51 keys_to_install+=' kernel_subkey.vbpubk' 68 keys_to_install+=' kernel_subkey.vbpubk'
52 69
53 dst_dir='/usr/sbin/firmware/saft' 70 dst_dir='/usr/sbin/firmware/saft'
54 dodir "${dst_dir}" 71 dodir "${dst_dir}"
55 insinto "${dst_dir}" 72 insinto "${dst_dir}"
56 for key in ${keys_to_install}; do 73 for key in ${keys_to_install}; do
57 » » doins "tests/devkeys/${key}" 74 » » » doins "tests/devkeys/${key}"
58 done 75 done
76
59 else 77 else
78 # Installing on host.
60 emake DESTDIR="${D}/usr/bin" install || \ 79 emake DESTDIR="${D}/usr/bin" install || \
61 die "${PN} install failed." 80 die "${PN} install failed."
62 dodir /usr/share/vboot/devkeys
63 insinto /usr/share/vboot/devkeys
64 doins tests/devkeys/*
65 fi 81 fi
66 if use rbtest; then 82 » if use rbtest; then
67 emake DESTDIR="${D}/usr/bin" BUILD="${S}"/build -C tests \ 83 » » emake DESTDIR="${D}/usr/bin" BUILD="${S}"/build -C tests \
68 install-rbtest || die "${PN} install failed." 84 » » install-rbtest || die "${PN} install failed."
69 fi 85 » fi
70 if use tpmtests; then 86 » if use tpmtests; then
71 into "/usr" 87 » » into /usr
72 # copy files starting with tpmtest, but skip .d files. 88 » » # copy files starting with tpmtest, but skip .d files.
73 dobin ${S}/build/tests/tpm_lite/tpmtest*[^.]? 89 » » dobin "${S}"/build/tests/tpm_lite/tpmtest*[^.]?
74 dobin ${S}/build/utility/tpm_set_readsrkpub 90 » » dobin "${S}"/build/utility/tpm_set_readsrkpub
75 fi 91 » fi
92
93 » # Install devkeys to /usr/share/vboot/devkeys
94 » # (shared by host and target)
95 » dst_dir='/usr/share/vboot/devkeys'
96 » dodir "${dst_dir}"
97 » insinto "${dst_dir}"
98 » doins tests/devkeys/*
76 99
77 # Install firmware/include to /build/${BOARD}/usr/include/vboot 100 # Install firmware/include to /build/${BOARD}/usr/include/vboot
78 » dodir /usr/include/vboot 101 » dst_dir='/usr/include/vboot'
79 » insinto /usr/include/vboot 102 » dodir "${dst_dir}"
103 » insinto "${dst_dir}"
anush 2010/10/15 17:15:34 Don't you want to install this just on the host an
Hung-Te 2010/10/15 17:35:44 It is there because "required by uboot for cross c
80 doins -r firmware/include/* 104 doins -r firmware/include/*
81 105
82 # Install vboot_fw.a to /build/${BOARD}/usr/lib 106 # Install vboot_fw.a to /build/${BOARD}/usr/lib
83 insinto /usr 107 insinto /usr
84 dolib.a "${S}"/build/vboot_fw.a 108 dolib.a "${S}"/build/vboot_fw.a
85 } 109 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698