Computer System Laboratory

Slides:



Advertisements
Similar presentations
Computer System Laboratory
Advertisements

U-Boot and Linux Kernel Debug using CCSv5
Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
7400 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. 1/16 OfficeServ 7x00 Enterprise IP Solutions Quick Install Guide.
Computer System Laboratory
COMPUTER SYSTEM LABORATORY Lab8 - Debugging II. Lab 8 Experimental Goal Learn how to debug Linux in source-level by Domingo and diagnose target boards.
COMPUTER SYSTEM LABORATORY Lab4 - Bootloader. Lab 4 Experimental Goal Learn how to build U-Boot bootloader for PXA /10/8/ 142.
NET+OS 6.1 Training. BSP NET+OS 6.1 BSP Initialization Memory map New features Debugging Porting Issues.
Embedded Systems Principle of Debugger. Reference Materials kl.de/avr_projects/arm_projects/#winarmhttp://
U-Boot Debug using CCSv5 In this session we will cover fundamentals necessary to use CCSv5 and a JTAG to debug a TI SDK-based U-Boot on an EVM platform.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 - Cross Tools 2014/10/7/ 20 1.
hardware and operating systems basics.
Linux Booting Procedure
Computer System Laboratory
COMPUTER SYSTEM LABORATORY Lab10 - Sensor II. Lab 10 Experimental Goal Learn how to write programs on the PTK development board (STM32F207). 2013/11/19/
Embedded Linux porting Kernel
Computer System Laboratory
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
AT91SAM9261-EK WinCE 5.0 DEMO ATMEL AT91 Application & Support Group Version 1.O February 2007.
Beagle Board Fast Boot Hui Chen Keji Ren Dec 10 th, 2009 EE382N-4 Project.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Sensor 2014/9/23/ 13 1.
Guide to Linux Installation and Administration, 2e1 Chapter 2 Planning Your System.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Lab 10 Department of Computer Science and Information Engineering National Taiwan University Lab10 – Debugging II 2014/12/2 1 /16.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
SAPC Hardware Pentium CPU (or 486) 4M usable memory no hard disk; boot from floppy no keyboard or monitor or mouse COM2 serial port: used for console i/o.
7200 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. 1/16 OfficeServ 7200 Enterprise IP Solutions Data Server S/W Upgrade.
TI Information – Selective Disclosure Boot TI Keystone II Linux Kernel (RAM File-system) Vincent Han Mar,
Code : STM#561 Samsung Electronics Co., Ltd. OfficeServ SW Upgrade Distribution EnglishED01.
7200 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. 1/7 OfficeServ 7200 Enterprise IP Solutions Data Server S/W Upgrade.
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 – Bootloader + OS Kernel 2015/10/27/ 25 1.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Implementation of Embedded OS
IOS Boot Procedure Can be set in Global Config –Router(config)#boot system flash If not in NVRAM as to where to get IOS, default is Flash If not in Flash,
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
WP1- Documentation Booting Petalinux from TFTP and using Network file system Section for developers Zynq 7020 R. Assiro.
U-Boot CS-423 Dick Steflik. U-Boot Actual Name: Das U-Boot Universal Bootstrap Loader Used on PPC, ARM, AVR32, MIPS, x86, 68K, Nios and MicroBlaze architectures.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux system development.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The GRUB bootloader Michael.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The U-boot bootloader Michael.
The GRUB bootloader Michael Opdenacker Thomas Petazzoni Free Electrons
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Implementation of Embedded OS
Lab 1: Using NIOS II processor for code execution on FPGA
Computer System Laboratory
Computer System Laboratory
Implementation of Embedded OS
Implementation of Embedded OS
Data Server S/W Upgrade Samsung Electronics Co., Ltd.
ELG) System Develop. Team
CHAPTER 7.
Computer System Laboratory
Structure of Unix OS.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
SAPC Hardware Pentium CPU (or 486) 4M usable memory
Computer System Laboratory
Lecture9: Embedded Network Operating System: cisco IOS
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Lecture9: Embedded Network Operating System: cisco IOS
Presentation transcript:

Computer System Laboratory Lab4 Bootloader

Experimental Goal Build the U-Boot and use JTAG to download U-Boot to the target board without bootloader Lab4 2019/4/20

Environment Host System Build System Target System Software Windows XP/Ubuntu 8.04 Build System Ubuntu 8.04 Target System XScale PXA270 Software DENX U-Boot source code You can download all the source codes from RSWiki CSL Course Software Lab4 2019/4/20

