I composed this HOWTO in order to help people construct as well as change ramdisks for connecting into a Vr41xx bit.
This is presently just a draft. It might still be broken in locations.
The means we do the ramdisk currently is not. Actually, we need either bootloader assistance for an origin ramdisk, or we should append the ramdisk onto the end of the bit with a header, after that cost-free that ram later on.
Linux VR can mount a ramdisk connected into the kernel as root. This is the most basic method of starting Linux VR from Windows CE, because the origin is linked right into the bit.
” Ramdisk image” refers to a file which contains a photo of an ext2 filesystem that could be installed with -o loop or as a ramdisk. “Ramdisk item” describes a fairy object that envelops a (normally pressed) ramdisk image, made use of for linking a ramdisk into the Linux kernel. See the note at the end about how this terminogy has changed with time.
Modifiying an Existing Ramdisk Image
It’s probably much easier to get the ramdisk image off my ftp site and also customize it to your preference than to build one on your own from square one. Keep in mind that these directions presume that you have loopback tool support available.
To customize an existing ramdisk image
- Obtain the ramdisk photo (ramdisk.bz2) off my ftp website at ftp.ltc.com. The ramdisk there is based practically completely on a ramdisk put together by Jay Carlson. It’s the very best that I’ve seen thus far.
- Don’t attempt the following actions with a ramdisk.o data – that’s a ramdisk (possibly a pressed one) packaged inside an elf object for connecting it into the kernel, not a ramdisk picture. You need to install the ramdisk picture (I reveal you how to make a brand-new ramdisk.o from your ramdisk picture in the following area).
- Kind: mkdir/ mnt/ramdisk to develop a ramdisk install factor (if you don’t have one already).
- Type: place/ tmp/ramdisk/ mnt/ramdisk -o loophole to place the ramdisk photo on/ mnt/ramdisk.
- Modify/ mnt/ramdisk as you please.
- Type: umount/ mnt/ramdisk to unmount the ramdisk image.
- Type: touch/ tmp/ramdisk to show that the ramdisk picture has been changed. This is needed by mipsel-ramdisk “make install” (listed below), as well as for some strange reason/ tmp/ramdisk doesn’t automatically show that modifications were made to it while it was mounted.
- Next off, do “Making a New Ramdisk Object” below.
If you do not have loopback tool assistance available
Try something such as this (untried):.
- Kind: dd if=/ tmp/ramdisk of=/ dev/ram0 and also watch out that you typically aren’t already utilizing/ dev/ram0.
- Kind: mkdir/ mnt/ramdisk to produce a ramdisk mount point (if you don’t have one already).
- Type: mount -t ext2/ dev/ram0/ mnt/ramdisk.
- Customize/ mnt/ramdisk as you please.
- Kind: umount/ mnt/ramdisk.
- Type: dd if=/ dev/ram0 of= ramdisk.img.ext2 count= 1440.
- Next, do “Making a New Ramdisk Object” listed below.
Making a Ramdisk Image from Scratch.
Jay kept in mind: You can have any dimension ramdisk … If you intend to transform the size of the ramdisk, you have to mke2fs a new one (see linux/Documentation/ramdisk. txt area 4) and copy the contents of the old one over.
Next off, do “Making a New Ramdisk Object” below.
Making a New Ramdisk Object.
To earn the ramdisk a part of the bit photo, I press the ramdisk photo documents, plan the compressed documents in an elf object, then connect it with the rest of the kernel. In order to help with this, install the mipsel-ramdisk maker first if you haven’t currently.
Julian boot prefers a covering script to do this, as he states” [it is] all self included and I could be in any type of directory to run it. ymmv”. I included that method likewise.
To install the mipsel-ramdisk maker.
- Obtain mipsel-ramdisk. tar.bz2 from my ftp site at ftp.ltc.com.
- Uncompress it to/ usr/src. Now you have/ usr/src/mipsel-ramdisk.
Making a brand-new ramdisk object with the mipsel-ramdisk manufacturer.
- Modification to the/ usr/src/mipsel-ramdisk directory site.
- Kind: make install to earn ramdisk.o and also copy it into/ usr/src/linux/ arch/mips/boot.
Making a new ramdisk item with a manuscript.
Right here is a changed version of Julian’s mkramobj.sh script. I haven’t evaluated it however I presume it functions penalty.
use: mkramobj.sh ramdisk-image ramdisk-object.
Linking Your New Ramdisk Into Your Kernel.
The last step is to connect your brand-new ramdisk (actually, your new ramdisk.o data) right into your kernel (vmlinux data).
To link your brand-new ramdisk right into your bit.
- Modification to the/ usr/src/linux directory site.
- Type: make to make a brand-new vmlinux with your new ramdisk linked in.
Starting a Ramdisk-Root Kernel.
To book a ramdisk-root kernel, you should specify/ dev/ram0 as the origin gadget. See the Linux Virtual Reality Booting HOWTO for more details about this.
Ramdisk Terminology Change.
The ramdisk terminolgy altered with time. The term “ramdisk image” used to be “raw ramdisk”, and the term “ramdisk object” made use of to be “ramdisk photo”. The ramdisk item data “ramdisk.o” used to be “ramdisk.img”. The earlier terms as well as filename were based on terms that was being made use of at the time. The trouble was that “ramdisk.img” was not a ramdisk photo – it was an elf things, plus it was stealing the ideal name for the actual ramdisk picture, which I after that needed to call “raw ramdisk” rather. Anyhow it was a source of confusion. So I changed the terms as well as the filename to be better and less confusing. I additionally changed the mipsel-ramdisk maker as well as linux/arch/mips/ vr41xx/Makefile to accomodate the name adjustment. There, that actually simplifies points, eh.