jffs2文件系统的制作

    jffs2

  JFFS文件系统最早是由瑞典Axis Communications公司基于Linux2.0的内核为嵌入式系统开发的文件系统。JFFS2(Journalling Flash FileSystem v2,日志闪存文件系统版本2 )RedHat公司基于JFFS开发的闪存文件系统,最初是针对RedHat公司的嵌入式产品eCos开发的嵌入式文件系统,所JFFS2也可以用在Linux, uCLinux中。它主要用于NOR型闪存,基于MTD驱动层,特点是:可读写的、支持数据压缩的、基于哈希表的日志型文件系统,并提供了崩溃/掉电安全保护,提供“写平衡”支持等。缺点主要是当文件系统已满或接近满时,因为垃圾收集的关系而使jffs2的运行速度大大放慢。

   Jffs2不适合用于NAND闪存主要是因为NAND闪存的容量一般较大,这样导致jffs2为维护日志节点所占用的内存空间迅速增大,另外,jffs2文件系统在挂载时需要扫描整个FLASH的内容,以找出所有的日志节点,建立文件结构,对于大容量的NAND闪存会耗费大量时间。

   目前jffs3正在开发中,关于jffs2系列文件系统的使用详细文档,可参考MTD补丁包中mtd-jffs-HOWTO.txt

jffs2文件系统的制作

对根文件系统进行修改

无修改

添加内核对jffs2的支持

[luxibao@centos linux-3.0]$ export TERM=vt100

[luxibao@centos linux-3.0]$ make menuconfig

[luxibao@centos linux-3.0]$ make

制作mkfs.jffs2和mkfs.ubifs工具

[luxibao@centos rootfs]$ mkdir mtd-utiles

[luxibao@centos rootfs]$ cd mtd-utiles/

[luxibao@centos mtd-utiles]$ ls

[luxibao@centos mtd-utiles]$  vim build.sh

 

 

#!/bin/sh

 

#+--------------------------------------------------------------------------------------------

#|Description:  This shell script used to download lzo,zlib,mtd-utils source code

#|              and cross compile it for ARM Linux, all is static cross compile.

#|     Author:  GuoWenxue <guowenxue@gmail.com>

#|  ChangeLog:

#|           1, Initialize 1.0.0 on 2011.04.12

#+--------------------------------------------------------------------------------------------

 

PRJ_PATH=`pwd`

 

LZO="lzo-2.04"

ZLIB="zlib-1.2.5"

e2fsprogs_ver=1.42

mtd="mtd-utils-1.4.9"

 

function decompress_packet()

(

   echo "+---------------------------------------------+"

   echo "|  Decompress $1 now"

   echo "+---------------------------------------------+"

 

    ftype=`file "$1"`

    case "$ftype" in

       "$1: Zip archive"*)

           unzip "$1" ;;

       "$1: gzip compressed"*)

            if [ `expr "$1" : ".*.tar.*" ` ] ; then

                  tar -xzf $1

            else

                  gzip -d "$1"

            fi ;;

       "$1: bzip2 compressed"*)

            if [ `expr "$1" : ".*.tar.*" ` ] ; then

                  tar -xjf $1

            else

                bunzip2 "$1"

            fi ;;

       "$1: POSIX tar archive"*)

            tar -xf "$1" ;;

       *)

            echo "$1 is unknow compress format";;

     esac

)

 

# Download lzo source code packet

if [ ! -s $LZO.tar.gz ] ; then

     wget http://www.oberhumer.com/opensource/lzo/download/$LZO.tar.gz

fi

 

# Decompress lzo source code packet

if [ ! -d $LZO ] ; then

       decompress_packet $LZO.tar.*

fi

 

# Cross compile lzo

 

cd  $LZO

if [ ! -s src/.libs/liblzo*.a ] ; then

    unset LDFLAGS

    ./configure  --enable-static --disable-shared

    make

fi

cd  -

 

 

echo "+----------------------------------------+"

echo "|  Cross compile $ZLIB now "

echo "| Crosstool:  $CROSS"

echo "+----------------------------------------+"

 

# Download zlib source code packet

if [ ! -s $ZLIB.tar* ] ; then

#wget http://www.zlib.net/$ZLIB.tar.gz

   #wget http://www.imagemagick.org/download/delegates/$ZLIB.tar.bz2

   #wget http://down1.chinaunix.net/distfiles/$ZLIB.tar.bz2

    wget http://pkgs.fedoraproject.org/repo/pkgs/zlib/zlib-1.2.5.tar.bz2/be1e89810e66150f5b0327984d8625a0/$ZLIB.tar.bz2

