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

Re: Use netconsole to troubleshoot uBoot without a serial cable

$
0
0
Here's the beginning of full text of the netconsole output which I extracted from Wireshark:
Marvell>> printenv
printenv
bootcmd=run fast_boot; run usb_boot; run hd_boot; run ubi_boot
baudrate=115200
ide_start=ide reset
ubi_start=ubi part root
usb_start=usb start
nc_test=ping $ncip
nc_start=setenv stdin nc; setenv stdout nc; setenv stderr nc; version
silent_boot=run silent_rd ubi_args ubi_fallback
fast_boot=run fast_rd ubi_args ubi_fallback
usb_boot=for scan in 0 1 2 3; do run usb_args_$scan ext2_kern ext2_boot; run ext2_rd ubi_fallback; run fat_kern fat_boot; run fat_rd ubi_fallback;done
usb_args_0=boot_dev='usb 0:1'; dev_args='root=/dev/sda1 rootdelay=10'
usb_args_1=boot_dev='usb 1:1'; dev_args='root=/dev/sdb1 rootdelay=10'
usb_args_2=boot_dev='usb 2:1'; dev_args='root=/dev/sdc1 rootdelay=10'
usb_args_3=boot_dev='usb 3:1'; dev_args='root=/dev/sdd1 rootdelay=10'
hd_boot=run ide_start; for scan in 0 1; do run hd_args_$scan ext2_kern ext2_boot; run ext2_rd ubi_fallback; run fat_kern fat_boot; run fat_rd ubi_fallback; done
This next line was mangled:
hd_args_0=boot_dhd_args_0=boot_dev='ide 0:1'; deev='ide 0:1'; dev_args='root=/dev_args='root=/dev/sda1'v/sda1'
I think it should read:
hd_args_0=boot_dev='ide 0:1'; dev_args='root=/dev/sda1'
Here's the rest of the printenv output:
hd_args_1=boot_dev='ide 1:1'; dev_args='root=/dev/sdb1'
ubi_boot=run ubi_rd ubi_args ubi_fallback
ubi_args=dev_args='ubi.mtd=root'
rescue=dev_args='ubi.mtd=root rootfstype=preboot'; boot_dev='usb 0:1'; run ext2_kern ext2_auto boot_rd; boot_dev='ide 0:1'; run ide_start ext2_kern ext2_auto boot_rd; run silent_rd ubi_fallback; run fast_rd ubi_fallback; run ubi_rd ubi_fallback
chain=nand read.e 0x800000 0x480000 0x80000; go 0x800200
ethact=egiga0
console=ttyS0,115200
mtdids=nand0=orion_nand
set_bootargs=setenv bootargs console=$console $mtdparts $dev_args $rd_args netconsole=@$ipaddr/eth0,@$ncipk/
ext2_kern=ext2load $boot_dev $addr_kern /boot/uImage
ext2_auto=ext2load $boot_dev $addr_rd /boot/uInitrd
ext2_rd=ext2load $boot_dev $addr_rd /uInitrd
ext2_boot=run ext2_rd boot_rd; run ext2_auto boot_auto; run boot_kern
fat_kern=fatload $boot_dev $addr_kern /boot/uImage
fat_rd=fatload $boot_dev $addr_rd /uInitrd
fat_boot=run fat_rd boot_rd
ubi_kern=ubifsmount boot; ubifsload $addr_kern /boot/uImage
ubi_rd=ubifsmount ramdisk; ubifsload $addr_rd /uInitrd
ubi_fallback=run ubi_kern boot_rd
silent_rd=ubifsmount silent; ubifsload $addr_rd /uInitrd
fast_rd=ubifsmount fast; ubifsload $addr_rd /uInitrd
boot_kern=run set_bootargs; bootm $addr_kern
boot_rd=run set_bootargs; bootm $addr_kern $addr_rd
boot_auto=rd_args='rootfstype=auto'; run boot_rd
addr_kern=0x680000
addr_rd=0x1100000
ipaddr=10.10.10.6
ncipk=10.10.10.4
serverip=10.10.10.3
led_init=green blinking
led_exit=green off
led_error=orange blinking
ethaddr=02:50:43:67:ed:34
mtdparts=mtdparts=orion_nand:1M(u-boot),6M(uImage),-(root)
partition=nand0,0
mtddevnum=0
mtddevname=u-boot
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole
ncip=10.10.10.3
bootdelay=10
stdin=nc
stdout=nc
stderr=nc

Environment size: 2867/131068 bytes
Marvell>>

nc on my laptop barfed on the first mangled packet. The trace included ICMP packets echoed back to the source saying the destination port was invalid (since nc crashed). I filtered those out to figure what that mangled line should read...

EDIT - I should also mention that I've also changed the fs type on the usb flash drive from ext3 to ext2, and modified its /etc/fstab to reflect that. Are there any init scripts or config files that I might also need to change?

Viewing all articles
Browse latest Browse all 46971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>