eMMC Partition by U-boot (i.MX53)

cancel
Showing results for 
Search instead for 
Did you mean: 

eMMC Partition by U-boot (i.MX53)

Jump to solution
19,790 Views
i_MX51EVKSDCard
Contributor II

Hello all,

We have i.MX535 on our custom board with eMMC and

I am wondering if anyone know commands or patches used in U-boot to partition the device,

any comments or suggestions?

Thank you

Labels (1)
1 Solution
6,914 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Puneet,

      At present, we use MFG Tools to burn image into eMMC card or iNAND Flash. there is also another tool name cimager , which is used to burn images to SD card. But they both works on linux .

      For mfg tool, there is OS Firmware directory, entering this dir, you can find u-boot and uImage, they are used to create linux basical system in memory , then run dd command to copy u-boot.bin and uImage which are in OS firmware/files path. to iNAND FLASH or SD card.

     But in u-boot , no suitable command liks fdisk in linux is for partition of eMMC card.

     Sometimes, you can also use tftp and NFS to boot your system, then mount your eMMC device to system, and run fdisk command on console to do partition of your eMMC card.

   <Note: MFG Tool and cimager can both be downloaded from freescale official website >

Regards,

weidong

View solution in original post

11 Replies
6,914 Views
winstonrodrigue
Contributor IV

Dear Weidong Sun,

          I have a issue in my IMX53 SMD rev B board..

I am able to boot from SD card without any problem.. SD card had u-boot.bin, uImage and filesystem..

   these are the u-boot env variables...

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

      setenv loadaddr 0x70800000 

      setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 ip=none rootfstype=ext4'

      setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 0; mmc read ${loadaddr} 0x800 0x1800; bootm'

      setenv bootcmd 'run bootcmd_mmc'

      saveenv

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

     

But We do not want to use SD card in our end product. So I want to boot from iNand (SanDisk 8GB on board flash).

   So far I am able to boot the u-boot and uImage from iNand flash. But the problem is... it gets struck at this below point whern mounting the root partition...

mxc_rtc mxc_rtc.0: setting system clock to 1970-01-01 00:01:10 UTC (70)

Root-NFS: No NFS server available, giving up.

VFS: Unable to mount root fs via NFS, trying floppy.

VFS: Cannot open root device "mmcblk1p1" or unknown-block(2,0)

Please append a correct "root=" boot option; here are the available partitions:

1f00             256 mtdblock0 (driver?)

