Module Name:    src
Committed By:   jmcneill
Date:           Sun Feb  4 17:33:34 UTC 2018

Modified Files:
        src/usr.bin/mkubootimage: arm64.h mkubootimage.c

Log Message:
Fix tools build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/mkubootimage/arm64.h
cvs rdiff -u -r1.23 -r1.24 src/usr.bin/mkubootimage/mkubootimage.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/mkubootimage/arm64.h
diff -u src/usr.bin/mkubootimage/arm64.h:1.1 src/usr.bin/mkubootimage/arm64.h:1.2
--- src/usr.bin/mkubootimage/arm64.h:1.1	Sun Feb  4 15:44:51 2018
+++ src/usr.bin/mkubootimage/arm64.h	Sun Feb  4 17:33:34 2018
@@ -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 <jmcne...@invisible.ca>
@@ -48,15 +48,15 @@ struct arm64_image_header {
 };
 
 /* 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

Index: src/usr.bin/mkubootimage/mkubootimage.c
diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.23 src/usr.bin/mkubootimage/mkubootimage.c:1.24
--- src/usr.bin/mkubootimage/mkubootimage.c:1.23	Sun Feb  4 15:44:51 2018
+++ src/usr.bin/mkubootimage/mkubootimage.c	Sun Feb  4 17:33:34 2018
@@ -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 <jmcne...@invisible.ca>
@@ -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 @@ get_comp(const char *name)
 			return uboot_comp[i].comp;
 	}
 
-	return IH_TYPE_UNKNOWN;
+	return IH_COMP_NONE;
 }
 
 static const char *
@@ -383,12 +383,9 @@ generate_header_arm64(struct arm64_image
 	}
 
 	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));

Reply via email to