All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] {Spam?} skip relocation
@ 2011-01-01 15:31 Marcel
  2011-01-01 22:52 ` Albert ARIBAUD
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel @ 2011-01-01 15:31 UTC (permalink / raw)
  To: u-boot

Hi,

In my previous working version of U-boot I used CONFIG_SKIP_RELOCATION but 
this doesn't seem to work any more.

Any reason why it doesn't work any more ?
Is there another way to skip relocation ?

regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] {Spam?} skip relocation
  2011-01-01 15:31 [U-Boot] {Spam?} skip relocation Marcel
@ 2011-01-01 22:52 ` Albert ARIBAUD
  2011-01-02  9:07   ` Marcel
  0 siblings, 1 reply; 14+ messages in thread
From: Albert ARIBAUD @ 2011-01-01 22:52 UTC (permalink / raw)
  To: u-boot

Le 01/01/2011 16:31, Marcel a ?crit :
> Hi,
>
> In my previous working version of U-boot I used CONFIG_SKIP_RELOCATION but
> this doesn't seem to work any more.
>
> Any reason why it doesn't work any more ?
> Is there another way to skip relocation ?

It actually has no sense any more. The current code skips the relocation 
if, and only if, U-boot is already running at its final destination.

Trying to run U-boot without relocating and without being at the 
link-time address would not work.

> regards,
> Marcel

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] {Spam?} skip relocation
  2011-01-01 22:52 ` Albert ARIBAUD
@ 2011-01-02  9:07   ` Marcel
  2011-01-02 18:35     ` Marcel
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel @ 2011-01-02  9:07 UTC (permalink / raw)
  To: u-boot

On Saturday, January 01, 2011 11:52:21 pm Albert ARIBAUD wrote:
> Le 01/01/2011 16:31, Marcel a ?crit :
> > Hi,
> > 
> > In my previous working version of U-boot I used CONFIG_SKIP_RELOCATION
> > but this doesn't seem to work any more.
> > 
> > Any reason why it doesn't work any more ?
> > Is there another way to skip relocation ?
> 
> It actually has no sense any more. The current code skips the relocation
> if, and only if, U-boot is already running at its final destination.
> 
> Trying to run U-boot without relocating and without being at the
> link-time address would not work.

OK, that does make sense. 

In my case u-boot is in NOR.
What do I need to boot from NOR ?

Best regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] {Spam?} skip relocation
  2011-01-02  9:07   ` Marcel
@ 2011-01-02 18:35     ` Marcel
  2011-01-02 19:00       ` Marcel
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel @ 2011-01-02 18:35 UTC (permalink / raw)
  To: u-boot

On Sunday, January 02, 2011 10:07:44 am Marcel wrote:
> On Saturday, January 01, 2011 11:52:21 pm Albert ARIBAUD wrote:
> > Le 01/01/2011 16:31, Marcel a ?crit :
> > > Hi,
> > > 
> > > In my previous working version of U-boot I used CONFIG_SKIP_RELOCATION
> > > but this doesn't seem to work any more.
> > > 
> > > Any reason why it doesn't work any more ?
> > > Is there another way to skip relocation ?
> > 
> > It actually has no sense any more. The current code skips the relocation
> > if, and only if, U-boot is already running at its final destination.
> > 
> > Trying to run U-boot without relocating and without being at the
> > link-time address would not work.
> 
> OK, that does make sense.
> 
> In my case u-boot is in NOR.
> What do I need to boot from NOR ?

Is there any example that boots from NOR ?

Best regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] {Spam?} skip relocation
  2011-01-02 18:35     ` Marcel
