2020年12月29日 星期二

Raspberry Pi Zero W Project Part 0.5 - Documents

Documents

Before starting the project, to collect documents is an important things. 

It is important to study document before and during implementation.

The documents needed in the project are:

1. Raspberry Pi's Official Documents

2. Broadcom BCM2835 Peripheral specification

3. ARM1176

BCM2825 Address Space



It is important to know the address view of CPU and VPU/GPU. You have to know the difference between physical address and bus address of BCM2835. Otherwise you can't get hardware work correctly.

Why Raspberry Pi Zero WH?

The reasons of selecting RPi ZW as my project platform are:

  1. cheap, easy to get one, ARMv6 provides enough features of modern ARM Application processors.
  2. single core, simple & good for teaching / practice.
  3. low power, RPi ZW can be powered by almost any USB slot.
  4. RPi has a lot of documents / projects / implementations for reference.

What's in Next?

In next part, simple assembly programming on RPi Zero W will be introduced. We need to use assembly to implement some important parts of OS and bootloader.

2020年12月27日 星期日

Raspberry Pi Zero W Project Part 0 - u-boot building / testing

 1. Raspberry Pi (Pre-4B) Boot Sequence

Currently, loader.bin is not needed.

2. Boot from SD - from power-on to bootcode.bin


 

3. Toolchain 

GNU Arm Embedded Toolchain - Download

4. u-boot

$ sudo apt-get install flex bison

$ git clone https://github.com/u-boot/u-boot; cd u-boot

$ export PATH=PATH_TO_TOOLCHAIN/gcc-arm-none-eabi-10-2020-q4-major/bin/:$PATH

$ export CROSS_COMPILE=arm-none-eabi-

$ make rpi_0_w_defconfig

$ make -s -j4; cp ./u-boot.bin PATH_TO_SDCARD

5. booting

config.txt:

enable_uart=1
uart_2ndstage=1
kernel=u-boot.bin



在 ARM 平台上使用 Function Multi-Versioning (FMV) - 以使用 Android NDK 為例

Function Multi-Versioning (FMV) 過往的 CPU 發展歷程中, x86 平台由於因應各種應用需求的提出, 而陸陸續續加入了不同的指令集, 此外也可能因為針對市場做等級區隔, 支援的數量與種類也不等. 在 Linux 平台上這些 CPU 資訊可以透過...