Fix device tree blob alignment

A device tree blob must be aligned on an 8-byte boundary.
This commit is contained in:
Sebastian Huber
2022-01-11 17:59:34 +01:00
parent cbc92325a1
commit 00081b30a8
2 changed files with 6 additions and 6 deletions

View File

@@ -28,12 +28,12 @@
#endif #endif
#ifdef BSP_FDT_BLOB_READ_ONLY #ifdef BSP_FDT_BLOB_READ_ONLY
static const uint32_t static RTEMS_ALIGNED(8) const uint32_t
bsp_fdt_blob[BSP_FDT_BLOB_SIZE_MAX / sizeof(uint32_t)] CPU_STRUCTURE_ALIGNMENT = bsp_fdt_blob[BSP_FDT_BLOB_SIZE_MAX / sizeof(uint32_t)] =
{ 0xdeadbeef }; { 0xdeadbeef };
#else #else
static uint32_t static RTEMS_ALIGNED(8) uint32_t
bsp_fdt_blob[BSP_FDT_BLOB_SIZE_MAX / sizeof(uint32_t)] CPU_STRUCTURE_ALIGNMENT; bsp_fdt_blob[BSP_FDT_BLOB_SIZE_MAX / sizeof(uint32_t)];
#endif #endif
void bsp_fdt_copy(const void *src) void bsp_fdt_copy(const void *src)

View File

@@ -4,9 +4,9 @@
* WARNING: Automatically generated -- do not edit! * WARNING: Automatically generated -- do not edit!
*/ */
#include <sys/types.h> #include <rtems.h>
const unsigned char some_bin[] = { RTEMS_ALIGNED(8) const unsigned char some_bin[] = {
0xd0, 0x0d, 0xfe, 0xed, 0x00, 0x00, 0x01, 0xd8, 0x00, 0x00, 0x00, 0x38, 0xd0, 0x0d, 0xfe, 0xed, 0x00, 0x00, 0x01, 0xd8, 0x00, 0x00, 0x00, 0x38,
0x00, 0x00, 0x01, 0x90, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x01, 0x90, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x11,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48,