Long Shot: Storing "character special" files in SVN

Caporegime
Joined
18 Oct 2002
Posts
29,493
Location
Back in East London
We are trying to store an entire Linux image in SVN.

We have hit a show stopper with regards to node files, aka "character special" files. E.g. /dev/console (and the rest of the content in /dev)

The plan was to be able to "svn export" a revision from the SVN repo, copy/move to a flashcard and boot the hardware from it. (All machines that will use this image are identical and operate from a flash drive instead of disk.)

Does anyone have any experience with this kind of thing? What alternatives do we have?

We've tried MAKEDEV'ing and/or mknod'ing on the new card after exporting everything else, but it still won't boot ("no init found" i.e. can't load the console)

Ta for any info.
 
Use udev ? normaly you just need the mount point and udev will 'populate' the required files..

I still have soekris boxes with 2.4 and the old devfs running on a readonly 128MB flash card. uptime in about 5 years now :D
 
Unfortunately it doesn't. I thought it would, as I thought that's what udev does at every boot, but it fails.

The flashcard use is not a problem. We clone flashcards without issue, it's *only* when copying into/out of SVN because it can't handle the /dev files.
 
Odd one :)
Have you considered a minimal kernel image set to network boot, which then populates itself through SVN (Or any other method for that matter, why SVN)?

Cheers

-Leezer-
 
We're using SVN primarily for source control. The image is the same image used across many machines, but we update it regularly (as well as our own software within the image) and need to version control it. We use SVN for just about everything else that is under source control, so it seemed natural to use it for this.

We're discussing the use of a minimal image now, but it's a tough one as we cannot afford to have every machine "build" its self on setup, we need to have a clone system in place. It's just a shame SVN can't store those files, else using "svn export" would have been ideal to grab a version when needed.

The secondary purpose of using source control, is so that when we redeploy, we don't have to send entire images, only those files which have been added/modified. The difference is between 700mb and a few 100kb..
 
Last edited:
Well, you should source control the material that allows you to generate the file system, not the file system... Nobody in his sane mind wants to 'source control'.... what is basically not source code...

What you need is a reliable way to generate a flash image (jffs2 or other) and source control that process. You can also backup and date tag the binary should then ship in the field.

For example using openembedded or buildroot, I can generate the same binary with a 'source tree' that is minimal in size, and generates a compact image that can be flashed directly onto NAND for example. What is source-versioned (in git) is the buildroot /source/ tree...
 
Well, you should source control the material that allows you to generate the file system, not the file system... Nobody in his sane mind wants to 'source control'.... what is basically not source code...

What you need is a reliable way to generate a flash image (jffs2 or other) and source control that process. You can also backup and date tag the binary should then ship in the field.

For example using openembedded or buildroot, I can generate the same binary with a 'source tree' that is minimal in size, and generates a compact image that can be flashed directly onto NAND for example. What is source-versioned (in git) is the buildroot /source/ tree...
I shall look into openembedded or buildroot. :)
Is this a real world example of someone trying to copy /dev/random?
No. It's a real world example of someone trying to copy a flash card that has node files (e.g. /dev/console, /dev/ttyS1 etc.) on it into SVN. Like I've already said; copying from card to disk, or card to card works just fine. It's SVN only. When copying to/from the flash card it is not the boot device and is plugged into a machine as a secondary storage device.
 
Back
Top Bottom