# LINT doesn't have it all



## Seeker (Mar 3, 2011)

```
# cat /sys/conf/makeLINT.sed
#!/usr/bin/sed -E -n -f
# $FreeBSD: src/sys/conf/makeLINT.sed,v 1.3.34.1.4.1 2010/06/14 02:09:06 kensmith Exp $

/^(machine|ident|device|nodevice|makeoptions|nomakeoption|options|option|nooption|profile|cpu|maxusers)[[:space:]]/ {
    s/[[:space:]]*#.*$//
    p
}
```

This code won't catch, i.e;

```
#device         atacore         # Core ATA functionality
```


```
#options        ATA_CAM
```

I understand REGEX, but not 'sed', so to also match those, commented out, lines:

```
/^[color="Red"][B]#{0,1}[/B][/color](machine|ident ...
```
BUT 'sed' must get rid of, if exists, starting *#*, *before dumping it into LINT*

Can someone edit sed's code for me?
Thx in advance!


----------



## Seeker (Mar 4, 2011)

why is no one helping me ...
I'm sick and tired of solving problems on my own!

Ok here is my edition: (patched parts of lines are in *bold red*)

```
#!/usr/bin/sed -E -n -f
# $FreeBSD: src/sys/conf/makeLINT.sed,v 1.3.34.1.4.1 2010/06/14 02:09:06 kensmith Exp $

/^[color="Red"][B]#{0,1}[/B][/color](machine|ident|device|nodevice|makeoptions|nomakeoption|options|option|nooption|profile|cpu|maxusers)[[:space:]]/ {
    [color="Red"][B]s/^#//[/B][/color]
    s/[[:space:]]*#.*$//
    p
}
```
This is original, unedited version and number of lines that LINT has

```
cd /sys/i386/conf && make LINT
# cat LINT | grep -c '.'
[B]925[/B]
```
Now with my patch-ed version:

```
# ./sed.sh | grep -c '.'
[B]994[/B]
```

My version now has lines:

```
...
device          atacore
options         ATA_CAM
...
```

Should I submit it as a bug and patch to the PR?


----------



## richardpl (Mar 4, 2011)

What are you trying to do? The LINT kernel have nothing to do with ATA_CAM.

ATA_CAM is another way of handling ATA stuff in kernel, with it many modules becomes obsolete.

You can not have LINT kernel with 2 different drivers handling same stuff.


----------



## Seeker (Mar 4, 2011)

For me, LINT is a reference, of ALL possible syntax directives, that can go in KERNCONF file.
It is not something, from what you would *make buildkernel*, at all.


----------



## Seeker (Mar 6, 2011)

I've just found yet _*another*_ OPTION, that exist only in GENERIC file of $ARCHs

```
PRINTF_BUFR_SIZE
```
It isn't in NOTES, thus making me unable to harvest it into a lint.
Furthermore, when I add 'ral' device driver, into kernel and don't build any modules, I also have to add:

```
device    rt2561sfw
```
Which is a firmware for my 'ral' type.
And once again, this 
	
	



```
device    rt2561sfw
```
 also doesn't appear in LINT, as it isn't in NOTES

This totally confuses my KERNCONF building script. I constantly have to edit code, because of this annoyances!


----------



## Seeker (Mar 9, 2011)

Ok, let me put it, this way:
From /usr/src
I want to pull, in variables:

```
# List of all valid 'device' entries that can go in KERNCONF
devices=''
# List of all valid 'option' entries, that can go in KERNCONF
options=''
# List of all valid 'modules' that can go in make's option MODULES_OVERRIDE, WITHOUT_MODULES
modules=''
```

Additionally, what drives me nuts is naming inconsistency ..., i.e;
The only way to REALLY get, all possible KERNCONF's 'device' entries, is to get all modules...,
BUT, firmware for my 'ral' is in modules named 'rt2561s' and in 'device' entry 'rt2561sfw'?!
And if I want to pull all ral's firmwares I just add 'device ralfw' - retrieved from modules.

However, there is also issue regarding devices/options that can exist ONLY as a modules (linux), for which I need additional flagging ...

And to also mention naming scheme in KERNCONF:
KERNCONF's 'options' AND 'devices' BOTH exist as MODULES
Modules are ALL lovercase, BUT
devices are lovercase, while options are uppercase ('options CD9660' is in modules selected as 'cd9660')

ALSO, i.e: 'bwn' is refered to 'if_bwn.ko' when exist as module and 'device bwn' when in KERNCONF or just 'bwn', when in make's option MODULES_OVERRIDE, WITHOUT_MODULES
BUT, on the other hand, 'device ndis', must be selected as 'if_ndis' in MODULES_OVERRIDE, WITHOUT_MODULES


This is a total mess to get a clean coding logic here.

Can anyone show me (or give me an '/bin/sh' code)


----------



## richardpl (Mar 9, 2011)

Take look in /sys/conf/ for files.$ARCH for more stuff.


----------

