Closed MrutyunjayPatel closed 1 year ago
The env.txt file needs to be copied by the user from the user manual and modified according to their specific needs. Below is a reference for env.txt, which also includes information about burning the device tree blob (dtb) ==>
baudrate=115200
bootdelay=1
stderr=serial
stdin=serial
stdout=serial
setspi=sf probe 0 30000000
loadkernel=sf read 0x07fc0 0x200000 0xA00000
loaddtb=sf read 0x1400000 0x1C0000 0x20000
bootcmd=run setspi;run loadkernel;run loaddtb;bootm 0x07fc0 - 0x1400000
The CRC error issue you are experiencing might be caused by an incomplete loading of the kernel image. Please check if the length of the SPI read kernel is greater than the size of the kernel image.
hi , Thanks for the reply , I am new to the buildroot toolset.
we did not find any documentation for nuc980 chill board for linux kernel 5.10
we tried images for linux kernel 4.4 its ok we could build images and boot the image, I build on the provided Virtual pc.
Please Can you post the correct nuwriter files settings to be written at address and execution address for the default "nuvoton_nuc980_chili_defconfig" configuration .
we dont know the internal setting to be used as per chilly defconfig built images.
1. Image Name: u-boot.bin >> Image Type: Loader >> Image execute address : 0xe00000 PROGRAM/VERIFY
2. Image Name: uimage >> Image Type: Data >> Image execute address : 0x200000 PROGRAM/VERIFY
3. Image Name: env.txt >> Image Type: environment >> Image start offset address : 0x080000 PROGRAM/VERIFY
4. Image Name: nuc980-chili.dtb >> Image Type: Data >> ??????? : 0x??????? PROGRAM/VERIFY
and the correct env.txt file for the default build.
as I said I used the env.txt and address settings from chill boards kernel 4.4 documents they may not be applicable correctly to kernel 5.10 builds images .
Thanks and regards mrutyunjay
I have post the content of env.txt for linux-5.10. Please have a look at the content. Again ==>
baudrate=115200
bootdelay=1
stderr=serial
stdin=serial
stdout=serial
setspi=sf probe 0 30000000
loadkernel=sf read 0x07fc0 0x200000 0xA00000
loaddtb=sf read 0x1400000 0x1C0000 0x20000
bootcmd=run setspi;run loadkernel;run loaddtb;bootm 0x07fc0 - 0x1400000
~~
The 'loaddtb=sf read 0x1400000 0x1C0000 0x20000' has answer your question.
.dtb can be programmed to SPI offset 0x1C0000 and load to DDR 0x1400000.
I notice your uboot message:
SF: 8388608 bytes @ 0x200000 Read: OK
==> That means you load 8388608 bytes from SPI to DRAM for kernel image.
But, the uImage message says that kernel size is 9089168
Image Name: Linux-5.10.140
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 9089168 Bytes = 8.7 MiB
That is, you load only 8388608 of 9089168 bytes only. That's why u-boot complain about CRC error. Looks like the loadkernel setting of your env.txt be:
loadkernel=sf read 0x07fc0 0x200000 0x800000
Please modify the last 0x800000 as 0xA00000 to fix boot failed issue.
hi , after doing the changes as mentioned 980 chili board boots kernel 5.10 images
for reference to future users
nuc980chili board with Linux kernel 5.10 -------------------------
Select target chip as “NUC980 series”
Select DDR parameter is “NUC980DR61YC.ini”.
And then, press “Continue” button.
Image Name: u-boot.bin >> Image Type: Loader >> Image execute address : 0xe00000 PROGRAM/VERIFY
Image Name: env510.txt >> Image Type: environment >> Image start offset address: 0x080000 PROGRAM/VERIFY
Image Name: uimage >> Image Type: Data >> Image execute address : 0x200000 PROGRAM/VERIFY
Image Name: nuc980-chili.dtb >> Image Type: Data >> Image execute address : 0x1C0000 PROGRAM/VERI
.
env.txt file contents--------------------------------------
baudrate=115200
bootdelay=1
stderr=serial
stdin=serial
stdout=serial
setspi=sf probe 0 30000000
loadkernel=sf read 0x7fc0 0x200000 0xA00000
loaddtb=sf read 0x1400000 0x1C0000 0x20000
bootcmd=run setspi;run loadkernel;run loaddtb;bootm 0x7fc0 - 0x1400000
boot outbput -------------
NUC980 IBR 20180813
Boot from SPI-NOR
DDR-OK
finish SPI dow�d
U-Boot 2016.11 (May 24 2023 - 19:02:23 +0530)
CPU: NUC980
Board: NUC980
DRAM: 64 MiB
SF: Detected W25Q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
In: serial
Out: serial
Err: serial
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
SF: Detected W25Q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
device 0 offset 0x200000, size 0xa00000
SF: 10485760 bytes @ 0x200000 Read: OK
device 0 offset 0x1c0000, size 0x20000
SF: 131072 bytes @ 0x1c0000 Read: OK
## Booting kernel from Legacy Image at 00007fc0 ...
Image Name: Linux-5.10.140
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 9089056 Bytes = 8.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01400000
Booting using the fdt blob at 0x1400000
XIP Kernel Image ... OK
Loading Device Tree to 03eaf000, end 03eb8f22 ... OK
Starting kernel ...
SF: Detected W25Q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
SF: DeviceÿBooting Linux on physical CPU 0x0
Linux version 5.10.140 (mrutyunjay@MBP-DELL) (arm-nuvoton-linux-uclibcgnueabi-gcc.br_real (Buildroot tc_v1.00-60-g1ca2d890f2) 9.4.0, GNU ld (GNU Binutils) 2.35.2) #4 PREEMPT Wed May 24 19:02:39 IST 2023
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: Nuvoton NUC980 CHILI V1.0
Memory policy: Data cache writeback
Zone ranges:
Normal [mem 0x0000000000000000-0x0000000003ffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x0000000003ffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
Built 1 zonelists, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M lpj=744448
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 51684K/65536K available (5222K kernel code, 671K rwdata, 1220K rodata, 5612K init, 240K bss, 13852K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Preemptible hierarchical RCU implementation.
rcu: RCU event tracing is enabled.
Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 545
clocksource: nuc980-timer5: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 62215505635 ns
sched_clock: 24 bits at 120kHz, resolution 8333ns, wraps every 69905062489ns
Console: colour dummy device 80x30
printk: console [ttyS0] enabled
Calibrating delay loop (skipped) preset value.. 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8400 - 0x843c
rcu: Hierarchical SRCU implementation.
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes, linear)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
<DT> nuc980_dt_device_init +
<DT> nuc980_dt_device_init -
nuc980-pinctrl apb:pinctrl@b0000000: initialized NUC980 pinctrl driver
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
mc: Linux media interface: v0.10
videodev: Linux video capture interface: v2.00
clocksource: Switched to clocksource nuc980-timer5
NET: Registered protocol family 2
IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
workingset: timestamp_bits=30 max_order=14 bucket_order=0
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
NET: Registered protocol family 38
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler mq-deadline registered
io scheduler kyber registered
nuc980_gpio_probe - pdev = b0004000.gpio
nuc980_dma_probe - pdev = b0008000.dma
nuc980-dma b0008000.dma: NUC980 DMA ready
b0070000.serial: ttyS0 at I/O 0xf0070000 (irq = 36, base_baud = 750000) is a NUC980
b0074000.serial: ttyS4 at I/O 0xf0074000 (irq = 39, base_baud = 9375000) is a NUC980
b0078000.serial: ttyS8 at I/O 0xf0078000 (irq = 41, base_baud = 9375000) is a NUC980
brd: module loaded
nuc980 mtd nand driver version: 20220317
RX nuc980_qspi0_probe: dma0chan0 module removed
TX nuc980_qspi0_probe: dma0chan1 module removed
spi-nor spi0.0: w25q256 (32768 Kbytes)
4 fixed-partitions partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000040000 : "uboot"
0x000000200000-0x000000e00000 : "kernel"
0x000000e00000-0x000000e10000 : "dtb"
0x000000e10000-0x000002000000 : "rootfs"
CAN device driver interface
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
EHCI over-current active level high...
nuc980-ehci b0015000.usbh_ehci: Nuvoton NUC980 EHCI Host Controller
nuc980-ehci b0015000.usbh_ehci: new USB bus registered, assigned bus number 1
nuc980-ehci b0015000.usbh_ehci: irq 23, io mem 0xb0015000
nuc980-ehci b0015000.usbh_ehci: USB 2.0 started, EHCI 0.95
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
NUC980 EHCI init done.
ehci-platform: EHCI generic platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
usb_hcd_nuc980_probe, name: b0017000.usbh_ohci, 0
nuc980-ohci b0017000.usbh_ohci: Nuvoton NUC980 OHCI Host Controller
nuc980-ohci b0017000.usbh_ohci: new USB bus registered, assigned bus number 2
nuc980-ohci b0017000.usbh_ohci: irq 24, io mem 0xb0017000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 8 ports detected
NUC980 OHCI init done.
ohci-platform: OHCI generic platform driver
usbcore: registered new interface driver usb-storage
NUC980 Crypto engine enabled.
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core
NET: Registered protocol family 29
can: raw protocol
can: broadcast manager protocol
can: netlink gateway - max_hops=1
Freeing unused kernel memory: 5612K
Kernel memory protection not selected by kernel config.
Run /sbin/init as init process
Thanks and regards
hi, we built the buildroot with following .
Then using files from MA35D1_Buildroot\output\images folder
/-/ NuWriter.exe on PC.
Select DDR parameter is “NUC980DR61YC.ini”. And then, press “Continue” button.
we used env.txt from 4.4 BSP as the MA35D1 did not have this file !!!!!!!!
what should we do with .dtb file where to write ??? it and execute address ???.
----- boot output ------------------------------------ NUC980 IBR 20180813 Boot from SPI-NOR DDR-OK finish SPI dow�d
U-Boot 2016.11 (May 24 2023 - 14:50:26 +0530)
CPU: NUC980 Board: NUC980 DRAM: 64 MiB SF: Detected W25Q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB In: serial Out: serial Err: serial Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0 SF: Detected W25Q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB device 0 offset 0x200000, size 0x800000 SF: 8388608 bytes @ 0x200000 Read: OK
Booting kernel from Legacy Image at 00007fc0 ...
Image Name: Linux-5.10.140 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 9089168 Bytes = 8.7 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image! => --------------------------------------end output
Thanks and regards .