At91sam9x35 Buildroot configs

Discussion around AT91RM9200 and SAM9 Series Products.

Moderator: nferre

AleFachini
Posts: 12
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: 1549
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: 12
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: 1549
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: 12
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: 1549
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: 12
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: 1549
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: 12
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 in 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:
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
EDIT: SUCCESS after doing this

BUT, at the moment the system get into buildroot this message prompts:
This architecture does not have kernel memory protection.
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
buildroot login: atmel-hlcdc-display-controller atmel-hlcdc-dc: fb0: frame buff
er device

random: crng init don
This Results in This Behavior of LCD:
Before BuildRoot
After BuildRoot

About RFS image I need to use jffs2 format, how do i change u-boot variables for that?

tried setenv rootfstype jffs2 and didnt work, of course i've compiled and flashed such RFS image

Regards.- And Thank you!
blue_z
Location: USA
Posts: 1549
Joined: Thu Apr 19, 2007 10:15 pm

Re: At91sam9x35 Buildroot configs

Sat Oct 21, 2017 2:01 am

AleFachini wrote:BUT, at the moment the system get into buildroot
There's no such thing.
Buildroot is a collection of scripts and makefiles on your host PC.
By default Buildroot assigns the name "Buildroot" as the hostname of the target system, but that is simply self-promotion. There is no "Buildroot" program on your target board.

AleFachini wrote:This Results in This Behavior of LCD:
Before BuildRoot
After BuildRoot
"Before" and "after Buildroot" doesn't make any sense to me.
FWIW that looks like frame buffer memory was overwritten.

AleFachini wrote:About RFS image I need to use jffs2 format, how do i change u-boot variables for that?
And I had asked why, and got no response.
Build (or look at) U-Boot v2017.05 from mainline instead of Linux4SAM, and the CONFIG_BOOTARGS will specify JFFS2.

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

Re: At91sam9x35 Buildroot configs

Mon Oct 23, 2017 2:28 pm

There's no such thing.
Buildroot is a collection of scripts and makefiles on your host PC.
By default Buildroot assigns the name "Buildroot" as the hostname of the target system, but that is simply self-promotion. There is no "Buildroot" program on your target board.

I know this, is just to use this as a "point" in the stuffs i'm doing, You got that is the hostname of the target system, as I said before I am new and I don't Know every single concept by definition. I'm sorry.
"Before" and "after Buildroot" doesn't make any sense to me.
Mmmmm, I guess that could it be BEFORE Kernel LCD Drivers Load and AFTER Kernel LCD Drivers Load?? Though I jhave read the log and the drivers are loaded before getting into "hostname" so, i don't know why the LCD behaves like this. :|


And I had asked why, and got no response.
Build (or look at) U-Boot v2017.05 from mainline instead of Linux4SAM, and the CONFIG_BOOTARGS will specify JFFS2.
Because this project was given to me at 2017, but the Company that abandon the project made some customized libraries prebuilt inside a "tool" that builds a system App file ONLY in jffs2 (BACK in 2011), I can't access to those libraries, they are for internal communication and bussiness Logic. SO thats why iI need JFFS2. If i could "convert" jffs2 to ubi it could work, but I think is just add more problems to my already short Knowledge. I don't understand how this can help you, but I hope it clarify why i need jffs2.
OK, I will try to use those bootargs. 2017.05.
Queston? To insert the mainline u.-boot in buildroot I'll Just have to change the git link inside menuconfig>bootloaders in Builldroot?

EDIT: I downloaded Mainline:
1) git clone git://git.denx.de/u-boot.git
2) cd u-boot
3) git tag > found v2017.05
4) git checkout v2017.05 -b 2017.05

Then navigated to: /.../u-boot/include/configs/at91sam9x5ek.h and found:
#ifdef CONFIG_SYS_USE_MMC
#define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 " \
"mtdparts=atmel_nand:" \
"8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
"root=/dev/mmcblk0p2 " \
"rw rootfstype=ext4 rootwait"
#else
#define CONFIG_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"
#endif
the non mmc BOOTARGS are for ubi, I am in the wrong place? Thanks.

I found this in: ../buildroot/output/build/linux-linux4sam_5.6/init/do_mounts.c
/*
* Convert a name into device number. We accept the following variants:
*
* 1) <hex_major><hex_minor> device number in hexadecimal represents itself
* no leading 0x, for example b302.
* 2) /dev/nfs represents Root_NFS (0xff)
* 3) /dev/<disk_name> represents the device number of disk
* 4) /dev/<disk_name><decimal> represents the device number
* of partition - device number of disk plus the partition number
* 5) /dev/<disk_name>p<decimal> - same as the above, that form is
* used when disk name of partitioned disk ends on a digit.
* 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
* unique id of a partition if the partition table provides it.
* The UUID may be either an EFI/GPT UUID, or refer to an MSDOS
* partition using the format SSSSSSSS-PP, where SSSSSSSS is a zero-
* filled hex representation of the 32-bit "NT disk signature", and PP
* is a zero-filled hex representation of the 1-based partition number.
* 7) PARTUUID=<UUID>/PARTNROFF=<int> to select a partition in relation to
* a partition with a known unique id.
* 8) <major>:<minor> major and minor number of the device separated by
* a colon.
*
* If name doesn't have fall into the categories above, we return (0,0).
* block_class is used to check if something is a disk name. If the disk
* name contains slashes, the device name has them replaced with
* bangs.
*/
This represent the formats for "root=" variable, for the default variables i understand that "rootfs" is the minor, but "ubi0" which value is it? and how to transform these arguments into a configuration for jffs2?



Thanks for Your Patience. Alejandro.-
blue_z
Location: USA
Posts: 1549
Joined: Thu Apr 19, 2007 10:15 pm

Re: At91sam9x35 Buildroot configs

Mon Oct 23, 2017 9:10 pm

AleFachini wrote:I don't understand how this can help you, but I hope it clarify why i need jffs2.
It doesn't, but I don't like my query ignored by someone who otherwise wants my time. I'm just curious as to why you choose an inferior filesystem (for a large NAND chip).

AleFachini wrote:OK, I will try to use those bootargs. 2017.05.
Queston? To insert the mainline u.-boot in buildroot I'll Just have to change the git link inside menuconfig>bootloaders in Builldroot?
Yes, but in general I prefer to download the tarball for the specific released version instead of cloning the git repository.

AleFachini wrote: I am in the wrong place?
No, my bad: apparently I clicked the wrong filename while browsing the U-Boot cross-reference at Free-Electrons.com.
at91sam9m10g45ek.h has the bootargs that you can use.

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

Re: At91sam9x35 Buildroot configs

Tue Oct 24, 2017 7:11 pm

Hello Mr Blue_z:
First, thanks for your reply, I can't say enough how much help have you been, and how much patient. Thanks a LOT.
blue_z wrote:
Mon Oct 23, 2017 9:10 pm
It doesn't, but I don't like my query ignored by someone who otherwise wants my time. I'm just curious as to why you choose an inferior filesystem (for a large NAND chip).
I'm sorry didn't mean to offend you.

OK, I've tried some stuff with no success:
First I made a clean build in Buildroot and selected both images *.ubi and *.jffs2 for RFS output files.

With UBI file i found some things, "curious" to me. Now I'will paste the procedure and log for UBI RFS:

FLASH PROCEDURE FOR RFS UBI:

1-Conect to SAM-BA
2-Enable NandFlash
3-Erase All Script
4-Excute Send Boot File Script for At91Bootstrap
5-Flash Files.
6-Reset:
Log After Reset:
RomBOOT

