最近在做nuc977文件系统的移植问题,在jffs2文件系统启动上出现了问题 。启动日志如下,不能正确挂载jffs2文件系统。
SF: Detected W25Q128 with page size 4 KiB, total 16 MiB
## Booting kernel from Legacy Image at 00007fc0 ...
Image Name:
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4080640 Bytes = 3.9 MiB
Load Address: 00007fc0
Entry Point: 00008000
Verifying Checksum ... OK
SF: Detected W25Q128 with page size 4 KiB, total 16 MiB
SF: DeviceBooting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.108 (cookie@NtrGoldWind) (gcc version 4.9.4 (Buildroot 2018.02.8) ) #2 PREEMPT Fri Mar 1 12:45:16 CST 2019
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: NUC970
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock1 rootfstype=jffs2 rootflags=inband-tags console=ttyS0 rdinit=/sbin/init
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60680k/60680k available, 4856k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc4800000 - 0xff000000 ( 936 MB)
lowmem : 0xc0000000 - 0xc4000000 ( 64 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0395eec (3640 kB)
.init : 0xc0396000 - 0xc03b5740 ( 126 kB)
.data : 0xc03b6000 - 0xc03ec400 ( 217 kB)
.bss : 0xc03ec400 - 0xc0421ac4 ( 214 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:625
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys perf_event
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc02d99f0 - 0xc02d9a2c
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
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.
NetWinder Floating Point Emulator V0.97 (double precision)
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 118
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
nuc970-uart.0: ttyS0 at I/O 0x0 (irq = 36) is a NUC970
brd: module loaded
nuc970-spi0 nuc970-spi0: master is unqueued, this is deprecated
m25p80: Enable Dual Read Mode
m25p80 spi0.0: w25q128 (16384 Kbytes)
Creating 2 MTD partitions on "m25p80":
0x000000000000-0x000000800000 : "kernel"
0x000000800000-0x000001000000 : "rootfs"
CAN device driver interface
nuc970-can0 nuc970-can0: nuc970_can0_platform device registered (regs=f800b000, irq=58)
libphy: nuc970_rmii0: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_nuc970_probe() - name: nuc970-ehci
nuc970-ehci nuc970-ehci: Nuvoton NUC970/N9H30 EHCI Host Controller
nuc970-ehci nuc970-ehci: new USB bus registered, assigned bus number 1
nuc970-ehci nuc970-ehci: irq 23, io mem 0xb0005000
nuc970-ehci nuc970-ehci: USB 2.0 started, EHCI 0.95
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
nuc970-ohci nuc970-ohci: Nuvoton NUC970/N9H30 OHCI Host Controller
nuc970-ohci nuc970-ohci: new USB bus registered, assigned bus number 2
nuc970-ohci nuc970-ohci: irq 24, io mem 0xb0007000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver usb-storage
cpuidle: using governor ladder
TCP: cubic registered
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 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
List of all partitions:
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.108 #2
Backtrace:
[<c001213c>] (dump_backtrace+0x0/0x108) from [<c001234c>] (show_stack+0x18/0x1c)
r6:00008000 r5:c03b0ef0 r4:c38a5000 r3:00000000
[<c0012334>] (show_stack+0x0/0x1c) from [<c02d6af4>] (dump_stack+0x20/0x28)
[<c02d6ad4>] (dump_stack+0x0/0x28) from [<c02d4aa0>] (panic+0xa0/0x1f4)
[<c02d4a00>] (panic+0x0/0x1f4) from [<c03970c0>] (mount_block_root+0x234/0x27c)
r3:c3843ea8 r2:00000020 r1:c3843ea8 r0:c034d0d0
r7:c034d138
[<c0396e8c>] (mount_block_root+0x0/0x27c) from [<c03972f0>] (mount_root+0xec/0x114)
[<c0397204>] (mount_root+0x0/0x114) from [<c0397478>] (prepare_namespace+0x160/0x1c0)
r8:c03ec400 r7:0000005b r6:c03b0ef0 r5:c03b0ef0 r4:c03ec460
[<c0397318>] (prepare_namespace+0x0/0x1c0) from [<c0396c3c>] (kernel_init_freeable+0x1d8/0x224)
r6:c03ec400 r5:00000008 r4:c03b5738
[<c0396a64>] (kernel_init_freeable+0x0/0x224) from [<c02d4420>] (kernel_init+0x10/0x158)
[<c02d4410>] (kernel_init+0x0/0x158) from [<c000ee98>] (ret_from_fork+0x14/0x3c)
r5:c02d4410 r4:00000000
我的uboot启动参数设置如下:
baudrate=115200
bootargs=noinitrd root=/dev/mtdblock1 rootfstype=jffs2 rootflags=inband-tags console=ttyS0 rdinit=/sbin/init
bootcmd=sf probe 0 240000000; sf read 0x7fc0 0x200000 0x8a0000;bootm 0x7fc0
bootdelay=3
ethact=emac
ethaddr=00:00:00:11:66:88
stderr=serial
stdin=serial
stdout=serial
制作jffs2的命令如下:
mkfs.jffs2 -r target -o images/k2rootfs.jffs2 -n -l
使用的是W25Q128 SPI-FLASH芯片16M大小。
这个问题是不是出在jffs2文件系统的制作方面了
最近编辑记录 thy442156388 (2019-03-04 12:46:46)
离线
winbond 这个我不太懂。啥意思啊 但是是一个SPI—FLASH没错。
离线
对丝印上写的是winbond
离线
我之前一直怀疑是烧录地址,和我的MTD分区表没对上的结果。
离线
这里是不是还要修改新唐内核代码关于SPI-FLASH的驱动部分。
离线
我是用的新唐的内核 没有用这个设备树,那我需要下载最新的Linux内核去编译么 ?
离线
jffs2: Perhaps the file system was created with the wrong erase size?
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013f000: 0xae23 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013f004: 0x213a instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013f008: 0x03f7 instead
jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0013f00c: 0xab7f instead
现在给我提示这个错误
如果出现这个错误是不是我在制作jffs2文件系统镜像的时候,擦除数据大小设置的有问题
最近编辑记录 thy442156388 (2019-03-05 16:04:06)
离线
我找到了 修改过来了 现在jffs2 是挂载上去了,但是给我提示这个
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
jffs2: Empty flash at 0x00347ffc ends at 0x00348000
jffs2: Empty flash at 0x00357ffc ends at 0x00358000
jffs2: Empty flash at 0x00367ffc ends at 0x00368000
jffs2: Empty flash at 0x00377ffc ends at 0x00378000
jffs2: Empty flash at 0x00387ffc ends at 0x00388000
jffs2: Empty flash at 0x00397ffc ends at 0x00398000
jffs2: Empty flash at 0x003a7ffc ends at 0x003a8000
jffs2: Empty flash at 0x003b7ffc ends at 0x003b8000
jffs2: Empty flash at 0x003c7ffc ends at 0x003c8000
jffs2: Empty flash at 0x003d7f54 ends at 0x003d8000
VFS: Mounted root (jffs2 filesystem) on device 31:1.
devtmpfs: mounted
Freeing unused kernel memory: 124K
mount: you must be root
mkdir: can't create directory '/dev/pts': Permission denied
mkdir: can't create directory '/dev/shm': Permission denied
mount: you must be root
hostname: sethostname: Operation not permitted
Starting logging: OK
Initializing random number generator... done.
Starting network: RTNETLINK answers: Operation not permitted
RTNETLINK answers: Operation not permitted
FAIL
can't open /dev/console: Permission denied
can't open /dev/console: Permission denied
can't open /dev/console: Permission denied
can't open /dev/console: Permission denied
can't open /dev/console: Permission denied
最近编辑记录 thy442156388 (2019-03-05 17:49:09)
离线
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_nuc970_probe() - name: nuc970-ehci
nuc970-ehci nuc970-ehci: Nuvoton NUC970/N9H30 EHCI Host Controller
nuc970-ehci nuc970-ehci: new USB bus registered, assigned bus number 1
nuc970-ehci nuc970-ehci: irq 23, io mem 0xb0005000
nuc970-ehci nuc970-ehci: USB 2.0 started, EHCI 0.95
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
nuc970-ohci nuc970-ohci: Nuvoton NUC970/N9H30 OHCI Host Controller
nuc970-ohci nuc970-ohci: new USB bus registered, assigned bus number 2
nuc970-ohci nuc970-ohci: irq 24, io mem 0xb0007000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver usb-storage
cpuidle: using governor ladder
TCP: cubic registered
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 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
jffs2: Empty flash at 0x003d7f54 ends at 0x003d8000
VFS: Mounted root (jffs2 filesystem) on device 31:1.
devtmpfs: mounted
Freeing unused kernel memory: 124K
devpts: called with bogus options
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
现在卡在这里了 ,这个问题出在那里啊。串口能输入数据,是不是应该写开机脚本了?
最近编辑记录 thy442156388 (2019-03-05 17:39:08)
离线
断不开啊
离线
Security CRT
离线
我用buildroot做的文件系统,init.d文件夹下的启动脚本和我之前的有点不一样啊
是这样四个名字的脚本
S01logging S20urandom S40network rcK rcS
离线
Crtl+ D Q C W 都试过了 没用
离线
我检查了和之前编译的出来的文件系统在/etc/init.d和/etc/profile.d路径下的文件一样,这个文件系统是可以被NFS正确引导启动的。
离线