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

Help with Docstar 2017.07 U-Boot Kirkwood installation (2 replies)

$
0
0
Howdy,
I run Linux and have a couple of D-Link, DNS323 and DNS320, NAS on the Lan, running Alt-F firmware. Recently, I picked up a STDSA10G-RK Dockstar in an unopened box and was able to disable the phone-home pogoplug firmware update, thanks to info hereabouts: http://www.rudiswiki.de/wiki/DockStarOverview It's been a bit challenging finding the best path forward, using google, the details are fuzzy, but approximately:

  • Followed Jeff Doozan's instructions to change uBoot, here: http://projects.doozan.com/uboot/
  • Installed Wheezy on a USB portable flash storage according to instructions at rudiswiki/here, after running down the rootfs, finally, here: NSA320quickstart.tar.gz
    I can't find the page that linked that tarball, atm. Using Old Debian Versions In Your sources.list showed me how to alter sources.list so I could install a rescue uBoot, the next step.
  •   rescue:~# cat /etc/rescue.version  20110217
    Now, I've got to here.

I've got an adapter like is shown in rudiswiki, Dockstar_USB_adapter and my plan is to run Debian from this according to the howtos around here and serve/store files with NFS on USB-attached enclosures to the LAN.

I'm thinking I need to have Linux Kernel 4.17.2 Kirkwood package and Debian rootfs on my portable flash and, likely, this 2017.07 U-Boot Kirkwood on the dockstar nand.

In the case of flashing this uBoot, I've got a couple of questions.

rescue:~# dmesg | grep -i 'bad'
[    0.676623] Scanning device for bad blocks
[    0.717547] Bad eraseblock 992 at 0x000007c00000
[    0.757542] Bad eraseblock 1946 at 0x00000f340000
[    0.913360] UBI: number of bad PEBs:         0
[    0.945511] UBI: number of PEBs reserved for bad PEB handling: 2
rescue:~#

There was a warning not to flash if a bad block was found in an area the flash writes. This looks to my untrained eye to be higher in the memory than would be a concern but I would like some reality on that.

Quote

2. Make sure ethaddr is set in uBoot env. It must be set before rebooting the system. However, if you plan to flash the default envs image in step 8 (Flashing default u-boot envs image), then no need to worry about it now. It can be set after you've booted in to Linux. The MAC address will be set to a valid randomly generated local address.


As is, I've got ethaddr set to the MAC address of the dockstar and use it for a static dhcp address in my router so I know where to go for ssh. I'd like to keep it that way, don't know if flashing default envs will give me a problem, don't know if I need to do that.

rescue:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0         0xc0000       0x20000   0x20000
rescue:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 0db00000 00020000 "data"
rescue:~# fw_printenv 
ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
ethaddr=00:10:RE:DA:CT:ED  #don't know if I need to hide this but, in case
serverip=192.168.1.101
ipaddr=192.168.1.166
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
arcNumber=2998
rescue_installed=1
rescue:~#

I did set up netconsole but don't know how to use it. Hopefully, ssh will always be there.

WRT Linux Kernel 4.17.2 Kirkwood package and Debian rootfs, I'd like to keep my key with NSA320 updated Wheezy in case I get other dockstar(s) to do this. I suppose I could clone to another drive with gparted and update to this package or install to a new medium, optionally having re-flashed uBoot and would like some pointers on the way to go.

Thanks.
Rolf

Viewing all articles
Browse latest Browse all 3189

Trending Articles