1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-13 23:26:59 +00:00

10 Commits

Author SHA1 Message Date
Benjamin Herrenschmidt
803ee9ef35 Makefile: Improve clean a bit
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-15 20:49:09 +10:00
Benjamin Herrenschmidt
7bc118c7db console: Move console files
console.c goes to a new lib/ where we'll store other general utilities
and console.h goes to include/

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-15 20:48:58 +10:00
Benjamin Herrenschmidt
c5f5f50738 hello_world: Use new headers and frequency from syscon
This uses the new header files for register definitions and
extracts the core frequency from syscon rather than hard coding it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-08 21:06:16 +10:00
Paul Mackerras
cf4dfeca36 Change the default cross compiler prefix to powerpc64le-linux-gnu-
That is what is used by the packaged cross-compilers on (at least)
Fedora and Ubuntu.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2020-04-29 11:37:02 +10:00
Anton Blanchard
06b28be577 hello_world: Use Makefile automatic variables
Fix a few whitespace issues while here.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2020-04-16 17:38:07 +10:00
Paul Mackerras
abefafd70b hello_world: Adjust header inclusions and Makefile
Currently hello_world fails to build with distro cross compiler
packages such as Debian gcc-powerpc64-linux-gnu, because it doesn't
provide string.h or unistd.h.  In fact we don't need them, we just
need stddef.h.  This adds #include <stddef.h> to console.h to get
size_t defined.  We also add #include "console.h" to console.c.

The hello_world Makefile currently hard-codes CROSS_COMPILE on
non-PPC machines.  This means that a command like:

	$ CROSS_COMPILE=powerpc64le-linux-gnu- make

doesn't do what you expect; it just tries to use powerpc64le-linux-gcc
regardless.  Adding a '?' makes it do what one expects.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2020-04-03 12:10:31 +11:00
Michael Neuling
96fbd61de8 Breakout the console code so it can be reused.
No functional change.

Signed-off-by: Michael Neuling <mikey@neuling.org>
2020-03-31 16:31:36 +11:00
Anton Blanchard
9362f2dd10 Move bin2hex.py to scripts/
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2020-01-11 21:31:48 +11:00
Dan Horák
2d7994dc12 don't cross compile when on Power 2019-08-24 14:02:35 +02:00
Anton Blanchard
8bc3e8ea0a Add a simple hello_world example that also echos input
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
2019-08-24 09:00:36 +10:00