News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Article: Using M-Systems’ DiskOnChip driver without violating GPL

Jul 12, 2000 — by Rick Lehrbaum — from the LinuxDevices Archive — views

Introduction, by Rick Lehrbaum: According to a recent poll of developers of embedded Linux based systems, a third of all new systems will contain an M-Systems DiskOnChip Flash disk as the primary boot and storage device. However, proper operation of the DiskOnChip currently depends on a proprietary M-Systems binary driver. Since the DiskOnChip is the “drive” from which the Linux kernel must boot, there would appear to be a conflict with the GPL status of the kernel (since the DiskOnChip must be operational in order for the kernel to load). In this writeup, which was originally posted at the LinuxDevices.com Embedded Linux Forum, Stuart Lynne describes a process that has been successfully employed to make use of M-Systems' proprietary driver (which comes free with every DiskOnChip) without violating the terms of the Linux GPL (as defined by Linus Torvalds). Lynne writes . . .

It [is often said that] it is not possible to boot Linux from DiskOnChip (DOC) without having the DOC drivers as part of the kernel — which would mean that the kernel could not be distributed unless source to DOC is available.

When using an INITRD boot process, it is the boot loader that loads the Linux kernel and INITRD package into memory from the boot device (in this case syslinux loads two files Linux and root.tgz from the DOC filesystem).

When syslinux jumps into the Linux kernel it passes enough information such that the kernel can find the INITRD package (root.tgz). It (the kernel) creates a RAM disk and unpacks the INITRD package into it.

Eventually it runs the init program which in turn starts to execute programs under instructions for the /etc/inittab file that was included in the INITRD package. At this point the only drivers available are what is part of the initial kernel (video, serial and ramdisk).

One of the initialization scripts run by inittab looks to see what driver modules are available (they were simply included in the INITRD package) and loads them (insmod /lib/modules/…. etc).

At this point, we should now have additional block devices available that can support any required block devices. For example the DOC device.

The init scripts can now mount the DOC device and continue to load additional files into the RAM disk.

We now look at what we have to provide the customer if we want to distribute this. According to Linus' interpretation of GPL we need to make available all source code to anything linked into the kernel. We can do that (just send a copy of the appropriate kernel tgz). Also we have various and sundry GPL'd files in the INITRD package (glibc, init, cpio, busybox, ash etc). We can include them. We also have some device modules. If these are GPL they need have source made available.

But if they are proprietary (e.g. DOC) then going back to Linus' interpretation of GPL WRT to the kernel we do not have to [provide the source]. [Linus] has specifically said that it is ok to distribute binary only drivers as modules as he does not interpret loading at run time to be the same as linking into the binary. (He also has made some other caustic remarks that show he does not like this but he does allow it. He also has said that if you do this do not expect support from the kernel development team WRT to keeping the run time load environment the same to support you etc.)

Editor: there is also an open source project to create a non-proprietary Linux driver for the DiskOnChip. See . . .
Memory Technology Device (MTD) Subsystem for Linux

Do you have questions or comments on this article? talkback here

 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.