SAMA5D3 Xplained 开发板烧写官方固件后启动失败【已解决】

一、失败原因:
这块开发板从同事手里接过来时,外部32.768KHz晶体Y2被焊掉了。而原厂的故件程序是需要依赖这颗32.768KHz晶体才能正常启动。

这颗 32.768KHz晶体,主要用于低功耗模式,以及为RTC提供时钟。

二、解决方法
1)将这颗外部32.768KHz晶体焊上后,使用原来的步骤就正常
2)如果保持其不焊接的状态,需要修改bootstrap代码,具体修改方式如下:
step1: 获取代码

git clone git://github.com/linux4sam/at91bootstrap.git

step2:切换分支

$ git branch -r$ git checkout origin/at91bootstrap-3.x -b at91bootstrap-3.x

step3:生成sama5d3 xplained 的配置文件$ find board/ -type d | sort | cut -d ‘/‘ -f2$ find board/sama5d3_xplained -name "*_defconfig" | cut -d ‘/‘ -f3$ make mrproper$ make sama5d3_xplainednf_uboot_defconfig

step4:修改配置文件

$ make menuconfig将对应的32.768KHz oscillator取消,如下图示:


保存,并退出。

step5:编译bootstrap
$ make CROSS_COMPILE=arm-none-eabi-
生成的bootstrap 文件在 binaries/ 下

这样,其它固件不变,只把原厂的sama5d3_xplained-nandflashboot-uboot-3.6.1.bin替换成我们新编译的bootstrap就好了。
成功登录进文件系统,如下示:

三、回顾失败现象如下
1. 从linux4sam下载demo固件
http://www.at91.com/linux4sam/bin/view/Linux4SAM/GettingStarted
下载如下的 linux4sam-poky-sama5d3_xplained-4.3.zip

解压后,使用demo_linux_nandflash.bat,烧写完成后无法进入文件系统
加载到
ehci_hcd: USB 2.0 ‘Enhanced‘ Host Controller (EHCI) Driver

ehci-atmel: EHCI Atmel driver

就停住了。

2. 使用 sam-ba 单步烧写也不成功

具体如下:

1)使用sam-ba 先 “Enable NandFlash” 再"Erase All"、再“Enable OS PMECC
parameters”

2)使用 “Send Boot File”将
sama5d3_xplained-bootstrap-nandflashboot-uboot-3.6.1.bin

烧写到0地址处

3)使用“Send File” 将u-boot-sama5d3_xplained-v2013.07-at91-r1.bin

烧写到 0x40000地址处

4)使用 “Send File” 将at91-sama5d3_xplained.dtb

烧写到 0x180000地址处

5)使用 “Send File” 将 zImage-sama5d3_xplained.bin

烧写到 0x200000地址处

6)先 “Enable OS PMECC parameters”,后使用“Send File”将buildroot_2012.11.1-
at91_sama5d3_linux4sam_4.2.ubi

烧写到 0x800000地址处

烧写后退出 sam-ba 复位,还是不成功。具体启动日志如下:

RomBOOT

AT91Bootstrap 3.6.1-00078-g5415d4e (Tue Feb 4 15:36:46 CET 2014)

NAND: ONFI flash detected

NAND: Manufacturer ID: 0x2c Chip ID: 0x32

NAND: Disable On-Die ECC

NAND: Initialize PMECC params, cap: 0x4, sector: 0x200

NAND: Image: Copy 0x80000 bytes from 0x40000 to 0x26f00000

NAND: Done to load image

U-Boot 2013.07 (Feb 04 2014 - 15:36:32)

CPU: SAMA5D36

Crystal frequency: 12 MHz

CPU clock : 528 MHz

Master clock : 132 MHz

DRAM: 256 MiB

NAND: 256 MiB

MMC: mci: 0, mci: 1

*** Warning - bad CRC, using default environment

In: serial

Out: serial

Err: serial

Net: gmac0

Warning: failed to set MAC address

, macb0

Warning: failed to set MAC address

Hit any key to stop autoboot: 3 2 0

NAND read: device 0 offset 0x180000, size 0x80000

524288 bytes read: OK

NAND read: device 0 offset 0x200000, size 0x600000

6291456 bytes read: OK

Kernel image @ 0x22000000 [ 0x000000 - 0x33be28 ]

