Wolfgang Denk | 1 Nov 2006 01:42
Picon
Picon
Favicon

Re: tftpboot question

In message <198592450610311513h50d4598awc0666aac00643c50 <at> mail.gmail.com> you wrote:
>
> I'm trying to use tftpboot to copy linux image into flash starting address
> is 0xff300000, so I defined CFG_DIRECT_FLASH_TFTP. It looks data have been

Why are you doing this? The recommended method is to load the image to
RAM first, and then use "cp" to write it to flash.

> written into flash since there is no any error. However, when I try to boot

Did you use the "iminfo" command after writing the image  tpo  flash?
What does it say?

> linux, it returns gunzip error. If I download the same image using xmodem,
> the kernel just boots fine. Do I need to do anything special for tftp direct
> to flash? If I tftp image into ram(0x800000) then boot, it's just fine too.
> 
> ### main_loop: bootcmd="bootm $loadaddr"
> Hit any key to stop autoboot:  0
> ## Booting image at ff300000 ...
> ## Current stack ends at 0x0F5D0BB8 => set upper limit to 0x00800000
> bd address  = 0x0F5D0FB8
> memstart    = 0x00000000
> memsize     = 0x10000000
> flashstart  = 0xFF000000
> flashsize   = 0x01000000
> flashoffset = 0x00000000
> sramstart   = 0x00000000
> sramsize    = 0x00000000
> immr_base   = 0xE0000000
(Continue reading)

Lei Sun | 1 Nov 2006 03:41
Picon

werid behavour with u-boot

Hi all:
  Actually, my question might not related to u-boot at all , but I am
debugging u-boot on a customized mpc8270 board. By using JTAG, I was
able to load the u-boot code into RAM and single step through some
portion of the u-boot code. I am seeing weird behavour when it run
through the init sequnce. For excample, when I single step into the
get_clk() function, it could go all the way and return succesfully,
but if i set a break point after getclk() function and hit "run" to
enter that function, the CPU hangs!  Same problem happened to other
function as well, for examle, display_options(), vsprintf() etc.  I
can't find the patern what kind of function it could happen to.
  I'd assume it something related to hardware. Our board is a
prototype board, with lots of external wires to fix the bug,
especially , we have external 32 wires comming out of memory connected
to CPU!   I wonder if i could draw this conclustion, has any one had
similar experience, e.g single step is ok, but not continuesly running
the code.

Thanks
lei

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
thien van | 1 Nov 2006 09:01
Picon
Favicon

How to use UBoot for S3CEB2410 board

Hi all,

I have bought a board at http://armkits.com/Product/s3ceb2410.asp and I am trying to use uboot to boot it from SMC card, Here are the steps I did:

[root <at> nvthien u-boot-1.1.5]# make smdk2410_config

Configuring for smdk2410 board...

[root <at> nvthien u-boot-1.1.5]# make CROSS_COMPILE=arm-linux-
...
-Map u-boot.map -o u-boot
arm-linux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec
arm-linux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin

[root <at> nvthien u-boot-1.1.5]# ls -al u-boot*
-rwxr-xr-x  1 root root 584411 Oct 26 14:48 u-boot
-rwxr-xr-x  1 root root  96596 Oct 26 14:48 u-boot.bin
-rw-r--r--  1 root root  79941 Oct 26 14:48 u-boot.map
-rwxr-xr-x  1 root root 289882 Oct 26 14:48 u-boot.srec

[root <at> nvthien u-boot-1.1.5]# 

After that  I use Dnw program to down load u-boot.bin file at 0x30100000, and
download & run at 0x30000000 file NandFlash_WR to write u-boot.bin to SMC:
...
Download&Run is selected.
USB host is connected. Waiting a download.
Now, Downloading [ADDRESS:30000000h,TOTAL:25234]
RECEIVED FILE SIZE:   25234(312.3KB/S,0.1S)
Now, Checksum calculation
Download O.K.
S3C2410 Test Program Ver 0.00 FCLK=200000000
 0:NAND View Badblk 1:NAND View page   2:NAND Program     3:NAND Erase All  
Select the function to test?2
[SMC(K9S1208V0M) NAND Flash writing program]
the data must be downloaded using ICE from 30100000h
Source size:0h~0h
Available target block number: 0~4095
Input target block number:0
Input target size(0x4000*n):96606
source base address(0x3010000x)=0x30100000
target start block number      =0
target size        (0x4000*n)  =0x1795e
............................................................................................................................................................................................

And I reset the board to boot from UBoot but it does not work.????.
Please help me how to use it.

Thanks


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
Stefan Roese | 1 Nov 2006 14:05
Picon
Picon
Favicon

Re: Sector size with CFI driver?

Hi Timur,

On Tuesday 31 October 2006 21:00, Timur Tabi wrote:
> And the 1.1.5 version says:
>
> Bank # 1: CFI compatible FLASH (16 port width with 16 chip width)
> Command set is AMD/Fujitsu standard. Driver is polling DQ6 for status
> checking. Size: 8 MB in 135 Sectors

Hmmm. I have never seen this message in U-Boot and can't find it in the 
current source code (something like "Command set is AMD/Fujitsu standard"). 
Could be that I am missing something here.

Please confirm that you are using the "official" git version of U-Boot and not 
any other repository. I suspect that you have an "updated" CFI driver not 
available in the official U-Boot version or a board specific FLASH driver.

Best regards,
Stefan

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Ronny Nilsson | 1 Nov 2006 14:27
Picon

Re: arm920t


> I don't kown if there is a function in u-boot to change  the bus
> mode. The arm processor can work in sync mode, async mode and fast
> mode. To change in async mode you must write the cp15 register. This
> is useful for board that has slow memory access and it must be done
> by the bootloader.
> Regards Michael
>

