qemu_mips: move env storage just after u-boot
PATCH 1/1 qemu_mips: move env storage just after u-boot
--- include/configs/qemu-mips.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/qemu-mips.h +1 -1
@@ -150,7 +150,7 @@#define CFG_FLASH_USE_BUFFER_WRITE 1#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + 0x40000) +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + 0x30000)/* Address and size of Primary Environment Sector */ #define CONFIG_ENV_SIZE 0x8000
Signature · 1 line
1.5.6.5
PATCH 1/1 qemu_mips: update doc to generate and to use qemu flash, ide file
--- doc/README.qemu_mips | 67 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 58 insertions(+), 9 deletions(-)
doc/README.qemu_mips +58 -9
@@ -17,7 +17,28 @@ create image: start it: # qemu-system-mips -M mips -pflash flash -monitor null -nographic -Ide Disk +2) Download kernel + initrd + +On ftp://ftp.denx.de/pub/contrib/Jean-Christophe_Plagniol-Villard/qemu_mips/ +you can downland + +#config to build the kernel +qemu_mips_defconfig +#patch to fix mips interupt init on 2.6.24.y kernel +qemu_mips_kernel.patch +initrd.gz +vmlinux +vmlinux.bin +System.map + +4) 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 + +5) Copy uImage to Flash +# dd if=uImage bs=1k conv=notrunc seek=224 of=flash + +6) Generate Ide Disk # dd of=ide bs=1k cout=100k if=/dev/zero
@@ -30,14 +51,12 @@ unit: sectors 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 +7) Copy to ide + # dd if=uImage bs=512 conv=notrunc seek=63 of=ide -# Generate ext2 on part 2 +8) Generate ext2 on part 2 on Copy uImage and initrd.gz + # Attached as loop device ide offset = 32130 * 512 # losetup -o 16450560 -f ide # Format as ext2 ( arg2 : nb blocks)
@@ -45,10 +64,40 @@ unit: sectors # losetup -d /dev/loop0 # Mount and copy uImage and initrd.gz to it # mount -o loop,offset=16450560 -t ext2 ide /mnt +# mkdir /mnt/boot +# cp {initrd.gz,uImage} /mnt/boot/ # Umount it # umount /mnt -Now you can boot from flash, ide, ide+ext2 and tfp +9) Set Environment + +setenv rd_start 0x80800000 +setenv rd_size 2663940 +setenv kernel BFC38000 +setenv oad_addr 80500000 +setenv load_addr2 80F00000 +setenv kernel_flash BFC38000 +setenv load_addr_hello 80200000 +setenv bootargs 'root=/dev/ram0 init=/bin/sh' +setenv load_rd_ext2 'ide res; ext2load ide 0:2 ${rd_start} /boot/initrd.gz' +setenv load_rd_tftp 'tftp ${rd_start} /initrd.gz' +setenv load_kernel_hda 'ide res; diskboot ${load_addr} 0:2' +setenv load_kernel_ext2 'ide res; ext2load ide 0:2 ${load_addr} /boot/uImage' +setenv load_kernel_tftp 'tftp ${load_addr} /qemu_mips/uImage' +setenv boot_ext2_ext2 'run load_rd_ext2; run load_kernel_ext2; run addmisc; bootm ${load_addr}' +setenv boot_ext2_flash 'run load_rd_ext2; run addmisc; bootm ${kernel_flash}' +setenv boot_ext2_hda 'run load_rd_ext2; run load_kernel_hda; run addmisc; bootm ${load_addr}' +setenv boot_ext2_tftp 'run load_rd_ext2; run load_kernel_tftp; run addmisc; bootm ${load_addr}' +setenv boot_tftp_hda 'run load_rd_tftp; run load_kernel_hda; run addmisc; bootm ${load_addr}' +setenv boot_tftp_ext2 'run load_rd_tftp; run load_kernel_ext2; run addmisc; bootm ${load_addr}' +setenv boot_tftp_flash 'run load_rd_tftp; run addmisc; bootm ${kernel_flash}' +setenv boot_tftp_tftp 'run load_rd_tftp; run load_kernel_tftp; run addmisc; bootm ${load_addr}' +setenv load_hello_tftp 'tftp ${load_addr_hello} /examples/hello_world.bin' +setenv go_tftp 'run load_hello_tftp; go ${load_addr_hello}' +setenv addmisc 'setenv bootargs ${bootargs} console=ttyS0,${baudrate} rd_start=${rd_start} rd_size=${rd_size} ethaddr=${ethaddr}' +setenv bootcmd 'run boot_tftp_flash' + +10) 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
@@ -64,7 +113,7 @@ in an other console you start gdb 1) Debugging of U-Boot Before Relocation Before relocation, the addresses in the ELF file can be used without any problems -buy connecting to the gdb server localhost:1234 +by connecting to the gdb server localhost:1234 # mipsel-unknown-linux-gnu-gdb u-boot GNU gdb 6.6
Signature · 1 line
1.5.6.5
PATCH 1/1 qemu_mips: update doc to generate and to use qemu flash, ide file
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 1 line · In message <[email protected]> you wrote:
Subject: [PATCH 1/1]
Could you please omit the "1/1" part is this is a single patch that does not belong to some series?
[On the other hand, I kind of feel that this *is* actually part of your qemu series ?]
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A fail-safe circuit will destroy others. -- Klipstein
PATCH 1/1 qemu_mips: update doc to generate and to use qemu flash, ide file
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- doc/README.qemu_mips | 67 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 58 insertions(+), 9 deletions(-)
ping
Best Regards,
J.
PATCH 1/1 qemu_mips: update doc to generate and to use qemu flash, ide file
Quoted 7 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- doc/README.qemu_mips | 67 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 58 insertions(+), 9 deletions(-)ping
Hmm, the patch above can't be applied to the current git. Could you confirm it?
doc/README.qemu_mips create image: · line 20
Quoted 9 lines
doc/README.qemu_mips +0
-1@@ -17,7 +17,28 @@ create image: start it: # qemu-system-mips -M mips -pflash flash -monitor null -nographic -Ide Disk
For example, where does this "-Ide Disk" come from?
Quoted 7 lines
doc/README.qemu_mips +7
-0+2) Download kernel + initrd + +On ftp://ftp.denx.de/pub/contrib/Jean-Christophe_Plagniol-Villard/qemu_mips/ +you can downland + +#config to build the kernel +qemu_mips_defconfig
PATCH 1/1 qemu_mips: update doc to generate and to use qemu flash, ide file
Quoted 11 lines · Shinya Kuribayashi
Quoted 7 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- doc/README.qemu_mips | 67 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 58 insertions(+), 9 deletions(-)ping
Hmm, the patch above can't be applied to the current git. Could you confirm it?
this patch apply against the 2 new I've re-send
Best Regards,
J.
PATCH 1/2 qemu_mips: move env storage just after u-boot
--- include/configs/qemu-mips.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/qemu-mips.h +1 -1
@@ -150,7 +150,7 @@#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000) +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)/* Address and size of Primary Environment Sector */ #define CONFIG_ENV_SIZE 0x8000
Signature · 1 line
1.5.6.5
PATCH 2/2 qemu_mips: update doc to use all disk and boot linux kernel
--- doc/README.qemu_mips | 37 ++++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-)
doc/README.qemu_mips +36 -1
@@ -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
Signature · 1 line
1.5.6.5
PATCH 2/2 qemu_mips: update doc to use all disk and boot linux kernel
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- doc/README.qemu_mips | 37 ++++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-)
Applied and pushed out, thanks.
One comment bellow.
Quoted 28 lines
doc/README.qemu_mips +20
-0@@ -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 +
doc/README.qemu_mips create image: · line 49
Quoted 10 lines
doc/README.qemu_mips +10
-0+# 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
Comments are difficult to distinguish from real commands here. It might be readable if we use another comment style, or another command prompt.
And again, thanks for your continued work to improve qemu "getting started" guide.
Shinya
PATCH 1/1 qemu_mips: update doc to generate and to use qemu flash, ide file
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- doc/README.qemu_mips | 67 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 58 insertions(+), 9 deletions(-)
Applied and pushed out, thanks.
By the way, let me nitpick.
doc/README.qemu_mips create image: · line 20
Quoted 9 lines
doc/README.qemu_mips +0
-1@@ -17,7 +17,28 @@ create image: start it: # qemu-system-mips -M mips -pflash flash -monitor null -nographic -Ide Disk
We don't have I-1) and,
Quoted 4 lines
doc/README.qemu_mips +4
-0+2) Download kernel + initrd + +On ftp://ftp.denx.de/pub/contrib/Jean-Christophe_Plagniol-Villard/qemu_mips/ +you can downland
doc/README.qemu_mips create image: · line 33
Quoted 10 lines
doc/README.qemu_mips +10
-0+ +#config to build the kernel +qemu_mips_defconfig +#patch to fix mips interupt init on 2.6.24.y kernel +qemu_mips_kernel.patch +initrd.gz +vmlinux +vmlinux.bin +System.map +
I-3) here. But this does not prevent me from pushing them out. When you get a chance to update this doc in the future, please correct them.
Thanks!
Shinya
Quoted 11 lines
doc/README.qemu_mips +8
-0+4) 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 + +5) Copy uImage to Flash +# dd if=uImage bs=1k conv=notrunc seek=224 of=flash + +6) Generate Ide Disk # dd of=ide bs=1k cout=100k if=/dev/zero
PATCH 1/1 qemu_mips: move env storage just after u-boot
In reply to Jean-Christophe PLAGNIOL-VILLARDDear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 10 lines · In message <[email protected]> you wrote:
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- include/configs/qemu-mips.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)include/configs/qemu-mips.h +0
-0
include/configs/qemu-mips.h line 153
Quoted 5 lines
include/configs/qemu-mips.h +1
-1@@ -150,7 +150,7 @@#define CFG_FLASH_USE_BUFFER_WRITE 1#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + 0x40000) +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + 0x30000)
Wouldn't it make sense to use something like
(CFG_FLASH_BASE + CFG_MONITOR_LEN)
instead?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de An optimist believes we live in the best world possible; a pessimist fears this is true.
PATCH v2 1/1 qemu_mips: move env storage just after u-boot
---
Use CFG_MONITOR_LEN instead of value
include/configs/qemu-mips.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/qemu-mips.h +1 -1
@@ -150,7 +150,7 @@#define CFG_FLASH_USE_BUFFER_WRITE 1#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + 0x40000) +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN)/* Address and size of Primary Environment Sector */ #define CONFIG_ENV_SIZE 0x8000
Signature · 1 line
1.5.6.5
PATCH v2 1/1 qemu_mips: move env storage just after u-boot
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 5 lines · In message <[email protected]> you wrote:
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>---
UseCFG_MONITOR_LENinstead of valueinclude/configs/qemu-mips.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Does not apply:
Applying qemu_mips: move env storage just after u-boot
error: patch failed: include/configs/qemu-mips.h:150
error: include/configs/qemu-mips.h: patch does not apply
fatal: sha1 information is lacking or useless (include/configs/qemu-mips.h).
Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge.
Patch failed at 0001.
Please rebase and resubmit.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Severe culture shock results when experts from another protocol suite [...] try to read OSI documents. The term "osified" is used to refer to such documents. [...] Any relationship to the word "ossified" is purely intentional. - Marshall T. Rose
PATCH v2 1/1 qemu_mips: move env storage just after u-boot
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>---
UseCFG_MONITOR_LENinstead of valueinclude/configs/qemu-mips.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)include/configs/qemu-mips.h +0
-0
include/configs/qemu-mips.h line 153
Quoted 5 lines
include/configs/qemu-mips.h +1
-1@@ -150,7 +150,7 @@#define CFG_FLASH_USE_BUFFER_WRITE 1#define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + 0x40000) +#define CONFIG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN)
Now we have CONFIG_SYS_* instead of CFG_* in this area. Could you update and re-send the patch, please?
Thanks in advance,
Shinya