GM8126 U-BOOT. User Guide Rev.: 0.2 Issue Date: May 2011

Similar documents
GM8126 MAC DRIVER. User Guide Rev.: 1.0 Issue Date: December 2010

GM8126 I2C. User Guide Rev.: 1.0 Issue Date: December 2010

APPLICATION NOTE. Scope. Reference Documents. Software Ethernet Bridge on SAMA5D3/D4. Atmel SMART SAMA5D3/D4 Series

IP over IB Protocol. Introduction CHAPTER

Let us ping! First we will learn the Hello World of a networked machine.

U-boot quick start guide

LS9200 User Guide LinkSprite Technologies, Inc.

JMB36X. PCI Express to SATA II/PATA Host Controller. RAID AP Utility User Guide

GM8126 LINUX. User Guide Rev.: 0.1 Issue Date: January 2011

USER GUIDE. ATWILC1000 Getting Started with SAMA5D3 Xplained Board. Atmel SmartConnect. Introduction. Features

GM8126 EVB. User Guide Rev.: 1.1 Issue Date: July 2011

Getting Started U-boot

XE2000/XE3000 IP-PBX: Getting Started Guide Package Contents

JMS583 USB 3.1 Gen 2 to PCIe Gen3x2 Bridge Controller

RG-MACC_2.0 Installation Manual

The network interface configuration property screens can be accessed by double clicking the network icon in the Windows Control Panel.

How to Recover the OS7030

PetaLinux SDK Guide to QEMU System Simulation

Use U-Boot. U-Boot Main Commands. U-Boot script capability

IR REFLOW PROFILE. User Guide Rev.: 1.0 Issue Date: January 2008

StampA5D3x/PortuxA5/PanelA5. Quickstart Guide

Enabling CDC_ETHER Connection for Skywire GSM CAT1

Enabling CDC-ETHER Connection for Skywire CAT1

These documents and software are covered under the terms and conditions of the fp Technologies, Inc. Program License Agreement

Network Configuration for Cisco UCS Director Baremetal Agent

CANopen Object Browser, Version 0.2

GM8126 SCALER FOR VIDEO GRAPHIC

Wi-Fi Guide: Edimax USB Adapter on BBG

Renesas Koelsch Hardware Setup and Software Installation

JMS580 USB 3.1 Gen2 to SATA 6Gb/s Bridge Controller

Boot loader in embedded systems

COMX-P4080. Release Notes L69C February 2011

Getting Started with PetaLinux SDK

Chapter 5 Network Layer

RG-MACC-BASE_v2.01. Installation Guide

Configuring Real Servers for DSR

Blueprints. Quick Start Guide for installing and running KVM

AVR32401: AVR32 AP7 Linux Interfacing DataFlash. 8-bit Microcontrollers. Application Note. Features. 1 Introduction


Access Server: User's and Developer's Guide <<< Previous Next >>>

CIS Test 1- Practice - Fall 2011

Hostname and IP Address

GM8126 GM8126 CAPTURE. User Guide Rev.: 1.2 Issue Date: June 2011

Quick guide for configuring a system with multiple IP-LINKs

UNIVERSITY OF BOLTON CREATIVE TECHNOLOGIES. BSc (Hons) COMPUTER NETWORKS AND SECURITY SEMESTER ONE EXAMINATION 2014/2015 UNIX MODULE NO: CPU5003

U-boot Porting guide. Saurin Suthar. Dashboard April 2007 Issue

LTIB for i.mx28, a step-by-step guide

VortiQa Enterprise Quick Start Guide

NGS IoT Bone (rev. MRF-1)

Newsreader virtual machines Technical Report NWR

Sirindhorn International Institute of Technology Thammasat University

HP Services zl Module ngenius Integrated Agent Installation and Getting Started Guide

EDBG. Description. Programmers and Debuggers USER GUIDE

GMSplus Customer Connection Test Procedure

Configuring the BeagleBone Black s Ethernet Port for SSH Access

UPGRADING THE ARCTIC FIRMWARE

TABLE OF CONTENTS. ACI Solutions Team by Tomas de Leon 2

CHAPTER 7 DEMONSTRATE THE PAN IN LINUX

Preliminary Datasheet

phycore -XScale/PXA270 Development Kit (KPCM-027) Loading a Linux Image (demo.img)

HPS SoC Boot Guide - Cyclone V SoC Development Kit

IBM Flex System IB port QDR InfiniBand Adapter. User s Guide

OMAP3530 has 256MB NAND flash in PoP (PoP: Package-On-Package implementation for Memory Stacking) configuration.


JMF60X B NAND Flash Support List And Performance Table

AN3154 Application note

Canopy Wireless Broadband Platform

How to handle the spare-byte area of Macronix 36nm NAND Flash

TOWERRAID TR4UTBPN. RAID MONITORING GUIDE v1.0

