summaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
...
* Make test-list a per-board parameterVic Yang2013-04-291-0/+1
| | | | | | | | | | | | | | Some tests are not applicable to all boards. This change makes test-list a per-board parameter so a test can be enabled/disabled for individual boards. Also disable all the tests that don't compile now. BUG=chrome-os-partner:18598 TEST=make tests for all boards BRANCH=None Change-Id: Id2d18e23856f5c64dbdc7c6ca5949f8ad61b5cc0 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49452
* Replace generated CONFIG_TASK_ macros with HAS_TASK_Bill Richardson2013-04-241-1/+1
| | | | | | | | | | | | | | | CONFIG_ macros should be set directly. Expanding the task names in the same way made it difficult to tell what was a configuration choice and what was due to changes in ec.tasklist BUG=chrome-os-partner:18343 TEST=build all, run link BRANCH=none Change-Id: Ib82e34f974238ee2dd216f33b701b6f4c6a4f1f1 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/49098 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Exclude chipset task from test binariesVic Yang2013-04-111-1/+1
| | | | | | | | | | | | | | | For most tests, we don't need to power the AP. Let's exclude chipset task to save memory space. BUG=chrome-os-partner:18598 TEST=Run pingpong test on Spring BRANCH=none Change-Id: I545c5b3e1c27b0067d4ffe09a7971d32b75d6039 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47833 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Only includes necessary tasks for test binariesVic Yang2013-04-101-3/+12
| | | | | | | | | | | | | | | | | | | | This changes current TASK() syntax to TASK_BASE() and TASK_NORMAL(), where TASK_BASE is necessary for the EC to boot on a board and TASK_NORMAL represents the task that can be removed in a test binary. Tasks introduced by a test should be listed as TASK_TEST(). Note that this CL breaks current tests (many of them are broken anyway), which will be fixed in up coming CLs. BUG=chrome-os-partner:18598 TEST=Build link/bds/spring/snow/daisy/mccroskey. (mccroskey failed for unrelated issue) BRANCH=none Change-Id: Ic645cdae0906ed21dc473553f1f43c2537ec4bb9 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47531
* Clean up vboot hash supportRandall Spangler2012-10-251-1/+0
| | | | | | | | | | | | | | | | | | This copies the parts of sha256.c that we need from vboot_reference, and removes the explicit dependency on vboot_reference. That dependency was a good idea when we were doing full verified boot in the EC, but is now overkill and makes it harder for others to reuse the EC code. This also lets us call EC functions directly instead of needing vboot_stub.cc; that reduces code size by ~100 bytes. BUG=chrome-os-partner:15579 BRANCH=none TEST=vboot_hash ro, then compare with result of sha256sum build/link/ec.RO.flat Change-Id: I0f236174291df3e7f3c75e960fe9ab32af305a61 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36589 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
* Switch to variable-size stacksRandall Spangler2012-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | Increase stack size slightly for vboot hash task since the vboot SHA256 function allocates ~300 bytes of stack data. Reduce stack size for watchdog, power LED, and a few other tasks with simple call trees where we can be sure an error path isn't going to blow past the reduced stack. This frees up ~1KB of RAM on STM32. BUG=chrome-os-partner:13814 BRANCH=all TEST=boot system; shmem should show more unused RAM; taskinfo should show tasks still have unused stack Change-Id: I47d6b77564a0180d15d86667cc0566a8919b776e Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/32608 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add GEC lock mechanism.Louis Yung-Chieh Lo2012-08-101-0/+1
| | | | | | | | | | | | | | Basically re-use the gec lock code from flashrom package. BUG=chrome-os-partner:12319 TEST=Build and run on link. Only build on snow. while true; do ectool hello; done & ; run 10 instances. ; expect all instances runs okay. Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> Change-Id: I11d5824f46810c6f5a04a564a81387cdea081697 Reviewed-on: https://gerrit.chromium.org/gerrit/29763 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Modify Makefile to allow insertion of mock modulesVic Yang2012-06-141-8/+9
| | | | | | | | | | | | | | | | | | | | When we need to mock modules in a unit test, we need a way to mock the actual modules. This CL enables mock of given source files. For example, if we need to mock watchdog for test 'foo', we can add to test/build.mk: "core-mock-foo-watchdog.o=fake_watchdog.o", and then implement its own watchdog in fake_watchdog.c. Signed-off-by: Vic Yang <victoryang@chromium.org> BUG=chrome-os-partner:10356 TEST=Set a mock fake_watchdog.c and check the test is compiled with fake_watchdog.c instead of watchdog.c. Change-Id: I4a0afb589a49dad7c4d6faf8926438085cdc46cf Reviewed-on: https://gerrit.chromium.org/gerrit/24942 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Ready: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org>
* Enable verified boot for EC firmwareBill Richardson2012-05-101-0/+3
| | | | | | | | | | | | | | | | | | | | BUG=chrome-os-partner:7459 TEST=manual In the chroot: cd src/platform/ec make BOARD=link The firmware image (build/link/ec.bin) is signed with dev-keys. Reflash the EC and try it, and it should verify and reboot into RW A. Additional tests (setting USE_RO_NORMAL, poking random values into VBLOCK_A or FW_MAIN_A to force RW B to run, etc.) are left as an exercise for the reader. I've done them and they work, though. Change-Id: I29a23ea69aef02a11aebd4af3b043f6864723523 Signed-off-by: Bill Richardson <wfrichar@chromium.org>
* introducing chip variant for stm32 family [2/3]Vincent Palatin2012-05-011-2/+2
| | | | | | | | | | | | Add a parameter to define the chip variant and pass it to build/make processes. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:9057 TEST=make BOARD=daisy ; make BOARD=adv ; make BOARD=discovery Change-Id: I87b65b582ed5fc2cf5966446e15224ac15e328e9
* Pass include directories to C preprocessorSimon Glass2012-04-101-3/+5
| | | | | | | | | | | | | | | | | | | | If we include a header file within board/daisy/board.h then the code in the top-level Makefile which transforms the configuration into make variables cannot locate the header file. We get a warning: $ make BOARD=daisy clean board/daisy/board.h:11:20: fatal error: common.h: No such file or directory compilation terminated. To fix this, pass the include directories to the preprocessor also. BUG=none TEST=manual: add common.h header to board/daisy/board.h; make BOARD=daisy clean; see that no warning is issued Change-Id: I04b718e014490a3f6008b7d03afce4d79a38eb56 Signed-off-by: Simon Glass <sjg@chromium.org>
* update versioning information stored in the ECVincent Palatin2012-03-021-1/+1
| | | | | | | | | | | | | | | Add build information (date/time/builder) which can be displayed at the EC console. Generate a version from the board name and the branch tag. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chromium-os:27013 TEST=on BDS, run version command on the console. inspect the built binary. Change-Id: Idb1f68898ba6b811d02919f17ab4536ed9f8934a
* build private files if presentVincent Palatin2012-02-161-1/+3
| | | | | | | | | | | | | | If we have a private/ directory, check the build.mk there and build the content, else safely ignore that part of the build. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST="make BOARD=link" with and without a private directory containing some code with new console commands. Run the firmware and check if the console commands are actually present. Change-Id: I690ed97be24d029628e4acf508299dcbab657100
* Sqrt function for Cortex-MVic Yang2012-02-161-1/+1
| | | | | | | | | | Add an arch include folder. Implement sqrtf for Cortex-M in math.h. BUG=chrome-os-partner:7920 TEST=none Change-Id: Ib7b480b6a0bf7760f014a1f73df54673a9016cb6 Signed-off-by: Vic Yang <victoryang@chromium.org>
* Add board configuration flags in board.hRong Chang2012-02-061-1/+2
| | | | | | | | | | | Current makefile takes CONFIG_* flags from $(CHIP)/config.h . This CL adds $(BOARD)/board.h and a sample charger config flag. Signed-off-by: Rong Chang <rongchang@google.com> BUG=chrome-os-partner:7917 TEST=build bds,link board and check warning and error messages. Change-Id: I1f13d24da6b18c014f40f941ef7245487e5ccc81
* Move OS files to a CPU specific directoryVincent Palatin2012-01-251-2/+4
| | | | | | | | | | | | | | Preparatory work to introduce a second SoC : 3/5 We split the drivers files which contain SoC specific drivers from the OS files which only depend the actual CPU core. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run EC firmware on BDS and test a few commands on the console. Change-Id: I598f8b23e074da9bd6b0e2ce6689c1075fe854f0
* Add modularity to the buildVincent Palatin2012-01-241-5/+17
| | | | | | | | | | | | | | You can now enable/disable tasks more easily. To conditionally compile a C file depending on the task FOO activation, just write something like that in the build.mk file : common-$(CONFIG_TASK_FOO)+=foo_source.o Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=make all BOARD=link && make qemu-tests Change-Id: I760fb248e1599d13190ccd937a68ef47da17b510
* Separate utility build for build and host utilsRandall Spangler2011-12-081-1/+1
| | | | | | | | | | | | | | Build is the system doing the build (e.g. 64-bit linux) and host is the target platform on top of the ec (e.g. 32-bit Chromium OS). Necessary to get ectool properly compiling for Chromium OS. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=make && file build/bds/util/ectool; ectool should be a 32-bit binary Change-Id: I50eba4c164ece236646a7c6087b1b86769beeb28
* Initial sources import 3/3Vincent Palatin2011-12-071-0/+33
source files mainly done by Vincent. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Change-Id: Ic2d1becd400c9b4b4a14d4a243af1bdf77d9c1e2