Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/mkubootimage Fix tools build



details:   https://anonhg.NetBSD.org/src/rev/38b164306b4e
branches:  trunk
changeset: 359208:38b164306b4e
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Feb 04 17:33:34 2018 +0000

description:
Fix tools build

diffstat:

 usr.bin/mkubootimage/arm64.h        |  20 ++++++++++----------
 usr.bin/mkubootimage/mkubootimage.c |  13 +++++--------
 2 files changed, 15 insertions(+), 18 deletions(-)

diffs (76 lines):

diff -r 82eabbae5192 -r 38b164306b4e usr.bin/mkubootimage/arm64.h
--- a/usr.bin/mkubootimage/arm64.h      Sun Feb 04 17:31:51 2018 +0000
+++ b/usr.bin/mkubootimage/arm64.h      Sun Feb 04 17:33:34 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm64.h,v 1.1 2018/02/04 15:44:51 jmcneill Exp $ */
+/* $NetBSD: arm64.h,v 1.2 2018/02/04 17:33:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -48,15 +48,15 @@
 };
 
 /* Kernel flags */
-#define        ARM64_FLAGS_ENDIAN_BE           __BIT(0)
-#define        ARM64_FLAGS_PAGE_SIZE           __BITS(2,1)
-#define         ARM64_FLAGS_PAGE_SIZE_UNSPEC           0
-#define         ARM64_FLAGS_PAGE_SIZE_4K               1
-#define         ARM64_FLAGS_PAGE_SIZE_16K              2
-#define         ARM64_FLAGS_PAGE_SIZE_64K              3
-#define        ARM64_FLAGS_PHYS_PLACEMENT      __BIT(3)
-#define         ARM64_FLAGS_PHYS_PLACEMENT_DRAM_BASE   0
-#define         ARM64_FLAGS_PHYS_PLACEMENT_ANY         1
+#define        ARM64_FLAGS_ENDIAN_BE           (1 << 0)
+#define        ARM64_FLAGS_PAGE_SIZE           (3 << 1)
+#define         ARM64_FLAGS_PAGE_SIZE_UNSPEC           (0 << 1)
+#define         ARM64_FLAGS_PAGE_SIZE_4K               (1 << 1)
+#define         ARM64_FLAGS_PAGE_SIZE_16K              (2 << 1)
+#define         ARM64_FLAGS_PAGE_SIZE_64K              (3 << 1)
+#define        ARM64_FLAGS_PHYS_PLACEMENT      (1 << 3)
+#define         ARM64_FLAGS_PHYS_PLACEMENT_DRAM_BASE   (0 << 3)
+#define         ARM64_FLAGS_PHYS_PLACEMENT_ANY         (1 << 3)
 
 /* Magic */
 #define        ARM64_MAGIC     0x644d5241
diff -r 82eabbae5192 -r 38b164306b4e usr.bin/mkubootimage/mkubootimage.c
--- a/usr.bin/mkubootimage/mkubootimage.c       Sun Feb 04 17:31:51 2018 +0000
+++ b/usr.bin/mkubootimage/mkubootimage.c       Sun Feb 04 17:33:34 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.23 2018/02/04 15:44:51 jmcneill Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.24 2018/02/04 17:33:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkubootimage.c,v 1.23 2018/02/04 15:44:51 jmcneill Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.24 2018/02/04 17:33:34 jmcneill Exp $");
 
 #include <sys/mman.h>
 #include <sys/stat.h>
@@ -244,7 +244,7 @@
                        return uboot_comp[i].comp;
        }
 
-       return IH_TYPE_UNKNOWN;
+       return IH_COMP_NONE;
 }
 
 static const char *
@@ -383,12 +383,9 @@
        }
 
        flags = 0;
-       
-       flags |= __SHIFTIN(ARM64_FLAGS_PAGE_SIZE_4K,
-                          ARM64_FLAGS_PAGE_SIZE);
+       flags |= ARM64_FLAGS_PAGE_SIZE_4K;
 #if 0
-       flags |= __SHIFTIN(ARM64_FLAGS_PHYS_PLACEMENT_ANY,
-                          ARM64_FLAGS_PHYS_PLACEMENT);
+       flags |= ARM64_FLAGS_PHYS_PLACEMENT_ANY;
 #endif
 
        memset(hdr, 0, sizeof(*hdr));



Home | Main Index | Thread Index | Old Index