Giter Club home page Giter Club logo

meta-andes's Introduction

Andes OpenEmbedded/Yocto Layer

This layer provides machine configurations and recipes for building the bootable disk image with AndeSight Linux packages.

Supported AndesCore™ Processors

Building SD Card Image with kas-container

kas-container provides a Yocto development environment based on the Debian docker image. Before you proceed with the build process, make sure to have Docker installed on your host machine.

$ mkdir riscv-andes && cd riscv-andes
$ git clone https://github.com/andestech/meta-andes.git -b ast-v5_3_0-branch
$ wget https://raw.githubusercontent.com/siemens/kas/4.1/kas-container
$ chmod a+x ./kas-container

AndeSight v5.3.0 includes OpenSBI, U-Boot and Linux source based on the following versions.

And, its RISC-V GNU toolchain versions are as follows:

  • GCC 13.2.0
  • Binutils 2.41

To build a Poky distro, follow below (using ae350-ax45mp as an example):

$ ./kas-container build meta-andes/kas/ae350-ax45mp.yml

Build Results

Find the built image, bootloader binaries and boot files generated in build/tmp/deploy/images/, such as

  • core-image-base-ae350-ax45mp.rootfs.wic.gz
  • fitImage
  • ax45mp_c4_d_dsp_ae350.dtb
  • boot.scr.uimg
  • uEnv.txt
  • u-boot-spl.bin
  • u-boot.itb

Flashing Image to SD Card

Use the Linux dd command to flash the image to an SD card.

$ gunzip -c <IMAGE>.wic.gz | sudo dd of=/dev/sdX bs=4M iflag=fullblock oflag=direct conv=fsync status=progress && sync

You can also use the belenaEther GUI to flash the image on Windows and macOS.

Next, insert the SD card, access the serial console with the baud rate settings 38400/8-N-1, and then reset the board. It will boot the target from MMC and load fw_dynamic.bin and u-boot.bin from u-boot.itb in the first partition.

(Optional) Updating U-Boot SPL, U-Boot ITB and Device Tree on Flash

If you want to update the bootloader, find the XIP mode SPL (u-boot-spl.bin), ITB (u-boot.itb) and device tree blob needed to be burned to the flash in the first partition. You can then burn the images using the sf command in the U-Boot prompt as follows, or alternatively using the SPI_Burn tool. (Please note that U-Boot SPL is prioritized to use u-boot.itb in the first partition of SD card. If it cannot be found, it will use the one burned to the flash.)

RISC-V # fatload mmc 0:1 0x600000 u-boot-spl.bin
RISC-V # sf probe 0:0 50000000 0
RISC-V # sf erase 0x0 0x10000
RISC-V # sf write 0x600000 0x0 0x10000

RISC-V # fatload mmc 0:1 0x600000 u-boot.itb
RISC-V # sf probe 0:0 50000000 0
RISC-V # sf erase 0x10000 0xa0000
RISC-V # sf write 0x600000 0x10000 0xa0000

RISC-V # fatload mmc 0:1 0x20000000 <DTB>
RISC-V # sf probe 0:0 50000000 0
RISC-V # sf erase 0xf0000 0x10000
RISC-V # sf write 0x20000000 0xf0000 0x10000

Reset the Board via GDB

Set <TARGET_IP> to the IP address of the ICEman host.

$ $GDB -ex "target remote <TARGET_IP>:<PORT>" \
       -ex "set confirm off" \
       -ex "set pagination off" \
       -ex "monitor reset halt" \
       -ex "set \$ra=0" \
       -ex "set \$sp=0" \
       -ex "flushregs" \
       -ex "c"

meta-andes's People

Contributors

lyctw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

lyctw

meta-andes's Issues

希望能早点能支持ae350 A25 machine

这个版本只能支持ae350-ax45mp machine,希望能早点能支持ae350 A25 machine,我比较习惯使用yocto构建linux系统,应该其他人也有这个需求。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.