Easy projects: Difference between revisions
No edit summary |
(remove Done section) |
||
Line 60: | Line 60: | ||
If a delay call does not depend on precise timing and if the '''programmer''' in question '''does not offer its own delay function''', programmer_delay() can be replaced with internal_sleep(). | If a delay call does not depend on precise timing and if the '''programmer''' in question '''does not offer its own delay function''', programmer_delay() can be replaced with internal_sleep(). | ||
If a delay call does not depend on precise timing and if the delay '''should run on the host''', programmer_delay() can be replaced with internal_sleep(). | If a delay call does not depend on precise timing and if the delay '''should run on the host''', programmer_delay() can be replaced with internal_sleep(). | ||
Revision as of 10:12, 3 March 2023
This page is listing small projects for the beginners, to start learning about flashrom development and do some useful tasks.
If you're a flashrom newbie, this page is for you.
Open tasks
Fix issues found by scan-build
Run scan-build in the tree:
make clean && CFLAGS='-fsanitize=leak' scan-build make
At the moment of writing this, it produces around 30 issues, which means there are plenty of easy projects.
In general, one issue == one Easy project. However, you can fix more than one issue in the same patch if there are multiple occurrences of the same issue in the same file.
You need to install clang-tools for this project.
Find chips without voltage data
We have added allowed supply voltage ranges (usually denoted VCC in datasheets) to the chip definitions in flashchips.c, but not all of them. Complete the list by looking for the right datasheet and editing flashchips.c accordingly.
Find boards that have a board enable but are not mentioned in print.c
There may be a few boards that had a Board Enable added (in board_enable.c) but which were not added to the array named boards_known in print.c (usually by mistake).
Find those and send a list or even a patch for print.c to the mailing list.
Even better would be an automatic detection of such mistakes. We already do some sanity checks on startup (cf. selfcheck() in flashrom.c).
Add timing info to flash chip definitions (mostly done)
Go through the list of flash chips in flashchips.c inside the flashrom source. For each chip (except SPI chips), read through the data sheets and add a comment to the flash chip definition which contains the timing information in microseconds(!) for the probe sequence.
This will make probing a lot more reliable.
Every annotated chip helps.
Add new flash chip definitions
We have a few dozen chip IDs listed in flash.h, but not in flashchips.c. You can find them by running util/list_yet_unsupported_chips.sh. Then dig up the data sheets and add chip definitions for them to flashchips.c. You can use similar flash chips as a guideline. Check our list of pending patches (http://patchwork.coreboot.org/project/flashrom/list/) to not duplicate someone's work. Reviewing any pending patches by verifying the values in the patches is of course also very welcomed too! The process of adding a chip and the needed data structures are explained here.
This will reduce the number of undetected chips and every added chip broadens flashrom support.
Add (ferroelectric, F-RAM) SPI chips made by Cypress / Ramtron
http://www.cypress.com/products/f-ram-serial
Example datasheet: http://www.cypress.com/file/41676/download
These work mostly like SPI flashes, except for (these are just the biggest points):
- No erase command (or erasing necessary)
- 2-byte addresses (atleast for smaller/older devices)
Test flashrom
Please see the Board Testing HOWTO.
Replace programmer_delay() with internal_sleep() where appropriate
If a delay call does not depend on precise timing and if the programmer in question does not offer its own delay function, programmer_delay() can be replaced with internal_sleep(). If a delay call does not depend on precise timing and if the delay should run on the host, programmer_delay() can be replaced with internal_sleep().