Hi,
I am trying to boot Linux kernel version 4.4.16 on custom ARM based development platform.
I want to separate rootfs and kernel Image so that the size of my uImage is small. I followed the following steps.
1. Partitioned the SD card. It has 2 partition. First partition is formatted as vfat partition and has uImage (without rootfs). Second partition is formatted as ext3 and has the rootfs.
2. I then changed the U-Boot (version 2011.05) bootargs
Kernel command line: console=ttyS0,115200 noinitrd rw rootfstype=ext3 root=/dev/mmcblk0p2 rootwait mem=512M coherent_pool=4M no_console_suspend resume=/dev/mtdblock3.
However, while booting I get the following error
Failed to create /dev/root: -2
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -2
I have also attached log for reference.
Can anyone please point out what I may be missing?
Regards,
Amit.
Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 4.4.16-svn125 (amitm@buildserver-90) (gcc version 4.8.3 20140320 (prerelease) (GCC) ) #6 SMP PREEMPT Wed Nov 30 15:09:22 IST 2016 [ 0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=18c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine: OPV5XC-CA9MP [ 0.000000] cma: Reserved 32 MiB at 0x1e000000 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] PERCPU: Embedded 12 pages/cpu @9dbbd000 s18496 r8192 d22464 u49152 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 [ 0.000000] Kernel command line: console=ttyS0,115200 noinitrd rw rootfstype=ext3 root=/dev/mmcblk0p2 rootwait mem=512M coherent_pool=4M no_console_suspend resume=/dev/mtdblock3 [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Memory: 476628K/524288K available (5704K kernel code, 355K rwdata, 1804K rodata, 1976K init, 282K bss, 14892K reserved, 32768K 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 : 0xa0800000 - 0xff800000 (1520 MB) [ 0.000000] lowmem : 0x80000000 - 0xa0000000 ( 512 MB) [ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB) [ 0.000000] .text : 0x80008000 - 0x8075d398 (7509 kB) [ 0.000000] .init : 0x8075e000 - 0x8094c000 (1976 kB) [ 0.000000] .data : 0x8094c000 - 0x809a4c60 ( 356 kB) [ 0.000000] .bss : 0x809a4c60 - 0x809eb76c ( 283 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=3, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU debugfs-based tracing is enabled. [ 0.000000] Build-time adjustment of leaf fanout to 32. [ 0.000000] NR_IRQS:264 [ 0.000000] smp_twd: clock not found -2 [ 0.000000] twd_local_timer registered. [ 0.000012] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns [ 0.000032] clocksource: timer2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns [ 0.000053] opv5xc_timer_init OK. [ 0.000162] Console: colour dummy device 80x30 [ 0.000196] Calibrating local timer... 199.90MHz. [ 0.060091] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816) [ 0.150080] pid_max: default: 32768 minimum: 301 [ 0.150197] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.150214] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.150946] CPU: Testing write buffer coherency: ok [ 0.151278] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.151344] opv5xc_secondary_startup @ 0x56c544 [ 0.151367] see 0x56c544 [ 0.151450] Setting up static identity map for 0x8280 - 0x82d8 [ 0.230641] CPU1: Booted secondary processor [ 0.269999] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.300599] CPU2: Booted secondary processor [ 0.339965] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.340128] Brought up 3 CPUs [ 0.340167] SMP: Total of 3 processors activated (4782.48 BogoMIPS). [ 0.340182] CPU: All CPU(s) started in SVC mode. [ 0.341887] devtmpfs: initialized [ 0.355711] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 0.357002] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.361766] NET: Registered protocol family 16 [ 0.370148] DMA: preallocated 4096 KiB pool for atomic coherent allocations [ 0.399992] cpuidle: using governor ladder [ 0.429973] cpuidle: using governor menu [ 0.541852] L2C: DT/platform modifies aux control register: 0x02030000 -> 0x02430000 [ 0.541875] L2C-310 enabling early BRESP for Cortex-A9 [ 0.541891] L2C-310 full line of zeros enabled for Cortex-A9 [ 0.541912] L2C-310 dynamic clock gating enabled, standby mode enabled [ 0.541934] L2C-310 cache controller enabled, 16 ways, 256 kB [ 0.541949] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x46430001 [ 0.542007] Hibernate Interrupt registration passed [ 0.542054] EXT2 Interrupt registration passed [ 0.542112] 0OPV5XC Power Management [ 0.543797] access_base[0][0] = 0xa0880000 [ 0.543817] access_base[0][1] = 0xa0d00000 [ 0.543832] access_base[0][2] = 0xa1d80000 [ 0.543846] access_base[1][0] = 0xa2600000 [ 0.543860] access_base[1][1] = 0xa2a80000 [ 0.543874] access_base[1][2] = 0xa3b00000 [ 0.543886] Before opv5xc_hw_init [ 0.543899] PCIe: HW init. [ 0.770032] PCIe: port 0: Check data link layer... [ 1.069372] PCIe: port 0: Enable PCIe LTSSM [ 1.569362] Device not found. [ 1.569378] PCIe: port 0: link down, ignoring [ 1.569420] PCIe: port 1: Check data link layer... [ 1.868742] PCIe: port 1: Enable PCIe LTSSM [ 2.368968] Device not found. [ 2.368983] PCIe: port 1: link down, ignoring [ 2.369016] Before opv5xc_proc_init [ 2.369049] return from opv5xc_proc_init [ 2.411839] vgaarb: loaded [ 2.412811] SCSI subsystem initialized [ 2.413438] usbcore: registered new interface driver usbfs [ 2.413595] usbcore: registered new interface driver hub [ 2.413803] usbcore: registered new device driver usb [ 2.414134] pps_core: LinuxPPS API ver. 1 registered [ 2.414150] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@xxxxxxxx> [ 2.415046] Advanced Linux Sound Architecture Driver Initialized. [ 2.416922] clocksource: Switched to clocksource timer2 [ 2.444890] NET: Registered protocol family 2 [ 2.446166] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 2.446241] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) [ 2.446315] TCP: Hash tables configured (established 4096 bind 4096) [ 2.446414] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 2.446455] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 2.446888] NET: Registered protocol family 1 [ 2.447814] RPC: Registered named UNIX socket transport module. [ 2.447830] RPC: Registered udp transport module. [ 2.447841] RPC: Registered tcp transport module. [ 2.447851] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 2.627061] futex hash table entries: 1024 (order: 4, 65536 bytes) [ 2.654392] Installing knfsd (copyright (C) 1996 okir@xxxxxxxxxxxx). [ 2.654760] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 2.675860] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [ 2.675899] io scheduler noop registered (default) [ 2.681509] dma-pl330 dma-pl330: Loaded driver for PL330 DMAC-41330 [ 2.681530] dma-pl330 dma-pl330: DBUFF-128x8bytes Num_Chans-8 Num_Peri-17 Num_Events-16 [ 2.687412] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled [ 2.708295] console [ttyS0] disabled [ 2.708457] serial8250.0: ttyS0 at MMIO 0xf8800000 (irq = 46, base_baud = 115200) is a 16550A [ 3.361035] console [ttyS0] enabled [ 3.366013] serial8250.0: ttyS1 at MMIO 0xf8900000 (irq = 47, base_baud = 115200) is a 16550A [ 3.375936] serial8250.0: ttyS2 at MMIO 0xf8a00000 (irq = 48, base_baud = 115200) is a 16550A [ 3.390714] loop: module loaded [ 3.397110] denali_nand denali_nand: Dump timing register values:acc_clks: 4, re_2_we: 20, re_2_re: 20 [ 3.397110] we_2_re: 12, addr_2_data: 14, rdwr_en_lo_cnt: 2 [ 3.397110] rdwr_en_hi_cnt: 2, cs_setup_cnt: 2 [ 3.492148] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x68 [ 3.498528] nand: Micron MT29F64G08AFAAAWP [ 3.502631] nand: 4096 MiB, SLC, erase size: 1024 KiB, page size: 8192, OOB size: 448 [ 3.535206] nand: 2 chips detected [ 3.538686] found the ecc level(8) @byte-112 [ 3.543068] nand: WARNING: denali-nand: the ECC used on your system is too weak compared to the one required by the NAND chip [ 3.556712] Bad block table found at page 524160, version 0x01 [ 3.562581] Bad block table found at page 1048448, version 0x01 [ 3.572640] Bad block table found at page 524032, version 0x01 [ 3.578499] Bad block table found at page 1048320, version 0x01 [ 3.596967] spi-opv5xc spi-opv5xc.1: SPI controller in polling mode [ 3.603923] spi-opv5xc spi-opv5xc.1: registered master spi1 [ 3.610413] m25p80 spi1.0: found n25q064, expected m25p80 [ 3.615822] m25p80 spi1.0: n25q064 (8192 Kbytes) [ 3.620841] Creating 3 MTD partitions on "m25p80": [ 3.625648] 0x000000000000-0x000000080000 : "uboot" [ 3.633229] 0x000000080000-0x000000090000 : "ubootenv" [ 3.640966] 0x000000090000-0x000000800000 : "uimage" [ 3.649128] spi-opv5xc spi-opv5xc.1: at 0xF8600000 mapped to 0xa0c98000, irq=38 [ 3.656693] tun: Universal TUN/TAP device driver, 1.6 [ 3.661798] tun: (C) 1999-2004 Max Krasnyansky <maxk@xxxxxxxxxxxx> [ 3.668476] PPP generic driver version 2.4.2 [ 3.673191] NET: Registered protocol family 24 [ 3.677746] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256). [ 3.687011] opv5xc-xhci opv5xc-xhci.0: OPV5XC xHCI Host Controller [ 3.693250] opv5xc-xhci opv5xc-xhci.0: new USB bus registered, assigned bus number 1 [ 3.701911] opv5xc-xhci opv5xc-xhci.0: hcc params 0x0220f06c hci version 0x100 quirks 0x00010010 [ 3.710775] opv5xc-xhci opv5xc-xhci.0: irq 56, io mem 0xc5000000 [ 3.717247] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 3.724044] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 3.731294] usb usb1: Product: OPV5XC xHCI Host Controller [ 3.736784] usb usb1: Manufacturer: Linux 4.4.16-svn125 opv5xc-xhci-hcd [ 3.743419] usb usb1: SerialNumber: opv5xc-xhci.0 [ 3.749759] hub 1-0:1.0: USB hub found [ 3.753589] hub 1-0:1.0: 1 port detected [ 3.758575] opv5xc-xhci opv5xc-xhci.0: OPV5XC xHCI Host Controller [ 3.764781] opv5xc-xhci opv5xc-xhci.0: new USB bus registered, assigned bus number 2 [ 3.772749] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 3.781204] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003 [ 3.788027] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 3.795253] usb usb2: Product: OPV5XC xHCI Host Controller [ 3.800764] usb usb2: Manufacturer: Linux 4.4.16-svn125 opv5xc-xhci-hcd [ 3.807402] usb usb2: SerialNumber: opv5xc-xhci.0 [ 3.813660] hub 2-0:1.0: USB hub found [ 3.817512] hub 2-0:1.0: 1 port detected [ 3.822791] usbcore: registered new interface driver uas [ 3.828390] usbcore: registered new interface driver usb-storage [ 3.834669] usbcore: registered new interface driver usbserial [ 3.840640] usbcore: registered new interface driver usbserial_generic [ 3.847290] usbserial: USB Serial support registered for generic [ 3.853426] usbcore: registered new interface driver cp210x [ 3.859350] usbserial: USB Serial support registered for cp210x [ 3.865438] usbcore: registered new interface driver pl2303 [ 3.871129] usbserial: USB Serial support registered for pl2303 [ 3.877640] mousedev: PS/2 mouse device common for all mice [ 3.883965] OPV5XC Real Time Clock, (c) 2013 Open-Silicon [ 3.897544] opv5xc-rtc opv5xc-rtc: rtc core: registered opv5xc-rtc as rtc0 [ 3.904761] i2c /dev entries driver [ 3.909978] i2c i2c-0: Failed to register i2c client tlv320aic23 at 0x1a (-16) [ 3.917539] i2c i2c-0: Can't create device at 0x1a [ 3.924376] tps65910 1-002d: No interrupt support, no core IRQ [ 3.946322] Adding supply = cpu to regulator_map_list [ 3.956059] vdd2: Voltage range but no REGULATOR_CHANGE_VOLTAGE [ 3.962011] Adding supply = dram to regulator_map_list [ 4.002325] Adding supply = sd_vdd to regulator_map_list [ 4.008743] cpufreq for OPV5XC started [ 4.012507] cpufreq: cpufreq_online: bringing CPU0 online [ 4.018086] cpufreq: Found cpu_vdd1 regulator [ 4.022447] opv5xc-cpufreq : Available frequencies: [ 4.027348] 100 Mhz [ 4.029624] 200 Mhz [ 4.031897] 300 Mhz [ 4.034170] 400 Mhz [ 4.036443] 500 Mhz [ 4.038734] 600 Mhz [ 4.041010] 700 Mhz [ 4.043283] 800 Mhz [ 4.045556] 900 Mhz [ 4.047847] 1000 Mhz [ 4.050454] cpufreq: setting new policy for CPU 0: 100 - 1000 kHz [ 4.056552] cpufreq: new min and max freqs are 100 - 1000 kHz [ 4.062320] cpufreq: governor switch [ 4.065901] cpufreq: governor: change or update limits [ 4.071064] cpufreq: cpufreq_online: bringing CPU1 online [ 4.076468] cpufreq: cpufreq_online: bringing CPU2 online [ 4.082096] Synopsys Designware Multimedia Card Interface Driver [ 4.597431] dw_mmc dw_mmc.0: IDMAC supports 32-bit address mode. [ 4.603600] dw_mmc dw_mmc.0: Using internal DMA controller. [ 4.609210] dw_mmc dw_mmc.0: Version ID is 250a [ 4.614032] dw_mmc dw_mmc.0: DW MMC controller at irq 86,32 bit host data width,512 deep fifo [ 4.623095] The SD voltage is 3300000 [ 4.687087] dw_mmc dw_mmc.0: 1 slots initialized [ 4.693589] usbcore: registered new interface driver usbhid [ 4.699194] usbhid: USB HID core driver [ 4.704722] Netfilter messages via NETLINK v0.30. [ 4.709507] nfnl_acct: registering with nfnetlink. [ 4.714388] nf_conntrack version 0.5.0 (7959 buckets, 31836 max) [ 4.721553] ctnetlink v0.93: registering with nfnetlink. [ 4.727704] ip_tables: (C) 2000-2006 Netfilter Core Team [ 4.733247] Initializing XFRM netlink socket [ 4.739927] NET: Registered protocol family 10 [ 4.746207] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 4.752104] sit: IPv6 over IPv4 tunneling driver [ 4.759641] NET: Registered protocol family 17 [ 4.764152] NET: Registered protocol family 15 [ 4.768889] Registering SWP/SWPB emulation handler [ 4.777651] opv5xc-rtc opv5xc-rtc: setting system clock to 1970-01-01 00:00:09 UTC (9) [ 4.786842] ALSA device list: [ 4.789848] No soundcards found. [ 4.793371] Warning: unable to open an initial console. [ 4.798781] Waiting for root device /dev/mmcblk0p2... [ 5.866920] dw_mmc dw_mmc.0: Busy; trying anyway [ 5.871974] The SD voltage is 1800000 [ 6.095045] phase:3(0x7f) [ 6.099714] mmc0: new ultra high speed SDR50 SDHC card at address aaaa [ 6.107314] mmcblk0: mmc0:aaaa SS08G 7.40 GiB [ 6.117638] mmcblk0: p1 p2 [ 6.227066] Failed to create /dev/root: -2 [ 6.231224] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -2 [ 6.239181] Please append a correct "root=" boot option; here are the available partitions: [ 6.247570] 1f00 8388608 mtdblock0 (driver?) [ 6.252646] 1f01 512 mtdblock1 (driver?) [ 6.257748] 1f02 64 mtdblock2 (driver?) [ 6.262821] 1f03 7616 mtdblock3 (driver?) [ 6.267915] b300 7761920 mmcblk0 driver: mmcblk [ 6.273246] b301 1048576 mmcblk0p1 00000000-01 [ 6.278605] b302 6712320 mmcblk0p2 00000000-02 [ 6.283937] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) [ 6.292374] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.16-svn125 #6 [ 6.298897] Hardware name: OPV5XC-CA9MP [ 6.302752] [<80018648>] (unwind_backtrace) from [<800134fc>] (show_stack+0x10/0x14) [ 6.310500] [<800134fc>] (show_stack) from [<80276720>] (dump_stack+0x84/0x98) [ 6.317728] [<80276720>] (dump_stack) from [<800ab828>] (panic+0xa0/0x200) [ 6.324611] [<800ab828>] (panic) from [<8075f24c>] (mount_block_root+0x244/0x2d0) [ 6.332100] [<8075f24c>] (mount_block_root) from [<8075f4b0>] (prepare_namespace+0x158/0x1a0) [ 6.340629] [<8075f4b0>] (prepare_namespace) from [<8075eeec>] (kernel_init_freeable+0x278/0x288) [ 6.349507] [<8075eeec>] (kernel_init_freeable) from [<80567abc>] (kernel_init+0x8/0xf0) [ 6.357601] [<80567abc>] (kernel_init) from [<8000f6b8>] (ret_from_fork+0x14/0x3c) [ 6.365171] CPU2: stopping [ 6.367880] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.4.16-svn125 #6 [ 6.374403] Hardware name: OPV5XC-CA9MP [ 6.378249] [<80018648>] (unwind_backtrace) from [<800134fc>] (show_stack+0x10/0x14) [ 6.385995] [<800134fc>] (show_stack) from [<80276720>] (dump_stack+0x84/0x98) [ 6.393219] [<80276720>] (dump_stack) from [<800166c0>] (handle_IPI+0x1ac/0x1c0) [ 6.400618] [<800166c0>] (handle_IPI) from [<800094cc>] (gic_handle_irq+0x88/0x8c) [ 6.408188] [<800094cc>] (gic_handle_irq) from [<80013fd4>] (__irq_svc+0x54/0x90) [ 6.415666] Exception stack(0x9d47bf88 to 0x9d47bfd0) [ 6.420719] bf80: 00000001 00000000 9d47bfe0 8001d8a0 8056d898 00000000 [ 6.428897] bfa0: 00000000 809492e8 8095caac 809462a4 9d47a000 8095cab8 00000001 9d47bfd8 [ 6.437070] bfc0: 80010758 8001075c 60000013 ffffffff [ 6.442125] [<80013fd4>] (__irq_svc) from [<8001075c>] (arch_cpu_idle+0x38/0x3c) [ 6.449536] [<8001075c>] (arch_cpu_idle) from [<8005c7ac>] (cpu_startup_entry+0x1b0/0x26c) [ 6.457802] [<8005c7ac>] (cpu_startup_entry) from [<0000956c>] (0x956c) [ 6.464413] CPU1: stopping [ 6.467123] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.16-svn125 #6 [ 6.473646] Hardware name: OPV5XC-CA9MP [ 6.477491] [<80018648>] (unwind_backtrace) from [<800134fc>] (show_stack+0x10/0x14) [ 6.485237] [<800134fc>] (show_stack) from [<80276720>] (dump_stack+0x84/0x98) [ 6.492461] [<80276720>] (dump_stack) from [<800166c0>] (handle_IPI+0x1ac/0x1c0) [ 6.499858] [<800166c0>] (handle_IPI) from [<800094cc>] (gic_handle_irq+0x88/0x8c) [ 6.507427] [<800094cc>] (gic_handle_irq) from [<80013fd4>] (__irq_svc+0x54/0x90) [ 6.514904] Exception stack(0x9d479f88 to 0x9d479fd0) [ 6.519956] 9f80: 00000001 00000000 9d479fe0 8001d8a0 8056d898 00000000 [ 6.528133] 9fa0: 00000000 809492e8 8095caac 809462a4 9d478000 8095cab8 00000001 9d479fd8 [ 6.536307] 9fc0: 80010758 8001075c 60000013 ffffffff [ 6.541361] [<80013fd4>] (__irq_svc) from [<8001075c>] (arch_cpu_idle+0x38/0x3c) [ 6.548762] [<8001075c>] (arch_cpu_idle) from [<8005c7ac>] (cpu_startup_entry+0x1b0/0x26c) [ 6.557027] [<8005c7ac>] (cpu_startup_entry) from [<0000956c>] (0x956c) [ 6.563643] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies