Hello.
Yes, you are correct I deviated from the topic, and i'm sorry I'm trying to get it working from the materials in linux4sam site (it should work).
Side Note: I'm getting the same problem with buildroot or separate builds of bootstrap and U-boot . ERROR: <debug_uart> No serial driver found (previous entry in this topic)
Individual U-Boot step by step (from
https://www.at91.com/linux4sam/bin/view ... SAM/U-Boot):
These are the copy pasted steps ive done from my shell.
1) $home/username:mkdir uboot
2) cd uboot
3) git clone git://github.com/linux4sam/u-boot-at91.git
4) cd u-boot-at91
5) git branch -r
6) git checkout origin/u-boot-2017.03-at91 -b u-boot-2017.03-at91
7) sudo apt-get install gcc-arm-linux-gnueabi
8 ) export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- (
this is the path for me)
9) env (checking CROSS_COMPILE, it is OK)
10)make at91sam9x5ek_nandflash_defconfig
Shell prompt here:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
11) make
Shell prompt FINAL lines only:
LDS u-boot.lds
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot-nodtb.bin
DTC arch/arm/dts/at91sam9260-smartweb.dtb
DTC arch/arm/dts/at91sam9g20-taurus.dtb
DTC arch/arm/dts/at91sam9g45-corvus.dtb
DTC arch/arm/dts/at91sam9g45-gurnard.dtb
DTC arch/arm/dts/at91sam9g15ek.dtb
DTC arch/arm/dts/at91sam9g25ek.dtb
DTC arch/arm/dts/at91sam9g35ek.dtb
DTC arch/arm/dts/at91sam9x25ek.dtb
DTC arch/arm/dts/at91sam9x35ek.dtb
SHIPPED dts/dt.dtb
CAT u-boot-dtb.bin
COPY u-boot.bin
SYM u-boot.sym
MKIMAGE u-boot.img
COPY u-boot.dtb
MKIMAGE u-boot-dtb.img
CFGCHK u-boot.cfg
11)ls -l
Shell prompt segment pertinent:
-rwxrwxr-x 1 afachini afachini 3326452 oct 19 09:07 u-boot
-rw-rw-r-- 1 afachini afachini 527712 oct 19 09:07 u-boot.bin
-rw-rw-r-- 1 afachini afachini 8983 oct 19 09:06 u-boot.cfg
-rw-rw-r-- 1 afachini afachini 5321 oct 19 09:07 u-boot.cfg.configs
-rw-rw-r-- 1 afachini afachini 27832 oct 19 09:07 u-boot.dtb
-rw-rw-r-- 1 afachini afachini 527712 oct 19 09:07 u-boot-dtb.bin
-rw-rw-r-- 1 afachini afachini 527776 oct 19 09:07 u-boot-dtb.img
-rw-rw-r-- 1 afachini afachini 527776 oct 19 09:07 u-boot.img
-rw-rw-r-- 1 afachini afachini 1677 oct 19 09:07 u-boot.lds
-rw-rw-r-- 1 afachini afachini 458810 oct 19 09:07 u-boot.map
-rwxrwxr-x 1 afachini afachini 499880 oct 19 09:07 u-boot-nodtb.bin
-rwxrwxr-x 1 afachini afachini 1499762 oct 19 09:07 u-boot.srec
-rw-rw-r-- 1 afachini afachini 132820 oct 19 09:07 u-boot.sym
12) Navigate to /home/username/uboot/u-boot-at91
13)Copy files: u-boot.bin, u-boot-dtb.bin, u-boot-nodtb.bin and u-boot-dtb.
14)go to windows (host) for using SAM-BA 2.12
15)Remove J1 and J2 from RONETIX SAM9x35EK, reset the board, and reconect J1 and J2
RS-232 DBGU Prompt:
RomBOOT
16)open SAM-BA 2.12
AT Menu options are:
\USBserial\COM4
at91sam9x35-ek
17) Press Connect:
SAM-BA Console prompt:
loading history file ... 0 events added
SAM-BA console display active (Tcl8.5.9 / Tk8.5.9)
(sam-ba_2.12) 1 %
(sam-ba_2.12) 1 %
18)Select NandFlash tab, press:
Enable NandFlash Script Execute
SAM-BA Console prompt:
-I- NANDFLASH::Init (trace level : 4)
-I- Loading applet applet-nandflash-sam9g15.bin at address 0x20000000
-I- Memory Size : 0x10000000 bytes
-I- Buffer address : 0x20010DF0
-I- Buffer size: 0x20000 bytes
-I- Applet initialization done
- By default PMECC is activated,
- By default, The pmecc computation is based on a sector of 512 bytes,
- By default, correcting capability for pmecc is retrieved from ONFI parameter,
- By default, offset of the first ecc byte in spare zone is '2',
- To config pmecc parameter, using 'NANDFLASH::SetNandHeaderValue pmeccParam pmeccParamValue' command,
- Type 'NANDFLASH::SetNandHeaderValue ' to dispaly current pmecc configuration.
- Type 'NANDFLASH::SetNandHeaderValue ?' to get help for pmecc setting,
- To active software ECC, using 'Enable Software ECC' command,
- Recommand to erase all after the ecc mode switch between software ECC & pmecc.
19)Select Script Erase All and Execute:
SAM-BA Console prompt:
(sam-ba_2.12) 1 % NANDFLASH::EraseAll
-I- Erasing blocks batch 0
-I- Erasing blocks batch 1
-I- Erasing blocks batch 2
-I- Erasing blocks batch 3
-I- Erasing blocks batch 4
-I- Erasing blocks batch 5
-I- Erasing blocks batch 6
-I- Erasing blocks batch 7
20)Select Send Boot File Script> Execute>Select bootstrap file (at91sam9x5ek-nandflashboot-uboot-3.8.9.bin) at 0x0 Address.
SAM-BA Console prompt:
(sam-ba_2.12) 1 % NANDFLASH::SendBootFilePmecc
Sending boot file done.
21) Set Address to 0x040000
22) On the Download/Upload File>Send File Name I select:
u-boot.bin>Press Send File
SAM-BA Console prompt:
-I- Send File G:/Individuales/u-boot.bin at address 0x040000
GENERIC::SendFile G:/Individuales/u-boot.bin at address 0x40000
-I- File size : 0x80D60 byte(s)
-I- Writing: 0x20000 bytes at 0x40000 (buffer addr : 0x20010DF0)
-I- 0x20000 bytes written by applet
-I- Writing: 0x20000 bytes at 0x60000 (buffer addr : 0x20010DF0)
-I- 0x20000 bytes written by applet
-I- Writing: 0x20000 bytes at 0x80000 (buffer addr : 0x20010DF0)
-I- 0x20000 bytes written by applet
-I- Writing: 0x20000 bytes at 0xA0000 (buffer addr : 0x20010DF0)
-I- 0x20000 bytes written by applet
-I- Writing: 0xD60 bytes at 0xC0000 (buffer addr : 0x20010DF0)
-I- 0xD60 bytes written by applet
Now, I hope this is enough detail, because now is where i start to get confused.
a) In the previous Link to website there is no mention to
u-boot.dtb so, I did not Flash it. For what I've Read
u-boot.bin and
u-boot-dtb.bin are the same? If that is SO, then the DTB should be flashed?
b)I went ahead and did 3 iterations of the steps 15) to 22) to obtain 3 configs:
- u-boot.bin + bootstrap.bin
Result DBGU port Prompt:
AT91Bootstrap 3.8.7 (lun oct 9 13:46:05 ART 2017)
1-Wire: Loading 1-Wire information ...
1-Wire: ROM Searching ... Done, 3 1-Wire chips found
1-Wire: BoardName | [Revid] | VendorName
#0 SAM9x5-EK [B0] FLEX
#1 SAM9X35-CM [B2] RONETIX
#2 SAM9x5-DM [B0] FLEX
1-Wire: Board sn: 0x4010466 revision: 0x10421
NAND: ONFI flash detected
NAND: ONFI para CRC error!
NAND: Manufacturer ID: 0xad Chip ID: 0xda
WARNING: Fail to disable On-Die ECC
Nand flash is not ONFI compliant, use 2-bit/512-byte ecc.
NAND: Initialize PMECC params, cap: 2, sector: 512
NAND: Image: Copy 0x80000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image
<debug_uart> No serial driver found
resetting ...
- u-boot.bin + bootstrap.bin + u-boot.dtb @ 0x180000
Same Result as Above.
RomBOOT
AT91Bootstrap 3.8.7 (lun oct 9 13:46:05 ART 2017)
1-Wire: Loading 1-Wire information ...
1-Wire: ROM Searching ... Done, 3 1-Wire chips found
1-Wire: BoardName | [Revid] | VendorName
#0 SAM9x5-EK [B0] FLEX
#1 SAM9X35-CM [B2] RONETIX
#2 SAM9x5-DM [B0] FLEX
1-Wire: Board sn: 0x4010466 revision: 0x10421
NAND: ONFI flash detected
NAND: ONFI para CRC error!
NAND: Manufacturer ID: 0xad Chip ID: 0xda
WARNING: Fail to disable On-Die ECC
Nand flash is not ONFI compliant, use 2-bit/512-byte ecc.
NAND: Initialize PMECC params, cap: 2, sector: 512
NAND: Image: Copy 0x80000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image
No valid device tree binary found - please append one to U-Boot binary, use u-bo
ot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>
initcall sequence 26f5a2a8 failed at call 26f50b2c (err=-1)
### ERROR ### Please RESET the board ###
As you can see, something is wrong, first in the fact that my bootstrap version won't change. Second is that the u-boot.bin IS being flashed since I got different prompts from different u-boot.bin.
I hope you can help, me. To stay on Topic, buildroot produces same results with their own binaries being:
at91bootstrap.bin (same issue, version wont change)
u-boot.bin
at91sam9x35ek.dtb (device tree blob, asuming is the saame that u-boot.dtb)
Also i want to mention that I did
this too and also got same issue.
EDIT1: I also wanted to say that the example DEMO:
linux4sam-buildroot-at91sam9x5ek-4.2 if i repeat the flashing proccess with the demo's binaries the KIT will boot into Linux and buildroot without problems, with this we should discard SAM-BA issues and my flashing procedure.
IMPORTANT The bootstrap version remains the same!
EDIT2: I just kept trying, and Tried something else:
I got the version numbers from the DEMO in EDIT1. Then i created new folders for ATbootstrap and U-boot. Also downloaded CodeSourcery arm-2013.11-24-arm-none-eabi. So my whole new environment is:
- CodeSourcery arm-2013.11-24-arm-none-eabi
(with gcc 4.3)
- u-boot-at91-linux4sam_4.2
Compiled bootstrap as already stated.
Compiled u-boot with command lines:
1) make at91sam9x5ek_nandflash
Then i flashed these 2 binaries into sam9x35ek
and got this Prompt:
RomBOOT
AT91Bootstrap 3.8.7 (lun oct 9 13:46:05 ART 2017) DID NOT CHANGE
1-Wire: Loading 1-Wire information ...
1-Wire: ROM Searching ... Done, 2 1-Wire chips found
1-Wire: BoardName | [Revid] | VendorName
#0 SAM9x5-EK [B0] FLEX
#1 SAM9X35-CM [B2] RONETIX
1-Wire: Board sn: 0x4000066 revision: 0x10401
NAND: ONFI flash detected
NAND: ONFI para CRC error!
NAND: Manufacturer ID: 0xad Chip ID: 0xda
WARNING: Fail to disable On-Die ECC
Nand flash is not ONFI compliant, use 2-bit/512-byte ecc.
NAND: Initialize PMECC params, cap: 2, sector: 512
NAND: Image: Copy 0x80000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image
U-Boot 2012.10 (Oct 19 2017 - 14:27:35) DID CHANGE
CPU: AT91SAM9X35
Crystal frequency: 12 MHz
CPU clock : 400 MHz
Master clock : 133.333 MHz
DRAM: 128 MiB
WARNING: Caches not enabled
NAND: 256 MiB
MMC: mci: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: macb0
Warning: failed to set MAC address
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x200000, size 0x300000
3145728 bytes read: OK
Bad Linux ARM zImage magic! zImage NOT FLASHED
U-Boot> SUCCESS to load U-Boot
FIRST: Again the date and version of the bootstrap did not change, which could mean that the SAM-BA script is broken?
SECOND: The default nandflash configuration for at91sam9x35ek in u-boot version 2013 is working correctly. why the newer version wontt work?
Next ill try to flash kernel 4.2 and see what happens.
I dont know what to do now, because Buildroot builds with another toolchain, another gcc and another version of u-boot with different configs by default.