# [Solved] Upgrading the kernel for hx4700

## kav1979

Hi!

I'm trying to upgrade the kernel on the hx4700 with version 2.6.21-hh19 on the current version of the gentoo-sources (3.1.10-r1).

The kernel compiles, but does not see the boot CF-card type of error: Kernel panic - not syncing: VFS: Unable to mount root fs ...

I'm add config from 2.6.21-hh19 in new kernel  - did not help.

Generates a default configuration for the new kernel command: 

```
# make magician_defconfig
```

 - did not help.

I tried to change the configuration of the 2.6.21-hh19 in new kernel, using only the ATA / ATAPI / MFM / RLL support (DEPRECATED),

 and, vice versa, using Serial ATA and Parallel ATA drivers, - the result is zero.

Please help me what setting in the kernel I forget?

.config-2.6.21-hh19 http://narod.ru/disk/49284624001.144beb3be2a2100cb2fa57ba88be0a64/.config-2.6.21-hh19.html

.config-magician_defconfig http://narod.ru/disk/49285224001.2e5e9ae631e96229fa699da2ac1a5991/.config-magician_defconfig.html

```

hx4700 ~ # emerge --info

Portage 2.1.6.13 (default/linux/arm/10.0/armv5te, gcc-4.2.2, glibc-2.6.1-r1, 2.6.21-hh19 armv5tel)

=================================================================

System uname: Linux-2.6.21-hh19-armv5tel-XScale-PXA270_rev_7_-v5l-with-glibc2.4

Timestamp of tree: Mon, 14 May 2012 00:45:01 +0000

distcc 2.18.3 armv5te-softfloat-linux-gnueabi (protocols 1 and 2) (default port 3632) [disabled]

app-shells/bash:     3.2_p17-r1

dev-lang/python:     2.5.1-r3

dev-util/pkgconfig:  0.22

sys-apps/baselayout: 2.0.0_rc4

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.61-r1

sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.21.1-r1

sys-devel/gcc:       4.2.2

sys-devel/gcc-config: 1.5-r2

sys-devel/libtool:   1.5.24

sys-devel/make:      3.81

sys-kernel/linux-headers: 2.6.30-r1

sys-libs/glibc:      2.6.1-r1

virtual/os-headers:  0

ACCEPT_KEYWORDS="arm ~arm"

CBUILD="armv5te-softfloat-linux-gnueabi"

CFLAGS="-O2 -march=armv5te -mtune=iwmmxt -pipe"

CHOST="armv5te-softfloat-linux-gnueabi"

CONFIG_PROTECT="/etc /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-O2 -march=armv5te -mtune=iwmmxt -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="en_US.UTF-8"

LC_ALL=""

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="en ru"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X acl alsa apm arm bash-completion berkdb bzip2 cli cracklib crypt cxx fbcon gdbm gif glibc-omitfp gpm gtk hal iconv ipv6 jpeg modules ncurses nfs nls no-old-linux nptl openmp pam pcre pda pdf png pppd readline session slang ssl symlink tcpd tiff unicode wifi xattr xcb xkb xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev evtouch dummy" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev w100 pxafb" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY, USE_PYTHON

```

Last edited by kav1979 on Mon Jul 02, 2012 5:23 am; edited 2 times in total

----------

## LordVan

you might want to attach your kernel .config file  :Wink: 

----------

## DaggyStyle

 *kav1979 wrote:*   

> Hi!
> 
> I'm trying to upgrade the kernel on the hx4700 with version 2.6.21-hh19 on the current version of the gentoo-sources (3.1.10-r1).
> 
> The kernel compiles, but does not see the boot CF-card type of error: Kernel panic - not syncing: VFS: Unable to mount root fs ...
> ...

 

whats magician_defconfig?

I'd recommend you'll start from a scratch .config and modify it as there way too much changes between these kernel versions.

----------

## cach0rr0

 *kav1979 wrote:*   

> using only the ATA / ATAPI / MFM / RLL support (DEPRECATED),
> 
> 

 

these will absolutely not work. In fact you must have this option completely unticked if you want things to work. Newer udev will not even make device nodes for hardware using this driver. 

I would highly suggest building your kernel based on one of Pappy's seeds (see sig). 

Using a config from 2.6.21 on a newer kernel will likely not work, as others have suggested.

----------

## kav1979

 *Quote:*   

> whats magician_defconfig? 

 

It is default configuration for hx4700

 *Quote:*   

> In fact you must have this option completely unticked if you want things to work

 

Made entirely with disabled ATA / ATAPI / MFM / RLL support (DEPRECATED) - did not work. 

Using only Serial ATA and Parallel ATA drivers - - did not work.

----------

## DaggyStyle

 *kav1979 wrote:*   

>  *Quote:*   whats magician_defconfig?  
> 
> It is default configuration for hx4700
> 
> 

 

on what kernel? gentoo-sources? vanila?

----------

## kav1979

gentoo-sources

----------

## DaggyStyle

 *kav1979 wrote:*   

> gentoo-sources

 

never heard of such option, I'm assuming that hx4700 is arm platform?

----------

## kav1979

 *Quote:*   

> I'm assuming that hx4700 is arm platform?

 

Yes

```

hx4700 ~ # cat /proc/cpuinfo

Processor       : XScale-PXA270 rev 7 (v5l)

BogoMIPS        : 622.59

Features        : swp half thumb fastmult edsp iwmmxt

CPU implementer : 0x69

CPU architecture: 5TE

CPU variant     : 0x0

CPU part        : 0x411

CPU revision    : 7

Cache type      : undefined 5

Cache clean     : undefined 5

Cache lockdown  : undefined 5

Cache format    : Harvard

I size          : 32768

I assoc         : 32

I line length   : 32

I sets          : 32

D size          : 32768

D assoc         : 32

D line length   : 32

D sets          : 32

Hardware        : HP iPAQ HX4700

```

----------

## DaggyStyle

did magician_defconfig even generated a config?

----------

## kav1979

yes,

after 

```
# make magician_defconfig
```

generated a config: http://narod.ru/disk/49285224001.2e5e9ae631e96229fa699da2ac1a5991/.config-magician_defconfig.html

----------

## DaggyStyle

most of us do not speak nor read russian, please pastebin it.

you can do the following:

```
emerge app-text/wgetpaste; wgetpaste /usr/src/linux..../.config
```

and post the link here.

----------

## kav1979

http://pastebin.com/download.php?i=nLTZZGRH

----------

## DaggyStyle

please pastebin the original config too

----------

## kav1979

http://pastebin.com/download.php?i=1Bbavrxp

----------

## DaggyStyle

from what I can see you need to enable

```
CONFIG_ATA
```

 in the new kernel and select the right driver.

----------

## kav1979

Add to kernel:

```

 <*> Serial ATA and Parallel ATA drivers  --->

 --- Serial ATA and Parallel ATA drivers                                   

    [*]   Verbose ATA error reporting                                         

    [*]   SATA Port Multiplier support                                        

          *** Controllers with non-SFF native interface ***           

    <*>   Platform AHCI SATA support                                      

    [*]   ATA SFF support                                                     

            *** SFF controllers with custom DMA interface ***   

    [*]     ATA BMDMA support                                             

              *** SATA SFF controllers with BMDMA ***             

    <*>       Marvell SATA support                                        

              *** PATA SFF controllers with BMDMA ***              

    <*>       PXA DMA-capable PATA support                          

            *** PIO-only SFF controllers ***                              

    <*>     Generic platform device PATA support

```

did not help

----------

## cach0rr0

can you paste the output of lspci -n ?

----------

## kav1979

```

hx4700 ~ # lspci -n

pcilib: Cannot open /proc/bus/pci

lspci: Cannot find any working access method.

```

In the hx4700 is not the PCI bus

----------

## DaggyStyle

 *kav1979 wrote:*   

> 
> 
> ```
> 
> hx4700 ~ # lspci -n
> ...

 

that is not good, all comps should have a PCI bus afaik

----------

## roarinelk

pxa doesn't have PCI, so forget all marvell/etc PCI ata controllers.

you need CONFIG_PATA_PCMCIA=y (or the old CONFIG_BLK_DEV_IDECS if you prefer to use

the old deprecated IDE support).

show me 'lspcmcia -v' output if you have it.

EDIT: also you need the SCSI stack (at least SCSI disk support) if you're going to use PATA_PCMCIA.

----------

## kav1979

Add in kernel:

```

Bus support  --->

 <*> PCCard (PCMCIA/CardBus) support  --->

 --- PCCard (PCMCIA/CardBus) support

     <*>   16-bit PCMCIA support (NEW)                                        

     [*]     Load CIS updates from userspace (EXPERIMENTAL) (NEW)

Device Drivers  --->

 <*> Serial ATA and Parallel ATA drivers  --->

  <*>     PCMCIA PATA support

Device Drivers  --->

 SCSI device support  --->

  < > RAID Transport Class                                                  

  -*- SCSI device support                                                   

  <*> SCSI target support                                                   

  [*] legacy /proc/scsi/ support                                            

      *** SCSI support type (disk, tape, CD-ROM) ***                        

  <*> SCSI disk support                                                     

  < > SCSI tape support                                                     

  < > SCSI OnStream SC-x0 tape support                                      

  < > SCSI CDROM support                                                    

  <*> SCSI generic support                                                  

  < > SCSI media changer support                                            

  [ ] Probe all LUNs on each SCSI device                                    

  [ ] Verbose SCSI error reporting (kernel size +=12K)                      

  [ ] SCSI logging facility                                                 

  [ ] Asynchronous SCSI scanning                                            

      SCSI Transports  --->                                                 

  [*] SCSI low-level drivers  --->                                          

      --- SCSI low-level drivers                                                

      <*>   iSCSI Initiator over TCP/IP                                         

      <*>   iSCSI Boot Sysfs Interface                                          

      <*>   LibFC module                                                        

      <*>   LibFCoE module                                                      

      <*>   SCSI debugging host simulator

  [*] PCMCIA SCSI adapter support  --->

  <*> SCSI Device Handlers  --->                                            

      --- SCSI Device Handlers                                                  

      <*>   LSI RDAC Device Handler                                        

      <*>   HP/COMPAQ MSA Device Handler                             

      <*>   EMC CLARiiON Device Handler                                 

      <*>   SPC-3 ALUA Device Handler (EXPERIMENTAL)

  < > OSD-Initiator library

```

Began to appear:

```

sda: unknown partition table

```

Partition in kernel:

```

 [*] Advanced partition selection                                          

    [*]   PC BIOS (MSDOS partition tables) support                 

    [*]     Minix subpartition support                                       

    [*]     Unixware slices support                                          

    [*]   Windows Logical Disk Manager (Dynamic Disk) support

```

Install pcmciautils:

```

hx4700 ~ # lspcmcia -v

Socket 0 Bridge:        [pxa2xx-pcmcia]         (bus ID: pxa2xx-pcmcia.0)

        Configuration:  state: on       ready: yes

                        Voltage: 3.3V Vcc: 3.3V Vpp: 0.0V

Socket 0 Device 0:      [ide-cs]                (bus ID: 0.0)

        Configuration:  state: on

        Product Name:   KINGSTON ULTIMATE CF CARD 16GB

        Identification: manf_id: 0x000a card_id: 0x0000

                        function: 4 (fixed disk)

                        prod_id(1): "KINGSTON" (0x2e6d1829)

                        prod_id(2): "ULTIMATE CF CARD 16GB" (0x06872d88)

                        prod_id(3): --- (---)

                        prod_id(4): --- (---)

```

----------

## roarinelk

 *kav1979 wrote:*   

> 
> 
> ```
> 
> Socket 0 Device 0:      [ide-cs]                (bus ID: 0.0)
> ...

 

remove either BLK_DEV_IDECS or PATA_PCMCIA.  You can't have both.

IDECS will create /dev/hdX nodes, PATA_PCMCIA /dev/sdX nodes.

Also I believe you have to add "rootwait" to the kernel commandline.

At least on my boards, the kernel tries to mount the rootfs on the CF card

long before the SCSI stack has finished scanning them for usable

partitions; with "rootwait" it waits for the appropriate devicenode to appear.

----------

## kav1979

First, i'm add "rootwait" to the kernel commandline.

--------------------

If set the options:

```

<*> ATA/ATAPI/MFM/RLL support (DEPRECATED)  --->

    --- ATA/ATAPI/MFM/RLL support (DEPRECATED)

            *** Please see Documentation/ide/ide.txt for help/info on IDE drives

      [ ]   Support for SATA (deprecated; conflicts with libata SATA driver)

      <*>   generic ATA/ATAPI disk support

      [*]     ATA disk support

      [ ]     ATAPI floppy support

      <*>   PCMCIA IDE support

      < >   Include IDE/ATAPI CDROM support

      < >   Include IDE/ATAPI TAPE support

      [ ]   IDE Taskfile Access

      [*]   legacy /proc/ide/ support

            *** IDE chipset support/bugfixes ***

      <*>   Platform driver for IDE interfaces

SCSI device support  --->

    < > RAID Transport Class

    < > SCSI device support

< > Serial ATA and Parallel ATA drivers  --->

```

Does not work. Output:

```

Uniform Multi-platform E-IDE driver

ide-gd driver 1.18

Waiting for root device /dev/hda2

```

and stops

--------------------

If set the options:

```

<*> ATA/ATAPI/MFM/RLL support (DEPRECATED)  --->

    --- ATA/ATAPI/MFM/RLL support (DEPRECATED)

            *** Please see Documentation/ide/ide.txt for help/info on IDE drives

      [ ]   Support for SATA (deprecated; conflicts with libata SATA driver)

      <*>   generic ATA/ATAPI disk support

      [*]     ATA disk support

      [ ]     ATAPI floppy support

      <*>   PCMCIA IDE support

      < >   Include IDE/ATAPI CDROM support

      < >   Include IDE/ATAPI TAPE support

      [ ]   IDE Taskfile Access

      [*]   legacy /proc/ide/ support

            *** IDE chipset support/bugfixes ***

      <*>   Platform driver for IDE interfaces

SCSI device support  --->

    < > RAID Transport Class

    <*> SCSI device support

    <*> SCSI target support

    [*] legacy /proc/scsi/ support

        *** SCSI support type (disk, tape, CD-ROM) ***

    <*> SCSI disk support

    < > SCSI tape support

    < > SCSI OnStream SC-x0 tape support

    < > SCSI CDROM support

    <*> SCSI generic support

    <*> SCSI media changer support

    [*] Probe all LUNs on each SCSI device

    [ ] Verbose SCSI error reporting (kernel size +=12K)

    [ ] SCSI logging facility

    [*] Asynchronous SCSI scanning

        SCSI Transports  --->

    [*] SCSI low-level drivers  --->

    [*] PCMCIA SCSI adapter support  --->

    <*> SCSI Device Handlers  --->

        --- SCSI Device Handlers

        <*>   HP/COMPAQ MSA Device Handler

    < > OSD-Initiator library

< > Serial ATA and Parallel ATA drivers  --->

```

sda seems to see:

```

sd 0:0:0:0: Attached scsi generic sg0 type 0

sd 0:0:0:0: [sda] 16384 512-byte logical blocks: (8.38 MB/8.00 MiB)

sda: unknown partition table

sd 0:0:0:0: [sda] Attached SCSI disk

```

but not work.

With kernel parameter "root=/dev/hda2" output:

```

Waiting for root device /dev/hda2

```

With kernel parameter "root=/dev/sda2" output:

```

VFS: Cannot open root device "sda2" or unknown-block(8,2)

```

--------------------

If set the options:

```

< > ATA/ATAPI/MFM/RLL support (DEPRECATED)  --->

    SCSI device support  --->

         -*- SCSI device support

         <*> SCSI target support

         [*] legacy /proc/scsi/ support

          *** SCSI support type (disk, tape, CD-ROM) ***

         <*> SCSI disk support

         < > SCSI tape support

         < > SCSI OnStream SC-x0 tape support

         < > SCSI CDROM support

         <*> SCSI generic support

         <*> SCSI media changer support

         [*] Probe all LUNs on each SCSI device

         [ ] Verbose SCSI error reporting (kernel size +=12K)

         [ ] SCSI logging facility

         [*] Asynchronous SCSI scanning

             SCSI Transports  --->

         [*] SCSI low-level drivers  --->

             --- SCSI low-level drivers

             <*>   iSCSI Initiator over TCP/IP

             <*>   iSCSI Boot Sysfs Interface

             -*-   LibFC module

             <*>   LibFCoE module

             <*>   SCSI debugging host simulator

         [*] PCMCIA SCSI adapter support  --->

         <*> SCSI Device Handlers  --->

             --- SCSI Device Handlers

             <*>   LSI RDAC Device Handler

             <*>   HP/COMPAQ MSA Device Handler

             <*>   EMC CLARiiON Device Handler

             <*>   SPC-3 ALUA Device Handler (EXPERIMENTAL)

         < > OSD-Initiator library

<*> Serial ATA and Parallel ATA drivers  --->

    --- Serial ATA and Parallel ATA drivers

    [*]   Verbose ATA error reporting

    [*]   SATA Port Multiplier support

          *** Controllers with non-SFF native interface ***

    <*>   Platform AHCI SATA support

    [*]   ATA SFF support

          *** SFF controllers with custom DMA interface ***

    [*]     ATA BMDMA support

          *** SATA SFF controllers with BMDMA ***

    <*>       Marvell SATA support

          *** PATA SFF controllers with BMDMA ***

    <*>       PXA DMA-capable PATA support

          *** PIO-only SFF controllers ***

    <*>     PCMCIA PATA support

    <*>     Generic platform device PATA support

```

not work.

Kernel parameter "root=/dev/sda2".

Output:

```

sd 0:0:0:0: Attached scsi generic sg0 type 0

sd 0:0:0:0: [sda] 16384 512-byte logical blocks: (8.38 MB/8.00 MiB)

sda: unknown partition table

sd 0:0:0:0: [sda] Attached SCSI disk

VFS: Cannot open root device "sda2" or unknown-block(8,2)

```

----------

## Jaglover

Perhaps you turned off partition table support.

```
PC BIOS (MSDOS partition tables) support (MSDOS_PARTITION)

CONFIG_MSDOS_PARTITION:

Say Y here.

Symbol: MSDOS_PARTITION [=y]

Type : boolean

Prompt: PC BIOS (MSDOS partition tables) support

Defined at block/partitions/Kconfig:107

Depends on: BLOCK [=y] && PARTITION_ADVANCED [=y]

Location:

-> Enable the block layer (BLOCK [=y])

-> Partition Types

-> Advanced partition selection (PARTITION_ADVANCED [=y])

```

----------

## kav1979

Add in kernel:

```

[*] Enable the block layer  --->

    --- Enable the block layer                                                

    [*]   Support for large (2TB+) block devices and files                    

    -*-   Block layer SG support v4                                           

    [*]   Block layer SG support v4 helper lib                                

    [*]   Block layer data integrity support                                  

          IO Schedulers  --->

             <*> Deadline I/O scheduler                                                

             <*> CFQ I/O scheduler                                                     

                 Default I/O scheduler (CFQ)

File systems  --->

  <*> Second extended fs support                                            

  [*]   Ext2 extended attributes                                            

  [*]     Ext2 POSIX Access Control Lists                                   

  [*]     Ext2 Security Labels                                              

  [*]   Ext2 execute in place support                                       

  <*> Ext3 journalling file system support                                  

  [*]   Default to 'data=ordered' in ext3                                   

  [*]   Ext3 extended attributes                                            

  [*]     Ext3 POSIX Access Control Lists                                   

  [*]     Ext3 Security Labels                                              

  <*> The Extended 4 (ext4) filesystem                                      

  [*]   Ext4 extended attributes                                            

  [*]     Ext4 POSIX Access Control Lists                                   

  [*]     Ext4 Security Labels                                              

  [*]   EXT4 debugging support                                              

  [*] Enable POSIX file locking API                                         

  [*] Dnotify support                                                       

  [*] Inotify support for userspace                                         

  <*> FUSE (Filesystem in Userspace) support                                

      DOS/FAT/NT Filesystems  --->                                          

      <*> MSDOS fs support                                                      

      <*> VFAT (Windows-95) fs support                                          

      (866) Default codepage for FAT                                            

      (utf8) Default iocharset for FAT                                          

      < > NTFS file system support

  [*] Miscellaneous filesystems  --->                                       

      Partition Types  --->

      [*] Advanced partition selection                                          

      [*]   Acorn partition support                                             

      [*]     Cumana partition support                                          

      [*]     EESOX partition support                                           

      [*]     ICS partition support                                             

      [*]     Native filecore partition support                                 

      [*]     PowerTec partition support                                        

      [*]     RISCiX partition support                                          

      [*]   Alpha OSF partition support                                         

      [*]   Amiga partition table support                                       

      [*]   Atari partition table support                                       

      [*]   Macintosh partition map support                                     

      [*]   PC BIOS (MSDOS partition tables) support                            

      [*]     BSD disklabel (FreeBSD partition tables) support                  

      [*]     Minix subpartition support                                        

      [*]     Solaris (x86) partition table support                             

      [*]     Unixware slices support                                           

      [*]   Windows Logical Disk Manager (Dynamic Disk) support                 

      [*]     Windows LDM extra logging                                         

      [*]   SGI partition support                                               

      [*]   Ultrix partition table support                                      

      [*]   Sun partition tables support                                        

      [*]   Karma Partition support                                             

      [*]   EFI GUID Partition support                                          

      [*]   SYSV68 partition table support

```

Does not work. Output: 

```

sda: unknown partition table 

```

It is not clear: the old kernel detects the partition table, but the new kernel does not.

----------

## roarinelk

Something else is wrong:  pcmciautils says the card has 16GB, but with pata_pcmcia it says 8MB.

Please post full dmesg outputs of the working and non-working kernels, maybe we can find

some clues in there.

----------

## kav1979

Full dmesg output of the working kernel:http://pastebin.com/download.php?i=pJ5CNKQ8

But dmesg output of the new kernel is missing, because can not mount root. The output of the new kernel written in my above comments I wrote from the screen hx4700.

In real card has 16GB.

----------

## roarinelk

the old kernel for the hx4700, is that a "vanilla" source or has machine support been patched in?

I get the distinct impression that the pcmcia bridge is missing some customization for the hx4700 in 3.3

Either that or a sublte bug has sneaked into pxa2xx pcmcia support in the meantime. I suspect that

hx4700 pcmcia is missing since the magician_defconfig in 3.3 doesn't enable pcmcia at all

----------

## kav1979

About old kernel are only known binary and config  :Sad: 

It is a pity that so many in the kernel code for the hx4700, but it can not be used because of this error.

PS On hx4700 now portage offers kernel 3.1.10-gentoo-r1.

----------

## lost-distance

hx4700 PCMCIA support was added to linux-3.5-rc1.

I have uploaded a working hx4700 kernel config for linux 3.5.0-rc2 here:

http://pastebin.com/qcCHkjYL

Note that I use UBIFS instead of JFFS2 for the internal flash (MTD) file systems, so you may need to disable CONFIG_UBIFS_FS and enable CONFIG_JFFS2_FS instead.

----------

## kav1979

I tried to Kernel-3.5.0-r2 - kernel not started.

On the Kernel-3.5.0-r4 with the proposed kernel config is also not started, but I used magician_defconfig, adding support pcmcia and ata. And the kernel booted, CF-card is determined.

Thank you.

----------

## lost-distance

It is possible that my 3.5.0-rc2 kernel config did not start because of the combination of bootloader and kernel command line.

If you use the SDG bootloader and store Linux file systems in the internal flash (MTD) partitions, then you might need to modify the kernel command line to provide the correct MTD partition information.

For example, I use a modified SDG bootloader to provide the following kernel command line:

```
mtdparts=physmap-flash:0x00040000@0x00000000(bootldr)ro,0x00040000@0x00040000(sdg),0x00240000@0x00080000(kernel),0x07D00000@0x002C0000(ubi),0x00040000@0x07FC0000(asset) ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs ro
```

The MTD partition information is documented in drivers/mtd/cmdlinepart.c:

```
 * The format for the command line is as follows:

 *

 * mtdparts=<mtddef>[;<mtddef]

 * <mtddef>  := <mtd-id>:<partdef>[,<partdef>]

 *              where <mtd-id> is the name from the "cat /proc/mtd" command

 * <partdef> := <size>[@offset][<name>][ro][lk]

 * <mtd-id>  := unique name used in mapping driver/device (mtd->name)

 * <size>    := standard linux memsize OR "-" to denote all remaining space

 * <name>    := '(' NAME ')'
```

The mtd-id provided by the default SDG bootloader is "ipaq", whereas the mtd-id expected by the Linux kernel is "physmap-flash". Therefore if the default SDG bootloader is being used, the kernel will not correctly parse the MTD partition information on the command line, and consequently it will not find the MTD partitions (including the root file system). This can be verified by enabling CONFIG_VT_CONSOLE in the kernel config to display console output on the screen at boot time.

An alternative to modifying the SDG bootloader is to override the kernel command line by setting CONFIG_CMDLINE in the kernel config.

If you use the HaRET bootloader and do not store Linux file systems in the MTD partitions, then perhaps the above problem is irrelevant.

Anyway, it is good to hear that you have CF working!

----------

