Re: usbdevices.config

2018-08-18 Thread Patrick Welche
On Sat, Aug 18, 2018 at 03:15:21PM -, Michael van Elst wrote:
> So for me, stripping a copy of GENERIC ended in more work for each update
> than using no phrases.

I would  cp GENERIC MYCOMPUTER and comment out the lines I didn't want
when bring the new box into service, and then

ident MYCOMPUTER GENERIC
cvs diff -ur.. -r.. GENERIC | tee /tmp/pat
vi /tmp/pat MYCOMPUTER

to keep it up to date.

Thing is now, for the equivalent, I'll have to
:r /sys/dev/usb/usbdevices.config
in MYCOMPUTER, and keep an eye out for changes in it...


Cheers,

Patrick


Re: usbdevices.config

2018-08-18 Thread Michael van Elst
rhia...@falu.nl (Rhialto) writes:

>adv*at pci? dev ? function ?# AdvanSys 1200[A,B], 9xx[U,UA]
>SCSI

>to

>no adv*at pci? # dev ? function ?# AdvanSys 1200[A,B], 9xx[U,UA]
>SCSI

It's usually enough to write:

no adv

unless you want to keep the driver and just drop its PCI binding.
You can also kill complete busses like EISA or MCA with a single line.

You still miss to eliminate some new drivers, but IMHO that's better than
refitting drivers that you missed to add, in particular for hot-plug
devices like USB.

N.B. the tool to minimize a config file is sysutils/dmassage. It doesn't
understand includes or 'no' phrases and it obviously also drops drivers
that weren't found by the kernel that created the dmesg. In the end you
still have to manually augment things that you may want to use without
rebuilding the kernel and things like pseudodevices, filesystems or
options are also not handled.

So for me, stripping a copy of GENERIC ended in more work for each update
than using no phrases.

-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


Re: usbdevices.config

2018-08-18 Thread Rhialto
On Sat 18 Aug 2018 at 11:51:20 -, Michael van Elst wrote:
> pr...@cam.ac.uk (Patrick Welche) writes:
> 
> >With the introduction of usbdevices.config, the old procedure of "copy
> >GENERIC to NEWCOMPUTER and comment out what isn't needed" doesn't really
> >work any more. What's the thinking on The New Way(tm)?
> 
> It stopped working for some platforms a long time ago and always
> had the problem that you needed to merge changes whenever GENERIC
> was augmented.
> 
> I am using a different scheme, where the custom config file includes
> GENERIC but then overrides things as necessary. E.g.:
> 
> --
> include "arch/i386/conf/GENERIC"
> ident   "MYCOMPUTER"
> 
> no options COMPAT_NOMID
> no options COMPAT_09
...etc... more "no" options..

I've tried to do that, when going from 7 to 8 and bringing along my "no
config" config file.

When creating it for NetBSD 7, I already noticed that it didn't really
save me any time. Changing

adv*at pci? dev ? function ?# AdvanSys 1200[A,B], 9xx[U,UA]
SCSI

to

no adv*at pci? # dev ? function ?# AdvanSys 1200[A,B], 9xx[U,UA]
SCSI

is much more time-consuming than simply removing the line. Just adding
"no" at the start of the line is a syntax error.
But, I persevered in the hope that it would save me time next time
around.

But it didn't. My config file for 7 didn't work for 8; something had
been changed in the GENERIC for 8 and the combination didn't configure
any more. I also realised that there would be some new hardware
supported in GENERIC that I would not have excluded. So I needed to go
through the whole GENERIC file again to double check it against my "no
config" file. I still haven't finished doing that.

There is no option for config to show the "effective" configuration at
the end, so it is hard, if not impossible, to check that I have excluded
everything I wanted to exclude. There is also no syntax for, say, "I
only want re* as ethernet adapter, and drop all others".

There is also no script (any more) to take dmesg.boot and generate a
config file from it.

I think I'll go back to just starting with GENERIC and deleting lines.
It's quicker and much shorter :-(

A grep '^[a-z]'|wc -l (to count non-comment, non-empty lines) on my
6.1.5 config file (an edited GENERIC) is 232 lines; for my 7.0.1 "no
config' file, it is 302 lines.

The "no" seemed a good idea. But it didn't bring me what I had hoped
from it.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl  -- are condemned to reinvent it. Poorly.


signature.asc
Description: PGP signature


Re: usbdevices.config

2018-08-18 Thread Michael van Elst
pr...@cam.ac.uk (Patrick Welche) writes:

>With the introduction of usbdevices.config, the old procedure of "copy
>GENERIC to NEWCOMPUTER and comment out what isn't needed" doesn't really
>work any more. What's the thinking on The New Way(tm)?

It stopped working for some platforms a long time ago and always
had the problem that you needed to merge changes whenever GENERIC
was augmented.

I am using a different scheme, where the custom config file includes
GENERIC but then overrides things as necessary. E.g.:

--
include "arch/i386/conf/GENERIC"
ident   "MYCOMPUTER"

no options COMPAT_NOMID
no options COMPAT_09
no options COMPAT_43
options PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
options KMEMSTATS

no device at isa
no isapnp
no eisa
no mca

no pseudo-device strip
no pseudo-device vcoda

no file-system CODA

com* at acpi?
fdc* at acpi?
lpt* at acpi?

lm0 at isa? port 0x290 flags 0x0
spdmem* at iic? addr 0x50
--

That stays the same most of the time, unless GENERIC already includes
the changes you made where e.g. config then complains that a device
already exists or is already not included.

-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
"A potential Snark may lurk in every tree."


usbdevices.config

2018-08-18 Thread Patrick Welche
With the introduction of usbdevices.config, the old procedure of "copy
GENERIC to NEWCOMPUTER and comment out what isn't needed" doesn't really
work any more. What's the thinking on The New Way(tm)?

Cheers,

Patrick