diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2008-12-16 22:10:31 +0100 |
---|---|---|
committer | Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> | 2008-12-17 22:28:41 +0900 |
commit | 16cdf816779f5b602a9b3b4d2ea4dea05095c35b (patch) | |
tree | 1b6376e6e3e177b73dcb8651a9cc8aa1abdd2bb7 | |
parent | 13095b2f07dacb1f863772266c1789d47a523a8a (diff) |
MIPS: qemu_mips: update doc to use all disk and boot linux kernel
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
-rw-r--r-- | doc/README.qemu_mips | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/doc/README.qemu_mips b/doc/README.qemu_mips index 2fdd2b03ad..8fa4907cb9 100644 --- a/doc/README.qemu_mips +++ b/doc/README.qemu_mips @@ -17,12 +17,47 @@ create image: start it: # qemu-system-mips -M mips -pflash flash -monitor null -nographic +Ide Disk + +# dd of=ide bs=1k cout=100k if=/dev/zero + +# sfdisk -C 261 -d ide +# partition table of ide +unit: sectors + + ide1 : start= 63, size= 32067, Id=83 + ide2 : start= 32130, size= 32130, Id=83 + ide3 : start= 64260, size= 4128705, Id=83 + ide4 : start= 0, size= 0, Id= 0 + +# Generate uImage +# tools/mkimage -A mips -O linux -T kernel -C gzip -a 0x80010000 -e 0x80245650 -n "Linux 2.6.24.y" -d vmlinux.bin.gz uImage +# Copy to Flash +# dd if=uImage bs=1k conv=notrunc seek=224 of=flash +# Copy to ide +# dd if=uImage bs=512 conv=notrunc seek=63 of=ide + +# Generate ext2 on part 2 +# Attached as loop device ide offset = 32130 * 512 +# losetup -o 16450560 -f ide +# Format as ext2 ( arg2 : nb blocks) +# mke2fs /dev/loop0 16065 +# losetup -d /dev/loop0 +# Mount and copy uImage and initrd.gz to it +# mount -o loop,offset=16450560 -t ext2 ide /mnt +# Umount it +# umount /mnt + +Now you can boot from flash, ide, ide+ext2 and tfp + +# qemu-system-mips -M mips -pflash flash -monitor null -nographic -net nic -net user -tftp `pwd` -hda ide + II) How to debug U-Boot In order to debug U-Boot you need to start qemu with gdb server support (-s) and waiting the connection to start the CPU (-S) -# qemu-system-mips -S -s -M mips -pflash flash -monitor null -nographic +# qemu-system-mips -S -s -M mips -pflash flash -monitor null -nographic -net nic -net user -tftp `pwd` -hda ide in an other console you start gdb |