AT91SAM9X25 AT91SAM9G25 OpenWrt compilation and debugging pitfalls

Publisher:SereneHeartLatest update time:2022-06-29 Source: eefocusKeywords:OpenWrt  compile  debug Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Compiled LEDE-17.01.7

18.06.8

19.07.3

These release versions

I found that except for the LEDE branch, the others could not run. When it came to the UBI file system, an ECC return -74 error occurred.

No reason found

No problems with using LEDE branch

The openwrt system LEDE branch can be started normally. It can run on AT91SAM9G25.

WEB can also update NAND's kernel+dtb+rootfs (squashfs+ubi)

The effect is similar to that of Nuvoton NUC980 running openwrt, but AT91SAM9G25 is faster, 400MHZ

RomBOOT


AT91Bootstrap 3.9.1 (Fri May 22 05:57:20 PDT 2020)


1-Wire: Loading 1-Wire information ...

1-Wire: ROM Searching ... Done, 0 1-Wire chips found


WARNING: 1-Wire: No 1-Wire chip found


1-Wire: Using default information


1-Wire: Board sn: 0x4010425 revision: 0x8421


NAND: ONFI flash detected

NAND: Manufacturer ID: 0xef Chip ID: 0xda

NAND: Page Bytes: 2048, Spare Bytes: 64

NAND: ECC Correctability Bits: 1, ECC Sector Bytes: 512

NAND: Disable On-Die ECC

NAND: Initialize PMECC params, cap: 2, sector: 512

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

NAND: Done to load image



U-Boot 2016.03-linux4sam_5.5 (May 25 2020 - 09:53:08 -0700)


CPU: AT91SAM9G25

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 0x600000

 6291456 bytes read: OK

## Booting kernel from Legacy Image at 22000000 ...

   Image Name:   OpenWrt ARM 4.4.194

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    3288086 Bytes = 3.1 MiB

   Load Address: 20008000

   Entry Point:  20008000

   Verifying Checksum ... OK

   Loading Kernel Image ... OK


Starting kernel ...


[    0.000000] Booting Linux on physical CPU 0x0

[    0.000000] Linux version 4.4.194 (legend@ubuntu) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4046-beaa2ecc10) ) #0 Tue Nov 19 05:51:15 2019