@ 2011-01-02 19:00       ` Marcel
  2011-01-02 19:47         ` Marcel
  2011-01-02 20:31         ` [U-Boot] " Reinhard Meyer
  0 siblings, 2 replies; 14+ messages in thread
From: Marcel @ 2011-01-02 19:00 UTC (permalink / raw)
  To: u-boot

On Sunday, January 02, 2011 07:35:50 pm Marcel wrote:
> On Sunday, January 02, 2011 10:07:44 am Marcel wrote:
> > On Saturday, January 01, 2011 11:52:21 pm Albert ARIBAUD wrote:
> > > Le 01/01/2011 16:31, Marcel a ?crit :
> > > > Hi,
> > > > 
> > > > In my previous working version of U-boot I used
> > > > CONFIG_SKIP_RELOCATION but this doesn't seem to work any more.
> > > > 
> > > > Any reason why it doesn't work any more ?
> > > > Is there another way to skip relocation ?
> > > 
> > > It actually has no sense any more. The current code skips the
> > > relocation if, and only if, U-boot is already running at its final
> > > destination.
> > > 
> > > Trying to run U-boot without relocating and without being at the
> > > link-time address would not work.
> > 
> > OK, that does make sense.
> > 
> > In my case u-boot is in NOR.
> > What do I need to boot from NOR ?
> 
> Is there any example that boots from NOR ?

Below is the config I used about 2-3 month ago. Perhaps anyone has a hint how 
to make it work with the current relocation code ?

#define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core */
#define CONFIG_ICNOVA_ARM9	1	/* It's an  ICnova SAM9G45 OEM boardR */
#define CONFIG_AT91SAM9G45	1	/* It's an Atmel AT91SAM9G45 SoC */
#define CONFIG_AT91_LEGACY      1       /* needed for some defines */
#define CONFIG_ARCH_CPU_INIT
#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/

/* USB Host */
#define CONFIG_USB_ATMEL		1
//#define CONFIG_USB_EHCI			1
#define CONFIG_USB_OHCI_NEW		1
#define CONFIG_SYS_USB_OHCI_CPU_INIT	1
#define CONFIG_SYS_USB_OHCI_REGS_BASE	0x00700000 
#define CONFIG_SYS_USB_OHCI_SLOT_NAME	"at91sam9g45"
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	1
#define CONFIG_DOS_PARTITION		1
#define CONFIG_USB_STORAGE		1

/* USB gadget support for Ethernet over USB */
#define CONFIG_USB_GADGET_ATMEL_USBA  1
#define CONFIG_ARCH_AT91	      1  
#define CONFIG_USB_GADGET	      1
#define CONFIG_USB_ETHER	      1
#define CONFIG_USBNET_MANUFACTURER      "Atmel AT91SAM9G45"
#define CONFIG_USBNET_DEV_ADDR		"8e:28:0f:fa:3c:39"
#define CONFIG_USBNET_HOST_ADDR		"0a:fa:63:8b:e8:0a"
#define CONFIG_USB_CDC_VENDOR_ID        0x0525
#define CONFIG_USB_CDC_PRODUCT_ID       0xa4a1
#define CONFIG_USB_RNDIS_VENDOR_ID      0x0525
#define CONFIG_USB_RNDIS_PRODUCT_ID     0xa4a2


#include <asm/arch/memory-map.h>
/* ARM asynchronous clock */
#define CONFIG_SYS_AT91_MAIN_CLOCK	12000000 /* from 12 MHz crystal */
#define CONFIG_SYS_HZ			1000

#define CONFIG_ARCH_CPU_INIT

#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs */
#define CONFIG_SETUP_MEMORY_TAGS 1
#define CONFIG_INITRD_TAG	1

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

/*
 * Hardware drivers
 */
#define CONFIG_AT91_GPIO	1
#define CONFIG_ATMEL_USART	1
#undef CONFIG_USART0
#undef CONFIG_USART1
#undef CONFIG_USART2
#define CONFIG_USART3		1	/* USART 3 is DBGU */

#define CONFIG_SYS_USE_NANDFLASH	1

/* LED */
#define CONFIG_AT91_LED
#define	CONFIG_RED_LED		AT91_PIN_PD31	/* this is the user1 led */
#define	CONFIG_GREEN_LED	AT91_PIN_PD0	/* this is the user2 led */

#define CONFIG_BOOTDELAY	3

/*
 * Command line configuration.
 */
#include <config_cmd_default.h>
#define CONFIG_CMD_ASKENV
#undef CONFIG_CMD_FPGA
#undef CONFIG_CMD_IMLS

#define CONFIG_CMD_NAND		1
#define CONFIG_CMD_USB		1

/* SDRAM */
#define CONFIG_NR_DRAM_BANKS		1
#define PHYS_SDRAM			0x70000000
#define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
#define CONFIG_SYS_GBL_DATA_SIZE	128
#define INTERNAL_SRAM_BASE		0x00300000
#define INTERNAL_SRAM_SIZE		0x00010000
#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + 
PHYS_SDRAM_SIZE)
#define CONFIG_SYS_INTRAM_BASE		INTERNAL_SRAM_BASE
#define CONFIG_SYS_INTRAM_SIZE		INTERNAL_SRAM_SIZE
#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INTRAM_BASE + 
CONFIG_SYS_INTRAM_SIZE)
#define CONFIG_SYS_MALLOC_LEN		(256*1024)
#define CONFIG_SYS_DMA_ALLOC_LEN	(16384)
/* Allow 4MB for the kernel run-time image */
#define CONFIG_SYS_LOAD_ADDR			(PHYS_SDRAM + 0x00400000)
#define CONFIG_SYS_BOOTPARAMS_LEN		(16 * 1024)

/* NAND flash */
#define CONFIG_CMD_MTDPARTS             1
#define CONFIG_MTD_DEVICE		1
#define CONFIG_NAND_MAX_CHIPS		1
//#define CONFIG_NAND_ATMEL
#define CONFIG_SYS_MAX_NAND_DEVICE	1
#define CONFIG_SYS_NAND_BASE		0x40000000
#define CONFIG_SYS_NAND_DBW_8		1
/* our ALE is AD21 */
#define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
/* our CLE is AD22 */
#define CONFIG_SYS_NAND_MASK_CLE	(1 << 22)
#define CONFIG_SYS_NAND_ENABLE_PIN	AT91_PIO_PORTC, 8
#define CONFIG_SYS_NAND_READY_PIN	AT91_PIO_PORTD, 11


/* Ethernet */
#define CONFIG_MACB			1
#define CONFIG_RMII			1
#define CONFIG_NET_MULTI		1
#define CONFIG_NET_RETRY_COUNT		20
#define CONFIG_RESET_PHY_R		1
#define CONFIG_NET_DO_NOT_TRY_ANOTHER	1
#define CONFIG_OVERWRITE_ETHADDR_ONCE	1
#define CONFIG_CMD_DHCP                 1 
#define CONFIG_CMD_PING		        1
#define CONFIG_MACB_SEARCH_PHY          1
/*
 * BOOTP options
 */
#define CONFIG_BOOTP_BOOTFILESIZE	1
#define CONFIG_BOOTP_BOOTPATH		1
#define CONFIG_BOOTP_GATEWAY		1
#define CONFIG_BOOTP_HOSTNAME		1
#define CONFIG_BOOTP_SUBNETMASK

/* NOR flash */
#define CONFIG_CMD_JFFS2                1
#define CONFIG_SYS_FLASH_SIZE		0x00100000
#define CONFIG_SYS_FLASH_SECT		8
#define CONFIG_SYS_FLASH_CFI			1
#define CONFIG_FLASH_CFI_DRIVER			1
#define PHYS_FLASH_1				0x10000000
#define CONFIG_SYS_FLASH_BASE			PHYS_FLASH_1
#define CONFIG_SYS_MAX_FLASH_SECT		8
#define CONFIG_SYS_MAX_FLASH_BANKS		1

#define CONFIG_SYS_MONITOR_SEC	1:0-7
#define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_FLASH_BASE
#define CONFIG_SYS_MONITOR_LEN	(256 << 10)
#define CONFIG_ENV_IS_IN_FLASH	1
#define CONFIG_ENV_SIZE		0x20000
#define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + 0x000E0000)

#define MTDIDS_DEFAULT		"nand0=nand.0"
#define MTDPARTS_DEFAULT        "mtdparts=nand.0:2M(kernel),16M(root),-(Data)"
#undef CONFIG_BOOTARGS
#undef CONFIG_BOOTCOMMAND

#define CONFIG_BOOTARGS		"root=1F01 rootfstype=jffs2"
#define CONFIG_BOOTCOMMAND	\
	"mtdparts default; nand read 0x71000000 nand0,0; bootm 0x71000000"

#define CONFIG_BAUDRATE			115200
#define CONFIG_SYS_BAUDRATE_TABLE	{115200 , 19200, 38400, 57600, 9600  }

#define CONFIG_SYS_PROMPT		"Sam9> "
#define CONFIG_SYS_CBSIZE		256
#define CONFIG_SYS_MAXARGS		16
#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + 
sizeof(CONFIG_SYS_PROMPT) + 16)
#define CONFIG_SYS_LONGHELP		1
#define CONFIG_CMDLINE_EDITING		1
#define CONFIG_AUTO_COMPLETE		1
#define CONFIG_SYS_HUSH_PARSER
#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "

/*
 * Size of malloc() pool
 */
#define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data */

#define CONFIG_STACKSIZE		(16*2048)	/* regular stack */

#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
#endif

#endif

Best regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] {Spam?} skip relocation
  2011-01-02 19:00       ` Marcel
@ 2011-01-02 19:47         ` Marcel
  2011-01-02 20:31         ` [U-Boot] " Reinhard Meyer
  1 sibling, 0 replies; 14+ messages in thread
From: Marcel @ 2011-01-02 19:47 UTC (permalink / raw)
  To: u-boot

On Sunday, January 02, 2011 08:00:38 pm Marcel wrote:
> On Sunday, January 02, 2011 07:35:50 pm Marcel wrote:
> > On Sunday, January 02, 2011 10:07:44 am Marcel wrote:
> > > On Saturday, January 01, 2011 11:52:21 pm Albert ARIBAUD wrote:
> > > > Le 01/01/2011 16:31, Marcel a ?crit :
> > > > > Hi,
> > > > > 
> > > > > In my previous working version of U-boot I used
> > > > > CONFIG_SKIP_RELOCATION but this doesn't seem to work any more.
> > > > > 
> > > > > Any reason why it doesn't work any more ?
> > > > > Is there another way to skip relocation ?
> > > > 
> > > > It actually has no sense any more. The current code skips the
> > > > relocation if, and only if, U-boot is already running at its final
> > > > destination.
> > > > 
> > > > Trying to run U-boot without relocating and without being at the
> > > > link-time address would not work.
> > > 
> > > OK, that does make sense.
> > > 
> > > In my case u-boot is in NOR.
> > > What do I need to boot from NOR ?
> > 
> > Is there any example that boots from NOR ?
> 
> Below is the config I used about 2-3 month ago. Perhaps anyone has a hint
> how to make it work with the current relocation code ?
> 
> #define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core */
> #define CONFIG_ICNOVA_ARM9	1	/* It's an  ICnova SAM9G45 OEM boardR */
> #define CONFIG_AT91SAM9G45	1	/* It's an Atmel AT91SAM9G45 SoC */
> #define CONFIG_AT91_LEGACY      1       /* needed for some defines */
> #define CONFIG_ARCH_CPU_INIT
> #undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
> 
> /* USB Host */
> #define CONFIG_USB_ATMEL		1
> //#define CONFIG_USB_EHCI			1
> #define CONFIG_USB_OHCI_NEW		1
> #define CONFIG_SYS_USB_OHCI_CPU_INIT	1
> #define CONFIG_SYS_USB_OHCI_REGS_BASE	0x00700000
> #define CONFIG_SYS_USB_OHCI_SLOT_NAME	"at91sam9g45"
> #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	1
> #define CONFIG_DOS_PARTITION		1
> #define CONFIG_USB_STORAGE		1
> 
> /* USB gadget support for Ethernet over USB */
> #define CONFIG_USB_GADGET_ATMEL_USBA  1
> #define CONFIG_ARCH_AT91	      1
> #define CONFIG_USB_GADGET	      1
> #define CONFIG_USB_ETHER	      1
> #define CONFIG_USBNET_MANUFACTURER      "Atmel AT91SAM9G45"
> #define CONFIG_USBNET_DEV_ADDR		"8e:28:0f:fa:3c:39"
> #define CONFIG_USBNET_HOST_ADDR		"0a:fa:63:8b:e8:0a"
> #define CONFIG_USB_CDC_VENDOR_ID        0x0525
> #define CONFIG_USB_CDC_PRODUCT_ID       0xa4a1
> #define CONFIG_USB_RNDIS_VENDOR_ID      0x0525
> #define CONFIG_USB_RNDIS_PRODUCT_ID     0xa4a2
> 
> 
> #include <asm/arch/memory-map.h>
> /* ARM asynchronous clock */
> #define CONFIG_SYS_AT91_MAIN_CLOCK	12000000 /* from 12 MHz crystal */
> #define CONFIG_SYS_HZ			1000
> 
> #define CONFIG_ARCH_CPU_INIT
> 
> #define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs */
> #define CONFIG_SETUP_MEMORY_TAGS 1
> #define CONFIG_INITRD_TAG	1
> 
> #define CONFIG_SKIP_LOWLEVEL_INIT
> #define CONFIG_SKIP_RELOCATE_UBOOT
> 
> /*
>  * Hardware drivers
>  */
> #define CONFIG_AT91_GPIO	1
> #define CONFIG_ATMEL_USART	1
> #undef CONFIG_USART0
> #undef CONFIG_USART1
> #undef CONFIG_USART2
> #define CONFIG_USART3		1	/* USART 3 is DBGU */
> 
> #define CONFIG_SYS_USE_NANDFLASH	1
> 
> /* LED */
> #define CONFIG_AT91_LED
> #define	CONFIG_RED_LED		AT91_PIN_PD31	/* this is the user1 led */
> #define	CONFIG_GREEN_LED	AT91_PIN_PD0	/* this is the user2 led */
> 
> #define CONFIG_BOOTDELAY	3
> 
> /*
>  * Command line configuration.
>  */
> #include <config_cmd_default.h>
> #define CONFIG_CMD_ASKENV
> #undef CONFIG_CMD_FPGA
> #undef CONFIG_CMD_IMLS
> 
> #define CONFIG_CMD_NAND		1
> #define CONFIG_CMD_USB		1
> 
> /* SDRAM */
> #define CONFIG_NR_DRAM_BANKS		1
> #define PHYS_SDRAM			0x70000000
> #define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
> #define CONFIG_SYS_GBL_DATA_SIZE	128
> #define INTERNAL_SRAM_BASE		0x00300000
> #define INTERNAL_SRAM_SIZE		0x00010000
> #define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
> #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START +
> PHYS_SDRAM_SIZE)
> #define CONFIG_SYS_INTRAM_BASE		INTERNAL_SRAM_BASE
> #define CONFIG_SYS_INTRAM_SIZE		INTERNAL_SRAM_SIZE
> #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
> #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INTRAM_BASE +
> CONFIG_SYS_INTRAM_SIZE)
> #define CONFIG_SYS_MALLOC_LEN		(256*1024)
> #define CONFIG_SYS_DMA_ALLOC_LEN	(16384)
> /* Allow 4MB for the kernel run-time image */
> #define CONFIG_SYS_LOAD_ADDR			(PHYS_SDRAM + 0x00400000)
> #define CONFIG_SYS_BOOTPARAMS_LEN		(16 * 1024)
> 
> /* NAND flash */
> #define CONFIG_CMD_MTDPARTS             1
> #define CONFIG_MTD_DEVICE		1
> #define CONFIG_NAND_MAX_CHIPS		1
> //#define CONFIG_NAND_ATMEL
> #define CONFIG_SYS_MAX_NAND_DEVICE	1
> #define CONFIG_SYS_NAND_BASE		0x40000000
> #define CONFIG_SYS_NAND_DBW_8		1
> /* our ALE is AD21 */
> #define CONFIG_SYS_NAND_MASK_ALE	(1 << 21)
> /* our CLE is AD22 */
> #define CONFIG_SYS_NAND_MASK_CLE	(1 << 22)
> #define CONFIG_SYS_NAND_ENABLE_PIN	AT91_PIO_PORTC, 8
> #define CONFIG_SYS_NAND_READY_PIN	AT91_PIO_PORTD, 11
> 
> 
> /* Ethernet */
> #define CONFIG_MACB			1
> #define CONFIG_RMII			1
> #define CONFIG_NET_MULTI		1
> #define CONFIG_NET_RETRY_COUNT		20
> #define CONFIG_RESET_PHY_R		1
> #define CONFIG_NET_DO_NOT_TRY_ANOTHER	1
> #define CONFIG_OVERWRITE_ETHADDR_ONCE	1
> #define CONFIG_CMD_DHCP                 1
> #define CONFIG_CMD_PING		        1
> #define CONFIG_MACB_SEARCH_PHY          1
> /*
>  * BOOTP options
>  */
> #define CONFIG_BOOTP_BOOTFILESIZE	1
> #define CONFIG_BOOTP_BOOTPATH		1
> #define CONFIG_BOOTP_GATEWAY		1
> #define CONFIG_BOOTP_HOSTNAME		1
> #define CONFIG_BOOTP_SUBNETMASK
> 
> /* NOR flash */
> #define CONFIG_CMD_JFFS2                1
> #define CONFIG_SYS_FLASH_SIZE		0x00100000
> #define CONFIG_SYS_FLASH_SECT		8
> #define CONFIG_SYS_FLASH_CFI			1
> #define CONFIG_FLASH_CFI_DRIVER			1
> #define PHYS_FLASH_1				0x10000000
> #define CONFIG_SYS_FLASH_BASE			PHYS_FLASH_1
> #define CONFIG_SYS_MAX_FLASH_SECT		8
> #define CONFIG_SYS_MAX_FLASH_BANKS		1
> 
> #define CONFIG_SYS_MONITOR_SEC	1:0-7
> #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_FLASH_BASE
> #define CONFIG_SYS_MONITOR_LEN	(256 << 10)
> #define CONFIG_ENV_IS_IN_FLASH	1
> #define CONFIG_ENV_SIZE		0x20000
> #define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + 0x000E0000)
> 
> #define MTDIDS_DEFAULT		"nand0=nand.0"
> #define MTDPARTS_DEFAULT       
> "mtdparts=nand.0:2M(kernel),16M(root),-(Data)" #undef CONFIG_BOOTARGS
> #undef CONFIG_BOOTCOMMAND
> 
> #define CONFIG_BOOTARGS		"root=1F01 rootfstype=jffs2"
> #define CONFIG_BOOTCOMMAND	\
> 	"mtdparts default; nand read 0x71000000 nand0,0; bootm 0x71000000"
> 
> #define CONFIG_BAUDRATE			115200
> #define CONFIG_SYS_BAUDRATE_TABLE	{115200 , 19200, 38400, 57600, 9600  }
> 
> #define CONFIG_SYS_PROMPT		"Sam9> "
> #define CONFIG_SYS_CBSIZE		256
> #define CONFIG_SYS_MAXARGS		16
> #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE +
> sizeof(CONFIG_SYS_PROMPT) + 16)
> #define CONFIG_SYS_LONGHELP		1
> #define CONFIG_CMDLINE_EDITING		1
> #define CONFIG_AUTO_COMPLETE		1
> #define CONFIG_SYS_HUSH_PARSER
> #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
> 
> /*
>  * Size of malloc() pool
>  */
> #define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data */
> 
> #define CONFIG_STACKSIZE		(16*2048)	/* regular stack */
> 
> #ifdef CONFIG_USE_IRQ
> #error CONFIG_USE_IRQ not supported
> #endif
> 
> #endif


Forgot to mention a few items :

I flash the NOR at address 0x10020000
TEXT_BASE is 0x10020000

I'm about to give up on this code and move back to older code of 2-3 months 
ago where things worked well. 

My feeling is that I miss something very simple, but I'm looking for it for 
days now and will give up on it by tomorrow and move back to old u-boot code 
of 2-3 months ago just to continue what I really want to get done (making USB 
device work).

Best regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-02 19:00       ` Marcel
  2011-01-02 19:47         ` Marcel
@ 2011-01-02 20:31         ` Reinhard Meyer
  2011-01-02 20:54           ` Marcel
  1 sibling, 1 reply; 14+ messages in thread
From: Reinhard Meyer @ 2011-01-02 20:31 UTC (permalink / raw)
  To: u-boot

Dear Marcel,
>> Is there any example that boots from NOR ?

looking at the defines below, you are not really booting u-boot from NOR...

> #define CONFIG_SKIP_LOWLEVEL_INIT
If you do that, you must have an initial boot code before u-boot. See below...

> #define CONFIG_SKIP_RELOCATE_UBOOT
Not used anymore.

> /* SDRAM */
> #define CONFIG_NR_DRAM_BANKS		1
> #define PHYS_SDRAM			0x70000000
> #define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
Those defines have had their names changed.

> #define CONFIG_SYS_GBL_DATA_SIZE	128
This constant is wrong, use the auto-generated value.

