summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-11-23 12:50:25 -0800
committerJohn Crispin <john@phrozen.org>2016-11-26 22:39:27 +0100
commit97eff5cba52076da476f028b02bae34fd1f3a9f6 (patch)
tree32eba7923f48747397a57e2369a5d908866a413c
parent04a76da1aea059c638b166e5433a13d0951fb2bd (diff)
downloadmtk-20170518-97eff5cba52076da476f028b02bae34fd1f3a9f6.zip
mtk-20170518-97eff5cba52076da476f028b02bae34fd1f3a9f6.tar.gz
mtk-20170518-97eff5cba52076da476f028b02bae34fd1f3a9f6.tar.bz2
firmware-utils: Fix build failure in mkmerakifw.c FS#298
Earlier compilers such as GCC 4 do not like anynomous unions, make it a named union "u", and update the code where relevant. Fixes FS#298 Fixes: a72e1692b8b3 ("firmware-utils: Add support for the Cisco Meraki MX60/MX60W") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r--tools/firmware-utils/src/mkmerakifw.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/firmware-utils/src/mkmerakifw.c b/tools/firmware-utils/src/mkmerakifw.c
index 6394cba..1a50f16 100644
--- a/tools/firmware-utils/src/mkmerakifw.c
+++ b/tools/firmware-utils/src/mkmerakifw.c
@@ -52,7 +52,7 @@ struct board_info {
uint32_t fdt_offset;
uint32_t unknown_offset;
} mx60;
- };
+ } u;
char *id;
char *description;
};
@@ -72,7 +72,7 @@ static const struct board_info boards[] = {
.magic1 = 0x8e73ed8a,
.magic2 = 0x8e73ed8a,
.imagelen = 0x00800000,
- .statichash = {0xda, 0x39, 0xa3, 0xee, 0x5e,
+ .u.statichash = {0xda, 0x39, 0xa3, 0xee, 0x5e,
0x6b, 0x4b, 0x0d, 0x32, 0x55,
0xbf, 0xef, 0x95, 0x60, 0x18,
0x90, 0xaf, 0xd8, 0x07, 0x09},
@@ -82,7 +82,7 @@ static const struct board_info boards[] = {
.magic1 = 0x8e73ed8a,
.magic2 = 0x8e73ed8a,
.imagelen = 0x00800000,
- .statichash = {0xff, 0xff, 0xff, 0xff, 0xff,
+ .u.statichash = {0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff},
@@ -100,7 +100,7 @@ static const struct board_info boards[] = {
* 4th Row: ? Unused/Unknown ?
* 5th Row: ? Unused/Unknown ?
*/
- .mx60 = {
+ .u.mx60 = {
.kernel_offset = 0x10000,
.ramdisk_offset = 0x3FFC00,
.fdt_offset = 0x0400,
@@ -286,14 +286,14 @@ int main(int argc, char *argv[])
switch (board->magic2) {
case 0xa1f0beef:
- writel(buf, HDR_OFF_KERNEL_OFFSET, board->mx60.kernel_offset);
- writel(buf, HDR_OFF_RAMDISK_OFFSET, board->mx60.ramdisk_offset);
- writel(buf, HDR_OFF_FDT_OFFSET, board->mx60.fdt_offset),
- writel(buf, HDR_OFF_UNKNOWN_OFFSET, board->mx60.unknown_offset);
+ writel(buf, HDR_OFF_KERNEL_OFFSET, board->u.mx60.kernel_offset);
+ writel(buf, HDR_OFF_RAMDISK_OFFSET, board->u.mx60.ramdisk_offset);
+ writel(buf, HDR_OFF_FDT_OFFSET, board->u.mx60.fdt_offset),
+ writel(buf, HDR_OFF_UNKNOWN_OFFSET, board->u.mx60.unknown_offset);
break;
case 0x8e73ed8a:
- memcpy(buf + HDR_OFF_STATICHASH, board->statichash, 20);
+ memcpy(buf + HDR_OFF_STATICHASH, board->u.statichash, 20);
break;
}