## Flattened Device Tree blob at 21000000

Booting using the fdt blob at 0x21000000

Loading Device Tree to 2bb12000, end 2bb1a046 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Booting Linux on physical CPU 0x0

Initializing cgroup subsys cpuset

Initializing cgroup subsys cpu

Initializing cgroup subsys cpuacct

Linux version 3.10.0-yocto-standard ([email protected]) (gcc version 4.8.1 (GCC) ) #1 Wed Feb 5 10:03:20 CET 2014

CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=50c5387d

CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

Machine: Atmel SAMA5 (Device Tree), model: SAMA5D3 Xplained

bootconsole [earlycon0] enabled

Memory policy: ECC disabled, Data cache writeback

AT91: Detected soc type: sama5d3

AT91: Detected soc subtype: sama5d36

AT91: sram at 0x300000 of 0x20000 mapped at 0xfef58000

CPU: All CPU(s) started in SVC mode.

Clocks: CPU 528 MHz, master 132 MHz, main 12.000 MHz

Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024

Kernel
command line: console=ttyS0,115200 earlyprintk
mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(evn_redundent),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs)
rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs

PID hash table entries: 1024 (order: 0, 4096 bytes)

Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)

Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)

allocated 524288 bytes of page_cgroup

please try ‘cgroup_disable=memory‘ option if you don‘t want memory cgroups

Memory: 256MB = 256MB total

Memory: 252736k/252736k available, 9408k reserved, 0K highmem

Virtual kernel memory layout:

vector : 0xffff0000 - 0xffff1000 ( 4 kB)

fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)

vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)

lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)

modules : 0xbf800000 - 0xc0000000 ( 8 MB)

.text : 0xc0008000 - 0xc05b4fc8 (5812 kB)

.init : 0xc05b5000 - 0xc05d2d60 ( 120 kB)

.data : 0xc05d4000 - 0xc063a9f8 ( 411 kB)

.bss : 0xc063a9f8 - 0xc0663820 ( 164 kB)

NR_IRQS:16 nr_irqs:16 16

sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms

Console: colour dummy device 80x30

Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

Initializing cgroup subsys memory

Initializing cgroup subsys devices

Initializing cgroup subsys freezer

Initializing cgroup subsys blkio

CPU: Testing write buffer coherency: ok

Setting up static identity map for 0xc0350648 - 0xc0350694

devtmpfs: initialized

pinctrl core: initialized pinctrl subsystem

NET: Registered protocol family 16

DMA: preallocated 256 KiB pool for atomic coherent allocations

AT91: Power Management

gpio-at91 fffff200.gpio: at address fefff200

gpio-at91 fffff400.gpio: at address fefff400

gpio-at91 fffff600.gpio: at address fefff600

gpio-at91 fffff800.gpio: at address fefff800

gpio-at91 fffffa00.gpio: at address fefffa00

pinctrl-at91 pinctrl.2: initialized AT91 pinctrl driver

bio: create slab <bio-0> at 0

at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels

at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy slave ), 8 channels

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

of_dma_request_slave_channel: dma-names property missing or empty

at91_i2c f0014000.i2c: can‘t get a DMA channel for tx

at91_i2c f0014000.i2c: can‘t use DMA

at91_i2c f0014000.i2c: AT91 i2c bus driver.

at91_i2c f0018000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers

at91_i2c f0018000.i2c: AT91 i2c bus driver.

at91_i2c f801c000.i2c: can‘t get a DMA channel for tx

at91_i2c f801c000.i2c: can‘t use DMA

at91_i2c f801c000.i2c: AT91 i2c bus driver.

media: Linux media interface: v0.10

Linux video capture interface: v2.00

Advanced Linux Sound Architecture Driver Initialized.

Bluetooth: Core ver 2.16

NET: Registered protocol family 31

Bluetooth: HCI device and connection manager initialized

Bluetooth: HCI socket layer initialized

Bluetooth: L2CAP socket layer initialized

Bluetooth: SCO socket layer initialized

cfg80211: Calling CRDA to update world regulatory domain

Switching to clocksource tcb_clksrc

NET: Registered protocol family 2

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP: reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.

msgmni has been set to 493

io scheduler noop registered (default)

f001c000.serial: ttyS1 at MMIO 0xf001c000 (irq = 23) is a ATMEL_SERIAL