1f01            3840 mtdblock1 (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

[<800f4538>] (unwind_backtrace+0x0/0xf0) from [<80497a64>] (panic+0x6c/0xe0)

[<80497a64>] (panic+0x6c/0xe0) from [<80008ddc>] (mount_block_root+0x1cc/0x20c)

[<80008ddc>] (mount_block_root+0x1cc/0x20c) from [<80009028>] (prepare_namespace+0x11c/0x174)

[<80009028>] (prepare_namespace+0x11c/0x174) from [<800084a0>] (kernel_init+0x120/0x168)

[<800084a0>] (kernel_init+0x120/0x168) from [<800f09e0>] (kernel_thread_exit+0x0/0x8)

mmc2: Timeout waiting for hardware interrupt.

mxsdhci: ============== REGISTER DUMP ==============

mxsdhci: Sys addr: 0x00000000 | Version:  0x00001201

mxsdhci: Blk size: 0x00000000 | Blk cnt:  0x00000001

mxsdhci: Argument: 0x00010000 | Trn mode: 0x09090000

mxsdhci: Present:  0xff880008 | Host ctl: 0x00000121

mxsdhci: Clock:    0x008010ff

mxsdhci: Int stat: 0x00000000

mxsdhci: Int enab: 0x117f010f | Sig enab: 0x117f000f

mxsdhci: Caps:     0x07f30000

mxsdhci: ===========================================

And these are the u-boot environmental variables i set while booting from the iNAND flash.

      setenv loadaddr 0x70800000 

      setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk1p1 ip=none rootfstype=ext4'

      setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; mmc dev 0; mmc read ${loadaddr} 0x800 0x1800; bootm'

      setenv bootcmd 'run bootcmd_mmc'

      saveenv

-----------------------------------------------------------------------------------------------------------------------------------------------------------

bootlog says VFS: Cannot open root device "mmcblk1p1" or unknown-block(2,0) which means iNAND device is not recognized.

But when I boot from SD card and when I do cat /proc/partitions i can see mmcblk1,mmcblk0 both the devices. but during the bootup kernel doesnt recognize the mmcblk1p1 partition why ??

This is how I have done :

1. first booted form SD card

2. then copied u-boot and uImage to mmcblk1 using dd command

3. made a partiton using fdisk /dev/mmcblk1

4. formatted the partition using mkfs.ext4 /dev/mmcblk1p1

5. then i copied the rootfs to mmcblk1p1 partiotion.

6. then set bootconfig to (SW26 and SW28) to eMMC boot.

7. then boot.

Thanks...

Winston

0 Kudos
6,913 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Puneet ,

    u-boot for i.mx53 should be burned into eMMC card , The address from 0x0 to 1M is reserved for u-boot. customer can use MFG Tool to burn u-boot into this address space.

    So you don't need to make partition for u-boot. Normally, Partitions are only used for file system.

Regards,

weidong

0 Kudos
6,913 Views
i_MX51EVKSDCard
Contributor II

Hello Weidong,

Thanks for the reply

I have u-boot running on the eMMC (packaged NAND flash memory with eMMC interface), but I was wondering if there is way to partition rest of the chip using U-boot commands.

What's the best way to program in-circuit IC (eMMC) with Kernel and file system?

Thank you

0 Kudos
6,915 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Puneet,

      At present, we use MFG Tools to burn image into eMMC card or iNAND Flash. there is also another tool name cimager , which is used to burn images to SD card. But they both works on linux .

      For mfg tool, there is OS Firmware directory, entering this dir, you can find u-boot and uImage, they are used to create linux basical system in memory , then run dd command to copy u-boot.bin and uImage which are in OS firmware/files path. to iNAND FLASH or SD card.

     But in u-boot , no suitable command liks fdisk in linux is for partition of eMMC card.

     Sometimes, you can also use tftp and NFS to boot your system, then mount your eMMC device to system, and run fdisk command on console to do partition of your eMMC card.

   <Note: MFG Tool and cimager can both be downloaded from freescale official website >

Regards,

weidong

6,914 Views
i_MX51EVKSDCard
Contributor II

Hi Weidong,

MFG tools or CIMAGER, can they be used with custom board over serial port?

Thanks,

0 Kudos
6,914 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Puneet,

      MFG Tool and cfimger are both tools for cusotmer to develope or manufacture their products. These tools are provided to customer by freescale and any cusotmer of freescale can freely download them from FSL's official website.

      MFG tool burns images via USB OTG port. cfimager tool is used to burn images into SD card, you should insert SD card to your PC , then use it burn images into SD.

  

      I recommend you should focus on how to use MFG Tool.

Weidong

0 Kudos
6,914 Views
i_MX51EVKSDCard
Contributor II

Hello Weidong,

On our custom board we don't have the USB working yet, so I guess I can't use MFG tools unless there is MFG tools version runs over RS232 serial port?

Any suggestion in the case of no USB?

Thanks,

0 Kudos
6,914 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Puneet,

     If you can burn u-boot into SD card or NAND Flash, other steps should be easy. for example, you can use NFS to boot your board, and all operations like burning image,file system etc,can be done under NFS envronment.

     But Did you burn u-boot into flash successfully ?

Regards,

Weidong

0 Kudos
6,914 Views
i_MX51EVKSDCard
Contributor II

Hi Weidong,

I booted of the SD card and copied the u-boot to eMMC but, when I boot off eMMC, somehow the environment variables don't seem to be the ones which I have on the SD card i.e. I see default environment...not sure why that is?

NFS requires ethernet interface to be working. At u-boot level we tried OBDS ethernet loopback test to validate the interface but it does not work. So I guess we can't use NFS, correct?

Thanks for your help,

0 Kudos
6,914 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Puneet,

     Would you please sent your schematic to me ? Let me see !  weidong.sun@freescale.com

Regards,

Weidong

0 Kudos
6,914 Views
i_MX51EVKSDCard
Contributor II

Thanks Weidong

Regards

0 Kudos