Difference between revisions of "Talk:QEMU"
From ArmadeusWiki
m (New page: ==Get/generate simulation images (old version = with ramdisk)== * In our tests we used the QEMU Versatile PB emulated hardware. To get a compatible Linux kernel for this board then: <pre c...) |
(move old method (ramdisk)) |
||
Line 38: | Line 38: | ||
$ qemu-img create -f qcow rootfs.arm_nofpu2.img 20M | $ qemu-img create -f qcow rootfs.arm_nofpu2.img 20M | ||
</pre> | </pre> | ||
+ | |||
+ | ==Launch it (old method)== | ||
+ | * first time with ramdisk | ||
+ | [armadeus]$ qemu-system-arm -m 32 -M versatilepb -kernel vmlinuz-2.6.18-6-versatile \ | ||
+ | -initrd apf9328-rootfs.arm.ext2.gz -append "root=/dev/ram" -hda ./apf9328-rootfs.arm_nofpu2.img | ||
+ | |||
+ | [[Image:qemu_apf_ramdisk.png]] | ||
+ | |||
+ | * When system has booted, we will create the "hard disk" image. But first, if you are French, load a usable keymap: | ||
+ | <pre class="apf"> | ||
+ | # loadkmap < /etc/i18n/fr.kmap | ||
+ | </pre> | ||
+ | <pre class="host"> | ||
+ | => loqdk,qp < !etc!i&_n!fr:k,qp on your PC keyboard | ||
+ | </pre> | ||
+ | * then: | ||
+ | <pre class="apf"> | ||
+ | # mkdir /tmp/dev | ||
+ | # mknod /tmp/dev/sda b 8 0 | ||
+ | # mknod /tmp/dev/sda1 b 8 1 | ||
+ | # fdisk /tmp/dev/sda | ||
+ | n p 1 <enter> <enter> w | ||
+ | # mkfs.ext2 /tmp/dev/sda1 | ||
+ | </pre> | ||
+ | * Now we can mount our brand new file system: | ||
+ | <pre class="apf"> | ||
+ | # mkdir /mnt/root | ||
+ | # mount /tmp/dev/sda1 /mnt/root | ||
+ | </pre> | ||
+ | {{Note|Following steps need you already configured [[Communicate | tftp]] on your host and networking up and running}} | ||
+ | |||
+ | * And now we can populate it: | ||
+ | <pre class="apf"> | ||
+ | # cd /mnt/root | ||
+ | # tftp -g -r apf27-rootfs.arm.tar -l rootfs.arm.tar [HOST IP] | ||
+ | # tar -xvf rootfs.arm.tar | ||
+ | </pre> | ||
+ | |||
+ | * Finally halt the emulated system and, next boot, we can omit the initrd image: | ||
+ | [armadeus]$ qemu-system-arm -m 32 -M versatilepb -kernel vmlinuz-2.6.18-6-versatile \ | ||
+ | -append "root=/dev/sda1" -hda ./apf9328-rootfs.arm_nofpu2.img |
Revision as of 18:43, 16 June 2009
Get/generate simulation images (old version = with ramdisk)
- In our tests we used the QEMU Versatile PB emulated hardware. To get a compatible Linux kernel for this board then:
$ cd your_armadeus_view/ $ wget http://people.debian.org/~aurel32/arm-versatile/vmlinuz-2.6.26-2-versatile
- get some useful environment variables:
$ make shell_env $ source armadeus_env.sh
- in $ARMADEUS_ROOTFS_DIR/etc/inittab, comment following line:
ttySMX0::respawn:/sbin/getty -L ttySMX0 115200,57600,38400 vt100
- Generate your Armadeus Rootfs as an EXT2 image:
$ make menuconfig
Target filesystem options ---> [*] ext2 root filesystem ... (keep all default options)
$ make
- be sure that your rootfs image is less than 16Mbytes (Ramdisk limit)
$ ls -al $ARMADEUS_BINARIES/*.ext2
- and zip it (we will use it as Ramdisk first):
$ gzip -9 $ARMADEUS_BINARIES/apfxx-rootfs.arm.ext2
- Create a fake QEMU Hard disk image
$ qemu-img create -f qcow rootfs.arm_nofpu2.img 20M
Launch it (old method)
- first time with ramdisk
[armadeus]$ qemu-system-arm -m 32 -M versatilepb -kernel vmlinuz-2.6.18-6-versatile \ -initrd apf9328-rootfs.arm.ext2.gz -append "root=/dev/ram" -hda ./apf9328-rootfs.arm_nofpu2.img
- When system has booted, we will create the "hard disk" image. But first, if you are French, load a usable keymap:
# loadkmap < /etc/i18n/fr.kmap
=> loqdk,qp < !etc!i&_n!fr:k,qp on your PC keyboard
- then:
# mkdir /tmp/dev # mknod /tmp/dev/sda b 8 0 # mknod /tmp/dev/sda1 b 8 1 # fdisk /tmp/dev/sda n p 1 <enter> <enter> w # mkfs.ext2 /tmp/dev/sda1
- Now we can mount our brand new file system:
# mkdir /mnt/root # mount /tmp/dev/sda1 /mnt/root
Note: Following steps need you already configured tftp on your host and networking up and running |
- And now we can populate it:
# cd /mnt/root # tftp -g -r apf27-rootfs.arm.tar -l rootfs.arm.tar [HOST IP] # tar -xvf rootfs.arm.tar
- Finally halt the emulated system and, next boot, we can omit the initrd image:
[armadeus]$ qemu-system-arm -m 32 -M versatilepb -kernel vmlinuz-2.6.18-6-versatile \ -append "root=/dev/sda1" -hda ./apf9328-rootfs.arm_nofpu2.img