Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer System Laboratory

Similar presentations


Presentation on theme: "Computer System Laboratory"— Presentation transcript:

1 Computer System Laboratory
Lab1 - Environment Setup / 15

2 Experimental Goal Experience Raspberry Pi (RPi) by:
installing the official OS on RPi. connecting I/O components to RPi. trying the OS. Take a look at the processor architecture and the boot process of RPi. Configure the OS according to the official documentation. / 15

3 Environment Build Machine Target Machine
Machine: A computer with a SD card slot OS: Ubuntu (or above) 64-bit Target Machine Machine: Raspberry Pi (2 or 3) OS: Raspbian / 15

4 Software Required VirtualBox (not needed if you use a physical machine to build) Ubuntu Raspbian Jessie / 15

5 Hardware Checklist Raspberry Pi Power supply
Micro SD card and card reader USB mouse USB keyboard HDMI screen and cable Network cable / 15

6 Setup a Build Machine Install VirtualBox. Create a virtual machine.
Disk space: 30GB RAM: 2GB Network: NAT Install Ubuntu in the VM. In this lab, we only need the dd command and hence any release of Ubuntu will do. However, in the next lab, we will use the build machine to compile software, and only the mentioned releases have been tested. / 15

7 Access the SD Card Plug the SD card into the build machine and find out the device name. E.g. /dev/sdc. Ensure the device name in your case. We will later erase all data on the device. If your build machine is a VM, click the following button to capture the SD card. / 15

8 Create a Raspbian SD Card
Download the Raspbian .zip file and extract it to get the .img file. Unmount all partitions of the SD card. E.g. sudo umount /dev/sdc1 Write the image to the SD card. E.g. sudo dd bs=4M if= raspbian-jessie.img of=/dev/sdc This may take some minutes. Safely eject the SD card so that all written data is flushed. / 15

9 Connect the Hardwares to Raspberry Pi
If your screen does not detect HDMI input automatically, switch the mode of the screen to HDMI. RPi will boot right after the power supply is connected. / 15

10 Boot Successfully The default user name is “pi”, and password is “raspberry”. Raspbian is an OS based on Debian. If you are familiar with Debian or Ubuntu, using Raspbian shouldn’t be a problem. / 15

11 Processor Instruction set architecture (ISA) and microarchitecture (uarch) ARMv8 has an Aarch32 mode which is compatible with ARMv7. Thus RPi 3 is able to run the same 32-bit Raspbian as RPi 2. If you run lscpu on RPi 2 (left) and RPi 3 (right), you may found the difference between CPU frequency. ISA uarch Raspberry Pi 2 ARMv7-A Cortex-A7 Raspberry Pi 3 64-bit ARMv8-A Cortex-A53 / 15

12 Firmware The official firmware of RPi is closed source, but its binary is freely redistributable and may be download on the official Github. The /boot directory in a separated partition comes from the official firmware. / 15

13 Boot Sequence When RPi is just turn on, the GPU core is on, but the ARM core and SDRAM is not available. GPU runs the 1st stage bootloader on ROM. The 1st stage bootloader loads the 2nd stage bootloader (bootcode.bin) from SD card to cache and passes control to it. bootcode.bin enables SDRAM, loads the GPU firmware (start.elf) from SD card to SDRAM, and passes control to it. start.elf reads the configuration files, loads kernel.img (in our case, the Linux kernel) from SD card to SDRAM, and resets the ARM core. The ARM core then runs the kernel on SDRAM. / 15

14 Lab Requirement Configure Raspbian to accomplish the following works. Check the official configuration page for help. Listening to music Outputting from either HDMI or the headphone jack is OK. Surfing PTT Change locale and install some fonts to display Chinese. The official documentation does not tell you about installing fonts, but it should be easy to google.  / 15

15 Reference Installing operating system images - Raspberry Pi Documentation Raspberry Pi – Wikipedia ARM architecture - Wikipedia Raspberry Pi Firmware Raspberry Pi boot process Configuration - Raspberry Pi Documentation / 15


Download ppt "Computer System Laboratory"

Similar presentations


Ads by Google