Current-Users archive

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

Re: Error "MAKEDEV: dri0: unknown device" in -current/amd64

Am Monday, den 14.09.2009, 16:17 +0100 schrieb Joachim Kuebart:
> Hi,
> for a while now I've been getting the above mentioned error from
> MAKEDEV. Today I investigated the cause and it turns out that the dri*)
> case intrudoced in etc/MAKEDEV.tmpl rev. 1.126 actually never ends up
> in /dev/MAKEDEV. This is because the device is actually called drm in
> sys/conf/majors and the entry is deleted by etc/MAKEDEV.awk.
> The following patch changes "MAKEDEV dri" to "MAKEDEV drm". The drm*)
> case is then correctly created and the correct major number is picked up
> from sys/conf/majors.

I just noticed that $unit is never being set in the drm*) case, the
following patch makes the code actually work:

Index: MAKEDEV.tmpl
RCS file: /pub/NetBSD-CVS/src/etc/MAKEDEV.tmpl,v
retrieving revision 1.128
diff -p -U8 -r1.128 MAKEDEV.tmpl
--- MAKEDEV.tmpl        6 Sep 2009 17:25:55 -0000       1.128
+++ MAKEDEV.tmpl        14 Sep 2009 15:23:58 -0000
@@ -737,17 +737,17 @@ all)
        makedev atabus0 atabus1 atabus2 atabus3
        makedev tap tap0 tap1 tap2 tap3
        makedev gpio gpio0 gpio1 gpio2 gpio3 gpio4 gpio5 gpio6 gpio7
        makedev pad pad0 pad1 pad2 pad3
        makedev bthub
        makedev putter
        makedev drvctl
        makedev video
-       makedev dri0
+       makedev drm0
        makedev altmem
        makedev zfs
        makedev local # do this last
        # unless overridden by MD entry, this is equal to 'all'
        makedev all
@@ -1904,19 +1904,20 @@ ttyS*)
        mkdev dtyS$unit c %sacom_chr% $(($unit + $dialout)) "" "" $u_uucp
        mkdev atabus$unit c %atabus_chr% $unit 644
+       unit=${i#drm}
        makedir dri 755
-       mkdev dri/card$unit c %dri_chr% $unit 660
+       mkdev dri/card$unit c %drm_chr% $unit 660
        mkdev drvctl c %drvctl_chr% 0 644
        mkdev isv c %isv_chr% 0 644

Home | Main Index | Thread Index | Old Index