12 Commits

Author SHA1 Message Date
Travis Geiselbrecht
75eaa5c489 [app][warnings] fix -Wmissing-declarations warnings in app/ 2021-10-21 23:16:57 -07:00
Travis Geiselbrecht
77fa084cd0 [warnings][gcc 11] Fix a few annoying out of bounds pointer warnings
It seems to be in the case of a string op against a raw address, the
compiler decides the destination object is 0 bytes long and throws a
particular warning. Work around it by not using memcpy in one case and
by disabling the warning in the other.

Both are fairly benign code that basically operates in a hard coded way
that knows the destination buffer is valid.
2021-06-27 00:31:01 -07:00
Travis Geiselbrecht
4edb93adde [lib][console] rename some console command types to be prefixed with console_
Some of the structures, notably 'cmd', in the lib console stuff are a
little too generically named and have collided with some other code
so prefix the names a bit more cleanly with console_

The change is largely mechanical, and folks with out of tree code can
easily switch by renaming:
cmd -> console_cmd
cmd_args -> console_cmd_args
cmd_block -> console_cmd_block
console_cmd -> console_cmd_func

Apologies if this breaks you but it should be pretty easy to fix.
2020-07-25 15:59:58 -07:00
Travis Geiselbrecht
6cb02526b7 [include][console] split lib/console.h into two
TL;DR most uses of lib/console.h -> lk/console_cmd.h

Move the part that lets a piece of code somewhere in the system to
define a console command from the actual lib/console api to start an
instance of the console. Move in almost every place the user of the
console command definition to the new header, lk/console_cmd.h which is
always in the include path.

Also remove most uses of testing for WITH_LIB_CONSOLE since you can
almost always just safely define it and then let the linker remove it.
2019-07-13 16:56:33 -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
Carlos Pizano
13a1d4f530 [app][loader] Odds and ends
- Fix a bug when doing bounds checking
- Don't run elf if the entrypoint is out of bounds
- Allow to specify the memory slot to download (slot is 512K)
- Default slot for elf is 1, 3 and for data is 0, 2
2015-09-23 12:46:43 -07:00
Travis Geiselbrecht
215b5ed07f [64bit] fix a few more 64bit warnings in newer code 2015-09-20 13:11:51 -07:00
Carlos Pizano
0fa831244d [app][loader] Remove spurious parameter to printf(). 2015-09-18 16:40:25 -07:00
Carlos Pizano
3c89961208 [app][loader] Remove uneeded APP entrypoints.
We don't need our own thread.
2015-09-17 19:23:56 -07:00
Carlos Pizano
2809f91084 [app][loader] Load blobs and run elf via tftp into SDRAM
Introduces two commands:
   load any <filename>
   load elf <filename>

Then from another system in the network you can:
   tftp -i <ip-addr> put <filename>

Which for the 'any' case just loads the file into DRAM and for the 'elf'
case it parses the file and if correct it spawns a thread to run the
entrypoint.
2015-09-17 18:21:39 -07:00