f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 24) is a ATMEL_SERIAL

f0024000.serial: ttyS5 at MMIO 0xf0024000 (irq = 25) is a ATMEL_SERIAL

ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 39) is a ATMEL_SERIAL

console [ttyS0] enabled, bootconsole disabled

console [ttyS0] enabled, bootconsole disabled

brd: module loaded

loop: module loaded

atmel_nand_nfc 70000000.nfc: NFC is probed.

atmel_nand: Use On Flash BBT

atmel_nand 60000000.nand: Using dma0chan2 for DMA transfers.

ONFI param page 0 valid

ONFI flash detected

NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64

atmel_nand 60000000.nand: ONFI params, minimum required ECC: 4 bits in 512 bytes

atmel_nand 60000000.nand: Initialize PMECC params, cap: 4, sector: 512

atmel_nand 60000000.nand: Using NFC Sram read and write

Bad block table not found for chip 0

Bad block table not found for chip 0

Scanning device for bad blocks

Bad eraseblock 100 at 0x000000c80000

Bad eraseblock 101 at 0x000000ca0000

Bad block table written to 0x00000ffe0000, version 0x01

Bad block table written to 0x00000ffc0000, version 0x01

8 cmdlinepart partitions found on MTD device atmel_nand

Creating 8 MTD partitions on "atmel_nand":

0x000000000000-0x000000040000 : "bootstrap"

0x000000040000-0x0000000c0000 : "uboot"

0x0000000c0000-0x000000100000 : "env"

0x000000100000-0x000000140000 : "evn_redundent"

0x000000140000-0x000000180000 : "spare"

0x000000180000-0x000000200000 : "dtb"

0x000000200000-0x000000800000 : "kernel"

0x000000800000-0x000010000000 : "rootfs"

atmel_spi f0004000.spi: version: 0x213

atmel_spi f0004000.spi: Using dma0chan3 (tx) and dma0chan4 (rx) for DMA transfers

atmel_spi f0004000.spi: Atmel SPI Controller at 0xf0004000 (irq 18)

atmel_spi f0004000.spi: master is unqueued, this is deprecated

atmel_spi f8008000.spi: version: 0x213

atmel_spi f8008000.spi: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers

atmel_spi f8008000.spi: Atmel SPI Controller at 0xf8008000 (irq 28)

atmel_spi f8008000.spi: master is unqueued, this is deprecated

CAN device driver interface

at91_can f000c000.can: device registered (reg_base=d08ea000, irq=19)

at91_can f8010000.can: device registered (reg_base=d08ec000, irq=29)

macb f0028000.ethernet (unregistered net_device): invalid hw address, using random

libphy: MACB_mii_bus: probed

macb f0028000.ethernet eth0: Cadence GEM at 0xf0028000 irq 26 (ee:e8:24:3b:a4:ff)

macb f0028000.ethernet eth0: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=f0028000.etherne:07, irq=-1)

macb f802c000.ethernet (unregistered net_device): invalid hw address, using random

libphy: MACB_mii_bus: probed

macb f802c000.ethernet eth1: Cadence MACB at 0xf802c000 irq 33 (ce:23:81:0a:d8:07)

macb f802c000.ethernet eth1: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f802c000.etherne:00, irq=-1)

ehci_hcd: USB 2.0 ‘Enhanced‘ Host Controller (EHCI) Driver

ehci-atmel: EHCI Atmel driver

时间: 2024-08-27 20:31:58

SAMA5D3 Xplained 开发板烧写官方固件后启动失败【已解决】的相关文章

sama5d3 xplained 文件系统配置IP,系统复位后IP丢失[已解决]

[相关信息]当前加载的文件系统是 Poky (Yocto Project Reference Distro) 1.5.1 [解决方案]vi /etc/network/interfaces修改iface eth0 inet dhcp 一行为#iface eth0 inet dhcpiface eth0 inet staticaddress 192.168.1.81netmask 255.255.255.0gateway 192.168.1.1 重启系统 reboot后生效 [问题描述]使用如下配置

荣品RP4412开发板烧写内核cannot load出错的原因

问:荣品RP4412开发板烧写必须要配置Xmanager吗? 现在我烧写内核出现这个错误是什么原因呢? 答:4412文件夹下没有zImage这个文件, 你打开4412这个文件夹. 你都拼写错了, zImage, 你打成了zImag. 问: 现在出现这个提示了,是正确的吗? 答:你需要另外安装驱动. 下个360手机助手, 然后装上驱动后,在重头来吧. 问:哦,但是我用豌豆荚可以连接到开发板,什么原因? 答:这个是因为你的电脑不识别fastboot状态下的硬件. 就在目前的状态下, 安装USB驱动,

iMX6开发板烧写Android系统

平台:迅为-imx6开发板 系统:Android 4.4系统 镜像文件在光盘目录"04_源码_android4.4 文件系统"下.将其拷贝到前一小节解压的得到目录的"Profiles\MX6Q Linux Update\OS Firmware\files\android"文件夹下,如下图所示. 打开"Mfgtools-Rel-1.1.0_121218_MX6Q_UPDATER_V2.0\Mfgtools-Rel-1.1.0_121218_MX6Q_UPDA

iMX6Q/PLUS开发板烧写设备树内核的Ubuntu系统

基于迅为-iMX6D.iMX6Q 和 iMX6PLUS 三个硬件版本,设备树镜像的烧写方法以及镜像所在目录,镜像名称全部一致,所以作者将烧写章节合并到一起. 请注意,如果购买的是 iMX6D 版本,想要烧写设备树版本镜像,请使用 iMX6D 设备树版本的光盘(iMX6D 还有一个非设备树版本的光盘): 如果购买的是 iMX6Q 版本,想要烧写设备树版本镜像,请使用 iMX6Q 设备树版本的光盘(iMX6Q 还有一个非设备树版本的光盘): 如果购买的还是 PLUS 版本,请使用 PLUS 版本的光

sama5d3 xplained 开发板运行主机编写的HelloWorld

[成功方案]第一步:使用交叉工具链 Sourcery G++ Lite 2009q3-67这里有需要的同学可能从这里下载 链接:http://pan.baidu.com/s/1bn8f3if 密码:wp0z 第二步:编写hello.c #include <stdio.h> int main() { printf("hello, world!"); return 0; } 第三步:交叉编译 $ arm-none-linux-gnueabi-gcc hello.c -o hel

JZ2440裸板烧写(打补丁)

制作uImage,需要上网下载内核+patch补丁 1.将内核用ftp发送到 打补丁patch -p1 < ../补丁文件名 打补丁文件(目录) 2.配置 :复制cp  configuration_ok  .config 3.make uImage 下图是uImage的make流程: 1.裸板烧写的方法有2种: 烧写u-boot:在PC机上,cmd控制台,cd移动到内核所在的相应文件夹,利用oflash下载u-boot: 烧写内核:都需要启动开发板NOR启动,进入u-boot后 ①一种是利用串口

烧写Openwrt固件

启动tftp软件,并设置固件所在目录(Current Dircctory)和服务器IP(Service interface),服务器指的是PC机,如图:                                                                                          开发板串口,网口与PC相连,启动开发板进入uboot,选择对应烧写方式.启动uboot如图:Uboot选项说明: 选择1,表示将固件通过网络下载到内存中,如果是刷SDK

Android开发模拟器启动失败的解决方法

1. 错误提示信息 错误大概意思:连接到adb(android debug bridge)出现了一个严重的错误,你必须重启adb和Eclipse工具,请确保在位置--adb工具被执行了. adb:是sdk提供的工具,在android-sdk-windows\platform-tools目录下,通过adb可以连接到android手机或模拟器.像91手机助手.360手机.豌豆荚通过端口号5037与手机通信的. 2.使用命令查看端口占用情况 netstat -a –o netstat:查看网络连接状态

驱动开发读书笔记.0.00 从拿到一块开发板开始

当我们手上有一块arm开发板,我们应该怎么下手呢?(假设你有少许计算机和电子的基础) 1.01安装桌面版linux: 你可以装虚拟机 或者 双系统windows + linux [假装有链接] 1.如果你会重装系统,我建议你装双系统或直接ubuntu,end 2.如果你不会重装系统,跳到3 3.学会它,跳到1 1.02:开发板上装系统[链接以后再补] 烧boot 烧内核 烧文件系统 讲真,如果你看到这三个名词之后蒙圈了,请左拐去预习/复习操作系统 1.03 系统安装完成,开发板怎么和PC进行通信