From ArmadeusWiki
Jump to: navigation, search

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
  • get some useful environment variables:
 $ make shell_env
 $ source
  • 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

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:
 # 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 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