Quantcast
Channel: Linux Device Hacking - uBoot
Viewing all articles
Browse latest Browse all 902

Clean Install On POGO-V4-A1-01 SD Card Stuck At Starting kernel (3 replies)

$
0
0
I installed Debian to boot from an SD card using Qui's post titled Hacking the Pogoplug v4 (Series 4 and Mobile) with Linux (Debian or Arch).

I followed the guide closely, with the only substitution being files that had broken links.
I substituted;
uboot.2014.07-tld-1.pogo_v4.bodhi.tar with uboot.2014.07-tld-2.environment.bodhi.tar
uboot.2014.07-tld-1.environment.img.bodhi.tar with uboot.2014.07-tld-2.environment.bodhi.tar
and Debian-3.14.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 with Debian-3.17.0-kirkwood-tld-1-rootfs-bodhi.
tar.bz2.

On Qui's recommendation, I also setup NetConsole which gives me the following output.
U-Boot 2014.07-tld-2 (Sep 19 2014 - 16:13:05)
Pogoplug V4
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot:  0

MMC rescan: current device # 0 initialized OK
2822232 bytes read in 1203 ms (2.2 MiB/s)
6114335 bytes read in 1366 ms (4.3 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.17.0-kirkwood-tld-1
   Created:      2014-10-25   3:29:23 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2822168 Bytes = 2.7 MiB


   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.17.0-kirkwood-tld-1
   Created:      2014-10-25   3:29:30 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6114271 Bytes = 5.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK


Starting kernel ...


And the NetConsole session hangs there, stuck at "Starting kernel ...". I have used two different SD cards with the same result.

I'm including the installation log below. I would appreciate it if you would point out anything you see that might cause this behavior.
login as: root
root@192.168.1.100's password:
~ # killall hbwd
~ # cd /tmp
/tmp # ls
hbplug.log   resolv.conf  var
/tmp # wget http://192.168.1.9/pf/nanddump
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp # wget http://192.168.1.9/pf/nandwrite
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp # wget http://192.168.1.9/pf/flash_erase
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp # wget http://192.168.1.9/pf/fw_printenv
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp # chmod +x flash_erase fw_printenv nanddump nandwrite
/tmp # cp fw_printenv fw_setenv
/tmp # mount -o remount,rw /
/tmp # echo "/dev/mtd0 0xc0000 0x20000 0x20000">/etc/fw_env.config
/tmp # wget http://192.168.1.9/pf/uboot.2014.07-tld-2.pogo_v4.bodhi.tar
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp # tar -xf uboot.2014.07-tld-2.pogo_v4.bodhi.tar
/tmp # /tmp/flash_erase /dev/mtd0 0 4
Erase Total 4 Units
Performing Flash Erase of length 131072 at offset 0x60000 done
/tmp # /tmp/nandwrite /dev/mtd0 /tmp/uboot.2014.07-tld-2.pogo_v4.mtd0.kwb
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
/tmp # wget http://192.168.1.9/pf/uboot.2014.07-tld-2.environment.bodhi.tar
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp # tar -xf uboot.2014.07-tld-2.environment.bodhi.tar
/tmp # /tmp/flash_erase /dev/mtd0 0xc0000 1
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done
/tmp # /tmp/nandwrite -s 786432 /dev/mtd0 uboot.2014.07-tld-2.environment.img
Writing data to block 6 at offset 0xc0000
/tmp # /tmp/fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
/tmp # /tmp/fw_printenv ethaddr
ethaddr=00:25:31:03:f9:bf
/tmp # /tmp/fw_setenv arcNumber 3960
/tmp # /tmp/fw_setenv machid F78
/tmp # /tmp/fw_setenv usb_rootfstype ext3
/tmp # /tmp/fw_setenv mtdparts 'mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uIm
age2),8M(failsafe),112M(root)'
/tmp # /tmp/fw_printenv
ipaddr=192.168.0.231
serverip=192.168.0.220
baudrate=115200
bootcmd=run bootcmd_uenv; run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata; reset
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_usb=run usb_init; run set_bootargs_usb; run usb_boot;
bootdelay=10
console=ttyS0,115200
device=0:1
ethact=egiga0
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
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 $device 0x800000 /boot/uImage
mmc_load_uinitrd=ext2load mmc $device 0x1100000 /boot/uInitrd
mmc_root=/dev/mmcblk0p1
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
rootdelay=10
rootfstype=ext3
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda1
set_bootargs_mmc=setenv bootargs console=$console root=$mmc_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
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 $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; mmc rescan; ide reset; setenv uenv_loaded 0; for devtype in usb mmc ide; do for disknum in 0; do run uenv_read_disk; done; done
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /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
ethaddr=00:25:31:03:f9:bf
arcNumber=3960
machid=F78
usb_rootfstype=ext3
mtdparts=mtdparts=orion_nand:2M(u-boot),3M(uImage),3M(uImage2),8M(failsafe),112M(root)
/tmp # /tmp/fw_setenv serverip 192.168.1.9
/tmp # /tmp/fw_setenv ipaddr 192.168.1.99
/tmp # /tmp/fw_setenv if_netconsole 'ping $serverip'
/tmp # /tmp/fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay
10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
/tmp # /tmp/fw_setenv preboot 'run if_netconsole start_netconsole'
/tmp # mount -o remount,rw /
/tmp # cd /
/ # wget http://192.168.1.9/pf/uboot.mtd0.dockstar.original.kwb
Connecting to 192.168.1.9 (192.168.1.9:80)
/ # /tmp/fw_setenv bootcmd 'run bootcmd_usb; run bootcmd_mmc; run bootcmd_sata;
run bootcmd_pogo; reset'
/ # /tmp/fw_setenv bootcmd_pogo 'if ubi part root 2048 && ubifsmount ubi:rootfs
&& ubifsload 0x800000 uboot.mtd0.dockstar.original.kwb ; then go 0x800200; fi'
/ # killall hbwd
killall: hbwd: no process killed
/ # mknod /tmp/mmcblk0 b 179 0
/ # /sbin/fdisk /tmp/mmcblk0

