2010년 2월 9일 화요일

OMAP-L138EVM SPI,Nand,Nor Flash Booting

OMAP-L138EVM SPI,Nand,Nor Flash Booting

1. Flashing images

(1). Flashing images to SPI Flash
(Serial flasher)
Serial Boot and Flash Loading Utility for OMAP-L138

(CCStudio)
1). Set the boot pins to emulation boot mode. This is done by setting switch S7 on the EVM according to the following table:
(S7-1:OFF, S7-2:OFF, S7-3:OFF, S7-4:OFF, S7-5:ON, S7-6:OFF, S7-7:OFF, S7-8:ON)
2). CCStudio and connect to the ARM.
3). CCStudio and connect to the DSP.
4). Open the ARM, From GEL menu-> Full EVM -> SPI1_PINMUX
5). On the ARM load spiflash_writer.out program.
6). Run(F5)
7). In the Dialog Box - enter "armais"
8). In the Dialog Box - enter the path for the ais image(images/boot-strap/omapl1x8/arm-spi-ais.bin)
9). Now AIS image (UBL) has been flashed
10). On the ARM reload spiflash_writer.out program.
11). Run(F5)
12). In the Dialog Box - enter "uboot"
13). In the Dialog Box - enter path for uboot image(images/u-boot/omapl1x8/u-boot.bin)
14). Here it may take a couple of minutes
15). Disconnect DSP, disconnect ARM from CCS.
16). Power off the EVM
17). Place the EVM in NAND boot mode
18). Power on the EVM

(2). Flashing images to NAND Flash(CCStudio)
1). Set the boot pins to emulation boot mode. This is done by setting switch S7 on the EVM according to the following table:
(S7-1:OFF, S7-2:OFF, S7-3:OFF, S7-4:OFF, S7-5:ON, S7-6:OFF, S7-7:OFF, S7-8:ON)
2). CCStudio and connect to the ARM.
3). CCStudio and connect to the DSP.
4). Open the ARM, From GEL menu-> Full EVM -> EMIFA_NAND_PINMUX (optionally NAND BOOTMODE can be set)
5). On the ARM load nand_writer.out program.
6). Run(F5)
7). In the Dialog Box - enter "armais"
8). In the Dialog Box - enter the path for the ais image(images/boot-strap/omapl1x8/arm-nand-ais.bin)
9). Now AIS image (UBL) has been flashed
10). On the ARM reload nand_writer.out program.
11). Run(F5)
12). In the Dialog Box - enter "uboot"
13). In the Dialog Box - enter path for uboot image(images/u-boot/omapl1x8/u-boot.bin)
14). Here it may take about 1 minute
15). Disconnect DSP, disconnect ARM from CCS.
16). Power off the EVM
17). Place the EVM in NAND boot mode
18). Power on the EVM

(3). Flashing images to NOR Flash(CCStudio)
1). Set the boot pins to emulation boot mode. This is done by setting switch S7 on the EVM according to the following table:
(S7-1:OFF, S7-2:OFF, S7-3:OFF, S7-4:OFF, S7-5:ON, S7-6:OFF, S7-7:OFF, S7-8:ON)
2). CCStudio and connect to the ARM.
3). CCStudio and connect to the DSP.
4). Open the ARM, From GEL menu-> Full EVM -> EMIFA_NOR_PINMUX
5). On the ARM load norflash-writer.out program.
6). Run(F5)
7). In the Dialog Box - enter "armais"
8). In the Dialog Box - enter the path for the ais image(images/boot-strap/omapl1x8/arm-nor-ais.bin)
9). Now AIS image (UBL) has been flashed
10). On the ARM reload norflash-writer.out program.
11). Run(F5)
12). In the Dialog Box - enter "uboot"
13). In the Dialog Box - enter path for uboot image(images/u-boot/omapl1x8/u-boot.bin)
14). Here it may take a couple of minutes
15). Disconnect DSP, disconnect ARM from CCS.
16). Power off the EVM
17). Place the EVM in NAND boot mode
18). Power on the EVM


2. Booting U-Boot

1). SPI flash
In order to boot from SPI flash, which has been written with the boot images, set the SW7 switch on the base board as follows:
(S7-1:OFF, S7-2:OFF, S7-3:OFF, S7-4:OFF, S7-5:OFF, S7-6:OFF, S7-7:OFF, S7-8:OFF)
2). NAND Flash
In order to boot from NAND flash, which has been written with the boot images, set the SW7 switch on the base board as follows:
(S7-1:OFF, S7-2:OFF, S7-3:OFF, S7-4:OFF, S7-5:ON, S7-6:OFF, S7-7:OFF, S7-8:OFF)
3). NOR Flash
In order to boot from Nor flash, which has been written with the boot images, set the SW7 switch on the base board as follows:
(S7-1:OFF, S7-2:OFF, S7-3:OFF, S7-4:OFF, S7-5:ON, S7-6:ON, S7-7:ON, S7-8:OFF)

3. Booting Linux kernel using U-Boot
U-Boot Command:
setenv serverip 218.36.28.218
setenv gatewayip 218.36.28.254
setenv netmask 255.255.255.0
setenv ipaddr 218.36.28.217
saveenv

1). SDRAM
U-Boot Command:
setenv bootcmd 'tftp 0xc0700000 uImage; tftp 0xc1180000 ramdisk-base.gz; bootm 0xc0700000'
setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=dhcp eth=${ethaddr}

2). SPI flash
U-Boot Command:
sf probe 0
tftp 0xc0700000 uImage
sf erase 0x80000 0x200000
sf write 0xc0700000 0x80000 0x200000
tftp 0xc1180000 ramdisk-base.gz
sf erase 0x280000 0x400000
sf write 0xc1180000 0x280000 0x400000
setenv bootcmd 'sf probe 0;sf read 0xc0700000 0x80000 0x200000;sf read 0xc1180000 0x280000 0x400000;bootm 0xc0700000'
setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=dhcp eth=${ethaddr}

3). NAND Flash
(ramdisk as rootfs)
tftp 0xc0700000 uImage
nand erase 0x200000 0x200000
nand write.e 0xc0700000 0x200000 0x200000
tftp 0xc1180000 ramdisk-base.gz
nand erase 0x400000 0x400000
nand write.e 0xc1180000 0x400000 0x400000
setenv bootcmd 'nand read.e 0xc1180000 0x400000 0x400000; nboot.e 0xc0700000 0 0x200000; bootm'
setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=dhcp eth=${ethaddr}

(jffs2 image as rootfs)
tftp 0xc0700000 uImage
nand erase 0x200000 0x200000
nand write.e 0xc0700000 0x200000 0x200000
tftp -r rootfs-base.jffs2 -g 218.36.28.218
flash_eraseall /dev/mtdX
nandwrite -p /dev/mtdX rootfs-base.jffs2
setenv bootcmd 'nand read.e 0xc1180000 0x400000 0x400000; nboot.e 0xc0700000 0 0x200000; bootm'
setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/mtdblockX rw rootfstype=jffs2 ip=dhcp eth=${ethaddr}

Note: In the above commands 'X' in '/dev/mtdX' and '/dev/mtdblockX' refer to the NAND partition which is reserved for file system.

4). NOR Flash
tftp 0xc0700000 uImage
protect off 60080000 +200000
erase 60080000 +200000
cp.b c0700000 60080000 200000
tftp 0xc1180000 ramdisk-base.gz
protect off 60280000 +400000
erase 60280000 +400000
cp.b c1180000 60280000 400000
setenv bootcmd 'cp.b 60080000 c0700000 200000;cp.b 60280000 c1180000 400000;bootm 0xc0700000'
setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=dhcp

5). USB Storage
usb reset
fatload usb 0:1 0xC0700000 uImage
fatls usb 0:1
setenv bootcmd 'usb start; fatload usb 0:1 0xC0700000 uImage; bootm 0xc0700000'

댓글 없음:

댓글 쓰기