libpayload: fix wrong endian assumption in sha1.c

Not all platforms !x86 are big endian, hence actually look
at the CONFIG_LITTLE_ENDIAN flag instead of CONFIG_ARCH_X86.

Change-Id: Ibbd8f48b377a1121dd1e045834a94a2d67eda2ab
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/56066
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-on: http://review.coreboot.org/4236
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Stefan Reinauer 2013-05-21 10:46:28 -07:00 committed by Alexandru Gagniuc
parent c6f0997ffc
commit 047c98a2c1
1 changed files with 1 additions and 7 deletions

View File

@ -30,18 +30,12 @@ typedef unsigned int u_int;
/* Moved from libpayload.h */
#ifdef CONFIG_ARCH_X86
#ifdef CONFIG_LITTLE_ENDIAN
#define BYTE_ORDER LITTLE_ENDIAN
#else
#define BYTE_ORDER BIG_ENDIAN
#endif
#if 0
#include <sys/param.h>
#include <string.h>
#include <sha1.h>
#endif
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
/*