Help with homehub installation

Hello,
I wonder if someone can share their insights on an issue I am having trying to install openwrt onto a homehub5a.
I've successfully soldered and connected to the home hub, loaded uboot, tftp sent the install image and I believe I installed openwrt but on re-boot I am getting the following in the serial connection window:


ROM VER: 1.1.4
CFG 06
NAND
NAND Read OK

DDR autotuning Rev 0.3d
DDR size from 0xa0000000 - 0xa7ffffff
DDR check ok... start booting...



U-Boot 2010.06-LANTIQ-v-2.2.46 (Dec 06 2013 - 02:39:45 on tester@clean-machine)

CLOCK CPU 500M RAM 250M
secure boot
DRAM:  125 MiB
NAND:  ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (AMD S34ML01G1)
128 MiB
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
In:    serial
Out:   serial
Err:   serial
Net:   Internal phy(GE) firmware version: 0x841b
vr9 Switch

Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot:  0
Creating 1 MTD partitions on "nand0":
0x000000100000-0x000007f80000 : "mtd=0"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=0"
UBI: MTD device size:            126 MiB
UBI: number of good PEBs:        1012
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     3
UBI: available PEBs:             9
UBI: total number of reserved PEBs: 1003
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 124/79
kernel volume not found
Wrong Image Format for bootm command
ERROR: can't get kernel image!
VR9 #

Anyone got any ideas as to what I should do next?
Thanks

hmm, not an error I've encountered.

The final step where you ran sysupgrade command to install OpenWrt perhaps failed? Try just this last step again (no need to run 'prepare') ?

If you can't solve the problem, restore the stock firmware as described in section 5, to start from beginning?
https://openwrt.ebilan.co.uk/viewtopic.php?t=266

1 Like

The installation information explains that the sysupgrade will automatically restart your device after it's finished bit it also says:

If the UART prompt appears, power-cycle your device!

Did you power-cycle it yet?

If it is still broken after a power-cycle, then as @bill888 said, you should boot the install image via tftpboot again but also you want to save a copy of the serial console log in case it fails again, so you can post the log here.

1 Like

Hi guys,
Thanks for the responses so far.
I have restored nand and gone through the process again but still same issue. I've even looked at 7.2 of the guide and entered the 2 commands from there before all of this but am at the same place.
Below is the log of the nand restore and following steps.


Writing data to block 1011 at offset 0x7e60000

ATTACHING backup ubi partition to ubi dev number 9
UBI device number 9, total 1016 LEBs (131088384 bytes, 125.0 MiB), available 991 LEBs (127862784 bytes, 121.9 MiB), LEB size 129024 bytes (126.0 KiB)

DETACHING nand ubi partition...

RESTORING u-boot partition from backup
Erasing 128 Kibyte @ 80000 -- 100 % complete
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
Writing data to block 4 at offset 0x80000

RESTORING u-boot env partition from backup
Erasing 128 Kibyte @ 0 -- 100 % complete
Writing data to block 0 at offset 0x0

RESTORING unused partition from backup
Erasing 128 Kibyte @ 20000 -- 100 % complete
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000

FORMATING nand ubi partition
ubiformat: mtd3 (nand), size 132644864 bytes (126.5 MiB), 1012 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 1011 -- 100 % complete
ubiformat: 1012 eraseblocks have valid erase counter, mean value is 80
ubiformat: formatting eraseblock 1011 -- 100 % complete

ATTACHING nand ubi partition to ubi dev number 0 using
19 reserved blocks for bad block handling
UBI device number 0, total 1012 LEBs (130572288 bytes, 124.5 MiB), available 989 LEBs (127604736 bytes, 121.7 MiB), LEB size 129024 bytes (126.0 KiB)