fi

 

# Decompress zlib source code packet

if [ ! -d $ZLIB ] ; then

    decompress_packet $ZLIB.tar.*

fi

 

#Cross compile zlib

 

cd  $ZLIB

if [ ! -s libz.a ] ; then

    unset LDFLAGS

    ./configure  --static

    make

fi

cd  -

 

 

echo "+----------------------------------------+"

echo "|  Cross compile e2fsprogsV$e2fsprogs_ver now "

echo "| Crosstool:  $CROSS"

echo "+----------------------------------------+"

#e2fsprogs is for UBIFS, download e2fsprogs source code packet

if [ ! -s e2fsprogs-$e2fsprogs_ver.tar.gz ] ; then

   wget http://nchc.dl.sourceforge.net/project/e2fsprogs/e2fsprogs/$e2fsprogs_ver/e2fsprogs-$e2fsprogs_ver.tar.gz

fi

 

# Decompress e2fsprogs source code packet

if [ ! -d e2fsprogs-$e2fsprogs_ver ] ; then

    decompress_packet e2fsprogs-$e2fsprogs_ver.tar.*

fi

 

cd e2fsprogs-$e2fsprogs_ver

if [ ! -s lib/libuuid.a ] ; then

   ./configure --enable-elf-shlibs

   make

fi

cd -

 

echo "+----------------------------------------+"

echo "|  Cross compile mtd-utils now "

echo "| Crosstool:  $CROSS"

echo "+----------------------------------------+"

 

if [ ! -s ${mtd}.tar.bz2 ] ; then

     wget ftp://ftp.infradead.org/pub/mtd-utils/${mtd}.tar.bz2

fi

decompress_packet ${mtd}.tar.bz2

 

# download mtd-utils source code

#if [ ! -d  mtd-utils* ] ; then

    #git clone git://git.infradead.org/mtd-utils.git

 

#fi

 

cd ${mtd}

#Add the CROSS tool in file common.mk

 

line=`sed -n '/CFLAGS ?= -O2 -g/=' common.mk `

if [ ! -z $line ] ; then

     sed -i -e ${line}s"|.*|CFLAGS ?= -O2 -g --static|" common.mk

fi

 

unset LDFLAGS

unset CFLAGS

 

set -x

export CFLAGS="-DWITHOUT_XATTR -I$PRJ_PATH/$ZLIB -I$PRJ_PATH/$LZO/include -I$PRJ_PATH/e2fsprogs-$e2fsprogs_ver/lib"

export ZLIBLDFLAGS=-L$PRJ_PATH/$ZLIB

export LZOLDFLAGS=-L$PRJ_PATH/$LZO/src/.libs/

export LDFLAGS="-static -L $PRJ_PATH/e2fsprogs-$e2fsprogs_ver/lib $ZLIBLDFLAGS $LZOLDFLAGS"

make

 

set -x

#strip nandwrite flash_erase  nanddump

#sudo cp nandwrite $INST_PATH/.nandwrite

#sudo cp flash_erase $INST_PATH/.flash_erase

#sudo cp nanddump $INST_PATH/.nanddump

 

"build.sh" [] 156L, 4260C已写入

 

[luxibao@centos mtd-utiles]$ ls

Build.sh

[luxibao@centos mtd-utiles]$ sh build.sh

[luxibao@centos mtd-utiles]$ ls

build.sh               lzo-2.04         mtd-utils-1.4.9.tar.bz2

e2fsprogs-1.42         lzo-2.04.tar.gz  zlib-1.2.5

e2fsprogs-1.42.tar.gz  mtd-utils-1.4.9  zlib-1.2.5.tar.bz2

[luxibao@centos mtd-utiles]$ cd mtd-utils-1.4.9

[luxibao@centos mtd-utils-1.4.9]$ ls

common.mk                     flash_lock         jffs-dump.c        nftldump.o

compr.c                       flash_lock.c       lib                nftl_format

compr.h                       flash_lock.o       load_nandsim.sh    nftl_format.c

compr_lzo.c                   flash_otp_dump     make_a_release.sh  nftl_format.o

compr_lzo.o                   flash_otp_dump.c   MAKEDEV            rbtree.c

