Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Linux/LINUXSDK-OMAPL138: rootfs on NAND

$
0
0

Part Number:LINUXSDK-OMAPL138

Tool/software: Linux

I'm using OMAPL138 LCDK (TMDSLCDK138), PROCESSOR-SDK-LINUX-OMAPL138 04_01_00_06.

My goal is to place all u-boot, kernel, rootfs, dtb in NAND flash.

I'm successfully wrote u-boot and kernel to NAND. Now I can boot up Linux using boot from NAND (u-boot, kernel on NAND; rootfs on SD). 

I'm also rebuilt kernel to using mtd and jffs2.

I'm successfully wrote jffs2 image to NAND partition from target Linux environment (booted up from SD). That NAND partition successfully mounts and I can see rootfs content.

When I trying manually boot up system using NAND rootfs partition boot process aborts on message: 

...
No filesystem could mount root, tried: jffs2 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

U-boot environment:

args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
boot_fdt=yes
boot_fit=0
bootcmd=run envboot; run mmcboot; 
bootdelay=3
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyS2,115200n8
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run import
bootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi;
ethact=DaVinci-EMAC
fdtaddr=0xc0600000
fdtfile=da850-lcdk.dtb
finduuid=part uuid mmc ${bootpart} uuid
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
loadaddr=0xc0700000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test ${boot_fit} -eq 1; then run loadfit; else r
un mmcloados;fi;fi;fi;
mmcdev=0
mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot lo
ad the DT; fi; fi; else bootz; fi;
mmcrootfstype=ext4 rootwait
mtddevname=u-boot env
mtddevnum=0
mtdids=nand0=nand512
mtdparts=mtdparts=nand512:0x20000(u-boot env),0x80000(u-boot),0x500000(kernel),0x1FA60000(rootfs)
nand_erasesize=20000
nand_oobsize=40
nand_writesize=800
partition=nand0,0
scriptaddr=0xc0600000
stderr=serial
stdin=serial
stdout=serial
ver=U-Boot 2017.01-g590c7d7fe1 (Sep 26 2017 - 18:58:02 -0400)

Environment size: 2078/65532 bytes

How I'm trying to boot up: (rootwait also tried)

nand read ${loadaddr} kernel
load mmc 0:2 ${fdtaddr} /boot/da850-lcdk.dtb
setenv bootargs console=${console} root=/dev/mtdblock3 rw rootfstype=jffs2 mtdparts=davinci-nand.0:128k(u-boot_env),512k(u-boot),5m(kernel),-(rootfs)
bootz ${loadaddr} - ${fdtaddr}

Boot log: 

=> load mmc 0:2 ${loadaddr} /boot/zImage
2550968 bytes read in 2926 ms (850.6 KiB/s)
=> load mmc 0:2 ${fdtaddr} /boot/devicetree-zImage-da850-lcdk.dtb
13361 bytes read in 53 ms (246.1 KiB/s)
=> setenv bootargs console=${console} root=/dev/mtdblock3 rw rootfstype=jffs2 mtdparts=davinci-nand.0:128k(u-boot_env),512k(u-boot),5m(kernel),-(rootfs)
=> bootz ${loadaddr} - ${fdtaddr}
## Flattened Device Tree blob at c0600000
   Booting using the fdt blob at 0xc0600000
   Loading Device Tree to c7e21000, end c7e27430 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.9.41-ge3a80a1c5c (user@user-VM) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 PREEMPT Sun Nov 19 17:23:53 +06 2017
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
CPU: VIVT data cache, VIVT instruction cache
OF: fdt:Machine model: DA850/AM1808/OMAP-L138 LCDK
Reserved memory: created CMA memory pool at 0xc3000000, size 16 MiB
OF: reserved mem: initialized node dsp_cma@c3000000, compatible id shared-dma-pool
cma: Reserved 16 MiB at 0xc6c00000
Memory policy: Data cache writethrough
DaVinci da850/omap-l138/am18x variant 0x1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32480
Kernel command line: console=ttyS2,115200n8 root=/dev/mtdblock3 rw rootfstype=jffs2 mtdparts=davinci-nand.0:128k(u-boot_env),512k(u-boot),5m(kernel),-(rootfs)
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 89660K/131072K available (4906K kernel code, 319K rwdata, 1560K rodata, 232K init, 166K bss, 8644K reserved, 32768K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04d2f80   (4908 kB)
      .init : 0xc065a000 - 0xc0694000   ( 232 kB)
      .data : 0xc0694000 - 0xc06e3db0   ( 320 kB)
       .bss : 0xc06e3db0 - 0xc070d5c8   ( 167 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        Build-time adjustment of leaf fanout to 32.
NR_IRQS:245
clocksource: timer0_1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Console: colour dummy device 80x30
Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0008400 - 0xc0008458
devtmpfs: initialized
VFP support v0.3: not present
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
mux: initialized RTC_ALARM
mux: Setting register RTC_ALARM
mux:    PINMUX0 (0x00000000) = 0x44080000 -> 0x24080000
No ATAGs?
edma 1c00000.edma: memcpy is disabled
edma 1c00000.edma: TI EDMA DMA engine driver
edma 1e30000.edma: memcpy is disabled
edma 1e30000.edma: TI EDMA DMA engine driver
i2c_davinci i2c_davinci.1: could not find pctldev for node /soc@1c00000/pinmux@14120/pinmux_i2c0_pins, deferring probe
clocksource: Switched to clocksource timer0_1
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=14 max_order=15 bucket_order=1
jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler noop registered (default)
pinctrl-single 1c14120.pinmux: 160 pins at pa fec14120 size 80
Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
console [ttyS2] disabled
serial8250.2: ttyS2 at MMIO 0x1d0d000 (irq = 61, base_baud = 8250000) is a TI DA8xx/66AK2x
console [ttyS2] enabled
brd: module loaded
libphy: Fixed MDIO Bus: probed
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: no live phy, scanning all
davinci_mdio: probe of davinci_mdio.0 failed with error -5
i2c /dev entries driver
davinci_mmc da830-mmc.0: Got CD GPIO
davinci_mmc da830-mmc.0: Using DMA, 4-bit mode
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
davinci_emac davinci_emac.1: incompatible machine/device type for reading mac address
davinci_emac davinci_emac.1: using random MAC addr: 5e:8e:c8:d3:26:ff
mmc0: host does not support reading read-only switch, assuming write-enable
input: gpio-keys as /devices/platform/gpio-keys/input/input0
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD8GB 7.42 GiB 
 mmcblk0: p1 p2
hctosys: unable to open rtc device (rtc0)
List of all partitions:
0100           32768 ram0  (driver?)
b300         7782400 mmcblk0  driver: mmcblk
  b301           71680 mmcblk0p1 794be9e4-01
  b302         7693312 mmcblk0p2 794be9e4-02
No filesystem could mount root, tried:  jffs2

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
random: fast init done

Thanks


Viewing all articles
Browse latest Browse all 17527

Trending Articles