> /*
>   * Size of malloc() pool
>   */
> #define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data */
This constant is wrong, use the auto-generated value.

 > Forgot to mention a few items :
 >
 > I flash the NOR at address 0x10020000
 > TEXT_BASE is 0x10020000

That really implies you have another boot program running before u-boot.
Proably AT91 bootstrap? Is it configured to jumo to 0x1002000, or does it copy
u-boot to some SDRAM address and jumps there?

Have a look at the current implementation for top9000 in u-boot-arm/master
and compare your files to it. Any differences to your code that are not board
and/or SoC specific probably have to be fixed in your board code or you should
be able to reason why it must be different for your board.

Best Regards,
Reinhard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-02 20:31         ` [U-Boot] " Reinhard Meyer
@ 2011-01-02 20:54           ` Marcel
  2011-01-02 21:08             ` Reinhard Meyer
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel @ 2011-01-02 20:54 UTC (permalink / raw)
  To: u-boot

Dear Reinhard,

> Dear Marcel,
> 
> >> Is there any example that boots from NOR ?
> 
> looking at the defines below, you are not really booting u-boot from NOR...
> 
> > #define CONFIG_SKIP_LOWLEVEL_INIT
> 
> If you do that, you must have an initial boot code before u-boot. See
> below...
> 
> > #define CONFIG_SKIP_RELOCATE_UBOOT
> 
> Not used anymore.
> 
> > /* SDRAM */
> > #define CONFIG_NR_DRAM_BANKS		1
> > #define PHYS_SDRAM			0x70000000
> > #define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
> 
> Those defines have had their names changed.

These I have changed already. I think they are fine.
 
> > #define CONFIG_SYS_GBL_DATA_SIZE	128
> 
> This constant is wrong, use the auto-generated value.

OK

> > /*
> > 
> >   * Size of malloc() pool
> >   */
> > 
> > #define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data */
> 
> This constant is wrong, use the auto-generated value.

OK

>  > Forgot to mention a few items :
>  > 
>  > I flash the NOR at address 0x10020000
>  > TEXT_BASE is 0x10020000
> 
> That really implies you have another boot program running before u-boot.
> Proably AT91 bootstrap? Is it configured to jumo to 0x1002000, or does it
> copy u-boot to some SDRAM address and jumps there?

Yes I run AT91 bootstrap. Is there a way to skip this ?

That's a good question if at91bootstrap jumps to the right address. How can I 
tell ? (maybe I find out myself, at least your question got me thinking ! )
Let's say it does copy u-boot to SDRAM, do I need to set that address as 
TEXT_BASE ? 

I tried setting TEXT_BASE to 0x10020000 or 0x73f00000
If I use another address, AT91bootstrap doesn't do anything, but at both of 
these addresses it behaves the same.

> Have a look at the current implementation for top9000 in u-boot-arm/master
> and compare your files to it. Any differences to your code that are not
> board and/or SoC specific probably have to be fixed in your board code or
> you should be able to reason why it must be different for your board.

Thanks a lot for your reply. I have a few new things to try and read 
(bootstrap)

,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-02 20:54           ` Marcel
@ 2011-01-02 21:08             ` Reinhard Meyer
  2011-01-03 17:57               ` Marcel
  2011-01-03 18:57               ` Marcel
  0 siblings, 2 replies; 14+ messages in thread
From: Reinhard Meyer @ 2011-01-02 21:08 UTC (permalink / raw)
  To: u-boot

Dear Marcel,
> Dear Reinhard,
>
>> Dear Marcel,
>>
>>>> Is there any example that boots from NOR ?
>>
>> looking at the defines below, you are not really booting u-boot from NOR...
>>
>>> #define CONFIG_SKIP_LOWLEVEL_INIT
>>
>> If you do that, you must have an initial boot code before u-boot. See
>> below...
>>
>>> #define CONFIG_SKIP_RELOCATE_UBOOT
>>
>> Not used anymore.
>>
>>> /* SDRAM */
>>> #define CONFIG_NR_DRAM_BANKS		1
>>> #define PHYS_SDRAM			0x70000000
>>> #define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
>>
>> Those defines have had their names changed.
>
> These I have changed already. I think they are fine.
>
>>> #define CONFIG_SYS_GBL_DATA_SIZE	128
>>
>> This constant is wrong, use the auto-generated value.
>
> OK
>
>>> /*
>>>
>>>    * Size of malloc() pool
>>>    */
>>>
>>> #define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data */
>>
>> This constant is wrong, use the auto-generated value.
>
> OK
>
>>   >  Forgot to mention a few items :
>>   >
>>   >  I flash the NOR at address 0x10020000
>>   >  TEXT_BASE is 0x10020000
>>
>> That really implies you have another boot program running before u-boot.
>> Proably AT91 bootstrap? Is it configured to jumo to 0x1002000, or does it
>> copy u-boot to some SDRAM address and jumps there?
>
> Yes I run AT91 bootstrap. Is there a way to skip this ?

Sure, if you put an u-boot *with low level init* at the begin of NOR and
wire BMS to start from CS0 NOR.

However I am not sure a functional low level init (in u-bbot) exists (yet)
for your board. Even with NOR it is customary to use at91bootstrap which does
the hardware including SDRAM init.

If you touch at91bootstrap, configure it such that it either loads u-boot to
start of SDRAM and jumps there, or directly jumps to the address in NOR where
u-boot is stored. Make sure CONFIG_SYS_TEXT_BASE is correct!

>
> That's a good question if at91bootstrap jumps to the right address. How can I
> tell ? (maybe I find out myself, at least your question got me thinking ! )
> Let's say it does copy u-boot to SDRAM, do I need to set that address as
> TEXT_BASE ?

Exactly. CONFIG_SYS_TEXT_BASE must be the address where u-boot is running before relocation.
If that address is different, relocation will fail.

>
> I tried setting TEXT_BASE to 0x10020000 or 0x73f00000
> If I use another address, AT91bootstrap doesn't do anything, but at both of
> these addresses it behaves the same.

You should have the source of your at91 bootstrap. Without source its near
impossible to tell how it is configured.

>> Have a look at the current implementation for top9000 in u-boot-arm/master
>> and compare your files to it. Any differences to your code that are not
>> board and/or SoC specific probably have to be fixed in your board code or
>> you should be able to reason why it must be different for your board.
>
> Thanks a lot for your reply. I have a few new things to try and read
> (bootstrap)

Reinhard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-02 21:08             ` Reinhard Meyer
@ 2011-01-03 17:57               ` Marcel
  2011-01-03 18:57               ` Marcel
  1 sibling, 0 replies; 14+ messages in thread
