# mount /dev/sdb1 /mnt
unable to load NLS charset ascii
FAT: IO charset ascii not found
解决方法:
# dmesg | tail -n 10 //查看出错信息
修改内核
# make menuconfig
-> File systems
--> DOS/FAT/NT Filesystems
--->(936) Default codepageforFAT
--->(utf8) Default iocharset for FAT
制作nandflash(512M)用的系统
# du -sh lenny_base_official/
189M lenny_base_official/
yaffs2:
# mkyaffs2image lenny_base_official/ yaffs.img
Not enough space in object array
Object 5266, lenny_base_official//usr/share/man/man8/netstat.8.gz
原因是 yaffs2 工具的源码限制了文件大小个数为10000 个
修改yaffs2/util/mkyaffs2image.c
#define MAX_OBJECTS 100000 //10000
cramfs:
# mkfs.cramfs lenny_base_official/ rfscm.img
warning:guestimate of required size(upper bound) is 760MB,but maximum image size is 272MB.We might die prematurely.
warning: file sizes truncated to 16MB (minus 1 byte).
是因为 mkfs.cramfs 只能做 272MB 以下的文件,这个文件有760MB那么大,所以做出来的用不了
ubifs(可读写):
# ./mkfs.ubifs -m 2048 -e 126976 -c 2973 -r /media/debian6_firefox7_dx/ -o ubi.img
# vim ubi.cfg
[rootfs]
mode=ubi
image=ubi.img //映像名
vol_id=0 //卷标号
vol_size=360MiB //卷的大小
vol_type=dynamic
vol_name=rootfs //卷标名
vol_flags=autoresize
vol_alignment=1
# ./ubinize -o ubifs.img -p 128KiB -m 2048 -s 2048 ubi.cfg
# ls -sh ubi*
300M ubifs.img 290M ubi.img
启动参数:
console=ttyS0,115200 console=tty ubi.mtd=1,2048 root=ubi0:rootfs rootfstype=ubifs
ubifs 文件系统制作说明:
mkfs.ubifs 的参数的详细说明:mkfs.ubifs -h
mkfs.ubifs 后面的参数值是根据内核提示来的,可先随意添写烧到nand里面启动时出有会参数提示
下面是内核启动的信息
Bad eraseblock 157 at 0x013a0000
Creating 3 MTD partitions on "NAND 512MiB 3,3V 8-bit":
0x00000000-0x00f00000 : "kernel"
0x00f00000-0x18800000 : "yaffs"
0x18800000-0x20000000 : "data"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB) // -p 参数后面要填的值
UBI: logical eraseblock size: 126976 bytes // -e 参数后面要填的值
UBI: smallest flash I/O unit: 2048 // -m 参数后面要填的值
UBI: sub-page size: 512
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd1 to ubi0
UBI: MTD device name: "yaffs"
UBI: MTD device size: 377 MiB
UBI: number of good PEBs: 3015
UBI: number of bad PEBs: 1
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: 3015
UBI: number of PEBs reserved for bad PEB handling: 30
UBI: max/mean erase counter: 1/0
usbmon: debugfs is not available
// -c (参数后面要填的值) 2973=360*1024*1024(卷的大小)/126976 (-e 参数后面要填的值)
修改内核分区
$ vi drivers/mtd/nand/fcr-nand.c
修改分区
$ vi sys/dev/nand/top-nand.c
查看pmon分区
pmon> load /dev/mtd
# apt-get update时出现错误,如下:
W: GPG error: lenny-proposed-updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
aptitude install debian-archive-keyring
或者
gpg --keyserver wwwkeys.pgp.net --recv-keys AED4B06F473041FA
gpg -a --export AED4B06F473041FA |apt-key add -
阅读(2555) | 评论(0) | 转发(0) |