SAMA5D3X-CM: Difference between revisions

From Ronetix's Wiki
Jump to navigation Jump to search
Change GitHub path for at91bootstrap
Change to Ronetix's buildroot-mchp.git which uses PMECC 8-bits
Line 61: Line 61:
Buildroot can build:
Buildroot can build:
* at91bootstrap
* at91bootstrap
* u-boot-at91
* U-BOOT
* linux-at91
* Linux Kernel
* A cross-compiler
* A cross-compiler
* Root filesystems of different types
* Root filesystems of different types
Line 74: Line 74:


==== Get sources ====
==== Get sources ====
  $ git clone https://github.com/linux4sam/buildroot-at91.git
  $ git clone https://github.com/ronetix/buildroot-mchp.git
$ git clone https://github.com/linux4microchip/buildroot-external-microchip.git
  $ cd buildroot-mchp
 
  $ cd buildroot-external-microchip/
$ git checkout linux4microchip-2022.10 -b buildroot-external-microchip-linux4microchip-2022.10
 
$ cd ../buildroot-at91/
$ git checkout linux4sam-2022.10 -b buildroot-at91-linux4sam-2022.10


==== Build ====
==== Build ====
Line 104: Line 98:
==== Customizing Buildroot ====
==== Customizing Buildroot ====
===== AT91Bootstrap =====
===== AT91Bootstrap =====
  $ BR2_EXTERNAL=../buildroot-external-microchip/ at91bootstrap3-menuconfig
  $ make at91bootstrap3-menuconfig


===== U-BOOT =====
===== U-BOOT =====
  $ BR2_EXTERNAL=../buildroot-external-microchip/ make uboot-menuconfig
  $ make uboot-menuconfig


===== Linux Kernel =====
===== Linux Kernel =====
  $ BR2_EXTERNAL=../buildroot-external-microchip/ make linux-menuconfig
  $ make linux-menuconfig


===== RootFs =====
===== RootFs =====
  $ BR2_EXTERNAL=../buildroot-external-microchip/ make menuconfig
  $ make menuconfig


==== NAND Boot: Programming images ====
==== NAND Boot: Programming images ====
SAM-BA tool or PEEDI JTAG Flash Programmer can be used for programming the images into the NAND Flash.<br>
SAM-BA tool or PEEDI JTAG Flash Programmer can be used for programming the images into the NAND Flash.<br>
All images should be programmed with 4-bit ECC.
All images should be programmed with 8-bit ECC.
{| class="wikitable"
{| class="wikitable"
|-
|-

Revision as of 13:40, 24 February 2025




SAMA5D3X-CM is a System-on-module (SoM) board in SODIMM204 format designed for embedded applications.

SAMA5D3X-CM is using the Microchip (ATMEL) ATSAMA5D3X CPU with a CORTEX-A5 CPU running at 536MHz

Product Info: https://ronetix.at/product/sama5d3x-cm-cpu-module-with-atmel-sama5d3-series

Information about at91bootstrap, U-BOOT, Linux can be found here:
https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d3xekMainPage

Building at91bootstrap - second level bootloader for SAMA5D3X-CM

This bootloader is based on https://github.com/linux4sam/at91bootstrap, branch at91bootstrap-3.x

Setup the cross-compiler and CPU architecture

$ export ARCH=arm
$ export CROSS_COMPILE=/opt/cross/arm-ronetix-eabi-8.3.0/bin/arm-ronetix-eabi-

Clone the latest revision of the repo

$ git clone https://github.com/ronetix/at91bootstrap.git -b at91bootstrap-3.10.4_rnx
$ cd at91bootstrap

Configure and build

$ make sama5d3x_cm_nf_uboot_defconfig
$ make

Alternative: Configure and build with GPIO test

This requires a special prepared Ronetix's carrier board with shorted pin pairs. Used for production tests.

$ make sama5d3x_cm_gpio_test_defconfig
$ make

Build Results

File Name Description
binaries/at91bootstrap.bin BIN image, should be programmed at address 0x0
binaries/at91bootstrap.elf ELF image used for JTAG debugging

Building Buildroot - a simple Linux System for SAMA5D3X-CM

Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation.
The home page of Buildroot is: https://buildroot.org
The Buildroot user manual can help you better understand how Buildroot works: http://www.buildroot.net/downloads/manual/manual.html
The Buildroot for SAMA5D3x is maintained by Microchip: https://www.linux4sam.org/bin/view/Linux4SAM/BuildRoot

Buildroot can build:

  • at91bootstrap
  • U-BOOT
  • Linux Kernel
  • A cross-compiler
  • Root filesystems of different types

Prerequisites

Host build system should be a Linux system with necessary software installed: http://buildroot.uclibc.org/downloads/manual/manual.html#requirement
In addition to these required packages, you should also install libssl-dev:

$ sudo apt-get install libssl1.0-dev

or, depending on your host distribution:

$ sudo apt-get install libssl-dev

Get sources

$ git clone https://github.com/ronetix/buildroot-mchp.git
$ cd buildroot-mchp

Build

$ make atmel_sama5d3xek_defconfig
$ make

Once compilation is done, the images have been generated in: ./output/image:

  • at91bootstrap.bin
  • rootfs.tar
  • u-boot.bin
  • u-boot-spl.bin
  • zImage
  • sama5d31ek.dtb
  • sama5d33ek.dtb
  • sama5d34ek.dtb
  • sama5d35ek.dtb
  • sama5d36ek.dtb
  • rootfs.ubi
  • rootfs.ubifs


Customizing Buildroot

AT91Bootstrap
$ make at91bootstrap3-menuconfig
U-BOOT
$ make uboot-menuconfig
Linux Kernel
$ make linux-menuconfig
RootFs
$ make menuconfig

NAND Boot: Programming images

SAM-BA tool or PEEDI JTAG Flash Programmer can be used for programming the images into the NAND Flash.
All images should be programmed with 8-bit ECC.

Address Image Note
0x00000000 boot.bin at91bootstrap, programmed with header 0xc0902405
0x00040000 u-boot.bin U-BOOT, third level bootloader
0x00180000 sama5d35ek.dtb Device tree for Linux Kernel
0x00200000 zImage Linux Kernel
0x00F80000 rootfs.ubi Root file system