Installing kwboot on OpenWrt

How do I go about installing kwboot on Openwrt?

Or do I need to build it from source ?

Ummm... kwboot is a bootloader.

https://openwrt.org/docs/techref/bootloader/kwboot

This is one step before OpenWrt is involved in the device/system.

Did you brick your router?

No, I'm trying to use an alternative U-boot on a Seagate GoFlex Home unit.

I saw the link above but

opkg install kwboot

doesn't work, so am not sure what to do...

U-Boot is a bootloader too. Bootloaders are usually inside a flash chip on the device. You usually have to flash a new bootloader (if possible). I don't suggest you do this unless you are trying to repair a bricked device.

This is not related to OpenWrt. A bootloader on an embeded device is usually unchanged by OpenWrt. Therefore, there are no bootloaders (with the exception of x86_64).

From: https://openwrt.org/toh/hwdata/seagate/seagate_goflexhome

Flash MB: 256NAND

Since there is no such package.

Installing a boot loader is a dangerous process, as if you bork the boot loader, you've generally bricked the router permanently without access to the ability to flash the ROM directly.

A full image of your ROM, or at least the critical partitions (boot loader, "art", and any other device-specific configuration, at a minimum) is best practice. NAND flash will require NAND-specific utilities; dd will generally not work to save and restore.

You may need to recompile the kernel, as suggested configuration of the device tree is now to write-protect the boot loader and other critical partitions to mitigate the impact of users inadvertently overwriting them.

You will need to build the boot loader yourself or obtain it from a trusted source, flash it to the boot loader partition, and hope that it works. First-stage boot loaders cannot be relocated on most SoCs. I'm not aware of any way to "test" a boot loader without flashing it to the device in question as most don't have emulators that could be used to test a boot loader.

Perhaps reading https://openwrt.org/toh/seagate/goflexhome#install_u-boot_and_openwrt_18061_into_nand_via_serial_cable_and_tftp-server would be of value.

Thanks for the reply. I have used kwboot on Arch Linux, and a version seems to available on OpenWrt:

https://archive.openwrt.org/snapshots/trunk/kirkwood/generic/u-boot-kwboot/

but I can't work out how to install it....

I tried building it but it won't compile.

I managed to retreive it using wget, but when running it I get:-

./kwboot: line1: syntax error: unterminated quoted string

It doesn't show any help screen. Is it possible to get the source for this version?

image

Try building off master

commit e13d9cd07f934c3e2a2cbee411cccec6cc4379c2
Author: Alberto Bursi <redacted>
Date:   Tue Jun 26 21:48:09 2018 +0200

    uboot-kirkwood: fix malformed boot configuration

Or, for that matter, try the current distributions:

http://downloads.openwrt.org/releases/18.06.1/targets/kirkwood/generic/

and look under "supplementary files" you'll find http://downloads.openwrt.org/releases/18.06.1/targets/kirkwood/generic/u-boot-goflexhome/ assuming that is what you are in need of.

1 Like