DM814x C6A814x AM387x PSP U-Boot - TI E2E Community


Add to my manuals

advertisement

DM814x C6A814x AM387x PSP U-Boot - TI E2E Community | Manualzz
DM814x C6A814x AM387x PSP U-Boot
1
DM814x C6A814x AM387x PSP U-Boot
DM814x C6A814x AM387x PSP U-Boot
Linux PSP
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License [1].
IMPORTANT
DM816x refers to DM816x/C6A816x/AM389x devices unless specified.
DM814x refers to DM814x/C6A814x/AM387x devices unless specified.
DM81xx refers to both DM816x and DM814x.
U-Boot
In TI814x the ROM code serves as the 1st stage bootloader. The 2nd and the 3rd stage bootloaders are based on
U-Boot [2]. In the rest of this document when referring to the binaries, the binary for the 2nd stage is referred to as
U-Boot-MIN and the binary for the 3rd stage as simply U-Boot.
The ROM code loads the U-Boot-MIN image from the flash memory/SD card into OCMC RAM0. U-Boot-MIN
does the basic configuration like setting up the clocks, initializing the necessary peripherals and then loads the
U-Boot image from NAND,SPI/SD or UART.
Note
Please note the difference in the U-Boot prompt for the 2 stages. The 1st stage prompt is TI-MIN# while that for the
2nd stage is TI8148_EVM#. The prompt specified in the commands is meant to serve as an indication of which stage
it should be executed from. Most of the commands mentioned in the doc are meant to be executed from the 2nd
stage.
Two stage U-Boot design
This section gives an overview of the two stage U-Boot approach adopted for TI814x.
The size of the internal RAM in TI814x is 128KB out of which 18KB at the end is used by the ROM code. This
placed a limit of 110KB on the size of the U-Boot binary which the ROM code can transfer to the internal RAM.
U-Boot also requires some space for the stack, heap and global data during executing and this region currently needs
to be setup before the TEXT_BASE of U-Boot.
Since it is not possible to squeeze in all the functionality that is normally expected from U-Boot in < 110KB (after
setting aside some space for stack, heap etc) a two stage approach has been adopted.
The first stage (or rather the 2nd stage if the ROM code is also considered) is built using a minimal configuration and
has an embedded ENV. The purpose of this stage is to initialize the necessary peripherals, especially DDR, so that a
full fledged U-Boot can be transferred to DDR from NAND/SPI/SD/UART and then control passed to it.
The boot command that the minimal U-Boot uses for fetching the larger U-Boot will not change for a particular boot
mode as long as the same layout is used and is hence fixed. If any other behavior required then the minimal U-Boot
stage can be interrupted and a different command issued.
The minimal U-Boot binary also has a hole at the top which is used as the space for stack, heap and global data.
After some analysis the size of the hole has currently been set as 12KB.
DM814x C6A814x AM387x PSP U-Boot
Note
To avoid over-writing U-Boot when it is executing make sure that an address greater than 0x80800000 is used when
downloading the kernel and/or filesystem images
Automatic DDR2/DDR3 Selection
U-Boot will detect the PG version at runtime and will select DDR2/DDR3 automaticly.We will aussume that all
PG1.0 Version uses DDR2 and PG2.1 will use DDR3.
Note
To use PG2.1 with DDR2 support, un-comment the macro "#define CONFIG_TI814X_EVM_DDR2" in file
"include/configs/ti8148_evm.h" that will forcefully select DDR2 support.
Building U-Boot
Note
The pre-built binaries that comes in the release package has been built for flashing to NAND or for SD boot method.
The following steps can be skipped if you wish to use the pre-built U-Boot images for flashing to NAND.
Change to the base of the U-Boot directory.
$ cd ./u-boot
NOTE: U-Boot can be built to boot out of NAND, NOR (currently not supported) or SPI flash. The default behavior
is to place the ENV section of U-Boot (where the environment variables are stored) in the same media for which
U-Boot was built.
Building U-Boot-MIN
Different boot modes have different requirements for the U-Boot-MIN stage.
• When using memory boot (NAND/SPI) a header needs to be attached to the U-Boot binary indicating the the load
address and the size of the image. SPI boot also requires endian conversion before flashing the image.
• When using peripheral boot (UART,EMAC) there can be no header as the load address is fixed.
For easy generation of the different images, different target names have been provided in the Makefile. The different
target names take care of building the appropriate image (with or without the header and with or without endian
conversion).
Please note that the U-Boot-MIN stage uses a pre-defined command to load the 2nd stage and does not support
commands such as dhcp, tftp, saveenv etc. All the commands are available only from the 2nd stage of U-Boot which
the 1st stage U-Boot autoloads (if present).
U-Boot-MIN for NAND boot
U-Boot MIN of NAND boot is meant to be flashed to NAND using the NAND flash-writer or from the 2nd stage of
U-Boot loaded over UART. It fetches the larger U-Boot image from NAND (if present) and passes control to it
automatically.
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8148_evm_min_nand
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
This will generate a binary named u-boot.min.nand.
2
DM814x C6A814x AM387x PSP U-Boot
U-Boot-MIN for SPI boot
U-Boot-MIN of SPI boot is meant to be flashed to SPI using the SPI flash-writer or from the 2nd stage of U-Boot
loaded over UART. It fetches the larger U-Boot image from SPI (if present) and passes control passed to it
automatically.
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8148_evm_min_spi
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
This will generate a binary named u-boot.min.spi.
U-Boot-MIN for SD boot
U-Boot-MIN of SD boot is meant to be renamed as MLO and stored onto an SD card. It fetches the larger U-Boot
image from SD card (if present) and passes control passed to it automatically.
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8148_evm_min_sd
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
This will generate a binary named u-boot.min.sd.
U-Boot-MIN for UART boot
In case of UART boot (larger U-Boot image needs to be transferred to DDR over UART or already be present in
NAND for automatic transfer of control)
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8148_evm_min_uart
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
This will generate a binary named u-boot.min.uart.
On successful compilation one of the following images will be generated in the base directory
u-boot.min.nand ==> To be used for flashing to NAND using the NAND
flashing tool or from U-Boot 2nd stage
u-boot.min.spi ==> To be used for flashing to SPI using the SPI
flashing tool or from U-Boot 2nd stage
u-boot.min.uart ==> To be used for loading U-Boot MIN over the
serial port using the XMODEM-1K protocol
u-boot.min.sd
==> To be renamed to "MLO" and stored on the SD
card
3
DM814x C6A814x AM387x PSP U-Boot
Building U-Boot 2nd stage
The 2nd stage of U-Boot supports saving environment variables to NAND or SPI. The media to be used stored for
saving the ENV variables needs to be decided before building the 2nd stage of U-Boot.
U-Boot 2nd stage with ENV on NAND
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8148_evm_config_nand
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
This will generate a binary named u-boot.bin which saves the ENV onto NAND flash.
U-Boot 2nd stage with ENV on SPI
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
ti8148_evm_config_spi
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti
This will generate a binary named u-boot.bin which saves the ENV onto SPI flash.
Serial port configuration
Connect a serial cable from the serial port of the EVM (there are two serial ports on the EVM, use the one which is
next to the MMC/SD slot) to the COM port on either the Windows machine or Linux host depending on where you'll
be running the serial terminal software.
For correct operation the serial terminal software should be configured with the following settings:
*
*
*
*
*
*
Baud rate: 115,200
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
Transmit delay: 0 msec/char, 100 msec/line
If Teraterm is being used ensure that the latest version (4.67) of Teraterm is installed. The implementation of the
kermit protocol in Teraterm is not reliable in older versions. The latest version of Teraterm 4.67 can be downloaded
from here [3]
4
DM814x C6A814x AM387x PSP U-Boot
EVM Switch Settings
Make sure that the EVM boot switch settings are set to required boot mode and then power on the board.
The picture below shows the boot mode configuration switch S1 on the TI8148 EVM.
NOTE : The bootmode setting in this picture is for NAND boot.
The picture below shows the switch SW2 on the TI8148 EVM which is used for enabling NAND and SPI
5
DM814x C6A814x AM387x PSP U-Boot
NAND boot mode
Switch S1, S1[5:1] ==> 10010 , other pins should be 0 (i.e. OFF).
This sets BTM[4:0] in NAND boot mode
Switch SW2---->NAND ON
SPI boot mode
Switch S1, S1[5:1] ==> 10110 , other pins should be 0 (i.e. OFF).
This sets BTM[4:0] in SPI boot mode
Switch SW2---->SPI ON
UART boot mode
Switch S1, S1[5:1] ==> 00001 , other pins should be 0 (i.e. OFF).
This sets BTM[4:0] in UART boot mode
Switch SW2---->NAND ON
SD boot mode
Switch S1, S1[5:1] ==> 10111 , other pins should be 0 (i.e. OFF).
This sets BTM[4:0] in SD boot mode
Switch SW2----> Depending on where ENV storage is required enable
the appropriate switch.
Flashing U-Boot with CCS
PLEASE NOTE: BOTH THE STAGES OF U-BOOT NEED TO BE FLASHED ON THE SAME MEDIA
You can flash the 1st stage of U-Boot onto NAND (for NAND boot) or to SPI (SPI Boot) using the Flashing Tools
provided in the PSP releases.
Refer to Flashing to NAND Flash using CCS wiki page for instructions on how to flash the pre-built (or compiled)
binary of the 1st stage for NAND boot i.e. u-boot.min.nand (or the recompiled one) with the help of the NAND flash
writer.
Refer to Flashing to SPI Flash using CCS wiki page for instructions on how to flash the pre-built (or compiled)
binary of the 1st stage for SPI boot i.e. u-boot.min.spi (or the recompiled one) with the help of the SPI flash writer.
Once the 1st stage U-Boot has been flashed using the flashing tool
1. Load the 2nd stage U-Boot over UART as described here.
2. Flash the 2nd stage of U-Boot to either NAND using the steps over here or to SPI using the steps over here.
3. After flashing the 2 stages use the appropriate switch settings to boot from NAND or from SPI.
6
DM814x C6A814x AM387x PSP U-Boot
Flashing U-Boot without CCS
PLEASE NOTE: BOTH THE STAGES OF U-BOOT NEED TO BE FLASHED ON THE SAME MEDIA
It is possible to flash U-Boot to NAND or SPI from the 2nd stage of U-Boot which is loaded over UART or from SD
card. Before proceeding with this please make sure that the 2 binaries for flashing (U-Boot-MIN and U-Boot 2nd
stage) have been built.
UART-Flash-Method
1. Boot over UART to load the 1st stage of U-Boot as described over here. Make sure that you interrupt the
countdown in the 1st stage i.e. at the TI-MIN# prompt.
2. Load the 2nd stage of U-Boot over UART as described over here.
3. Flash the 1st stage of U-Boot to either NAND using the steps over here or to SPI using the steps over here.
4. Flash the 2nd stage of U-Boot to either NAND using the steps over here or to SPI using the steps over here.
5. After flashing the 2 stages use the appropriate switch settings to boot from NAND or from SPI.
SD-Flash-Method
Make sure the two binaries for NAND boot (u-boot.min.nand and u-boot.bin) or for SPI boot (u-boot.min.spi and
u-boot.bin) which are required for flashing are present on the SD. Please refer to the section of building U-Boot to
generate the images.
1. Boot using SD card to load both the 1st stage and the 2nd stage as described over here. Do not interrupt the
countdown till the TI8148_EVM# prompt comes.
2. Flash the 1st stage of U-Boot to either NAND using the steps over here or to SPI using the steps over here.
3. Flash the 2nd stage of U-Boot to either NAND using the steps over here or to SPI using the steps over here.
4. After flashing the 2 stages use the appropriate switch settings to boot from NAND or from SPI.
U-Boot NAND Support
Before proceeding with any of the commands given in this section please make sure that NAND is enabled on
the EVM. The switch for enabling NAND is shown over here.
This section gives an overview of the NAND support in U-Boot. It also describe how to store the kernel image,
RAMDISK or the JFFS2 filesystem to NAND so as to have a network-free boot right from powering on the board to
getting the kernel up and running.
Overview
Micron Nand parts (page size 2KB, block size 128KB) are supported on TI8148EVM platforms.
Note
• The following sub-sections illustrate the usage of NAND specific commands on TI8148EVM.
• Make sure that NAND is enabled on the EVM when U-Boot boots up.
• Refer to EVM Switch Settings section for more info on enabling/disabling different boot devices.
7
DM814x C6A814x AM387x PSP U-Boot
NAND Layout
The NAND part on the EVM has been configured in the following manner. The addresses mentioned here are used
in the subsequent NAND related commands.
+------------+->0x00000000-> U-Boot 1st stage start
|
|
|
|-->0x0001FFFF-> U-Boot 1st stage end
|
|-->0x00020000-> U-Boot 2nd stage start
|
|
|
|-->0x0025FFFF-> U-Boot 2nd stage end
|
|-->0x00260000-> ENV start
|
|
|
|
|
|-->0x0027FFFF-> ENV end
|
|-->0x00280000-> Linux Kernel start
|
|
|
|
|
|
|
|
|
|-->0x006BFFFF-> Linux Kernel end
|
|-->0x006C0000-> Filesystem start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|-->0x0CEDFFFF-> Filesystem end
|
|-->0x0CEE0000-> Free start
|
|
|
|
|
|
+------------+-->0x10000000-> NAND end (Free end)
Writing to Nand
To write len bytes of data from a memory buffer located at addr to the NAND block offset:
TI8148_EVM# nand write <addr> <offset> <len>
If a bad block is encountered during the write operation, it is skipped and the write operation continues from next
'good' block.
For example, to write 0x40000 bytes from memory buffer at address 0x80000000 to NAND - starting at block 32
(offset 0x400000):
TI8148_EVM# nand write 0x80000000 0x400000 0x40000
8
DM814x C6A814x AM387x PSP U-Boot
Reading from Nand
To read len bytes of data from NAND block at a particular offset to the memory buffer in DDR located at addr:
TI8148_EVM# nand read <addr> <offset> <len>
If a bad block is encountered during the read operation, it is skipped and the read operation continues from next
'good' block.
For example, to read 0x40000 bytes from NAND - starting at block 32 (offset 0x400000) to memory buffer at
address 0x80000000:
TI8148_EVM# nand read 0x80000000 0x400000 0x40000
Marking a bad block
Some of the blocks in the NAND may get corrupted over a period of time. In such cases you should explicitly mark
such blocks as bad so that the image that you are writing to NAND does not end up getting corrupted.
To forcefully mark a block as bad:
TI8148_EVM # nand markbad <offset>
For example, to mark block 32 (assuming erase block size of 128Kbytes) as bad block - offset = blocknum * 128 *
1024:
TI8148_EVM# nand markbad 0x400000
Viewing bad blocks
To view the list of bad blocks:
TI8148_EVM# nand bad
Note
The user marked bad blocks can be viewed by using this command only after a reset.
Erasing Nand
To erase NAND blocks in a particular the address range or using block numbers:
TI8148_EVM# nand erase <stoffaddr> <len>
This commands skips bad blocks (both factory or user marked) encountered within the specified range.
For example, to erase blocks 32 through 34:
TI8148_EVM# nand erase 0x00400000 0x40000
9
DM814x C6A814x AM387x PSP U-Boot
NAND ECC algorithm selection
NAND flash memory, although cheap, suffers from problems like bit flipping which lead to data corruption.
However by making use of some error correction coding (ECC) techniques it is possible to work around this
problem.
For the data stored in NAND flash, U-Boot supports following NAND ECC schemes
1. S/W ECC (Hamming code)
2. H/W ECC (Hamming code, BCH4, BCH8, BCH16)
Current releases do not support BCH4 and BCH16.
BCH Flash OOB Layout
For any ECC scheme we need to add some extra data while writing so as to detect and correct (if possible) the errors
introduced by the NAND part. In case of BCH scheme some bytes are needed to store the ECC related info.
The section of NAND memory where addition info like ECC data is stored is referred to as Out Of Band or OOB
section.
The first 2 bytes are used for Bad block marker – 0xFFFF => Good block
The next �N’ bytes is used for BCH bytes
N = B * <Number of 512-byte sectors in a page>
B = 8 bytes per 512 byte sector in BCH4
B = 14 bytes per 512 byte sector in BCH8
B = 26 bytes per 512 byte sector in BCH16
So for a 2k page-size NAND flash with 64-byte OOB size, we will use BCH8. This will consume 2 + (14*4) = 58
bytes out of 64 bytes available.
The NAND flash part used in EVM does not have enough spare area to support BCH16.
ECC Schemes and their context of usage
ECC type
Usage
S/W ECC
Not used
H/W ECC - Hamming Should use this scheme while flashing any image/binary which will be used by Linux. This is also used for the U-Boot
Code
ENV variables.
H/W ECC – BCH8
Only while flashing U-Boot from U-Boot already running out of OCMC RAM1. After flashing revert back to hamming
code H/W ECC
To select ECC algorithm for NAND:
TI8148_EVM# nandecc [sw | hw <hw_type>]
Usage:
sw - Set software ECC for NAND
hw <hw_type> - Set hardware ECC for NAND
<hw_type> - 0 for Hamming code
1 for bch4
2 for bch8
3 for bch16
Currently we support only Software, Hamming Code and BCH8. We do not
support BCH4 and BCH16
10
DM814x C6A814x AM387x PSP U-Boot
Flashing Linux Kernel from U-Boot
TFTP the kernel uImage to DDR.
TI8148_EVM# tftp 81000000 <kernel_image>
Now flash the kernel image to NAND at the appropriate offset (refer to NAND layout section for the offsets)
TI8148_EVM# nand erase 0x00280000 0x00400000
TI8148_EVM# nand write 0x81000000 0x00280000 <image_size>
(example, 0x200000)
Creating JFFS2 File-system
Since jffs2 is used only on flash devices, a standard Linux distribution does not have the tools to make a jffs2 file
system.Refer MTD_Utilities [4] wiki page for instructions on how to create JFFS2. mkfs.jffs2 is the tool needed to
build a jffs2 file system and the source is in this code. All of the MTD code will be downloaded but only the code to
build mkfs.jffs2 is built.
With the mkfs.jffs2 utility built and in place it is now time to make the jffs2 file system from of the target directory.
Change to the /home/user directory and enter the mkfs.jffs2 command below. Probably the most important argument
to the utility is the erase block size. For the NAND part on the TI8168 EVM board the erase block is 128k Consult
either u-boot, the kernel, or the data manual for the flash part used to find the erase block size.
[root@localhost util]# cd /home/user
[root@localhost util]# mkfs.jffs2 -lqn –e 128 -r target -o
/tftpboot/rd-jffs2.bin
By building the file in the /tftpboot directory, the step of copying it over is eliminated. The file must now be written
into flash at a specific location. In u-boot, the flash file system will get flashed to the physical address 0x6c0000 and
will be mounted by the kernel from /dev/mtdblock<partition-number>, partition-number starts from 0, refer flash
layout for individual flash devices and partition creation order for exact number. Use 'cat /proc/partitions' at Linux
prompt for the list of partitions.
After identifying the partition, unprotect the flash area where the file system will reside, erase that area. Download
the rd-jffs2.bin file. Write it to flash. Modify bootargs to support a JFFS2 file system as root on
/dev/mtdblock<partition-number>. Save the environment variables.
Flashing File-system from U-Boot
TFTP the filesystem image (example - rootfs-base.jffs2) to DDR.
TI8148_EVM# mw.b 0x81000000 0xFF 0x0C820000 <=== This is required
to get rid of "Empty Flash" JFFS2 during kernel boot.
TI8148_EVM# tftp 0x81000000 <filesystem_image>
Flash the file system image to NAND using the appropriate offsets
TI8148_EVM# nand erase clean 0x006C0000 0x0C820000 <=== Erasing
the whole partition before flashing the image
TI8148_EVM# nand write 0x81000000 0x006C0000 <image_size>
<=== Example, 0x01040000
NOTE: The image size should be upward aligned to NAND
page size which is 2KiB (i.e. 0x800).
For example, if the image size is 0x19B8004 the size to
11
DM814x C6A814x AM387x PSP U-Boot
be passed to the NAND write
command should be 0x19B8800.
U-Boot NOR Support
NOT SUPPORTED IN THIS RELEASE
U-Boot SPI Support
Before proceeding with any of the commands given in this section please make sure that SPI is enabled on the
EVM. The switch for enabling SPI is shown over here.
This section gives an overview of the SPI support in U-Boot. It also describe how to store the kernel image,
RAMDISK or the JFFS2 filesystem to SPI flash so as to have a network-free boot right from powering on the board
to getting the kernel up and running.
Overview
Winbond SPI Flash part W25X32 is supported on TI8148EVM platforms. Refer http:/ / www. mail-archive. com/
u-boot@lists. denx. de/ msg35376. html [5] for information on supporting new Winbond SPI flashes. This mail
thread discusses on adding support for W25Q64 SPIВ flash part.
Note
• The following sub-sections illustrate the usage of SPI specific commands on TI8148EVM.
• Refer to EVM Switch Settings section for more info on enabling/disabling different boot devices.
SPI Flash Layout
The SPI flash part on the EVM has been configured in the following manner. The addresses mentioned here are used
in the subsequent SPI related commands.
+-------------+->0x00000000-> U-Boot 1st stage start
|
|
|
|-->0x0001FFFF-> U-Boot 1st stage end
|
|-->0x00020000-> U-Boot 2nd stage Start
|
|
|
|-->0x0005FFFF-> U-Boot 2nd stage end
|
|-->0x00060000-> ENV start
|
|
|
|
|
|-->0x00061FFF-> ENV end
|
|-->0x00062000-> Linux Kernel start
|
|
|
|
|
|
|
|
|
|-->0x002E1FFF-> Linux Kernel end
|
|-->0x002E2000-> Filesystem start
|
|
|
|
|
|
+-------------+-->0x00400000-> Filesystem end
12
DM814x C6A814x AM387x PSP U-Boot
NOTEВ :
• Type sf in u-boot prompt to get help on SPI flash commands
• Before using any SPI command, first the SPI flash has to be probed using the sf probe 0 command. Here 0 is the
SPI flash chip select number
TI8148_EVM# sf probe 0:0
Writing to SPI Flash
To write len bytes of data from a memory buffer located at addr to offset in SPI flash:
TI8148_EVM# sf write addr offset len
For example, to write 0x1000 bytes from memory buffer at address 0x80000000 to SPI flash - starting at offset
0x4000:
TI8148_EVM# sf write 0x80000000 0x4000 0x1000
Reading from SPI Flash
To read len bytes of data from SPI flash at a particular offset to the memory buffer located at addr:
TI8148_EVM# sf read addr offset len
For example, to read 0x1000 bytes from flash - starting at offset 0x4000 to memory buffer at address 0x80000000:
TI8148_EVM# sf write 0x80000000 0x4000 0x1000
Erasing SPI Flash
To erase len bytes from 'offset' in a SPI flash:
TI8148_EVM# sf erase offset len
For example, to erase 0x1000 bytes from offset 0x4000:
TI8148_EVM# sf erase 0x4000 0x1000
Flashing Linux Kernel from U-Boot
TFTP the kernel uImage to DDR.
TI8148_EVM# tftp 81000000 <kernel_image>
Now flash the kernel image to flash at the appropriate offset (refer to SPI layout section for the offsets)
TI8148_EVM# sf probe 0:0
TI8148_EVM# sf erase 0x62000 0x280000
TI8148_EVM# sf write 0x81000000 0x62000 0x280000
13
DM814x C6A814x AM387x PSP U-Boot
Creating JFFS2 File-system
NOTE: JFFS2 cannot be supported on the SPI flash available on TI8168 EVM due to erase size restrictions. The
erase sector size of W25X32 is 4KiB but JFFS2 requires it be minimum 8KiB. Hence JFFS2 filesystem cannot be
used on this flash part. For help on JFFS2 filesystem creation (for other SPI flash parts) refer Creating JFFS2
File-system
Flashing File-system from U-Boot
TI8148_EVM# tftp 81000000 <filesystem_image>
TI8148_EVM#
Flash the file system image to flash using the appropriate offsets
TI8148_EVM# sf probe 0:0
TI8148_EVM# sf erase 0x2e2000 0x11E000
TI8148_EVM# sf write 0x81000000 0x2e2000 0x11E000
TI8148_EVM#
U-Boot UART support
This section describes how to use UART boot mode using TeraTerm.
Ensure that you have the latest version 4.67 of the Teraterm installed. The kermit protocol implementation in
Teraterm is not reliable in older versions. The latest version of Teraterm 4.67 can be downloaded from here [3]
Boot Over UART
Note
The release package does not contain the binary for UART boot. Please follow the steps mentioned
#U-Boot-MIN_for_UART_boot here for compiling u-boot.min.uart
1. Switch ON EVM with switch settings for UART boot. When “CCCC” characters appear on TeraTerm window,
from the File Menu select Transfer --> XMODEM --> Send (1K mode)
2. Select “u-boot.min.uart” for the transfer
3. After image is successfully downloaded, the ROM code will boot it.
4. Hit enter and get to u-boot prompt “TI-MIN#”
TI_MIN#
Loading 2nd stage over UART
• From the U-Boot-MIN prompt
TI_MIN# loadb 0x81000000
• From TeraTerm Menu click “File -> Transfer -> Kermit -> Send”.
• Select the 2nd stage u-boot image “u-boot.bin” built earlier and click “OPEN” button
• Wait for download to complete TI_MIN# nand erase 0x20000 0x40000
TI_MIN# go 0x81000000
• You should get 2nd Stage u-boot prompt
TI8148_EVM#
14
DM814x C6A814x AM387x PSP U-Boot
Flashing images to NAND
Before proceeding with any of the commands given in this section please make sure that NAND is enabled on
the EVM. The switch for enabling NAND is shown over here.
After the 2nd stage prompt TI8148_EVM# comes up, the images for the 1st stage and 2nd stage can be flashed to
NAND for persistent storage.
Before proceeding with flashing of the images please make sure that NAND is enabled on the EVM.
Flashing 1st stage to NAND from 2nd stage
Flash U-Boot-MIN for NAND (u-boot.min.nand) to NAND by executing the following commands:
TI8148_EVM# mw.b 0x81000000 0xFF 0x20000
TI8148_EVM# loadb 0x81000000
• From TeraTerm Menu click “File -> Transfer -> Kermit -> Send”.
• Select the 1st stage u-boot image “u-boot.min.nand” and click “OPEN” button
• Wait for download to complete and then run following commands in u-boot prompt
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
nand erase 0x0 0x20000
nandecc hw 2
nand write.i 0x81000000 0x0 0x20000
nandecc hw 0
If no error messages are displayed the 1st stage of NAND boot has been successfully transferred to NAND.
Flashing 2nd stage to NAND from 2nd stage
Flash the 2nd stage U-Boot (u-boot.bin) to NAND by executing the following commands:
TI8148_EVM# mw.b 0x81000000 0xFF 0x60000
TI8148_EVM# loadb 0x81000000
• From TeraTerm Menu click “File -> Transfer -> Kermit -> Send”.
• Select the 2nd stage u-boot image “u-boot.bin” and click “OPEN” button
• Wait for download to complete and then run following commands in u-boot prompt
TI8148_EVM# nand erase 0x20000 0x60000
TI8148_EVM# nandecc hw 0
TI8148_EVM# nand write.i 0x81000000 0x20000 0x60000
If no error messages are displayed the 2nd stage of NAND boot has been successfully transferred to NAND.
15
DM814x C6A814x AM387x PSP U-Boot
Flashing images to SPI
Before proceeding with any of the commands given in this section please make sure that SPI is enabled on the
EVM. The switch for enabling SPI is shown over here.
After the 2nd stage prompt TI8148_EVM# comes up the images for the 1st stage and 2nd stage can be flashed to SPI
for persistent storage.
Flashing 1st stage to SPI from 2nd stage
Flash U-Boot-MIN for SPI (u-boot.min.spi) to SPI flash by executing the following commands:
TI8148_EVM# mw.b 0x81000000 0xFF 0x20000
TI8148_EVM# loadb 0x81000000
• From TeraTerm Menu click “File -> Transfer -> Kermit -> Send”.
• Select the 1st stage u-boot image “u-boot.min.spi” and click “OPEN” button
• Wait for download to complete and then run following commands in u-boot prompt
TI8148_EVM# sf probe 0:0
TI8148_EVM# sf erase 0x0 0x20000
TI8148_EVM# sf write 0x81000000 0x0 0x20000
If no error messages are displayed then the 1st stage for SPI boot is successfully flashed to SPI.
Flashing 2nd stage to SPI from 2nd stage
Flash 2nd stage u-boot image (u-boot.bin) to SPI flash by executing the following commands:
TI8148_EVM# mw.b 0x81000000 0xFF 0x40000
TI8148_EVM# loadb 0x81000000
• From TeraTerm Menu click “File -> Transfer -> Kermit -> Send”.
• Select the 1st stage u-boot image “u-boot.bin” and click “OPEN” button
• Wait for download to complete and then run following commands in u-boot prompt
TI8148_EVM# sf probe 0:0
TI8148_EVM# sf erase 0x20000 0x40000
TI8148_EVM# sf write 0x81000000 0x20000 0x40000
If no error messages are displayed then the 2nd stage for SPI boot is successfully flashed to SPI.
U-Boot SD (Secured Digital card) Support
This section gives an overview of the SD (Secured Digital Card) support in U-Boot
Overview
SD (Secured Digital Card) support is available through HSMMC controller.
SD support is available by default in all U-Boot configs.В SD card can be accessed in all other boot modes
(NAND/SPI).
Read and execute application from SD card
Pleas note that the following commands are being executed from the 2nd stage.
List files on a FAT32 formated SD card
16
DM814x C6A814x AM387x PSP U-Boot
TI8148_EVM# mmc init
TI8148_EVM# fatls mmc 1
Booting kernel image from the SD card
TI8148_EVM# mmc init
TI8148_EVM# fatload mmc 1 0x81000000 uImage
TI8148_EVM# bootm 0x81000000
Booting application (ex. u-boot.bin) image from the SD card
TI8148_EVM# mmc init
TI8148_EVM# fatload mmc 1 0x81000000 u-boot.bin
TI8148_EVM# go 0x81000000
Setting Up Boot Environment on SD Card
This section describes steps to be followed to create a standalone power-on bootable system on SD card.
Prerequisites Ensure that following is available:
• A Linux host with fdisk, sfdisk, mkfs.ext3 and mkfs.vfat utilities is available
• Copy images MLO, u-boot.bin, uImage, nfs.tar.gz and mksd-ti814x.sh from release package to a directory on this
Linux machine. For subsequent description, we will assume these files are copied to /home/ti814x. Please refer
"Package Contents" section in TI814x-PSP-04.01.00.03-User-Guide for location of these files.
• Empty SD card (at least 256MB, preferably 4GB SDHC)
• A SD memory card reader/programmer to copy files from Linux Host
Note: The SD Boot has some specific restriction about the format of
the 1st partition and copying the MLO image.
So it is recommended that the supplied script mksd-ti814x.sh is
used for creating partitions and copying files.
Steps
•
•
•
•
•
Connect the SD memory card using Memory Card reader to the Linux Host
Note the name allotted for this device. We assume the device is named as "/dev/sdd"
Navigate to the /home/ti814x directory where all the mentioned files are copied
Ensure that the script mksd-ti814x.sh has executable permissions
This scripts expects arguments in the following format
./mksd-ti814x.sh <sd-device-name> <sd-1st-stage-bootloader>
<sd-2nd-stage-bootloader> <kernel-uImage>
<filesystem>
• Note that the user will require root/sudo permissions
• In our example, we run the following command
sudo ./mksd-ti814x.sh /dev/sdd MLO u-boot.bin uImage nfs.tar.gz
• You will be asked about data getting overwritten, confirm it and the files along with filesystem will be copied to
SD card
• Note that this script will create two primary partitions:
• 1st partition is formatted as FAT32 containing MLO, u-boot.bin, uImage files
• 2nd partition is formatted as ext3 where the filesystem is extracted in root
17
DM814x C6A814x AM387x PSP U-Boot
Boot using SD card
Once the SD card has been setup as described in the previous section make sure the switch setting are set for SD
boot mode [6] and then plug in the SD card in the MMC/SD card slot on the EVM.
When the EVM is powered on the 1st stage will autoload the 2nd stage from SD. Interrupt the countdown in the 2nd
stage if kernel boot is not required. You should see the TI8148_EVM# prompt on the console.
Flashing images to NAND in SD boot
Before proceeding with any of the commands given in this section please make sure that NAND is enabled on
the EVM. The switch for enabling NAND is shown over here [7].
After the 2nd stage prompt TI8148_EVM# comes up the images for the 1st stage and 2nd stage can be flashed to
NAND for persistent storage.
Flashing 1st stage to NAND from 2nd stage in SD boot
Flash U-Boot-MIN for NAND (u-boot.min.nand) to NAND by executing the following commands:
TI8148_EVM#
TI8148_EVM#
TI8148_EVM$
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
mmc init
mw.b 0x81000000 0xFF 0x20000
fatload mmc 1 0x81000000 u-boot.min.nand
nandecc hw 2
nand erase 0x0 0x20000
nand write.i 0x81000000 0x0 0x20000
nandecc hw 0
If no error messages are displayed the 1st stage of NAND boot has been successfully transferred to NAND.
Flashing 2nd stage to NAND from 2nd stage in SD boot
Flash the 2nd stage U-Boot (u-boot.bin) to NAND by executing the following commands:
TI8148_EVM#
TI8148_EVM#
TI8148_EVM$
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
mmc init
mw.b 0x81000000 0xFF 0x20000
fatload mmc 1 0x81000000 u-boot.bin
nandecc hw 0
nand erase 0x20000 0x60000
nand write.i 0x81000000 0x20000 0x60000
If no error messages are displayed the 2nd stage of NAND boot has been successfully transferred to NAND.
Flashing images to SPI in SD boot
Before proceeding with any of the commands given in this section please make sure that SPI is enabled on the
EVM. The switch for enabling SPI is shown over here [7].
After the 2nd stage prompt TI8148_EVM# comes up the images for the 1st stage and 2nd stage can be flashed to SPI
for persistent storage.
Flashing 1st stage to SPI from 2nd stage in SD boot
Flash U-Boot-MIN for SPI (u-boot.min.spi) to SPI flash by executing the following commands:
TI8148_EVM# mmc init
TI8148_EVM# mw.b 0x81000000 0xFF 0x20000
18
DM814x C6A814x AM387x PSP U-Boot
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
fatload mmc 1 0x81000000 u-boot.min.spi
sf probe 0:0
sf erase 0x0 0x20000
sf write 0x81000000 0x0 0x20000
If no error messages are displayed then the 1st stage for SPI boot is successfully flashed to SPI.
Flashing 2nd stage to SPI from 2nd stage in SD boot
Flash 2nd stage u-boot image (u-boot.bin) to SPI flash by executing the following commands:
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
mmc init
mw.b 0x81000000 0xFF 0x40000
fatload mmc 1 0x81000000 u-boot.bin
sf probe 0:0
sf erase 0x20000 0x40000
sf write 0x81000000 0x20000 0x40000
If no error messages are displayed then the 2nd stage for SPI boot is successfully flashed to SPI.
ENV on SD card using a script
U-Boot environment variables can be modified using U-Boot scripts. The scripts can be used to modify and even
over-ride the various parameters like bootargs, TFTP serverip etc.
Generation of the scripts is done with the help of the mkimage tool which can be found under the tools directory of
the U-Boot source. The mkimage binary gets generated whenever any U-Boot image is built.
Once the mkimage binary generated, create a text file named boot.txt with the U-Boot commands that would
normally be executed manually at the U-Boot prompt.
Example text file named boot.txt
setenv bootargs 'console=ttyO0,115200n8 root=/dev/mmcblk0p2 mem=128M
rootwait'
setenv bootcmd 'mmc init; fatload mmc 1 0x81000000 uImage; bootm
0x81000000'
boot
Now use the following command to generate the script named boot.scr
$ mkimage -A arm -O linux -T script -C none -n TI_script -d boot.txt
boot.scr
The file boot.scr can now be executed from U-Boot using the source command to execute all the commands present
in it. Eg: TFTP the file to some location in DDR and then use source command in the following manner (assumption:
network setting has already been done using the steps mentioned in this User Guide)
TI8148_EVM# tftp 0x81000000 boot.scr
TI8148_EVM# source 0x81000000
The script can even be placed in the SD card and then bootcmd set to autorun this script if present.
19
DM814x C6A814x AM387x PSP U-Boot
U-Boot Network configuration
In order to download the Linux kernel image from the TFTP server and for mounting NFS the network settings in
U-Boot need to be configured.
Please note that the following commands are being run from the 2nd stage U-Boot prompt on the serial console.
TI8148_EVM# setenv autoload no
TI8148_EVM# setenv bootfile uImage
The above two commands configure U-Boot not to autoboot the kernel and then set the name of the kernel image to
be downloaded over the network. Once you have flashed the kernel image (described later on) you can set the
autoload option to 'yes' in order to have U-Boot automatically boot the kernel image.
When booting for the first time, U-Boot tries to fetch the MAC address from the env space. If it returns empty, it will
look for MAC address from the eFuse registers in the Control module space and set the "ethaddr" variable in the env
appropriately.
The ethaddr can also be set using the setenv/saveenv commands. In such cases the user-set MAC address will take
effect on subsequent reboot only.
To set a different MAC address use the following command
TI8148_EVM# set ethaddr <random MAC address eg- 08:11:23:32:12:77>
Note
When setting a MAC address please ensure that the LSB of the 1st byte if not 1 i.e. when setting the MAC address: y
in xy:ab:cd:ef:gh:jk has to be an even number. For more info this refer to the wiki page http:/ / en. wikipedia. org/
wiki/MAC_address
In case a static ip is not available run the dhcp command to obtain the ip address from the DHCP server on the
network to which the EVM is connected.
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
TI8148_EVM#
setenv serverip <tftp server in your network>
netmask 255.255.255.0
dhcp
saveenv
In case a static ip is available run the following commands
TI8148_EVM# setenv ipaddr <your static ip>
TI8148_EVM# saveenv
This completes the network configuration in U-Boot.
U-Boot Environment Variables
After completing the network configuration and flashing the kernel image and filesystems to flash you need to set
some other parameters which are essential for booting the kernel.
Environment Settings for Ramdisk
In case you are using a RAMDISK as the Linux filesystem
TI8148_EVM# setenv bootargs 'console=ttyO0,115200n8 mem=256M
earlyprintk root=/dev/ram rw initrd=0x82000000,32MB'
In case of NAND boot (0x170000 => size of Linux kernel uImage, 0x00320000 => size of Filesystem)
20
DM814x C6A814x AM387x PSP U-Boot
TI8148_EVM# setenv bootcmd 'nand read 0x81000000 0x00280000
0x170000;nand read 0x82000000 0x006C0000 0x00320000;bootm 0x81000000'
In case of SPI boot (0x280000 => size of Linux kernel uImage, 0x11E000 => size of Filesystem)
TI8148_EVM# setenv bootcmd 'sf probe 0; sf read 0x81000000 0x62000
0x280000; sf read 0x82000000 2e2000 0x11E000;bootm 0x81000000'
In case of SD boot
TI8148_EVM# setenv bootcmd 'mmc init;fatload mmc 1 0x81000000
uImage;bootm 0x81000000'
NOTE: The sizes of images mentioned in the above commands have to be modified based on the actual image size.
Also, it should be aligned to sector size of the flash device used.
Finally
TI8148_EVM# saveenv
Environment Settings for JFFS2 Filesystem
• U-Boot environment variable bootargs has information on arguments to be passed to Linux kernel. The bootargs
format for JFFS2 root filesystem is,
console=ttyO0,115200n8 root=/dev/mtdblock<partion_id> [ro|rw]
rootfstype=jffs2 mem=100M earlyprintk
The value of <partition_id> depends on memory device which holds the rootfs. The below list gives values for
different scenarios and it also assumes that only that respective device is enabled on the board,
rootfs on NAND ==> partion_id should be 4
rootfs on SPI ==> partion_id should be 4
NOTE: If the kernel is compiled with both SPI and NAND support then
/dev/mtdblock9 should be used for NAND
Below examples set bootargs variable from u-boot prompt for different memory devices (in case of SPI, mtdblock4
should be used).
In case if you want readonly filesystem,
TI8148_EVM# setenv bootargs 'console=ttyO0,115200n8 root=/dev/mtdblock4
ro rootfstype=jffs2 mem=100M earlyprintk'
In case if you want read/write filesystem,
TI8148_EVM# setenv bootargs 'console=ttyO0,115200n8 root=/dev/mtdblock4
rw rootfstype=jffs2 mem=100M earlyprintk'
NOTE: If the kernel is compiled with both SPI and NAND support then /dev/mtdblock9 should be used for
NAND
In case of NAND boot (0x170000 => size of Linux kernel uImage)
TI8148_EVM# setenv bootcmd 'nand read 0x81000000 0x00280000
0x170000;bootm 0x81000000'
In case of SPI boot (0x280000 => size of Linux kernel uImage)
21
DM814x C6A814x AM387x PSP U-Boot
TI8148_EVM# setenv bootcmd 'sf probe 0; sf read 0x81000000 0x62000
0x280000;bootm 0x81000000'
NOTE: The sizes of images mentioned in the above commands have to be modified based on the actual image size.
Also, it should be aligned to sector size of the flash device used.
Environment Settings for NFS Filesystem
Note
When setting a MAC address please ensure that the LSB of the 1st byte if not 1 i.e. when setting the MAC address: y
in xy:ab:cd:ef:gh:jk has to be an even number. For more info this refer to the wiki page http:/ / en. wikipedia. org/
wiki/MAC_address
In case you want to have the kernel use the same ip as that assigned to U-Boot
TI8148_EVM# print ethaddr
<-- Check if MAC
address is assigned and is unique
TI8148_EVM# setenv ethaddr <unique-MAC-address>
<-- Set
only if not present already, format uv:yy:zz:aa:bb:cc
TI8148_EVM# setenv bootcmd 'dhcp;run addip; tftp 81000000 uImage;bootm'
TI8148_EVM# setenv hostname <unique-hostname>
TI8148_EVM# setenv addip 'setenv bootargs ${bootargs}
ip=${ipaddr}:${nfsserver}:${gatewayip}:${netmask}:${hostname}:eth0:off'
TI8148_EVM# setenv autoload no
TI8148_EVM# setenv nfsserver <NFS server-ip>
<-- Make
sure the same NFS server IP is used below
TI8148_EVM# setenv bootargs 'console=ttyO0,115200n8 root=/dev/nfs
nfsroot=<NFS server-ip>:<NFS share>,nolock rw mem=128M'
TI8148_EVM# setenv serverip <tftp-server-ip>
In case you want to use dhcp for getting an IP when the kernel boots up
TI8148_EVM# print ethaddr
<-- Check if MAC
address is assigned and is unique
TI8148_EVM# setenv ethaddr <unique-MAC-address>
<-- Set
only if not present already, format uv:yy:zz:aa:bb:cc
TI8148_EVM# setenv bootcmd 'dhcp;tftp 81000000 uImage;bootm'
TI8148_EVM# setenv autoload no
TI8148_EVM# setenv nfsserver <NFS server-ip>
<-- Make
sure the same NFS server IP is used below
TI8148_EVM# setenv bootargs 'console=ttyO0,115200n8 root=/dev/nfs
nfsroot=<NFS server-ip>:<NFS share>,nolock rw mem=128M
ip=dhcp'
TI8148_EVM# setenv serverip <tftp-server-ip>
Finally
TI8148_EVM# saveenv
22
DM814x C6A814x AM387x PSP U-Boot
Booting the kernel
In case everything went well you should now be able to boot the kernel from U-Boot using the following command.
TI8148_EVM# boot
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
http:/ / creativecommons. org/ licenses/ by-sa/ 3. 0/
http:/ / www. denx. de/ wiki/ U-Boot/ WebHome
http:/ / logmett. com/ index. php?/ download/ tera-term-467. html
http:/ / processors. wiki. ti. com/ index. php/ MTD_Utilities
http:/ / www. mail-archive. com/ u-boot@lists. denx. de/ msg35376. html
http:/ / ap-fpdsp-swapps. dal. design. ti. com/ index. php/ TI814x-PSP-04. 01. 00. 03-U-Boot#SD_boot
http:/ / ap-fpdsp-swapps. dal. design. ti. com/ index. php/ TI814x-PSP-04. 01. 00. 03-U-Boot#EVM_Switch_Settings
23
Article Sources and Contributors
Article Sources and Contributors
DM814x C6A814x AM387x PSP U- Boot В Source: http://processors.wiki.ti.com/index.php?oldid=69075 В Contributors: Mansoor, Vaibhav, X0159681
Image Sources, Licenses and Contributors
Image:TIBanner.png В Source: http://processors.wiki.ti.com/index.php?title=File:TIBanner.png В License: unknown В Contributors: Nsnehaprabha
Image:DM814814x_EVM_S1_BTMODE_SWITCH_NAND_BOOT.jpg В Source:
http://processors.wiki.ti.com/index.php?title=File:DM814814x_EVM_S1_BTMODE_SWITCH_NAND_BOOT.jpg В License: unknown В Contributors: Mansoor
Image:DM814x_EVM_SW2_NAND_SPI_SELECT.jpg В Source: http://processors.wiki.ti.com/index.php?title=File:DM814x_EVM_SW2_NAND_SPI_SELECT.jpg В License: unknown
В Contributors: Mansoor
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER
APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE
A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
License
1. Definitions
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or
phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work
that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in
timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below,
which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting
separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.
"Creative Commons Compatible License" means a license that is listed at http:/ / creativecommons. org/ compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License,
including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made
available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.
"Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.
"License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.
"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a
performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the
producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression
including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a
musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or
lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography,
topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not
otherwise considered a literary or artistic work.
"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise
rights under this License despite a previous violation.
"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to
make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the
communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected
performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights
Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other
applicable laws.
3. License Grant
Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated
below:
1.
2.
3.
4.
5.
to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;
to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original
Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";
to Distribute and Publicly Perform the Work including as incorporated in Collections; and,
to Distribute and Publicly Perform Adaptations.
For the avoidance of doubt:
1.
Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right
to collect such royalties for any exercise by You of the rights granted under this License;
Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect
such royalties for any exercise by You of the rights granted under this License; and,
3.
Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via
that society, from any exercise by You of the rights granted under this License.
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and
formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
2.
4. Restrictions
The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
1.
2.
3.
4.
You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or
Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License.
You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly
Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License.
This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from
any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable,
remove from the Adaptation any credit as required by Section 4(c), as requested.
You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license
(either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the
licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the
terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You
may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable
License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when
You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to
that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to
the terms of the Applicable License.
If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the
medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute,
publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the
extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with
Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The
credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of
the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this
Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the
Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections,
You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in
which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's
honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this
License (right to make Adaptations) but not otherwise.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING
THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,
NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT
ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability
EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE
OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
24
License
25
7. Termination
1.
2.
This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License,
however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different
license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this
License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
1.
2.
3.
4.
5.
6.
Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this
agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not
be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979),
the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject
matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the
standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the
license of any rights under applicable law.

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement