At91sam9x35 Buildroot configs

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

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

At91sam9x35 Buildroot configs

Thu Oct 12, 2017 7:52 pm

Hello:
I am currently beginning with at91sam9x35ek. I've read and followed these documentations:

linux4sam/bin/view/Linux4SAM/BuildRootB ... nux_U_boot
linux4sam/bin/view/Linux4SAM/BuildRoot_9x5

Doing what was described in these documents i got on Ubuntu 16.04 LTS the following resulting files, I am using this buildroot tag; 2016.02-rc3:
buildroot/output/images$ ls
at91bootstrap.bin at91sam9x35ek.dtb rootfs.ubifs
at91sam9g15ek.dtb at91sam9x5ek-nandflashboot-uboot-3.8.bin u-boot.bin
at91sam9g25ek.dtb boot.bin zImage
at91sam9g35ek.dtb rootfs.tar
at91sam9x25ek.dtb rootfs.ubi
I have to flash the device with windows where my Ubuntu VM runs.
The flashing addresses aree found inside the script for flashing being:
  • 0x0 for atboostrap.bin
  • 0x40000 for u-boot.bin
  • 0x180000 for at91sam9x35ek.dtb
  • 0x200000 for zImage
  • 0x800000 for rootfs.ubi
This configuration won't boot KERNEL. System goes to u-boot> prompt and when i use:
bootz 0x22000000 - 0x21000000
Results in:
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid


Now. i have this demo:
linux4sam-buildroot-at91sam9x5ek-4.2

This demo contains the following files(relevant):
at91sam9x5ek-nandflashboot-uboot-3.6.0.bin
at91sam9x35ek.dtb
u-boot-at91sam9x5ek_nandflash.bin
ubootEnvtFileNandFlash.bin
zImage-at91_dt
rootfs-at91sam9.ubi
I flash them with SAM-BA 2.12 on windows 10 at the following addresses:
  • 0x0 for at91sam9x5ek-nandflashboot-uboot-3.6.0.bin
  • 0x40000 for u-boot-at91sam9x5ek_nandflash.bin
  • 0xc0000 for ubootEnvtFileNandFlash.bin
  • 0x180000 for at91sam9x35ek.dtb
  • 0x200000 for zImage-at91_dt
  • 0x800000 for rootfs-at91sam9.ubi
THis configuraion and these files work up to buildroot login prompt without issues.

So i have a set of questions may be related to my inexperience:

1- In my Buildroots build on my Ubuntu enviroment, if the file at91bootstrap.bin is my ATbootstrap bootloader, what is the file at91sam9x5ek-nandflashboot-uboot-3.8.bin?

2- What is the file boot.bin?

3-Where is the file with the U_BOOT enviroment variables, in the compiled Buildroot results?????

4-I used "make at91sam9x5ek_defconfig", then "make". Does this means that the default configuration in these files are not working???

5- Where do i set for building the file with Uboot Environment Variables?

6- Do i need to apply patches to the newest Bootloader version?

7- How do i do to change UBI format to jffs2 for compiling? i know how to do it in buildroot's menuconfig, but environment variables still sets to UBI.


Thanks for your help and patience since I dont really know much about this.
blue_z
Location: USA
Posts: 1504
Joined: Thu Apr 19, 2007 10:15 pm

Re: At91sam9x35 Buildroot configs

Fri Oct 13, 2017 1:20 am

AleFachini wrote:I am using this buildroot tag; 2016.02-rc3
why use a rc (release candidate) version instead of the actual release?

AleFachini wrote:This configuration won't boot KERNEL. System goes to u-boot> prompt and when i use:
bootz 0x22000000 - 0x21000000
Results in:
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
Without the actual boot log, it is impossible to determine what is going on.
The error that you're reporting is inconsistent with the command you claim to have used.
Based on the sloppiness in this post (e.g. misspellings and typos) , I can only assume that the command that you claim to have used is not actually what you entered.

AleFachini wrote:1- In my Buildroots build on my Ubuntu enviroment, if the file at91bootstrap.bin is my ATbootstrap bootloader, what is the file at91sam9x5ek-nandflashboot-uboot-3.8.bin?
It's a copy of at91bootstrap.bin, with its full name indicating board, source, target, and version.

AleFachini wrote:2- What is the file boot.bin?
It's a copy of at91bootstrap.bin, renamed for use in VFAT booting schemes.
If you did a full directory listing (i.e. with file lengths) (and file compares for full verification), then the relationship of these duplicate files would not be so mysterious.

AleFachini wrote:3-Where is the file with the U_BOOT enviroment variables, in the compiled Buildroot results?????
There is no such file of U-Boot environment variables built by Buildroot or by the U-Boot make.

AleFachini wrote:4-I used "make at91sam9x5ek_defconfig", then "make". Does this means that the default configuration in these files are not working???
To be determined.

AleFachini wrote:5- Where do i set for building the file with Uboot Environment Variables?
Already answered in #3.

AleFachini wrote:6- Do i need to apply patches to the newest Bootloader version?
??