Getting Started with FreeRTOS BSP for i.mx 7Dual

AVR42789: Writing to Flash on the New tinyavr Platform Using Assembly

NAND FLASH CONTROLLER WITH AHB INTERFACE

Configuring a Standalone VCL Environment using VMware Server 2.0

JMF61X. NAND Flash And SDRAM Support List & Performance List For F/W (091102) JMicron Technology Corporation

Overview for Axxia 5600 and Axxia 6700

IBM Flex System EN port 10Gb RoCE Adapter. User s Guide

NVIDIA Professional Application Center

Installation von Oracle Real Application Cluster 10gR1 auf CentOS 4.2 mit Raw-Devices

SAMA5D2 Quad SPI (QSPI) Performance. Introduction. SMART ARM-based Microprocessor APPLICATION NOTE

PetaLinux SDK User Guide. Firmware Upgrade Guide

Create Test Environment

New System Setup Guide

WLAN on DILNetPC DNP9200 External SWAP Device on DNP9200

Multifunction Serial Interface (PDL_MFS) Features. General Description. When to Use a PDL_MFS Component. Quick Start 1.0

Bootloader commands - Openmoko

MBL Users Manual For EV44B0-II Board

DS2 Products Auto-Update Tool BSP

GLOMATION. Embedded Single Board Computer GESBC-9G10 User s Manual

Clustered Data ONTAP 8.3 Update 2, IPspaces. Self-paced Lab NETAPP UNIVERSITY. NetApp University - Do Not Distribute

Linux. Computer networks - Administration 1DV202. fredag 30 mars 12

This document guides the user through: 1. Setting up and configuring networking for the BeagleBone black or green with the host.

GM8126 SDK CHANGE LOG. Change Log Rev.: v1.0 Issue Date: Jan. 2011

User Guide. FA5 ICE RDI Driver. User Guide. Preliminary. Jan Version 0.1

AN LPC1700 secondary USB bootloader. Document information. LPC1700, Secondary USB Bootloader, ISP, IAP

MCAM335x Linux User's Guide

IS916D NAND Flash Performance List

AX88796C Product Introduction

UPGRADING ARCTIC CONTROL S FIRMWARE

Glomation. Embedded Single Board Computer GESBC-3130S User s Manual

Changing the i.mx51 NAND Flash Model for Windows Embedded CE TM 6.0

Transcription:

GM8126 U-BOOT User Guide Rev.: 0.2 Issue Date: May 2011

REVISION HISTORY Date Rev. From To Apr. 2011 0.1 - Original May 2011 0.2 - Modified Chapters 5 and 8 Added Chapter 7 Copyright 2011 Grain Media, Inc. All Rights Reserved. Printed in Taiwan 2011 Grain Media and the Grain Media Logo are trademarks of Grain Media, Inc. in Taiwan and/or other countries. Other company, product and service names may be trademarks or service marks of others. All information contained in this document is subject to change without notice. The products described in this document are NOT intended for use in implantation or other life support application where malfunction may result in injury or death to persons. The information contained in this document does not affect or change Grain Media s product specification or warranties. Nothing in this document shall operate as an express or implied license or indemnity under the intellectual property rights of Grain Media or third parties. All information contained in this document was obtained in specific environments, and is presented as an illustration. The results obtained in other operating environments may vary. THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON AN AS IS BASIS. In no event will Grain Media be liable for damages arising directly or indirectly from any use of the information contained in this document. Grain Media, Inc. 5F, No. 5, Li-Hsin Road III, Hsinchu Science Park, Hsinchu City, Taiwan 300, R.O.C. Grain Media's home page can be found at: http://

TABLE OF CONTENTS Chapter 1 Overview... 1 Chapter 2 Compiler... 3 2.1 2.2 Unpack... 4 Build SPI System... 4 2.2.1 Binaries... 5 2.3 Build NAND System... 5 2.3.1 Binaries... 6 Chapter 3 Add New Chip... 7 3.1 3.2 SPI Flash... 8 NAND Flash... 8 Chapter 4 Modify Address Setting... 9 4.1 4.2 SPI Flash... 10 NAND Flash... 10 Chapter 5 Chapter 6 Chapter 7 MAC Setting... 11 Boot Function... 15 Flash Command... 17 7.1 7.2 SPI Flash... 18 NAND Flash... 18 Chapter 8 Others... 21 i

Chapter 1 Overview U-BOOT is closely related to Linux. Some parts of the source code are originated in the Linux source tree so that some header files are in common and special provision supports the booting of the Linux images. When the peripheral chip is different from the on-board peripheral chip, the drivers should be modified according to the new hardware design and the new definition should be configured as required. Directory hierarchy: - board Board dependent files - common Misc architecture independent functions - cpu CPU specific files - disk Code for the disk drive partition handling - doc Documentation (Do not expect too much) - drivers Commonly used device drivers - examples Example code for standalone applications, and so on - include Header files - lib_arm Files generic to the ARM architecture 1

- lib_avr32 Files generic to the AVR32 architecture - lib_generic Files generic to all architectures - lib_i386 Files generic to the i386 architecture - lib_m68k Files generic to the m68k architecture - lib_mips Files generic to the MIPS architecture - lib_nios Files generic to the NIOS architecture - lib_ppc Files generic to the PowerPC architecture - lib_sparc Files generic to the SPARC architecture - net Networking code - post Power-On Self Test - tools Tools used to build the S-Record or U-BOOT images 2

Chapter 2 Compiler This chapter contains the following sections: 2.1 Unpack 2.2 Build SPI System 2.3 Build NAND System 3

The released U-BOOT for the GM8126 NAND system can be found in the u-boot directory. In that directory, users can find the pre-compiled image and the source archive. 2.1 Unpack Users can unpack the source archive by issuing the following command (Replace u-boot-2008.10.tar.gz with a filename as required): $ tar xvfz u-boot-2008.10.tar.gz Change to the created U-BOOT directory (Replace u-boot-2008.10 with a file name as required): $ cd u-boot-2008.10 2.2 Build SPI System Before compiling U-BOOT, the SPI configure of GM8126 has to be enabled. Open the GM8126 U-BOOT configure file, include/configs/gm8126.h, and ensure that the CONFIG_SPI*** option is defined and the CONFIG_NAND option is not defined. 4

2.2.1 Binaries Once U-BOOT has successfully compiled the following files, the compiled files will be stored in the u-boot directory: File u-boot u-boot.bin u-boot.srec Description Compiled ELF image U-BOOT is converted to a raw binary. u-boot.bin is converted to the Motorola S-records format. 2.3 Build NAND System Before compiling U-BOOT, the NAND configuration of GM8126 has to be enabled. Open the GM8126 U-BOOT configure file, include/configs/gm8126.h, and ensure that the CONFIG_NAND option is defined. 5

Then, issue the following commands to build an image: $ make gm8126_config $ make 2.3.1 Binaries Once U-BOOT has successfully compiled the files listed in the table below, the compiled files will be stored in the u-boot directory. File u-boot u-boot.bin u-boot.srec Description Compiled ELF image U-BOOT is converted to a raw binary. u-boot.bin is converted to the Motorola S-records format. 6

Chapter 3 Add New Chip This chapter contains the following sections: 3.1 SPI Flash 3.2 NAND Flash 7

3.1 SPI Flash If users want to add a new SPI chip, the file listed below should be modified: u-boot-2008.10\drivers\mtd\spi\winbond.c Users can search for the SELF string and update the SPI Flash as required: u-boot-2008.10\include\configs\gm8126.h #define CONFIG_SPI_FLASH_SELF 1 #define PHYS_FLASH_SIZE 0x800000 Issue the previous command if the Flash size must be updated: u-boot-2008.10\drivers\mtd\spi\spi_flash.c Search for the SELF string and update the SPI Flash as required. 3.2 NAND Flash General NAND Flash uses 4-byte ID. 8

Chapter 4 Modify Address Setting This chapter contains the following sections: 4.1 SPI Flash 4.2 NAND Flash 9

If users want to add a new SPI chip, the following file should be modified: u-boot-2008.10\include\configs\gm8126.h 4.1 SPI Flash #define CONFIG_ENV_OFFSET 0x6E0000 #define CONFIG_ENV_SIZE 0x20000 #define CONFIG_ENV_SECT_SIZE 0x20000 4.2 NAND Flash #define CONFIG_ENV_OFFSET 0x440000 #define CONFIG_ENV_SIZE 0x20000 /* must reserve 0x20000 for erase */ 10

Chapter 5 MAC Setting If users want to add a new SPI chip, the following files should be modified: Please copy the fw_env.config file to the rootfs-cpio etc directory and copy the fw_printenv AP to bin or the /usr/sbin directory. If users need to modify the MTD5 setting or the Flash address setting, please modify the fw_env.config file as required. It is not recommended modifying these files at the initial stage, if the MAC setting works, then users can modify the setting as required. If users modify the size setting value, the u-boot-2008.10\include\configs\gm8126.h CONFIG_ENV setting value should be modified at the same time and compiler again. 11

For example: MTD device name: /dev/mtd5 (U-BOOT environment) Device offset: 0x0000 Environment size: 0x20000 Flash sector size: 0x20000 Number of sectors: 0x1 Please refer to the sample below for the fw_env.config file. # NAND example /dev/mtd5 0x000000 0x20000 0x20000 0x1 u-boot-2008.10\include\configs\gm8126.h => printenv bootargs= bootcmd=sf probe 0:0;sf read 0x4000000 0xd6100 0x800000;go 0x4000000 bootdelay=3 baudrate=38400 ethaddr=00:42:70:00:30:22 ipaddr=10.0.1.52 serverip=10.0.1.51 gatewayip=10.0.1.51 netmask=255.0.0.0 ethact=ftmac110#0 ver=u-boot 2008.10 (Apr 7 2011-09:56:19) Environment size: 268/131068 bytes => saveenv Saving Environment to SPI Flash... Erasing SPI flash...erase: 20 6e 00 00 ##Erase: 20 6e 10 00 ##Erase: 20 6e 20 00 ##Erase: 20 6e 30 00 ##Erase: 20 6e 40 00 ##Erase: 20 6e 50 00 12

##Erase: 20 6e 60 00 ##Erase: 20 6e 70 00 ##Erase: 20 6e 80 00 ##Erase: 20 6e 90 00 ##Erase: 20 6e a0 00 ##Erase: 20 6e b0 00 ##Erase: 20 6e c0 00 ##Erase: 20 6e d0 00 ##Erase: 20 6e e0 00 ##Erase: 20 6e f0 00 ##Erase: 20 6f 00 00 ##Erase: 20 6f 10 00 ##Erase: 20 6f 20 00 ##Erase: 20 6f 30 00 ##Erase: 20 6f 40 00 ##Erase: 20 6f 50 00 ##Erase: 20 6f 60 00 ##Erase: 20 6f 70 00 ##Erase: 20 6f 80 00 ##Erase: 20 6f 90 00 ##Erase: 20 6f a0 00 ##Erase: 20 6f b0 00 ##Erase: 20 6f c0 00 ##Erase: 20 6f d0 00 ##Erase: 20 6f e0 00 ##Erase: 20 6f f0 00 ##Writing to SPI flash...####################################################### #########################done => 13

fw_printenv prints all environment variables. If users want to pass ethaddr, please run the fw_printenv ethaddr command. If users want to pass ipaddr, please run the fw_printenv ipaddr command. / # insmod /lib/modules/ftmac100.ko FTMAC with FARADAY Internal PHY support FTMAC110 Driver (Linux 2.6) 01/10/11 - (C) 2011 GM Corp. reset Faraday Internal PHY. / # mdev -s / # fw_printenv bootargs= bootcmd=sf probe 0:0;sf read 0x4000000 0xd6100 0x800000;go 0x4000000 bootdelay=3 baudrate=38400 ethaddr=00:42:70:00:30:22 ipaddr=10.0.1.52 serverip=10.0.1.51 gatewayip=10.0.1.51 netmask=255.0.0.0 ethact=ftmac110#0 ver=u-boot 2008.10 (Apr 7 2011-09:56:19) / # ifconfig / # fw_printenv ethaddr ADDR:00:e42:th70:a00:d30:d22 r=00:42:70:00:30:22 ftmac110_link_change:2048 <SPEED100> ftmac110_link_change:2062 <FULL> / # ifconfig eth0 Link encap:ethernet HWaddr 00:42:70:00:30:22 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2233 (2.1 KiB) TX bytes:0 (0.0 B) Interrupt:3 Base address:0x6000 / # 14

Chapter 6 Boot Function If users want to boot from U-BOOT and not using the non-os boot code, the following line should be disabled: u-boot-2008.10\include\configs\gm8126.h #define CONFIG_SKIP_LOWLEVEL_INIT 1 15

Chapter 7 Flash Command This chapter contains the following sections: 4.1 SPI Flash 4.2 NAND Flash 17

If users want to run the read, write, or erase command, this command should be set as follow: 7.1 SPI Flash Detect chip (If you want to run SPI flash r/w/e command, please set this command first) => sf probe 0:0 #SF: Got idcode ef 40 17 8192 KiB W25Q64CV at 0:0 is now current device => => help sf sf probe [bus:]cs [hz] [mode] - init flash device on given SPI bus and chip select sf read addr offset len - read `len' bytes starting at `offset' to memory at `addr' sf write addr offset len - write `len' bytes from memory at `addr' to flash at `offset' sf erase offset len - erase `len' bytes from `offset' 7.2 NAND Flash => nand info Device 0: NAND 128MiB 3,3V 8-bit, sector size 256 KiB => nand read addr offset len - read `len' bytes starting at `offset' to memory at `addr' nand write addr offset len - write `len' bytes from memory at `addr' to flash at `offset' 18

nand erase offset len - erase `len' bytes from `offset' 19

Chapter 8 Others Large size or new NAND Flash of using 5-byte ID is not supported in this version of U-BOOT. When the change of the DDR timing or size is not modified by U-BOOT, it should be modified by nsboot, and the modification is defined in the SDK/Spi_nand/nsboot/source/nsboot_mp.tar.gz head.s file. 21