[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f

[    0.000000] CPU: VIVT data cache, VIVT instruction cache

[    0.000000] Machine model: Atmel AT91SAM9G25-EK

[    0.000000] Memory policy: Data cache writeback

[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512

[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk rootfstype=squashfs ubi.mtd=4 root=/dev/ubiblock0_0 noinitrd init=/sbin/init

[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)

[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

[    0.000000] Memory: 124616K/131072K available (3438K kernel code, 108K rwdata, 1236K rodata, 164K init, 186K bss, 6456K reserved, 0K cma-reserved)

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)

[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)

[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)

[    0.000000]       .text : 0xc0008000 - 0xc0498d8c   (4676 kB)

[    0.000000]       .init : 0xc0499000 - 0xc04c2000   ( 164 kB)

[    0.000000]       .data : 0xc04c2000 - 0xc04dd36c   ( 109 kB)

[    0.000000]        .bss : 0xc04dd36c - 0xc050bcc4   ( 187 kB)

[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[ 0.000000] NR_IRQS:16 nr_irqs:16 16

[    0.000000] clocksource: pit: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 14334453866 ns

[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns

[    0.070000] Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)

[    0.070000] pid_max: default: 32768 minimum: 301

[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

[    0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

[    0.070000] CPU: Testing write buffer coherency: ok

[    0.070000] Setting up static identity map for 0x20008400 - 0x2000843c

[    0.100000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[    0.100000] futex hash table entries: 256 (order: -1, 3072 bytes)

[    0.100000] pinctrl core: initialized pinctrl subsystem

[    0.100000] NET: Registered protocol family 16

[    0.100000] DMA: preallocated 256 KiB pool for atomic coherent allocations

[    0.100000] AT91: Detected SoC family: at91sam9x5

[    0.100000] AT91: Detected SoC: at91sam9g25, revision 1

[    0.120000] gpio-at91 fffff400.gpio: at address c8852400

[    0.120000] gpio-at91 fffff600.gpio: at address c8854600

[    0.120000] gpio-at91 fffff800.gpio: at address c8856800

[    0.130000] gpio-at91 fffffa00.gpio: at address c8858a00

[    0.130000] pinctrl-at91 ahb:apb:pinctrl@fffff400: initialized AT91 pinctrl driver

[    0.860000] at_hdmac ffffec00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels

[    0.860000] at_hdmac ffffee00.dma-controller: Atmel AHB DMA Controller ( cpy set slave sg-cpy ), 8 channels

[    0.870000] clocksource: Switched to clocksource pit

[    0.870000] NET: Registered protocol family 2

[    0.870000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)

[    0.870000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

[    0.870000] TCP: Hash tables configured (established 1024 bind 1024)

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

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

[    0.870000] NET: Registered protocol family 1

[    0.880000] No memory allocated for crashlog

[    0.940000] squashfs: version 4.0 (2009/01/31) Phillip Lougher

[    0.940000] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.

[    0.950000] io scheduler noop registered

[    0.950000] io scheduler deadline registered (default)

[    0.950000] fffff200.serial: ttyS0 at MMIO 0xfffff200 (irq = 16, base_baud = 8333333) is a ATMEL_SERIAL

[    1.330000] console [ttyS0] enabled

[    1.340000] f801c000.serial: ttyS1 at MMIO 0xf801c000 (irq = 30, base_baud = 8333333) is a ATMEL_SERIAL

[    1.360000] atmel_nand 40000000.nand: Use On Flash BBT

[    1.360000] atmel_nand 40000000.nand: Using dma0chan0 for DMA transfers.

[    1.370000] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xda

[    1.380000] nand: Unknown W29N02GV

[    1.380000] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64

[    1.390000] atmel_nand 40000000.nand: minimum ECC: 1 bits in 512 bytes

[    1.400000] atmel_nand 40000000.nand: Initialize PMECC params, cap: 2, sector: 512

[    1.410000] Bad block table not found for chip 0

[    1.410000] Bad block table not found for chip 0

[    1.420000] Scanning device for bad blocks

[    1.490000] Bad block table written to 0x00000ffe0000, version 0x01

[    1.500000] Bad block table written to 0x00000ffc0000, version 0x01

[    1.510000] 5 ofpart partitions found on MTD device atmel_nand

[    1.510000] Creating 5 MTD partitions on "atmel_nand":

[    1.520000] 0x000000000000-0x000000040000 : "at91bootstrap"

[    1.530000] 0x000000040000-0x0000000c0000 : "u-boot"

[    1.540000] 0x0000000c0000-0x000000200000 : "U-Boot Env"

[    1.550000] 0x000000200000-0x000000800000 : "kernel"

[    1.560000] 0x000000800000-0x000010000000 : "ubi"

[    1.570000] macb f802c000.ethernet: invalid hw address, using random

[    1.580000] libphy: MACB_mii_bus: probed

[    1.600000] macb f802c000.ethernet eth0: Cadence MACB rev 0x0001010c at 0xf802c000 irq 35 (ea:b6:6d:52:28:72)

[    1.610000] macb f802c000.ethernet eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=f802c000.ethernet-ffffffff:01, irq=-1)

[    1.620000] AT91: Starting after software reset

[    1.630000] at91_wdt fffffe40.watchdog: watchdog is disabled

[    1.630000] at91_wdt: probe of fffffe40.watchdog failed with error -22

[    1.640000] atmel_mci f0008000.mmc: version: 0x504

[    1.650000] atmel_mci f0008000.mmc: using dma0chan1 for DMA transfers

[    1.650000] atmel_mci f0008000.mmc: No vmmc regulator found

[    1.660000] atmel_mci f0008000.mmc: No vqmmc regulator found

[    1.710000] atmel_mci f0008000.mmc: Atmel MCI controller at 0xf0008000 irq 29, 1 slots

[    1.720000] NET: Registered protocol family 10

[    1.730000] NET: Registered protocol family 17

[    1.730000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.

[    1.750000] 8021q: 802.1Q VLAN Support v1.8

[    1.760000] ubi0: attaching mtd4

[    2.170000] ubi0: scanning is finished

[    2.200000] gluebi (pid 1): gluebi_resized: got update notification for unknown UBI device 0 volume 1

[    2.210000] ubi0: volume 1 ("rootfs_data") re-sized from 265 to 1924 LEBs

[    2.220000] ubi0: attached mtd4 (name "ubi", size 248 MiB)

[    2.230000] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes

[    2.230000] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048

[    2.240000] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096

[    2.250000] ubi0: good PEBs: 1980, bad PEBs: 4, corrupted PEBs: 0

[    2.250000] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128

[    2.260000] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1887379045

[    2.270000] ubi0: available PEBs: 0, total reserved PEBs: 1980, PEBs reserved for bad PEB handling: 36

[    2.280000] ubi0: background thread "ubi_bgt0d" started, PID 314

[    2.300000] mtd: device 5 (rootfs) set to be root filesystem

[    2.330000] block ubiblock0_0: created from ubi0:0(rootfs)

[    2.330000] hctosys: unable to open rtc device (rtc0)

[    2.370000] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.

[    2.380000] Freeing unused kernel memory: 164K

[    3.180000] init: Console is alive

[    4.050000] kmodloader: loading kernel modules from /etc/modules-boot.d/*

[1] [2]
Keywords:OpenWrt  compile  debug Reference address:AT91SAM9X25 AT91SAM9G25 OpenWrt compilation and debugging pitfalls

Previous article:At91sam9x25 CPU booting issue
Next article:AT91SAM9X modified MAC driver to add eeprom support Linux2.6.39

Recommended ReadingLatest update time:2024-11-15 21:07

stm32 in Keil5 debugging prompt: uvision IDE has stopped working
1 http://blog.csdn.net/qq_33259138/article/details/70224581 The phenomenon is that there is no problem in compiling and downloading the program, but after starting Debug, as soon as entering the C source code file, it crashes immediately. I found a solution on the forum. Copy your project, send it to a short path
[Microcontroller]
stm32 in Keil5 debugging prompt: uvision IDE has stopped working
Summary of the problem that stm8 cannot be debugged online
Problem Description: 1. Previously, I created a stm8 project A and used the stm8 library function to perform online single-step debugging. 2. Later, there is another project B. I forgot whether it was newly created or copied from project A. Anyway, the program will run wild when debugging online. It doesn’t run wi
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号