在LPC3250上使用UBIFS文件系统

发布者:HarmoniousVibes最新更新时间:2024-05-06 来源: elecfans关键字:LPC3250  UBIFS  文件系统 手机看文章 扫描二维码
随时随地手机看文章

Scanning device for bad blocks

Bad eraseblock 0 at 0x00000000

Bad eraseblock 1 at 0x00020000

Bad eraseblock 2 at 0x00040000

Bad eraseblock 152 at 0x01300000

Bad eraseblock 571 at 0x04760000

Bad eraseblock 1594 at 0x0c740000

Creating 5 MTD partitions on 'lpc32xx_nand':

0x00000000-0x00180000 : 'smartarm3250-boot'

0x00180000-0x001c0000 : 'smartarm3250-ubt-prms'

0x00200000-0x00600000 : 'smartarm3250-kernel'

0x00600000-0x01600000 : 'smartarm3250-safefs'

0x01600000-0x10000000 : 'smartarm3250-rootfs'

UBI: attaching mtd4 to ubi0

UBI: physical eraseblock size:   131072 bytes (128 KiB)

UBI: logical eraseblock size:    129024 bytes

UBI: smallest flash I/O unit:    2048

UBI: sub-page size:              512

UBI: VID header offset:          512 (aligned 512)

UBI: data offset:                2048

UBI: attached mtd4 to ubi0

UBI: MTD device name:            'smartarm3250-rootfs'

UBI: MTD device size:            234 MiB

UBI: number of good PEBs:        1870

UBI: number of bad PEBs:         2

UBI: max. allowed volumes:       128

UBI: wear-leveling threshold:    4096

UBI: number of internal volumes: 1

UBI: number of user volumes:     1

UBI: available PEBs:             0

UBI: total number of reserved PEBs: 1870

UBI: number of PEBs reserved for bad PEB handling: 18

UBI: max/mean erase counter: 2/1

UBI: background thread 'ubi_bgt0d' started, PID 262

at25 spi0.0: 32 KByte at25256a eeprom, pagesize 64

mice: PS/2 mouse device common for all mice

input: LPC32xx Touchscreen as /class/input/input0

rtc-lpc32xx rtc-lpc32xx: rtc core: registered rtc-lpc32xx as rtc0

i2c /dev entries driver

PNX4008-WDT: PNX4008 Watchdog Timer: heartbeat 19 sec

mmci-pl18x: DMA buffer(10000 bytes), P:0x839e0000, V:0xffc1a000

mmc0: MMCI rev 0 cfg 00 at 0x0000000020098000 irq 15,13

Advanced Linux Sound Architecture Driver Version 1.0.17.

ASoC version 0.13.2

UDA1380 Audio Codec 0.6<3>i2c-adapter i2c-4: Master timed out. stat = 0000, cntrl = 0000. Resetting master...

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 17

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

ieee80211: 802.11 data/management/control stack, git-1.1.13

ieee80211: Copyright (C) 2004-2005 Intel Corporation linux.intel.com>

VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 1

rtc-lpc32xx rtc-lpc32xx: setting system clock to 2033-04-20 18:46:57 UTC (1997635617)

UBIFS: mounted UBI device 0, volume 0, name 'rootfs'

UBIFS: file system size: 237017088 bytes (231462 KiB, 226 MiB, 1837 LEBs)

UBIFS: journal size: 11870208 bytes (11592 KiB, 11 MiB, 92 LEBs)

UBIFS: default compressor: LZO

UBIFS: media format 4, latest format 4

VFS: Mounted root (ubifs filesystem).

Freeing init memory: 112K

UBIFS: background thread 'ubifs_bgt0_0' started, PID 304

init started: BusyBox v1.11.2 ()

starting pid 306, tty '': '/etc/rc.d/rcS'

Mounting /proc and /sys

Starting the hotplug events dispatcher udevd

Synthesizing initial hotplug events

Setting the hostname to zlg

Mounting filesystems

mount: mounting usbfs on /proc/bus/usb failed: No such file or directory

Running sysctl

Setting up networking on loopback device:

Setting up networking on eth0:

Adding static route for default gateway to 192.168.7.1:

Setting nameserver to 192.168.7.1 in /etc/resolv.conf:

Starting inetd:

Starting the port mapper:

Starting the ssh server:

starting pid 605, tty '': '-/bin/sh'

[root@zlg /]#

 

[root@zlg /]# ls

bin      etc      linuxrc  proc     sys      usr

boot     home     mnt      root     tmp      var

dev      lib      opt      sbin     ubifs