RESTORING OpenRG ubi volume from backup
Volume ID 1, size 326 LEBs (42061824 bytes, 40.1 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "OpenRG", alignment 1
dd: can't open '/dev/ubi9_1': No such file or directory
ubiupdatevol: erro[  171.181815] ubi0 warning: vol_cdev_release: update of volume 1 not finished, volume is damaged
r!: cannot read 129024 bytes from "-"
              error 0 (No error information)

RESTORING FFS ubi volume from backup
Volume ID 2, size 662 LEBs (85413888 bytes, 81.5 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "FFS", alignment 1
dd: can't open '/dev/ubi9_2': No such file or directory
ubiupdatevol: erro[  171.245991] ubi0 warning: vol_cdev_release: update of volume 2 not finished, volume is damaged
r!: cannot read 129024 bytes from "-"
              error 0 (No error information)

RESTORING caldata ubi volume from backup
Volume ID 3, size 1 LEBs (129024 bytes, 126.0 KiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "caldata", alignment 1
63+0 records in
63+0 records out

Do you wish to unlock the u-boot prompt? This will allow use of tftpboot etc.

Unlock [y/N]: Y


Restoration completed!


To prepare the system for installing LEDE. You may run:

  prepare


Otherwise, type 'reboot'!
If the UART prompt appears, power-cycle your device!
The hub should now boot up using the stock firmware.
root@LEDE:/#
root@LEDE:/#
root@LEDE:/# prepare

This script will erase parts of the Nand flash memory on this Hub, and then
prepare it for running Sysupgrade.


WARNING: DO NOT CONTINUE unless you have saved a backup of the original firmware
         to your COMPUTER or other storage device!


DO NOT POWER OFF THE DEVICE DURING THIS PROCEDURE.


Please enter YESIHAVEABACKUP to continue: YESIHAVEABACKUP

Starting installation...
TRYING to decrypt u-boot env with key B1D3B4BD0970FCA9261E23C2170DB8E52407C71DAC06098678C0885BC7E68CCD
TRYING to decrypt u-boot env with key 86fd5557bab554172a97eaec65680745d4ec2efe723decb956a50bd9bc13e1a8
TRYING to decrypt u-boot env with key 3E4CA8114D15BFC653B2BF9519EF2B94200E30345503B125C1D0BE776698B950
SUCCESSFULLY decrypted u-boot env
ERROR bootcmd_openrg already exists. Please restore backup and start again
root@LEDE:/# sysupgrade /tmp/mounts/USB-A1/lede-17.01.4-lantiq-xrx200-BTHOMEHUBV
5A-squashfs-sysupgrade.bin
Cannot save config while running from ramdisk.
killall: watchdog: no process killed
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... ubusd logd netifd odhcpd mountd ntpd dnsmasq
Sending KILL to remaining processes ...
ubimkvol: error!: UBI device does not have free logical eraseblocks
cannot create kernel volume
libubi: error!: "/dev/" is not a character device
ubiupdatevol: error!: error while probing "/dev/"
              error 22 (Invalid argument)
tar: write error: Broken pipe
libubi: error!: "/dev/" is not a character device
ubiupdatevol: error!: error while probing "/dev/"
              error 22 (Invalid argument)
tar: write error: Broken pipe
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /: [  225.506627] reboot: Reβ–’
ROM VER: 1.1.4
CFG 06
NAND
NAND Read OK

DDR autotuning Rev 0.3d
DDR size from 0xa0000000 - 0xa7ffffff
DDR check ok... start booting...



U-Boot 2010.06-LANTIQ-v-2.2.46 (Dec 06 2013 - 02:39:45 on tester@clean-machine)

CLOCK CPU 500M RAM 250M
secure boot
DRAM:  125 MiB
NAND:  ONFI flash detected
ONFI param page 0 valid
NAND device: Manufacturer ID: 0x01, Chip ID: 0xf1 (AMD S34ML01G1)
128 MiB
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
In:    serial
Out:   serial
Err:   serial
Net:   Internal phy(GE) firmware version: 0x841b
vr9 Switch

Type "run flash_nfs" to mount root filesystem over NFS

Hit any key to stop autoboot:  0
Creating 1 MTD partitions on "nand0":
0x000000100000-0x000007f80000 : "mtd=0"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=0"
UBI: MTD device size:            126 MiB
UBI: number of good PEBs:        1012
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     3
UBI: available PEBs:             9
UBI: total number of reserved PEBs: 1003
UBI: number of PEBs reserved for bad PEB handling: 10
UBI: max/mean erase counter: 127/81
kernel volume not found
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Odd thing is, it even says sysupgrade successful.

I note you didn't double check to confirm stock firmware booted okay and working before running 'prepare' script.

In any case, sysupgrade actually failed due to presence of those 'error 22' messages.

I note you did not copy the sysupgrade.bin file from USB flash drive to the /tmp folder as advised in the wiki and guide, before executing the sysupgrade command - it may be a factor?

Check your PM

ps. section 4.2 of the guide shows expected results when executing the sysupgrade command.

1 Like

Hi Bill,
Thanks for picking up on that.
I used the link in the PM to sort out the nand and start again. All working perfectly now.
Thanks again.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.