compr.o                       flash_otp_dump.o   Makefile           rbtree.h

compr_rtime.c                 flash_otp_info     mcast_image.h      rbtree.o

compr_rtime.o                 flash_otp_info.c   mkfs.jffs2        recv_image

compr_zlib.c                  flash_otp_info.o   mkfs.jffs2.1       recv_image.c

compr_zlib.o                  flash_otp_lock.c   mkfs.jffs2.c       recv_image.o

COPYING                       flash_otp_write.c  mkfs.jffs2.o       rfddump

device_table.txt              flash_unlock       mkfs.ubifs         rfddump.c

docfdisk                      flash_unlock.c     mtd_debug          rfddump.o

docfdisk.c                    flash_unlock.o     mtd_debug.c        rfdformat

docfdisk.o                    ftl_check          mtd_debug.o        rfdformat.c

doc_loadbios                  ftl_check.c        mtd-utils.spec     rfdformat.o

doc_loadbios.c                ftl_check.o        nanddump           serve_image

doc_loadbios.o                ftl_format         nanddump.c         serve_image.c

feature-removal-schedule.txt  ftl_format.c       nanddump.o         serve_image.o

fectest.c                     ftl_format.o       nandtest           summary.h

flashcp                       include            nandtest.c         sumtool

flashcp.c                     jffs2dump          nandtest.o         sumtool.c

flashcp.o                     jffs2dump.c        nandwrite          sumtool.o

flash_erase                   jffs2dump.o        nandwrite.c        tests

flash_eraseall                jffs2reader        nandwrite.o        ubi-utils

flash_erase.c                 jffs2reader.c      nftldump

flash_erase.o                 jffs2reader.o      nftldump.c

 

[luxibao@centos mtd-utils-1.4.9]$ ls mkfs.ubifs

compr.c  COPYING  crc16.o     devtable.o  lpt.c  mkfs.ubifs    mkfs.ubifs.o  ubifs-media.h

compr.h  crc16.c  defs.h      hashtable   lpt.h  mkfs.ubifs.c  README

compr.o  crc16.h  devtable.c  key.h       lpt.o  mkfs.ubifs.h  ubifs.h

 

[luxibao@centos mtd-utils-1.4.9]$ file mkfs.jffs2

mkfs.jffs2: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, not stripped

 

[luxibao@centos mtd-utils-1.4.9]$ sudo cp mkfs.jffs2 /usr/local/bin/

 

[luxibao@centos mtd-utils-1.4.9]$ mkfs

mkfs          mkfs.ext2     mkfs.ext4     mkfs.jffs2    mkfs.vfat     

mkfs.cramfs   mkfs.ext3     mkfs.ext4dev  mkfs.msdos

[luxibao@centos mtd-utils-1.4.9]$ mkfs.jffs2 -V

mkfs.jffs2: error!: revision 1.60

 

[luxibao@centos mtd-utils-1.4.9]$ mkfs.jffs2

mkfs.jffs2: error!: Usage: mkfs.jffs2 [OPTIONS]

Make a JFFS2 file system image from an existing directory tree

 

Options:

  -p, --pad[=SIZE]        Pad output to SIZE bytes with 0xFF. If SIZE is

                          not specified, the output is padded to the end of

                          the final erase block

  -r, -d, --root=DIR      Build file system from directory DIR (default: cwd)

  -s, --pagesize=SIZE     Use page size (max data node size) SIZE (default: 4KiB)

  -e, --eraseblock=SIZE   Use erase block size SIZE (default: 64KiB)

  -c, --cleanmarker=SIZE  Size of cleanmarker (default 12)

  -m, --compr-mode=MODE   Select compression mode (default: priortiry)

  -x, --disable-compressor=COMPRESSOR_NAME

                          Disable a compressor

  -X, --enable-compressor=COMPRESSOR_NAME

                          Enable a compressor

  -y, --compressor-priority=PRIORITY:COMPRESSOR_NAME

                          Set the priority of a compressor

  -L, --list-compressors  Show the list of the avaiable compressors

  -t, --test-compression  Call decompress and compare with the original (for test)

  -n, --no-cleanmarkers   Don't add a cleanmarker to every eraseblock

  -o, --output=FILE       Output to FILE (default: stdout)

  -l, --little-endian     Create a little-endian filesystem

  -b, --big-endian        Create a big-endian filesystem

  -D, --devtable=FILE     Use the named FILE as a device table file

  -f, --faketime          Change all file times to '0' for regression testing

  -q, --squash            Squash permissions and owners making all files be owned by root

  -U, --squash-uids       Squash owners making all files be owned by root

  -P, --squash-perms      Squash permissions on all files

  -h, --help              Display this help text

  -v, --verbose           Verbose operation

  -V, --version           Display version information

  -i, --incremental=FILE  Parse FILE and generate appendage output for it

 

