Wind River Support Network

HomeDefectsLIN4-12209
Fixed

LIN4-12209 : write to pramfs fails to write and remove

Created: Sep 13, 2011    Updated: May 18, 2015
Resolved Date: Oct 10, 2011
Found In Version: 4.2
Fix Version: 4.2,4.3
Severity: Severe
Applicable for: Wind River Linux 4
Component/s: Kernel

Description

customer is trying  to mount and use a pramfs file system and failures are seen on both:

 qemu_ppc32:glibc_small and qemu_ppc32:glibc_std machines (kernel=standard).

Among other issues, it looks like copy of files larger than 8KB
 into the pramfs partition fails. Also, removing files doesn/'t seem to clear
 up space on the partition.

....
BusyBox v1.15.3 (2011-09-13 14:19:14 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# mount -t pramfs pramfs -o physaddr=0x10000000,init=32k,bs=512 /mnt
# df
Filesystem           1024-blocks    Used Available Use% Mounted on
/dev/root            464455440 227189408 213673072  52% /
devtmpfs                125960         0    125960   0% /dev
tmpfs                   126052         0    126052   0% /dev/shm
pramfs                      30         1        30   2% /mnt
# df -i
Filesystem              Inodes      Used Available Use% Mounted on
/dev/root                    0         0         0   0% /
devtmpfs                    31         1        30   2% /dev
tmpfs                       31         0        31   0% /dev/shm
pramfs                       0         0         0   7% /mnt
# dd if=/dev/urandom of=/mnt/32K bs=4096 count=8
dd: writing '/mnt/32K': No space left on device
4+0 records in
3+0 records out
# df
Filesystem           1024-blocks    Used Available Use% Mounted on
/dev/root            464455440 227189408 213673072  52% /
devtmpfs                125960         0    125960   0% /dev
tmpfs                   126052         0    126052   0% /dev/shm
pramfs                      30        17        14  55% /mnt
# rm /mnt/32K 
# df
Filesystem           1024-blocks    Used Available Use% Mounted on
/dev/root            464455440 227189408 213673072  52% /
devtmpfs                125960         0    125960   0% /dev
tmpfs                   126052         0    126052   0% /dev/shm
pramfs                      30        17        14  55% /mnt
# ls -l /mnt/
# 

Steps to Reproduce

configure with: 

--enable-board=qemu_ppc32 --enable-rootfs=glibc_small --enable-kernel=standard 

configure busybox and add support for dd, df, du.

configure linux kernel and add enable:
 "Persistent and Protected RAM file system support"
--> "PRAMFS extended attributes"

make -C build linux.rebuild busybox.rebuild
make fs
make config-target
25: TARGET0_QEMU_MEM=512M
57: TARGET0_QEMU_KERNEL_OPTS=mem=256M

make start-target
...

Other Downloads


Live chat
Online