AT91SAM9X25 AT91SAM9G25 OpenWrt 编译 调试踩坑

AT91SAM9G25 9X25 OpenWrt 踩坑记录


2020-5-27 01:02:49
编译了LEDE-17.01.7
18.06.8
19.07.3
这几个release版本
发现除了LEDE分支另外的运行不起来,到了UBI 文件系统这个出现了 ECC 返回-74的错误
未找到原因
使用LEDE分支没出现问题
可以正常启动openwrt系统 LEDE分支目前在AT91SAM9G25上可以跑起来,
WEB也可以更新NAND的kernel+dtb + rootfs (squashfs+ubi)
效果和新唐NUC980 跑openwrt差不多,但是AT91SAM9G25速度快,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/*
[    4.250000] usbcore: registered new interface driver usbfs
[    4.250000] usbcore: registered new interface driver hub
[    4.260000] usbcore: registered new device driver usb
[    4.330000] SCSI subsystem initialized
[    4.340000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.360000] ehci-platform: EHCI generic platform driver
[    4.370000] ehci-atmel: EHCI Atmel driver
[    4.370000] atmel-ehci 700000.ehci: EHCI Host Controller
[    4.380000] atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
[    4.390000] atmel-ehci 700000.ehci: irq 36, io mem 0x00700000
[    4.410000] atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
[    4.420000] hub 1-0:1.0: USB hub found
[    4.420000] hub 1-0:1.0: 3 ports detected
[    4.450000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.460000] ohci-platform: OHCI generic platform driver
[    4.480000] ohci-atmel: OHCI Atmel driver
[    4.490000] at91_ohci 600000.ohci: USB Host Controller
[    4.490000] at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
[    4.500000] at91_ohci 600000.ohci: irq 36, io mem 0x00600000
[    4.570000] hub 2-0:1.0: USB hub found
[    4.580000] hub 2-0:1.0: 3 ports detected
[    4.590000] usbcore: registered new interface driver usb-storage
[    4.610000] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.620000] init: - preinit -
[    6.820000] random: jshn: uninitialized urandom read (4 bytes read, 74 bits of entropy available)
[    7.010000] random: jshn: uninitialized urandom read (4 bytes read, 76 bits of entropy available)
[    7.200000] random: jshn: uninitialized urandom read (4 bytes read, 77 bits of entropy available)
[    7.370000] random: jshn: uninitialized urandom read (4 bytes read, 79 bits of entropy available)
[    7.530000] random: jshn: uninitialized urandom read (4 bytes read, 80 bits of entropy available)
[    7.710000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   11.490000] UBIFS (ubi0:1): default file-system created
[   11.510000] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 424
[   11.540000] random: procd: uninitialized urandom read (4 bytes read, 92 bits of entropy available)
[   11.560000] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   11.570000] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.580000] UBIFS (ubi0:1): FS size: 242651136 bytes (231 MiB, 1911 LEBs), journal size 12189696 bytes (11 MiB, 96 LEBs)
[   11.590000] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   11.600000] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID 0CCEF651-A95D-4E63-8056-D80125FB38B7, small LPT model
[   11.610000] mount_root: overlay filesystem has not been fully initialized yet
[   11.620000] mount_root: switching to ubifs overlay
[   11.640000] urandom-seed: Seed file not found (/etc/urandom.seed)
[   12.830000] procd: - early -
[   13.590000] procd: - ubus -
[   13.850000] random: ubusd: uninitialized urandom read (4 bytes read, 95 bits of entropy available)
[   13.980000] random: ubusd: uninitialized urandom read (4 bytes read, 96 bits of entropy available)
[   13.990000] random: ubusd: uninitialized urandom read (4 bytes read, 96 bits of entropy available)
[   14.000000] random: ubusd: uninitialized urandom read (4 bytes read, 96 bits of entropy available)
[   14.020000] procd: - init -
Please press Enter to activate this console.
[   14.650000] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.690000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.740000] atmel_usba_udc 500000.gadget: MMIO registers at 0xf803c000 mapped at c8b84000
[   14.750000] atmel_usba_udc 500000.gadget: FIFO at 0x00500000 mapped at d9100000
[   14.770000] i2c /dev entries driver
[   14.800000] usbcore: registered new interface driver cdc_acm
[   14.810000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   14.820000] usbcore: registered new interface driver cdc_wdm
[   14.830000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.860000] nf_conntrack version 0.5.0 (1949 buckets, 7796 max)
[   14.900000] usbcore: registered new interface driver r8152
[   14.930000] usbcore: registered new interface driver usbserial
[   14.930000] usbcore: registered new interface driver usbserial_generic
[   14.940000] usbserial: USB Serial support registered for generic
[   14.980000] xt_time: kernel timezone is -0000
[   15.000000] usbcore: registered new interface driver cdc_ether
[   15.010000] usbcore: registered new interface driver ch341
[   15.010000] usbserial: USB Serial support registered for ch341-uart
[   15.020000] usbcore: registered new interface driver cp210x
[   15.030000] usbserial: USB Serial support registered for cp210x
[   15.040000] usbcore: registered new interface driver ftdi_sio
[   15.050000] usbserial: USB Serial support registered for FTDI USB Serial Device
[   15.080000] usbcore: registered new interface driver pl2303
[   15.090000] usbserial: USB Serial support registered for pl2303
[   15.100000] PPP generic driver version 2.4.2
[   15.110000] NET: Registered protocol family 24
[   15.120000] usbcore: registered new interface driver qmi_wwan
[   15.130000] usbcore: registered new interface driver rndis_host
[   15.160000] usbcore: registered new interface driver ipw
[   15.160000] usbserial: USB Serial support registered for IPWireless converter
[   15.190000] kmodloader: 1 module could not be probed
[   15.190000] kmodloader: - at91_udc - 0
[   30.350000] device eth0 entered promiscuous mode
[   30.380000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   31.820000] random: nonblocking pool is initialized

LEDE login: root
Passord: 


BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01-SNAPSHOT, r4046-beaa2ecc10)
    \________\/    -----------------------------------------------------------

root@LEDE:~# 

另外,18.06和19.07版本的op 内核都是lzma 压缩格式,在不修改Makefile的情况下需要编译比较新的uboot,添加lzma 压缩的支持

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值