boot process

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

boot process

Postby krbonne » Tue Dec 03, 2013 7:29 pm

Hi,

I have both two pogoplugv2 devices and a PogoplugPro.


I try to understand what exactly happens when you boot archlinux, debian or some other linux on these devices. (instead of just install it via a script and then use it ;-) ).

I read stuff about multiple partitions on the mtd drive (u-Boot, uImage, rootfs), but there is also a uImage in the /boot directory. In other documentation, I read things nvram parameters and some other stuff.

hence, I am all a bit confused.
Is there a document that describes exactly how the boot process works on these devices?


Cheerio! Kr. Bonne
krbonne
 
Posts: 5
Joined: Sat Sep 24, 2011 8:13 pm

Re: boot process

Postby WarheadsSE » Tue Dec 03, 2013 9:38 pm

Every platform is slightly different. Hence so many different documentation pieces.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: boot process

Postby krbonne » Sat Dec 07, 2013 11:39 pm

Hi,

(sorry for the late reply ... I've been batteling an annoying C++ memory-leak problem for the last 3 days now ... grr! :-( ).


Well, how does it work for a pogoplug v2 with archlinux?
I did manage to find some information based in the nvram parameters (like the "bootcmd" parameter), but it isn't at all clear where this all fits in the big picture.
Are these scripts that are executed by uBoot, or is there an intermediate "linux boot-kernel" inbetween that does this?

Is there no simple document that describes the boot-process in general or more specific information per device?


Cheerio! Kr. Bonne.
krbonne
 
Posts: 5
Joined: Sat Sep 24, 2011 8:13 pm

Re: boot process

Postby WarheadsSE » Sun Dec 08, 2013 3:12 am

BOM, Stage1, Stage2 (uboot), kernel
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: boot process

Postby krbonne » Sun Dec 08, 2013 2:30 pm

Hi,

OK. I'm a bit confused. Let me see if I get this correct.

first; BOM (abrivation for ???) is what exactly? It sound like some bootstrap code in EEPROM or so?
Is this code or data?

Then, this is what I see on my system:
[root@archtest ~]# fw_printenv
(...)
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)

The first part of the MTD is u-boot, which is the 3th element in your list. So where is the "Stage1"?

The 2nd and 3th partition of the MTD seams to contain a linux kernel + rootFS, which is the 4th elemtn in your list.
Correct?

However, gw_printenv also show this:
[root@archtest ~]# fw_printenv | grep boot
(...)
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
(...)
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
(...)
etc.

If I look at this, there seams to be a lot of (very well writen) code in there that deals with rescue-boot situations but also the normal bootprocedure.
It seams to scan all USB disks and it it is ext2 and finds a file "/boot/uImage", it loads it in memory and executes this.


However, what is not really clear to me:
who actually executes this code? Is it u-boot? Is it the intermediate "uimage" in the 4M uimage in the 2nd partition of the MTD?
How does this all fit into the boot-process of "BOM, Stage1, Stage2 (uboot), kernel" you describe?


Cheerio!
Kr. Bonne.
krbonne
 
Posts: 5
Joined: Sat Sep 24, 2011 8:13 pm

Re: boot process

Postby WarheadsSE » Sun Dec 08, 2013 4:17 pm

BOM is burnt into the SoC, and essentially the lowest of the low levels.
Stage 1 is usually built into u-boot these days, but not always.
Everything in u-boot is executed u-boot. uImage is the kernel itself, and and u-boot loads that into memory, and then passes all execution to it. At this point (bootm), u-boot is done and gone.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 5 guests

cron