LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 01-02-2018, 10:55 AM   #1
abh1d4m
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Rep: Reputation: Disabled
TI am335x (PhyCore-wega): kernel panic: cannot open root device


Hi,

Caveat: I am a newbie trying to build linux from scratch for PhyCore board with TI-AM3354 processor and 256 MB RAM

I have compiled kernel for TI AM3354 based board. The root file system is embedded in kernel image using CONFIG_INITRAMFS_SOURCE option.
I (rather the Booloader Barebox) starts the kernel with the following command line:
Code:
consoleblank=0 console=ttyO0,115200n8   root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait rootwait ro fsck.repair=yes
However the start up is aborted as kernel cannot mount root file system.

Quote:
[ 2.567216] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -2
I tried with different partition number (mmcblk0p6) without any success.
The SD card doesn't seem to have any problem.
Any help would be really appreciated.
Thanks in advance.

The startup log is shown below:
Code:
Loading ARM Linux zImage '/mnt/zImage'
Loading devicetree from '/mnt/am335x-wega-rdk.dtb'
commandline: consoleblank=0 console=ttyO0,115200n8   root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait rootwait ro fsck.repair=yes
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.13_ad_v1.0 (dhama@debian) (gcc version 5.2.0 (crosstool-NG crosstool-ng-1.22.0) ) #1 SMP Tue Jan 2 14:30:28 CET 2018
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Phytec AM335x phyBOARD-WEGA
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 64 MiB at 0x8b800000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] percpu: Embedded 14 pages/cpu @cfbad000 s26624 r8192 d22528 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64512
[    0.000000] Kernel command line: consoleblank=0 console=ttyO0,115200n8   root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait rootwait ro fsck.repair=yes
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 168948K/260096K available (9216K kernel code, 1126K rwdata, 3868K rodata, 7168K init, 343K bss, 25612K reserved, 65536K 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 : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc0c00000   (10208 kB)
[    0.000000]       .init : 0xc1100000 - 0xc1800000   (7168 kB)
[    0.000000]       .data : 0xc1800000 - 0xc1919b20   (1127 kB)
[    0.000000]        .bss : 0xc191b000 - 0xc1970e78   ( 344 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 32.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 25000000 Hz
[    0.000019] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000046] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000061] OMAP clocksource: timer1 at 25000000 Hz
[    0.005658] clocksource_probe: no matching clocksources found
[    0.005977] Console: colour dummy device 80x30
[    0.006026] Calibrating delay loop... 597.19 BogoMIPS (lpj=1492992)
[    0.038810] pid_max: default: 32768 minimum: 301
[    0.038973] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.038990] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.039936] CPU: Testing write buffer coherency: ok
[    0.040363] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.040432] Setting up static identity map for 0x80300000 - 0x80300098
[    0.045506] EFI services will not be available.
[    0.045866] Brought up 1 CPUs
[    0.045884] SMP: Total of 1 processors activated (597.19 BogoMIPS).
[    0.045895] CPU: All CPU(s) started in SVC mode.
[    0.047808] devtmpfs: initialized
[    0.063288] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.064179] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns
[    0.064221] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.068731] pinctrl core: initialized pinctrl subsystem
[    0.071843] NET: Registered protocol family 16
[    0.074930] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.100183] omap_hwmod: debugss: _wait_target_disable failed
[    0.156887] cpuidle: using governor menu
[    0.167586] OMAP GPIO hardware version 0.1
[    0.189318] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_nandflash, deferring probe
[    0.193484] No ATAGs?
[    0.193510] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.194251] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[    0.194270] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[    0.199967] Serial: AMBA PL011 UART driver
[    0.230812] edma 49000000.edma: TI EDMA DMA engine driver
[    0.236357] vgaarb: loaded
[    0.237625] SCSI subsystem initialized
[    0.238416] usbcore: registered new interface driver usbfs
[    0.238516] usbcore: registered new interface driver hub
[    0.238602] usbcore: registered new device driver usb
[    0.239576] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0, deferring probe
[    0.240576] pps_core: LinuxPPS API ver. 1 registered
[    0.240590] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.240625] PTP clock support registered
[    0.240860] EDAC MC: Ver: 3.0.0
[    0.244882] clocksource: Switched to clocksource timer1
[    0.260335] NET: Registered protocol family 2
[    0.261181] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.261229] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.261285] TCP: Hash tables configured (established 2048 bind 2048)
[    0.261366] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.261397] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.261588] NET: Registered protocol family 1
[    0.262189] RPC: Registered named UNIX socket transport module.
[    0.262206] RPC: Registered udp transport module.
[    0.262215] RPC: Registered tcp transport module.
[    0.262224] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.882736] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.886868] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    0.903161] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.904736] NFS: Registering the id_resolver key type
[    0.904790] Key type id_resolver registered
[    0.904802] Key type id_legacy registered
[    0.904954] ntfs: driver 2.1.32 [Flags: R/O].
[    0.907697] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.907723] io scheduler noop registered
[    0.907734] io scheduler deadline registered
[    0.908001] io scheduler cfq registered (default)
[    0.913267] libphy: mdio_driver_register: phy-bcm-ns2-pci
[    0.914729] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    1.025781] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.029844] SuperH (H)SCI(F) driver initialized
[    1.031209] msm_serial: driver initialized
[    1.031609] omap_uart 44e09000.serial: no wakeirq for uart0
[    1.031826] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a OMAP UART0
[    1.418550] random: fast init done
[    1.720131] console [ttyO0] enabled
[    1.724510] omap_uart 48022000.serial: no wakeirq for uart1
[    1.730584] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a OMAP UART1
[    1.740989] STMicroelectronics ASC driver initialized
[    1.749169] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[    1.758176] [drm] Initialized
[    1.784040] brd: module loaded
[    1.796544] loop: module loaded
[    1.812367] libphy: Fixed MDIO Bus: probed
[    1.818685] CAN device driver interface
[    1.825434] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    1.831608] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.837982] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    1.845329] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.914995] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.921469] davinci_mdio 4a101000.mdio: detected phy mask fffffffc
[    1.944074] libphy: 4a101000.mdio: probed
[    1.948472] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    1.958111] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver SMSC LAN8710/LAN8720
[    1.970614] cpsw 4a100000.ethernet: Detected MACID = b0:d5:cc:8a:dc:5b
[    1.979609] cpsw 4a100000.ethernet: cpsw: Detected MACID = b0:d5:cc:8a:dc:5d
[    1.989357] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    1.997297] usbcore: registered new interface driver pegasus
[    2.003383] usbcore: registered new interface driver asix
[    2.009154] usbcore: registered new interface driver ax88179_178a
[    2.015650] usbcore: registered new interface driver cdc_ether
[    2.021894] usbcore: registered new interface driver smsc75xx
[    2.028043] usbcore: registered new interface driver smsc95xx
[    2.034177] usbcore: registered new interface driver net1080
[    2.040213] usbcore: registered new interface driver cdc_subset
[    2.046518] usbcore: registered new interface driver zaurus
[    2.052497] usbcore: registered new interface driver cdc_ncm
[    2.061152] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.068073] ehci-pci: EHCI PCI platform driver
[    2.072844] ehci-platform: EHCI generic platform driver
[    2.078648] ehci-orion: EHCI orion driver
[    2.083100] SPEAr-ehci: EHCI SPEAr driver
[    2.087544] ehci-st: EHCI STMicroelectronics driver
[    2.092904] ehci-exynos: EHCI EXYNOS driver
[    2.097542] ehci-atmel: EHCI Atmel driver
[    2.101944] tegra-ehci: Tegra EHCI driver
[    2.106394] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.112958] ohci-pci: OHCI PCI platform driver
[    2.117748] ohci-platform: OHCI generic platform driver
[    2.123511] ohci-omap3: OHCI OMAP3 driver
[    2.127939] SPEAr-ohci: OHCI SPEAr driver
[    2.132375] ohci-st: OHCI STMicroelectronics driver
[    2.137691] ohci-atmel: OHCI Atmel driver
[    2.142918] usbcore: registered new interface driver usb-storage
[    2.151898] mousedev: PS/2 mouse device common for all mice
[    2.162413] i2c /dev entries driver
[    2.182636] sdhci: Secure Digital Host Controller Interface driver
[    2.189234] sdhci: Copyright(c) Pierre Ossman
[    2.195368] omap_hsmmc 48060000.mmc: Got CD GPIO
[    2.241663] Synopsys Designware Multimedia Card Interface Driver
[    2.249580] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.258828] ledtrig-cpu: registered to indicate activity on CPUs
[    2.265939] usbcore: registered new interface driver usbhid
[    2.271865] usbhid: USB HID core driver
[    2.280913] NET: Registered protocol family 10
[    2.287541] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.294981] NET: Registered protocol family 17
[    2.299673] can: controller area network core (rev 20120528 abi 9)
[    2.306580] NET: Registered protocol family 29
[    2.311294] can: raw protocol (rev 20120528)
[    2.315805] can: broadcast manager protocol (rev 20161123 t)
[    2.321782] can: netlink gateway (rev 20130117) max_hops=1
[    2.328362] Key type dns_resolver registered
[    2.333292] omap_voltage_late_init: Voltage driver support not added
[    2.340233] ThumbEE CPU extension supported.
[    2.344734] Registering SWP/SWPB emulation handler
[    2.360709] omap-gpmc 50000000.gpmc: omap_device: omap_device_enable() called from invalid state 1
[    2.370223] omap-gpmc 50000000.gpmc: use pm_runtime_put_sync_suspend() in driver?
[    2.378123] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[    2.383551] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[    2.415180] tps65910 0-002d: No interrupt support, no core IRQ
[    2.424513] vrtc: supplied by vcc5v
[    2.432355] vio: supplied by vcc5v
[    2.437650] vdd1: supplied by vcc5v
[    2.443577] vdd2: supplied by vcc5v
[    2.451231] vdig1: supplied by vcc5v
[    2.456798] vdig2: supplied by vcc5v
[    2.462338] vpll: supplied by vcc5v
[    2.466181] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.476246] vdac: supplied by vcc5v
[    2.480887] mmc0: new high speed SDHC card at address aaaa
[    2.487739] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    2.493879] vaux1: supplied by vcc5v
[    2.498829]  mmcblk0: p1 p2
[    2.503869] vaux2: supplied by vcc5v
[    2.509427] vaux33: supplied by vcc5v
[    2.514993] vmmc: supplied by vcc5v
[    2.520377] vbb: supplied by vcc5v
[    2.527160] tps65910-rtc tps65910-rtc: IRQ is not free.
[    2.532754] tps65910-rtc: probe of tps65910-rtc failed with error -22
[    2.541725] at24 0-0052: 4096 byte 24c32 EEPROM, writable, 32 bytes/write
[    2.549641] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    2.558736] hctosys: unable to open rtc device (rtc0)
[    2.567216] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -2
[    2.575628] Please append a correct "root=" boot option; here are the available partitions:
[    2.584413] 0100           65536 ram0 [    2.588181]  (driver?)
[    2.590678] 0101           65536 ram1 [    2.594417]  (driver?)
[    2.596910] 0102           65536 ram2 [    2.600666]  (driver?)
[    2.603141] 0103           65536 ram3 [    2.606904]  (driver?)
[    2.609379] 0104           65536 ram4 [    2.613136]  (driver?)
[    2.615631] 0105           65536 ram5 [    2.619369]  (driver?)
[    2.621863] 0106           65536 ram6 [    2.625619]  (driver?)
[    2.628094] 0107           65536 ram7 [    2.631850]  (driver?)
[    2.634325] 0108           65536 ram8 [    2.638081]  (driver?)
[    2.640575] 0109           65536 ram9 [    2.644313]  (driver?)
[    2.646806] 010a           65536 ram10 [    2.650653]  (driver?)
[    2.653127] 010b           65536 ram11 [    2.656974]  (driver?)
[    2.659449] 010c           65536 ram12 [    2.663295]  (driver?)
[    2.665789] 010d           65536 ram13 [    2.669618]  (driver?)
[    2.672111] 010e           65536 ram14 [    2.675958]  (driver?)
[    2.678433] 010f           65536 ram15 [    2.682280]  (driver?)
[    2.684761] b300        15558144 mmcblk0 [    2.688791]  driver: mmcblk
[    2.691739]   b301           65535 mmcblk0p1 00000000-01[    2.697132] 
[    2.698698]   b302         1048576 mmcblk0p2 00000000-02[    2.704089] 
[    2.705675] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[    2.714517] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.13_ad_v1.0 #1
[    2.721440] Hardware name: Generic AM33XX (Flattened Device Tree)
[    2.727862] [<c03105f4>] (unwind_backtrace) from [<c030bbb8>] (show_stack+0x10/0x14)
[    2.735983] [<c030bbb8>] (show_stack) from [<c05a21b4>] (dump_stack+0x90/0xa4)
[    2.743557] [<c05a21b4>] (dump_stack) from [<c03d2c80>] (panic+0xdc/0x270)
[    2.750773] [<c03d2c80>] (panic) from [<c1101228>] (mount_block_root+0x194/0x268)
[    2.758616] [<c1101228>] (mount_block_root) from [<c1101504>] (mount_root+0x11c/0x124)
[    2.766911] [<c1101504>] (mount_root) from [<c110169c>] (prepare_namespace+0x190/0x1d8)
[    2.775297] [<c110169c>] (prepare_namespace) from [<c1100e64>] (kernel_init_freeable+0x1ec/0x1fc)
[    2.784600] [<c1100e64>] (kernel_init_freeable) from [<c0be71c8>] (kernel_init+0x8/0x114)
[    2.793178] [<c0be71c8>] (kernel_init) from [<c0307e78>] (ret_from_fork+0x14/0x3c)
[    2.801121] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[   65.299902] random: crng init done
 