AleFachini wrote:7- How do i do to change UBI format to jffs2 for compiling? i know how to do it in buildroot's menuconfig, but environment variables still sets to UBI.
Your wording is nonsensical. UBI refers to a volume manager, while JFFS2 is a filesystem. UBI and UBIFS are preferred over JFFS2. IOW why do you want to go backwards?

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

Re: At91sam9x35 Buildroot configs

Fri Oct 13, 2017 2:24 pm

Mister Blue:

Thank you very much for your reply, i apologize for my bad english.

To shed some light to some of your answers:

I used That tag because is the exact Tag of the linux4sam example and i was not shure if there was a problem with newer versions, It is not strange that this things happen. I also produced the build with TAG 2017.03 and the same results were obtanined.

In regard to the Boot Log:
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


U-Boot 2015.01-linux4sam_4.7-rc2 (Oct 12 2017 - 15:18:13)

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
Error: macb0 address not set.

Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x200000, size 0x300000
3145728 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot >
Environment Variables print:
U-Boot> printenv
baudrate=115200
bootargs=console=ttyS0,115200 earlyprintk 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
bootcmd=nand read 0x22000000 0x200000 0x300000; bootm 0x22000000
bootdelay=3
ethact=macb0

Environment size: 333/131067 bytes
Immediately did bootz (because is zImage):
U-Boot> bootz 0x22000000 - 0x21000000
Kernel image @ 0x22000000 [ 0x000000 - 0x385ed8 ]
ERROR: Did not find a cmdline Flattened Device Tree
Could not find a valid device tree
U-Boot> bootz 0x22000000 0x21000000
Kernel image @ 0x22000000 [ 0x000000 - 0x385ed8 ]
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
U-Boot>
Notice the errors with and without "-" in the command, I understand that i'm new at U-Boot and everything, but whats the difference? Should i set manually my environment variables?.

Thank You In advance.
blue_z
Location: USA
Posts: 1504
Joined: Thu Apr 19, 2007 10:15 pm

Re: At91sam9x35 Buildroot configs

Sat Oct 14, 2017 2:25 am

AleFachini wrote:i apologize for my bad english.
Not a problem; I can deal with it, but if doesn't make sense I'll tell you.
What is a problem is when you incorrectly describe what you did and/or what happened.

AleFachini wrote:I used That tag because is the exact Tag of the linux4sam example and i was not shure if there was a problem with newer versions, It is not strange that this things happen.
There can always be a "problem" with any version. But the release version (once it is available) should always be preferable to a release candidate version.

AleFachini wrote:I also produced the build with TAG 2017.03 and the same results were obtanined.
Because apparently in U-Boot, the default environment variables for this board was unfortunately only partially updated to support Device Trees.

AleFachini wrote:Notice the errors with and without "-" in the command, ...
I am well aware of the different variations of that boot command, and that's the reason why I challenged you on your (bogus) description.

The error messages are entirely consistent.
Since only one image was loaded from NAND flash into main memory (i.e. `nand read ...`)), there is only the kernel image and no Device Tree blob nor an initrd image.
You tried two variations of the boot command that specified two memory addresses for two images, and each time U-Boot complained that the second address did not have a valid image (since it contained garbage values).

AleFachini wrote:... I understand that i'm new at U-Boot and everything, but whats the difference?
You need to read the documentation.
The description for the arguments to the bootm and bootz commands can be displayed at the U-Boot command line (i.e. `help bootz`), and at 5.9.4.2. bootm - boot application image from memory in the U-Boot document.

AleFachini wrote:Should i set manually my environment variables?
Yes, for testing, and then you can patch U-Boot source code.

Try correcting the U-Boot environment (at the command line) with:

Code: Select all

setenv bootcmd nand read 0x22000000 0x200000 0x500000\; nand read 0x21000000 0x180000 0x80000\; bootz 0x22000000 - 0x21000000
followed by a bootd command to test it.

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

Re: At91sam9x35 Buildroot configs

Wed Oct 18, 2017 7:00 pm

Hello Again:
Sadly i went back in the problem. I decided to follow the instructions in linux4sam site, and recompile from sources all the binaries following "to the letter" the guide.

linux4sam/bin/view/Linux4SAM/AT91Bootstrap

https://www.at91.com/linux4sam/bin/view ... SAM/U-Boot
https://www.at91.com/linux4sam/bin/view ... delInUBoot

When i flash At91bootstrap.bin and then u-boot.bin at 0x40000 (using SAM-BA 2.12 windows), I get following console log:
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 ...
First: the AT91Bootstrap 3.8.7 (lun oct 9 13:46:05 ART 2017) is not correct since the compiled atboostrap binary is version 3.8.9 and it is compiled in later date.
Second: this <debug_uart> No serial driver found resetting ... is constantly looping. What should i do? I can't figure/find a u-boot guide for sam9x35ek. And it seems a configuration issue.

To clarify i will put below the commands entered:

1- make ARCH=arm at91sam9x5ek_nandflash_defconfig
2- make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-

