diff options
| -rw-r--r-- | meta-oe/recipes-extended/sedutil/files/0001-Fix-build-on-big-endian-architectures.patch | 41 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/sedutil/sedutil_git.bb | 4 |
2 files changed, 44 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/sedutil/files/0001-Fix-build-on-big-endian-architectures.patch b/meta-oe/recipes-extended/sedutil/files/0001-Fix-build-on-big-endian-architectures.patch new file mode 100644 index 0000000000..7351197e4f --- /dev/null +++ b/meta-oe/recipes-extended/sedutil/files/0001-Fix-build-on-big-endian-architectures.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From ff98a326d5faa585f0e15e51a558cc2c49aa8099 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Primoz Fiser <primoz.fiser@norik.com> | ||
| 3 | Date: Fri, 23 Nov 2018 08:31:29 +0100 | ||
| 4 | Subject: [PATCH] Fix build on big endian architectures | ||
| 5 | |||
| 6 | Signed-off-by: Primoz Fiser <primoz.fiser@norik.com> | ||
| 7 | --- | ||
| 8 | Common/DtaEndianFixup.h | 13 +++++++------ | ||
| 9 | 1 file changed, 7 insertions(+), 6 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/Common/DtaEndianFixup.h b/Common/DtaEndianFixup.h | ||
| 12 | index 58eb3ff..184fce0 100644 | ||
| 13 | --- a/Common/DtaEndianFixup.h | ||
| 14 | +++ b/Common/DtaEndianFixup.h | ||
| 15 | @@ -31,12 +31,11 @@ along with sedutil. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | //TODO: add a test on the endianess of the system and define | ||
| 17 | // empty macros if the system is big endian | ||
| 18 | #pragma once | ||
| 19 | -#ifdef __gnu_linux__ | ||
| 20 | -#include <endian.h> | ||
| 21 | -#if __BYTE_ORDER != __LITTLE_ENDIAN | ||
| 22 | -#error This code does not support big endian architectures | ||
| 23 | -#endif | ||
| 24 | -#endif | ||
| 25 | +#if defined(__BYTE_ORDER__)&&(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) | ||
| 26 | +#define SWAP16(x) x | ||
| 27 | +#define SWAP32(x) x | ||
| 28 | +#define SWAP64(x) x | ||
| 29 | +#else | ||
| 30 | /** change the "endianess" of a 16bit field */ | ||
| 31 | #define SWAP16(x) ((uint16_t) ((x & 0x00ff) << 8) | ((x & 0xff00) >> 8)) | ||
| 32 | /** change the "endianess" of a 32bit field */ | ||
| 33 | @@ -47,3 +46,5 @@ along with sedutil. If not, see <http://www.gnu.org/licenses/>. | ||
| 34 | ((uint64_t) (SWAP32((x & 0x00000000ffffffff)) << 32) | \ | ||
| 35 | ((uint64_t) (SWAP32((x >> 32))) ) \ | ||
| 36 | ) | ||
| 37 | + | ||
| 38 | +#endif | ||
| 39 | -- | ||
| 40 | 2.7.4 | ||
| 41 | |||
diff --git a/meta-oe/recipes-extended/sedutil/sedutil_git.bb b/meta-oe/recipes-extended/sedutil/sedutil_git.bb index cec569f624..765618433b 100644 --- a/meta-oe/recipes-extended/sedutil/sedutil_git.bb +++ b/meta-oe/recipes-extended/sedutil/sedutil_git.bb | |||
| @@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://Common/LICENSE.txt;md5=d32239bcb673463ab874e80d47fae5 | |||
| 10 | BASEPV = "1.15.1" | 10 | BASEPV = "1.15.1" |
| 11 | PV = "${BASEPV}+git${SRCPV}" | 11 | PV = "${BASEPV}+git${SRCPV}" |
| 12 | SRCREV = "358cc758948be788284d5faba46ccf4cc1813796" | 12 | SRCREV = "358cc758948be788284d5faba46ccf4cc1813796" |
| 13 | SRC_URI = "git://github.com/Drive-Trust-Alliance/sedutil.git" | 13 | SRC_URI = "git://github.com/Drive-Trust-Alliance/sedutil.git \ |
| 14 | file://0001-Fix-build-on-big-endian-architectures.patch \ | ||
| 15 | " | ||
| 14 | 16 | ||
| 15 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
| 16 | 18 | ||
