aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/template/usb_template_kbd.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2013-01-30 15:26:04 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2013-01-30 15:26:04 +0000
commitd2b99310b17979e99c03251de3f9bc08dd9219d1 (patch)
treed05a4f410e0aaa7a44bf2b97f80697614ca4aee5 /sys/dev/usb/template/usb_template_kbd.c
parente1334f935fbf45bf31da6c900569ecea668206c9 (diff)
downloadsrc-d2b99310b17979e99c03251de3f9bc08dd9219d1.tar.gz
src-d2b99310b17979e99c03251de3f9bc08dd9219d1.zip
Modify the FreeBSD USB kernel code so that it can be compiled directly
into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems or embedded platforms. This is also useful for out of the system compilation of the FreeBSD USB stack for various purposes. The USB kernel files can now optionally include a global header file which should include all needed definitions required to compile the FreeBSD USB stack. When the global USB header file is included, no other USB header files will be included by default. Add new file containing the USB stack configuration for the FreeBSD loader build. Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all USB files follow the same style. Use cases: - console in loader via USB - loading kernel via USB Discussed with: Hiroki Sato, hrs @ EuroBSDCon
Notes
Notes: svn path=/head/; revision=246122
Diffstat (limited to 'sys/dev/usb/template/usb_template_kbd.c')
-rw-r--r--sys/dev/usb/template/usb_template_kbd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/template/usb_template_kbd.c b/sys/dev/usb/template/usb_template_kbd.c
index f5995a4ff9d1..8866edd7fc24 100644
--- a/sys/dev/usb/template/usb_template_kbd.c
+++ b/sys/dev/usb/template/usb_template_kbd.c
@@ -1,6 +1,4 @@
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
+/* $FreeBSD$ */
/*-
* Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
*
@@ -30,6 +28,9 @@ __FBSDID("$FreeBSD$");
* This file contains the USB template for an USB Keyboard Device.
*/
+#ifdef USB_GLOBAL_INCLUDE_FILE
+#include USB_GLOBAL_INCLUDE_FILE
+#else
#include <sys/stdint.h>
#include <sys/stddef.h>
#include <sys/param.h>
@@ -54,6 +55,7 @@ __FBSDID("$FreeBSD$");
#include <dev/usb/usb_cdc.h>
#include <dev/usb/template/usb_template.h>
+#endif /* USB_GLOBAL_INCLUDE_FILE */
enum {
INDEX_LANG,