Hi
For the AT91RM9200 cpu (which has an arm920t core) this is being done 
in lowlevel_init.S.

/Ronny

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Timur Tabi | 1 Nov 2006 17:34
Favicon

Re: Sector size with CFI driver?

Stefan Roese wrote:

> Hmmm. I have never seen this message in U-Boot and can't find it in the 
> current source code (something like "Command set is AMD/Fujitsu standard"). 
> Could be that I am missing something here.
> 
> Please confirm that you are using the "official" git version of U-Boot and not 
> any other repository. I suspect that you have an "updated" CFI driver not 
> available in the official U-Boot version or a board specific FLASH driver.

That message is from a hacked up version of 1.1.3.  Here's the code that 
produces it:

void flash_print_info (flash_info_t * info)
{
	int i;

	if (info->flash_id != FLASH_MAN_CFI) {
		puts ("missing or unknown FLASH type\n");
		return;
	}

	printf ("CFI compatible FLASH (%d port width with %d chip width)\n",
		(info->portwidth << 3), (info->chipwidth << 3));
	printf ("Command set is ");
	switch (info->vendor) {
	case CFI_CMDSET_INTEL_EXTENDED:
		printf ("Intel/Sharp extended\n");
		break;
	case CFI_CMDSET_AMD_STANDARD:
		printf ("AMD/Fujitsu standard. ");
#ifdef POLLING_AMD_DQ7
		printf ("Driver is polling DQ7 for status checking.\n");
#else
		printf ("Driver is polling DQ6 for status checking.\n");
#endif
		break;

I believe this code was part of the official 1.1.3.

However, looking at our patch for 1.1.3 (I didn't write that code), I see this 
juicy tidbit for flash_get_size:

+
+#ifdef CONFIG_MPC8349ITX
+               for (i = num_erase_regions-1; i >= 0; i--) {    /* top boot */
+#else
                 for (i = 0; i < num_erase_regions; i++) {
+#endif
+

Can someone explain this top boot vs bottom boot thing?

--

-- 
Timur Tabi
Linux Kernel Developer  <at>  Freescale

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Ben Warren | 1 Nov 2006 17:44

Re: Sector size with CFI driver?

On Wed, 2006-11-01 at 10:34 -0600, Timur Tabi wrote:

> 
> Can someone explain this top boot vs bottom boot thing?
> 

There are three common NOR flash chip configurations:

1.	Uniform sector -  all sectors are the same size
2.	Bottom boot - There are several smaller sectors at the beginning of
memory space.  For example, 8 x 8k sectors + 127 x 64k sectors.
3.	Top boot - There are several smaller sectors at the end of memory
space.  For example, 127 x 64k sectors + 8 x 8k sectors.

I hope this makes sense.

regards,
Ben

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Timur Tabi | 1 Nov 2006 17:58
Favicon

Re: Sector size with CFI driver?

Timur Tabi wrote:

> +
> +#ifdef CONFIG_MPC8349ITX
> +               for (i = num_erase_regions-1; i >= 0; i--) {    /* top boot */
> +#else
>                  for (i = 0; i < num_erase_regions; i++) {
> +#endif
> +

Ok, I put the above change into cfi_flash.c, and now it works!  Can someone 
explain to me why?  Does U-Boot not normally support "top boot" flash?  If so, 
is there a better way of doing this?

--

-- 
Timur Tabi
Linux Kernel Developer  <at>  Freescale

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Stefan Roese | 1 Nov 2006 18:02
Picon
Picon
Favicon

Re: Sector size with CFI driver?

On Wednesday 01 November 2006 17:58, Timur Tabi wrote:
> Timur Tabi wrote:
> > +
> > +#ifdef CONFIG_MPC8349ITX
> > +               for (i = num_erase_regions-1; i >= 0; i--) {    /* top
> > boot */ +#else
> >                  for (i = 0; i < num_erase_regions; i++) {
> > +#endif
> > +
>
> Ok, I put the above change into cfi_flash.c, and now it works!  Can someone
> explain to me why?  Does U-Boot not normally support "top boot" flash?  If
> so, is there a better way of doing this?

Seems like your FLASH doesn't really support the CFI "Device Geometry 
Definition". Both versions (top & bottom boot block) most likely report the 
same layout.

Best regards,
Stefan

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Timur Tabi | 1 Nov 2006 18:08
Favicon

Re: Sector size with CFI driver?

Stefan Roese wrote:
> On Wednesday 01 November 2006 17:58, Timur Tabi wrote:
>> Timur Tabi wrote:
>>> +
>>> +#ifdef CONFIG_MPC8349ITX
>>> +               for (i = num_erase_regions-1; i >= 0; i--) {    /* top
>>> boot */ +#else
>>>                  for (i = 0; i < num_erase_regions; i++) {
>>> +#endif
>>> +
>> Ok, I put the above change into cfi_flash.c, and now it works!  Can someone
>> explain to me why?  Does U-Boot not normally support "top boot" flash?  If
>> so, is there a better way of doing this?
> 
> Seems like your FLASH doesn't really support the CFI "Device Geometry 
> Definition". Both versions (top & bottom boot block) most likely report the 
> same layout.

Assuming this is true (and I will try to find out), can you recommend how you 
want me to implement a fix for my board?  Should I do something like

#define CFG_CFI_DEV_GEO_BROKEN

in my board header file, and then do something like:

+#ifdef CFG_CFI_DEV_GEO_BROKEN
+               for (i = num_erase_regions-1; i >= 0; i--) {
+#else
                 for (i = 0; i < num_erase_regions; i++) {
+#endif

This is really ugly, I know, but I need help coming up with a method that you 
guys will accept.

--

-- 
Timur Tabi
Linux Kernel Developer  <at>  Freescale

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

Gmane