Port ubifs File System of PXA270 (XScale core)

Source: Internet
Author: User

 

1. Create a directory

(1) mkdir busybox-rootfs

CD busybox-rootfs

Mkdir bin Dev etc home lib MNT opt proc root sbin sys tmp usr VaR

(2) Compile commands and library files compiled from busybox into the corresponding folder.

(3) configure the inittab file under the etc directory

: Sysinit:/etc/init. d/rc. s

: Once:/usr/sbin/telnetd

: Respawn:/sbin/Getty-l ttys0 115200 VT100

(4) configure the/etc/init. d/rc. s file

#! /Bin/sh

#

/Bin/Mount-T sysfssysfs/sys

#

/Bin/Mount-T proc/proc

#

/Bin/Mount-T tmpfstmpfs/tmp

#

/Bin/Mount-T tmpfstmpfs/root

#

/Bin/Mount-T tmpfstmpfs/var

CD/var

/Bin/mkdir-P cache liblocal lock log mail opt run spool TMP

#

/Bin/Mount-T tmpfstmpfs/dev

/Bin/mkdir-P/dev/PTS

/Bin/Mount-T devptsdevpts/dev/PTS

Echo/sbin/mdev>/proc/sys/kernel/hotplug

/Sbin/mdev-S

#

/Sbin/modprobe bondingmiimon = 200

/Sbin/modprobe dm9000

#

Echo active-Backup>/sys/class/NET/bond0/Bonding/Mode

/Sbin/ifconfig bond0168.3.0.47 netmask running 255.255.0 up

Echo + eth0>/sys/class/NET/bond0/Bonding/slaves

Echo + eth1>/sys/class/NET/bond0/Bonding/slaves

#

/Bin/hostname hepxa270

#

/Bin/IP link set can0 uptype can bitrate 125000 restart-MS 100

/Bin/IP link set can1 uptype can bitrate 125000 restart-MS 100

 

2. Compile

Execute sh busybox-rootfs.sh to compile and generate file rootfs. img

Busybox-rootfs.sh File Content

#! /Bin/sh

Mkfs. ubifs-rbusybox-rootfs-M 1-e 262016-C 112-O ubifs. img

Ubinize-O rootfs. IMG-M1-P 256kib busybox-rootfs.cfg

Rmubifs. img

Note:

-R specifies the folder

-M specifies the minimum I/O operation size, which is the size of a page in nandflash.

-E specifies the size of the logical erased block.

-C specifies the maximum logical block number 262016, that is, kb.

 

Busybox-rootfs.cfg File Content

[Rootfs-volume]

Mode = ubi

Image = ubifs. img

Vol_id = 0

Vol_size = 25mib

Vol_type = dynamic

Vol_name = rootfs

Vol_alignment = 1

Vol_flags = autoresize

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.