From: Marcel @ 2011-01-03 17:57 UTC (permalink / raw)
  To: u-boot

On Sunday, January 02, 2011 10:08:59 pm Reinhard Meyer wrote:
> Dear Marcel,
> 
> > Dear Reinhard,
> > 
> >> Dear Marcel,
> >> 
> >>>> Is there any example that boots from NOR ?
> >> 
> >> looking at the defines below, you are not really booting u-boot from
> >> NOR...
> >> 
> >>> #define CONFIG_SKIP_LOWLEVEL_INIT
> >> 
> >> If you do that, you must have an initial boot code before u-boot. See
> >> below...
> >> 
> >>> #define CONFIG_SKIP_RELOCATE_UBOOT
> >> 
> >> Not used anymore.
> >> 
> >>> /* SDRAM */
> >>> #define CONFIG_NR_DRAM_BANKS		1
> >>> #define PHYS_SDRAM			0x70000000
> >>> #define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
> >> 
> >> Those defines have had their names changed.
> > 
> > These I have changed already. I think they are fine.
> > 
> >>> #define CONFIG_SYS_GBL_DATA_SIZE	128
> >> 
> >> This constant is wrong, use the auto-generated value.
> > 
> > OK
> > 
> >>> /*
> >>> 
> >>>    * Size of malloc() pool
> >>>    */
> >>> 
> >>> #define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data */
> >> 
> >> This constant is wrong, use the auto-generated value.
> > 
> > OK
> > 
> >>   >  Forgot to mention a few items :
> >>   >  
> >>   >  I flash the NOR at address 0x10020000
> >>   >  TEXT_BASE is 0x10020000
> >> 
> >> That really implies you have another boot program running before u-boot.
> >> Proably AT91 bootstrap? Is it configured to jumo to 0x1002000, or does
> >> it copy u-boot to some SDRAM address and jumps there?
> > 
> > Yes I run AT91 bootstrap. Is there a way to skip this ?
> 
> Sure, if you put an u-boot *with low level init* at the begin of NOR and
> wire BMS to start from CS0 NOR.
> 
> However I am not sure a functional low level init (in u-bbot) exists (yet)
> for your board. Even with NOR it is customary to use at91bootstrap which
> does the hardware including SDRAM init.
> 
> If you touch at91bootstrap, configure it such that it either loads u-boot
> to start of SDRAM and jumps there, or directly jumps to the address in NOR
> where u-boot is stored. Make sure CONFIG_SYS_TEXT_BASE is correct!
> 
> > That's a good question if at91bootstrap jumps to the right address. How
> > can I tell ? (maybe I find out myself, at least your question got me
> > thinking ! ) Let's say it does copy u-boot to SDRAM, do I need to set
> > that address as TEXT_BASE ?
> 
> Exactly. CONFIG_SYS_TEXT_BASE must be the address where u-boot is running
> before relocation. If that address is different, relocation will fail.
> 
> > I tried setting TEXT_BASE to 0x10020000 or 0x73f00000
> > If I use another address, AT91bootstrap doesn't do anything, but at both
> > of these addresses it behaves the same.
> 
> You should have the source of your at91 bootstrap. Without source its near
> impossible to tell how it is configured.
> 
> >> Have a look at the current implementation for top9000 in
> >> u-boot-arm/master and compare your files to it. Any differences to your
> >> code that are not board and/or SoC specific probably have to be fixed
> >> in your board code or you should be able to reason why it must be
> >> different for your board.

I have the AT91bootstrap code and compiled it also once a couple of months 
ago. I will first start form there and see what AT91bootstrap is really doing 
on my board. 
I guess I know enough for now to keep me busy for while. I'll report back f I 
find any issue or made it work.

Thanks again for your reply,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-02 21:08             ` Reinhard Meyer
  2011-01-03 17:57               ` Marcel
@ 2011-01-03 18:57               ` Marcel
  2011-01-03 19:41                 ` Marcel
  1 sibling, 1 reply; 14+ messages in thread
From: Marcel @ 2011-01-03 18:57 UTC (permalink / raw)
  To: u-boot

On Sunday, January 02, 2011 10:08:59 pm Reinhard Meyer wrote:
> Dear Marcel,
> 
> > Dear Reinhard,
> > 
> >> Dear Marcel,
> >> 
> >>>> Is there any example that boots from NOR ?
> >> 
> >> looking at the defines below, you are not really booting u-boot from
> >> NOR...
> >> 
> >>> #define CONFIG_SKIP_LOWLEVEL_INIT
> >> 
> >> If you do that, you must have an initial boot code before u-boot. See
> >> below...
> >> 
> >>> #define CONFIG_SKIP_RELOCATE_UBOOT
> >> 
> >> Not used anymore.
> >> 
> >>> /* SDRAM */
> >>> #define CONFIG_NR_DRAM_BANKS		1
> >>> #define PHYS_SDRAM			0x70000000
> >>> #define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
> >> 
> >> Those defines have had their names changed.
> > 
> > These I have changed already. I think they are fine.
> > 
> >>> #define CONFIG_SYS_GBL_DATA_SIZE	128
> >> 
> >> This constant is wrong, use the auto-generated value.
> > 
> > OK
> > 
> >>> /*
> >>> 
> >>>    * Size of malloc() pool
> >>>    */
> >>> 
> >>> #define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data */
> >> 
> >> This constant is wrong, use the auto-generated value.
> > 
> > OK
> > 
> >>   >  Forgot to mention a few items :
> >>   >  
> >>   >  I flash the NOR at address 0x10020000
> >>   >  TEXT_BASE is 0x10020000
> >> 
> >> That really implies you have another boot program running before u-boot.
> >> Proably AT91 bootstrap? Is it configured to jumo to 0x1002000, or does
> >> it copy u-boot to some SDRAM address and jumps there?
> > 
> > Yes I run AT91 bootstrap. Is there a way to skip this ?
> 
> Sure, if you put an u-boot *with low level init* at the begin of NOR and
> wire BMS to start from CS0 NOR.
> 
> However I am not sure a functional low level init (in u-bbot) exists (yet)
> for your board. Even with NOR it is customary to use at91bootstrap which
> does the hardware including SDRAM init.
> 
> If you touch at91bootstrap, configure it such that it either loads u-boot
> to start of SDRAM and jumps there, or directly jumps to the address in NOR
> where u-boot is stored. Make sure CONFIG_SYS_TEXT_BASE is correct!
> 
> > That's a good question if at91bootstrap jumps to the right address. How
> > can I tell ? (maybe I find out myself, at least your question got me
> > thinking ! ) Let's say it does copy u-boot to SDRAM, do I need to set
> > that address as TEXT_BASE ?
> 
> Exactly. CONFIG_SYS_TEXT_BASE must be the address where u-boot is running
> before relocation. If that address is different, relocation will fail.
> 
> > I tried setting TEXT_BASE to 0x10020000 or 0x73f00000
> > If I use another address, AT91bootstrap doesn't do anything, but at both
> > of these addresses it behaves the same.
> 
> You should have the source of your at91 bootstrap. Without source its near
> impossible to tell how it is configured.
> 
> >> Have a look at the current implementation for top9000 in
> >> u-boot-arm/master and compare your files to it. Any differences to your
> >> code that are not board and/or SoC specific probably have to be fixed
> >> in your board code or you should be able to reason why it must be
> >> different for your board.
> > 

I did find a couple of addresses in my AT91bootstrap :

 ******************************************************************* */
/* BootStrap Settings                                                  */
/*                                                                     */
/* ******************************************************************* */
#define IMG_ADDRESS                 0x20000                        /* Image 
Address in NandFlash */
#define        IMG_SIZE                0x40000                        /* Image 
Size in NandFlash */

#define MACH_TYPE                0x86F                        /* AT91SAM9G45-
EKES */
#define JUMP_ADDR                0x73F00000                /* Final Jump 
Address */


I used 0x73f00000 before without success. But I'm very much wondering about 
the comment in this file saying " Image address in NAND flash"

Could it be that AT91bootstrap is jumping to 0x20000 and than expects u-boot 
to boot from NAND flash instead of SDRAM ?

I tried to set CONFIG_SYS_TEXT_BASE to both 0x73f00000 and 0x00020000. In both 
case AT91bootstrap starts u-boot but it hangs at relocation.

I'll first check my board config to see if I find anything strange in there.

Regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-03 18:57               ` Marcel
@ 2011-01-03 19:41                 ` Marcel
  2011-01-03 20:34                   ` Reinhard Meyer
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel @ 2011-01-03 19:41 UTC (permalink / raw)
  To: u-boot

On Monday, January 03, 2011 07:57:33 pm Marcel wrote:
> On Sunday, January 02, 2011 10:08:59 pm Reinhard Meyer wrote:
> > Dear Marcel,
> > 
> > > Dear Reinhard,
> > > 
> > >> Dear Marcel,
> > >> 
> > >>>> Is there any example that boots from NOR ?
> > >> 
> > >> looking at the defines below, you are not really booting u-boot from
> > >> NOR...
> > >> 
> > >>> #define CONFIG_SKIP_LOWLEVEL_INIT
> > >> 
> > >> If you do that, you must have an initial boot code before u-boot. See
> > >> below...
> > >> 
> > >>> #define CONFIG_SKIP_RELOCATE_UBOOT
> > >> 
> > >> Not used anymore.
> > >> 
> > >>> /* SDRAM */
> > >>> #define CONFIG_NR_DRAM_BANKS		1
> > >>> #define PHYS_SDRAM			0x70000000
> > >>> #define PHYS_SDRAM_SIZE			0x08000000	/* 128 megs */
> > >> 
> > >> Those defines have had their names changed.
> > > 
> > > These I have changed already. I think they are fine.
> > > 
> > >>> #define CONFIG_SYS_GBL_DATA_SIZE	128
> > >> 
> > >> This constant is wrong, use the auto-generated value.
> > > 
> > > OK
> > > 
> > >>> /*
> > >>> 
> > >>>    * Size of malloc() pool
> > >>>    */
> > >>> 
> > >>> #define CONFIG_SYS_GBL_DATA_SIZE	128 /* 128 bytes for initial data 
*/
> > >> 
> > >> This constant is wrong, use the auto-generated value.
> > > 
> > > OK
> > > 
> > >>   >  Forgot to mention a few items :
> > >>   >  
> > >>   >  I flash the NOR at address 0x10020000
> > >>   >  TEXT_BASE is 0x10020000
> > >> 
> > >> That really implies you have another boot program running before
> > >> u-boot. Proably AT91 bootstrap? Is it configured to jumo to
> > >> 0x1002000, or does it copy u-boot to some SDRAM address and jumps
> > >> there?
> > > 
> > > Yes I run AT91 bootstrap. Is there a way to skip this ?
> > 
> > Sure, if you put an u-boot *with low level init* at the begin of NOR and
> > wire BMS to start from CS0 NOR.
> > 
> > However I am not sure a functional low level init (in u-bbot) exists
> > (yet) for your board. Even with NOR it is customary to use at91bootstrap
> > which does the hardware including SDRAM init.
> > 
> > If you touch at91bootstrap, configure it such that it either loads u-boot
> > to start of SDRAM and jumps there, or directly jumps to the address in
> > NOR where u-boot is stored. Make sure CONFIG_SYS_TEXT_BASE is correct!
> > 
> > > That's a good question if at91bootstrap jumps to the right address. How
> > > can I tell ? (maybe I find out myself, at least your question got me
> > > thinking ! ) Let's say it does copy u-boot to SDRAM, do I need to set
> > > that address as TEXT_BASE ?
> > 
> > Exactly. CONFIG_SYS_TEXT_BASE must be the address where u-boot is running
> > before relocation. If that address is different, relocation will fail.
> > 
> > > I tried setting TEXT_BASE to 0x10020000 or 0x73f00000
> > > If I use another address, AT91bootstrap doesn't do anything, but at
> > > both of these addresses it behaves the same.
> > 
> > You should have the source of your at91 bootstrap. Without source its
> > near impossible to tell how it is configured.
> > 
> > >> Have a look at the current implementation for top9000 in
> > >> u-boot-arm/master and compare your files to it. Any differences to
> > >> your code that are not board and/or SoC specific probably have to be
> > >> fixed in your board code or you should be able to reason why it must
> > >> be different for your board.
> 
> I did find a couple of addresses in my AT91bootstrap :
> 
>  ******************************************************************* */
> /* BootStrap Settings                                                  */
> /*                                                                     */
> /* ******************************************************************* */
> #define IMG_ADDRESS                 0x20000                        /* Image
> Address in NandFlash */
> #define        IMG_SIZE                0x40000                        /*
> Image Size in NandFlash */
> 
> #define MACH_TYPE                0x86F                        /*
> AT91SAM9G45- EKES */
> #define JUMP_ADDR                0x73F00000                /* Final Jump
> Address */
> 
> 
> I used 0x73f00000 before without success. But I'm very much wondering about
> the comment in this file saying " Image address in NAND flash"
> 
> Could it be that AT91bootstrap is jumping to 0x20000 and than expects
> u-boot to boot from NAND flash instead of SDRAM ?
> 
> I tried to set CONFIG_SYS_TEXT_BASE to both 0x73f00000 and 0x00020000. In
> both case AT91bootstrap starts u-boot but it hangs at relocation.
> 
> I'll first check my board config to see if I find anything strange in
> there.

Great, I've got it to boot.

I have no idea why it suddenly works, but I guess after reviewing my config and 
changing a couple of things one of those things must have been the cause.

CONFIG_SYS_TEXT_BASE is 0x7f300000 which is the final jump address as mentioned 
in AT91bootstrap.

I guess the issue is solved now and I'll certainly check out at91bootstrap to 
create my own low level init in u-boot. It eventually saves time at production 
level I think and I generally like to keep things as simple as possible 
anyways. Since all initialisation code is in at91bootstrap I guess I can just 
move it from there to u-boot (sounds easy, but I guess there's some more to 
it).

Thanks for all the help and I hope at some time in the near future I can 
submit some code for this board. Since I travel a lot it may take some time 
before I can submit something that's clean enough, but if someone is 
interested in my current code I can send it.

Best regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-03 19:41                 ` Marcel
@ 2011-01-03 20:34                   ` Reinhard Meyer
  2011-01-03 22:16                     ` Marcel
  0 siblings, 1 reply; 14+ messages in thread
From: Reinhard Meyer @ 2011-01-03 20:34 UTC (permalink / raw)
  To: u-boot

Dear Marcel,
> On Monday, January 03, 2011 07:57:33 pm Marcel wrote:
>
> Great, I've got it to boot.
>
> I have no idea why it suddenly works, but I guess after reviewing my config and
> changing a couple of things one of those things must have been the cause.
>
> CONFIG_SYS_TEXT_BASE is 0x7f300000 which is the final jump address as mentioned
> in AT91bootstrap.

If this address is near end of SDRAM, and since u-boot relocates itself to end of SDRAM,
you might risk an overlap, depending on malloc and stack sizes.

I'd advise to have AT91Bootstrap load u-boot to the very SDRAM start (so I did for
our board).

>
> I guess the issue is solved now and I'll certainly check out at91bootstrap to
> create my own low level init in u-boot. It eventually saves time at production
> level I think and I generally like to keep things as simple as possible
> anyways. Since all initialisation code is in at91bootstrap I guess I can just
> move it from there to u-boot (sounds easy, but I guess there's some more to
> it).

It might not be THAT easy. Also be aware that at91bootstrap is not GPL-ed...

Reinhard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [U-Boot] skip relocation
  2011-01-03 20:34                   ` Reinhard Meyer
@ 2011-01-03 22:16                     ` Marcel
  0 siblings, 0 replies; 14+ messages in thread
From: Marcel @ 2011-01-03 22:16 UTC (permalink / raw)
  To: u-boot

On Monday, January 03, 2011 09:34:34 pm Reinhard Meyer wrote:
> Dear Marcel,
> 
> > On Monday, January 03, 2011 07:57:33 pm Marcel wrote:
> > 
> > Great, I've got it to boot.
> > 
> > I have no idea why it suddenly works, but I guess after reviewing my
> > config and changing a couple of things one of those things must have
> > been the cause.
> > 
> > CONFIG_SYS_TEXT_BASE is 0x7f300000 which is the final jump address as
> > mentioned in AT91bootstrap.
> 
> If this address is near end of SDRAM, and since u-boot relocates itself to
> end of SDRAM, you might risk an overlap, depending on malloc and stack
> sizes.
> 
> I'd advise to have AT91Bootstrap load u-boot to the very SDRAM start (so I
> did for our board).

OK, thanks for the advice. If seems the SDRAM end address is 0x80000000

> > I guess the issue is solved now and I'll certainly check out
> > at91bootstrap to create my own low level init in u-boot. It eventually
> > saves time at production level I think and I generally like to keep
> > things as simple as possible anyways. Since all initialisation code is
> > in at91bootstrap I guess I can just move it from there to u-boot (sounds
> > easy, but I guess there's some more to it).
> 
> It might not be THAT easy. Also be aware that at91bootstrap is not
> GPL-ed...

Does that really make a difference if all these values basically can be read 
from specs ?
I know what you mean however and I respect code if it is not OK to copy.
I didn't realise at91bootstrap wasn't GPL, so thanks for letting me know.

I did check the code already today and it does seem to be not all that 
complex. However, I also have no real need to bypass at91bootstrap. As long as 
it works for me, basically the only need would be to simplify my production 
procedure and that's just a very minor step. I don't expect I'll focus on this 
for some time.

Best regards,
Marcel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-01-03 22:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-01 15:31 [U-Boot] {Spam?} skip relocation Marcel
2011-01-01 22:52 ` Albert ARIBAUD
2011-01-02  9:07   ` Marcel
2011-01-02 18:35     ` Marcel
2011-01-02 19:00       ` Marcel
2011-01-02 19:47         ` Marcel
2011-01-02 20:31         ` [U-Boot] " Reinhard Meyer
2011-01-02 20:54           ` Marcel
2011-01-02 21:08             ` Reinhard Meyer
2011-01-03 17:57               ` Marcel
2011-01-03 18:57               ` Marcel
2011-01-03 19:41                 ` Marcel
2011-01-03 20:34                   ` Reinhard Meyer
2011-01-03 22:16                     ` Marcel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.