Ez a weblap erősen fejlesztés alatt áll, úgyhogy ha valami nem működik, az nagy valószínűséggel nem a te hibád.
[blog] [zene] [it] [linkek] [etc] [info]|
2009. szeptember 30. szerda, 02:15
Debian on the SheevaPlug -- my way
If you look around a bit on the net, you can find a couple of tutorials on installing Debian on a Marwell SheevaPlug Development Board. I did the same, but wasn't satisfied with any of them, for various reasons; thus I decided to try it myself from the ground up, so you can find another method below. Although I use a different approach to do it, I collected very useful bits of information from the other tutorials listed under References. I decided to install the OS to a USB stick instead of the Plug's embedded flash memory since it's easier to handle. Although the one and only USB port of the Plug will become occupied this way, you can get a cheap USB hub at any store round the corner, so you can have as many ports as you want. (I planned to connect a few more USB devices to the Plug so I needed a hub anyway.) Another thing that worths mentioning is that the current stable release of Debian (codename 'Lenny') doesn't support the SheevaPlug yet (and never will), thus we'll install the testing distribution codenamed 'Squeeze'. In short, we'll use a QEMU virtual ARM machine to bootstrap the file system, put a suitable kernel on it for the SheevaPlug (officially it's called the Kirkwood family of machines), then configure the Plug's boot loader to start that kernel. Details follow. First, you need a working QEMU installation. On a Debian system, just Let's start the installation in the virtual machine. Triple check that you replace Install the OS according to your preference. As always, I use a separate primary partition for After completion, the installer will restart the virtual machine, but don't let it boot again since it will just start the installer over. This is because it still uses the ramdisk specified on the command line which contains a basic installer, not the tools needed to bring the system up. You can't boot the stick in the Plug now, since the kernel that the filesystem has currently is for the Versatile variant, and we need the Kirkwood. So first we need to install that kernel onto the stick, and generate an initial ramdisk for it as well. But remember, you can't run any program -- including initrd generators -- on your machine. Thus we need to boot the virtual machine once again to install a Kirkwood kernel and to generate an initrd. To do that, a guest kernel and initrd is needed on the host system so that it can be passed to QEMU for booting in the virtual machine. So let's copy it out: make the kernel re-read the partition table, mount the filesystem Now login as root and install a Kirkwood kernel: This will pull in Before preparing them, the initrd must be regenerated. Unfortunately you need a few more kernel modules in the initrd to access the stick at early boot time. Remember, for the virtual machine it's a SCSI disk, so no USB modules are included in the default initrd. Edit Then regenerate the initrd and make the images for U-Boot: Let's adapt Later once the OS is running on the thing, we'll disable the virtual terminals, since they are useless on the Plug. Shut the virtual machine down now, and remove the stick from the host machine. It's time to get your hands on it. Attach the USB cable that came with the Plug to your machine and the other end to the small USB port on the side of the box, right beside the MMC slot. Now plug it in the power outlet. On the host machine a USB/serial converter should appear soon. Check the kernel log, it looks like this: Find the name of the converter, it's in the last line of the above log. Grab your favorite serial terminal emulator and attach it to the converter, making sure it's set to 115200 baud, 8 data bits, no parity. I prefer You'd better be quick at this point. The boot loader initialization takes around 10 seconds plus a 3 second delay before the preinstalled Ubuntu starts booting. Don't worry too much about it, you won't use that anymore. Complete initialization process looks like this: Almost there. What you see is the command line interface of U-Boot. It has a bunch of commands documented in its manual plus a few more added exclusively for the Plug by Marvell. Execute the following commands, this time I'll show you the output as well: Now lean back and watch your full-blown Debian system booting on the SheevaPlug. However, there are still a few things to do. As I mentioned earlier, the virtual consoles should be disabled in There are a few things to set in U-Boot so the Plug can be restarted without human intervention. Reboot the Plug and enter the interactive command line interface by interrupting the boot process during the countdown. U-Boot maintains an environment of variables that's loaded from the flash at initialization time. Most of the variables have a special meaning, for example:
So let's set these and a few new ones, save everything to the flash, then restart the boot loader so we can see what happens. The meanings of the commands themselves should be pretty obvious. Don't interrupt the boot process this time. If everything's okay, the OS will be started automatically. Now go on and install software, configure the network, have breakfast, whatever. References
*** |
Koszi a cikket, remek!
(Harom hete rendeltem meg a cuccot, de meg nem adtak fel. Ha a negyedik heten sem kapok levelet a fedextol, akkor rajuk telefonalok :)