[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.
This commit is contained in:
Travis Geiselbrecht
2019-07-13 16:56:33 -07:00
parent 35a8d555a3
commit 6cb02526b7
48 changed files with 88 additions and 179 deletions

View File

@@ -18,11 +18,7 @@
#include <kernel/thread.h>
#if defined(WITH_LIB_CONSOLE)
#include <lib/console.h>
#else
#error "loader app needs a console"
#endif
#include <lk/console_cmd.h>
#if defined(SDRAM_BASE)
#define DOWNLOAD_BASE ((void*)SDRAM_BASE)

View File

@@ -8,6 +8,7 @@ MODULE_SRCS += \
MODULE_DEPS := \
lib/cksum \
lib/console \
lib/tftp \
lib/elf