制作映像文件

[luxibao@centos rootfs]$ sudo /usr/local/bin/mkfs.jffs2 -n -s 2048 -e 128KiB -d rootfs -o rootfs.jffs2 --pad=0x1400000

[luxibao@centos rootfs]$ du -h rootfs.jffs2

20M     rootfs.jffs2

添加ubootjffs2支持

根据上面内核对nandlfash的分区,对uboot的环境参数做相应的设置:

 

[fl2440@lingyun]# set bjffs2 'tftp 30008000 rootfs.jffs2;nand erase 1000000 4000000;nand write.jffs2 30008000 1000000 1400000'

[fl2440@lingyun]# set bootargs_jffs2 'noinitrd root=/dev/mtdblock2 rootfstype=jffs2 init=/linuxrc console=ttyS0,115200'

[fl2440@lingyun]# set bootargs 'noinitrd root=/dev/mtdblock2 rootfstype=jffs2 init=/linuxrc console=ttyS0,115200'

[fl2440@lingyun]# set bootcmd_jffs2 'nand read 30008000 100000 400000;bootm 30008000'

[fl2440@lingyun]# set bootcmd 'run bootcmd_jffs2'

[fl2440@lingyun]# save

Saving Environment to NAND...

Erasing Nand...

Erasing at 0x60000 -- 100% complete.

Writing to Nand... done

[fl2440@lingyun]# pri

bbl=tftp 30008000 u-boot-s3c2440.bin;nand erase 0 100000;nand write 30008000 0 40000

blx=tftp 30008000 linuxrom-s3c2440.bin;nand erase 100000 F00000;nand write 30008000 100000 F00000

tb=tftp 30008000 linuxrom-s3c2440.bin; bootm 30008000

bootdelay=2

baudrate=115200

ethaddr=08:00:3e:26:0a:51

ethact=dm9000

filesize=2BC9B4

fileaddr=30008000

netmask=255.255.255.0

ipaddr=192.168.1.168

serverip=192.168.1.2

bkr=tftp 30008000 linuxrom-s3c2440.bin;nand erase 100000 8000000;nand write 30008000 100000 800000

bootcmd_initramdisk=nand read 30008000 100000 800000;bootm 30008000

stdin=serial

stdout=serial

stderr=serial

bjffs2=tftp 30008000 rootfs.jffs2;nand erase 1000000 4000000;nand write.jffs2 30008000 1000000 1400000

bootargs_jffs2=noinitrd root=/dev/mtdblock2 rootfstype=jffs2 init=/linuxrc console=ttyS0,115200

bootargs=noinitrd root=/dev/mtdblock2 rootfstype=jffs2 init=/linuxrc console=ttyS0,115200

bootcmd_jffs2=nand read 30008000 100000 400000;bootm 30008000

bootcmd=run bootcmd_jffs2

 

Environment size: 988/131068 bytes

[fl2440@lingyun]#  run bkr

dm9000 i/o: 0x20000300, id: 0x90000a46

DM9000: running in 16 bit mode

MAC: 08:00:3e:26:0a:51

could not establish link

operating at 100M full duplex mode

Using dm9000 device

TFTP from server 192.168.1.2; our IP address is 192.168.1.168

Filename 'linuxrom-s3c2440.bin'.

Load address: 0x30008000

Loading: #################################################################

         #################################################################

         #########################

done

Bytes transferred = 2264844 (228f0c hex)

 

NAND erase: device 0 offset 0x100000, size 0x8000000

Skipping bad block at  0x005c0000                                          

Skipping bad block at  0x031a0000                                          

Erasing at 0x80e0000 -- 100% complete.

OK

 

NAND write: device 0 offset 0x100000, size 0x800000

Skip bad block 0x005c0000

 8388608 bytes written: OK

[fl2440@lingyun]# run bjffs2

dm9000 i/o: 0x20000300, id: 0x90000a46

DM9000: running in 16 bit mode

MAC: 08:00:3e:26:0a:51

could not establish link

operating at 100M full duplex mode

Using dm9000 device

TFTP from server 192.168.1.2; our IP address is 192.168.1.168

Filename 'rootfs.jffs2'.

Load address: 0x30008000

Loading: T #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         #################################################################

         ################################################################

done

Bytes transferred = 20971520 (1400000 hex)

 

NAND erase: device 0 offset 0x1000000, size 0x4000000

Skipping bad block at  0x031a0000                                          

Erasing at 0x4fe0000 -- 100% complete.

OK

 

NAND write: device 0 offset 0x1000000, size 0x1400000

 20971520 bytes written: OK

 

 

启动引导

[fl2440@lingyun]# boot

 

NAND read: device 0 offset 0x100000, size 0x400000

 4194304 bytes read: OK

## Booting kernel from Legacy Image at 30008000 ...

   Image Name:   Linux Kernel

   Created:      2016-07-22  13:00:43 UTC

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    2264780 Bytes = 2.2 MiB

   Load Address: 30008040

   Entry Point:  30008040

   Verifying Checksum ... OK

   Loading Kernel Image ... OK

OK

 

Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

Linux version 3.0.0 (leiyuxing@centos6.7.localdomain) (gcc version 4.5.4 (Buildroot 2012.08) ) #7 Fri Jul 22 21:00:28 CST 2016

CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177

CPU: VIVT data cache, VIVT instruction cache

Machine: SMDK2440

Memory policy: ECC disabled, Data cache writeback

CPU S3C2440A (id 0x32440001)

S3C24XX Clocks, Copyright 2004 Simtec Electronics

S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz

CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256

Kernel command line: noinitrd root=/dev/mtdblock2 rootfstype=jffs2 init=/linuxrc console=ttyS0,115200

PID hash table entries: 256 (order: -2, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory: 64MB = 64MB total

Memory: 60184k/60184k available, 5352k reserved, 0K highmem

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)

    vmalloc : 0xc4800000 - 0xf6000000   ( 792 MB)

    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)

    modules : 0xbf000000 - 0xc0000000   (  16 MB)

      .init : 0xc0008000 - 0xc0029000   ( 132 kB)

      .text : 0xc0029000 - 0xc0442000   (4196 kB)

      .data : 0xc0442000 - 0xc0465d40   ( 144 kB)

       .bss : 0xc0465d64 - 0xc049da70   ( 224 kB)

SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

NR_IRQS:85

irq: clearing pending ext status 00080800

irq: clearing pending ext status 00080000

irq: clearing subpending status 00000003

irq: clearing subpending status 00000002

Console: colour dummy device 80x30

console [ttyS0] enabled

Calibrating delay loop... 201.52 BogoMIPS (lpj=503808)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

gpiochip_add: gpios 288..303 (GPIOK) failed to register

gpiochip_add: gpios 320..334 (GPIOL) failed to register

gpiochip_add: gpios 352..353 (GPIOM) failed to register

NET: Registered protocol family 16

S3C Power Management, Copyright 2004 Simtec Electronics

S3C2440: Initialising architecture

S3C2440: IRQ Support

S3C244X: Clock Support, DVS off

bio: create slab <bio-0> at 0

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

s3c-i2c s3c2440-i2c: slave address 0x10

s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz

s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter

Advanced Linux Sound Architecture Driver Version 1.0.24.

cfg80211: Calling CRDA to update world regulatory domain

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

RPC: Registered named UNIX socket transport module.

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

NetWinder Floating Point Emulator V0.97 (extended precision)

NTFS driver 2.1.30 [Flags: R/W].

JFFS2 version 2.2. (NAND) 2001-2006 Red Hat, Inc.

ROMFS MTD (C) 2007 Red Hat, Inc.

msgmni has been set to 117

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

Console: switching to colour frame buffer device 60x53

fb0: s3c2410fb frame buffer device

s3c2440-uart.0: ttyS0 at MMIO 0x50000000 (irq = 70) is a S3C2440

s3c2440-uart.1: ttyS1 at MMIO 0x50004000 (irq = 73) is a S3C2440

s3c2440-uart.2: ttyS2 at MMIO 0x50008000 (irq = 76) is a S3C2440

brd: module loaded

loop: module loaded

S3C24XX NAND Driver, (c) 2004 Simtec Electronics

s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns

s3c24xx-nand s3c2440-nand: NAND soft ECC

NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)

Scanning device for bad blocks

Bad eraseblock 46 at 0x0000005c0000

Bad eraseblock 397 at 0x0000031a0000

Creating 6 MTD partitions on "NAND":

0x000000000000-0x000000100000 : "mtdblock0 u-boot 1MB"

0x000000100000-0x000001000000 : "mtdblock1 kernel 15MB"

0x000001000000-0x000005000000 : "mtdblock2 rootfs 64MB"

0x000005000000-0x00000a000000 : "mtdblock3 apps 80MB"

0x00000a000000-0x00000d000000 : "mtdblock4 data 48MB"

0x00000d000000-0x000010000000 : "mtdblock5 backup 48MB"

dm9000 Ethernet Driver, V1.31

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

s3c2410-ohci s3c2410-ohci: S3C24XX OHCI

s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1

s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 2 ports detected

usbcore: registered new interface driver libusual

s3c2410_udc: debugfs dir creation failed -19

mousedev: PS/2 mouse device common for all mice

S3C24XX RTC, (c) 2004,2006 Simtec Electronics

i2c /dev entries driver

sdhci: Secure Digital Host Controller Interface driver

sdhci: Copyright(c) Pierre Ossman

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 17

lib80211: common routines for IEEE802.11 drivers

Registering the dns_resolver key type

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

usb 1-1: new full speed USB device number 2 using s3c2410-ohci

usb 1-1: device descriptor read/64, error -62

usb 1-1: device descriptor read/64, error -62

usb 1-1: new full speed USB device number 3 using s3c2410-ohci

usb 1-1: device descriptor read/64, error -62

VFS: Mounted root (jffs2 filesystem) on device 31:2.

Freeing init memory: 132K

usb 1-1: device descriptor read/64, error -62

usb 1-1: new full speed USB device number 4 using s3c2410-ohci

usb 1-1: device not accepting address 4, error -62

usb 1-1: new full speed USB device number 5 using s3c2410-ohci

usb 1-1: device not accepting address 5, error -62

hub 1-0:1.0: unable to enumerate USB device on port 1

 

Copyright (C) 2016 Reagan

root login: root

Password:

>: ls

apps     data     etc      init     linuxrc  proc     sbin     tmp      var

bin      dev      info     lib      mnt      root     sys      usr

 

 到此制作完成

 

 

 

#制作是遇到的问题和解决办法:

1.交叉编译的时候缺少glibc-static库


解决:

[luxibao@centos rootfs]$ sudo yum install glibc-static

已加载插件:fastestmirror, refresh-packagekit, security

设置安装进程

Loading mirror speeds from cached hostfile

 * base: mirror.readyspace.com

 * extras: mirror.readyspace.com

 * updates: mirror.vastspace.net

解决依赖关系

--> 执行事务检查

---> Package glibc-static.x86_64 0:2.12-1.192.el6 will be 安装

--> 处理依赖关系 glibc-devel = 2.12-1.192.el6,它被软件包 glibc-static-2.12-1.192.el6.x86_64 需要

--> 执行事务检查

---> Package glibc-devel.x86_64 0:2.12-1.166.el6 will be 升级

---> Package glibc-devel.x86_64 0:2.12-1.192.el6 will be an update

--> 处理依赖关系 glibc-headers = 2.12-1.192.el6,它被软件包 glibc-devel-2.12-1.192.el6.x86_64 需要

--> 处理依赖关系 glibc = 2.12-1.192.el6,它被软件包 glibc-devel-2.12-1.192.el6.x86_64 需要

--> 执行事务检查

---> Package glibc.x86_64 0:2.12-1.166.el6 will be 升级

--> 处理依赖关系 glibc = 2.12-1.166.el6,它被软件包 glibc-common-2.12-1.166.el6.x86_64 需要

---> Package glibc.x86_64 0:2.12-1.192.el6 will be an update

---> Package glibc-headers.x86_64 0:2.12-1.166.el6 will be 升级

---> Package glibc-headers.x86_64 0:2.12-1.192.el6 will be an update

--> 执行事务检查

---> Package glibc-common.x86_64 0:2.12-1.166.el6 will be 升级

---> Package glibc-common.x86_64 0:2.12-1.192.el6 will be an update

--> 处理依赖关系 tzdata >= 2015g-4,它被软件包 glibc-common-2.12-1.192.el6.x86_64 需要

--> 执行事务检查

