From 70e9509a2748c0ee8646d77f2a0e6fcbb1446505 Mon Sep 17 00:00:00 2001 From: vbendeb Date: Mon, 14 Jun 2010 15:41:27 -0700 Subject: Rework the vboot_reference make system. After this change the generated files are placed in a separate tree (such thet they don't show in the `git status' output anymore) and the dependencies are followed properly (if a .h file changes the appropriate .o files and apps get rebuilt). Tested as follows: > $ make clean > $ make # build succeeds > $ git status # shows clean directory > $ RUNTESTS=1 make # (captured test output matches that of the test run before any changes) > $ touch ./vboot_firmware/include/tlcl.h > $ make # make succeeds > $ find build -type f -newer ./vboot_firmware/include/tlcl.h build/vboot_firmware/lib/rollback_index.o build/vboot_firmware/lib/rollback_index.o.d build/vboot_firmware/a.out build/vboot_fw.a build/utility/vbutil_key build/utility/kernel_utility.d build/utility/vbutil_key.d build/utility/verify_data build/utility/load_kernel_test.d build/utility/vbutil_keyblock.d build/utility/vbutil_kernel build/utility/vbutil_kernel.d build/utility/firmware_utility build/utility/signature_digest_utility.d build/utility/kernel_utility build/utility/verify_data.d build/utility/vbutil_keyblock build/utility/signature_digest_utility build/utility/load_kernel_test build/utility/firmware_utility.d build/tests/vboot_common3_tests build/tests/vboot_common2_tests build/host/a.out $ > Review URL: http://codereview.chromium.org/2845001 --- tests/run_vbutil_tests.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/run_vbutil_tests.sh') diff --git a/tests/run_vbutil_tests.sh b/tests/run_vbutil_tests.sh index f3e75940..ce86e173 100755 --- a/tests/run_vbutil_tests.sh +++ b/tests/run_vbutil_tests.sh @@ -21,7 +21,7 @@ function test_vbutil_key { # Pack the key ${UTIL_DIR}/vbutil_key --pack \ --in ${TESTKEY_DIR}/key_rsa${keylen}.keyb \ - --out ${TESTKEY_DIR}/key_alg${algorithmcounter}.vbpubk \ + --out ${TESTKEY_SCRATCH_DIR}/key_alg${algorithmcounter}.vbpubk \ --version 1 \ --algorithm $algorithmcounter if [ $? -ne 0 ] @@ -32,7 +32,7 @@ function test_vbutil_key { # Unpack the key # TODO: should verify we get the same key back out? ${UTIL_DIR}/vbutil_key --unpack \ - --in ${TESTKEY_DIR}/key_alg${algorithmcounter}.vbpubk + --in ${TESTKEY_SCRATCH_DIR}/key_alg${algorithmcounter}.vbpubk if [ $? -ne 0 ] then return_code=255 @@ -63,13 +63,15 @@ RSA-${signing_keylen}/${signing_hashalgo}${COL_STOP} \ and ${COL_YELLOW}data key algorithm RSA-${datakeylen}/\ ${datahashalgo}${COL_STOP}" # Remove old file - keyblockfile=${TESTKEY_DIR}/sign${signing_algorithmcounter}_data${data_algorithmcounter}.keyblock + keyblockfile="${TESTKEY_SCRATCH_DIR}/" + keyblockfile+="sign${signing_algorithmcounter}_data" + keyblockfile+="${data_algorithmcounter}.keyblock" rm -f ${keyblockfile} # Pack ${UTIL_DIR}/vbutil_keyblock --pack ${keyblockfile} \ --datapubkey \ - ${TESTKEY_DIR}/key_alg${data_algorithmcounter}.vbpubk \ + ${TESTKEY_SCRATCH_DIR}/key_alg${data_algorithmcounter}.vbpubk \ --signprivate ${TESTKEY_DIR}/key_rsa${signing_keylen}.pem \ --algorithm $signing_algorithmcounter if [ $? -ne 0 ] @@ -80,7 +82,7 @@ ${datahashalgo}${COL_STOP}" # Unpack ${UTIL_DIR}/vbutil_keyblock --unpack ${keyblockfile} \ --signpubkey \ - ${TESTKEY_DIR}/key_alg${signing_algorithmcounter}.vbpubk + ${TESTKEY_SCRATCH_DIR}/key_alg${signing_algorithmcounter}.vbpubk # TODO: check data key against the packed one? if [ $? -ne 0 ] then -- cgit v1.2.1