Booting PhyTec PCM043/IMX35 from USB/SD-Card

Peter sailingsmoky at googlemail.com
Thu Aug 23 13:59:55 EDT 2012


Am 28.06.2012 12:43, schrieb Sascha Hauer:
> On Thu, Jun 28, 2012 at 08:53:32AM +0200, Peter Kuennemann at Crane-Soft wrote:
>>>
>>> Has this been solved in the mean time? The above looks correct, I have
>>> no idea what's wrong.

...

>> However, I still cannot access the mmc from barebox. It would be enough to be able to
>> read the mmc. I want to be able to store kernel or rootfs image updates on the mmc
>> and flash them to either NAND or NOR after reboot to enable remote update services.
>>
>> Question: "How can I access the MMC from barebox (read only may be sufficient)
> 
> The pcm043 currently does not have mmc support. You have to add this to
> the board file:
> 
> imx35_add_mmc0(NULL);
> 
> or
> 
> imx35_add_mmc1(NULL);
> 
> depending on which port is routed to the slot. Also you have to setup
> the iomuxer (you can probably copy the pin settings from the kernel). Of
> course you also have to enable MMC support in the config.
> 
> Sascha
> 
Sascha I'ld like to pick up this thread again abd I hope that someone can
give me the hint to help me out here.

I managed to access the mmc applying your hints above. The card seem to
appear correctly with all it's partitions:

---
imx-esdhc at mci0: registered as mci0
mci at mci0: registered disk0
ehci at ehci0: USB EHCI 1.00
---
barebox:/ ls /dev
defaultenv             disk0                  disk0.0
disk0.1                env0                   full
---
I am able to boot the kernel from NOR flash and use the mmc as rootfs. However
I did not yet find a way to boot the kernel from the MMC. I set up the MMC
with 255 heads, 63 sectors/track, 245 cylinders and formated partition 1 as
VFAT and made it bootable. I then copied uImage to it. Partition 2 contains
the rootfs which can be used when booting the kernel from flash.

Barebox /env/config contains: (besides others)
...
 kernel_loc=disk
 rootfs_loc=disk
 rootfs_type=ext2
 rootfs_part_linux_dev=mmcblk0p2
 kernel_part=disk0.0
...

Trying to boot results in:
booting kernel from /dev/disk0.0

and then followed by the barebox prompt.

barebox:/

Kernel parameters are: console=ttymxc0,115200 video=mx3fb:CTP-CLAA070LC0ACW ip=dhcp root=/dev/mmcblk0p2 rootfstype=ext2 noinitrd rootwait
mtdparts=physmap-flash.0:256k(barebox)ro,128k(bareboxenv),2M(kernel),-(root);:256k(barebox)ro,128k(bareboxenv),2M(kernel),-(root)

A little help would be very much appreciated.

Regards and many thanks for your support.

Peter



More information about the barebox mailing list