Tuesday, 4 September 2012

Still at the Hurdle

Good News: The HDMI to DVI adapters arrived. Still waiting on the power supplies.Tried the virtualisation of the Pi again - but with mixed results. I managed to get 2 steps further before hitting problems. I'll outline what I did this time to get that far:I cleaned out my working directory. Then from the root ran 'sudo chmod -R 777 /qworking/' to give full permissions on the working directory. Also run 'sudo apt-get install libsdl-dev' and 'sudo apt-get install patch', prior to commencing.

Configure and Install QEMU: 'cd qemu-1.2.0-rc2', then run './configure
–target-list=arm-softmmu,arm-linux-user'. Next run 'make', then 'sudo make install'. QEMU should now be installed

Download and Set-up Wheezy: Make a folder for Wheezy - run 'mkdir /qworking/wheezy/' then 'cd /qworking/wheezy/'. Next from RaspberryPi.org download the 'Wheezy' image. Then 'unzip 2012-08-16-wheezy-raspbian.zip'.

Find the rootfs in the Image: Run 'file 2012-08-16-wheezy-raspbian.img'. Got the following as output - we want the startsector and number of sectors values from partition 2:

Set-up the Kernel - 4: Patch the Kernel - Grab the patch from 'wget http://thoronir.net/raspi-dev/linux-arm.patch'. Then run 'patch -p1 -d linux-3.1.9/ < linux-arm.patch'. Resulting output should indicate a couple of files were patched.

Configure the Kernel - 1: 'cd /qworking/kernel/linux-3.1.9/', then run the following commands; 'make ARCH=arm versatile defconfig', and when that is successful, 'make ARCH=arm menuconfig'. This should bring you to the BIOS-like setup screen for the kernel configuration.

Configure the Kernel - 2: Select General Setup > Cross compiler tool prefix. If you have downloaded the correct version of Sorcery Lite, you should be able to use the value
'/qworking/kernel/arm-2011.03/bin/arm-none-eabi-'. A good way to confirm is to check if the '/qworking/kernel/arm-2011.03/bin/' path is a valid one on your machine.

Configure the Kernel - 3: Set the following values (all paths are relative to the root menu):

Use the Kernel Image: Move back to the working directory, 'cd /qworking/', and copy in the kernel image, renaming it at the same time: 'cp kernel/linux-3.1.9/arch/arm/boot/zImage zImage_3.1.9'.

All worked well to this point. Then I've attempted the first boot of the image in QEMU, with the command: 'qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs_debian_rpi.ext4 -kernel zImage_3.1.9 -append "root=/dev/sda" -serial stdio -redir tcp:2222::22'.

At the command prompt the following was in the output:

oss: Failed to open /dev/dsp

oss: Reason: No such file or directory

In the QEMU window:

VFS: Cannot open root device
“sda” or unknown-block(2,0)

Please append a correct “root=”
boot option

Not sure whats going on. Search through several forums, nothing helpful. Checked - and yes sda is a mount point on my machine. Possibly I need a dedicated partition on my local drive in which to get this running? The machine I am on is using grub to boot load either Ubuntu 11.10 or Kubuntu 12.04. So, I think I'll start by re-building the machine with some spare partitions, and only one OS.