OpenWrt Forum Archive

Topic: Problem: [x86 build] boot from Compact Flash Card

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

Have problem with public x86 build when booting at x86 board from integrated cf card reader:

boot proces stops 3 times for about 30 seconds at points marked with ***30sec***:

Linux version 2.6.32.10 (nico@desktop-de-nico) (gcc version 4.1.2) #8 Fri Apr 9 04:26:59 CEST 2010
KERNEL supported cpus:
  Intel GenuineIntel
  AMD AuthenticAMD
  NSC Geode by NSC
  Cyrix CyrixInstead
  Centaur CentaurHauls
  Transmeta GenuineTMx86
  Transmeta TransmetaCPU
  UMC UMC UMC UMC
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000006ff0000 (usable)
 BIOS-e820: 0000000006ff0000 - 0000000006ff3000 (ACPI NVS)
 BIOS-e820: 0000000006ff3000 - 0000000007000000 (ACPI data)
 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
DMI 2.3 present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
last_pfn = 0x6ff0 max_arch_pfn = 0x100000
MTRR default type: uncachable
MTRR fixed ranges enabled:
  00000-9FFFF write-back
  A0000-BFFFF uncachable
  C0000-CDFFF write-protect
  CE000-FFFFF uncachable
MTRR variable ranges enabled:
  0 base 000000000 mask FFC000000 write-back
  1 base 004000000 mask FFE000000 write-back
  2 base 006000000 mask FFF000000 write-back
  3 base 0E8000000 mask FFC000000 write-combining
  4 disabled
  5 disabled
  6 disabled
  7 disabled
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
initial memory mapped : 0 - 01800000
init_memory_mapping: 0000000000000000-0000000006ff0000
 0000000000 - 0000400000 page 4k
 0000400000 - 0006c00000 page 2M
 0006c00000 - 0006ff0000 page 4k
kernel direct mapping tables up to 6ff0000 @ 10000-15000
ACPI: RSDP 000f7070 00014 (v00 VIA606)
ACPI: RSDT 06ff3040 00028 (v01 VIA606 AWRDACPI 42302E31 AWRD 00000000)
ACPI: FACP 06ff30c0 00074 (v01 VIA606 AWRDACPI 42302E31 AWRD 00000000)
ACPI: DSDT 06ff3180 0230C (v01 VIA606 AWRDACPI 00001000 MSFT 0100000E)
ACPI: FACS 06ff0000 00040
111MB LOWMEM available.
  mapped low ram: 0 - 06ff0000
  low ram: 0 - 06ff0000
  node 0 low ram: 00000000 - 06ff0000
  node 0 bootmap 00011000 - 00011e00
(6 early reservations) ==> bootmem [0000000000 - 0006ff0000]
  #0 [0000000000 - 0000001000]   BIOS data page ==> [0000000000 - 0000001000]
  #1 [0001000000 - 00013481c0]    TEXT DATA BSS ==> [0001000000 - 00013481c0]
  #2 [000009fc00 - 0000100000]    BIOS reserved ==> [000009fc00 - 0000100000]
  #3 [0001349000 - 000134f086]              BRK ==> [0001349000 - 000134f086]
  #4 [0000010000 - 0000011000]          PGTABLE ==> [0000010000 - 0000011000]
  #5 [0000011000 - 0000012000]          BOOTMAP ==> [0000011000 - 0000012000]
Zone PFN ranges:
  DMA      0x00000010 -> 0x00001000
  Normal   0x00001000 -> 0x00006ff0
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
    0: 0x00000010 -> 0x0000009f
    0: 0x00000100 -> 0x00006ff0
On node 0 totalpages: 28543
free_area_init_node: node 0, pgdat c12dc380, node_mem_map c1350200
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 3951 pages, LIFO batch:0
  Normal zone: 192 pages used for memmap
  Normal zone: 24368 pages, LIFO batch:3
Using APIC driver default
ACPI: PM-Timer IO Port: 0x4008
No local APIC present or hardware disabled
APIC: disable apic facility
nr_irqs_gsi: 16
Allocating PCI resources starting at 7000000 (gap: 7000000:f7c00000)
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 28319
Kernel command line: block2mtd.block2mtd=/dev/sda2,65536,rootfs root=/dev/mtdblock0 rootfstype=squashfs rootwait console=tty0 console=ttyS0,38400n8 noinitrd reboot=bios
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)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
Memory: 109708k/114624k available (2190k kernel code, 4396k reserved, 749k data, 292k init, 0k highmem)
virtual kernel memory layout:
    fixmap  : 0xfffa3000 - 0xfffff000   ( 368 kB)
    vmalloc : 0xc77f0000 - 0xfffa1000   ( 903 MB)
    lowmem  : 0xc0000000 - 0xc6ff0000   ( 111 MB)
      .init : 0xc12e0000 - 0xc1329000   ( 292 kB)
      .data : 0xc1223b79 - 0xc12df020   ( 749 kB)
      .text : 0xc1000000 - 0xc1223b79   (2190 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:288
CPU 0 irqstacks, hard=c12b3000 soft=c12b4000
Console: colour VGA+ 80x25
console [tty0] enabled
console [ttyS0] enabled
Fast TSC calibration using PIT
Detected 797.971 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 1595.94 BogoMIPS (lpj=7979710)
Mount-cache hash table entries: 512
CPU: L1 I Cache: 64K (32 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 64K (32 bytes/line)
CPU: Centaur VIA Nehemiah stepping 0a
Checking 'hlt' instruction... OK.
ACPI: Core revision 20090903
ACPI: setting ELCR to 0200 (from 0e28)
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: PCI BIOS revision 2.10 entry at 0xfaa40, last bus=1
PCI: Using configuration type 1 for base access
bio: create slab <bio-0> at 0
ACPI: EC: Look up EC in DSDT
ACPI: Interpreter enabled
ACPI: (supports S0 S5)
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
pci 0000:00:00.0: reg 10 32bit mmio pref: [0xe8000000-0xebffffff]
pci 0000:00:01.0: supports D1
pci 0000:00:07.1: reg 20 io port: [0xe900-0xe90f]
pci 0000:00:07.2: reg 20 io port: [0xec00-0xec1f]
pci 0000:00:07.3: reg 20 io port: [0xe800-0xe81f]
pci 0000:00:07.4: quirk: region 6000-607f claimed by vt82c686 HW-mon
pci 0000:00:07.4: quirk: region 5000-500f claimed by vt82c686 SMB
pci 0000:00:07.5: reg 10 io port: [0xe000-0xe0ff]
pci 0000:00:07.5: reg 14 io port: [0xea00-0xea03]
pci 0000:00:07.5: reg 18 io port: [0xeb00-0xeb03]
pci 0000:00:0d.0: reg 10 io port: [0xe400-0xe4ff]
pci 0000:00:0d.0: reg 14 32bit mmio: [0xec100000-0xec1000ff]
pci 0000:00:0d.0: supports D1 D2
pci 0000:00:0d.0: PME# supported from D1 D2 D3hot D3cold
pci 0000:00:0d.0: PME# disabled
pci 0000:01:00.0: reg 10 32bit mmio: [0xec000000-0xec07ffff]
pci 0000:01:00.0: reg 14 32bit mmio pref: [0xe0000000-0xe7ffffff]
pci 0000:01:00.0: reg 30 32bit mmio pref: [0x000000-0x00ffff]
pci 0000:01:00.0: supports D1 D2
pci 0000:00:01.0: bridge 32bit mmio: [0xec000000-0xec0fffff]
pci 0000:00:01.0: bridge 32bit mmio pref: [0xe0000000-0xe7ffffff]
pci_bus 0000:00: on NUMA node 0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 1 *3 4 5 6 7 10 11 12 14 15)
SCSI subsystem initialized
libata version 3.00 loaded.
PCI: Using ACPI for IRQ routing
Switching to clocksource tsc
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp: PnP ACPI: found 10 devices
ACPI: ACPI bus type pnp unregistered
system 00:00: iomem range 0xd0000-0xd3fff has been reserved
system 00:00: iomem range 0xf0000-0xf7fff could not be reserved
system 00:00: iomem range 0xf8000-0xfbfff could not be reserved
system 00:00: iomem range 0xfc000-0xfffff could not be reserved
system 00:00: iomem range 0x6ff0000-0x6ffffff could not be reserved
system 00:00: iomem range 0xffff0000-0xffffffff has been reserved
system 00:00: iomem range 0x0-0x9ffff could not be reserved
system 00:00: iomem range 0x100000-0x6feffff could not be reserved
system 00:00: iomem range 0xfec00000-0xfec00fff has been reserved
system 00:00: iomem range 0xfee00000-0xfee00fff has been reserved
system 00:02: ioport range 0x4d0-0x4d1 has been reserved
pci 0000:00:01.0: PCI bridge, secondary bus 0000:01
pci 0000:00:01.0:   IO window: disabled
pci 0000:00:01.0:   MEM window: 0xec000000-0xec0fffff
pci 0000:00:01.0:   PREFETCH window: 0xe0000000-0xe7ffffff
pci 0000:00:01.0: setting latency timer to 64
pci_bus 0000:00: resource 0 io:  [0x00-0xffff]
pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffff]
pci_bus 0000:01: resource 1 mem: [0xec000000-0xec0fffff]
pci_bus 0000:01: resource 2 pref mem [0xe0000000-0xe7ffffff]
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
pci 0000:00:01.0: disabling DAC on VIA PCI bridge
pci 0000:00:07.0: Disabling VIA external APIC routing
pci 0000:01:00.0: Boot video device
scx200: NatSemi SCx200 Driver
microcode: no support for this CPU vendor
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 214
io scheduler noop registered
io scheduler deadline registered (default)
Marking TSC unstable due to TSC halts in idle
Switching to clocksource acpi_pm
processor LNXCPU:00: registered as cooling_device0
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Real Time Clock Driver v1.12b
Non-volatile memory driver v1.3
VIA RNG detected
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
pata_via 0000:00:07.1: version 0.3.4
scsi0 : pata_via
scsi1 : pata_via
ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xe900 irq 14
ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xe908 irq 15
ata1: port disabled. ignoring.
ata2.01: CFA: TRANSCEND, 20080128, max UDMA/66
ata2.01: 3915072 sectors, multi 0: LBA 
ata2.01: limited to UDMA/33 due to 40-wire cable
ata2.01: configured for UDMA/33
scsi 1:0:1:0: Direct-Access     ATA      TRANSCEND        2008 PQ: 0 ANSI: 5
sd 1:0:1:0: [sda] 3915072 512-byte logical blocks: (2.00 GB/1.86 GiB)
sd 1:0:1:0: [sda] Write Protect is off
sd 1:0:1:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:1:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda:---------------------------->***30sec***
ata2: lost interrupt (Status 0x58)
ata2: drained 32768 bytes to clear DRQ.
ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata2: soft resetting link
ata2.01: configured for UDMA/33
ata2.01: device reported invalid CHS sector 0
ata2: EH complete---------------------------->***30sec***
ata2: lost interrupt (Status 0x58)
ata2: drained 32768 bytes to clear DRQ.
ata2.01: limiting speed to UDMA/25:PIO4
ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata2: soft resetting link
ata2.01: configured for UDMA/25
ata2.01: device reported invalid CHS sector 0
ata2: EH complete---------------------------->***30sec***
ata2: lost interrupt (Status 0x58)
ata2: drained 32768 bytes to clear DRQ.
ata2.01: limiting speed to PIO4
ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata2: soft resetting link
ata2.01: configured for PIO4
ata2.01: device reported invalid CHS sector 0
ata2: EH complete
 sda1 sda2
sda: detected capacity change from 0 to 2004516864
sd 1:0:1:0: [sda] Attached SCSI disk
Creating 1 MTD partitions on "rootfs":
0x000000000000-0x000003030000 : "rootfs"
mtd: partition "rootfs_data" created automatically, ofs=230000, len=2E00000 
0x000000230000-0x000003030000 : "rootfs_data"
block2mtd: mtd0: [rootfs] erase_size = 64KiB [65536]
PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
cpuidle: using governor ladder
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
Using IPI Shortcut mode
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
VFS: Mounted root (squashfs filesystem) readonly on device 31:0.
Freeing unused kernel memory: 292k freed
Please be patient, while OpenWrt loads ...
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
natsemi dp8381x driver, version 2.1, Sept 11, 2006
  originally by Donald Becker <becker@scyld.com>
  2.4.x kernel port by Jeff Garzik, Tjeerd Mulder
PPP generic driver version 2.4.2
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
ip_tables: (C) 2000-2006 Netfilter Core Team
nsc_gpio initializing
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (1719 buckets, 6876 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
8139too Fast Ethernet driver 0.9.28
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
8139too 0000:00:0d.0: PCI INT A -> Link[LNKB] -> GSI 11 (level, low) -> IRQ 11
eth0: RealTek RTL8139 at 0xe400, 00:02:b6:35:10:ac, IRQ 11
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering forwarding state
Intel(R) PRO/1000 Network Driver - version 7.3.21-k5-NAPI
Copyright (c) 1999-2006 Intel Corporation.
pc87360: PC8736x not detected, module not inserted.
ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
scx200_gpio: no SCx200 gpio present
scx200_wdt: NatSemi SCx200 Watchdog Driver
sis900.c: v1.08.10 Apr. 2 2006
via-rhine.c:v1.10-LK1.4.3 2007-03-06 Written by Donald Becker
via-rhine: Broken BIOS detected, avoid_D3 enabled.
i2c /dev entries driver
scx200_i2c: no SCx200 gpio pins available

In contrary from openwrt booting slow, dd-wrt or mikrotik are booting normal without any similar stops!

Have tried with image builder build my image but with same result  and I noticed every other x86 image that boots normaly have hda,hdb,hdc,hdd...

I think it has something with kernel config (the way kernel see my built-in ide2cf card reader) to do, but need help!

Tnx.

BUMP

Can anybody help?

Hi,

You see the stops because the kernel uses by default the libata driver.
I make images compiling Openwrt - X86 from the trunk and i solved this problem from Menuconfig
You go to section Target Images there is a line there " Extra kernel boot options" , you fill in the box -> libata.dma=0
The image which will be produced after compilation will boot normally without the stops
You can experiment also with libata.dma=4

Tnx pipis9242!

Work now flawlessly, but when I use backfire build envroment with 'make menuconfig' how can I include some packages (mc, openvpen) into my build?

Tnx again!

Check the links below to see if they help.

libata – ata_generic module causing slow ide transfer speeds - Ubuntu Forums
[SOLVED] SATA Speed Problem - Ubuntu Forums

vpritiskovic wrote:
ata2.01: limiting speed to PIO4
ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata2.01: cmd c8/00:08:00:00:00/00:00:00:00:00/f0 tag 0 dma 4096 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata2: soft resetting link
ata2.01: configured for PIO4
ata2.01: device reported invalid CHS sector 0
ata2: EH complete
 sda1 sda2
sda: detected capacity change from 0 to 2004516864
sd 1:0:1:0: [sda] Attached SCSI disk

Google "limiting speed to PIO4" or "configured for PIO4" and you're not the only one.

vpritiskovic wrote:

In contrary from openwrt booting slow, dd-wrt or mikrotik are booting normal without any similar stops!

With the same Transcend 2GB? Do dd-wrt and mikrotik have pata_via or ata_generic installed? What's the output of "lsmod | grep -i ^libata"?

pipis9242 wrote:

libata.dma=0

This could be a workaround. Also "libata.force=2.01:PIO4". Just add it to grub (kernel) or lilo (append) but I'm not sure if it works with OpenWrt because in other platforms the OpenWrt kernel just ignores the parameters passed by the bootloader.

[all variants] The "new" way to force nodma on ide - Ubuntu Forums
Kernel Parameters

if you want to include permanently  some packages (mc, openvpn) into your  build, when you will use make menuconfig , you have to change  to  "*" using the tab key . example  <*> mc

libata.dma=0 works without problems with  Transcend 2GB ,which i use in 4 x86-openwrt installations using cf to ide adapters

Concerning dd-wrt & mikrotik they dont use libata BUT the ata_generic

What i described in my previous post adds libata.dma=0 to grub in X86 platform

(Last edited by pipis9242 on 30 Oct 2010, 23:50)

Hi there!
My CF works for me now, thank you all!

Another question:

pipis9242 wrote:

if you want to include permanently some packages (mc, openvpn) into your build, when you will use make menuconfig , you have to change  to  "*" using the tab key . example  <*> mc

I don't see mc or luci or openvpn package under any menu/submenu within 'make menuconfig', how can I merge them with 'make menuconfig'?

Thank you again!

I compile my x86 images from the trunk
before i do this  i use the following commands

svn co svn://svn.openwrt.org/openwrt/trunk/ ( i do this once to build the trunk - tree in my linux box)

then in order to have all the avalaible packages - after entering my local trunk directory
i type svn up
i type  ./scripts/feeds update -a
and ./scripts/feeds install -a

when i ll do make menuconfig 
in order -for example -  to  select the mc package

I go to utilities -> filemanager -> <*> mc

in order to select openvpn

network-> vpn -> <*> openvpn

pipis9242 wrote:

i type  ./scripts/feeds update -a
and ./scripts/feeds install -a

Tnx, now I have all what I wanted!!!

Question:

What is the best practice to boot and use OpenWrt from built in CF reader in embedded x86 boards regarding the filesystem and fw upgrading?
Tnx!

The discussion might have continued from here.