OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 5740|回复: 12

uboot移植:修改后的uboot引导linux镜像和设备树时,内核启动出错。

[复制链接]

12

主题

44

帖子

0

精华

初级会员

Rank: 2

积分
142
金钱
142
注册时间
2019-12-8
在线时间
27 小时
发表于 2020-3-7 19:50:44 | 显示全部楼层 |阅读模式
5金钱
不太懂这方面,有了解这方面的朋友吗?
以下是内核启动过程
Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.15+ (alientek@ubuntu) (gcc version 4.9.3 20141031 (prerelease) (Linaro GCC 2014.11) ) #1 SMP PREEMPT Sat May 18 06:01:48 PDT 2019
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Freescale i.MX6 ULL 14x14 EVK Board
Reserved memory: created CMA memory pool at 0x98000000, size 128 MiB
Reserved memory: initialized node linux,cma, compatible id shared-dma-pool
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @97b90000 s16768 r8192 d24192 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.1.6:,v3,tcp
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 377816K/524288K available (6895K kernel code, 322K rwdata, 2356K rodata, 404K init, 424K bss, 15400K reserved, 131072K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xa0800000 - 0xff000000   (1512 MB)
    lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .text : 0x80008000 - 0x80910fb4   (9252 kB)
      .init : 0x80911000 - 0x80976000   ( 404 kB)
      .data : 0x80976000 - 0x809c69c0   ( 323 kB)
       .bss : 0x809c9000 - 0x80a332f0   ( 425 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        Additional per-CPU info printed with stalls.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS:16 nr_irqs:16 16
mxc_clocksource_init 3000000
Switching to timer-based delay loop, resolution 333ns
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
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
/cpus/cpu@0 missing clock-frequency property
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x80008280 - 0x800082f0
Brought up 1 CPUs
SMP: Total of 1 processors activated (6.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
device-tree: Duplicate name in lcdif@021c8000, renamed to "display#1"
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
mxs-dma 1804000.dma-apbh: initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
i2c i2c-0: IMX I2C adapter registered
i2c i2c-0: can't use DMA
i2c i2c-1: IMX I2C adapter registered
i2c i2c-1: can't use DMA
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource mxc_timer1
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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.
imx rpmsg driver is registered.
Bus freq driver module loaded
futex hash table entries: 256 (order: 2, 16384 bytes)
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
fuse init (API version 7.23)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: Driver registered.
backlight supply power not found, using dummy regulator
21c8000.lcdif supply lcd not found, using dummy regulator
mxsfb 21c8000.lcdif: failed to find mxc display driver
Console: switching to colour frame buffer device 60x34
mxsfb 21c8000.lcdif: initialized
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.3
imx-sdma 20ec000.sdma: initialized
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 19, base_baud = 5000000) is a IMX
console [ttymxc0] enabled
21ec000.serial: ttymxc2 at MMIO 0x21ec000 (irq = 233, base_baud = 5000000) is a IMX
imx sema4 driver is registered.
[drm] Initialized drm 1.1.0 20060810
[drm] Initialized vivante 1.0.0 20120216 on minor 0
brd: module loaded
loop: module loaded
fsl-quadspi 21e0000.qspi: unrecognized JEDEC id bytes: ff, ff, ff
fsl-quadspi 21e0000.qspi: Freescale QuadSPI probe failed
spi_imx 2010000.ecspi: probed
20b4000.ethernet supply phy not found, using dummy regulator
pps pps0: new PPS source ptp0
libphy: fec_enet_mii_bus: probed
fec 20b4000.ethernet eth0: registered PHC device 0
2188000.ethernet supply phy not found, using dummy regulator
pps pps1: new PPS source ptp1
fec 2188000.ethernet eth1: registered PHC device 1
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-mxc: Freescale On-Chip EHCI Host driver
usbcore: registered new interface driver usb-storage
2184800.usbmisc supply vbus-wakeup not found, using dummy regulator
2184000.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
2184200.usb supply vbus not found, using dummy regulator
ci_hdrc ci_hdrc.1: EHCI Host Controller
ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 2
ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
no file given for LUN0
g_mass_storage ci_hdrc.0: failed to start g_mass_storage: -22
mousedev: PS/2 mouse device common for all mice
input: 20cc000.snvs:snvs-powerkey as /devices/platform/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0
snvs_rtc 20cc000.snvs:snvs-rtc-lp: rtc core: registered 20cc000.snvs:snvs-r as rtc0
i2c /dev entries driver
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
pxp-v4l2 pxp_v4l2: initialized
imx2-wdt 20bc000.wdog: use WDOG_B to reboot.
imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
/soc/aips-bus@02100000/usdhc@02190000: voltage-ranges unspecified
sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
sdhci-esdhc-imx 2190000.usdhc: No vqmmc regulator found
mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
/soc/aips-bus@02100000/usdhc@02194000: voltage-ranges unspecified
sdhci-esdhc-imx 2194000.usdhc: No vmmc regulator found
sdhci-esdhc-imx 2194000.usdhc: No vqmmc regulator found
mmc0: host does not support reading read-only switch, assuming write-enable
mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
mmc0: new high speed SDHC card at address aaaa
NET: Registered protocol family 10
mmcblk0: mmc0:aaaa SC16G 14.8 GiB
sit: IPv6 over IPv4 tunneling driver
mmcblk0: p1
usb 2-1: new high-speed USB device number 2 using ci_hdrc
NET: Registered protocol family 17
Key type dns_resolver registered
Registering SWP/SWPB emulation handler
input: gpio_keys@0 as /devices/platform/gpio_keys@0/input/input1
snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 2019-08-14 14:58:19 UTC (1565794699)
hub 2-1:1.0: USB hub found
hub 2-1:1.0: 4 ports detected
fec 20b4000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1)
mmc1: MAN_BKOPS_EN bit is not set
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
IP-Config: Failed to open eth1
mmc1: new HS200 MMC card at address 0001
mmcblk1: mmc1:0001 8GTF4R 7.28 GiB
mmcblk1boot0: mmc1:0001 8GTF4R partition 1 4.00 MiB
mmcblk1boot1: mmc1:0001 8GTF4R partition 2 4.00 MiB
mmcblk1rpmb: mmc1:0001 8GTF4R partition 3 512 KiB
mmcblk1: p1 p2
fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.2
IP-Config: Complete:
     device=eth0, hwaddr=50:3c:ea:04:4d:1b, ipaddr=192.168.1.2, mask=255.255.255.0, gw=192.168.1.1
     host=192.168.1.2, domain=, nis-domain=(none)
     bootserver=0.0.0.0, rootserver=192.168.1.6, rootpath=
     nameserver0=192.168.1.1
can-3v3: disabling
ALSA device list:
  No soundcards found.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100           65536 ram0  (driver?)
0101           65536 ram1  (driver?)
0102           65536 ram2  (driver?)
0103           65536 ram3  (driver?)
0104           65536 ram4  (driver?)
0105           65536 ram5  (driver?)
0106           65536 ram6  (driver?)
0107           65536 ram7  (driver?)
0108           65536 ram8  (driver?)
0109           65536 ram9  (driver?)
010a           65536 ram10  (driver?)
010b           65536 ram11  (driver?)
010c           65536 ram12  (driver?)
010d           65536 ram13  (driver?)
010e           65536 ram14  (driver?)
010f           65536 ram15  (driver?)
b300        15558144 mmcblk0  driver: mmcblk
  b301        15554048 mmcblk0p1 00000000-01
b310         7634944 mmcblk1  driver: mmcblk
  b311          131072 mmcblk1p1 79d89b92-01
  b312         7493632 mmcblk1p2 79d89b92-02
b340             512 mmcblk1rpmb  (driver?)
b330            4096 mmcblk1boot1  (driver?)
b320            4096 mmcblk1boot0  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
random: nonblocking pool is initialized


最佳答案

查看完整内容[请看2#楼]

这个是没有根文件系统,内核和设备树应该是没问题的,正常启动需要uboot,linux内核设备树和根文件系统
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

1

主题

26

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
300
金钱
300
注册时间
2012-7-3
在线时间
34 小时
发表于 2020-3-9 14:54:47 | 显示全部楼层
LostButFound 发表于 2020-3-8 14:04
bootargs是这样的,不知道有没有问题。

bootargs=console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsr ...

你的命令参数有问题,ip地址建议不自动分配,nfsroot路径有问题,nfsroot=192.168.1.6:/nfsroot,nfsroot这个目录根据Ubuntu系统具体设置目录路径来确定。
回复

使用道具 举报

3

主题

41

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
310
金钱
310
注册时间
2018-8-3
在线时间
61 小时
发表于 2020-3-7 19:50:45 | 显示全部楼层
这个是没有根文件系统,内核和设备树应该是没问题的,正常启动需要uboot,linux内核设备树和根文件系统
回复

使用道具 举报

109

主题

5562

帖子

0

精华

资深版主

Rank: 8Rank: 8

积分
10542
金钱
10542
注册时间
2017-2-18
在线时间
1908 小时
发表于 2020-3-7 19:58:31 | 显示全部楼层
帮顶~~
回复

使用道具 举报

13

主题

96

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
3222
金钱
3222
注册时间
2016-5-7
在线时间
531 小时
发表于 2020-3-8 00:01:57 | 显示全部楼层
你没有根文件系统吧
回复

使用道具 举报

2

主题

712

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
2178
金钱
2178
注册时间
2018-8-27
在线时间
258 小时
发表于 2020-3-8 11:09:59 | 显示全部楼层
根文件系统挂在失败,检查U-Boot的bootargs环境变量设置是否有问题
森罗万象
回复

使用道具 举报

12

主题

44

帖子

0

精华

初级会员

Rank: 2

积分
142
金钱
142
注册时间
2019-12-8
在线时间
27 小时
 楼主| 发表于 2020-3-8 14:04:51 | 显示全部楼层
xiaotaotao 发表于 2020-3-8 11:09
根文件系统挂在失败,检查U-Boot的bootargs环境变量设置是否有问题

bootargs是这样的,不知道有没有问题。

bootargs=console=ttymxc0,115200 root=/dev/nfs ip=dhcp nfsroot=192.168.1.6:,v3,tcp
回复

使用道具 举报

1

主题

6

帖子

0

精华

新手上路

积分
47
金钱
47
注册时间
2016-11-22
在线时间
11 小时
发表于 2020-3-8 22:35:22 | 显示全部楼层
从log上看,没有挂载根文件系统

VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:


回复

使用道具 举报

12

主题

44

帖子

0

精华

初级会员

Rank: 2

积分
142
金钱
142
注册时间
2019-12-8
在线时间
27 小时
 楼主| 发表于 2020-3-9 15:14:59 | 显示全部楼层
sky505050w 发表于 2020-3-9 00:00
这个是没有根文件系统,内核和设备树应该是没问题的,正常启动需要uboot,linux内核设备树和根文件系统

我还以为出什么问题了。。
回复

使用道具 举报

12

主题

44

帖子

0

精华

初级会员

Rank: 2

积分
142
金钱
142
注册时间
2019-12-8
在线时间
27 小时
 楼主| 发表于 2020-3-9 15:16:10 | 显示全部楼层
不同 发表于 2020-3-8 00:01
你没有根文件系统吧

我还没到根文件系统那步。。
回复

使用道具 举报

12

主题

44

帖子

0

精华

初级会员

Rank: 2

积分
142
金钱
142
注册时间
2019-12-8
在线时间
27 小时
 楼主| 发表于 2020-3-9 18:49:27 | 显示全部楼层
hmsfeng 发表于 2020-3-9 14:54
你的命令参数有问题,ip地址建议不自动分配,nfsroot路径有问题,nfsroot=192.168.1.6:/nfsroot,nfsroot ...

感谢!bootargs是boot参数,之前的有问题,我改成这样就可以成功启动了

bootargs=console=ttymxc0,115200 root=/dev/mmcblk1p2
回复

使用道具 举报

1

主题

26

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
300
金钱
300
注册时间
2012-7-3
在线时间
34 小时
发表于 2020-3-10 09:59:37 | 显示全部楼层
LostButFound 发表于 2020-3-9 18:49
感谢!bootargs是boot参数,之前的有问题,我改成这样就可以成功启动了

bootargs=console=ttymxc0,115 ...

你这是从emmc作为文件系统,之前nfs的是网络文件系统,调试的话还是用nfs
回复

使用道具 举报

12

主题

44

帖子

0

精华

初级会员

Rank: 2

积分
142
金钱
142
注册时间
2019-12-8
在线时间
27 小时
 楼主| 发表于 2020-3-10 16:26:09 | 显示全部楼层
hmsfeng 发表于 2020-3-10 09:59
你这是从emmc作为文件系统,之前nfs的是网络文件系统,调试的话还是用nfs

嗯,因为我还没学到文件系统那里,所以还用的emmc的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-11-25 08:18

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表