Old 01-02-2018, 03:19 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
/dev/mmcblk0p2 is a correct partition name (it's shown on the list). However, are you sure you have ext4 driver included to mount it (I assume you have written it correctly). You can try recompiling your kernel with ext4 built-in to be sure.
 
Old 01-02-2018, 03:56 PM   #3
abh1d4m
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mara View Post
/dev/mmcblk0p2 is a correct partition name (it's shown on the list). However, are you sure you have ext4 driver included to mount it (I assume you have written it correctly). You can try recompiling your kernel with ext4 built-in to be sure.
I have enabled the ext4 in Kernel configuration (see below)
Code:
CONFIG_DCACHE_WORD_ACCESS=y
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_ENCRYPTION is not set
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD2=y
I suspected perhaps the "ReadOnly (ro)" flag was somehow confusing the kernel. However, even after I removed the flag, I get same error message during the startup.
Code:
root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait rootwait ro fsck.repair=yes
 
Old 01-03-2018, 03:41 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
The ext4 config looks good then.

Are you sure the image written is correct? What command or tool have you used to write it to the board?
 
Old 01-04-2018, 05:12 AM   #5
abh1d4m
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
I am booting from micro SD Card and following commands were used to write kernel Image to micro SD card.
Code:
cp zImage /home/<user>/boot
The SD card has two partitions: boot and rootfs. "boot" contains MLO, barebox.bin, dtb and zImage. All written to micro SD card with the help of "cp". The initramfs is embedded in kernel image.
 
Old 01-04-2018, 12:00 PM   #6
rocq
Member
 
Registered: Jan 2013
Location: Netherlands
Distribution: XUbuntu
Posts: 57

Rep: Reputation: Disabled
(1) My first thought is mounting fails due to a corrupted file system or your kernel doesn't support the file system type. However, you already verified the ext4 support. Can you access the partition within barebox? Or try mounting the SD card on another board/computer.

(2) Can you post the devicetree?

(3) Is the SD card properly inserted? This might sound stupid but I used to have issues with bad 'made-in-china' SD card slots. The slots would signal a card present (via the card-detect line) but the SD card would not be properly connected to the communication pins.
 
Old 01-05-2018, 11:29 AM   #7
abh1d4m
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rocq View Post
(1) My first thought is mounting fails due to a corrupted file system or your kernel doesn't support the file system type. However, you already verified the ext4 support. Can you access the partition within barebox? Or try mounting the SD card on another board/computer.
I am able to mount the EXT4 partion in barebox.
Code:
barebox@Phytec phyCORE AM335x:/ mount /dev/mmc0.1 /mnt
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 32
barebox@Phytec phyCORE AM335x:/ lsls   /mnt
.             ..            lost+found
Quote:
Originally Posted by rocq View Post
(2) Can you post the devicetree?
Code:
barebox@Phytec phyCORE AM335x:/ devinfo
`-- global
`-- nv
`-- platform
   `-- opp-table.0
   `-- pmu.1
   `-- soc.2
   `-- ocp.3
      `-- l4_wkup.4
         `-- 44d00000.wkup_m3
         `-- 44e00000.prcm
         `-- 44e10000.scm
            `-- 44e10800.pinmux
            `-- 44e10000.scm_conf
            `-- 44e11324.wkup_m3_ipc
            `-- 44e10f90.dma-router
      `-- 48200000.interrupt-controller
      `-- 49000000.edma
      `-- 49800000.tptc
      `-- 49900000.tptc
      `-- 49a00000.tptc
      `-- 44e07000.gpio
      `-- 4804c000.gpio
      `-- 481ac000.gpio
      `-- 481ae000.gpio
      `-- 44e09000.serial
         `-- cs0
            `-- 0x00000000-0xffffffffffffffff (   0 Bytes): /dev/cs0
      `-- 44e0b000.i2c
         `-- i2c0
            `-- 24c320
               `-- 0x00000000-0x00000fff (     4 KiB): /dev/eeprom0
      `-- 48060000.mmc
         `-- mmc0
            `-- 0x00000000-0x3b597ffff (  14.8 GiB): /dev/mmc0
            `-- 0x00000200-0x03ffffff (    64 MiB): /dev/mmc0.0
            `-- 0x04000000-0x43ffffff (     1 GiB): /dev/mmc0.1
            `-- fat0
      `-- 480ca000.spinlock
      `-- 44e35000.wdt
      `-- 480c8000.mailbox
      `-- 44e31000.timer
      `-- 48040000.timer
      `-- 48042000.timer
      `-- 48044000.timer
      `-- 48046000.timer
      `-- 48048000.timer
      `-- 4804a000.timer
      `-- 44e3e000.rtc
      `-- 48030000.spi
         `-- m25p80@00
      `-- 47400000.usb
         `-- 44e10620.control
         `-- 47401b00.usb-phy
         `-- 47401c00.usb
         `-- 47400000.dma-controller
      `-- 4a100000.ethernet
         `-- miibus0
            `-- mdio0-phy00
               `-- 0x00000000-0x0000003f (  64 Bytes): /dev/mdio0-phy00
         `-- cpsw-slave0
            `-- eth0
      `-- 40300000.ocmcram
      `-- 50000000.gpmc
      `-- 53100000.sham
      `-- 53500000.aes
      `-- 48310000.rng
   `-- mem0
      `-- 0x00000000-0x0fffffff (   256 MiB): /dev/ram0
   `-- gpmc_nand0
      `-- nand0
         `-- 0x00000000-0x07ffffff (   128 MiB): /dev/nand0
         `-- 0x00000000-0x003fffff (     4 MiB): /dev/nand0.oob
         `-- nand0.xload
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload
         `-- nand0.xload_backup1
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload_backup1
         `-- nand0.xload_backup2
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload_backup2
         `-- nand0.xload_backup3
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload_backup3
         `-- nand0.barebox
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.barebox
         `-- nand0.barebox_backup
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.barebox_backup
         `-- nand0.bareboxenv
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.bareboxenv
         `-- nand0.root
            `-- 0x00000000-0x07e3ffff ( 126.3 MiB): /dev/nand0.root
   `-- mem1
      `-- 0x00000000-0xfffffffe (     4 GiB): /dev/mem
   `-- netconsole
      `-- 0x00000000-0xffffffffffffffff (   0 Bytes): /dev/netconsole-1
`-- mdio_bus
`-- usb
`-- spi
`-- i2c
`-- fs
   `-- ramfs0
   `-- devfs0
`-- net
Quote:
Originally Posted by rocq View Post
(3) Is the SD card properly inserted? This might sound stupid but I used to have issues with bad 'made-in-china' SD card slots. The slots would signal a card present (via the card-detect line) but the SD card would not be properly connected to the communication pins.
Unfortunately I don't have any other spare board to test the SD card. But I would reckon that, since barebox can read the partitions, card reader is functioning properly.
I suspect that somehow kernel commandline is not properly formed, however on the surface it looks to be ok.
 
Old 01-08-2018, 01:52 AM   #8
rocq
Member
 
Registered: Jan 2013
Location: Netherlands
Distribution: XUbuntu
Posts: 57

Rep: Reputation: Disabled
Quote:
I am able to mount the EXT4 partion in barebox.
Code:
barebox@Phytec phyCORE AM335x:/ mount /dev/mmc0.1 /mnt
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 32
barebox@Phytec phyCORE AM335x:/ lsls   /mnt
.             ..            lost+found
This seems to be an empty file system... I would expect to see the rootfs contents here.
Quote:
Code:
barebox@Phytec phyCORE AM335x:/ devinfo
`-- global
`-- nv
`-- platform
   `-- opp-table.0
   `-- pmu.1
   `-- soc.2
   `-- ocp.3
      `-- l4_wkup.4
         `-- 44d00000.wkup_m3
         `-- 44e00000.prcm
         `-- 44e10000.scm
            `-- 44e10800.pinmux
            `-- 44e10000.scm_conf
            `-- 44e11324.wkup_m3_ipc
            `-- 44e10f90.dma-router
      `-- 48200000.interrupt-controller
      `-- 49000000.edma
      `-- 49800000.tptc
      `-- 49900000.tptc
      `-- 49a00000.tptc
      `-- 44e07000.gpio
      `-- 4804c000.gpio
      `-- 481ac000.gpio
      `-- 481ae000.gpio
      `-- 44e09000.serial
         `-- cs0
            `-- 0x00000000-0xffffffffffffffff (   0 Bytes): /dev/cs0
      `-- 44e0b000.i2c
         `-- i2c0
            `-- 24c320
               `-- 0x00000000-0x00000fff (     4 KiB): /dev/eeprom0
      `-- 48060000.mmc
         `-- mmc0
            `-- 0x00000000-0x3b597ffff (  14.8 GiB): /dev/mmc0
            `-- 0x00000200-0x03ffffff (    64 MiB): /dev/mmc0.0
            `-- 0x04000000-0x43ffffff (     1 GiB): /dev/mmc0.1
            `-- fat0
      `-- 480ca000.spinlock
      `-- 44e35000.wdt
      `-- 480c8000.mailbox
      `-- 44e31000.timer
      `-- 48040000.timer
      `-- 48042000.timer
      `-- 48044000.timer
      `-- 48046000.timer
      `-- 48048000.timer
      `-- 4804a000.timer
      `-- 44e3e000.rtc
      `-- 48030000.spi
         `-- m25p80@00
      `-- 47400000.usb
         `-- 44e10620.control
         `-- 47401b00.usb-phy
         `-- 47401c00.usb
         `-- 47400000.dma-controller
      `-- 4a100000.ethernet
         `-- miibus0
            `-- mdio0-phy00
               `-- 0x00000000-0x0000003f (  64 Bytes): /dev/mdio0-phy00
         `-- cpsw-slave0
            `-- eth0
      `-- 40300000.ocmcram
      `-- 50000000.gpmc
      `-- 53100000.sham
      `-- 53500000.aes
      `-- 48310000.rng
   `-- mem0
      `-- 0x00000000-0x0fffffff (   256 MiB): /dev/ram0
   `-- gpmc_nand0
      `-- nand0
         `-- 0x00000000-0x07ffffff (   128 MiB): /dev/nand0
         `-- 0x00000000-0x003fffff (     4 MiB): /dev/nand0.oob
         `-- nand0.xload
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload
         `-- nand0.xload_backup1
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload_backup1
         `-- nand0.xload_backup2
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload_backup2
         `-- nand0.xload_backup3
            `-- 0x00000000-0x0001ffff (   128 KiB): /dev/nand0.xload_backup3
         `-- nand0.barebox
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.barebox
         `-- nand0.barebox_backup
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.barebox_backup
         `-- nand0.bareboxenv
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.bareboxenv
         `-- nand0.root
            `-- 0x00000000-0x07e3ffff ( 126.3 MiB): /dev/nand0.root
   `-- mem1
      `-- 0x00000000-0xfffffffe (     4 GiB): /dev/mem
   `-- netconsole
      `-- 0x00000000-0xffffffffffffffff (   0 Bytes): /dev/netconsole-1
`-- mdio_bus
`-- usb
`-- spi
`-- i2c
`-- fs
   `-- ramfs0
   `-- devfs0
`-- net
This is the devicetree from barebox. I need the one for Linux (dts file).

Quote:
Unfortunately I don't have any other spare board to test the SD card. But I would reckon that, since barebox can read the partitions, card reader is functioning properly.
I suspect that somehow kernel commandline is not properly formed, however on the surface it looks to be ok.
I agree.

One lead we have is that you get result code -2 which is the one for ENODEV. There can be many reasons for that result code. Firstly this indicates the device may be missing but your MMC driver is able to detect it. Secondly this could also indicate it doesn't support the filesystem type. Thirdly it may indicate it cannot mount the device as a file systemtype you specified in 'rootfstype'.

You may want to play with this 'rootfstype'. Try omitting the parameter or try passing 'rootfstype=ext2' (I mention this because it looks like the ext4 driver in barebox reports "EXT2 rev 1"). Also try mounting is as read-only.
 
Old 01-14-2018, 05:15 AM   #9
abh1d4m
LQ Newbie
 
Registered: Jan 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rocq View Post
This seems to be an empty file system... I would expect to see the rootfs contents here.

This is the devicetree from barebox. I need the one for Linux (dts file).
/dts-v1/;

The DTS files are shown below.
Code:
#include "am335x-phycore-som.dtsi"
#include "am335x-wega.dtsi"

/* SoM */
&i2c_eeprom {
	status = "okay";
};

&i2c_rtc {
	status = "okay";
};
am335x-phycore-som.dtsi:
Code:
/ {
	model = "Phytec AM335x phyCORE";
	compatible = "phytec,am335x-phycore-som", "ti,am33xx";

	aliases {
		rtc0 = &i2c_rtc;
		rtc1 = &rtc;
	};

	cpus {
		cpu@0 {
			cpu0-supply = <&vdd1_reg>;
		};
	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x80000000 0x10000000>; /* 256 MB */
	};

	regulators {
		compatible = "simple-bus";

		vcc5v: fixedregulator0 {
			compatible = "regulator-fixed";
			regulator-name = "vcc5v";
			regulator-min-microvolt = <5000000>;
			regulator-max-microvolt = <5000000>;
			regulator-boot-on;
			regulator-always-on;
		};
	};
};

/* Crypto Module */
&aes {
	status = "okay";
};

&sham {
	status = "okay";
};

/* Ethernet */
&am33xx_pinmux {
	ethernet0_pins: pinmux_ethernet0 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_crs.rmii1_crs_dv */
			AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_rxerr.rmii1_rxerr */
			AM33XX_IOPAD(0x914, PIN_OUTPUT | MUX_MODE1)		/* mii1_txen.rmii1_txen */
			AM33XX_IOPAD(0x924, PIN_OUTPUT | MUX_MODE1)		/* mii1_txd1.rmii1_txd1 */
			AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE1)		/* mii1_txd0.rmii1_txd0 */
			AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_rxd1.rmii1_rxd1 */
			AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* mii1_rxd0.rmii1_rxd0 */
			AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* rmii1_refclk.rmii1_refclk */
		>;
	};

	mdio_pins: pinmux_mdio {
		pinctrl-single,pins = <
			/* MDIO */
			AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
			AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
		>;
	};
};

&cpsw_emac0 {
	phy_id = <&davinci_mdio>, <0>;
	phy-mode = "rmii";
	dual_emac_res_vlan = <1>;
};

&davinci_mdio {
	pinctrl-names = "default";
	pinctrl-0 = <&mdio_pins>;
	status = "okay";
};

&mac {
	slaves = <1>;
	pinctrl-names = "default";
	pinctrl-0 = <&ethernet0_pins>;
	status = "okay";
};

&phy_sel {
	rmii-clock-ext;
};

/* I2C Busses */
&am33xx_pinmux {
	i2c0_pins: pinmux_i2c0 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x988, PIN_INPUT | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
			AM33XX_IOPAD(0x98c, PIN_INPUT | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
		>;
	};
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins>;
	clock-frequency = <400000>;
	status = "okay";

	tps: pmic@2d {
		reg = <0x2d>;
	};

	i2c_eeprom: eeprom@52 {
		compatible = "atmel,24c32";
		pagesize = <32>;
		reg = <0x52>;
		status = "disabled";
	};

	i2c_rtc: rtc@68 {
		compatible = "rv4162";
		reg = <0x68>;
		status = "disabled";
	};
};

/* NAND memory */
&am33xx_pinmux {
		nandflash_pins: pinmux_nandflash {
			pinctrl-single,pins = <
			AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad0.gpmc_ad0 */
			AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad1.gpmc_ad1 */
			AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad2.gpmc_ad2 */
			AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad3.gpmc_ad3 */
			AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad4.gpmc_ad4 */
			AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad5.gpmc_ad5 */
			AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad6.gpmc_ad6 */
			AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad7.gpmc_ad7 */
			AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wait0.gpmc_wait0 */
			AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)		/* gpmc_csn0.gpmc_csn0 */
			AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)		/* gpmc_advn_ale.gpmc_advn_ale */
			AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)		/* gpmc_oen_ren.gpmc_oen_ren */
			AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)		/* gpmc_wen.gpmc_wen */
			AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)		/* gpmc_be0n_cle.gpmc_be0n_cle */
		>;
	};
};

&elm {
	status = "okay";
};

&gpmc {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&nandflash_pins>;
	ranges = <0 0 0x08000000 0x1000000>;   /* CS0: NAND */
	nandflash: nand@0,0 {
		compatible = "ti,omap2-nand";
		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
		interrupt-parent = <&gpmc>;
		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
			     <1 IRQ_TYPE_NONE>;	/* termcount */
		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
		nand-bus-width = <8>;
		ti,nand-ecc-opt = "bch8";
		gpmc,device-nand = "true";
		gpmc,device-width = <1>;
		gpmc,sync-clk-ps = <0>;
		gpmc,cs-on-ns = <0>;
		gpmc,cs-rd-off-ns = <30>;
		gpmc,cs-wr-off-ns = <30>;
		gpmc,adv-on-ns = <0>;
		gpmc,adv-rd-off-ns = <30>;
		gpmc,adv-wr-off-ns = <30>;
		gpmc,we-on-ns = <0>;
		gpmc,we-off-ns = <20>;
		gpmc,oe-on-ns = <10>;
		gpmc,oe-off-ns = <30>;
		gpmc,access-ns = <30>;
		gpmc,rd-cycle-ns = <30>;
		gpmc,wr-cycle-ns = <30>;
		gpmc,bus-turnaround-ns = <0>;
		gpmc,cycle2cycle-delay-ns = <50>;
		gpmc,cycle2cycle-diffcsen;
		gpmc,clk-activation-ns = <0>;
		gpmc,wr-access-ns = <30>;
		gpmc,wr-data-mux-bus-ns = <0>;

		ti,elm-id = <&elm>;

		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "xload";
			reg = <0x0 0x20000>;
		};
		partition@1 {
			label = "xload_backup1";
			reg = <0x20000 0x20000>;
		};
		partition@2 {
			label = "xload_backup2";
			reg = <0x40000 0x20000>;
		};
		partition@3 {
			label = "xload_backup3";
			reg = <0x60000 0x20000>;
		};
		partition@4 {
			label = "barebox";
			reg = <0x80000 0x80000>;
		};
		partition@5 {
			label = "bareboxenv";
			reg = <0x100000 0x40000>;
		};
		partition@6 {
			label = "oftree";
			reg = <0x140000 0x40000>;
		};
		partition@7 {
			label = "kernel";
			reg = <0x180000 0x800000>;
		};
		partition@8 {
			label = "root";
			reg = <0x980000 0x0>;
		};
	};
};

/* Power */
#include "tps65910.dtsi"

&tps {
	vcc1-supply = <&vcc5v>;
	vcc2-supply = <&vcc5v>;
	vcc3-supply = <&vcc5v>;
	vcc4-supply = <&vcc5v>;
	vcc5-supply = <&vcc5v>;
	vcc6-supply = <&vcc5v>;
	vcc7-supply = <&vcc5v>;
	vccio-supply = <&vcc5v>;

	regulators {
		vrtc_reg: regulator@0 {
			regulator-always-on;
		};

		vio_reg: regulator@1 {
			regulator-always-on;
		};

		vdd1_reg: regulator@2 {
			/* VDD_MPU voltage limits 0.95V - 1.325V with +/-4% tolerance */
			regulator-name = "vdd_mpu";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1378000>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd2_reg: regulator@3 {
			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
			regulator-name = "vdd_core";
			regulator-min-microvolt = <912500>;
			regulator-max-microvolt = <1150000>;
			regulator-boot-on;
			regulator-always-on;
		};

		vdd3_reg: regulator@4 {
			regulator-always-on;
		};

		vdig1_reg: regulator@5 {
			regulator-name = "vdig1_1p8v";
			regulator-min-microvolt = <1800000>;
			regulator-max-microvolt = <1800000>;
		};

		vdig2_reg: regulator@6 {
			regulator-always-on;
		};

		vpll_reg: regulator@7 {
			regulator-always-on;
		};

		vdac_reg: regulator@8 {
			regulator-always-on;
		};

		vaux1_reg: regulator@9 {
			regulator-always-on;
		};

		vaux2_reg: regulator@10 {
			regulator-always-on;
		};

		vaux33_reg: regulator@11 {
			regulator-always-on;
		};

		vmmc_reg: regulator@12 {
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-always-on;
		};
	};
};

/* SPI Busses */
&am33xx_pinmux {
	spi0_pins: pinmux_spi0 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x950, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* spi0_clk.spi0_clk */
			AM33XX_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* spi0_d0.spi0_d0 */
			AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_d1.spi0_d1 */
			AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_cs0.spi0_cs0 */
		>;
	};
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_pins>;
	status = "okay";

	serial_flash: m25p80@0 {
		compatible = "m25p80";
		spi-max-frequency = <48000000>;
		reg = <0x0>;
		m25p,fast-read;
		status = "disabled";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "xload";
			reg = <0x0 0x20000>;
		};
		partition@1 {
			label = "barebox";
			reg = <0x20000 0x80000>;
		};
		partition@2 {
			label = "bareboxenv";
			reg = <0xa0000 0x20000>;
		};
		partition@3 {
			label = "oftree";
			reg = <0xc0000 0x20000>;
		};
		partition@4 {
			label = "kernel";
			reg = <0xe0000 0x0>;
		};
	};
};
am335x-wega.dtsi:
Code:
/ {
	model = "Phytec AM335x phyBOARD-WEGA";
	compatible = "phytec,am335x-wega", "phytec,am335x-phycore-som", "ti,am33xx";

	sound: sound_iface {
		compatible = "ti,da830-evm-audio";
	};

	regulators {
		compatible = "simple-bus";

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

/* Audio */
&am33xx_pinmux {
	mcasp0_pins: pinmux_mcasp0 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x9AC, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_ahclkx.mcasp0_ahclkx */
			AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_aclkx.mcasp0_aclkx */
			AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_fsx.mcasp0_fsx */
			AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_axr0.mcasp0_axr0 */
			AM33XX_IOPAD(0x9A8, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr1.mcasp0_axr1 */
		>;
	};
};

&i2c0 {
	tlv320aic3007: tlv320aic3007@18 {
		compatible = "ti,tlv320aic3007";
		reg = <0x18>;
		AVDD-supply = <&vcc3v3>;
		IOVDD-supply = <&vcc3v3>;
		DRVDD-supply = <&vcc3v3>;
		DVDD-supply = <&vdig1_reg>;
		status = "okay";
	};
};

&mcasp0 {
	pinctrl-names = "default";
	pinctrl-0 = <&mcasp0_pins>;
	op-mode = <0>; /* DAVINCI_MCASP_IIS_MODE */
	tdm-slots = <2>;
	serial-dir = <
		2 1 0 0 /* # 0: INACTIVE, 1: TX, 2: RX */
	>;
	tx-num-evt = <16>;
	rt-num-evt = <16>;
	status = "okay";
};

&sound {
	ti,model = "AM335x-Wega";
	ti,audio-codec = <&tlv320aic3007>;
	ti,mcasp-controller = <&mcasp0>;
	ti,audio-routing =
		"Line Out",		"LLOUT",
		"Line Out",		"RLOUT",
		"LINE1L",		"Line In",
		"LINE1R",		"Line In";
	clocks = <&mcasp0_fck>;
	clock-names = "mclk";
	status = "okay";
};

/* CAN Busses */
&am33xx_pinmux {
	dcan1_pins: pinmux_dcan1 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x968, PIN_OUTPUT_PULLUP | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
			AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
		>;
	};
};

&dcan1 {
	pinctrl-names = "default";
	pinctrl-0 = <&dcan1_pins>;
	status = "okay";
};

/* Ethernet */
&am33xx_pinmux {
	ethernet1_pins: pinmux_ethernet1 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE1)		/* gpmc_a0.mii2_txen */
			AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_a1.mii2_rxdv */
			AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE1)		/* gpmc_a2.mii2_txd3 */
			AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE1)		/* gpmc_a3.mii2_txd2 */
			AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE1)		/* gpmc_a4.mii2_txd1 */
			AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE1)		/* gpmc_a5.mii2_txd0 */
			AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_a6.mii2_txclk */
			AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_a7.mii2_rxclk */
			AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_a8.mii2_rxd3 */
			AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_a9.mii2_rxd2 */
			AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_a10.mii2_rxd1 */
			AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_a11.mii2_rxd0 */
			AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_wpn.mii2_rxerr */
			AM33XX_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE1)	/* gpmc_ben1.mii2_col */
		>;
	};
};

&cpsw_emac1 {
	phy_id = <&davinci_mdio>, <1>;
	phy-mode = "mii";
	dual_emac_res_vlan = <2>;
};

&mac {
	slaves = <2>;
	pinctrl-names = "default";
	pinctrl-0 = <&ethernet0_pins &ethernet1_pins>;
	dual_emac = <1>;
};

/* MMC */
&am33xx_pinmux {
	mmc1_pins: pinmux_mmc1 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat3.mmc0_dat3 */
			AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat2.mmc0_dat2 */
			AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat1.mmc0_dat1 */
			AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat0.mmc0_dat0 */
			AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_clk.mmc0_clk */
			AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_cmd.mmc0_cmd */
			AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE7)	/* spi0_cs1.mmc0_sdcd */
		>;
	};
};

&mmc1 {
	vmmc-supply = <&vcc3v3>;
	bus-width = <4>;
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins>;
	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
	status = "okay";
};

/* Power */
&vdig1_reg {
	regulator-boot-on;
	regulator-always-on;
};

/* UARTs */
&am33xx_pinmux {
	uart0_pins: pinmux_uart0 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
			AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
		>;
	};

	uart1_pins: pinmux_uart1_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart1_rxd.uart1_rxd */
			AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart1_txd.uart1_txd */
			AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0)		/* uart1_ctsn.uart1_ctsn */
			AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart1_rtsn.uart1_rtsn */
		>;
	};
};

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

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart1_pins>;
	status = "okay";
};

/* USB */
&cppi41dma {
	status = "okay";
};

&usb_ctrl_mod {
	status = "okay";
};

&usb {
	status = "okay";
};

&usb0 {
	dr_mode = "peripheral";
	status = "okay";
};

&usb0_phy {
	status = "okay";
};

&usb1 {
	dr_mode = "host";
	status = "okay";
};

&usb1_phy {
	status = "okay";
};
 
Old 01-14-2018, 08:53 AM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,665

Rep: Reputation: Disabled
Code:
unknown-block(179,2)
This tells us your kernel is looking for second partition on MMC block device to mount it as root. So the first condition is met, it can access the device (otherwise it would complain about 0,0).
Next is the partition table. Can your kernel read the partition table in use on this MMC device?
 
Old 01-15-2018, 01:19 AM   #11
rocq
Member
 
Registered: Jan 2013
Location: Netherlands
Distribution: XUbuntu
Posts: 57

Rep: Reputation: Disabled
Code:
&am33xx_pinmux {
	mmc1_pins: pinmux_mmc1 {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat3.mmc0_dat3 */
			AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat2.mmc0_dat2 */
			AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat1.mmc0_dat1 */
			AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat0.mmc0_dat0 */
			AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_clk.mmc0_clk */
			AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_cmd.mmc0_cmd */
			AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE7)	/* spi0_cs1.mmc0_sdcd */
		>;
	};
};

&mmc1 {
	vmmc-supply = <&vcc3v3>;
	bus-width = <4>;
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins>;
	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
	status = "okay";
};
I don't trust the settings for the card detect line, marked in bold. With these setting you're telling the driver that the SD card is present when the line is high. Meanwhile also the internal pull-up of that same line is enabled. So, depending on external circuitry, the line is pulled high anyway... with our without an SD card.

This may not fix your problem, since the driver was able to detect the SD card containing the two partitions, but I would double-check these settings with your hardware first before continuing.

Quote:
barebox@Phytec phyCORE AM335x:/ mount /dev/mmc0.1 /mnt
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 32
barebox@Phytec phyCORE AM335x:/ lsls /mnt
. .. lost+found
Again, double-check the contents on the SD card since barebox was able to mount the partition, but it reported an empty file system.

If you verified the above, try enabling support for all ext file systems:
Code:
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_EXT4_FS=y
#CONFIG_EXT4_USE_FOR_EXT2 is not set
CONFIG_EXT4_DEBUG=y  <-- May give us more info...

Last edited by rocq; 01-15-2018 at 01:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel panic cannot open root device "0" ??? M$ISBS Slackware 12 12-24-2008 06:40 PM
Kernel Panic on boot - VFS cannot open root device JenovaProject Linux From Scratch 3 02-29-2008 12:32 AM
For one who suffering Kernel Panic VFS: cannot open root device Raynus Linux - General 0 04-10-2007 03:59 AM
Kernel Panic - VFS unable to open root device JcB Slackware 17 10-30-2004 11:27 AM
Kernel Panic:VFS: Cannot open root device "hda3" or 00:10 shivendnrab Linux - General 1 07-01-2004 03:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration