關於移植根文件系統時([\u@\h \W]\# )的處理方法

咱們常常用busybox生成根文件系統,但是根文件系統起來之後命令行提示符只有一個「#」號,沒有像linux發行版那樣是[user@hostname currentpath] #,那麼咱們這裏就說說如何讓咱們的根文件系統按這個方式顯示。
要修改命令行提示符,首先咱們須要知道一個環境變量PS1,咱們能夠查看bash的幫助文檔查看關於PS1的說明:
bash有兩級命令提示符,咱們這裏說的是第一級,這一級缺省的提示符是字符「$」(超級用戶是「#」),咱們能夠經過修改PS1修改這個提示符,格式爲:
        PS1=」command list」
命令列表有不少參數以下:
        \! 顯示該命令的歷史記錄編號。
        \# 顯示當前命令的命令編號。
        \$ 顯示$符做爲提示符,若是用戶是root的話,則顯示#號。
        \\ 顯示反斜槓。
        \d 顯示當前日期。
        \h 顯示主機名。
        \n 打印新行。
        \nnn 顯示nnn的八進制值。
        \s 顯示當前運行的shell的名字。
        \t 顯示當前時間。
        \u 顯示當前用戶的用戶名。
        \W 顯示當前工做目錄的名字。
        \w 顯示當前工做目錄的路徑
咱們查看咱們發行版linux中的PS1.
$echo echo $PS1
        [\u@\h \W] \$
看了發行版是如何顯示命令行提示符,那麼咱們再看一下爲何咱們作的根文件系統只顯示一個#,用busybox生成的根文件系統使用的是ash,咱們看下busybox中關於ash的文件
在busybox-1.15.4/shell/ash.h中有這樣的語句
/*
        * PS1 depends on uid
        */
#if ENABLE_FEATURE_EDITING && ENABLE_FEATURE_EDITING_FANCY_PROMPT
        vps1.text = "PS1=\\w \\$ ";
#else
        if (!geteuid())
                vps1.text = "PS1=# ";
#endif
結合上面PS1參數咱們能夠看出在busybox生成的根文件系統中可能出現兩種顯示方式,一種是「currentpath $」另外一種是 「#」這兩種顯示在較老的版本中都有。
按照上面的方法修改咱們的根文件系統中的命令行提示符。首先咱們須要修改buxybox中配置,添加以下兩個選項:
Busybox Settings --->
                Busybox Library Tuning --->
                        [*] Username completion
                        [*] Fancy shell prompts
若是不選擇上面兩項,文件系統是否是別PS1這個環境變量的參數的。
建立/etc/hostname添加以下內容(咱們的主機名):
        farsight
修改/etc/init.d/rcS添加以下內容(導入主機名配置文件):
        /bin/hostname –F /etc/hostname
修改根文件系統中/etc/profile文件添加以下內容:
HOSTNAM=`/bin/hostname`
        PS1=`[\u@\h \W]\# `
        export PS1 HOSTNAME
建立/etc/passwd添加以下內容:
        root:x:0:0:root:/root:/bin/sh
這個時候咱們從新啓動咱們的開發板會發現命令行提示符已是咱們想要的那種現實了:
        [root@farsight /etc] #
給出個人實驗過程的打印信息
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:85
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MINI2440: Option string mini2440=0tb
MINI2440: 't' ignored, touchscreen not compiled in
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
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.23.
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
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: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
at24 0-0050: 1024 byte 24c08 EEPROM (writable)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000050000 : "u-boot"
0x000000050000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000004000000 : "root"
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size:   16384 bytes (16 KiB)
UBI: logical eraseblock size:    15872 bytes
UBI: smallest flash I/O unit:    512
UBI: sub-page size:              256
UBI: VID header offset:          256 (aligned 256)
UBI: data offset:                512
UBI: max. sequence number:       1307
UBI: attached mtd3 to ubi0
UBI: MTD device name:            "root"
UBI: MTD device size:            58 MiB
UBI: number of good PEBs:        3752
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       92
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: 3752
UBI: number of PEBs reserved for bad PEB handling: 37
UBI: max/mean erase counter: 4/1
UBI: image sequence number:  0
UBI: background thread "ubi_bgt0d" started, PID 677
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0: dm9000e at c4886300,c488a304 IRQ 51 MAC: 00:00:00:00:00:00 (chip)
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
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
s3c-rtc s3c2410-rtc: setting system clock to 2000-05-13 01:01:51 UTC (958179711)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   58440704 bytes (57071 KiB, 55 MiB, 3682 LEBs)
UBIFS: journal size:       8110592 bytes (7920 KiB, 7 MiB, 511 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 136K
/etc/init.d/rcS: line 20: tarp: not found
ifconfig: SIOCSIFFLAGS: Cannot assign requested address
ln: tty0: File exists
Please press Enter to activate this console.
[\u@\h \W]\#
[\u@\h \W]\#
[\u@\h \W]\#
[\u@\h \W]\# tftp ubifs11.img
BusyBox v1.13.3 (2010-06-04 22:52:32 CST) multi-call binary
Usage: tftp [OPTION]... HOST [PORT]
Transfer a file from/to tftp server
Options:
        -l FILE Local FILE
        -r FILE Remote FILE
        -g      Get file
        -p      Put file
        -b SIZE Transfer blocks of SIZE octets
[\u@\h \W]\# tftp ubifs11.img
U-Boot 2010.06-rc1-00073-g54841ab-dirty (Jan 10 2011 - 17:27:06)
DRAM:  64 MiB
Flash: 2 MiB
NAND:  64 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dm9000
arch type: 1999
Hit any key to stop autoboot:  0
[mini2440]#
[mini2440]#
[mini2440]# tftp ubifs11.img
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
operating at unknown: 0 mode
Using dm9000 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.6
Filename 'ubifs11.img'.
Load address: 0x30008000
Loading: T #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################
done
Bytes transferred = 4094976 (3e7c00 hex)
[mini2440]# ubi write 0x30008000 rootfs 0x3e7c00
mtdparts variable not set, see 'help mtdparts'
Error, no UBI device/partition selected!
[mini2440]# mtdpart
mtdparts variable not set, see 'help mtdparts'
no partitions defined
defaults:
mtdids  : nand0=nandflash0
mtdparts: mtdparts=nandflash0:320k@0(uboot),64k(params),5m(kernel),-(root)
[mini2440]# mtdpart default
[mini2440]# mtdpart
device nand0 <nandflash0>, # parts = 4
 #: name                size            offset          mask_flags
 0: uboot               0x00050000      0x00000000      0
 1: params              0x00010000      0x00050000      0
 2: kernel              0x00500000      0x00060000      0
 3: root                0x03aa0000      0x00560000      0
active partition: nand0,0 - (uboot) 0x00050000 @ 0x00000000
defaults:
mtdids  : nand0=nandflash0
mtdparts: mtdparts=nandflash0:320k@0(uboot),64k(params),5m(kernel),-(root)
[mini2440]# nand erase root
NAND erase: device 0 offset 0x560000, size 0x3aa0000
Erasing at 0x3ffc00000000000 --   0% complete.
OK
[mini2440]# ubi part root
Creating 1 MTD partitions on "nand0":
0x5600003304698c-0x400000000000000 : "<NULL>"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   16384 bytes (16 KiB)
UBI: logical eraseblock size:    15872 bytes
UBI: smallest flash I/O unit:    512
UBI: sub-page size:              256
UBI: VID header offset:          256 (aligned 256)
UBI: data offset:                512
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI: create volume table (copy #2)
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            249108103168 MiB
UBI: number of good PEBs:        3752
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       92
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             3711
UBI: total number of reserved PEBs: 41
UBI: number of PEBs reserved for bad PEB handling: 37
UBI: max/mean erase counter: 1/0
[mini2440]# ubi create rootfs
Creating dynamic volume rootfs of size 58900992
[mini2440]# tftp ubifs22.img
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:00:3e:26:0a:5b
operating at unknown: 0 mode
Using dm9000 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.6
Filename 'ubifs22.img'.
Load address: 0x30008000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####################################################
done
Bytes transferred = 20808192 (13d8200 hex)
[mini2440]# ubi write 0x30008000 roofs 0x13d8200
roofs volume not found
[mini2440]# mtdpart
device nand0 <nandflash0>, # parts = 4
 #: name                size            offset          mask_flags
 0: uboot               0x00050000      0x00000000      0
 1: params              0x00010000      0x00050000      0
 2: kernel              0x00500000      0x00060000      0
 3: root                0x03aa0000      0x00560000      0
active partition: nand0,0 - (uboot) 0x00050000 @ 0x00000000
defaults:
mtdids  : nand0=nandflash0
mtdparts: mtdparts=nandflash0:320k@0(uboot),64k(params),5m(kernel),-(root)
[mini2440]# ubi write 0x30008000 rootfs 0x13d8200
Volume "rootfs" found at volume id 0
[mini2440]# boot
NAND read: device 0 offset 0x60000, size 0x500000
 5242880 bytes read: OK
## Booting kernel from Legacy Image at 30008000 ...
   Image Name:   Linux Kernel Image
   Created:      2011-01-18   6:56:00 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2218728 Bytes = 2.1 MiB
   Load Address: 30008000
   Entry Point:  30008040
   Verifying Checksum ... OK
   XIP Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36.3 (root@songzi) (gcc version 4.4.3 (ctng-1.6.1) ) #5 Tue Ja
n 18 14:50:35 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
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: ubi.mtd=3 root=ubi0:rootfs console=ttySAC0,115200 mem=64M r
ootfstype=ubifs rw
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: 60440k/60440k available, 5096k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xe0000000   ( 440 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc002a000   ( 136 kB)
      .text : 0xc002a000 - 0xc03f4000   (3880 kB)
      .data : 0xc040c000 - 0xc042dc80   ( 136 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:85
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MINI2440: Option string mini2440=0tb
MINI2440: 't' ignored, touchscreen not compiled in
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
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.23.
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 udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
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: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
at24 0-0050: 1024 byte 24c08 EEPROM (writable)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000050000 : "u-boot"
0x000000050000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000004000000 : "root"
UBI: attaching mtd3 to ubi0
UBI: physical eraseblock size:   16384 bytes (16 KiB)
UBI: logical eraseblock size:    15872 bytes
UBI: smallest flash I/O unit:    512
UBI: sub-page size:              256
UBI: VID header offset:          256 (aligned 256)
UBI: data offset:                512
UBI: max. sequence number:       1294
UBI: attached mtd3 to ubi0
UBI: MTD device name:            "root"
UBI: MTD device size:            58 MiB
UBI: number of good PEBs:        3752
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       92
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: 3752
UBI: number of PEBs reserved for bad PEB handling: 37
UBI: max/mean erase counter: 4/1
UBI: image sequence number:  0
UBI: background thread "ubi_bgt0d" started, PID 677
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c4886300,c488a304 IRQ 51 MAC: 08:00:3e:26:0a:5b (chip)
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
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
s3c-rtc s3c2410-rtc: setting system clock to 2000-05-13 01:17:00 UTC (958180620)
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size:   58440704 bytes (57071 KiB, 55 MiB, 3682 LEBs)
UBIFS: journal size:       8110592 bytes (7920 KiB, 7 MiB, 511 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
Freeing init memory: 136K
/etc/init.d/rcS: line 20: tarp: not found
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
ln: tty0: File exists
Please press Enter to activate this console.
[root@songzi /]#
[root@songzi /]#
[root@songzi /]# ls
bin      etc      lib      mnt      root     sys      tty0
dev      fs       linuxrc  proc     sbin     tmp      usr
[root@songzi /]# ls
bin      etc      lib      mnt      root     sys      tty0
dev      fs       linuxrc  proc     sbin     tmp      usr
[root@songzi /]# ?
-/bin/sh: ?: not found
[root@songzi /]# cd usr/
[root@songzi /usr]# ls
bin         button      helloworld  listview    pda_kero
bmpbkgnd    dialogbox   listbox     local       sbin
[root@songzi /usr]# ./helloworld
IAL: Does not find the request engine: cosole.
IAL: Use the first engine: dummy
^C[root@songzi /usr]#
[root@songzi /usr]#
[root@songzi /usr]#
[root@songzi /usr]#
[root@songzi /usr]# ls
bin         button      helloworld  listview    pda_kero
bmpbkgnd    dialogbox   listbox     local       sbin
[root@songzi /usr]# ./pda_kero
./pda_kero: line 1: syntax error: "(" unexpected
[root@songzi /usr]#
[root@songzi /usr]#
[root@songzi /usr]# ls
bin         button      helloworld  listview    pda_kero
bmpbkgnd    dialogbox   listbox     local       sbin
[root@songzi /usr]# ./listbox
IAL: Does not find the request engine: cosole.
IAL: Use the first engine: dummyhtml

我用的是ubifs文件系統,根文件系統裏已經整合了我早就移植好的minigui1.6.10,
到這裏你們能夠看到,
 [\u@\h \W]\# 已經變成了[root@songzi /usr]# ,問題已經解決,關鍵就是轉帖中紅色字體標註的地方
至此已經徹底實現u-boot到rootfs到linux到minigui手工定製的,自由修改了!
(
u-boot2010.06.rc1
linux2.6.36.3
busybox1.13.3
minigui1.6.10
mtd-utils-1.4.1
)
(本文轉自電子工程世界:http://www.eeworld.com.cn/qrs/2011/0128/article_4393.html)node

相關文章
相關標籤/搜索