tech-kern archive

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

Re: (Semi-random) thoughts on device tree structure and devfs



> Have everyone forgotten how to set up their own kernel? Is everyone now  
> booting GENERIC? (Or just making a copy of GENERIC, with a few patches  
> without understanding what they are editing?)
>
> The whole point being that if you boot a kernel, in which you have  
> configured the whole system to connect anything anywhere, you should not  
> be surprised if the device enumeration might seem random.
> If you want predictable device enumetaion, you can have that, and have  
> been able to have that for over twenty years...
>
> The line
> wd*     at atabus? drive ? flags 0x0000
>
> (to use one example) says that match any wd type disk to any unit number  
> on any atabus, without doing any closer matching. Ie. kindof 
> unpredictable.
>
> The asterisks and question marks means exactly that. If you want  
> predictable matching that stays the same at every boot, no matter what  
> hardware you put on the system, you write explicit lines in the config  
> instead.

Imagine if I want to use a USB disk as / on my DELL OptiPlex 745.  The device
tree of that machine looks like:

/mainbus0
  /pci0
    /puhb0
      /agp0
    /ppb0
      /pci0
        /vge0
          /ukphy0
        /vga0
          /wsdisplay0
          /drm0
        /uhci0
        /azalia0
        /ppb0
          /pci0
        /ppb1
          /pci0
        /uhci1
        /uhci2
        /uhci3
        /uhci4
        /ppb2
          /pci0
        /ichlpcib0
          /isa0
            /lpt0
            /com0
        /piixide0
          /atabus0
            /wd0
          /atabus1
            /atapibus0
              /cd0
        /ichsmb0
        /piixide1
          /atabus0
          /atabus1

How do you write a kernel config which can always identify my USB disk as
sd0a, even if I plug random devices?

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Home | Main Index | Thread Index | Old Index