8 Commits

Author SHA1 Message Date
Matt Schulte
00b6ca080e Reset errno values where read
According to `man 3 errno`:

```
The value of errno is never set to zero by any system
call or library function.
```

So we must set it to 0 ourselves before each `read` and `write` call to
ensure we don't get stuck in an error loop.
2025-07-28 12:48:11 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
2eb32a4369 [style] mass reformat all the non external code to 4 space indents
Ran everything through scripts/codestyle.space, which uses astyle
to generally follow K&R style.

Biggest non whitespace change is pulling brackets down on function
declarations, which I'm pretty ambivalent about, but astyle insists
on taking a stance
2016-02-14 12:24:01 -08:00
Travis Geiselbrecht
814466de4d [tools] trim metadata and endian swap fpga images in tools
For both mkimage and lkboot, make sure the fpga bitfile is trimmed
(everything prior to the 8 byte sync pattern removed) and 4 byte endian
swapped prior to putting on device.
2014-12-11 20:01:11 -08:00
Travis Geiselbrecht
f8f2d851f0 [lib][bootimage] first stab at device side bootimage processing
Add lib/bootimage to parse in memory copies of bootimages
Add a few command line arguments to mkimage
2014-11-21 15:50:18 -08:00
Travis Geiselbrecht
fdc3d1199a [lib][mincrypt] move the mincrypt headers in a level to match the module name 2014-11-21 15:10:55 -08:00
Brian Swetland
820bbfce0f [tools][mkimage] boot image creator and header 2014-09-26 12:54:48 -07:00