[root@zlg /]# df

Filesystem           1k-blocks      Used Available Use% Mounted on

rootfs                  217224     68612    143552  32% /

ubi0:rootfs             217224     68612    143552  32% /

tmpfs                    30636        24     30612   0% /dev

shm                      30636         0     30636   0% /dev/shm

rwfs                       512         0       512   0% /mnt/rwfs

 

与YAFFS2测试对比:

  从NAND FLASH中读取和复制一个文件,同样大小,分别使用YAFFS2和UBIFS系统的对比情况:

[root@nxp mp3]# ls -la bh_48128.mp3

-rw-r--r--    1 user     user      5689344 Feb 29  2008 bh_48128.mp3

  文件大小差不多是5M多。

  yaffs2的系统,测试时间是9秒钟:

[root@nxp mp3]# time cp bh_48128.mp3 bh_48128-2.mp3

real    0m 9.28s

user    0m 0.01s

sys     0m 9.26s

 

 

  ubifs系统,测试时间差不多4秒多一点。

[root@zlg mp3]# time cp bh_48128.mp3 bh_48128-2.mp3

real   0m4.130s

user    0m0.000s

sys     0m2.810s

从这里就可以看出UBIFS速度远比YAFFS2快。

 

 

另外,UBIFS还采用了压缩,在PC上大约110MB的rootfs,固化到UBIFS分区后大约60多MB。

 

 

UBI和UBIFS的参考链接:

http://www.linux-mtd.infradead.org/doc/ubi.html

http://www.linux-mtd.infradead.org/doc/ubifs.html


[1] [2]
关键字:LPC3250  UBIFS  文件系统 引用地址:在LPC3250上使用UBIFS文件系统

上一篇:Linux定时器的使用
下一篇:LPC3250 ttyS1 发送问题解决办法

推荐阅读最新更新时间:2026-03-04 14:33

