问题:最近nand flash 缺货,Micron-MT29F1G08ABADAWP换成MX30LF1G18AC,mfgtool 工具烧写imx28失败,需要重新编译一个update_ivt.sb 文件。
- 解压 文件“L2.6.35_1.1.0_130130_source.tar.gz”
新建文件加,解压源码到新文件加中
mkdir imx28_update
cd imx28_update
tar zxvf L2.6.35_1.1.0_130130_source.tar.gz
- 安装 LTIB
cd L2.6.35_1.1.0_130130_source
./install
y
yes
soure 安装目录
- 编译配置
cd soure/ltib/
./ltib
- boot文件修改
./ltib -m prep -p imx-bootlets-src
解压imx-bootlets-src源码
rpm/BUILD/imx-bootlets-src-2.6.35.3-1.1.0/power_prep/ power_prep.c
120 : #define NO_DCDC_BATT_SOURCE
我的设备没有电池,须定义,保证启动电源正常
修改initramfs 文件系统加载空间大小,及必须大于initramfs.cpio.gz
rpm/BUILD/imx-bootlets-src-2.6.35.3-1.1.0/linux_prep/core/setup.c
params->u.initrd.size = 0x00400000;
改为
params->u.initrd.size = 0x00600000;
rpm/BUILD/imx-bootlets-src-2.6.35.3-1.1.0/update_ivt.sb
load 0.b > 0x40800000..0x40c00000;
改为
load 0.b > 0x40800000..0x40e00000;
rpm/BUILD/imx-bootlets-src-2.6.35.3-1.1.0/update.sb
load 0.b > 0x40800000..0x40c00000;
改为
load 0.b > 0x40800000..0x40e00000;
- kernel 文件修改
添加MX30LF1G18AC nand flash 驱动代码
rpm/BUILD/linux-2.6.35.3/include/linux/mtd/nand.h
465:#define NAND_MFR_MX30LF1G18AC 0xc2
rpm/BUILD/linux-2.6.35.3/drivers/mtd/nand/nand_ids.c
151:{NAND_MFR_MX30LF1G18AC," Micronix"},
rpm/BUILD/linux-2.6.35.3/drivers/mtd/nand/nand_device_info.c
232:
{
.end_of_table = false,
.manufacturer_code = 0xc2,
.device_code = 0xf1,
.cell_technology = NAND_DEVICE_CELL_TECH_SLC,
.chip_size_in_bytes = 128LL*SZ_1M,
.block_size_in_pages = 64,
.page_total_size_in_bytes = 2*SZ_1K + 64,
.ecc_strength_in_bits = 4,
.ecc_size_in_bytes = 512,
.data_setup_in_ns = 20,
.data_hold_in_ns = 10,
.address_setup_in_ns = 20,
.gpmi_sample_delay_in_ns = 6,
.tREA_in_ns = -1,
.tRLOH_in_ns = -1,
.tRHOH_in_ns = -1,
"MX30LF1G18AC",
},
1996:
static struct nand_device_info * __init nand_device_info_fn_mx(const uint8_t id[])
{
if (ID_GET_CELL_TYPE_CODE(id) == ID_CELL_TYPE_CODE_SLC) {
return nand_device_info_search(nand_device_info_table_type_2,
ID_GET_MFR_CODE(id),ID_GET_DEVICE_CODE(id));
}
}
2295:
{
.id = NAND_MFR_MX30LF1G18AC,
.fn = nand_device_info_fn_mx,
},
- 重编译
./ltib –c
拷贝update_ivt.sb 到 Mfgtools-DAC8650-RAC\Profiles\MX28 Linux Update\OS Firmware 目录下
- mfgtool 文件修改
Mfgtools-DAC8650-RAC\Profiles\MX28 Linux Update\OS Firmware\ucl.xml
<CMD type="push" body="$ ubimkvol /dev/ubi0 -n 0 -N rootfs0 -s 90MiB">Creating UBI volumes</CMD>
<CMD type="push" body="$ ubimkvol /dev/ubi0 -n 1 -N data -m">Creating UBI volumes</CMD>
改为:
<CMD type="push" body="$ ubimkvol /dev/ubi0 -n 0 -N rootfs0 -s 94371840">Creating UBI volumes</CMD>
<CMD type="push" body="$ ubimkvol /dev/ubi0 -n 1 -N data -s 10485760">Creating UBI volumes</CMD>
- mfgtool 工具在win7 32位运行正常,其他系统多少有点问题。