SAM9X5-CM: Difference between revisions
Initial import |
Note that Buildroot now also builds the SAM-BA host tool automatically |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{#vardefine:HARDWARE_NAME|SAM9X5-CM}} | {{#vardefine:HARDWARE_NAME|SAM9X5-CM}} | ||
{{#vardefine:CPU|AT91SAM9x5}} | {{#vardefine:CPU|AT91SAM9x5}} | ||
{{#vardefine:BRANCH|at91bootstrap-3.10.4_rnx}} | |||
{{ | {{#vardefine:DEFCONFIG_NAME|sam9x5_cm_nf_uboot_defconfig}} | ||
{{#vardefine:ARCH|arm}} | |||
{{#vardefine:CROSS_COMPILE|/opt/cross/arm-ronetix-eabi-8.3.0/bin/arm-ronetix-eabi-}} | |||
{{Summary SAM9 A5 | {{#var:HARDWARE_NAME}} | | |||
{{#var:HARDWARE_NAME}} is a System-on-module (SoM) board in SODIMM204 format designed for embedded applications. | {{#var:HARDWARE_NAME}} is a System-on-module (SoM) board in SODIMM204 format designed for embedded applications. | ||
<p> | <p> | ||
| Line 9: | Line 12: | ||
|SAM9-CM_top.png| | |SAM9-CM_top.png| | ||
https://ronetix.at/product/sam9x5-cm-cpu-module-with-atmel-at91sam9x5-series | https://ronetix.at/product/sam9x5-cm-cpu-module-with-atmel-at91sam9x5-series | ||
<p> | |||
Information about at91bootstrap, U-BOOT, Linux can be found here:<br> | |||
https://www.linux4sam.org/bin/view/Linux4SAM/LegacySAM9x5Page</p>| | |||
}} | }} | ||
= Building at91bootstrap - second level bootloader for {{#var:HARDWARE_NAME}} = | |||
This bootloader is based on https://github.com/linux4sam/at91bootstrap, branch at91bootstrap-3.x | |||
==== Setup the cross-compiler and CPU architecture ==== | |||
$ export ARCH={{#var:ARCH}} | |||
$ export CROSS_COMPILE={{#var:CROSS_COMPILE}} | |||
==== Clone the latest revision of the repo ==== | |||
$ git clone https://github.com/ronetix/at91bootstrap.git -b {{#var:BRANCH}} | |||
$ cd at91bootstrap | |||
==== Configure and build ==== | |||
$ make {{#var:DEFCONFIG_NAME}} | |||
$ make | |||
= Build Results = | |||
{| class="wikitable" | |||
|- | |||
! scope="col" | File Name | |||
! scope="col" | Description | |||
|- | |||
| style="padding: 5px;"| binaries/at91bootstrap.bin | |||
| style="padding: 5px;"| BIN image, should be programmed at address 0x0 | |||
|- | |||
| style="padding: 5px;"| binaries/at91bootstrap.elf | |||
| style="padding: 5px;"| ELF image used for JTAG debugging | |||
|- | |||
|} | |||
= Building Buildroot - a simple Linux System for {{#var:HARDWARE_NAME}} = | |||
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation.<br> | |||
The home page of Buildroot is: https://buildroot.org<br> | |||
The Buildroot user manual can help you better understand how Buildroot works: http://www.buildroot.net/downloads/manual/manual.html<br> | |||
The Buildroot for SAM9X5 is maintained by Microchip: https://github.com/linux4microchip/buildroot-mchp<br> | |||
Buildroot can build: | |||
* at91bootstrap | |||
* U-Boot | |||
* Linux kernel | |||
* A cross-compiler | |||
* Root filesystems of different types | |||
==== Prerequisites ==== | |||
The Host build system should be a Linux system with necessary software installed: | |||
http://www.buildroot.net/downloads/manual/manual.html#requirement<br> | |||
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 ==== | |||
$ mkdir buildroot-ronetix | |||
$ cd buildroot-ronetix | |||
$ git clone https://github.com/linux4microchip/buildroot-mchp.git | |||
$ git clone https://github.com/ronetix/br2-external-ronetix.git | |||
$ cd buildroot-mchp | |||
$ git switch -c linux4microchip-2026.04 linux4microchip-2026.04 | |||
==== Build ==== | |||
$ make BR2_EXTERNAL=../br2-external-ronetix sam9x5_cm_defconfig | |||
$ make | |||
==== Build Results ==== | |||
Once compilation is done, the images have been generated in: ./output/image:<br> | |||
* at91bootstrap.bin | |||
* rootfs.tar | |||
* u-boot.bin | |||
* zImage | |||
* at91sam9g15ek.dtb | |||
* at91sam9g25ek.dtb | |||
* at91sam9g35ek.dtb | |||
* at91sam9x25ek.dtb | |||
* at91sam9x35ek.dtb | |||
* rootfs.ubi | |||
* rootfs.ubifs | |||
The SAM-BA programming tool (used in the "Programming with SAM-BA 3.x" section below) is also built automatically by this defconfig and installed at:<br> | |||
* ./output/host/bin/sam-ba | |||
==== 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.<br> | |||
{| class="wikitable" | |||
|- | |||
! scope="col" | Address | |||
! scope="col" | Image | |||
! scope="col" | Note | |||
|- | |||
| style="padding: 5px;"| 0x00000000 | |||
| style="padding: 5px;"| boot.bin | |||
| style="padding: 5px;"| at91bootstrap | |||
|- | |||
| style="padding: 5px;"| 0x00020000 | |||
| style="padding: 5px;"| u-boot.bin | |||
| style="padding: 5px;"| U-BOOT, third level bootloader | |||
|- | |||
| style="padding: 5px;"| 0x00180000 | |||
| style="padding: 5px;"| at91sam9x35ek.dtb | |||
| style="padding: 5px;"| Device tree for Linux Kernel | |||
|- | |||
| style="padding: 5px;"| 0x00200000 | |||
| style="padding: 5px;"| zImage | |||
| style="padding: 5px;"| Linux Kernel | |||
|- | |||
| style="padding: 5px;"| 0x00800000 | |||
| style="padding: 5px;"| rootfs.ubi | |||
| style="padding: 5px;"| Root file system | |||
|- | |||
|} | |||
===== Programming with SAM-BA 3.x ===== | |||
$ sam-ba -p usb -b sam9xx5-ek -a lowlevel | |||
$ sam-ba -p usb -b sam9xx5-ek -a extram | |||
$ sam-ba -p usb -b sam9xx5-ek -a serialflash -c erase:0:0x10000 | |||
$ sam-ba -p usb -b sam9xx5-ek -a nandflash -c erase | |||
$ sam-ba -p usb -b sam9xx5-ek -a nandflash -c writeboot:boot.bin | |||
$ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:u-boot.bin:0x40000 | |||
$ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:at91sam9x35ek.dtb:0x180000 | |||
$ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:zImage:0x200000 | |||
$ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:rootfs.ubi:0x800000 | |||
More information about SAM-BA 3.x can be found here:<br> | |||
https://www.linux4sam.org/bin/view/Linux4SAM/Samba3Subsections | |||
Latest revision as of 15:41, 15 September 2026
|
SAM9X5-CM is a System-on-module (SoM) board in SODIMM204 format designed for embedded applications. SAM9X5-CM is using the Microchip (ATMEL) AT91SAM9x5 CPU with an ARM926EJ CPU running at 400MHz Product Info: https://ronetix.at/product/sam9x5-cm-cpu-module-with-atmel-at91sam9x5-series
Information about at91bootstrap, U-BOOT, Linux can be found here: |
Building at91bootstrap - second level bootloader for SAM9X5-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 sam9x5_cm_nf_uboot_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 SAM9X5-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 SAM9X5 is maintained by Microchip: https://github.com/linux4microchip/buildroot-mchp
Buildroot can build:
- at91bootstrap
- U-Boot
- Linux kernel
- A cross-compiler
- Root filesystems of different types
Prerequisites
The Host build system should be a Linux system with necessary software installed:
http://www.buildroot.net/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
$ mkdir buildroot-ronetix $ cd buildroot-ronetix $ git clone https://github.com/linux4microchip/buildroot-mchp.git $ git clone https://github.com/ronetix/br2-external-ronetix.git
$ cd buildroot-mchp $ git switch -c linux4microchip-2026.04 linux4microchip-2026.04
Build
$ make BR2_EXTERNAL=../br2-external-ronetix sam9x5_cm_defconfig $ make
Build Results
Once compilation is done, the images have been generated in: ./output/image:
- at91bootstrap.bin
- rootfs.tar
- u-boot.bin
- zImage
- at91sam9g15ek.dtb
- at91sam9g25ek.dtb
- at91sam9g35ek.dtb
- at91sam9x25ek.dtb
- at91sam9x35ek.dtb
- rootfs.ubi
- rootfs.ubifs
The SAM-BA programming tool (used in the "Programming with SAM-BA 3.x" section below) is also built automatically by this defconfig and installed at:
- ./output/host/bin/sam-ba
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.
| Address | Image | Note |
|---|---|---|
| 0x00000000 | boot.bin | at91bootstrap |
| 0x00020000 | u-boot.bin | U-BOOT, third level bootloader |
| 0x00180000 | at91sam9x35ek.dtb | Device tree for Linux Kernel |
| 0x00200000 | zImage | Linux Kernel |
| 0x00800000 | rootfs.ubi | Root file system |
Programming with SAM-BA 3.x
$ sam-ba -p usb -b sam9xx5-ek -a lowlevel $ sam-ba -p usb -b sam9xx5-ek -a extram $ sam-ba -p usb -b sam9xx5-ek -a serialflash -c erase:0:0x10000 $ sam-ba -p usb -b sam9xx5-ek -a nandflash -c erase $ sam-ba -p usb -b sam9xx5-ek -a nandflash -c writeboot:boot.bin $ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:u-boot.bin:0x40000 $ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:at91sam9x35ek.dtb:0x180000 $ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:zImage:0x200000 $ sam-ba -p usb -b sam9xx5-ek -a nandflash -c write:rootfs.ubi:0x800000
More information about SAM-BA 3.x can be found here:
https://www.linux4sam.org/bin/view/Linux4SAM/Samba3Subsections
