Re: [U-Boot] [GIT PULL] MIPS updates
Dear Shinya Kuribayashi, In message <4b56f5ca.80...@pobox.com> you wrote: > Hi, > > please pull the following unaligned.h patch required by zlib.c. > > Thanks in advance, > > Shinya > --- > > The following changes since commit 50ef25ef24eccd8e69d2c1ccc97b3f7e30109f51: > Michal Simek (1): > microblaze: zlib needs asm/unaligned.h > > are available in the git repository at: > > git://git.denx.de/u-boot-mips.git master > > Shinya Kuribayashi (1): > MIPS: qemu_mips: Import asm/unaligned.h from the Linux kernel > > include/asm-mips/unaligned.h | 26 ++ > 1 files changed, 26 insertions(+), 0 deletions(-) > create mode 100644 include/asm-mips/unaligned.h Applied, thanks. Best regards, Wolfgang Denk -- 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: w...@denx.de Even if you aren't in doubt, consider the mental welfare of the per- son who has to maintain the code after you, and who will probably put parens in the wrong place. - Larry Wall in the perl man page ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] MIPS updates
Hi, please pull the following unaligned.h patch required by zlib.c. Thanks in advance, Shinya --- The following changes since commit 50ef25ef24eccd8e69d2c1ccc97b3f7e30109f51: Michal Simek (1): microblaze: zlib needs asm/unaligned.h are available in the git repository at: git://git.denx.de/u-boot-mips.git master Shinya Kuribayashi (1): MIPS: qemu_mips: Import asm/unaligned.h from the Linux kernel include/asm-mips/unaligned.h | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) create mode 100644 include/asm-mips/unaligned.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] MIPS updates
Dear Shinya Kuribayashi, In message <4a0e08f4.5050...@pobox.com> you wrote: > please pull U-Boot/MIPS repository to pick up the following changes. > > Thanks in advance, > > Shinya > > --- > > The following changes since commit a2e0ffcf2d9a22c582a93e84a4bef20fd3877f47: > Wolfgang Denk (1): > Prepare v2009.06-rc2 > > are available in the git repository at: > > git://git.denx.de/u-boot-mips.git master > > Shinya Kuribayashi (2): > MIPS: Make all extern-ed functions in bitops.h static > MIPS: lib_mips/board.c: Remove unused variables > > Thomas Lange (1): > MIPS: Implement ethernet halt for au1x00 > > cpu/mips/au1x00_eth.c |4 +++ > include/asm-mips/bitops.h | 64 ++-- > lib_mips/board.c |3 +- > 3 files changed, 37 insertions(+), 34 deletions(-) Done, thanks. Best regards, Wolfgang Denk -- 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: w...@denx.de You've no idea of what a poor opinion I have of myself, and how little I deserve it. - W. S. Gilbert ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] MIPS updates
Dear Shinya Kuribayashi, In message <4a0e0c1b.4060...@pobox.com> you wrote: > > From the CodingStyle point of view, (volatile u32 *) is preferred, > but I see that Thomas-san just follow existing code and tries to be > consistent. > > Wolfgang-san, I hope the patch is applied as-is at this moment, and > look forward to cleanup patch in the future. That's OK, thanks. Best regards, Wolfgang Denk -- 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: w...@denx.de I distrust all systematisers, and avoid them. The will to a system shows a lack of honesty. - Friedrich Wilhelm Nietzsche _Götzen-Dämmerung [The Twilight of the Idols]_ ``Maxims and Missiles'' no. 26 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] MIPS updates
Shinya Kuribayashi wrote: > Thomas Lange (1): > MIPS: Implement ethernet halt for au1x00 [...] > diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c > index 6272a3a..5074997 100644 > --- a/cpu/mips/au1x00_eth.c > +++ b/cpu/mips/au1x00_eth.c > @@ -276,6 +276,10 @@ static int au1x00_init(struct eth_device* dev, bd_t * > bd){ > } > > static void au1x00_halt(struct eth_device* dev){ > + volatile u32 *macen = (volatile u32*)MAC0_ENABLE; > + > + /* Put MAC0 in reset */ > + *macen = 0; > } > > int au1x00_enet_initialize(bd_t *bis){ >From the CodingStyle point of view, (volatile u32 *) is preferred, but I see that Thomas-san just follow existing code and tries to be consistent. Wolfgang-san, I hope the patch is applied as-is at this moment, and look forward to cleanup patch in the future. Thanks in advance, Shinya ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] MIPS updates
please pull U-Boot/MIPS repository to pick up the following changes. Thanks in advance, Shinya --- The following changes since commit a2e0ffcf2d9a22c582a93e84a4bef20fd3877f47: Wolfgang Denk (1): Prepare v2009.06-rc2 are available in the git repository at: git://git.denx.de/u-boot-mips.git master Shinya Kuribayashi (2): MIPS: Make all extern-ed functions in bitops.h static MIPS: lib_mips/board.c: Remove unused variables Thomas Lange (1): MIPS: Implement ethernet halt for au1x00 cpu/mips/au1x00_eth.c |4 +++ include/asm-mips/bitops.h | 64 ++-- lib_mips/board.c |3 +- 3 files changed, 37 insertions(+), 34 deletions(-) diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c index 6272a3a..5074997 100644 --- a/cpu/mips/au1x00_eth.c +++ b/cpu/mips/au1x00_eth.c @@ -276,6 +276,10 @@ static int au1x00_init(struct eth_device* dev, bd_t * bd){ } static void au1x00_halt(struct eth_device* dev){ + volatile u32 *macen = (volatile u32*)MAC0_ENABLE; + + /* Put MAC0 in reset */ + *macen = 0; } int au1x00_enet_initialize(bd_t *bis){ diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 56d7225..659ac9d 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h @@ -60,7 +60,7 @@ * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ -extern __inline__ void +static __inline__ void set_bit(int nr, volatile void *addr) { unsigned long *m = ((unsigned long *) addr) + (nr >> 5); @@ -84,7 +84,7 @@ set_bit(int nr, volatile void *addr) * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ -extern __inline__ void __set_bit(int nr, volatile void * addr) +static __inline__ void __set_bit(int nr, volatile void * addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 5); @@ -101,7 +101,7 @@ extern __inline__ void __set_bit(int nr, volatile void * addr) * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() * in order to ensure changes are visible on other processors. */ -extern __inline__ void +static __inline__ void clear_bit(int nr, volatile void *addr) { unsigned long *m = ((unsigned long *) addr) + (nr >> 5); @@ -125,7 +125,7 @@ clear_bit(int nr, volatile void *addr) * Note that @nr may be almost arbitrarily large; this function is not * restricted to acting on a single-word quantity. */ -extern __inline__ void +static __inline__ void change_bit(int nr, volatile void *addr) { unsigned long *m = ((unsigned long *) addr) + (nr >> 5); @@ -149,7 +149,7 @@ change_bit(int nr, volatile void *addr) * If it's called on the same region of memory simultaneously, the effect * may be that only one operation succeeds. */ -extern __inline__ void __change_bit(int nr, volatile void * addr) +static __inline__ void __change_bit(int nr, volatile void * addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 5); @@ -164,7 +164,7 @@ extern __inline__ void __change_bit(int nr, volatile void * addr) * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -extern __inline__ int +static __inline__ int test_and_set_bit(int nr, volatile void *addr) { unsigned long *m = ((unsigned long *) addr) + (nr >> 5); @@ -194,7 +194,7 @@ test_and_set_bit(int nr, volatile void *addr) * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -extern __inline__ int __test_and_set_bit(int nr, volatile void * addr) +static __inline__ int __test_and_set_bit(int nr, volatile void * addr) { int mask, retval; volatile int *a = addr; @@ -215,7 +215,7 @@ extern __inline__ int __test_and_set_bit(int nr, volatile void * addr) * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -extern __inline__ int +static __inline__ int test_and_clear_bit(int nr, volatile void *addr) { unsigned long *m = ((unsigned long *) addr) + (nr >> 5); @@ -246,7 +246,7 @@ test_and_clear_bit(int nr, volatile void *addr) * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -extern __inline__ int __test_and_clear_bit(int nr, volatile void * addr) +static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) { int mask, retval; volatile int*a = addr; @@ -267,7 +267,7 @@ extern __inline__ int __test_and_clear_bit(int nr, volatile void * addr) * This operation is atomic and cannot be reordered. * It also implies a memory barrier. */ -extern __inline__ int +static __inline__ int test_and_change_bit(int nr, volatile void *addr) { unsigned long *m = ((un
Re: [U-Boot] [GIT PULL] MIPS updates
Dear Shinya Kuribayashi, In message <497f1752.1060...@ruby.dti.ne.jp> you wrote: > Hi Wolfgang, > > please pull U-Boot/MIPS repository to pick up the following changes. > > Thanks in advance, > > Shinya > > --- > > The following changes since commit 8f86a3636ef88427f880610638e80991adc41896: > Wolfgang Denk (1): > Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx > > are available in the git repository at: > > git://git.denx.de/u-boot-mips.git master > > Stefan Roese (4): > MIPS: Add flush_dcache_range() and invalidate_dcache_range() > MIPS: Add VCT board series support (Part 1/3) > MIPS: Add VCT board series support (Part 2/3) > MIPS: Add VCT board series support (Part 3/3) > > MAINTAINERS |4 + > MAKEALL | 12 + > Makefile | 35 ++ > board/micronas/vct/Makefile | 57 +++ > board/micronas/vct/bcu.h | 170 + > board/micronas/vct/config.mk | 31 ++ > board/micronas/vct/dcgu.c| 258 + > board/micronas/vct/dcgu.h| 179 + > board/micronas/vct/ebi.c | 48 +++ > board/micronas/vct/ebi.h | 95 + > board/micronas/vct/ebi_nor_flash.c | 131 +++ > board/micronas/vct/ebi_onenand.c | 198 ++ > board/micronas/vct/ebi_smc911x.c | 94 + > board/micronas/vct/ehci.c| 110 ++ > board/micronas/vct/gpio.c| 88 + > board/micronas/vct/scc.c | 669 > ++ > board/micronas/vct/scc.h | 205 +++ > board/micronas/vct/smc_eeprom.c | 394 > board/micronas/vct/top.c | 289 +++ > board/micronas/vct/u-boot.lds| 71 > board/micronas/vct/vct.c | 117 ++ > board/micronas/vct/vct.h | 104 ++ > board/micronas/vct/vcth/reg_dcgu.h | 36 ++ > board/micronas/vct/vcth/reg_ebi.h| 242 > board/micronas/vct/vcth/reg_fwsram.h | 73 > board/micronas/vct/vcth/reg_gpio.h | 32 ++ > board/micronas/vct/vcth/reg_scc.h| 102 + > board/micronas/vct/vcth/reg_usbh.h | 33 ++ > board/micronas/vct/vcth/reg_wdt.h| 24 ++ > board/micronas/vct/vcth2/reg_ebi.h | 290 +++ > board/micronas/vct/vctv/reg_dcgu.h | 25 ++ > board/micronas/vct/vctv/reg_ebi.h| 290 +++ > board/micronas/vct/vctv/reg_gpio.h | 32 ++ > board/micronas/vct/vctv/reg_wdt.h| 24 ++ > cpu/mips/cpu.c | 28 ++ > include/common.h |2 + > include/configs/vct.h| 340 + > 37 files changed, 4932 insertions(+), 0 deletions(-) > create mode 100644 board/micronas/vct/Makefile > create mode 100644 board/micronas/vct/bcu.h > create mode 100644 board/micronas/vct/config.mk > create mode 100644 board/micronas/vct/dcgu.c > create mode 100644 board/micronas/vct/dcgu.h > create mode 100644 board/micronas/vct/ebi.c > create mode 100644 board/micronas/vct/ebi.h > create mode 100644 board/micronas/vct/ebi_nor_flash.c > create mode 100644 board/micronas/vct/ebi_onenand.c > create mode 100644 board/micronas/vct/ebi_smc911x.c > create mode 100644 board/micronas/vct/ehci.c > create mode 100644 board/micronas/vct/gpio.c > create mode 100644 board/micronas/vct/scc.c > create mode 100644 board/micronas/vct/scc.h > create mode 100644 board/micronas/vct/smc_eeprom.c > create mode 100644 board/micronas/vct/top.c > create mode 100644 board/micronas/vct/u-boot.lds > create mode 100644 board/micronas/vct/vct.c > create mode 100644 board/micronas/vct/vct.h > create mode 100644 board/micronas/vct/vcth/reg_dcgu.h > create mode 100644 board/micronas/vct/vcth/reg_ebi.h > create mode 100644 board/micronas/vct/vcth/reg_fwsram.h > create mode 100644 board/micronas/vct/vcth/reg_gpio.h > create mode 100644 board/micronas/vct/vcth/reg_scc.h > create mode 100644 board/micronas/vct/vcth/reg_usbh.h > create mode 100644 board/micronas/vct/vcth/reg_wdt.h > create mode 100644 board/micronas/vct/vcth2/reg_ebi.h > create mode 100644 board/micronas/vct/vctv/reg_dcgu.h > create mode 100644 board/micronas/vct/vctv/reg_ebi.h > create mode 100644 board/micronas/vct/vctv/reg_gpio.h > create mode 100644 board/micronas/vct/vctv/reg_wdt.h > create mode 100644 include/configs/vct.h Applied, thanks. Best regards, Wolfgang Denk -- 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: w...@denx.de There are certain things men must do to remain men. -- Kirk, "The Ultimate Computer", stardate 4929.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/
[U-Boot] [GIT PULL] MIPS updates
Hi Wolfgang, please pull U-Boot/MIPS repository to pick up the following changes. Thanks in advance, Shinya --- The following changes since commit 8f86a3636ef88427f880610638e80991adc41896: Wolfgang Denk (1): Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx are available in the git repository at: git://git.denx.de/u-boot-mips.git master Stefan Roese (4): MIPS: Add flush_dcache_range() and invalidate_dcache_range() MIPS: Add VCT board series support (Part 1/3) MIPS: Add VCT board series support (Part 2/3) MIPS: Add VCT board series support (Part 3/3) MAINTAINERS |4 + MAKEALL | 12 + Makefile | 35 ++ board/micronas/vct/Makefile | 57 +++ board/micronas/vct/bcu.h | 170 + board/micronas/vct/config.mk | 31 ++ board/micronas/vct/dcgu.c| 258 + board/micronas/vct/dcgu.h| 179 + board/micronas/vct/ebi.c | 48 +++ board/micronas/vct/ebi.h | 95 + board/micronas/vct/ebi_nor_flash.c | 131 +++ board/micronas/vct/ebi_onenand.c | 198 ++ board/micronas/vct/ebi_smc911x.c | 94 + board/micronas/vct/ehci.c| 110 ++ board/micronas/vct/gpio.c| 88 + board/micronas/vct/scc.c | 669 ++ board/micronas/vct/scc.h | 205 +++ board/micronas/vct/smc_eeprom.c | 394 board/micronas/vct/top.c | 289 +++ board/micronas/vct/u-boot.lds| 71 board/micronas/vct/vct.c | 117 ++ board/micronas/vct/vct.h | 104 ++ board/micronas/vct/vcth/reg_dcgu.h | 36 ++ board/micronas/vct/vcth/reg_ebi.h| 242 board/micronas/vct/vcth/reg_fwsram.h | 73 board/micronas/vct/vcth/reg_gpio.h | 32 ++ board/micronas/vct/vcth/reg_scc.h| 102 + board/micronas/vct/vcth/reg_usbh.h | 33 ++ board/micronas/vct/vcth/reg_wdt.h| 24 ++ board/micronas/vct/vcth2/reg_ebi.h | 290 +++ board/micronas/vct/vctv/reg_dcgu.h | 25 ++ board/micronas/vct/vctv/reg_ebi.h| 290 +++ board/micronas/vct/vctv/reg_gpio.h | 32 ++ board/micronas/vct/vctv/reg_wdt.h| 24 ++ cpu/mips/cpu.c | 28 ++ include/common.h |2 + include/configs/vct.h| 340 + 37 files changed, 4932 insertions(+), 0 deletions(-) create mode 100644 board/micronas/vct/Makefile create mode 100644 board/micronas/vct/bcu.h create mode 100644 board/micronas/vct/config.mk create mode 100644 board/micronas/vct/dcgu.c create mode 100644 board/micronas/vct/dcgu.h create mode 100644 board/micronas/vct/ebi.c create mode 100644 board/micronas/vct/ebi.h create mode 100644 board/micronas/vct/ebi_nor_flash.c create mode 100644 board/micronas/vct/ebi_onenand.c create mode 100644 board/micronas/vct/ebi_smc911x.c create mode 100644 board/micronas/vct/ehci.c create mode 100644 board/micronas/vct/gpio.c create mode 100644 board/micronas/vct/scc.c create mode 100644 board/micronas/vct/scc.h create mode 100644 board/micronas/vct/smc_eeprom.c create mode 100644 board/micronas/vct/top.c create mode 100644 board/micronas/vct/u-boot.lds create mode 100644 board/micronas/vct/vct.c create mode 100644 board/micronas/vct/vct.h create mode 100644 board/micronas/vct/vcth/reg_dcgu.h create mode 100644 board/micronas/vct/vcth/reg_ebi.h create mode 100644 board/micronas/vct/vcth/reg_fwsram.h create mode 100644 board/micronas/vct/vcth/reg_gpio.h create mode 100644 board/micronas/vct/vcth/reg_scc.h create mode 100644 board/micronas/vct/vcth/reg_usbh.h create mode 100644 board/micronas/vct/vcth/reg_wdt.h create mode 100644 board/micronas/vct/vcth2/reg_ebi.h create mode 100644 board/micronas/vct/vctv/reg_dcgu.h create mode 100644 board/micronas/vct/vctv/reg_ebi.h create mode 100644 board/micronas/vct/vctv/reg_gpio.h create mode 100644 board/micronas/vct/vctv/reg_wdt.h create mode 100644 include/configs/vct.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [GIT PULL] MIPS updates
Dear Shinya Kuribayashi, In message <4949020a.5020...@ruby.dti.ne.jp> you wrote: > Hi Wolfgang, > > please pull U-Boot/MIPS repository to pick up the following changes. > > Thanks in advance, > > Shinya > > --- > > The following changes since commit aced78d852d0b009e8aaa1445af8cb40861ee549: > Wolfgang Denk (1): > Prepare 2009.01-rc1 > > are available in the git repository at: > > git://git.denx.de/u-boot-mips.git master > > Jean-Christophe PLAGNIOL-VILLARD (3): > MIPS: qemu_mips: move env storage just after u-boot > MIPS: qemu_mips: update doc to use all disk and boot linux kernel > MIPS: qemu_mips: update doc to generate and to use qemu flash, ide file > > doc/README.qemu_mips| 88 > ++- > include/configs/qemu-mips.h |2 +- > 2 files changed, 87 insertions(+), 3 deletions(-) Done, thanks. Best regards, Wolfgang Denk -- 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: w...@denx.de Compassion -- that's the one things no machine ever had. Maybe it's the one thing that keeps men ahead of them. -- McCoy, "The Ultimate Computer", stardate 4731.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] MIPS updates
Hi Wolfgang, please pull U-Boot/MIPS repository to pick up the following changes. Thanks in advance, Shinya --- The following changes since commit aced78d852d0b009e8aaa1445af8cb40861ee549: Wolfgang Denk (1): Prepare 2009.01-rc1 are available in the git repository at: git://git.denx.de/u-boot-mips.git master Jean-Christophe PLAGNIOL-VILLARD (3): MIPS: qemu_mips: move env storage just after u-boot MIPS: qemu_mips: update doc to use all disk and boot linux kernel MIPS: qemu_mips: update doc to generate and to use qemu flash, ide file doc/README.qemu_mips| 88 ++- include/configs/qemu-mips.h |2 +- 2 files changed, 87 insertions(+), 3 deletions(-) diff --git a/doc/README.qemu_mips b/doc/README.qemu_mips index 2fdd2b0..3985264 100644 --- a/doc/README.qemu_mips +++ b/doc/README.qemu_mips @@ -17,19 +17,103 @@ create image: start it: # qemu-system-mips -M mips -pflash flash -monitor null -nographic +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 0x8001 -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 + +# 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 + +7) Copy to ide + +# dd if=uImage bs=512 conv=notrunc seek=63 of=ide + +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) +# 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 +# mkdir /mnt/boot +# cp {initrd.gz,uImage} /mnt/boot/ +# Umount it +# umount /mnt + +9) Set Environment + +setenv rd_start 0x8080 +setenv rd_size 2663940 +setenv kernel BFC38000 +setenv oad_addr 8050 +setenv load_addr2 80F0 +setenv kernel_flash BFC38000 +setenv load_addr_hello 8020 +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 + 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 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 diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h index f028d1a..862 100644 --- a/include/configs/qemu-mips.h +++ b/include/configs/qe
Re: [U-Boot] [GIT PULL] MIPS updates
Dear Shinya Kuribayashi, In message <493fda82.7000...@ruby.dti.ne.jp> you wrote: > > The following changes since commit 2145188bea2df8f2b47a87ec3071b55027e8d0ae: > Ben Warren (1): > Fix compile error in building MBX860T. > > are available in the git repository at: > > git://git.denx.de/u-boot-mips.git master > > Stefan Roese (4): > MIPS: Add onenand_init() to board.c and move nand_init() > MIPS: Add board_early_init_f() to init_sequence > MIPS: Add CONFIG_SKIP_LOWLEVEL_INIT > MIPS: Flush data cache upon relocation > > cpu/mips/start.S | 32 +--- > lib_mips/board.c | 25 - > 2 files changed, 45 insertions(+), 12 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- 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: w...@denx.de Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away. - Antoine de Saint-Exupery ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] MIPS updates
Hi Wolfgang, please pull U-Boot/MIPS repository to pick up the following changes. Thanks in advance, Shinya --- The following changes since commit 2145188bea2df8f2b47a87ec3071b55027e8d0ae: Ben Warren (1): Fix compile error in building MBX860T. are available in the git repository at: git://git.denx.de/u-boot-mips.git master Stefan Roese (4): MIPS: Add onenand_init() to board.c and move nand_init() MIPS: Add board_early_init_f() to init_sequence MIPS: Add CONFIG_SKIP_LOWLEVEL_INIT MIPS: Flush data cache upon relocation cpu/mips/start.S | 32 +--- lib_mips/board.c | 25 - 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/cpu/mips/start.S b/cpu/mips/start.S index 6a22302..57db589 100644 --- a/cpu/mips/start.S +++ b/cpu/mips/start.S @@ -243,9 +243,11 @@ reset: mtc0zero, CP0_COUNT mtc0zero, CP0_COMPARE +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) /* CONFIG0 register */ li t0, CONF_CM_UNCACHED mtc0t0, CP0_CONFIG +#endif /* !CONFIG_SKIP_LOWLEVEL_INIT */ /* Initialize $gp. */ @@ -255,6 +257,7 @@ reset: 1: lw gp, 0(ra) +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) /* Initialize any external memory. */ la t9, lowlevel_init @@ -271,6 +274,7 @@ reset: */ li t0, CONF_CM_CACHABLE_NONCOHERENT mtc0t0, CP0_CONFIG +#endif /* !CONFIG_SKIP_LOWLEVEL_INIT */ /* Set up temporary stack. */ @@ -307,6 +311,7 @@ relocate_code: la t3, in_ram lw t2, -12(t3) /* t2 <-- uboot_end_data*/ movet1, a2 + moves2, a2 /* s2 <-- destination address */ /* * Fix $gp: @@ -316,13 +321,21 @@ relocate_code: movet6, gp sub gp, CONFIG_SYS_MONITOR_BASE add gp, a2 /* gp now adjusted */ - sub t6, gp, t6 /* t6 <-- relocation offset */ + sub s1, gp, t6 /* s1 <-- relocation offset */ /* * t0 = source address * t1 = target address * t2 = source end address */ + + /* +* Save destination address and size for later usage in flush_cache() +*/ + moves0, a1 /* save gd in s0*/ + movea0, t1 /* a0 <-- destination addr */ + sub a1, t2, t0 /* a1 <-- size */ + /* On the purple board we copy the code earlier in a special way * in order to solve flash problems */ @@ -338,9 +351,14 @@ relocate_code: /* If caches were enabled, we would have to flush them here. */ + /* a0 & a1 are already set up for flush_cache(start, size) */ + la t9, flush_cache + jalrt9 + nop + /* Jump to where we've relocated ourselves. */ - addit0, a2, in_ram - _start + addit0, s2, in_ram - _start jr t0 nop @@ -367,7 +385,7 @@ in_ram: 1: lw t1, 0(t4) beqzt1, 2f - add t1, t6 + add t1, s1 sw t1, 0(t4) 2: addit2, 1 @@ -378,8 +396,8 @@ in_ram: */ lw t1, -12(t0) /* t1 <-- uboot_end_data*/ lw t2, -8(t0) /* t2 <-- uboot_end */ - add t1, t6 /* adjust pointers */ - add t2, t6 + add t1, s1 /* adjust pointers */ + add t2, s1 sub t1, 4 1: @@ -387,10 +405,10 @@ in_ram: bltlt1, t2, 1b sw zero, 0(t1) /* delay slot */ - movea0, a1 + movea0, s0 /* a0 <-- gd*/ la t9, board_init_r jr t9 - movea1, a2 /* delay slot */ + movea1, s2 /* delay slot */ .endrelocate_code diff --git a/lib_mips/board.c b/lib_mips/board.c index 9c997f1..dfe6831 100644 --- a/lib_mips/board.c +++ b/lib_mips/board.c @@ -30,6 +30,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -71,6 +72,15 @@ static ulong mem_malloc_brk; */ unsigned long mips_io_port_base = -1; +int __board_early_init_f(void) +{ + /* +* Nothing to do in this dummy implementation +*/ + return 0; +} +int board_early_init_f(void) __attribute__((weak, alias("__board_early_init_f"))); + /* * The Malloc area is immediately below the monitor copy in DRAM */ @@ -168,6 +178,7 @@ static int init_baudrate (void) typedef int (init_fnc_t) (void); init_fnc_t *init_sequence[] = { + board_early_init_f, timer_init, env_init, /* initialize environment */ #ifdef CONFIG_INCA_IP @@ -378,6 +389,1
Re: [U-Boot] [GIT PULL] MIPS updates
Dear Shinya Kuribayashi, In message <[EMAIL PROTECTED]> you wrote: > Hi Wolfgang, > > please pull MIPS repository to pick up the following change: > > --- > > The following changes since commit 628ffd73bcff0c9f3bc5a8eeb2c7455fe9d28a51: > Jean-Christophe PLAGNIOL-VILLARD (1): > device: make device_register() clone the device > > are available in the git repository at: > > git://git.denx.de/u-boot-mips.git master > > Jean-Christophe PLAGNIOL-VILLARD (1): > doc/qemu_mips: add doc howto debug u-boot with gdb Applied, thanks. Best regards, Wolfgang Denk -- 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: [EMAIL PROTECTED] The moral of the story is: "Don't stop to tighten your shoe laces during the Olympics 100m finals". - Kevin Jones in <[EMAIL PROTECTED]> ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [GIT PULL] MIPS updates
Hi Wolfgang, please pull MIPS repository to pick up the following change: --- The following changes since commit 628ffd73bcff0c9f3bc5a8eeb2c7455fe9d28a51: Jean-Christophe PLAGNIOL-VILLARD (1): device: make device_register() clone the device are available in the git repository at: git://git.denx.de/u-boot-mips.git master Jean-Christophe PLAGNIOL-VILLARD (1): doc/qemu_mips: add doc howto debug u-boot with gdb doc/README.qemu_mips | 64 +- 1 files changed, 63 insertions(+), 1 deletions(-) diff --git a/doc/README.qemu_mips b/doc/README.qemu_mips index c9ac3f3..472469f 100644 --- a/doc/README.qemu_mips +++ b/doc/README.qemu_mips @@ -1,7 +1,7 @@ Notes for the Qemu MIPS port -Example usage: +I) Example usage: # ln -s u-boot.bin mips_bios.bin start it: @@ -16,3 +16,65 @@ create image: # dd of=flash bs=1k conv=notrunc if=u-boot.bin start it: # qemu-system-mips -M mips -pflash flash -monitor null -nographic + +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 + +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 + +# mipsel-unknown-linux-gnu-gdb u-boot +GNU gdb 6.6 +Copyright (C) 2006 Free Software Foundation, Inc. +GDB is free software, covered by the GNU General Public License, and you are +welcome to change it and/or distribute copies of it under certain conditions. +Type "show copying" to see the conditions. +There is absolutely no warranty for GDB. Type "show warranty" for details. +This GDB was configured as "--host=i486-linux-gnu --target=mipsel-unknown-linux-gnu"... +(gdb) target remote localhost:1234 +Remote debugging using localhost:1234 +_start () at start.S:64 +64 RVECENT(reset,0)/* U-boot entry point */ +Current language: auto; currently asm +(gdb) b board.c:289 +Breakpoint 1 at 0xbfc00cc8: file board.c, line 289. +(gdb) c +Continuing. + +Breakpoint 1, board_init_f (bootflag=) at board.c:290 +290 relocate_code (addr_sp, id, addr); +Current language: auto; currently c +(gdb) p/x addr +$1 = 0x87fa + +2) Debugging of U-Boot After Relocation + +For debugging U-Boot after relocation we need to know the address to which +U-Boot relocates itself to 0x87fa by default. +And replace the symbol table to this offset. + +(gdb) symbol-file +Discard symbol table from `/private/u-boot-arm/u-boot'? (y or n) y +Error in re-setting breakpoint 1: +No symbol table is loaded. Use the "file" command. +No symbol file now. +(gdb) add-symbol-file u-boot 0x87fa +add symbol table from file "u-boot" at +.text_addr = 0x87fa +(y or n) y +Reading symbols from /private/u-boot-arm/u-boot...done. +Breakpoint 1 at 0x87fa0cc8: file board.c, line 289. +(gdb) c +Continuing. + +Program received signal SIGINT, Interrupt. +0x87fa0de4 in udelay (usec=) at time.c:78 +78 while ((tmo - read_c0_count()) < 0x7fff) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot