Skip to contentSkip to conversation

JFFS2 Root Filesystem and Linux 2.6.19

DISCUSSION Doug Kehn 1 participant 2 messages Feb 4, 2007 – Feb 13, 2007 1 message not in the archive Memory technology devices (MTD)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Doug Kehn

author
#1 lore raw

Hi All,

Some additional information/clarification.

Quoted 21 lines
Quoted 3 lines · --- Doug Kehn

Hi All,

Target: ADI Coyote, Intel XScale IXP-425,

bigendian

Quoted 10 lines

Source: uClinux-dist-test-20070108

           Linux 2.6.19
           uClibc 0.9.27
           Busybox 1.0.0
Toolchain: arm-linux-tools-20061213
              binutils-2.16
              gcc-3.4.4
              glibc-2.3.3
              glibc-linuxthreads-2.3.3
Quoted 4 lines

When the kernel is configured for a jffs2 rootfs,
some
apps fail to load with either a Segment Fault or
"'/lib' is not an ELF file" the first time they

are

Quoted 13 lines
Quoted 7 lines

executed. The second and subsequent executions of the
same app work properly. Attached is a sample boot log. MTD and JFFS2 debugging information has been enabled.

If, on the other hand, the kernel is configured

for

Quoted 5 lines

an
initrd and the jffs2 partition is mounted with
'mount'
after boot, this error does not occur.

I should have said if the rootfs is a ramdisk, sorry. The stock kernel command line for ADI Coyote in uClinux is:

CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram0 initrd=0x00800000,8M mem=64M@0x00000000"

Then from the shell:

# mount -n -t jffs2 -o rw,noatime /dev/mtdblock2
/mnt/jffs2

Then running /mnt/jffs2/bin/<app> does not produce the error.

I then tried an initrd with a kernel command line of

CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram0 init=/linuxrc rw initrd=0x03E00000,1M mem=64M@0x00000000"

and a linuxrc of

#!/bin/sh
echo"initrd: mounting jffs2 rootfs
mkdir /jffs2
mount -n -t jffs2 -o rw,noatime /dev/mtdblock2 /jffs2
echo "initrd: starting rootfs"
cd /jffs2
[ -d initrd ] || mkdir initrd
pivot_root . initrd
exec chroot . /sbin/init <dev/console >dev/console 2>&1

The error still occurs with this scheme.

Quoted 6 lines
Quoted 3 lines

I've posted to the uClibc group and the uClinux
group.
My posts to these groups contain additional

detail

Quoted 2 lines

as
well as additional traces (included as

Quoted 13 lines

attachments).

Quoted 4 lines

I thought it easier to provide links (see below)
than
to include all the information here. If this is

not

Quoted 1 line

the case, I'll compile all the information in to

one

Quoted 4 lines

big post here.

The uClibc thread is -- Bummer: could not find!

http://www.uclibc.org/lists/uclibc/2007-January/017086.html

Quoted 6 lines
Quoted 2 lines

The uClinux thread is --

uClinux-dist-test-20070108:

Quoted 2 lines

Problems with jffs2 rootfs

http://mailman.uclinux.org/pipermail/uclinux-dev/2007-January/041699.html

Quoted 11 lines
Quoted 6 lines

Any assistance will be appreciated.

Thanks,
...doug

____________________________________________________________________________________
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

author
#2 lore raw

Hi All,

The problem I was observing has resolved itself with the release of 2.6.20 (???).

...doug

Quoted 79 lines · --- Doug Kehn

Hi All,

Some additional information/clarification.

Quoted 17 lines
Quoted 3 lines · --- Doug Kehn

Hi All,

Target: ADI Coyote, Intel XScale IXP-425,

bigendian

Quoted 11 lines

Source: uClinux-dist-test-20070108

           Linux 2.6.19
           uClibc 0.9.27
           Busybox 1.0.0
Toolchain: arm-linux-tools-20061213
              binutils-2.16
              gcc-3.4.4
              glibc-2.3.3
              glibc-linuxthreads-2.3.3

When the kernel is configured for a jffs2

rootfs,

Quoted 5 lines
Quoted 3 lines

some
apps fail to load with either a Segment Fault or
"'/lib' is not an ELF file" the first time they

are

Quoted 1 line

executed. The second and subsequent executions

of

Quoted 2 lines
Quoted 2 lines

the
same app work properly. Attached is a sample

boot

Quoted 1 line
Quoted 1 line

log. MTD and JFFS2 debugging information has

been

Quoted 9 lines
Quoted 3 lines

enabled.

If, on the other hand, the kernel is configured

for

Quoted 5 lines

an
initrd and the jffs2 partition is mounted with
'mount'
after boot, this error does not occur.

I should have said if the rootfs is a ramdisk,
sorry.
The stock kernel command line for ADI Coyote in
uClinux is:

CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram0 initrd=0x00800000,8M mem=64M@0x00000000"

Then from the shell:

# mount -n -t jffs2 -o rw,noatime /dev/mtdblock2
/mnt/jffs2

Then running /mnt/jffs2/bin/<app> does not produce the error.

I then tried an initrd with a kernel command line of

CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram0 init=/linuxrc rw initrd=0x03E00000,1M mem=64M@0x00000000"

and a linuxrc of

#!/bin/sh
echo"initrd: mounting jffs2 rootfs
mkdir /jffs2
mount -n -t jffs2 -o rw,noatime /dev/mtdblock2 /jffs2
echo "initrd: starting rootfs"
cd /jffs2
[ -d initrd ] || mkdir initrd
pivot_root . initrd
exec chroot . /sbin/init <dev/console >dev/console 2>&1

Quoted 22 lines

The error still occurs with this scheme.

Quoted 19 lines
Quoted 3 lines

I've posted to the uClibc group and the uClinux
group.
My posts to these groups contain additional

detail

Quoted 2 lines

as
well as additional traces (included as

attachments).

Quoted 4 lines

I thought it easier to provide links (see below)
than
to include all the information here. If this is

not

Quoted 1 line

the case, I'll compile all the information in to

one

Quoted 4 lines

big post here.

The uClibc thread is -- Bummer: could not find!

http://www.uclibc.org/lists/uclibc/2007-January/017086.html

Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

The uClinux thread is --

uClinux-dist-test-20070108:

Quoted 2 lines

Problems with jffs2 rootfs

http://mailman.uclinux.org/pipermail/uclinux-dev/2007-January/041699.html

Quoted 15 lines
Quoted 11 lines
Quoted 6 lines

Any assistance will be appreciated.

Thanks,
...doug

____________________________________________________________________________________

Quoted 3 lines

Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

http://answers.yahoo.com/dir/?link=list&sid=396545367

Quoted 2 lines

______________________________________________________

Quoted 2 lines

Linux MTD discussion mailing list

http://lists.infradead.org/mailman/listinfo/linux-mtd/

Quoted 1 line

____________________________________________________________________________________
We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265