The number of cylinders for this disk is set to 1951.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /tmp/mmcblk0: 16.0 GB, 16050552832 bytes
255 heads, 63 sectors/track, 1951 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot      Start         End      Blocks  Id System
/tmp/mmcblk0p1               1        1952    15670272   c Win95 FAT32 (LBA)

Command (m for help): d
Selected partition 1

Command (m for help): p

Disk /tmp/mmcblk0: 16.0 GB, 16050552832 bytes
255 heads, 63 sectors/track, 1951 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

        Device Boot      Start         End      Blocks  Id System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1951, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1951, default 1951): Using default value 1951

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table
/ # mknod /tmp/mmcblk0p1 b 179 1
/ # cd /tmp
/tmp # wget http://192.168.1.9/pf/mke2fs
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp # chmod +x mke2fs
/tmp # /tmp/mke2fs -L rootfs -j /tmp/mmcblk0p1
mke2fs 1.41.9 (22-Aug-2009)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
981120 inodes, 3917844 blocks
195892 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4013948928
120 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
/tmp # mkdir /tmp/mnt
/tmp # mount /tmp/mmcblk0p1 /tmp/mnt
/tmp # cd /tmp/mnt
/tmp/mnt # wget http://192.168.1.9/pf/Debian-3.17.0-kirkwood-tld-1-rootfs-bodhi.
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp/mnt # wget http://192.168.1.9/pf/Debian-3.17.0-kirkwood-tld-1-rootfs-bodhi.
tar.bz2
Connecting to 192.168.1.9 (192.168.1.9:80)
/tmp/mnt # tar -xjf Debian-3.17.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
/tmp/mnt # rm Debian-3.17.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2
/tmp/mnt # /tmp/fw_setenv bootcmd 'run bootcmd_mmc; run bootcmd_usb; run bootcmd
_sata; run bootcmd_pogo; reset'
/tmp/mnt # sync
/tmp/mnt # cd ..
/tmp # umount /tmp/mnt
/tmp # /sbin/reboot

Thanks in advance.

Kindly,
Brainflurry

Viewing all articles
Browse latest Browse all 902