Shouldn't this at least boot into u-boot console?
blue_z
Location: USA
Posts: 1504
Joined: Thu Apr 19, 2007 10:15 pm

Re: At91sam9x35 Buildroot configs

Wed Oct 18, 2017 10:16 pm

AleFachini wrote:First: the AT91Bootstrap 3.8.7 (lun oct 9 13:46:05 ART 2017) is not correct since the compiled atboostrap binary is version 3.8.9 and it is compiled in later date.
Then that means that you did not properly install (erase, then write to NAND) the new build of firmware.

AleFachini wrote:And it seems a configuration issue.
Not necessarily, because you are not doing what you claim to have done.

AleFachini wrote: To clarify i will put below the commands entered:

1- make ARCH=arm at91sam9x5ek_nandflash_defconfig
2- make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-

Shouldn't this at least boot into u-boot console?
No, because you are conflating four phases (configuration, building, installing, and executing) into one.

Previously you claimed that you were going to "recompile from sources all the binaries following "to the letter" the guide." But your "clarification" above proves that you have not followed the the guide "to the letter" (i.e. those are not the commands shown in the guide).

Now that you're trying to build these programs outside of Buildroot (which means you've gone off-topic), the build environment on your host PC becomes salient, and is the reason for the backwards progress.
So what toolchain did you install, and where is it?

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

Re: At91sam9x35 Buildroot configs

Thu Oct 19, 2017 3:03 pm

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.
  • u-boot-nodtb.bin
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)
  • at91bootstrap-3.6.0
  • 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.
blue_z
Location: USA
Posts: 1504
Joined: Thu Apr 19, 2007 10:15 pm

Re: At91sam9x35 Buildroot configs

Fri Oct 20, 2017 2:06 am

AleFachini wrote: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)
The first time you installed the images built by Buildroot, you mentioned a boot failure, and I described a solution that would boot the Linux kernel.
Then you described issues building individual projects.
Now you are claiming that the Buildroot images fail at the U-Boot stage? You were one step away from loading the DT blob and booting the Linux kernel! How do you go backwards that much by doing nothing?

I asked a simple question, and you have failed to respond.
Instead you've posted a plethora of scenarios and issues, which is impractical for anyone to respond to because you have shown a lack of following through on a single item.

Pick one issue, and try to solve that.

AleFachini wrote:FIRST: Again the date and version of the bootstrap did not change, which could mean that the SAM-BA script is broken?
Right, SAM-BA has to be broken because you're the experienced user who doesn't make mistakes.
No, the problem is probably the human at the keyboard that always specifies the same file.

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

Re: At91sam9x35 Buildroot configs

Fri Oct 20, 2017 2:21 pm

Hello Mr Blue_z:

Even though I enjoy sarcasm, i did found an error en SAM-BA scripts 2.16 for flashing sam9x35 and i replaced it with a 2.12 script and It worked, so YES SAM-BA could be broken.

But the problem WAS the human at the keyboard. I'll Explain:

At some point in my learning, I mistakenly flashed Bootstrap to Serial Memory, and i did not noticed that. But I deduct that the boot order reads first Serial Memory then NAND, because after EREASING Serial memory with samba the system booted correctly into U-Boot>. So for all new people there BE AWARE of flashing into wrong memory with SAM-BA (don't be Human please!!!)

So this First Problem was solved and now I have on the LCD of my Kit the Microchip logo with "UBoot 2017.03 and linux4sam_5.6.
After this the Kernel Starts and boots OK up to the part of loading the RFS. So I, again; ask for help.

Details:
Flashed the BUildroot's Generated ROOTFS.UBI, (not the *.UBIFS) and get following DBGU Prompt(I'll Paste the error and Attach the text log because is very long).
Last Segment:
ubi0 error: vtbl_check: bad CRC at record 13: 0x5d82052f, not 0xf116c36b
Volume table record 13 dump:
reserved_pebs 0
alignment 0
data_pad 0
vol_type 0
upd_marker 0
name_len 0
name NULL
ubi0 error: ubi_read_volume_table: both volume tables are corrupted
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd7, error -22
UBI error: cannot attach mtd7at91_rtc fffffeb0.rtc: setting system clock to 2007
-01-01 18:24:06 UTC (1167675846)
panel-power-supply: disabling
ALSA device list:
#0: wm8731 @ AT91SAM9X5EK
VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
Please append a correct "root=" boot option; here are the available partitions:
0100 8192 ram0 (driver?)
0101 8192 ram1 (driver?)
0102 8192 ram2 (driver?)
0103 8192 ram3 (driver?)
1f00 256 mtdblock0 (driver?)
1f01 512 mtdblock1 (driver?)
1f02 256 mtdblock2 (driver?)
1f03 256 mtdblock3 (driver?)
1f04 256 mtdblock4 (driver?)
1f05 512 mtdblock5 (driver?)
1f06 6144 mtdblock6 (driver?)
1f07 253952 mtdblock7 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-blo
ck(0,0)
random: crng init done
Regards.- And Thank you!

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests