Move endianness definitions and provide it inside Makefile

Add an `endiantest.c` similar to `archtest.c` to provide the endianness
inside the Makefile. The __FLASHROM_(LITTLE|BIG)_ENDIAN__ definitions
had to move from `hwaccess.h` into `platform.h`, therefor. This will
be used to decide whether to build the internal programmer in a follow-

Change-Id: I55dcf5a88da48f885cda9ad89ab87395d895a891
Signed-off-by: Nico Huber <>
Tested-by: build bot (Jenkins) <>
Reviewed-by: David Hendricks <>
diff --git a/endiantest.c b/endiantest.c
new file mode 100644
index 0000000..de44ec5
--- /dev/null
+++ b/endiantest.c
@@ -0,0 +1,6 @@
+#include "platform.h"