Move all to deprecated folder.

This commit is contained in:
2016-11-16 21:57:57 +01:00
parent 01738a7684
commit 05de7d6c04
9777 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
CONFIG_EXPERIMENTAL=y
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_KERNEL_LZO=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_AT91=y
CONFIG_ARCH_AT91SAM9260=y
CONFIG_ARCH_AT91SAM9260_SAM9XE=y
CONFIG_MACH_AT91SAM9260EK=y
CONFIG_MACH_CAM60=y
CONFIG_MACH_SAM9_L9260=y
CONFIG_MACH_AFEB9260=y
CONFIG_MACH_USB_A9260=y
CONFIG_MACH_QIL_A9260=y
CONFIG_MACH_CPU9260=y
CONFIG_MACH_FLEXIBITY=y
CONFIG_MACH_SNAPPER_9260=y
CONFIG_MACH_AT91SAM_DT=y
CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
# CONFIG_ARM_THUMB is not set
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw"
CONFIG_FPE_NWFPE=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_IPV6 is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_ATMEL=y
CONFIG_MTD_UBI=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_MULTI_LUN=y
CONFIG_NETDEVICES=y
CONFIG_MII=y
CONFIG_MACB=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
CONFIG_SERIAL_ATMEL=y
CONFIG_SERIAL_ATMEL_CONSOLE=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_GPIO=y
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_NOWAYOUT=y
CONFIG_AT91SAM9X_WATCHDOG=y
# CONFIG_USB_HID is not set
CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_MON=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_GADGET=y
CONFIG_USB_ZERO=m
CONFIG_USB_GADGETFS=m
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_AT91SAM9=y
CONFIG_EXT2_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_UBIFS_FS=y
CONFIG_CRAMFS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_ISO8859_1=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_LL=y

View File

@@ -0,0 +1,136 @@
#!/usr/bin/env bash
BUILDIR=$1
TTY=$2
BOARD=$3
family_at91sam9g45m10ek="at91sam9m10g45ek"
mach_at91sam9g45m10ek="at91sam9m10-g45-ek"
dtb_at91sam9g45m10ek="at91sam9m10g45ek.dtb"
family_at91sam9rlek="at91sam9rlek"
mach_at91sam9rlek="at91sam9rl64-ek"
dtb_at91sam9rlek="at91sam9rlek.dtb"
family_at91sam9g15ek="at91sam9x5ek"
mach_at91sam9g15ek="at91sam9g15-ek"
dtb_at91sam9g15ek="at91sam9g15ek.dtb"
family_at91sam9g25ek="at91sam9x5ek"
mach_at91sam9g25ek="at91sam9g25-ek"
dtb_at91sam9g25ek="at91sam9g25ek.dtb"
family_at91sam9g35ek="at91sam9x5ek"
mach_at91sam9g35ek="at91sam9g35-ek"
dtb_at91sam9g35ek="at91sam9g35ek.dtb"
family_at91sam9x25ek="at91sam9x5ek"
mach_at91sam9x25ek="at91sam9x25-ek"
dtb_at91sam9x25ek="at91sam9x25ek.dtb"
family_at91sam9x35ek="at91sam9x5ek"
mach_at91sam9x35ek="at91sam9x35-ek"
dtb_at91sam9x35ek="at91sam9x35ek.dtb"
family_sama5d31ek="sama5d3xek"
mach_sama5d31ek="at91sama5d3x-ek"
dtb_sama5d31ek="sama5d31ek.dtb"
family_sama5d31ek_revc="sama5d3xek"
mach_sama5d31ek_revc="at91sama5d3x-ek"
dtb_sama5d31ek_revc="sama5d31ek_revc.dtb"
family_sama5d33ek="sama5d3xek"
mach_sama5d33ek="at91sama5d3x-ek"
dtb_sama5d33ek="sama5d33ek.dtb"
family_sama5d33ek_revc="sama5d3xek"
mach_sama5d33ek_revc="at91sama5d3x-ek"
dtb_sama5d33ek_revc="sama5d33ek_revc.dtb"
family_sama5d34ek="sama5d3xek"
mach_sama5d34ek="at91sama5d3x-ek"
dtb_sama5d34ek="sama5d34ek.dtb"
family_sama5d34ek_revc="sama5d3xek"
mach_sama5d34ek_revc="at91sama5d3x-ek"
dtb_sama5d34ek_revc="sama5d34ek_revc.dtb"
family_sama5d35ek="sama5d3xek"
mach_sama5d35ek="at91sama5d3x-ek"
dtb_sama5d35ek="sama5d35ek.dtb"
family_sama5d35ek_revc="sama5d3xek"
mach_sama5d35ek_revc="at91sama5d3x-ek"
dtb_sama5d35ek_revc="sama5d35ek_revc.dtb"
family_sama5d36ek="sama5d3xek"
mach_sama5d36ek="at91sama5d3x-ek"
dtb_sama5d36ek="sama5d36ek.dtb"
family_sama5d36ek_revc="sama5d3xek"
mach_sama5d36ek_revc="at91sama5d3x-ek"
dtb_sama5d36ek_revc="sama5d36ek_revc.dtb"
family_sama5d3_xplained="sama5d3_xplained"
mach_sama5d3_xplained="at91sama5d3x-xplained"
dtb_sama5d3_xplained="at91-sama5d3_xplained.dtb"
family_sama5d4ek="sama5d4ek"
mach_sama5d4ek="at91sama5d4x-ek"
dtb_sama5d4ek="at91-sama5d4ek.dtb"
family_sama5d4_xplained="sama5d4_xplained"
mach_sama5d4_xplained="at91sama5d4x-ek"
dtb_sama5d4_xplained="at91-sama5d4_xplained.dtb"
usage() {
cat << EOF
Usage:
$0 <builddir_path> <interface> <board>
Available boards:
at91sam9g45m10ek
at91sam9rlek
at91sam9g15ek
at91sam9g25ek
at91sam9x25ek
at91sam9g35ek
at91sam9x35ek
sama5d31ek
sama5d33ek
sama5d34ek
sama5d35ek
sama5d36ek
sama5d31ek_revc (Until rev. C)
sama5d33ek_revc (Until rev. C)
sama5d34ek_revc (Until rev. C)
sama5d35ek_revc (Until rev. C)
sama5d36ek_revc (Until rev. C)
sama5d3_xplained
sama5d4ek
sama5d4_xplained
Example:
$0 ./output /dev/ttyACM0 at91sam9g45m10ek
EOF
}
F="family_$BOARD"
M="mach_$BOARD"
D="dtb_$BOARD"
if [[ $# != 3 || -z ${!F} ]]; then
usage
exit 1
fi
video_mode="video=LVDS-1:800x480-16"
if [[ $BOARD == "*pda4" ]]; then
video_mode="video=LVDS-1:480x272-16"
fi
echo "Executing: ${!F} O=$1/images $1/host/opt/sam-ba/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl -- ${!F} ${!D} $video_mode"
export O=$1/images
$1/host/opt/sam-ba/sam-ba $TTY ${!M} $(dirname $0)/nandflash.tcl -- ${!F} ${!D} $video_mode

View File

@@ -0,0 +1,358 @@
# ----------------------------------------------------------------------------
# ATMEL Microcontroller
# ----------------------------------------------------------------------------
# Copyright (c) 2015, Atmel Corporation
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the disclaimer below.
#
# Atmel's name may not be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
# DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# ----------------------------------------------------------------------------
################################################################################
# Script data
################################################################################
# DBGU address for rm9200, 9260/9g20, 9261/9g10, 9rl, 9x5
set at91_base_dbgu0 0xfffff200
# DBGU address for 9263, 9g45, sama5d3
set at91_base_dbgu1 0xffffee00
# DBGU address for sama5d4
set at91_base_dbgu2 0xfc069000
set arch_exid_offset 0x44
# arch id
set arch_id_at91sam9g20 0x019905a0
set arch_id_at91sam9g45 0x819b05a0
set arch_id_at91sam9x5 0x819a05a0
set arch_id_at91sam9n12 0x819a07a0
set arch_id_sama5d3 0x8a5c07c0
## Find out at91sam9x5 variant to load the corresponding dtb file
array set at91sam9x5_variant {
0x00000000 at91sam9g15
0x00000001 at91sam9g35
0x00000002 at91sam9x35
0x00000003 at91sam9g25
0x00000004 at91sam9x25
}
## Find out sama5d3 variant to load the corresponding dtb file
array set sama5d3_variant {
0x00444300 sama5d31
0x00414300 sama5d33
0x00414301 sama5d34
0x00584300 sama5d35
0x00004301 sama5d36
}
## Find out sama5d4 variant
array set sama5d4_variant {
0x00000001 sama5d41
0x00000002 sama5d42
0x00000003 sama5d43
0x00000004 sama5d44
}
################################################################################
# proc uboot_env: Convert u-boot variables in a string ready to be flashed
# in the region reserved for environment variables
################################################################################
proc set_uboot_env {nameOfLstOfVar} {
upvar $nameOfLstOfVar lstOfVar
# sector size is the size defined in u-boot CFG_ENV_SIZE
set sectorSize [expr 0x20000 - 5]
set strEnv [join $lstOfVar "\0"]
while {[string length $strEnv] < $sectorSize} {
append strEnv "\0"
}
# \0 between crc and strEnv is the flag value for redundant environment
set strCrc [binary format i [::vfs::crc $strEnv]]
return "$strCrc\0$strEnv"
}
################################################################################
proc find_variant_name {boardType} {
global at91_base_dbgu0
global at91_base_dbgu1
global at91_base_dbgu2
global arch_exid_offset
global at91sam9x5_variant
global sama5d3_variant
global sama5d4_variant
set socName "none"
switch $boardType {
at91sam9x5ek {
set exidAddr [expr {$at91_base_dbgu0 + $arch_exid_offset}]
set chip_variant [format "0x%08x" [read_int $exidAddr]]
foreach {key value} [array get at91sam9x5_variant] {
if {$key == $chip_variant} {
set socName "$value"
break;
}
}
}
sama5d3xek {
set exidAddr [expr {$at91_base_dbgu1 + $arch_exid_offset}]
set chip_variant [format "0x%08x" [read_int $exidAddr]]
foreach {key value} [array get sama5d3_variant] {
#puts "-I- === $chip_variant ? $key ($value) ==="
if {$key == $chip_variant} {
set socName "$value"
break;
}
}
}
sama5d3_xplained {
set exidAddr [expr {$at91_base_dbgu1 + $arch_exid_offset}]
set chip_variant [format "0x%08x" [read_int $exidAddr]]
foreach {key value} [array get sama5d3_variant] {
#puts "-I- === $chip_variant ? $key ($value) ==="
if {$key == $chip_variant} {
set socName "$value"
break;
}
}
}
sama5d4ek {
set exidAddr [expr {$at91_base_dbgu2 + $arch_exid_offset}]
set chip_variant [format "0x%08x" [read_int $exidAddr]]
foreach {key value} [array get sama5d4_variant] {
#puts "-I- === $chip_variant ? $key ($value) ==="
if {$key == $chip_variant} {
set socName "$value"
break;
}
}
}
sama5d4_xplained {
set exidAddr [expr {$at91_base_dbgu2 + $arch_exid_offset}]
set chip_variant [format "0x%08x" [read_int $exidAddr]]
foreach {key value} [array get sama5d4_variant] {
#puts "-I- === $chip_variant ? $key ($value) ==="
if {$key == $chip_variant} {
set socName "$value"
break;
}
}
}
}
return "$socName"
}
proc find_variant_ecc {boardType} {
set eccType "none"
switch $boardType {
at91sam9x5ek {
set eccType 0xc0c00405
}
at91sam9n12ek {
set eccType 0xc0c00405
}
sama5d3xek {
set eccType 0xc0902405
}
sama5d3_xplained {
set eccType 0xc0902405
}
sama5d4ek {
set eccType 0xc1e04e07
}
sama5d4_xplained {
set eccType 0xc1e04e07
}
}
puts "-I- === eccType is $eccType ==="
return $eccType
}
proc get_kernel_load_addr {boardType} {
set kernel_load_addr 0x22000000
switch $boardType {
at91sam9m10g45ek {
set kernel_load_addr 0x72000000
}
}
return $kernel_load_addr
}
proc get_dtb_load_addr {boardType} {
set dtb_load_addr 0x21000000
switch $boardType {
at91sam9m10g45ek {
set dtb_load_addr 0x71000000
}
}
return $dtb_load_addr
}
################################################################################
# Main script: Load the linux demo in NandFlash,
# Update the environment variables
################################################################################
################################################################################
# check for proper variable initialization
if {! [info exists boardFamily]} {
puts "-I- === Parsing script arguments ==="
if {! [info exists env(O)]} {
puts "-E- === Binaries path not defined ==="
exit
}
set bootstrapFile "$env(O)/at91bootstrap.bin"
set ubootFile "$env(O)/u-boot.bin"
set kernelFile "$env(O)/zImage"
set rootfsFile "$env(O)/rootfs.ubi"
set build_uboot_env "yes"
set i 1
foreach arg $::argv {
puts "argument $i is $arg"
switch $i {
4 { set boardFamily $arg }
5 { set dtbFile "$env(O)/$arg" }
6 { set videoMode $arg }
}
incr i
}
}
puts "-I- === Board Family is $boardFamily ==="
set pmeccConfig [find_variant_ecc $boardFamily]
## Now check for the needed files
if {! [file exists $bootstrapFile]} {
puts "-E- === AT91Bootstrap file not found ==="
exit
}
if {! [file exists $ubootFile]} {
puts "-E- === U-Boot file not found ==="
exit
}
if {! [file exists $kernelFile]} {
puts "-E- === Linux kernel file not found ==="
exit
}
if {! [file exists $dtbFile]} {
puts "-E- === Device Tree binary: $dtbFile file not found ==="
exit
}
if {! [file exists $rootfsFile]} {
puts "-E- === Rootfs file not found ==="
exit
}
## NandFlash Mapping
set bootStrapAddr 0x00000000
set ubootAddr 0x00040000
set ubootEnvAddr 0x000c0000
set dtbAddr 0x00180000
set kernelAddr 0x00200000
set rootfsAddr 0x00800000
## u-boot variable
set kernelLoadAddr [get_kernel_load_addr $boardFamily]
set dtbLoadAddr [get_dtb_load_addr $boardFamily]
## NandFlash Mapping
set kernelSize [format "0x%08X" [file size $kernelFile]]
set dtbSize [format "0x%08X" [file size $dtbFile]]
set bootCmd "bootcmd=nand read $dtbLoadAddr $dtbAddr $dtbSize; nand read $kernelLoadAddr $kernelAddr $kernelSize; bootz $kernelLoadAddr - $dtbLoadAddr"
set rootfsSize [format "0x%08X" [file size $rootfsFile]]
lappend u_boot_variables \
"bootdelay=1" \
"baudrate=115200" \
"stdin=serial" \
"stdout=serial" \
"stderr=serial" \
"bootargs=console=ttyS0,115200 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw $videoMode" \
"$bootCmd"
## Additional files to load
set ubootEnvFile "ubootEnvtFileNandFlash.bin"
## Start flashing procedure ##################################################
puts "-I- === Initialize the NAND access ==="
NANDFLASH::Init
if {$pmeccConfig != "none"} {
puts "-I- === Enable PMECC OS Parameters ==="
NANDFLASH::NandHeaderValue HEADER $pmeccConfig
}
puts "-I- === Erase all the NAND flash blocs and test the erasing ==="
NANDFLASH::EraseAllNandFlash
puts "-I- === Load AT91Bootstrap in the first sector ==="
if {$pmeccConfig != "none"} {
NANDFLASH::SendBootFilePmeccCmd $bootstrapFile
} else {
NANDFLASH::sendBootFile $bootstrapFile
}
puts "-I- === Load u-boot in the next sectors ==="
send_file {NandFlash} "$ubootFile" $ubootAddr 0
if {$build_uboot_env == "yes"} {
puts "-I- === Load the u-boot environment variables ==="
set fh [open "$ubootEnvFile" w]
fconfigure $fh -translation binary
puts -nonewline $fh [set_uboot_env u_boot_variables]
close $fh
send_file {NandFlash} "$ubootEnvFile" $ubootEnvAddr 0
}
puts "-I- === Load the Kernel image and device tree database ==="
send_file {NandFlash} "$dtbFile" $dtbAddr 0
send_file {NandFlash} "$kernelFile" $kernelAddr 0
if {$pmeccConfig != "none"} {
puts "-I- === Enable trimffs ==="
NANDFLASH::NandSetTrimffs 1
}
puts "-I- === Load the linux file system ==="
send_file {NandFlash} "$rootfsFile" $rootfsAddr 0
puts "-I- === DONE. ==="

View File

@@ -0,0 +1,107 @@
Flashing the NAND using SAM-BA
==============================
This document explains how to flash a basic Buildroot system on various
Atmel boards. Additional details can
also be found on the Linux4SAM website, in particular here:
http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted
This guide covers the following configurations:
- at91sam9g45m10ek_defconfig
- at91sam9rlek_defconfig
- at91sam9x5ek_defconfig (at91sam9g15, at91sam9g25, at91sam9x25,
at91sam9g35 and at91sam9x35)
- atmel_sama5d3xek_defconfig (sama5d31, sama5d33, sama5d34, sama5d35,
sama5d36)
- atmel_sama5d3_xplained_defconfig
- atmel_sama5d4ek_defconfig
- atmel_sama5d4_xplained_defconfig
These configurations will use AT91Bootstrap, u-boot and a linux kernel from
the git trees maintained by Atmel. They also build u-boot SPL when
available, it can replace AT91Bootstrap.
Configuring and building Buildroot
----------------------------------
make <board>_defconfig
make
Flashing the board
------------------
Connect the board:
o at91sam9g45m10ek: DBGU: J10, USB sam-ba: J14
o at91sam9rlek: DBGU: J19, USB sam-ba: J21
o at91sam9x5ek: DBGU: J11, USB sam-ba: J20
o sama5d3xek: DBGU: J14, USB sam-ba: J20
o sama5d3 Xplained: DBGU: J23, USB sam-ba: J6
o sama5d4ek: DBGU: J22 or J24, USB sam-ba: J1
o sama5d4 Xplained: DBGU: J1, USB sam-ba: J11
Start the board in RomBOOT:
o at91sam9g45m10ek:
1. open JP8, JP10 and JP12
2. start the board
3. close JP8, JP10 and JP12
o at91sam9rlek:
1. J11 on 1-2 (BMS=1), open J12 and J13
2. start the board
3. close J12 and J13
o at91sam9x5ek:
1. open JP9 and:
- Cogent: open *NCS jumper
- Embest: open SW1
- Ronetix: open J1 and J2
2. start the board
3. close JP9 and:
- Cogent: close *NCS jumper
- Embest: close SW1 (ON position)
- Ronetix: close J1 and J2
o sama5d3xek:
1. start the board
2. push BP4 and BP1
3. release BP1
4. release BP4
o sama5d3 Xplained:
1. open JP5 (NANDCS) and JP6 (SPICS)
2. start the board
3. close JP5 ans JP6
o sama5d4ek:
1. start the board
2. push BP3 and BP4
3. release BP4
4. release BP3
o sama5d4 Xplained:
1. close JP7 (BOOT_DIS)
2. start the board
3. open JP7
"RomBOOT" should appear on your console (this should be ttyUSBx or ttyACMx)
Now locate the USB sam-ba interface it should be ttyACMx, usually ttyACM0
dmesg on your machine should give:
usb 1-2.1.4: New USB device found, idVendor=03eb, idProduct=6124
usb 1-2.1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
cdc_acm 1-2.1.4:1.0: ttyACM0: USB ACM device
Look for idVendor=03eb, idProduct=6124, this is the interface you want to use.
You can then flash the board using the provided flasher.sh script in board/atmel:
board/atmel/flasher.sh <builddir_path> <interface> <board>
For example, for an out of tree build made in
/tmp/atmel_sama5d3_xplained/ for the sama5d3 Xplained, you would use:
board/atmel/flasher.sh /tmp/atmel_sama5d3_xplained/ /dev/ttyACM0 sama5d3_xplained
Reboot, the system should boot up to the buildroot login invite.

View File

@@ -0,0 +1,73 @@
Atmel SAMA5D3 Xplained board
============================
This document explains how to set up a basic Buildroot system on the
Atmel SAMA5D3 Xplained board, whose main site is
http://www.atmel.com/tools/ATSAMA5D3-XPLD.aspx. Additional details can
also be found on the http://www.at91.com/linux4sam/bin/view/Linux4SAM/
web site.
Note that the default Buildroot configuration is prepared to boot from
an SD card: the first stage bootloader, second stage bootloader,
kernel image and root filesystem are all located on the SD card. Some
adjustments in the bootloader configuration will be needed to boot
from NAND flash, see board/atmel/readme.txt
Configuring and building Buildroot
----------------------------------
make atmel_sama5d3_xplained_mmc_defconfig
make
Preparing the SD card
---------------------
The SD card must be partitioned with at least two partitions: one
FAT16 partition for the bootloaders, kernel image and Device Tree
blob, and one ext4 partition for the root filesystem. To partition the
SD card:
sudo sfdisk -uM /dev/mmcblk0 <<EOF
,64,6
;
EOF
This creates a 64 MB partition for the FAT16 filesystem (type 6) and
uses the rest for the ext4 filesystem used for the root filesystem.
Then, format both partitions:
sudo mkfs.msdos -n boot /dev/mmcblk0p1
sudo mkfs.ext4 -L rootfs -O ^huge_file /dev/mmcblk0p2
Note: the -O ^huge_file option is needed to avoid enabling the huge
files features of ext4 (to support files larges than 2 TB), which
needs the kernel option CONFIG_LBDAF to be enabled.
Mount both partitions (if not done automatically by your system):
sudo mount /dev/mmcblk0p1 /media/boot
sudo mount /dev/mmcblk0p2 /media/rootfs
Copy the bootloaders, kernel image and Device Tree blob to the first
partition:
cp output/images/u-boot-spl.bin /media/boot/boot.bin
cp output/images/u-boot.img /media/boot/u-boot.img
cp output/images/zImage /media/boot/zImage
cp output/images/at91-sama5d3_xplained.dtb /media/boot/at91-sama5d3_xplained.dtb
Extract the root filesystem to the second partition:
sudo tar -C /media/rootfs -xf output/images/rootfs.tar
Unmount both partitions:
sudo umount /media/boot
sudo umount /media/rootfs
Insert your SD card in your Xplained board, and enjoy. The default
U-Boot environment will properly load the kernel and Device Tree blob
from the first partition of the SD card, so everything works
automatically.