Help with boot process

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with boot process

Roadrunnere42
I'm helping several people out with broken Shield ie don't start up and as I’m learning as I go allow, just when I think I have it cracked a spanner gets thrown in the spokes i'm in the process of documenting as i go allow, here's my questions?

1)  when I get the shield booted ( running from an itusrouterimage from memory) I have found that when I mount /dev/mmcblk0p1  /overlay the Shield complains that the device was not umount properly and may be corrupt. What program can i use to fix this as fsck is on installed or can i install, mmcblk0p1 is a fat partition.

2) On these Shields that have trouble booting, If I run  the factory reset command, the Shield goes through the process and asked for a reboot. On completing the reboot the Shield stops saying it can't find Itusrouterimage, on looking at /dev/mmcblk0p1 all files are deleted except Itusrestoreimage, and the two bootloaders, has any one got any ideas on this
 
3) I have tried copying over the overlay folder from a working  sp1 Shield but on restarting it loads into RC1, Does the Shield hold a copy in a separate partition? because if i load a sp1 copy of Itusrouterimage manually it show sp1?

4) On my shield I accidentally left sd card in slot and rebooted, to my surprise my Shield which was running sp1 now booted in RC1 take card out rebooted and yes straight back to sp1, so am i right in thinking there must be a trigger that loads a copy from somewhere hidden in the Shield?

5) How do I stop/start firewall when ssh in, as when i type firewall start if not found?

6) What are these partitions for for
 mmcblk0boot0: mmc1:0001 P1XXXX partition 1 2.00 MiB
 mmcblk0boot1: mmc1:0001 P1XXXX partition 2 2.00 MiB
 mmcblk0rpmb: mmc1:0001 P1XXXX is  3 128 KiB
 

I have found that people are downloading or using Itus images that are from both rc1 and sp1 which makes it hard to know which version they are using, would be nice to have a section with folders label rc1 firmware and sp1 firmware with all the right files.

I know this may go about some peoples head but any help in the boot process or file structure would be a help, once I get these Shield up and running I will post documentation.
Reply | Threaded
Open this post in threaded view
|

Re: Help with boot process

hans2
Hi Roadrunner

i am making dumps from my bootprocess. I did this the following way:

1) reboot shield
2) interrupt the boot process when Shield mentions "Hit any key to stop autoboot"
3) use commands like printenv mmcinfo

Bootloader stage 1:
Octeon sff7000# mmcinfo
MMC Device 0 not found
no mmc device at slot 0
<raw>
Octeon sff7000# version
<raw>
U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: Mar 05 2015 - 12:15:47)
mips64-octeon-linux-gnu-gcc (Cavium Inc. Version: SDK_3_1_0 build 32) 4.7.0
GNU ld (Cavium Inc. Version: SDK_3_1_0 build 32) 2.23.52
Octeon sff7000# bdinfo
boot_params = 0x4FBF5E70
memstart    = 0x80000000
memsize     = 0x40000000
flashstart  = 0x00000000
flashsize   = 0x00000000
flashoffset = 0x00000000
ethaddr     = (not set)
ip_addr     = <NULL>
baudrate    = 115200 bps
Octeon sff7000# grepenv
boardname=sff7000
bootcmd=bootstage3
bootdelay=3
loadaddr=0x20000000
numcores=2
octeon_failsafe_mode=0
octeon_ram_mode=0
octeon_stage3_bootloader=u-boot-octeon_rhino_itus7x.bin
stderr=serial
stdin=serial
stdout=serial
ver=U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: Mar 05 2015 - 12:15:47)

This clearly shows that stage1 will look for u-boot-octeon_rhino_itus7x.bin to load next as stage 3 (cmd: bootstage3)

In stage3:

Octeon cust_private_rhino_itus7x(ram)# printenv
do_env_print ......
autoload=n
baudrate=115200
bf=bootoct $(flash_unused_addr) forceboot numcores=$(numcores)
boardname=cust_private_rhino_itus7x
bootcmd=run image_run
bootdelay=2
bridge=mmc dev 1;fatload mmc 1 $(loadaddr) brigdeImage;bootoctlinux $(loadaddr) mem=0 numcores=2
burn_app=erase $(flash_unused_addr) +$(filesize);cp.b $(fileaddr) $(flash_unused_addr) $(filesize)
dram_size_mbytes=1024
eth1addr=XX:XX:XX:XX:XX:XX
eth2addr=XX:XX:XX:XX:XX:XX
eth3addr=XX:XX:XX:XX:XX:XX
ethact=octeth0
ethaddr=XX:XX:XX:XX:XX:XX
gateway=mmc dev 1;fatload mmc 1 $(loadaddr) gatewayImage;bootoctlinux $(loadaddr) mem=0 numcores=2
image_run=mmc dev 1;fatload mmc 1 $(loadaddr) ItusbridgeImage;bootoctlinux $(loadaddr) mem=0 numcores=2 serial#=$(serial#)
linux_mmc=fatload mmc 1 $(loadaddr) vmlinux.64;bootoctlinux $(loadaddr) mem=0 numcores=2
loadaddr=0x20000000
ls=fatls mmc 1
numcores=2
octeon_failsafe_mode=0
octeon_ram_mode=1
router=mmc dev 1; fatload mmc 1 $(loadaddr) routerImage;bootoctlinux $(loadaddr) mem=0 numcores=2
serial#=XXXXXXXXXXXXXXXXXX
stderr=serial
stdin=serial
stdout=serial
ver=U-Boot 2013.07 (Development build, svnversion: u-boot:exported, exec:) (Build time: Apr 28 2015 - 15:37:10)

Environment size: 1233/8188 bytes

I am running my sandbox in BRIDGE mode. That explains "image_run=mmc dev 1;fatload mmc 1 $(loadaddr) ItusbridgeImage;bootoctlinux $(loadaddr) mem=0 numcores=2 serial#=$(serial#)"

but it could also be that in some cases it is still loading the bridgeImage/gatewayImage/RouterImage, based on
bridge=mmc dev 1;fatload mmc 1 $(loadaddr) brigdeImage;bootoctlinux $(loadaddr) mem=0 numcores=2
gateway=mmc dev 1;fatload mmc 1 $(loadaddr) gatewayImage;bootoctlinux $(loadaddr) mem=0 numcores=2
router=mmc dev 1; fatload mmc 1 $(loadaddr) routerImage;bootoctlinux $(loadaddr) mem=0 numcores=2
No more: Shield Pro v1, Chaos Calmer, FW 1.51 SP1