---> Package tzdata.noarch 0:2015e-1.el6 will be 升级

---> Package tzdata.noarch 0:2016f-1.el6 will be an update

--> 完成依赖关系计算

 

依赖关系解决

 

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

 软件包                架构           版本                      仓库             大小

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

正在安装:

 glibc-static          x86_64         2.12-1.192.el6            base            1.4 M

为依赖而更新:

 glibc                 x86_64         2.12-1.192.el6            base            3.8 M

 glibc-common          x86_64         2.12-1.192.el6            base             14 M

 glibc-devel           x86_64         2.12-1.192.el6            base            988 k

 glibc-headers         x86_64         2.12-1.192.el6            base            617 k

 tzdata                noarch         2016f-1.el6               updates         452 k

 

事务概要

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

Install       1 Package(s)

Upgrade       5 Package(s)

 

总下载量:21 M

确定吗?[y/N]:y

下载软件包:

(1/6): glibc-2.12-1.192.el6.x86_64.rpm                         | 3.8 MB     01:04     

(2/6): glibc-common-2.12-1.192.el6.x86_64.rpm                  |  14 MB     00:29     

(3/6): glibc-devel-2.12-1.192.el6.x86_64.rpm                   | 988 kB     00:02     

(4/6): glibc-headers-2.12-1.192.el6.x86_64.rpm                 | 617 kB     00:01     

(5/6): glibc-static-2.12-1.192.el6.x86_64.rpm                  | 1.4 MB     00:15     

(6/6): tzdata-2016f-1.el6.noarch.rpm                           | 452 kB     00:01     

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

总计                                                  179 kB/s |  21 MB     02:02     

运行 rpm_check_debug

执行事务测试

事务测试成功

执行事务

  正在升级   : tzdata-2016f-1.el6.noarch                                         1/11

  正在升级   : glibc-common-2.12-1.192.el6.x86_64                                2/11

  正在升级   : glibc-2.12-1.192.el6.x86_64                                       3/11

  正在升级   : glibc-headers-2.12-1.192.el6.x86_64                               4/11

  正在升级   : glibc-devel-2.12-1.192.el6.x86_64                                 5/11

  正在安装   : glibc-static-2.12-1.192.el6.x86_64                                6/11

  清理       : glibc-devel-2.12-1.166.el6.x86_64                                 7/11

  清理       : glibc-headers-2.12-1.166.el6.x86_64                               8/11

  清理       : glibc-common-2.12-1.166.el6.x86_64                                9/11

  清理       : glibc-2.12-1.166.el6.x86_64                                      10/11

  清理       : tzdata-2015e-1.el6.noarch                                        11/11

  Verifying  : glibc-devel-2.12-1.192.el6.x86_64                                 1/11

  Verifying  : glibc-headers-2.12-1.192.el6.x86_64                               2/11

  Verifying  : glibc-2.12-1.192.el6.x86_64                                       3/11

  Verifying  : glibc-static-2.12-1.192.el6.x86_64                                4/11

  Verifying  : glibc-common-2.12-1.192.el6.x86_64                                5/11

  Verifying  : tzdata-2016f-1.el6.noarch                                         6/11

  Verifying  : glibc-common-2.12-1.166.el6.x86_64                                7/11

  Verifying  : glibc-2.12-1.166.el6.x86_64                                       8/11

  Verifying  : tzdata-2015e-1.el6.noarch                                         9/11

  Verifying  : glibc-headers-2.12-1.166.el6.x86_64                              10/11

  Verifying  : glibc-devel-2.12-1.166.el6.x86_64                                11/11

 

已安装:

  glibc-static.x86_64 0:2.12-1.192.el6                                                

 

作为依赖被升级:

  glibc.x86_64 0:2.12-1.192.el6            glibc-common.x86_64 0:2.12-1.192.el6      

  glibc-devel.x86_64 0:2.12-1.192.el6      glibc-headers.x86_64 0:2.12-1.192.el6     

  tzdata.noarch 0:2016f-1.el6             

 

完毕!

 

安装完毕后重新从[lingyun@localhost opt]$ mkdir mtd-utiles

开始做。

 

 

2.路径设置不对:

[lingyun@localhost linux-3.0]$ make menuconfig

。 。 。 。 。 。

General setup  --->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
(/opt/rootfs) Initramfs source file(s)   

解决:/opt/rootfs    改为  home/fl2440/rootfs/rootfs

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值