imx28 - Nand booting problem in 2.6.35 with MFGTool

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx28 - Nand booting problem in 2.6.35 with MFGTool

1,279 Views
AndreaSpadoni
Contributor I

Hello IMX Community,

I am trying to boot Linux 2.6.35.3 (Ubuntu 10.04 BSP) on i.MX28 custom board, with UBIFS rootFS on NAND without success.

Background Info:
NAND Device (datasheet in attachment): 8 GiB NAND (Micron mt29f8g08ababawp) - ONFI 2.0 compliant
- Page size x8: 4,320 bytes (4,096 + 224 bytes)
– Block size: 128 pages (512K + 28K bytes)
– Plane size: 2 planes x 1,024 blocks per plane
– Device size: 8Gb: 2,048 blocks

I modified kernel MTD driver files (nand_ids.c, nand_device_info.c) in order to support this NAND device.
In particular, I added in table 2, within nand_device_info.c:

{
.end_of_table = false,
.manufacturer_code = 0x2c,
.device_code = 0x38,
.cell_technology = NAND_DEVICE_CELL_TECH_SLC,
.chip_size_in_bytes = 1LL*SZ_1G,
.block_size_in_pages = 128,
.page_total_size_in_bytes = 4*SZ_1K + 224,
.ecc_strength_in_bits = 16,
.ecc_size_in_bytes = 512,
.data_setup_in_ns = 25,
.data_hold_in_ns = 15,
.address_setup_in_ns = 10,
.gpmi_sample_delay_in_ns = 6,
.tREA_in_ns = -1,
.tRLOH_in_ns = -1,
.tRHOH_in_ns = -1,
"MT29F8G08ABABWP",
},

and in nand_ids.c, I added:
{"NAND 1GiB 3,3V 8-bit", 0x38, 0, 1024, 0, LP_OPTIONS},

Performing:
- /ltib -c
- /ltib -p boot_stream.spec -f

and making the sd, device is recognized during boot from SD and parameters are as intended.

In order to flash the NAND, I tried to follow 3 different ways:

1) Booting from SD with ubifs: within SD, I saved rootfs.ubifs, imx28_ivt_linux.sb (I tried imx28_linux.sb as well) created in order to boot from nand (string command in LTIB: noinitrd console=ttyAM0,115200 ubi.mtd=1 root=ubi0:rootfs0 rootfstype=ubifs rw gpmi).

I performed the following commands:
- flash_eraseall /dev/mtd0
- kobs-ng init imx28_ivt_linux.sb (as well imx28_linux.sb)
- sync
- flash_eraseall /dev/mtd1
- ubiattach /dev/ubi_ctrl -d 0 -m 1
- ubimkvol /dev/ubi0 -N rootfs0 -m
- ubiupdatevol /dev/ubi0_0 rootfs.ubifs
- sync

- mkdir /mnt/ubifs
- mount -t ubifs ubi0:rootfs0 /mnt/ubifs
- and ls -l /mnt/ubifs reported me all the folders the device should needs in order to boot;

Powering off and selecting nand as "boot source device" (I have resistors to select the boot device) and powering on I just obtain on console:
HTL0x8050100b -> which is a CRC problem and so on...

Another detail:
After the procedure described above and creating SD with boot from nand, the device rightly boots, starting from SD (resisitors set up for SD boot mode). It (should) means that contents of nand is fine.

2) MFGTool running in XP (virtual machine):
I tried to use MFGTool as well in order to flash the nand. Connecting the board via usb, the device is correctly recognized from both XP and MFGTool (I follow step-by-step the relevant guide).
I used a modified ucl.xml file, coping the files the tools needs in order to correctly perform the actions.
In particular, Ltib doesn't compile the updater.sb and I had to create updater.sb with the command:
./elftosb -d -z -c updater.bd -o updater.sb
and it doesn't report me problems.

but I needed to comment the part regarding initramfs (I didn't find it in BSP). I don' know if it could led to a problem.
The ucl.xml action sequence crashed in the "Updater" part, with code error n. -22.

Another detail:
MFGTool correctly created the SD.

3) sb_loader.exe running in XP (virtual machine):
Through sb_updater.exe (Utils folder within MfgTools) and using the loader via cmd line:
sb_loader -f imx_linux.sb


It performed some actions (and it seemed that it successfully reached the end). In the end, the results is the same like above (HTL0x8050100b);

Any suggestions is more that welcome.

Thanks,
Andrea

0 Kudos
0 Replies