OLinuXino Android / Linux boards and System On Modules > iMX233

Newbie question: can iMx233 Olinuxino-Micro boot from USB?

<< < (2/3) > >>

jGrey:
Hi Mike and lambda,

Thanks for the info you provided. I did use solder to select boot mode, i.e., when D03~D00 is 1001, booting
from micro ASD; and D03~D00 = 0000, from USB. That was printed on the open source schematic. Actually, I have
two iMX233 olinuXino-Micro boards, and one is still using default mode to boot, while the other one is trying
using different mode to boot.

Now, what lambda's input is quite interesting. She says that I should be able to remove the SD-Card to use the slot for other things. Great! Can you explain a little more? What are the steps I should do?

Thanks.

lambda:
Hi jGrey,

I'm using openwrt for my imx233 work so the following description is somewhat openwrt specific, but the general idea schould work with any linux distribution. Maybe you find some useful files at
http://downloads.openwrt.org/snapshots/trunk/mxs/

First you need to prepare a SD-Card with u-boot. This is pretty much the same as installing a kernel: Instead of a linux kernel you might use the file from
http://downloads.openwrt.org/snapshots/trunk/mxs/uboot-mxs-mx23_olinuxino.sb
or any other u-boot image you compile yourself.

Note: It is perfectly possible to install u-boot and a linux distribution (as fallback if no usb device is detected) on the same SD-Card - just create enough partitions. U-boot is scriptable with a shell like syntax, which allows for arbitrarily complex setups.

If you are not yet familiar with u-boot, it might be a good idea to attach a serial console and look around a bit at the u-boot prompt and maybe try to boot from the same SD-Card first. Also if you change any u-boot settings, you can save your changes from this prompt.

The next thing I did, was perparing the usb stick. u-boot supports FAT and extX filesystems, so we have pretty much freedom how we partition the stick. My personal convention is, that the first partition is FAT and contains a u-boot script file with instructions how to actually load a kernel. (My main purpose of this setup is testing various kernels and the FAT partition holds many kernels, which I can select by renaming
files.) The second partition holdes the root filesystem (ext4).

The tricky part with openwrt was to get a kernel with usb support compiled in (otherwise the kernel won't be able to mount the root filesystem). The precompiled kernel from openwrt won't work. u-boot needs the kernel to be in uImage format. If all you have is zImage, then you will find my instructions in some other thread in this forum useful. Also don't forget to include a device tree blob as well - the kernel won't boot without it.

If you believe you have everything in place, then attach the serial console, enter u-boot and try to load your kernel manually (took me several attempts). After that try to permanently store your manual steps in the u-boot configuration (will be on some unused part of the SD-Card). That's pretty much it - the general idea anyway.

I think you will be able to figure out the specifics as you go along. If you really get stuck somewhere, then feel free to ask again.

HTH,
Harald

jGrey:
Hello lambda,

Thank you very much for your input. As I said that I'm a newbie in this area, and I'm taking some time to
digest the ideas you guys provided. Then I have a few questions.

The first question is that how the u-boot works, and where does it located. I guess it resides in the first
partition and it will be executed firstly in the booting process? So we have to load this part firstly,
then add the linux kernel. It sounds like that we'll be working on a blank SD card. Am I right? Can we work
on the current SD card?

The current micro SD card has the linux image and it boots up when the power in turned on. Then, part of the
linux image will be moved to the RAM and the system runs from there, even the SD card is removed, the system
will still be functional. I don't know if it's functioning 100%, or just very limited? My question is, at
this moment, what we can do if a second SD card is inserted. To read/write/edit the second SD card? How?
What is the difference between the SD card with or without the u-boot part? My understanding on your first
reply dated as 8/20 is that, if we have a micro SD card with the u-boot AND linux kernel, booting up, then
we might be able to write to the second, third, ... micro SD cards. Please advice.

Thanks a lot for your time and input.


we may remove it and use the slot to do more. That is what I'm very much interested!

JohnS:
Such things are usually on linux-sunxi.org and will apply quite a lot for iMX

uboot has its own site...

John

mbergmann:
Hi jGrey,

have you read Christian Janns blog entry about u-boot on i.MX233?

http://www.jann.cc/2013/02/07/u_boot_for_the_imx233_olinuxino.html

Mike

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version