[Lenny400] [Mipsbook-devel] Reviewing the Ingenic board initialisation code

Dr. H. Nikolaus Schaller hns at goldelico.com
Tue Jun 9 14:55:48 CEST 2015


Hi,

Am 09.06.2015 um 13:45 schrieb Paul Boddie <paul at boddie.org.uk>:

> On Tuesday 9. June 2015 07.05.04 Dr. H. Nikolaus Schaller wrote:
>> Hi Paul,
>> 
>> Am 09.06.2015 um 01:52 schrieb Paul Boddie <paul at boddie.org.uk>:
>>> 
>>> http://en.qi-hardware.com/wiki/Boot_Modes
>>> http://en.qi-hardware.com/wiki/USB_BOOT_mode
>>> 
>>> Does anyone know if it is possible to invoke this mode on the Letux, or
>>> whether the bootloader supports a “software" variant?
>> 
>> Not that I am aware of. We might have to develop and install our own U-Boot
>> which is a high risk of bricking the device.
> 
> Yes, I don't want to do that!
> 
>> I remember that I did try to understand how boot works, but it is too long
>> ago that I remember details and wasn’t well documented :(
> 
> I suppose that it's this thread you're thinking of here:
> 
> https://www.mail-archive.com/mipsbook-devel%40linuxtogo.org/msg00181.html

Indeed! Thanks for looking it up.

> 
> That's where that CI20 blog series is somewhat refreshing because the author 
> tries to explain the USB boot process in clear terms in his native English. In 
> the past, there has been code available from Ingenic for U-Boot, but their FTP 
> site gets cleared out periodically, and even the various mirrors don't always 
> have the resources that were once available.

Fortunately, I have found copies of PC701-LX-u-boot-1.1.6.tar.bz2 on my daily work
machine…

So it is not lost. I have uploaded it to

	http://download.goldelico.com/letux-400/files/

> 
> Fortunately, I found the following repository containing U-Boot with jz4730 
> support:
> 
> https://github.com/shenhaocn/jzcode-x11
> 
> There's also a specific U-Boot repository, but I can't see any notable 
> differences between it and the other one:
> 
> https://github.com/shenhaocn/jz-uboot
> 
> I'm sure I've seen boot code before, but I think it's the code in the 2.6 
> kernel that detects various keys and supposedly performs NAND-flashing 
> operations.

Yes, according to my 5 years old description there are multiple locations
where hot keys are detected to help the boot process. A big hack… No chance
to get it upstream to kernel.org or denx :)

The key point is that U-Boot can only boot from NAND or SD/MMC. And it
can boot the “minifs” which is a stripped down Linux with running a single
shell script in busybox. That script provides some user interface - and of
course USB drivers (and network) to load recovery systems from.

I have found that we had written a simple replacement minifs (which is not
the same as the one that comes shipped with the hardware). But if you
did not touch the original, it should be possible to read out the NAND partition.

http://projects.goldelico.com/p/l400-rootfs/source/tree/master/config/root/mkminifs
http://projects.goldelico.com/p/l400-rootfs/source/tree/master/config/root/recover

> It becomes difficult to track all the different resources, 
> especially when some of them tend to go away and not always come back, like 
> all the kwaak.net ones which even the Internet Archive doesn’t have any more.

This is why http://projects.goldelico.com/p/letux-400/ and siblings like
http://projects.goldelico.com/p/l400-rootfs/ exist. My target is that this resource
is never going away (at least as long as the company exists and can pay for the
server operation :).

Anyways, I also plan to consolidate the GTA04 boot/kernel/rootfs system with the
Letux400 boot/kernel/rootfs as soon as we have MIPS/JZ device tree support in
the kernel. Then, this u-boot will also be unpacked into git (and mirrored to github).

If someone needs write access to this project forge to update information, please
register and let me know.

> 
> Ultimately, for the Letux (but also for less awkward NanoNote experiments) it 
> may be worthwhile focusing on a payload loaded from SD/MMC media, however.

For the initial work, I think we should indeed focus on SD/MMC. And only if it
becomes more stable, complete boot from USB can be revisited.

BR,
Nikolaus



More information about the Lenny400 mailing list