AT91Bootstrap 3.8.8 (lun oct 23 18:33:51 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 0xa0000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image
<debug_uart>

U-Boot 2017.03-linux4sam_5.6 (Oct 23 2017 - 18:33:59 -0300)

CPU: AT91SAM9X35
Crystal frequency: 12 MHz
CPU clock : 400 MHz
Master clock : 133.333 MHz
DRAM: 128 MiB
NAND: 256 MiB
MMC: Atmel mci: 0, Atmel mci: 1
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net:
Error: ethernet@f802c000 address not set.
No ethernet found.
Hit any key to stop autoboot: 3 2 1 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!
8-change env for zImage:
Log Segment Posted:
U-Boot> printenv
baudrate=115200
bootargs=console=ttyS0,115200 eaalyprintk 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
fdtcontroladdr=27cc9210

Environment size: 344/131067 bytes
U-Boot> setenv bootcmd nand read 0x22000000 0x200000 0x500000\; nand read 0x21000000 0x180000 0x80000\; bootz 0x22000000 - 0x21000000
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 0x500000; nand read 0x21000000 0x180000 0x80000; bootz 0x22000000 - 0x21000000
bootdelay=3
fdtcontroladdr=27cc9210

Environment size: 396/131067 bytes
U-Boot>saveenv
Saving Environment to NAND...
Erasing redundant NAND...

Erasing at 0x100000 -- 100% complete.
Writing to redundant NAND... OK
U-Boot> bootd
9-bootd ends in this error:
#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-block(0,0)
10-Then i did this:
Enable OS PMECC parameters Script, and enable Trimffs( from: linux4sam/bin/view/Linux4SAM/FlashRootF ... ing_SAM_BA).
What I found strange here is that IF i activate trimffs and flash bootstrap, uboot, kernel and rfs*ubi the system wont even boot, meaning that nothing happens not even appears "RoomBoot". But if i do exactly what is in the link it boots ok as follows in step 11. Why is that?
11- Reset:
Log segment After Reset with Reflashing the rootfs.ubi having activated trimffs
ubi0: background thread "ubi_bgt0d" started, PID 69
UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 70
UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
UBIFS (ubi0:0): FS size: 244682752 bytes (233 MiB, 1927 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID B724FE6B-3C0E-44BF-AAFE-57C73D659D58, small LPT model
VFS: Mounted root (ubifs filesystem) on device 0:13.
devtmpfs: mounted
Freeing unused kernel memory: 196K (c06d9000 - c070a000)
This architecture does not have kernel memory protection.
Starting logging: OK
Initializing random number generator... done.
Starting system message bus: done
Starting network: OK
Starting dropbear sshd: OK
ssh-keygen: generating new host keys: RSA atmel-hlcdc-display-controller atmel-hlcdc-dc: fb0: frame buffer device
DSA ECDSA ED25519
Starting sshd: OK


Welcome to Buildroot

buildroot login: SUCCESS
12- Checking MTD partitions:
cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "bootstrap"
mtd1: 00080000 00020000 "uboot"
mtd2: 00040000 00020000 "env"
mtd3: 00040000 00020000 "env_redundant"
mtd4: 00040000 00020000 "spare"
mtd5: 00080000 00020000 "dtb"
mtd6: 00600000 00020000 "kernel"
mtd7: 0f800000 00020000 "rootfs" THIS calls my attention how do i read this ? interpretation is what i mean
#
FLASH PROCEDURE FOR RFS JFFS2:

1-Conect a SAM-BA
2-Enable NandFlash
3-Erase All Script
4-Excute Send Boot File Script for At91Bootstrap
5-Flash Files.
6-Reset:
This log segment is before changing environment variables for rootfs:
RomBOOT



AT91Bootstrap 3.8.8 (lun oct 23 18:33:51 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 0xa0000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image
<debug_uart>

U-Boot 2017.03-linux4sam_5.6 (Oct 23 2017 - 18:33:59 -0300)

CPU: AT91SAM9X35
Crystal frequency: 12 MHz
CPU clock : 400 MHz
Master clock : 133.333 MHz
DRAM: 128 MiB
NAND: 256 MiB
MMC: Atmel mci: 0, Atmel mci: 1
In: serial
Out: serial
Err: serial
Net:
Error: ethernet@f802c000 address not set.
No ethernet found.
Hit any key to stop autoboot: 3 2 0
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 0x500000; nand read 0x21000000 0x180000 0x80000; bootz 0x22000000 - 0x21000000
bootdelay=3
fdtcontroladdr=27cc9210

Environment size: 396/131067 bytes
8-change env for jffs2
This Log Segment includes setenv, saveenv and reset.
U-Boot> setenv 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)\ root=/dev/mtdblock7 rw rootfstype=jffs2
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) root=/dev/mtdblock7 rw rootfstype=jffs2
bootcmd=nand read 0x22000000 0x200000 0x500000; nand read 0x21000000 0x180000 0x80000; bootz 0x22000000 - 0x21000000
bootdelay=3
fdtcontroladdr=27cc9210

Environment size: 389/131067 bytes
U-Boot> saveenv
Saving Environment to NAND...
Erasing NAND...

Erasing at 0x140000 -- 100% complete.
Writing to NAND... OK
U-Boot> reset
resetting ...
Question: Should i have used editenv bootargs?

10-reset. Error Log.
Log Segments with errors occurred:
Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.9.30-linux4sam_5.6 (afachini@afachini-VBox32) (gcc version 6.4.0
(Buildroot 2017.08) ) #1 Mon Oct 23 18:45:04 ART 2017
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt:Machine model: Atmel AT91SAM9X35-EK
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(b
ootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M
(kernel)ro,-(rootfs) root=/dev/mtdblock7 rw rootfstype=jffs2

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: 122200K/131072K available (5453K kernel code, 180K rwdata, 1368K rodata,
196K init, 191K bss, 8872K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc055ba98 (5455 kB)
.init : 0xc06d9000 - 0xc070a000 ( 196 kB)
.data : 0xc070a000 - 0xc07370e0 ( 181 kB)
.bss : 0xc07370e0 - 0xc0766dcc ( 192 kB)
NR_IRQS:16 nr_irqs:16 16
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 7167226906
ns
sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 16777215996093
750ns
Console: colour dummy device 80x30
Calibrating delay loop... 198.76 BogoMIPS (lpj=775168)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x20008400 - 0x2000847c
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1493
1722236523437 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
AT91: Detected SoC family: at91sam9x5
AT91: Detected SoC: at91sam9x35, revision 1
gpio-at91 fffff400.gpio: at address c8861400
gpio-at91 fffff600.gpio: at address c8863600
gpio-at91 fffff800.gpio: at address c8865800
gpio-at91 fffffa00.gpio: at address c8867a00
pinctrl-at91 ahb:apb:pinctrl@fffff400: initialized AT91 pinctrl driver
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1
14675631333 ns
at_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cp
y ), 8 channels
at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cp
y ), 8 channels
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
at91_i2c f8010000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f8010000.i2c: AT91 i2c bus driver (hw version: 0x402).
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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.
workingset: timestamp_bits=30 max_order=15 bucket_order=0
io scheduler noop registered (default)
fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16, base_baud = 8333333) is a A
TMEL_SERIAL
console [ttyS0] enabled
f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 25, base_baud = 8333333) is a A
TMEL_SERIAL
[drm] Initialized
brd: module loaded
loop: module loaded
ssc f0010000.ssc: Atmel SSC device at 0xc88a4000 (irq 22)
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to create HLCDC outputs: -
517
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to initialize mode setting
atmel_nand 40000000.nand: Using dma0chan2 for DMA transfers.
nand: Could not find valid ONFI parameter page; aborting
nand: device found, Manufacturer ID: 0xad, Chip ID: 0xda
nand: Hynix NAND 256MiB 3,3V 8-bit
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
atmel_nand 40000000.nand: Use On Flash BBT
atmel_nand 40000000.nand: can't detect min. ECC, assume 2 bits in 512 bytes
atmel_nand 40000000.nand: Initialize PMECC params, cap: 2, sector: 512

Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: bad block at 0x0000005c0000
nand_read_bbt: bad block at 0x0000033e0000
nand_read_bbt: bad block at 0x00000c640000
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 : "env_redundant"
0x000000140000-0x000000180000 : "spare"
0x000000180000-0x000000200000 : "dtb"
0x000000200000-0x000000800000 : "kernel"
0x000000800000-0x000010000000 : "rootfs"