Bootloader Concept A typical flow when booting a computer Bootloader Load BIOS and self check Execute bootloader Load kernel and filesystem Initialize hardware elements … Bootloader Lab4 2019/4/20

Bootloader Concept (Cont.) All CPUs will execute the first instruction from a specified address when power on ROM, EEPROM, Flash memory, etc ARM system will execute from 0x00000000 Typical space allocation Lab4 2019/4/20

System Memory Layout memory layout 0x00000000 0xa0000000 U-Boot 3 Linux kernel 0x00480000 0xa1080000 U-Boot 2 Linux File System 0x01380000 0xa3f80000 U-Boot 1 0x02000000 0xa4000000 Flash memory RAM Lab4 2019/4/20

Bootloader Examples Bootloader highly dependents on architecture Some popular bootloaders LILO, GRUB You can see /boot/grub/menu.lst for the settings in Ubuntu Windows Boot Manager You can see the settings in C:\boot.init in XP U-Boot We will use U-Boot for PXA270 (ARM architecture) Lab4 2019/4/20

Introduction to U-Boot Das U-Boot (Universal Bootloader) is an open source, primary bootloader used in embedded system It is available for a number of different computer architectures, including PPC, ARM, MIPS, x86 The current name Das U-Boot adds a German definite article as a pun to the German word for “submarine” ~ from Wikipedia Lab4 2019/4/20

U-Boot Compilation Step1 : download patched source code Step2 : extract source code % tar –zxvf mt-u-boot-1.1.2.tar.gz Step3 : check Lab1’s arm-elf toolchain path in PATH Tips The include/configs/ directory under U-Boot source directory contains one configuration file for each supported board It defines the CPU type, the peripherals and their configuration, the memory mapping, the U-Boot features that should be compiled in, etc Lab4 2019/4/20

U-Boot Compilation (Cont.) Step4 : compile U-Boot U-Boot must be configured before being compiled, i.e. make <target board>_config, where <target board> is the name of the configuration file in include/configs/, without the .h % cd u-boot-1.1.2 % ./mt-crpxa270_config.sh The resulting u-boot.bin is the bootloader we want Lab4 2019/4/20

Download U-Boot to Target Board Step1 : open Domingo (refer to Lab3) Step2 : load u-boot.bin (the address of SDRAM lies within the range 0xa0000000-0xa4000000) Lab4 2019/4/20

Download U-Boot to Target Board (Cont.) Step3 : change the PC value in registers Step4 : open Serial Console Step5 : click Debug  Free Go Hit any key to stop U-Boot autoboot Step6 : use “flinfo” command to check if U-Boot can control flash memory Lab4 2019/4/20

Transfer File via TFTP Step1 : openTFTP Server (Windows version, refer to Lab2) Step2 : change Host IP address (according to your U-Boot setting, use “printenv serverip” command in U-Boot shell) Step3 : copy u-boot.bin to TFTP Server’s root directory Step4 : download U-Boot via Ethernet cable $ tftp a1080000 u-boot.bin Tip U-Boot has a built-in TFTP client Lab4 2019/4/20

Copy to Flash memory Step1 : disable flash write protection $ protect off 0 7ffff Step2 : erase the specified range of bytes $ erase 0 7ffff Step3 : copy U-Boot to reset address $ cp.b a1080000 0 80000 Step4 : change environment variable (optional) $ setenv ipaddr <target-system-ip> $ setenv serverip <host-system-ip> $ saveenv Now, you can abandon Domingo, remember to change Host System IP if you change environment variable Lab4 2019/4/20

Configure U-Boot If you want to change U-Boot default environment, modify the specified file and recompile U-Boot % cd u-boot-1.1.2 % vim include/configs/Create_XScale_PXA270.h Host System IP : CONFIG_SERVERIP Target System IP : CONFIG_IPADDR Boot arguments : CONFIG_BOOTARGS Boot command : CONFIG_BOOTCOMMAND U-Boot delay : CONFIG_BOOTDELAY (do not set to 0!) Linux kernel start command : CONFIG_LINUX Tip The U-Boot environment variable ‘bootargs’ is used to hold the parameter options passed to the Linux kernel, as the kernel’s command line parameters Lab4 2019/4/20

Exercise Use U-Boot to automatically start last week’s test program after reset This time, let LED really be blinking in your own way, such as blinking once every number of your group second. Tip Use “setenv bootcmd” command to modify U-Boot boot command Use U-Boot “go <addr>” to start program at address ‘addr’ For more information about LED control register, please refer to Create XScale-PXA270 User’s Guide, 4.3.2 Lab4 2019/4/20