2010-09-01 09:36:57     Customising BF537 bootloader

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-09-01 09:36:57     Customising BF537 bootloader

Shyam sundar (INDIA)

Message: 93028   

 

From the following link

 

  blackfin.uclinux.org/gf/project/u-boot/frs

 

I downloaded the file u-boot-2008.10-2009R1.1-rc1.tar.bz2

 

The custom board is similar to BF537 EZkit board with some small changes.

 

I am using 8MB flash memory and 32MB SDRAM.

 

I have copied all the files in the path u-boot-2008.10-2009R1.1-rc1/board/bf537-custom that were being used for the BF537 stamp board.These are the files present

 

    config.mk

    bf537-custom.c

    u-boot.lds

    post-memory.c

    cmd_bf537led.c

    nand.c

    spi_flash.c

 

I edited the header file in the path u-boot-2008.10-2009R1.1-rc1/include/configs/bf537-custom.h

 

to meet the SDRAM and SPI_FLASH memory requirement

 

After this I would give the command make bf537-custom_config and make bf537-custom.

 

This would result in creation of the u-boot files in the folder u-boot-2008.10-2009R1.1-rc1

 

I will use the .bin file generated to be burnt in the flash using the jtag connection.

 

I hope this procedure is correct?

 

Before booting the kernel application, I want to perform some device tests through sport 1 interface and uart 1 interface.

 

Can anybody give some clue how i can proceed to add the needed routine?

 

When the kernel application is built, some files will be created in the path uClinux-dist/images

 

I wan to use the compressed image to be burnt in to the spi flash, which file should i use?

 

I do find the following files

 

linux.initramfs size: 8.6MB

 

uImage size: 3.9 MB

 

rootfs.initramfs  size: 6.5 MB

 

vmimage size: 874.4 KB

 

vmlinux size: 2.1 MB

 

I did had a look at this link

 

  docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:uimage

 

While using the EZkit board, for booting i was using the file vmlinux whose size was around 26 MB in the path uClinux-dist/linux-2.6.x

QuoteReplyEditDelete

 

 

2010-09-01 11:47:37     Re: Customising BF537 bootloader

Mike Frysinger (UNITED STATES)

Message: 93037   

 

you can add your own sanity checks to the misc_init_r() function

 

as for the images, please read the documentation:

https://docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:images

QuoteReplyEditDelete

 

 

2010-09-03 03:27:33     Re: Customising BF537 bootloader

Shyam sundar (INDIA)

Message: 93098   

 

If i want to test a device which is connected to UART1,then can i use the following variables and functions in the misc_init_r() function to configure the UART1 interface?I found these in the file BFIN_CDEF_ADSP_EDN_BF534_extended.

 

Please let me know if i am going wrong?

 

 

 

#define pUART1_THR                     ((uint16_t volatile *)UART1_THR) /* Transmit Holding register */

#define bfin_read_UART1_THR()          bfin_read16(UART1_THR)

#define bfin_write_UART1_THR(val)      bfin_write16(UART1_THR, val)

#define pUART1_RBR                     ((uint16_t volatile *)UART1_RBR) /* Receive Buffer register */

#define bfin_read_UART1_RBR()          bfin_read16(UART1_RBR)

#define bfin_write_UART1_RBR(val)      bfin_write16(UART1_RBR, val)

#define pUART1_DLL                     ((uint16_t volatile *)UART1_DLL) /* Divisor Latch (Low-Byte) */

#define bfin_read_UART1_DLL()          bfin_read16(UART1_DLL)

#define bfin_write_UART1_DLL(val)      bfin_write16(UART1_DLL, val)

#define pUART1_IER                     ((uint16_t volatile *)UART1_IER) /* Interrupt Enable Register */

#define bfin_read_UART1_IER()          bfin_read16(UART1_IER)

#define bfin_write_UART1_IER(val)      bfin_write16(UART1_IER, val)

#define pUART1_DLH                     ((uint16_t volatile *)UART1_DLH) /* Divisor Latch (High-Byte) */

#define bfin_read_UART1_DLH()          bfin_read16(UART1_DLH)

#define bfin_write_UART1_DLH(val)      bfin_write16(UART1_DLH, val)

#define pUART1_IIR                     ((uint16_t volatile *)UART1_IIR) /* Interrupt Identification Register */

#define bfin_read_UART1_IIR()          bfin_read16(UART1_IIR)

#define bfin_write_UART1_IIR(val)      bfin_write16(UART1_IIR, val)

#define pUART1_LCR                     ((uint16_t volatile *)UART1_LCR) /* Line Control Register */

#define bfin_read_UART1_LCR()          bfin_read16(UART1_LCR)

#define bfin_write_UART1_LCR(val)      bfin_write16(UART1_LCR, val)

#define pUART1_MCR                     ((uint16_t volatile *)UART1_MCR) /* Modem Control Register */

#define bfin_read_UART1_MCR()          bfin_read16(UART1_MCR)

#define bfin_write_UART1_MCR(val)      bfin_write16(UART1_MCR, val)

#define pUART1_LSR                     ((uint16_t volatile *)UART1_LSR) /* Line Status Register */

#define bfin_read_UART1_LSR()          bfin_read16(UART1_LSR)

#define bfin_write_UART1_LSR(val)      bfin_write16(UART1_LSR, val)

#define pUART1_MSR                     ((uint16_t volatile *)UART1_MSR) /* Modem Status Register */

#define bfin_read_UART1_MSR()          bfin_read16(UART1_MSR)

#define bfin_write_UART1_MSR(val)      bfin_write16(UART1_MSR, val)

#define pUART1_SCR                     ((uint16_t volatile *)UART1_SCR) /* SCR Scratch Register */

#define bfin_read_UART1_SCR()          bfin_read16(UART1_SCR)

#define bfin_write_UART1_SCR(val)      bfin_write16(UART1_SCR, val)

#define pUART1_GCTL                    ((uint16_t volatile *)UART1_GCTL) /* Global Control Register */

#define bfin_read_UART1_GCTL()         bfin_read16(UART1_GCTL)

#define bfin_write_UART1_GCTL(val)     bfin_write16(UART1_GCTL, val)

QuoteReplyEditDelete

 

 

2010-09-03 03:30:16     Re: Customising BF537 bootloader

Shyam sundar (INDIA)

Message: 93099   

 

Regarding images, I did get some understanding.

 

I think image selection depends upon the the file system which you prefer along with the kernel !!

 

Thanks Mike !

QuoteReplyEditDelete

 

 

2010-09-03 11:15:37     Re: Customising BF537 bootloader

Mike Frysinger (UNITED STATES)

Message: 93111   

 

assuming your console isnt on UART1 then, then the way to access the MMRs are via bfin_{read,write}_XXX

QuoteReplyEditDelete

 

 

2010-09-03 14:18:24     Re: Customising BF537 bootloader

Shyam sundar (INDIA)

Message: 93116   

 

Thanks Michael !!

Attachments

    Outcomes