libphy: Fixed MDIO Bus: probed
CAN device driver interface
macb f802c000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
Davicom DM9161A f802c000.etherne:00: attached PHY driver [Davicom DM9161A] (mii_
bus:phy_addr=f802c000.etherne:00, irq=-1)
macb f802c000.ethernet eth0: Cadence MACB rev 0x0001010c at 0xf802c000 irq 30 (0
a:bc:6d:7e:03:b1)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
atmel-ehci 700000.ehci: EHCI Host Controller
atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
atmel-ehci 700000.ehci: irq 31, io mem 0x00700000
atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 4.9.30-linux4sam_5.6 ehci_hcd
usb usb1: SerialNumber: 700000.ehci
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
ohci-atmel: OHCI Atmel driver
at91_ohci 600000.ohci: failed to find sfr node
at91_ohci 600000.ohci: USB Host Controller
at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
at91_ohci 600000.ohci: irq 31, io mem 0x00600000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: USB Host Controller
usb usb2: Manufacturer: Linux 4.9.30-linux4sam_5.6 ohci_hcd
usb usb2: SerialNumber: at91
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
mousedev: PS/2 mouse device common for all mice
qt1070 0-001b: AT42QT1070 firmware version 15
random: fast init done
input: AT42QT1070 QTouch Sensor as /devices/soc0/ahb/ahb:apb/f8010000.i2c/i2c-0/
0-001b/input/input0
rtc rtc0: alarm rollover not handled
rtc rtc0: invalid alarm value: 1900-1-1 0:0:0
at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
AT91: Starting after user reset
at91_wdt fffffe40.watchdog: watchdog is disabled
at91_wdt: probe of fffffe40.watchdog failed with error -22
atmel_mci f0008000.mmc: version: 0x504
atmel_mci f0008000.mmc: using dma0chan3 for DMA transfers
atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 23, 1 slots
atmel_mci f000c000.mmc: version: 0x504
atmel_mci f000c000.mmc: using dma1chan0 for DMA transfers
atmel_mci f000c000.mmc: Atmel MCI controller at 0xf000c000 irq 24, 1 slots
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
iio iio:device0: Resolution used: 10 bits
input: at91_adc as /devices/soc0/ahb/ahb:apb/f804c000.adc/input/input1
wm8731 0-001a: Assuming static MCLK
0-001a supply AVDD not found, using dummy regulator
0-001a supply HPVDD not found, using dummy regulator
0-001a supply DCVDD not found, using dummy regulator
0-001a supply DBVDD not found, using dummy regulator
sam9x5-snd-wm8731 sound: wm8731-hifi <-> f0010000.ssc mapping ok
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20161123 t)
can: netlink gateway (rev 20130117) max_hops=1
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
atmel-hlcdc-display-controller atmel-hlcdc-dc: DRM device successfully registere
d
at91_rtc fffffeb0.rtc: setting system clock to 2007-01-05 22:14:37 UTC (11680352
77)
panel-power-supply: disabling
ALSA device list:
#0: wm8731 @ AT91SAM9X5EK
VFS: Cannot open root device "mtdblock7" or unknown-block(31,7): 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(31,7)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-blo
ck(31,7)
Questions:
Browsing the web i found that in some boards (Texas Instruments) they use trimmfs for JFFS2 Root File Systems, could this be applicable to SAMs?

Is there a place to look fo these VFS errors? i.e.: error -19?

Please append a correct "root=" boot option; here are the available partitions: I dont understand what i did wrong? Could It be the root path with: /dev/mtdblock7? Maybe there is another syntax something like root=xxxx:rootfs?

Also i found that i should prepare the Kernel to boot for JFFS2, is this correct?. Because i had just used default config from buildroot.

Just in case you ask, where can I find the Kernel log and config file inside buildroot drectory, so i can provide those in case you need them, or for future needs?
blue_z
Location: USA
Posts: 1549
Joined: Thu Apr 19, 2007 10:15 pm

Re: At91sam9x35 Buildroot configs

Wed Oct 25, 2017 2:43 am

AleFachini wrote:What I found strange here is that IF i activate trimffs and flash bootstrap, uboot, kernel and rfs*ubi the system wont even boot, meaning that nothing happens not even appears "RoomBoot". But if i do exactly what is in the link it boots ok as follows in step 11. Why is that?
I don't know.

AleFachini wrote:Question: Should i have used editenv bootargs?
Maybe you could have, but that is a new command and it is not always available.

AleFachini wrote:Questions:
Browsing the web i found that in some boards (Texas Instruments) they use trimmfs for JFFS2 Root File Systems, could this be applicable to SAMs?
Yes.

AleFachini wrote:Is there a place to look fo these VFS errors? i.e.: error -19?
The error numbers are not specific to VFS, but are the generic Linux errno code numbers. Try a google search for "linux errno codes".

AleFachini wrote:Could It be the root path with: /dev/mtdblock7? Maybe there is another syntax something like root=xxxx:rootfs?
Not likely. No.
If the kernel complains about /dev/mtdblock7, then you need to draw a map of the MTD partitions in NAND.
The kernel will report in the boot log (what you highlighted in green) the partition info it has (typically from the kernel command line). You need to verify that the start offsets and lengths match the NAND addresses uses to flash images.

Regarding the lines you highlighted in orange: those same lines appear in the pre-built Linux4SAM 5.7 demo on that EK board, which can successfully mount the UBIFS rootfs. So those lines probably are not related to the mount failure.

AleFachini wrote:Also i found that i should prepare the Kernel to boot for JFFS2, is this correct?. Because i had just used default config from buildroot.
Bingo!
Looks like your kernel does not have support for JFFS2 (i.e. there would be a version and copyright notice in the boot log).
Inspect and modify the kernel configuration using the command `make linux-menuconfig`, and drill down to 'Miscellaneous filesystems'.

AleFachini wrote:Just in case you ask, where can I find the Kernel log and config file inside buildroot drectory, so i can provide those in case you need them, or for future needs?
AFAIK there is no automatic log, although someone claims there is in the OpenWrt version.


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

Re: At91sam9x35 Buildroot configs

Wed Oct 25, 2017 8:56 pm

Hello:

After playing arround with some configs, I DID IT!

I'm not completely shure if I activated excessive options but it's Done, This is the LOG:
RomBOOT



