Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

U-Boot w/ MMC/SD-card booting for Pogoplug Series 4 (3 replies)

$
0
0
Hello all.

I have succesfully installed U-boot on a Pogoplug Series v4 device and I am getting a strange behaviour.

I have installed the rootfs in a SD card but if I boot the Pogo unit with the SD card inserted, then the boot fails (no USB or other boot device is connected at the time I boot the device).

If I boot the Pogo without the SD card inserted, wait a few seconds, and when the led turns on blinking green I insert back the SD card then it boots flawlessly. Actually, I can perform reboots and the device keeps working correctly.

The problem I have is when a power outage pops up in the neighbourhood. The Pogo unit cannot get up again if I don't manually remove the SD card, which can be annoying when I am out.

I have tried playing with the uEnv.txt file but without success. Any clue will be appreciated.

Thanks!

uEnv.txt

dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
devices=mmc
disks=0 1 2 3 4 5 6 7

cat /etc/fw_env.config

# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

cat /proc/mtd

dev:    size   erasesize  name
mtd0: 00200000 00020000 "u-boot"
mtd1: 00300000 00020000 "uImage"
mtd2: 00300000 00020000 "uImage2"
mtd3: 00800000 00020000 "failsafe"
mtd4: 07000000 00020000 "root"

fw_printenv

arcNumber=3960
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else bootm 0x800000; fi; fi
bootcmd_mmc=run mmc_init; run set_bootargs_mmc; run mmc_boot
bootcmd_sata=run sata_init; run set_bootargs_sata; run sata_boot;
bootcmd_uenv=run uenv_load
bootcmd_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=5
bootdev=mmc
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogoplug_v4.dtb
ethact=egiga0
ethaddr=00:25:31:05:24:41
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.1.20
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=F78
mainlineLinux=yes
mmc_boot=mw 0x800000 0 1; run mmc_load_uimage; if run mmc_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
mmc_init=mmc rescan
mmc_load_uimage=ext2load mmc 0:1 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc 0:1 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mmc_rootfstype=ext3
mtddevname=uImage2
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootfs=/dev/mmcblk0p1
rootfstype=ext3
sata_init=ide reset
sata_load_uimage=ext2load ide 0:1 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide 0:1 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=192.168.1.10
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
set_bootargs_mmc=setenv bootargs console= root=/dev/mmcblk0p1 rootdelay= rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
set_bootargs_sata=setenv bootargs console= root=/dev/sda1 rootdelay= rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
set_bootargs_usb=setenv bootargs console= root= rootdelay= rootfstype=ext3 mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
start_netconsole=setenv ncip 192.168.192.110; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_loaded=0
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
usb_ready_retry=15
usb_root=/dev/sda1
usb_rootfstype=ext3

Viewing all articles
Browse latest Browse all 3247

Trending Articles