Lab2 - Bootloader. Conventions. Department of Computer Science and Information Engineering National Taiwan University

Similar documents
Lab6 GDB debugging. Conventions. Department of Computer Science and Information Engineering National Taiwan University

Operating System. Hanyang University. Hyunmin Yoon Operating System Hanyang University

Linux. For BCT RE2G2. User Guide. Document Reference: BCTRE2G2 Linux User Guide. Document Issue: Associated SDK release: 1.

Zephyr Kernel Installation & Setup Manual

Lab11 - Bare Metal Programming. Department of Computer Science and Information Engineering National Taiwan University

DEVELOPMENT GUIDE VAB-630. Linux BSP v

Tizen.IoTivity.Init. Tizen IoTivity 를시작하기위한환경설정. Geunsun Lee

The distcc Utility for Remote Compiling

1. USB to Serial cable driver installation instructions 2. Instructions for use with Raspberry Pi 3. Instructions for use with WRT54g and similar

DEVELOPMENT GUIDE VAB-630. Android BSP v

Installation guide. Step1. Install the OS for Raspberry Pi 3. Go to to download Raspbian to the PC.

Pengwyn Documentation

Linux U-Boot and Kernel Users Guide

LotOS Framework. Getting Started Guide for Banana Pi. Copyright (C) 2015 ilbers GmbH Revision 1.1,

Mars ZX3 Android manual. Antmicro

Cross-compilation with Buildroot

10.1inch HDMI LCD (B) User Manual

REX-RED Community Android 4.3

Oxalis Getting Started

Embedded Systems Programming

Raspberry Pi Network Boot

DEVELOPMENT GUIDE AMOS-820. Linux BSP v

Proview on Raspberry PI

Development Environment Embedded Linux Primer Ch 1&2

Spring 2017 Gabriel Kuri

Xinu on Intel Galileo User Manual

Raspberry Pi Kernel Install. By: Daniel Rizko

Installation of RedHawk 6.5-r24.2 on the Jetson TX1 Development Board Release Notes. September 19 th, 2017


EM210 Burn Linux Image Manual. Catalogue

7inch HDMI Display-B. User Manual. product description

How to Dual-Boot OS X and Ubuntu

Lab: Setting up PL-App with a Raspberry Pi

Tutorial: Ubuntu on the Zynq SoC Featuring the Avnet ZedBoard

Figure 1 TCL Used to Initialize PS

Manually Mount Usb Flash Drive Linux Command Line Fedora

EMBEDDED LINUX ON ARM9 Weekend Workshop

Installation of RedHawk on Jetson TX1, TX2 and TX2i Development Boards Release Notes

GNSS Logger Unit with RTKLIB. Tiphat Areeyapinun Shizuoka University

Format Hard Drive After Install Ubuntu From Usb External

10/02/2015 PetaLinux Image with Custom Application

User s Manual for the Boundary Devices Nitrogen R board

Idea6410 Ubuntu User Manual V 0.19

10/02/2015 PetaLinux Linux Image Network Connection

64 bit Bare Metal Programming on RPI-3. Tristan Gingold

Quick Start Guide for BeagleBone. Table of Contents. by Brian Fraser Last update: Sept 24, 2017

Flashing binaries to DRA7xx factory boards using DFU

Raspberry Pi Introduction

StampA5D3x/PortuxA5/PanelA5. Quickstart Guide

Using a secondary bootloader on the EMSK

User Manual. DVK512 Expansion Board For Raspberry Pi

Quick Start Guide. The Raspberry Pi Single Board Computer. Source: Raspberry Pi & Wiki

Linux Manually Mount External Hard Drive Ntfs-3g Could Not

Getting Started with BeagleBoard xm

Configuring Ubuntu to Code for the OmniFlash or OmniEP

Lab 0: Intro to running Jupyter Notebook on a Raspberry Pi

Android. Separated Kernel build might break the Android build process. Toolchain

Santa Fe (MAXREFDES5#) MicroZed Quick Start Guide

QUICK START GUIDE VAB-600. Android BSP v

NanoPi K2. Introduction. Hardware Spec

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

Installation Guide for Linux

Compression Device Drivers. Release rc3

μc/probe on the element14 BeagleBone Black

How To Configure Grub In Windows 7 Ip Address And Port

Enabling DM_Crypt Functionality in SDK release 5.07

Raspberry Pi Setup Tutorial

5 inch HDMI Display-B

Parallella Linux - quickstart guide. Antmicro Ltd

Ubuntu Install Instructions Mac Usb In Windows 7 Using

Hands-on with the Sitara Linux SDK

By: Yushi Wang Partners: Shen Yue and Yubing Xu Group 6. How to Setup Pandaboard ES Software Environment for UAV Project

Embedded Linux. A Tour inside ARM's Kernel

Zoom OMAP-L138 experimenter Kit Lab Manual

DEVELOPMENT GUIDE. Basler PowerPack for Embedded Vision

Adafruit PiUART - USB Console and Power Add-on for Raspberry Pi

Connecting to a Tactical Subject Using The F-Response Accelerator on Linux

Linux Manually Mount External Hard Drive Ntfs 3g Could Not

Partitioning a disk prior to Linux Installation

In this video, I will be covering DM385 IPNC RDK out of box demo-- Here, I'll be showing flashing the uboot using prebuilt binaries available in RDK--

Getting Started U-boot

Matrix-700 Linux-Ready Cortex-A5 Industry IoT Gateway Hardware Guide

MCAM335x Linux User's Guide

Developing Environment for Intel Mainstone Board

pcduino V3B XC4350 User Manual

Itron Riva Dev Mini Kit Getting Started Guide

Matrix-710. Linux-Ready Cortex-A5 Industry IoT Gateway. Hardware Guide. Version: Nov.

DEVELOPMENT GUIDE QSM-8Q60. Linux BSP v

UM2375 User manual. Linux driver for the ST25R3911B/ST25R391x high performance NFC frontends. Introduction

Introduction to the Raspberry Pi AND LINUX FOR DUMMIES

Android System Development Training 4-day session

LinkSprite Technologies,.Inc. pcduino V2

The Broadband Ham Net community has had a need for a stand alone time server for their meshes. This document will attempt to fill in this need.

Format Hard Drive After Install Ubuntu From Usb

MemGuard on Raspberry Pi 3

Labs instructions for Enabling BeagleBone with TI SDK 5.x

5inch HDMI Display User Manual

Linux. For BCT TM1 / HB5. User Guide. Document Reference: BCTTM1HB5 Linux User Guide. Document Issue: 1.2. Associated SDK release: 1.

SPPEXA TEACHLET: GETTING STARTED WITH L4RE CARSTEN WEINHOLD

Ubuntu Manual Disk Partitioning Guide

Transcription:

Lab2 - Bootloader 1 / 20

Cross-compile U-Boot. Connect to Raspberry Pi via an USB-TTL cable. Boot Raspberry Pi via U-Boot. 2 / 20

Host Machine OS: Windows Target Machine Raspberry Pi (2 or 3) Build Machine A computer with a SD card slot OS: Ubuntu 15.10 (or above) 64-bit 3 / 20

Host Machine PL2303 Driver PuTTY Build Machine U-Boot Source Code Prebuilt Raspberry Pi Firmware Raspberry Pi bootloader configuration (config.txt) GCC Cross-Compiler targeting ARM GParted You may find all software on the CSL Course Software. 4 / 20

Raspberry Pi Power supply Micro SD card and card reader USB-TTL cable 5 / 20

In Lab1, we installed the official OS on RPi, and prepared an additional set of I/O components for RPi to interact with it. In this lab, we treat RPi as an embedded device. First, we cross-compile U-Boot, a bootloader for embedded systems, in the build machine and copy it to the SD card of RPi. Second, we plug a serial cable between RPi and the host machine, and open a terminal in the host machine to interact with RPi. Third, we boot RPi via the bootloader (no OS kernel yet). 6 / 20

Many embedded systems do not have user interfaces nor compilers to build programs. As the result, people build programs for embedded systems in another machine, and then copy the built programs to the storage devices used by embedded systems. A compiler that compiles programs for other platforms is call a cross-compiler, and a machine that runs cross-compilers is called a build machine. Even if the ISA of the build machine is the same as the ISA of the machine on which the built programs run, the cross-compiler is still more suitable than the native compiler in the build machine. The reason is left for the Lab question. You may reference the article in the reference page. 7 / 20

In the build machine, install the GCC cross-compiler toolchain. % sudo apt-get update % sudo apt-get install build-essential lzop u-boot-tools bc curl libncurses5-dev % sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6 # ignore lib32bz2-1.0 in Ubuntu 16.04 % sudo apt-get install gcc-arm-linux-gnueabihf Set environment variables. % export ARCH=arm % export CROSS_COMPILE=arm-linux-gnueabihf- 8 / 20

The target is arm-linux-gnueabihf. Version above 4.9.x is required. (Ubuntu 15.10 has a 5.2.1 GCC.) Execute the following command to check. % arm-linux-gnueabihf-gcc -v 9 / 20

Download and extract the U-Boot source code. Configure and start compiling. % cd u-boot-2016.09 % make clean % make rpi_2_defconfig % make # You may append j<n> to accelerate. For example, you execute make j4 if you have 4 CPUs. After the process finishes, you get the U-Boot image named u-boot.bin. 10 / 20

Install and launch GParted. % sudo apt-get install gparted % sudo gparted Unmount and than delete the original partitions. 11 / 20

Create two partitions. 1 st partition: filesystem = fat32, size = 64MiB, label = boot 2 nd partition: filesystem = ext4, size = all remained space, label = root 12 / 20

Apply all operations. 13 / 20

Download and extract the Raspberry Pi firmware. Copy the U-Boot image to the boot directory and rename it. % cp u-boot-2016.09/u-boot.bin firmware-1.20160315/boot/uboot.img Download config.txt to the boot directory. Replace the line #kernel= with kernel=uboot.img. The value of the kernel variable should match the filename of the U-Boot image (i.e. uboot.img without quotes). 14 / 20

Copy all files in the boot directory to the 1 st partition of the SD card. Now your SD card is bootable. Eject the SD card and plug it to RPi. 15 / 20

There are several modules of USB-TTL. The one we use is PL2303. In the host machine, download and install the PL2303 driver. Plug the USB-TTL cable between RPi and the host machine. USB-TTL GND (black) GPIO GND (pin6) USB-TTL RX (white) GPIO TXD0 (pin8) USB-TTL TX (green) GPIO RXD0 (pin10) 16 / 20

If you have installed the PL2303 driver, you will find a new COM port in the device manager after you plug the USB-TTL cable. Launch PuTTY. Enter the following options and click open. There is nothing output yet since the RPi is not on. Connection type = Serial Serial port = the COM port Speed = 115200 17 / 20

Plug the RPi power supply to turn on RPi. You will see the message in PuTTY. Hit any key to stop autoboot in 2 seconds, and you will drop into the U-Boot command line. 18 / 20

Show that you can execute some U-Boot commands. 19 / 20

Why do I need a Cross Compiler? Das U-Boot -- the Universal Boot Loader config.txt - Raspberry Pi Documentation USB to TTL 20 / 20