AT91Bootstrap 3.8.8 (mié oct 25 10:01:51 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 0xa0000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image
<debug_uart>

U-Boot 2017.03-linux4sam_5.6 (Oct 25 2017 - 10:02:00 -0300)

CPU: AT91SAM9X35
Crystal frequency: 12 MHz
CPU clock : 400 MHz
Master clock : 133.333 MHz
DRAM: 128 MiB
NAND: 256 MiB
MMC: Atmel mci: 0, Atmel mci: 1
In: serial
Out: serial
Err: serial
Net:
Error: ethernet@f802c000 address not set.
No ethernet found.
Hit any key to stop autoboot: 3 2 0
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) root=/dev/mtdblock7 rw rootfstype=jffs2
bootcmd=nand read 0x22000000 0x200000 0x500000; nand read 0x21000000 0x180000 0x80000; bootz 0x22000000 - 0x21000000
bootdelay=3
fdtcontroladdr=27cc9210

Environment size: 389/131067 bytes
U-Boot> bootd

NAND read: device 0 offset 0x200000, size 0x500000
Skipping bad block 0x005c0000
5242880 bytes read: OK

NAND read: device 0 offset 0x180000, size 0x80000
524288 bytes read: OK
## Flattened Device Tree blob at 21000000
Booting using the fdt blob at 0x21000000
Loading Device Tree to 27cbd000, end 27cc72fb ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.9.30-linux4sam_5.6 (afachini@afachini-VBox32) (gcc version 6.4.0 (Buildroot 2017.08) ) #2 Wed Oct 25 11:40:33 ART 2017
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt:Machine model: Atmel AT91SAM9X35-EK
Memory policy: Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: 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) root=/dev/mtdblock7 rw rootfstype=jffs2
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: 122028K/131072K available (5558K kernel code, 180K rwdata, 1412K rodata, 216K init, 191K bss, 9044K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0575ea0 (5560 kB)
.init : 0xc06fe000 - 0xc0734000 ( 216 kB)
.data : 0xc0734000 - 0xc0761220 ( 181 kB)
.bss : 0xc0761220 - 0xc079102c ( 192 kB)
NR_IRQS:16 nr_irqs:16 16
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 7167226906 ns
sched_clock: 32 bits at 128 Hz, resolution 7812500ns, wraps every 16777215996093750ns
Console: colour dummy device 80x30
Calibrating delay loop... 198.76 BogoMIPS (lpj=775168)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x20008400 - 0x2000847c
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 14931722236523437 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
AT91: Detected SoC family: at91sam9x5
AT91: Detected SoC: at91sam9x35, revision 1
No ATAGs?
gpio-at91 fffff400.gpio: at address c8861400
gpio-at91 fffff600.gpio: at address c8863600
gpio-at91 fffff800.gpio: at address c8865800
gpio-at91 fffffa00.gpio: at address c8867a00
pinctrl-at91 ahb:apb:pinctrl@fffff400: initialized AT91 pinctrl driver
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 114675631333 ns

t_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
at91_i2c f8010000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f8010000.i2c: AT91 i2c bus driver (hw version: 0x402).
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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.
workingset: timestamp_bits=30 max_order=15 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16, base_baud = 8333333) is a ATMEL_SERIAL
console [ttyS0] enabled
f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 25, base_baud = 8333333) is a ATMEL_SERIAL
[drm] Initialized
brd: module loaded
loop: module loaded
ssc f0010000.ssc: Atmel SSC device at 0xc88f4000 (irq 22)
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to create HLCDC outputs: -517
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to initialize mode setting
atmel_nand 40000000.nand: Using dma0chan2 for DMA transfers.
nand: Could not find valid ONFI parameter page; aborting
nand: device found, Manufacturer ID: 0xad, Chip ID: 0xda
nand: Hynix NAND 256MiB 3,3V 8-bit
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
atmel_nand 40000000.nand: Use On Flash BBT
atmel_nand 40000000.nand: can't detect min. ECC, assume 2 bits in 512 bytes
atmel_nand 40000000.nand: Initialize PMECC params, cap: 2, sector: 512
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: bad block at 0x0000005c0000
nand_read_bbt: bad block at 0x0000033e0000
nand_read_bbt: bad block at 0x00000c640000
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 : "env_redundant"
0x000000140000-0x000000180000 : "spare"
0x000000180000-0x000000200000 : "dtb"
0x000000200000-0x000000800000 : "kernel"
0x000000800000-0x000010000000 : "rootfs"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
macb f802c000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
Davicom DM9161A f802c000.etherne:00: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=f802c000.etherne:00, irq=-1)
macb f802c000.ethernet eth0: Cadence MACB rev 0x0001010c at 0xf802c000 irq 30 (ea:29:43:92:e5:c7)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
atmel-ehci 700000.ehci: EHCI Host Controller
atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
atmel-ehci 700000.ehci: irq 31, io mem 0x00700000
atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 4.9.30-linux4sam_5.6 ehci_hcd
usb usb1: SerialNumber: 700000.ehci
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
ohci-atmel: OHCI Atmel driver
at91_ohci 600000.ohci: failed to find sfr node
at91_ohci 600000.ohci: USB Host Controller
at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
at91_ohci 600000.ohci: irq 31, io mem 0x00600000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: USB Host Controller
usb usb2: Manufacturer: Linux 4.9.30-linux4sam_5.6 ohci_hcd
usb usb2: SerialNumber: at91
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
mousedev: PS/2 mouse device common for all mice
qt1070 0-001b: AT42QT1070 firmware version 15
random: fast init done
input: AT42QT1070 QTouch Sensor as /devices/soc0/ahb/ahb:apb/f8010000.i2c/i2c-0/0-001b/input/input0
rtc rtc0: alarm rollover not handled
rtc rtc0: invalid alarm value: 1900-1-1 0:0:0
at91_rtc fffffeb0.rtc: rtc core: registered fffffeb0.rtc as rtc0
at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
AT91: Starting after user reset
at91_wdt fffffe40.watchdog: watchdog is disabled
at91_wdt: probe of fffffe40.watchdog failed with error -22
atmel_mci f0008000.mmc: version: 0x504
atmel_mci f0008000.mmc: using dma0chan3 for DMA transfers
atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 23, 1 slots
atmel_mci f000c000.mmc: version: 0x504
atmel_mci f000c000.mmc: using dma1chan0 for DMA transfers
atmel_mci f000c000.mmc: Atmel MCI controller at 0xf000c000 irq 24, 1 slots
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
iio iio:device0: Resolution used: 10 bits
input: at91_adc as /devices/soc0/ahb/ahb:apb/f804c000.adc/input/input1
wm8731 0-001a: Assuming static MCLK
0-001a supply AVDD not found, using dummy regulator
0-001a supply HPVDD not found, using dummy regulator
0-001a supply DCVDD not found, using dummy regulator
0-001a supply DBVDD not found, using dummy regulator
sam9x5-snd-wm8731 sound: wm8731-hifi <-> f0010000.ssc mapping ok
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20161123 t)
can: netlink gateway (rev 20130117) max_hops=1
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
atmel-hlcdc-display-controller atmel-hlcdc-dc: DRM device successfully registered
at91_rtc fffffeb0.rtc: setting system clock to 2007-01-06 21:27:28 UTC (1168118848)
panel-power-supply: disabling
ALSA device list:
#0: wm8731 @ AT91SAM9X5EK
jffs2: Empty flash at 0x01452870 ends at 0x01453000
random: crng init done
atmel-hlcdc-display-controller atmel-hlcdc-dc: fb0: frame buffer device
VFS: Mounted root (jffs2 filesystem) on device 31:7.
devtmpfs: mounted
Freeing unused kernel memory: 216K (c06fe000 - c0734000)
This architecture does not have kernel memory protection.
Starting logging: OK
Initializing random number generator... done.
Starting system message bus: done
Starting network: OK
Starting dropbear sshd: OK
Starting sshd: OK


Welcome to Buildroot

buildroot login: root
# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00020000 "bootstrap"
mtd1: 00080000 00020000 "uboot"
mtd2: 00040000 00020000 "env"
mtd3: 00040000 00020000 "env_redundant"
mtd4: 00040000 00020000 "spare"
mtd5: 00080000 00020000 "dtb"
mtd6: 00600000 00020000 "kernel"
mtd7: 0f800000 00020000 "rootfs"
#
And Here is the defconfig's file content inside: ../buildroot/output/build/linux4sam_5.6
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_IRQ_DOMAIN_DEBUG=y
CONFIG_IKCONFIG=m
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_CGROUPS=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EMBEDDED=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_MULTI_V4T=y
CONFIG_ARCH_MULTI_V5=y
# CONFIG_ARCH_MULTI_V7 is not set
CONFIG_ARCH_AT91=y
CONFIG_SOC_AT91RM9200=y
CONFIG_SOC_AT91SAM9=y
CONFIG_AEABI=y
CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
CONFIG_KEXEC=y
CONFIG_CPU_IDLE=y
# CONFIG_ARM_AT91_CPUIDLE is not set
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=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_DIAG is not set
# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_BEET is not set
CONFIG_IPV6_SIT_6RD=y
CONFIG_NETFILTER=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_CAN=y
CONFIG_CAN_AT91=y
CONFIG_CFG80211=y
CONFIG_MAC80211=y
# CONFIG_UEVENT_HELPER is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
CONFIG_DEBUG_DRIVER=y
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_AFS_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_DATAFLASH=y
CONFIG_MTD_BLOCK2MTD=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_ATMEL=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_GLUEBI=m
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=4
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_ATMEL_TCLIB=y
CONFIG_ATMEL_SSC=y
CONFIG_EEPROM_AT24=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_NETDEVICES=y
CONFIG_MACB=y
# CONFIG_NET_VENDOR_BROADCOM is not set
CONFIG_DM9000=y
# CONFIG_NET_VENDOR_FARADAY is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set
CONFIG_DAVICOM_PHY=y
CONFIG_MICREL_PHY=y
CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_SDIO=m
CONFIG_MWIFIEX_USB=m
CONFIG_RT2X00=m
CONFIG_RT2500USB=m
CONFIG_RT73USB=m
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT53XX=y
CONFIG_RT2800USB_RT55XX=y
CONFIG_RT2800USB_UNKNOWN=y
CONFIG_RTL8187=m
CONFIG_INPUT_POLLDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_QT1070=y
CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_ADS7846=y
# CONFIG_SERIO is not set
CONFIG_LEGACY_PTY_COUNT=4
CONFIG_SERIAL_ATMEL=y
CONFIG_SERIAL_ATMEL_CONSOLE=y
CONFIG_HW_RANDOM=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_AT91=y
CONFIG_I2C_GPIO=y
CONFIG_SPI=y
CONFIG_SPI_ATMEL=y
CONFIG_SPI_GPIO=y
CONFIG_SPI_SPIDEV=m
CONFIG_GPIO_SYSFS=y
CONFIG_POWER_RESET=y
CONFIG_POWER_SUPPLY=y
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_AT91SAM9X_WATCHDOG=y
CONFIG_MFD_ATMEL_HLCDC=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
# CONFIG_USB_GSPCA is not set
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_ATMEL_ISI=y
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
CONFIG_VIDEO_OV2640=m
CONFIG_VIDEO_OV2659=m
CONFIG_VIDEO_OV7640=m
CONFIG_VIDEO_OV7670=m
# CONFIG_DVB_AU8522_V4L is not set
# CONFIG_DVB_TUNER_DIB0070 is not set
# CONFIG_DVB_TUNER_DIB0090 is not set
CONFIG_DRM=y
CONFIG_DRM_ATMEL_HLCDC=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_FB_ATMEL=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_ATMEL_LCDC=y
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
CONFIG_SND_ATMEL_SOC=y
CONFIG_SND_AT91_SOC_SAM9G20_WM8731=y
CONFIG_SND_ATMEL_SOC_WM8904=y
CONFIG_SND_AT91_SOC_SAM9X5_WM8731=y
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_ACM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_FTDI_SIO=y
CONFIG_USB_SERIAL_PL2303=y
CONFIG_USB_GADGET=y
CONFIG_USB_ATMEL_USBA=m
CONFIG_USB_CONFIGFS=m
CONFIG_USB_CONFIGFS_ACM=y
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
CONFIG_USB_ZERO=m
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
CONFIG_MMC=y
# CONFIG_MMC_BLOCK_BOUNCE is not set
CONFIG_MMC_ATMELMCI=y
CONFIG_MMC_SPI=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_PWM=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_AT91RM9200=y
CONFIG_RTC_DRV_AT91SAM9=y
CONFIG_DMADEVICES=y
CONFIG_AT_HDMAC=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_IIO=y
CONFIG_AT91_ADC=y
CONFIG_PWM=y
CONFIG_PWM_ATMEL=y
CONFIG_PWM_ATMEL_HLCDC_PWM=y
CONFIG_PWM_ATMEL_TCB=y
CONFIG_EXT4_FS=y
CONFIG_FANOTIFY=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_CONFIGFS_FS=y
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=2
CONFIG_JFFS2_SUMMARY=y

CONFIG_UBIFS_FS=y
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
CONFIG_STRIP_ASM_SYMS=y
CONFIG_DEBUG_FS=y
# CONFIG_SCHED_DEBUG is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FTRACE is not set
CONFIG_DEBUG_USER=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_USER_API_HASH=m
CONFIG_CRYPTO_USER_API_SKCIPHER=m
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC_CCITT=y
Well, I guess this is solved, I have to say, Thank you Blue_z for your help, god bless you man.

Just one more thing, i gett this error, after a few moments:
jffs2: notice: (72) check_node_data: wrong data CRC in data nod
e at 0x01457800: read 0xe3a5bd28, calculated 0x1ec9dc33.



Regards, Alejandro.-

Return to “SAM9 ARM9 MPU”

Who is online

Users browsing this forum: No registered users and 4 guests