SAM9x35 Cant Figure if U-Boot is Running

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

AleFachini
Posts: 6
Joined: Tue May 30, 2017 7:41 pm

SAM9x35 Cant Figure if U-Boot is Running

Tue May 30, 2017 8:05 pm

Hello, Im pretty much new at ARM, i have been playing arround a few weeks wih a Project in which i have a SAM9x35.
I´ve connected to the hardware with SAM-BA already. And today i Wanted to configure U-Boot Variables. (U-Boot is suposed to be installed, because all i did was following a guide from the person who started the proyect who is "gone" now).
With my Hyperterminal i access to the next Log, when kit starts:
RomBOOT
AT91Bootstrap 3.5.4 (Tue Dec 13 15:37:08 ART 2016)
1-Wire: Loading 1-Wire information ...
1-Wire: ROM Searching ... Done, 0x2 1-Wire chips found
1-Wire: BoardName | [Revid] | VendorName
#0x0 SOM9X35 [B1] APEXAR
1-Wire: Failed to read DM board information
1-Wire: Failed to read EK board information
1-Wire: SYS_GPBR2: 0xc6, SYS_GPBR3: 0x8001
NAND: ONFI flash detected
NAND: Manufacturer ID: 0x2c Chip ID: 0x32
NAND: Disable On-Die ECC
NAND: Initialize PMECC params, cap: 0x2, sector: 0x200
NAND: Image: Copy 0x280000 bytes from 0x200000 to 0x22000000
Image magic: 0x27051956 is found
Relocating kernel image, dest: 0x20008000, src: 0x22000040
...... 0x26e364 bytes data transferred
Not calendar
Last Reset: General
Power Button: 0x1
Backlight: 0x1
Starting linux kernel ..., machid: 0xd2d
Uncompressing Linux... done, booting the kernel.
As i Understand i should be prompted to press ENTER key for stoping the Booting and get acces to U-Boot. But it seems im running on a Primary Lvl Bootsrtap from ATMEL(AT91Bootstrap). Which basically is that i dont have U-Boot nor another seconday Bootloader.
Am i Correct? If that the case, i wont be able to chec MAC or IP adresses and consequently i wont have ETHERNET access to the board. Are All these asumptions correct?
Any Idea of how could i save the kernel plus the rootfile system bins with samba?
Well thanks and i hope you can help me.
Regards
blue_z
Location: USA
Posts: 1504
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM9x35 Cant Figure if U-Boot is Running

Wed May 31, 2017 2:01 am

AleFachini wrote:Cant Figure if U-Boot is Running
U-Boot (normally) does not execute silently, and does output its banner to the console when it starts.
AleFachini wrote:With my Hyperterminal ...
There are much better terminal-emulator programs available than that, e.g. PuTTY, and TeraTerm.
AleFachini wrote:As i Understand i should be prompted to press ENTER key for stoping the Booting and get access to U-Boot.
No, the U-Boot prompt is for any key (that generates a character code).
AleFachini wrote:But it seems im running on a Primary Lvl Bootsrtap from ATMEL(AT91Bootstrap). Which basically is that i dont have U-Boot nor another seconday Bootloader.
AT91Bootstrap is the conventional second-level boot program on Atmel SoCs.
The convention is for AT91Bootstrap to load and execute U-Boot (which would in turn load the kernel), but recent versions have the capability to be built to load alternate programs including the Linux kernel.
BTW your oddball terminology and abbreviations/misspellings are distracting.
AleFachini wrote:If that the case, i wont be able to chec MAC or IP adresses and consequently i wont have ETHERNET access to the board. Are All these asumptions correct?
No.
Old(?) kernels had a dependency on U-Boot for Ethernet initialization.
Presumably it's been fixed, but I've never bothered to test it.
However you seem to be in a perfect situation to test with whatever version you have installed.
IOW if you're going to make a hypothesis, then instead of asking for validation, test it yourself.
AleFachini wrote:Any Idea of how could i save the kernel plus the rootfile system bins with samba?
"Samba" (the protocol) or SAM-BA?
Can you boot the board, and get a shell prompt?
Do you have network access?
Can you attach a removable storage device, e.g. USB flash drive or SDcard?


Regards
AleFachini
Posts: 6
Joined: Tue May 30, 2017 7:41 pm

Re: SAM9x35 Cant Figure if U-Boot is Running

Wed May 31, 2017 2:16 pm

Hello:
First of All, THank you very Much for your Help.
I apologise for my english I´ve self-taught the languague, and picked up some slang from gaming.
Well, to the fray:
blue_z wrote:AT91Bootstrap is the conventional second-level boot program on Atmel SoCs.
I must have interpreted this wrongly then:
http://www.at91.com/linux4sam/pub/Linux ... nx4sam.png
blue_z wrote:"Samba" (the protocol) or SAM-BA?
the later (SAM-BA)
blue_z wrote:Can you boot the board, and get a shell prompt?
I tried but no. Please Refer to code snnipet. this contains the log from Rs232 and the program boot cant be stopped or at least I dont know how.

Code: Select all

RomBOOT
AT91Bootstrap 3.5.4 (Tue Dec 13 15:37:08 ART 2016)
1-Wire: Loading 1-Wire information ...
1-Wire: ROM Searching ... Done, 0x2 1-Wire chips found
1-Wire: BoardName | [Revid] | VendorName
#0x0 SOM9X35 [B1] APEXAR
1-Wire: Failed to read DM board information
1-Wire: Failed to read EK board information
1-Wire: SYS_GPBR2: 0xc6, SYS_GPBR3: 0x8001
NAND: ONFI flash detected
NAND: Manufacturer ID: 0x2c Chip ID: 0x32
NAND: Disable On-Die ECC
NAND: Initialize PMECC params, cap: 0x2, sector: 0x200
NAND: Image: Copy 0x280000 bytes from 0x200000 to 0x22000000
Image magic: 0x27051956 is found
Relocating kernel image, dest: 0x20008000, src: 0x22000040
...... 0x26e364 bytes data transferred
Not calendar
Last Reset: General
Power Button: 0x1
Backlight: 0x1
Starting linux kernel ..., machid: 0xd2d
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.39_som9x35-1.1.1 (lucas@ziggy.apexar) (gcc version 4.4.1 (Sour
cery G++ Lite 2010q1-202) ) #3 Fri Dec 23 11:04:31 ART 2016
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9X5-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: mem=128M console=ttyS0,115200 mtdparts=atmel_nand:8M(bootst
rap/kernel)ro,-(rootfs) rw rootfstype=jffs2 root=/dev/mtdblock1 rootwait poweron
=normal
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 124200k/124200k available, 6872k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xff000000 - 0xffe00000 ( 14 MB)
vmalloc : 0xc8800000 - 0xfee00000 ( 870 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0047000 ( 252 kB)
.text : 0xc0047000 - 0xc0537700 (5058 kB)
.data : 0xc0538000 - 0xc0579520 ( 262 kB)
NR_IRQS:192
AT91: 128 gpio irqs in 4 banks
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
I2C BITBANGING - ID:0
AT91: CM rev B and higher
AT91: Power Management (with slow clock mode)
AT91: Starting after general reset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c-gpio i2c-gpio.0: using pins 96 (SDA) and 97 (SCL)
at_hdmac at_hdmac.0: Atmel AHB DMA Controller ( cpy slave ), 8 channels
at_hdmac at_hdmac.1: Atmel AHB DMA Controller ( cpy slave ), 8 channels
Advanced Linux Sound Architecture Driver Version 1.0.24.
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource tcb_clksrc
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) (SUMMARY) ┬® 2001-2006 Red Hat, Inc.
msgmni has been set to 242
io scheduler noop registered (default)
atmel_hlcdfb atmel_hlcdfb_base.0: 1500KiB frame buffer at 27a00000 (mapped at ff
c00000)
Console: switching to colour frame buffer device 60x34
atmel_hlcdfb atmel_hlcdfb_base.0: fb0: Atmel LCDC at 0xf8038000 (mapped at c8864
000), irq 25
atmel_hlcdfb atmel_hlcdfb_ovl.0: 1500KiB frame buffer at 27000000 (mapped at ffa
00000)
atmel_hlcdfb atmel_hlcdfb_ovl.0: fb1: Atmel LCDC at 0xf8038100 (mapped at c886c1
00), irq -6
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xf8040000 (irq = 15) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xf8044000 (irq = 16) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.0: Atmel SSC device at 0xc8888000 (irq 28)
i2c-core: driver [tsl2550] using legacy suspend method
i2c-core: driver [tsl2550] using legacy resume method
atmel_nand atmel_nand: Using dma0chan0 for DMA transfers.
ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xaa (Micron MT29F2G08ABBEAHC)
atmel_nand atmel_nand: Initialize PMECC params, cap: 2, sector: 512
Scanning device for bad blocks
2 cmdlinepart partitions found on MTD device atmel_nand
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000800000 : "bootstrap/kernel"
0x000000800000-0x000010000000 : "rootfs"
atmel_spi atmel_spi.1: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfer
sa
tmel_spi atmel_spi.1: Atmel SPI Controller at 0xf0004000 (irq 14)
CAN device driver interface
PPP generic driver version 2.4.2
macb macb.0: invalid hw address, using random
macb macb.0: eth0: Features changed: 0x00004800 -> 0x00004000
MACB_mii_bus: probed
eth0: Atmel MACB at 0xf802c000 irq 24 (62:53:10:19:af:81)
eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=0:01, irq=-1)
usbcore: registered new interface driver zd1211rw
usbcore: registered new interface driver rt2500usb
usbcore: registered new interface driver rt73usb
usbcore: registered new interface driver rt2800usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
atmel-ehci atmel-ehci: Atmel EHCI UHP HS
atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1
atmel-ehci atmel-ehci: irq 22, io mem 0x00700000
atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 2
at91_ohci at91_ohci: irq 22, io mem 0x00600000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xf803c000 mapped at c8892000
atmel_usba_udc atmel_usba_udc: FIFO at 0x00500000 mapped at c8900000
atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz
atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /devices/platform/atmel_tsadcc/input/inp
ut0
at91_rtc at91_rtc: rtc core: registered at91_rtc as rtc0
AT91 Real Time Clock driver.
i2c /dev entries driver
Linux media interface: v0.10
Linux video capture interface: v2.00
gspca: v2.12.0 registered
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v1.0.0)
Driver for 1-wire Dallas network protocol.
w1_master_driver w1 bus master: Family 2d for 2d.000009e41666.8f is not register
ed.
w1_master_driver w1 bus master: Family 2d for 2d.00000ee13b6d.98 is not register
ed.
AT91SAM9 Watchdog: sorry, watchdog is disabled
at91_wdt: probe of at91_wdt failed with error -5
Software Watchdog Timer: 0.07 initialized. soft_noboot=0 soft_margin=60 sec soft
_panic=0 (nowayout= 0)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
asoc: wm8731-hifi <-> atmel-ssc-dai.0 mapping ok
ASoC: at91sam9x5ek_init ok
ALSA device list:
#0: AT91SAM9X5
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
at91_rtc at91_rtc: setting system clock to 2007-01-01 00:00:04 UTC (1167609604)
atmel_mci atmel_mci.0: Using dma0chan1 for DMA transfers
atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots
atmel_nand atmel_nand: Bit flip in data area, byte_pos: 1050, bit_pos: 4, 0xb8 -
> 0xa8
atmel_nand atmel_nand: Bit flip in data area, byte_pos: 821, bit_pos: 0, 0xc1 ->
0xc0
atmel_nand atmel_nand: Bit flip in data area, byte_pos: 1521, bit_pos: 1, 0xaa -
> 0xa8
atmel_nand atmel_nand: Bit flip in data area, byte_pos: 1836, bit_pos: 2, 0x0c -
> 0x08
atmel_nand atmel_nand: Bit flip in data area, byte_pos: 1570, bit_pos: 2, 0x8c -
> 0x88
atmel_nand atmel_nand: Bit flip in data area, byte_pos: 1322, bit_pos: 5, 0x77 -
> 0x57
atmel_nand atmel_nand: Bit flip in data area, byte_pos: 420, bit_pos: 1, 0x73 ->
0x71
jffs2_scan_dirent_node(): Name CRC failed on node at 0x0d6617dc: Read 0xffffffff
, calculated 0xbe2612ff
Empty flash at 0x0d661808 ends at 0x0d662000
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 252K
udevd (590): /proc/590/oom_adj is deprecated, please use /proc/590/oom_score_adj
instead.
SoftDog: Unexpected close, not stopping watchdog!
Initializing random number generator... done.
Starting network...
ip: RTNETLINK answers: File exists
Starting sshd: OK
calibrated
Simple mixer control 'Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 127 [100%] [6.00dB]
Front Right: Playback 127 [100%] [6.00dB]
Simple mixer control 'Output Mixer HiFi',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
SoftDog: Unexpected close, not stopping watchdog!
Sound initializing
blue_z wrote:Do you have network access?
well the hardware board has an "adapted" Ethernet port to a RJ11 connector (4 pins) and i dont know if the cable is "normal" or "Crossed" but ill have to make one RJ45 to RJ11 adapter cable. Have Any suggestion on this point?
blue_z wrote:Can you attach a removable storage device, e.g. USB flash drive or SDcard?
Yes it does, although i did not got to this yet. I´ve read about being able to overwrite or even boot from sd cards.(really not much idea of this)

Well, again thank you. and i hope you can help me again.

Regards.
blue_z
Location: USA
Posts: 1504
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM9x35 Cant Figure if U-Boot is Running

Thu Jun 01, 2017 1:30 am

AleFachini wrote:I apologise for my english I´ve self-taught the languague, and picked up some slang from gaming.
Mistakes in grammar I can understand, but bad spelling and typos are usually carelessness.
You're using a computer, and computers have spell-check programs.
AleFachini wrote:I must have interpreted this wrongly then:
http://www.at91.com/linux4sam/pub/Linux ... nx4sam.png
Yes, you are misinterpreting a flash memory map.
The layout of a storage device does not specify/dictate the order of execution of programs.

Refer to the Linux4SAM web page on the conventional Atmel AT91SAM9 Boot Sequence.
Image
The left side lists the execution order of boot programs.
The right side describes the physical memories involved and the transfer of code & data. The NAND map that you reference is represented by the "Boot Media" at the top right.
AleFachini wrote:the later (SAM-BA)
The ability of the board to connect with SAM-BA depends on activating the SAM-BA Monitor on the board.
Refer to your SoC datasheet for what has to "fail" in order to execute the SAM-BA Monitor.
AleFachini wrote:I tried but no. Please Refer to code snnipet. this contains the log from Rs232
That boot log does not indicate any salient errors.
The console is enabled for the framebuffer.
Networking is enabled. A ssh daemon is started. The IP address might be static.
Did you try typing on the terminal, as that sometimes triggers getty to reissue its output?
AleFachini wrote:... and the program boot cant be stopped or at least I dont know how.
You're not comprehending what I wrote.
Your board does not execute U-Boot when it boots from NAND.
There is no mechanism to interrupt the NAND boot sequence on your board as it is currently configured.
AleFachini wrote:well the hardware board has an "adapted" Ethernet port to a RJ11 connector (4 pins) and i dont know if the cable is "normal" or "Crossed" but ill have to make one RJ45 to RJ11 adapter cable. Have Any suggestion on this point?
100Base-T uses only two twisted pairs, but you'll have to figure out what kind of nonstandard connector wiring you have.

If you're unable to guess the hostname or IP address for a ssh login, then you may have to use Wireshark.
AleFachini wrote:Yes it does, although i did not got to this yet. I´ve read about being able to overwrite or even boot from sd cards.(really not much idea of this)
IMO booting the board using an external device is the most-straightforward method of inspecting and copying the contents of NAND and the rootfs (assuming that's your goal).
On the SAM9X35 booting from SDcard has precedence over NAND, unless the BSC register is used to inhibit that.

Regards

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 2 guests