Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/dev Use IOCONF #define to determine component name.
details: https://anonhg.NetBSD.org/src/rev/a603910d37f2
branches: trunk
changeset: 341676:a603910d37f2
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Nov 16 23:27:07 2015 +0000
description:
Use IOCONF #define to determine component name.
Avoids having to manually retype info already in .ioconf.
Also, COMPONENT_SIMPLE -> RUMP_COMPONENT=simple. That way, we can add
other attributes where necessary. As "future directions", the "ioconf"
attribute for RUMP_COMPONENT can just be removed when a driver is
converted to modular and has a proper modcmd.
diffstat:
sys/rump/dev/files.rump | 4 +++-
sys/rump/dev/lib/Makefile.inc | 6 +++---
sys/rump/dev/lib/component_simple.c | 10 +++-------
sys/rump/dev/lib/libmiiphy/Makefile | 4 ++--
sys/rump/dev/lib/libpci_auich/Makefile | 4 ++--
sys/rump/dev/lib/libpci_eap/Makefile | 4 ++--
sys/rump/dev/lib/libpci_if_iwn/Makefile | 4 ++--
sys/rump/dev/lib/libpci_if_pcn/Makefile | 4 ++--
sys/rump/dev/lib/libpci_if_wm/Makefile | 4 ++--
sys/rump/dev/lib/libpci_usbhc/Makefile | 4 ++--
sys/rump/dev/lib/libpci_virtio/Makefile | 4 ++--
sys/rump/dev/lib/libubt/Makefile | 4 ++--
sys/rump/dev/lib/libugenhc/Makefile | 4 ++--
sys/rump/dev/lib/libusb/Makefile | 4 ++--
sys/rump/dev/lib/libvirtio_if_vioif/Makefile | 4 ++--
sys/rump/dev/lib/libvirtio_viornd/Makefile | 4 ++--
sys/rump/dev/lib/libvirtio_vioscsi/Makefile | 5 ++---
17 files changed, 37 insertions(+), 40 deletions(-)
diffs (truncated from 317 to 300 lines):
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/files.rump
--- a/sys/rump/dev/files.rump Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/files.rump Mon Nov 16 23:27:07 2015 +0000
@@ -1,6 +1,8 @@
-# $NetBSD: files.rump,v 1.4 2013/09/17 00:50:19 pooka Exp $
+# $NetBSD: files.rump,v 1.5 2015/11/16 23:27:07 pooka Exp $
#
+version 20151112
+
device mainbus { }: pcibus
attach mainbus at root
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/Makefile.inc
--- a/sys/rump/dev/lib/Makefile.inc Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/Makefile.inc Mon Nov 16 23:27:07 2015 +0000
@@ -1,14 +1,14 @@
-# $NetBSD: Makefile.inc,v 1.5 2015/11/11 21:52:45 pooka Exp $
+# $NetBSD: Makefile.inc,v 1.6 2015/11/16 23:27:07 pooka Exp $
#
RUMPTOP= ${.CURDIR}/../../..
CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpdev
RUMPDEVLIBDIR:= ${.PARSEDIR}
-.ifdef COMPONENT_SIMPLE
+
+.if defined(RUMP_COMPONENT) && !empty(${RUMP_COMPONENT:Mioconf})
.PATH: ${RUMPDEVLIBDIR}
SRCS+= component_simple.c
-CPPFLAGS.component_simple.c+= -DCOMPONENT_NAME=${COMPONENT_SIMPLE}
.endif
.include "${RUMPTOP}/Makefile.rump"
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/component_simple.c
--- a/sys/rump/dev/lib/component_simple.c Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/component_simple.c Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: component_simple.c,v 1.1 2015/11/11 21:52:45 pooka Exp $ */
+/* $NetBSD: component_simple.c,v 1.2 2015/11/16 23:27:07 pooka Exp $ */
/*
* Copyright (c) 2015 Antti Kantee. All Rights Reserved.
@@ -25,12 +25,8 @@
* SUCH DAMAGE.
*/
-#ifndef COMPONENT_NAME
-#error Internal error: COMPONENT_NAME not defined
-#endif
-
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: component_simple.c,v 1.1 2015/11/11 21:52:45 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: component_simple.c,v 1.2 2015/11/16 23:27:07 pooka Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -49,5 +45,5 @@
RUMP_COMPONENT(RUMP_COMPONENT_DEV)
{
- CONFIG_INIT_COMPONENT(COMPONENT_NAME);
+ CONFIG_INIT_COMPONENT(IOCONF);
}
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libmiiphy/Makefile
--- a/sys/rump/dev/lib/libmiiphy/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libmiiphy/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.6 2015/11/16 23:27:07 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=MII and PHY drivers (for networking)
IOCONF= MIIPHY.ioconf
-COMPONENT_SIMPLE= phy
+RUMP_COMPONENT=ioconf
SRCS+= mii.c mii_ethersubr.c mii_physubr.c ukphy.c ukphy_subr.c
SRCS+= acphy.c amhphy.c atphy.c bmtphy.c brgphy.c ciphy.c dmphy.c etphy.c \
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libpci_auich/Makefile
--- a/sys/rump/dev/lib/libpci_auich/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libpci_auich/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:07 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=AC97 Intel Audio driver
IOCONF= PCI_AUICH.ioconf
-COMPONENT_SIMPLE= pci_auich
+RUMP_COMPONENT=ioconf
SRCS+= auich.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libpci_eap/Makefile
--- a/sys/rump/dev/lib/libpci_eap/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libpci_eap/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=Ensoniq AudioPCI driver
IOCONF= PCI_EAP.ioconf
-COMPONENT_SIMPLE= pci_eap
+RUMP_COMPONENT=ioconf
SRCS+= eap.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libpci_if_iwn/Makefile
--- a/sys/rump/dev/lib/libpci_if_iwn/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libpci_if_iwn/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=Intel wireless device driver
IOCONF= PCI_IF_IWN.ioconf
-COMPONENT_SIMPLE= pci_if_iwn
+RUMP_COMPONENT=ioconf
SRCS+= if_iwn.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libpci_if_pcn/Makefile
--- a/sys/rump/dev/lib/libpci_if_pcn/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libpci_if_pcn/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=PCnet Ethernet device driver
IOCONF= PCI_IF_PCN.ioconf
-COMPONENT_SIMPLE= pci_if_pcn
+RUMP_COMPONENT=ioconf
SRCS+= if_pcn.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libpci_if_wm/Makefile
--- a/sys/rump/dev/lib/libpci_if_wm/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libpci_if_wm/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=Intel GigE device driver
IOCONF= PCI_IF_WM.ioconf
-COMPONENT_SIMPLE= pci_if_wm
+RUMP_COMPONENT=ioconf
SRCS+= if_wm.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libpci_usbhc/Makefile
--- a/sys/rump/dev/lib/libpci_usbhc/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libpci_usbhc/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.5 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=PCI USB host controller drivers
IOCONF= PCI_USBHC.ioconf
-COMPONENT_SIMPLE= pci_usbhc
+RUMP_COMPONENT=ioconf
SRCS+= ohci_pci.c ohci.c
SRCS+= uhci_pci.c uhci.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libpci_virtio/Makefile
--- a/sys/rump/dev/lib/libpci_virtio/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libpci_virtio/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=VirtIO bus support
IOCONF= PCI_VIRTIO.ioconf
-COMPONENT_SIMPLE= pci_virtio
+RUMP_COMPONENT=ioconf
SRCS+= virtio.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libubt/Makefile
--- a/sys/rump/dev/lib/libubt/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libubt/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.6 2015/11/16 23:27:08 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../dev/usb ${.CURDIR}/../../../../dev/bluetooth
@@ -7,7 +7,7 @@
COMMENT=USB BlueTooth driver
IOCONF= UBT.ioconf
-COMPONENT_SIMPLE= ubt
+RUMP_COMPONENT=ioconf
SRCS= ubt.c bthub.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libugenhc/Makefile
--- a/sys/rump/dev/lib/libugenhc/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libugenhc/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2015/11/11 21:52:46 pooka Exp $
+# $NetBSD: Makefile,v 1.12 2015/11/16 23:27:08 pooka Exp $
#
LIB= rumpdev_ugenhc
@@ -6,7 +6,7 @@
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
IOCONF= UGENHC.ioconf
-COMPONENT_SIMPLE= ugenhc
+RUMP_COMPONENT=ioconf
SRCS= ugenhc.c ugenhc_dma.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libusb/Makefile
--- a/sys/rump/dev/lib/libusb/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libusb/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2015/11/11 21:52:47 pooka Exp $
+# $NetBSD: Makefile,v 1.11 2015/11/16 23:27:08 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../dev/usb
@@ -8,7 +8,7 @@
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
IOCONF= USB.ioconf
-COMPONENT_SIMPLE= usb
+RUMP_COMPONENT=ioconf
SRCS= usb.c usbdi.c usbdi_util.c usb_mem.c usb_subr.c usb_quirks.c \
uhub.c usbroothub_subr.c usb_verbose.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libvirtio_if_vioif/Makefile
--- a/sys/rump/dev/lib/libvirtio_if_vioif/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libvirtio_if_vioif/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:47 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=VirtIO network interface driver
IOCONF= VIRTIO_IF_VIOIF.ioconf
-COMPONENT_SIMPLE= virtio_if_vioif
+RUMP_COMPONENT=ioconf
SRCS+= if_vioif.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libvirtio_viornd/Makefile
--- a/sys/rump/dev/lib/libvirtio_viornd/Makefile Mon Nov 16 21:41:29 2015 +0000
+++ b/sys/rump/dev/lib/libvirtio_viornd/Makefile Mon Nov 16 23:27:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/11/11 21:52:47 pooka Exp $
+# $NetBSD: Makefile,v 1.4 2015/11/16 23:27:08 pooka Exp $
#
RUMPTOP=${TOPRUMP}
@@ -9,7 +9,7 @@
COMMENT=VirtIO entropy driver
IOCONF= VIRTIO_VIORND.ioconf
-COMPONENT_SIMPLE= virtio_viornd
+RUMP_COMPONENT=ioconf
SRCS+= viornd.c
diff -r 183b9897471e -r a603910d37f2 sys/rump/dev/lib/libvirtio_vioscsi/Makefile
--- a/sys/rump/dev/lib/libvirtio_vioscsi/Makefile Mon Nov 16 21:41:29 2015 +0000
Home |
Main Index |
Thread Index |
Old Index