Linux(AT91SAM9260)增加UBIFS文件系统支持
一、编写目的 UBIFS是针对nand设备而设计的一种新文件系统。针对JFFS2、YAFFS2等专用文件系统也存在着一些技术瓶颈,如:内存消耗大,对FLASH容量、文件系统大小、内容、访问模式等的线性依赖,损益均衡能力差或过渡损益等,由于采用了压缩方式,UBI文件系统占用的空间比yaffs要小,而且避免了nand flash中OOB数据的操作。在此背景下内核加入了UBI文件系统的支持。需要注意的是UBIFS对异常掉电的容忍性差,容易出现CRC错误。 本文档用于记录为Linux增UBIFS文件系统支持的操作过程,方便日后查阅和参考。使用的软硬件环境如下,其它平台的可参考本文档进行类似操作即可。
[单片机]
Linux(AT91SAM9260)增加<font color='red'>UBIFS</font><font color='red'>文件系统</font>支持
J-LINK V7/V8+ADS调试NXP LPC3250 Smartarm3250
在 ADS1.2 环境下,使用 JLINK 调试 NXP 的 ARM,即使按照使用说明设置好每一步,也依然会出现下图所示的错误提示。 我们通过下边的设置可以解决这个问题。 如下图点击 Options 选项 打开下拉框后,点击 Configure Pr0cessor.....选项,出现下边的对话框,只要把选项 Semihosting mode 前边的√点掉,另外把J-link中的设置把CPU 和 Flash项设置正确就可以了。设置好后,然后关闭软件,重新打开,就可以在SRAM 和 Flash中都可以进行中断仿真了。
[单片机]
J-LINK V7/V8+ADS调试NXP <font color='red'>LPC3250</font> Smartarm3250
基于WinCE6.0的LPC3250串口驱动程序开发
引 言 Windows CE是一个开放的、可升级、可裁减的32位实时嵌入式操作系统,具有可靠性好、实时性高、内核体积小的特点,广泛应用于工业控制、信息家电、移动通信、汽车电子、个人电子消费品等领域。最新版本Windows Em-bedded CE 6.0于2006年11月发布,其特点有:最大进程数量到32K,且每个进程有最大2 GB的虚拟内存空间;将关键的驱动程序、文件系统和图形界面管理器移到了内核中,大大减少了CPU在内核态和用户态间切换造成的性能损失等。 LPC3250是NXP半导体公司(由Philips公司成立)推出的带有矢量浮点协处理器的ARM926EJ-SCPU内核的微控制器。它具有丰富的外围接口,包括7个UART,其
[单片机]
基于WinCE6.0的<font color='red'>LPC3250</font>串口驱动程序开发
迅为IMX6Q开发板 Buildroot文件系统mqtt测试
以开发板作为服务器, Ubuntu 开俩个终端作为订阅者和发布者进行测试 我们打开/etc 下面的 mosquitto.conf 文件,添加 user root。如下图所示: ignore_js_op 使用以下命令启动开发板的 mosquitto 服务 mosquitto -d -c /etc/mosquito/mosquitto.conf 如下图所示: ignore_js_op 查询是否启动成功,命令如下: ps -ef |grep mosquitto 如果成功如下图所示: ignore_js_op 使用 ping 命令 ping 一下自己的 Ubuntu,这里一定要 ping 通,否则下面的步骤不成功,命令如下,IP 为
[单片机]
迅为IMX6Q开发板 Buildroot<font color='red'>文件系统</font>mqtt测试
迅为恩智浦IMX6Q开发板Buildroot 文件系统 alsa 声卡工具测试
耳机设置常用命令如下: 设置音量(最大为 127):amixer sset Headphone 101,101 左声道开启设置:amixer sset 'Left Output Mixer PCM' on 右声道开启设置:amixer sset 'Right Output Mixer PCM' on 使用命令“aplay -l”查看当前查看播放音频设备: 如下图所示,使用命令 amixer sset Headphone 101,101 设置音量大小。 如下图所示,使用命令 amixer sset 'Left Output Mixer PCM' on 开启左声道。 如下图所示,使
[单片机]
迅为恩智浦IMX6Q开发板Buildroot <font color='red'>文件系统</font> alsa 声卡工具测试
迅为imx6ull开发板Ubuntu文件系统测试
迅为IMX6ULL开发板 1 打包烧写 Ubuntu 我们在刚才的 ubuntu 目录下,使用命令“tar -vcjf rootfs.tar.bz2 ./*”打包文件系统。如下图所示: 我们使用命令“du -sh rootfs.tar.bz2”即可查看文件系统打包后的大小,如下图所示: 我们将“rootfs.tar.bz2”通过 ssh 软件传输到 mfg 烧写工具里,还需要烧写其它几个镜像文件,分别是uboot,设备树文件,内核文件,该文件系统所需内核镜像和 QT 系统相同,烧写配置和 QT 一样。如下图所示: 将开发板拨码切换成烧写模式,上电烧写,等待烧写完成。 2 Ubuntu 根文件系统测试 烧写启动之后如下图所示:
[单片机]
迅为imx6ull开发板Ubuntu<font color='red'>文件系统</font>测试
迅为IMX6开发板Buildroot文件系统4G拨号上网工具测试
给IMX6开发板烧写好 buildroot 的文件系统,连接好 4G 模块和天线并将 SIM 卡插入卡槽启动如下图: 输入用户名 root ,密码 :XXXXXX 开始测试 ppp 拨号,先将 eth0 关闭使用命令“ifconfig wth0 down”,如下图所示: 然后使用命令 “pppd call wcdma &”,进行拨号如下图: 使用命令 “ifconfig” 查看 ppp0,如下图所示: 然后使用命令 “XX”测试是否能上网,如下图所示: 可以看到可以正常 ping 通,测试完毕。 核心板参数: 尺寸:51mm*61mm 四核商业级-2G:NXP 四核 i.MX6Q,主频 1 GHz;内存:2GB D
[单片机]
迅为IMX6开发板Buildroot<font color='red'>文件系统</font>4G拨号上网工具测试
i.MX6ULL终结者Debian文件系统的构建i.MX6ULL 移植Debian文件系统
1、安装Qumu和Debootstrap 由于我们是在 Ubuntu 上构建的debian的文件系统,所以安装这俩个工具我们直接使用apt-get命令即可。命令如下: apt-get install binfmt-support qemu qemu-user-static debootstrap 如图 1.1所示: 2、抽取Debain文件系统 抽取文件系统我们使用的是debootstrap命令,我们执行以下命令即可从debian下载源中获取到文件系统: debootstrap --arch=armhf --foreign buster root https://mirrors.tuna.tsinghua.edu.c
[单片机]
i.MX6ULL终结者Debian<font color='red'>文件系统</font>的构建i.MX6ULL 移植Debian<font color='red'>文件系统</font>
小广播
最新单片机文章
何立民专栏 单片机及嵌入式宝典

北京航空航天大学教授,20余年来致力于单片机与嵌入式系统推广工作。

厂商技术中心

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

电子工程世界版权所有 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2026 EEWORLD.com.cn, Inc. All rights reserved