Linux-4.9.40 NO MTD partitions on qspi sama5d27

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

queifaro
Posts: 14
Joined: Fri Dec 20, 2013 11:19 am

Linux-4.9.40 NO MTD partitions on qspi sama5d27

Thu Feb 08, 2018 3:15 pm

Hi all,

i need to reach the following target using sama5d27 board qspi flash

at91bootstrap (i'm using 3.8.8)
kernel 4.9.40 dtb
kernel 4.9.40 zImage
minimal rootfs jffs2

i'm using gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4 toolchain

in kernel config:
atmel qspi support enable
mtd support enable, command line parsing, kernel parameters from bootloader:
mem=256M console=ttyS0,115200 root=/dev/mtdblock3 mtdparts=atmel_qspiflash:12k(bootstrap)ro,23k(dtb),4M(linux),5M(rootfs),-(data) rootfstype=jffs2

sam-ba flashing config :

onConnectionOpened: {
// initialize QSPI applet
initializeApplet("qspiflash")

print("Erasing Memory")
// erase all memory
applet.erase(0, applet.memorySize)

print("Writing at91bootstrap")
applet.write(0x00000, "at91bootstrap.bin")

print("Writing dtb")
applet.write(0x8400, "acme-roadrunner-bertad2.dtb")

print("Writing zImage")
applet.write(0x40000, "zImage")

print("Writing rootfs")
applet.write(0x0428000, "rootfs.jffs2")

// initialize boot config applet
initializeApplet("bootconfig")

...

at91 start
kernel start

but seams that no mtdpartition are created:

the following is a compleate log ....

Some suggestion ?
Thanks
B/R
Fabio

AT91Bootstrap 3.8.8-00033-ge63c7c2-dirty (gio 8 feb 2018, 13.41.41, CET)

SF: Got Manufacturer and Device ID: 20ba18
SF: dt blob: Copy 0x59af bytes from 0x8400 to 0x21000000
SF: Copy 0x3bf568 bytes from 0x40000 to 0x22000000

Booting zImage ......

Using device tree in place at 0x21000000

Starting linux kernel ..., machid: 0xffffffff

Booting Linux on physical CPU 0x0
Linux version 4.9.40+ (root@osboxes) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #3 Thu Feb 8 13:50:18 CET 2018
CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Acme Systems RoadRunner
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: mem=256M console=ttyS0,115200 root=/dev/mtdblock3 mtdparts=atmel_qspiflash:12k(bootstrap)ro,23k(dtb),4M(linux),5M(rootfs),-(data) rootfstype=jffs2
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 250140K/262144K available (6144K kernel code, 209K rwdata, 1476K rodata, 1024K init, 151K bss, 12004K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc0700000 (7136 kB)
.init : 0xc0900000 - 0xc0a00000 (1024 kB)
.data : 0xc0a00000 - 0xc0a344e0 ( 210 kB)
.bss : 0xc0a344e0 - 0xc0a5a1f8 ( 152 kB)
NR_IRQS:16 nr_irqs:16 16
L2C-310 ID prefetch enabled, offset 2 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 128 kB
L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x36020000
clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 11513617062 ns
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Console: colour dummy device 80x30
Calibrating delay loop... 329.31 BogoMIPS (lpj=1646592)
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 0x20100000 - 0x20100058
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
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
AT91: Detected SoC family: sama5d2
AT91: Detected SoC: sama5d27, revision 1
No ATAGs?
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 184217874325 ns
at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xd085b000
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Linux video capture interface: v2.00
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource tcb_clksrc
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
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=30 max_order=16 bucket_order=0
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
pinctrl-at91-pio4 fc038000.pinctrl: atmel pinctrl initialized
f8020000.serial: ttyS0 at MMIO 0xf8020000 (irq = 31, base_baud = 5187500) is a ATMEL_SERIAL
console [ttyS0] enabled
[drm] Initialized
brd: module loaded
loop: module loaded
libphy: Fixed MDIO Bus: probed
CAN device driver interface
macb f8008000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
macb f8008000.ethernet (unnamed net_device) (uninitialized): no PHY found
usbcore: registered new interface driver rtl8xxxu
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
atmel-ehci 500000.ehci: EHCI Host Controller
atmel-ehci 500000.ehci: new USB bus registered, assigned bus number 1
atmel-ehci 500000.ehci: irq 19, io mem 0x00500000
atmel-ehci 500000.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 4.9.40+ ehci_hcd
usb usb1: SerialNumber: 500000.ehci
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-atmel: OHCI Atmel driver
at91_ohci 400000.ohci: USB Host Controller
at91_ohci 400000.ohci: new USB bus registered, assigned bus number 2
at91_ohci 400000.ohci: irq 19, io mem 0x00400000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: USB Host Controller
usb usb2: Manufacturer: Linux 4.9.40+ ohci_hcd
usb usb2: SerialNumber: at91
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver cdc_wdm
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
atmel_usba_udc 300000.gadget: MMIO registers at 0xfc02c000 mapped at d0a05000
atmel_usba_udc 300000.gadget: FIFO at 0x00300000 mapped at d0d00000
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
rtc rtc0: alarm rollover not handled
rtc rtc0: invalid alarm value: 1900-1-1 2:33:54
at91_rtc f80480b0.rtc: rtc core: registered f80480b0.rtc as rtc0
at91_rtc f80480b0.rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
AT91: Starting after user reset
sama5d4_wdt f8048040.watchdog: initialized (timeout = 16 sec, nowayout = 0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-at91 b0000000.sdio-host: update clk mul to 39 as gck rate is 480000000 Hz
mmc0: SDHCI controller on b0000000.sdio-host [b0000000.sdio-host] using ADMA
atmel_aes f002c000.aes: version: 0x500
atmel_aes f002c000.aes: Atmel AES - Using dma0chan0, dma0chan1 for DMA transfers
atmel_sha f0028000.sha: version: 0x510
atmel_sha f0028000.sha: using dma0chan2 for DMA transfers
atmel_sha f0028000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512
atmel_tdes fc044000.tdes: version: 0x703
atmel_tdes fc044000.tdes: using dma0chan3, dma0chan4 for DMA transfers
atmel_tdes fc044000.tdes: Atmel DES/TDES
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20161123 t)
can: netlink gateway (rev 20130117) max_hops=1
at91_rtc f80480b0.rtc: setting system clock to 2012-01-14 01:52:26 UTC (1326505946)
ALSA device list:
No soundcards found.
g_serial gadget: high-speed config #2: CDC ACM config
List of all partitions:
0100 8192 ram0 (driver?)
0101 8192 ram1 (driver?)
0102 8192 ram2 (driver?)
0103 8192 ram3 (driver?)
No filesystem could mount root, tried: jffs2

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.40+ #3
Hardware name: Atmel SAMA5
[<c010cd78>] (unwind_backtrace) from [<c010a7d4>] (show_stack+0x10/0x14)
[<c010a7d4>] (show_stack) from [<c0168750>] (panic+0xc8/0x248)
[<c0168750>] (panic) from [<c0901278>] (mount_block_root+0x254/0x298)
[<c0901278>] (mount_block_root) from [<c09014cc>] (mount_root+0x124/0x12c)
[<c09014cc>] (mount_root) from [<c0901650>] (prepare_namespace+0x17c/0x1c4)
[<c0901650>] (prepare_namespace) from [<c0900df4>] (kernel_init_freeable+0x1ac/0x1bc)
[<c0900df4>] (kernel_init_freeable) from [<c0674064>] (kernel_init+0x8/0x110)
[<c0674064>] (kernel_init) from [<c0107558>] (ret_from_fork+0x14/0x3c)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
random: fast init done
random: crng init done
blue_z
Location: USA
Posts: 1713
Joined: Thu Apr 19, 2007 10:15 pm

Re: Linux-4.9.40 NO MTD partitions on qspi sama5d27

Thu Feb 08, 2018 11:17 pm

queifaro wrote:i need to reach the following target using sama5d27 board qspi flash
...
but seams [sic] that no mtdpartition are created:
So you're using some mystery board and a mystery .dtb.
You don't differentiate between "creating" MTD partitions versus "finding" them.
IOW your descriptions of this situation are inaccurate.

No MTD partitions are reported during the boot of your mystery board simply because no MTD hardware was detected/installed.
An MTD, e.g. the QSPI flash chip, requires that its driver (as well as any parent device, i.e. the QSPI controller) to be installed and the chip to be probed before any MTD partitions can be reported.

For a WAG your Device Tree is suspect.

Regards

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests