Very insteresting.
You could know the detected S/N after the CF/PATA driver get loaded, so a simple shell script in "init" of the initrd (if you have the initrd) can do the S/N comparing.
While in "init" of the initrd, other people could modify it too by using CPIO utility.
Read the detected S/N from the dmesg after bootup and do comparing also works, though block your comparing function is simple too.
If you write the S/N comparing into the pata driver, and if it is a loadable module, other people could replace a clean one either on "modules" of your initrd or on /lib/{kernel}/modules/, the kernel module tree.
I'm not sure the way that inputting your expected S/N.
>>I would like to have unique kernel for every CF with specified serial.
So I think a built-in modified driver would be better. Just write the expected S/N in. Once you detected unexcepted S/N, do a kernel panic or call ACPI poweroff.
You'd compile a kernel for every CF because that kernel parameter-input is not so good too.
Not interesting at all.
-The Effo Staff
Effo Project, [
effo.sourceforge.net]