您尚未登录。

楼主 #1 2018-10-05 14:51:24

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

linux内核启动过程中没有看到分区标信息

U-Boot 2018.01suda-05679-g013ca457fd-dirty (Oct 04 2018 - 14:10:48 +0800)

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Setting up a 480x272 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e41000, end 80e4605b ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-suda-morris+ (wendy@wendy-PC) (gcc version 8.2.0 (morris)) #5 Fri Oct 5 14:25:26 CST 2018
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] random: fast init done
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 console=tty0 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 22668K/32768K available (6144K kernel code, 212K rwdata, 1392K rodata, 1024K init, 250K bss, 10100K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)
[    0.000000]       .init : 0xc0900000 - 0xc0a00000   (1024 kB)
[    0.000000]       .data : 0xc0a00000 - 0xc0a35080   ( 213 kB)
[    0.000000]        .bss : 0xc0a3a444 - 0xc0a78e14   ( 251 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000045] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000110] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000647] Console: colour dummy device 80x30
[    0.001616] console [tty0] enabled
[    0.001719] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[    0.070283] pid_max: default: 32768 minimum: 301
[    0.070660] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070760] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.072247] CPU: Testing write buffer coherency: ok
[    0.073966] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076512] devtmpfs: initialized
[    0.083520] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.083688] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.084002] pinctrl core: initialized pinctrl subsystem
[    0.086086] NET: Registered protocol family 16
[    0.087707] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.089590] cpuidle: using governor menu
[    0.115011] SCSI subsystem initialized
[    0.115421] usbcore: registered new interface driver usbfs
[    0.115640] usbcore: registered new interface driver hub
[    0.115906] usbcore: registered new device driver usb
[    0.116405] pps_core: LinuxPPS API ver. 1 registered
[    0.116494] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.116641] PTP clock support registered
[    0.117182] Advanced Linux Sound Architecture Driver Initialized.
[    0.120400] clocksource: Switched to clocksource timer
[    0.146603] NET: Registered protocol family 2
[    0.148148] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.148303] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.148397] TCP: Hash tables configured (established 1024 bind 1024)
[    0.148722] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.148830] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.149347] NET: Registered protocol family 1
[    0.150530] RPC: Registered named UNIX socket transport module.
[    0.150647] RPC: Registered udp transport module.
[    0.150699] RPC: Registered tcp transport module.
[    0.150744] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.151959] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.153781] Initialise system trusted keyrings
[    0.154429] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.171477] NFS: Registering the id_resolver key type
[    0.171656] Key type id_resolver registered
[    0.171719] Key type id_legacy registered
[    0.171884] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.185688] Key type asymmetric registered
[    0.185801] Asymmetric key parser 'x509' registered
[    0.186055] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.186158] io scheduler noop registered
[    0.186207] io scheduler deadline registered
[    0.187017] io scheduler cfq registered (default)
[    0.187117] io scheduler mq-deadline registered
[    0.187174] io scheduler kyber registered
[    0.188366] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.198104] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.366899] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.373874] console [ttyS0] disabled
[    0.394212] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 23, base_baud = 6250000) is a 16550A
[    0.875798] console [ttyS0] enabled
[    0.886320] panel-simple panel: panel supply power not found, using dummy regulator
[    0.895641] SCSI Media Changer driver v0.25 
[    0.901430] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.908043] ehci-platform: EHCI generic platform driver
[    0.913695] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.919979] ohci-platform: OHCI generic platform driver
[    0.925737] usbcore: registered new interface driver usb-storage
[    0.932826] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    0.942013] i2c /dev entries driver
[    1.000538] sunxi-mmc 1c0f000.mmc: base:0xc28a4000 irq:19
[    1.008061] usbcore: registered new interface driver usbhid
[    1.013834] usbhid: USB HID core driver
[    1.035740] NET: Registered protocol family 17
[    1.040675] Key type dns_resolver registered
[    1.047301] Loading compiled-in X.509 certificates
[    1.061799] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.068503] [drm] No driver support for vblank timestamp query.
[    1.075502] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739508)
[    1.084470] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc07388bc)
[    1.224972] Console: switching to colour frame buffer device 100x30
[    1.272773] sun4i-drm display-engine: fb0:  frame buffer device
[    1.289137] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.307923] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.338673] ------------[ cut here ]------------
[    1.353156] WARNING: CPU: 0 PID: 3 at drivers/usb/musb/sunxi.c:411 sunxi_musb_ep_offset+0x3c/0x54
[    1.372120] sunxi_musb_ep_offset called with non 0 offset
[    1.387636] Modules linked in:
[    1.400642] CPU: 0 PID: 3 Comm: kworker/0:0 Not tainted 4.14.0-suda-morris+ #5
[    1.418208] Hardware name: Allwinner suniv Family
[    1.433215] Workqueue: events deferred_probe_work_func
[    1.448873] [<c010e7f0>] (unwind_backtrace) from [<c010b6d8>] (show_stack+0x10/0x14)
[    1.467562] [<c010b6d8>] (show_stack) from [<c01168f0>] (__warn+0xcc/0xfc)
[    1.485453] [<c01168f0>] (__warn) from [<c0116574>] (warn_slowpath_fmt+0x38/0x48)
[    1.504006] [<c0116574>] (warn_slowpath_fmt) from [<c0479a34>] (sunxi_musb_ep_offset+0x3c/0x54)
[    1.524096] [<c0479a34>] (sunxi_musb_ep_offset) from [<c046d43c>] (ep_config_from_hw+0x74/0x140)
[    1.544324] [<c046d43c>] (ep_config_from_hw) from [<c046f040>] (musb_probe+0x8fc/0xbec)
[    1.563579] [<c046f040>] (musb_probe) from [<c03f6fe8>] (platform_drv_probe+0x50/0xac)
[    1.582762] [<c03f6fe8>] (platform_drv_probe) from [<c03f5774>] (driver_probe_device+0x218/0x2ec)
[    1.603061] [<c03f5774>] (driver_probe_device) from [<c03f3dd8>] (bus_for_each_drv+0x70/0xa0)
[    1.623037] [<c03f3dd8>] (bus_for_each_drv) from [<c03f5478>] (__device_attach+0xac/0x114)
[    1.642819] [<c03f5478>] (__device_attach) from [<c03f4a84>] (bus_probe_device+0x84/0x8c)
[    1.662449] [<c03f4a84>] (bus_probe_device) from [<c03f2f10>] (device_add+0x388/0x594)
[    1.681757] [<c03f2f10>] (device_add) from [<c03f6e0c>] (platform_device_add+0x100/0x20c)
[    1.701119] [<c03f6e0c>] (platform_device_add) from [<c03f7738>] (platform_device_register_full+0xc0/0x108)
[    1.732855] [<c03f7738>] (platform_device_register_full) from [<c0479778>] (sunxi_musb_probe+0x340/0x41c)
[    1.764796] [<c0479778>] (sunxi_musb_probe) from [<c03f6fe8>] (platform_drv_probe+0x50/0xac)
[    1.785261] [<c03f6fe8>] (platform_drv_probe) from [<c03f5774>] (driver_probe_device+0x218/0x2ec)
[    1.806269] [<c03f5774>] (driver_probe_device) from [<c03f3dd8>] (bus_for_each_drv+0x70/0xa0)
[    1.827127] [<c03f3dd8>] (bus_for_each_drv) from [<c03f5478>] (__device_attach+0xac/0x114)
[    1.847541] [<c03f5478>] (__device_attach) from [<c03f4a84>] (bus_probe_device+0x84/0x8c)
[    1.867935] [<c03f4a84>] (bus_probe_device) from [<c03f51b8>] (deferred_probe_work_func+0x8c/0x140)
[    1.900826] [<c03f51b8>] (deferred_probe_work_func) from [<c01299d4>] (process_one_work+0x1d8/0x3e8)
[    1.934330] [<c01299d4>] (process_one_work) from [<c0129e80>] (worker_thread+0x29c/0x5b8)
[    1.955335] [<c0129e80>] (worker_thread) from [<c012ef38>] (kthread+0x120/0x138)
[    1.975432] [<c012ef38>] (kthread) from [<c0108028>] (ret_from_fork+0x14/0x2c)
[    1.995139] ---[ end trace 7c194ff9660c6f5c ]---
[    2.012021] musb-sunxi 1c13000.usb: Error unknown readb offset 128
[    2.030654] musb-hdrc musb-hdrc.1.auto: musb_init_controller failed with status -22
[    2.050934] musb-hdrc: probe of musb-hdrc.1.auto failed with error -22
[    2.070994] vcc3v3: disabling
[    2.085977] ALSA device list:
[    2.100339]   #0: Loopback 1
[    2.114778] Waiting for root device /dev/mtdblock3...

我参考的是http://nano.lichee.pro/build_sys/build_flash.html教程,使用dts来传递分区信息
之前好像看到过有人也遇到过这个问题,不知道是如何解决的?

离线

#2 2018-10-05 14:56:19

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: linux内核启动过程中没有看到分区标信息

dts/dtsi 两个文件都贴上来看下





离线

楼主 #3 2018-10-05 15:01:01

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

Re: linux内核启动过程中没有看到分区标信息

晕哥 说:

dts/dtsi 两个文件都贴上来看下

这是dtsi文件

// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
 * Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
 */

#include <dt-bindings/clock/suniv-ccu.h>
#include <dt-bindings/reset/suniv-ccu.h>

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	interrupt-parent = <&intc>;

	clocks {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		osc24M: clk-24M {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <24000000>;
			clock-output-names = "osc24M";
		};

		osc32k: clk-32k {
			#clock-cells = <0>;
			compatible = "fixed-clock";
			clock-frequency = <32768>;
			clock-output-names = "osc32k";
		};
	};

	cpus {
		#address-cells = <0>;
		#size-cells = <0>;

		cpu {
			compatible = "arm,arm926ej-s";
			device_type = "cpu";
		};
	};

	de: display-engine {
		compatible = "allwinner,suniv-f1c100s-display-engine";
		allwinner,pipelines = <&fe0>;
		status = "disabled";
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		sram-controller@1c00000 {
			compatible = "allwinner,sun4i-a10-sram-controller";
			reg = <0x01c00000 0x30>;
			#address-cells = <1>;
			#size-cells = <1>;
			ranges;

			sram_d: sram@10000 {
				compatible = "mmio-sram";
				reg = <0x00010000 0x1000>;
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0 0x00010000 0x1000>;

				otg_sram: sram-section@0 {
					compatible = "allwinner,sun4i-a10-sram-d";
					reg = <0x0000 0x1000>;
					status = "disabled";
				};
			};
		};

		spi0: spi@1c05000 {
			compatible = "allwinner,suniv-f1c100s-spi",
				     "allwinner,sun8i-h3-spi";
			reg = <0x01c05000 0x1000>;
			interrupts = <10>;
			clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
			clock-names = "ahb", "mod";
			resets = <&ccu RST_BUS_SPI0>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		spi1: spi@1c06000 {
			compatible = "allwinner,suniv-f1c100s-spi",
				     "allwinner,sun8i-h3-spi";
			reg = <0x01c06000 0x1000>;
			interrupts = <11>;
			clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_BUS_SPI1>;
			clock-names = "ahb", "mod";
			resets = <&ccu RST_BUS_SPI1>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		tcon0: lcd-controller@1c0c000 {
			compatible = "allwinner,suniv-f1c100s-tcon";
			reg = <0x01c0c000 0x1000>;
			interrupts = <29>;
			clocks = <&ccu CLK_BUS_LCD>,
				 <&ccu CLK_TCON>;
			clock-names = "ahb",
				      "tcon-ch0";
			clock-output-names = "tcon-pixel-clock";
			resets = <&ccu RST_BUS_LCD>;
			reset-names = "lcd";
			status = "disabled";

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				tcon0_in: port@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;

					tcon0_in_be0: endpoint@0 {
						reg = <0>;
						remote-endpoint = <&be0_out_tcon0>;
					};
				};

				tcon0_out: port@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;
				};
			};
		};

		mmc0: mmc@1c0f000 {
			compatible = "allwinner,suniv-f1c100s-mmc",
				     "allwinner,sun7i-a20-mmc";
			reg = <0x01c0f000 0x1000>;
			clocks = <&ccu CLK_BUS_MMC0>,
				 <&ccu CLK_MMC0>,
				 <&ccu CLK_MMC0_OUTPUT>,
				 <&ccu CLK_MMC0_SAMPLE>;
			clock-names = "ahb",
				      "mmc",
				      "output",
				      "sample";
			resets = <&ccu RST_BUS_MMC0>;
			reset-names = "ahb";
			interrupts = <23>;
			pinctrl-names = "default";
			pinctrl-0 = <&mmc0_pins>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		mmc1: mmc@1c10000 {
			compatible = "allwinner,suniv-f1c100s-mmc",
				     "allwinner,sun7i-a20-mmc";
			reg = <0x01c10000 0x1000>;
			clocks = <&ccu CLK_BUS_MMC1>,
				 <&ccu CLK_MMC1>,
				 <&ccu CLK_MMC1_OUTPUT>,
				 <&ccu CLK_MMC1_SAMPLE>;
			clock-names = "ahb",
				      "mmc",
				      "output",
				      "sample";
			resets = <&ccu RST_BUS_MMC1>;
			reset-names = "ahb";
			interrupts = <24>;
			status = "disabled";
			#address-cells = <1>;
			#size-cells = <0>;
		};

		ccu: clock@1c20000 {
			compatible = "allwinner,suniv-f1c100s-ccu";
			reg = <0x01c20000 0x400>;
			clocks = <&osc24M>, <&osc32k>;
			clock-names = "hosc", "losc";
			#clock-cells = <1>;
			#reset-cells = <1>;
		};

		intc: interrupt-controller@1c20400 {
			compatible = "allwinner,suniv-f1c100s-ic";
			reg = <0x01c20400 0x400>;
			interrupt-controller;
			#interrupt-cells = <1>;
		};

		pio: pinctrl@1c20800 {
			compatible = "allwinner,suniv-f1c100s-pinctrl";
			reg = <0x01c20800 0x400>;
			interrupts = <38>, <39>, <40>;
			clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
			clock-names = "apb", "hosc", "losc";
			gpio-controller;
			interrupt-controller;
			#interrupt-cells = <3>;
			#gpio-cells = <3>;

			spi0_pins_a: spi0-pins-pc {
				pins = "PC0", "PC1", "PC2", "PC3";
				function = "spi0";
			};

			lcd_rgb666_pins: lcd-rgb666-pins {
				pins = "PD0", "PD1", "PD2", "PD3", "PD4",
				       "PD5", "PD6", "PD7", "PD8", "PD9",
				       "PD10", "PD11", "PD12", "PD13", "PD14",
				       "PD15", "PD16", "PD17", "PD18", "PD19",
				       "PD20", "PD21";
				function = "lcd";
			};

			uart0_pins_a: uart-pins-pe {
				pins = "PE0", "PE1";
				function = "uart0";
			};

			mmc0_pins: mmc0-pins {
				pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
				function = "mmc0";
			};
		};

		timer@1c20c00 {
			compatible = "allwinner,suniv-f1c100s-timer";
			reg = <0x01c20c00 0x90>;
			interrupts = <13>;
			clocks = <&osc24M>;
		};

		wdt: watchdog@1c20ca0 {
			compatible = "allwinner,sun6i-a31-wdt";
			reg = <0x01c20ca0 0x20>;
		};

		uart0: serial@1c25000 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25000 0x400>;
			interrupts = <1>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART0>;
			resets = <&ccu RST_BUS_UART0>;
			status = "disabled";
		};

		uart1: serial@1c25400 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25400 0x400>;
			interrupts = <2>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART1>;
			resets = <&ccu RST_BUS_UART1>;
			status = "disabled";
		};

		uart2: serial@1c25800 {
			compatible = "snps,dw-apb-uart";
			reg = <0x01c25800 0x400>;
			interrupts = <3>;
			reg-shift = <2>;
			reg-io-width = <4>;
			clocks = <&ccu CLK_BUS_UART2>;
			resets = <&ccu RST_BUS_UART2>;
			status = "disabled";
		};

		usb_otg: usb@1c13000 {
			compatible = "allwinner,suniv-f1c100s-musb";
			reg = <0x01c13000 0x0400>;
			clocks = <&ccu CLK_BUS_OTG>;
			resets = <&ccu RST_BUS_OTG>;
			interrupts = <26>;
			interrupt-names = "mc";
			phys = <&usbphy 0>;
			phy-names = "usb";
			extcon = <&usbphy 0>;
			allwinner,sram = <&otg_sram 1>;
			status = "disabled";
		};

		usbphy: phy@1c13400 {
			compatible = "allwinner,suniv-f1c100s-usb-phy";
			reg = <0x01c13400 0x10>;
			reg-names = "phy_ctrl";
			clocks = <&ccu CLK_USB_PHY0>;
			clock-names = "usb0_phy";
			resets = <&ccu RST_USB_PHY0>;
			reset-names = "usb0_reset";
			#phy-cells = <1>;
			status = "disabled";
		};

		fe0: display-frontend@1e00000 {
			compatible = "allwinner,suniv-f1c100s-display-frontend";
			reg = <0x01e00000 0x20000>;
			interrupts = <30>;
			clocks = <&ccu CLK_BUS_DE_FE>, <&ccu CLK_DE_FE>,
				 <&ccu CLK_DRAM_DE_FE>;
			clock-names = "ahb", "mod",
				      "ram";
			resets = <&ccu RST_BUS_DE_FE>;
			status = "disabled";

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				fe0_out: port@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;

					fe0_out_be0: endpoint@0 {
						reg = <0>;
						remote-endpoint = <&be0_in_fe0>;
					};
				};
			};
		};

		be0: display-backend@1e60000 {
			compatible = "allwinner,suniv-f1c100s-display-backend";
			reg = <0x01e60000 0x10000>;
			reg-names = "be";
			interrupts = <31>;
			clocks = <&ccu CLK_BUS_DE_BE>, <&ccu CLK_DE_BE>,
				 <&ccu CLK_DRAM_DE_BE>;
			clock-names = "ahb", "mod",
				      "ram";
			resets = <&ccu RST_BUS_DE_BE>;
			reset-names = "be";
			assigned-clocks = <&ccu CLK_DE_BE>;
			assigned-clock-rates = <300000000>;

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				be0_in: port@0 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <0>;

					be0_in_fe0: endpoint@0 {
						reg = <0>;
						remote-endpoint = <&fe0_out_be0>;
					};
				};

				be0_out: port@1 {
					#address-cells = <1>;
					#size-cells = <0>;
					reg = <1>;

					be0_out_tcon0: endpoint@0 {
						reg = <0>;
						remote-endpoint = <&tcon0_in_be0>;
					};
				};
			};
		};
	};
};

这是dts文件

// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
 * Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
 */

/dts-v1/;
#include "suniv-f1c100s.dtsi"

#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Lichee Pi Nano";
	compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s",
		     "allwinner,suniv";

	aliases {
		serial0 = &uart0;
		spi0 = &spi0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	reg_vcc3v3: vcc3v3 {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};
};

&mmc0 {
	vmmc-supply = <&reg_vcc3v3>;
	bus-width = <4>;
	broken-cd;
	status = "okay";
};

&otg_sram {
	status = "okay";
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_pins_a>;
	status = "okay";
	spi-max-frequency = <50000000>;
	flash: w25q128@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "winbond,w25q128", "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;
		partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "u-boot";
                reg = <0x000000 0x100000>;
                read-only;
            };

            partition@100000 {
                label = "dtb";
                reg = <0x100000 0x10000>;
                read-only;
            };

            partition@110000 {
                label = "kernel";
                reg = <0x110000 0x400000>;
                read-only;
            };
			
            partition@510000 {
                label = "rootfs";
                reg = <0x510000 0xAF0000>;
            };
        };
	};
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins_a>;
	status = "okay";
};

&usb_otg {
	dr_mode = "otg";
	status = "okay";
};

&usbphy {
	usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
	status = "okay";
};

离线

#4 2018-10-05 15:05:06

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: linux内核启动过程中没有看到分区标信息

你参考一下这个帖子: https://whycan.cn/t_1701.html#p9697

...
[    0.751088] console [ttyS0] enabled
[    0.759177] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.764264] spi32766.0: parser cmdlinepart: 4
[    0.768697] 4 cmdlinepart partitions found on MTD device spi32766.0
[    0.774959] Creating 4 MTD partitions on "spi32766.0":
[    0.780118] 0x000000000000-0x000000100000 : "uboot"
[    0.786464] 0x000000100000-0x000000110000 : "dtb"
[    0.792516] 0x000000110000-0x000000510000 : "kernel"
[    0.798869] 0x000000510000-0x000000d10000 : "rootfs"
[    0.805492] libphy: Fixed MDIO Bus: probed
...


你的 dts/dtsi 没出问题来, spi 总线和 spi flash 都启用了,

看下你的 m25p80 驱动是否勾选?

CONFIG_MTD_M25P80=y





离线

楼主 #5 2018-10-05 15:08:21

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

Re: linux内核启动过程中没有看到分区标信息

Symbol: MTD_M25P80 [=y]                                                                                                                                          │  
  │ Type  : tristate                                                                                                                                                 │  
  │ Prompt: Support most SPI Flash chips (AT26DF, M25P, W25X, ...)                                                                                                   │  
  │   Location:                                                                                                                                                      │  
  │     -> Device Drivers                                                                                                                                            │  
  │       -> Memory Technology Device (MTD) support (MTD [=y])                                                                                                       │  
  │ (1)     -> Self-contained MTD device drivers                                                                                                                     │  
  │   Defined at drivers/mtd/devices/Kconfig:81                                                                                                                      │  
  │   Depends on: MTD [=y] && HAS_IOMEM [=y] && SPI_MASTER [=y] && MTD_SPI_NOR [=y]    

勾了的,真奇怪

离线

#6 2018-10-05 15:14:27

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: linux内核启动过程中没有看到分区标信息

CONFIG_MTD_OF_PARTS=y

那再看下这个有没有设置





离线

楼主 #7 2018-10-06 01:10:35

msr06rr
会员
所在地: 苏州
注册时间: 2018-01-11
已发帖子: 180
积分: 170.5

Re: linux内核启动过程中没有看到分区标信息

root=/dev/mtdblock3修改为root=31:03就可以了,有大神可以解释一下原因吗?

离线

#8 2018-10-06 08:15:20

lilo
会员
注册时间: 2017-10-15
已发帖子: 215
积分: 215

Re: linux内核启动过程中没有看到分区标信息

msr06rr 说:

root=/dev/mtdblock3修改为root=31:03就可以了,有大神可以解释一下原因吗?

你应该还改了其他地方吧, 我看了前面的 kernel log 都没生成分区.
即使 bootargs 改成 root=31:03  我认为也是没用的。

离线

#9 2018-10-06 10:59:59

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: linux内核启动过程中没有看到分区标信息

U-Boot SPL 2018.01-05676-g00188782ee-dirty (May 19 2018 - 15:47:49)
DRAM: 32 MiB
SPL: Unsupported Boot Device!
Trying to boot from sunxi SPI


U-Boot 2018.01-05676-g00188782ee-dirty (May 19 2018 - 15:47:49 +0800) Allwinner Technology

CPU:   Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM:  32 MiB
Using default environment

Setting up a 800x480 lcd console (overscan 0x0)
In:    serial@1c25000
Out:   serial@1c25000
Err:   serial@1c25000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  2  1  0
SF: Detected w25q128bv with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
   Booting using the fdt blob at 0x80c00000
   Loading Device Tree to 80e4c000, end 80e51326 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-next-20180202-licheepi-nano+ (biglion@biglion-MRC-WX0) (gcc version 7.2.0 (Ubuntu/Linaro 7.2.0-6ubuntu1)) #118 Fri Jun 1 16:40:34 CST 2018
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Nano
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 8192
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 24804K/32768K available (4355K kernel code, 191K rwdata, 796K rodata, 1024K init, 214K bss, 7964K 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 : 0xc2800000 - 0xff800000   ( 976 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (5348 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 192 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 215 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000051] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000116] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000649] Console: colour dummy device 80x30
[    0.000752] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.070221] pid_max: default: 32768 minimum: 301
[    0.070642] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.070676] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.071997] CPU: Testing write buffer coherency: ok
[    0.073775] Setting up static identity map for 0x80100000 - 0x80100058
[    0.076231] devtmpfs: initialized
[    0.082481] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.082545] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.082843] pinctrl core: initialized pinctrl subsystem
[    0.085036] NET: Registered protocol family 16
[    0.086171] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.087922] cpuidle: using governor menu
[    0.106057] pps_core: LinuxPPS API ver. 1 registered
[    0.106096] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.106163] PTP clock support registered
[    0.107762] clocksource: Switched to clocksource timer
[    0.136671] NET: Registered protocol family 2
[    0.138270] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.138357] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.138418] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.138461] TCP: Hash tables configured (established 1024 bind 1024)
[    0.138815] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.138890] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.139451] NET: Registered protocol family 1
[    0.141141] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.142775] Initialise system trusted keyrings
[    0.143288] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.156295] jffs2: version 2.2. (NAND) (SUMMARY)  漏 2001-2006 Red Hat, Inc.
[    0.170107] Key type asymmetric registered
[    0.170147] Asymmetric key parser 'x509' registered
[    0.170210] io scheduler noop registered
[    0.170227] io scheduler deadline registered
[    0.170983] io scheduler cfq registered (default)
[    0.171018] io scheduler mq-deadline registered
[    0.171035] io scheduler kyber registered
[    0.180568] suniv-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.365113] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.372240] console [ttyS0] disabled
[    0.392562] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[    0.821567] console [ttyS0] enabled
[    0.832480] panel-simple panel: panel supply power not found, using dummy regulator
[    0.844856] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.849711] spi0.0: parsing partitions cmdlinepart
[    0.855539] spi0.0: got parser (null)
[    0.859349] spi0.0: parsing partitions ofpart
[    0.863710] spi0.0: got parser ofpart
[    0.867421] spi0.0: parser ofpart: 4
[    0.871066] 4 ofpart partitions found on MTD device spi0.0
[    0.876544] Creating 4 MTD partitions on "spi0.0":
[    0.881396] 0x000000000000-0x000000100000 : "u-boot"
[    0.889165] 0x000000100000-0x000000110000 : "dtb"
[    0.896452] 0x000000110000-0x000000510000 : "kernel"
[    0.904133] 0x000000510000-0x000001000000 : "rootfs"
[    0.912293] i2c /dev entries driver
[    0.946477] sunxi-mmc 1c0f000.mmc: base:0x7427bdb8 irq:21
[    0.953395] NET: Registered protocol family 17
[    0.958126] Key type dns_resolver registered
[    0.964602] Loading compiled-in X.509 certificates
[    0.979573] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc057ad90)
[    0.987475] sun4i-tcon 1c0c000.lcd-controller: Missing LVDS properties, Please upgrade your DT
[    0.996207] sun4i-tcon 1c0c000.lcd-controller: LVDS output disabled
[    1.003444] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0579fa8)
[    1.011238] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.017893] [drm] No driver support for vblank timestamp query.
[    1.200358] Console: switching to colour frame buffer device 100x30
[    1.240041] sun4i-drm display-engine: fb0:  frame buffer device
[    1.247253] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.255848] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    1.272109] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    1.278962] vcc3v3: disabling
[    1.282839] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    1.291570] cfg80211: failed to load regulatory.db
[    1.374310] random: crng init done
[    3.448236] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    3.468010] VFS: Mounted root (jffs2 filesystem) on device 31:3.
[    3.475763] devtmpfs: mounted
[    3.485038] Freeing unused kernel memory: 1024K
Starting logging: OK
Initializing random number generator... done.

Welcome to Lichee Pi
Lichee login:

上面是 licheepi 官方的 nano 固件(Nano_flash_800480.7z) 启动 log.

root=/dev/mtdblock3 rw rootfstype=jffs2 没有问题.





离线

#10 2018-10-06 14:59:13

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: linux内核启动过程中没有看到分区标信息

终于找到了不生成分区的原因, 原来是使用了错误 SPI 驱动.

应该使用 CONFIG_SUN6I_SPI, 而不是 CONFIG_SUN4I_SPI

最迷惑的就是 u-boot 里面配置是对的, 而 linux kernel 的配置是错误的,

开始一直没有怀疑是这个问题,

直到参考 @chong 大神的 linux 4.19 才发现。

官方的配置文件 https://whycan.cn/files/members/3/lichee_nano_linux_config.zip (不是压缩文件,直接改后缀名即可!) 是有坑的.





离线

#11 2019-05-13 16:04:56

还能这么玩
会员
注册时间: 2019-04-14
已发帖子: 119
积分: 119

Re: linux内核启动过程中没有看到分区标信息

果然有坑, 搜来搜去又搜到坑网,


应该是这样:
CONFIG_SPI_SUN6I 


而不是这样:
CONFIG_SUN6I_SPI





笑哭.gif


还好终于把问题解决了, 都差点要卷铺盖了 ....

离线

#12 2020-05-23 17:26:39

angelsan
会员
注册时间: 2020-04-02
已发帖子: 139
积分: 131.5

Re: linux内核启动过程中没有看到分区标信息

先学习了,很有用啊。话说,没有详尽的文档,始终是开发者最头疼的事情

离线

#13 2020-05-27 16:31:33

vip171365253
会员
注册时间: 2020-05-27
已发帖子: 7
积分: 2

Re: linux内核启动过程中没有看到分区标信息

晕哥 说:

终于找到了不生成分区的原因, 原来是使用了错误 SPI 驱动.

应该使用 CONFIG_SUN6I_SPI, 而不是 CONFIG_SUN4I_SPI

在哪个目录下?

离线

#14 2022-03-02 00:55:09

varzhou
会员
注册时间: 2020-07-14
已发帖子: 108
积分: 2

Re: linux内核启动过程中没有看到分区标信息

配置SPI NAND之后,可以生成分区,但是就是无法挂载,好奇挂

[    1.085484] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.091965] Creating 4 MTD partitions on "spi0.0":
[    1.096769] 0x000000000000-0x000000100000 : "u-boot"
[    1.104414] 0x000000100000-0x000000110000 : "dtb"
[    1.110344] 0x000000110000-0x000000510000 : "kernel"
//dev下面的文件节点也是/mtdxry这是啥,可读文件??
# mount -t vfat /dev/mtd
mtd0    mtd0ro  mtd1    mtd1ro  mtd2    mtd2ro  mtd3    mtd3ro
# mount -t vfat /dev/mtd
mtd0    mtd0ro  mtd1    mtd1ro  mtd2    mtd2ro  mtd3    mtd3ro
# mount -t vfat /dev/mtd1 /mnt
mount: mounting /dev/mtd1 on /mnt failed: Block device required

离线

#15 2022-04-14 12:25:47

v8second
会员
注册时间: 2022-01-25
已发帖子: 11
积分: 26

Re: linux内核启动过程中没有看到分区标信息

还好有人踩过这个坑

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn