OpenWrt installation on Aerohive HiveAP 330

Dear all,

im trying to install OpenWRT on a Aerohive HiveAP 330, and following OpenWrt Source Repository.

im struggeling because there is no "tftpboot" command on the AP.

=> help
bdinfo  - print Board Info structure
bootm   - boot application image from memory
coninfo - print console devices and information
cp      - memory copy
cpu     - Multiprocessor CPU boot manipulation and release
dhcp    - boot image via network using DHCP/TFTP protocol
dump_hw_info- dump_hw_info - display HW config section.
echo    - echo args to console
editenv - edit environment variable
eth_test- eth_test     - ethernet port test commands

exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fdt     - flattened device tree utility commands
format_flash_fs- format_flash_fs        - format flash file system.
help    - print online help
i2c     - I2C sub-system
image_flash- image_flash        - upgrade image via network using TFTP protocol.
image_netboot- image_netboot    - boot image via network using TFTP protocol.
iminfo  - print header information for application image
imls    - list all images found in flash
imxtract- extract a part of a multi-image
interrupts- enable or disable interrupts
irqinfo - print information about IRQs
itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
mmc     - MMC sub system
mmcinfo - mmcinfo <dev num>-- display MMC info

nfs     - boot image via network using NFS protocol
ping    - send ICMP ECHO_REQUEST to network host
print_bootinfo- print_bootinfo  - print boot info of device.
print_bootparam- print_bootparam        - print boot parameters of device.
printenv- print environment variables
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
set_bootparam- set_bootparam    - set boot parameters of device.
set_current_image- set_current_image    - set image1 or image2 to boot from.
setenv  - set environment variables
setexpr - set environment variable as the result of eval expression
sf      - SPI flash sub-system
showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
sspi    - SPI utility commands
test    - minimal test like /bin/sh
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version
=>

Maybe someone can help here? Or had the same Problem.

The alternative looking command

image_netboot

results in an request a new DHCP Adress and deleting all prev. added infos

=> dhcp
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.100.119
=> printenv
bootcmd=setenv bootargs root=/dev/ram console=ttyS0,9600 ramdisk_size=700000 cache-sram-size=0x10000; cp.l 0xEC040000 0x2000000 0x500000; bootm 0xEE840000 0x2000000 0xEC000000;
bootdelay=3
baudrate=9600
loads_echo=1
loadaddr=1004000
netdev=eth0
uboot=u-boot.bin
loadaddr=1000000
consoledev=ttyS0
ramdiskaddr=2000000
ramdiskfile=rootfs.ext2.gz.uboot
usb_phy_type=ulpi
vscfw_addr=ef000000
othbootargs=ramdisk_size=700000 cache-sram-size=0x10000
ethact=eth0
netretry=no
gatewayip=192.168.100.1
netmask=255.255.255.0
ipaddr=192.168.100.119
serverip=192.168.100.1

and crying regarding the missing content:

=> image_netboot
Device IP not set, get via DHCP
Speed: 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.100.119
Speed: 1000, full duplex
*** ERROR: `serverip' not set

greetings

Rob

Hi Rob,

i had the same problem. Looks like there are AP330 with different u-boot versions.

But luckily you can use the usb subsystem in u-boot to load the initramfs image.
If i remember correctly, you need a FAT16 formated usb drive with the initramfs + fdt image.
Connect the drive to the usb and do "usb start". You should see a usb tree including your drive.
You can do a "fatls" to list the files and with "fatload" you can load the image + fdt into the memory and boot the initramfs image with the bootm command.
It might be necessary to play with the right memory adresses, try the 2 mentioned in the commit (0x1000000 - 0x6000000)

Regards

Kirdes

Hi @kirdes,

thx for your reply.

I tryed your solution, unfortunately all 4 USB Sticks ( from 2GB to 16GB) are not working. Have frormatted them to FAT16 and Fat32.

They will be found by:

=> usb reset
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
=>

But they are not recognized:

=> fatinfo
usage: fatinfo <interface> <dev[:part]>
=> fatinfo usb 0
** Can't read from device 0 **

** Unable to use usb 0:1 for fatinfo **
=> fatinfo usb 1
** Can't read from device 1 **

Regards

Rob

Hmmm, if i recall correctly i was using a 256MB (!) drive and that one worked.

But it's hard to find such a small thumbdrive these days :frowning:

Maybe you can create a smaller partition on one of your drives, but I'm not sure wether u-boot can handle thumbdrives with more than one partition.....

I also have some older Aerohives where I haven't gotten tftp to work. usb also doesn't work in u-boot.

However, I've used both kermit (setenv baudrate then loadb) and NFS does work:

dhcp;
nfs 0x1000000 192.168.100.1:/ah/openwrt-21.02.0-mpc85xx-p1020-aerohive_hiveap-330-initramfs-kernel.bin;
nfs 0x6000000 192.168.100.1:/ah/openwrt-21.02.0-mpc85xx-p1020-aerohive_hiveap-330-squashfs-fdt.bin;
bootm 0x1000000 - 0x6000000;

Also, a number of the units don't boot after the sysupgrade unless you go back to u-boot and run:
set_current_image image1

I'm trying to get OpenWRT installed on a Ap330 as well. I'm running into the problem that after I use NFS to load the boot image and issue the bootm command, the thing loses the ability to see anything else on my network. A complete network isolation situation, it can only ping itself, and even the switch it is connected to can't ping it... so the busybox networking doesn't get something that the uboot networking does. I tried plugging a USB drive into the 330's USB port, but the dmesg in busybox doesn't react... at least it reacts when I plug an ethernet cable into the second ethernet port... I thought to run DHCP again and see if my network sees it, even if it doesn't see my network... but it doesn't seem that the busybox has dhclient built in, and I can't make opkg update when it can't see the network. Is there an old-school editing /config method to manually associate with a network and take an ip address?

Anybody got a way around this for me to try? Is there a way I can ftp/scp the system update bin over during the pre-boot? I don't think I have access to anything in pre-boot that post-boot can see...

It has, edit /etc/config/network, change the lan section as below

config interface 'lan'
        option device 'br-lan'
        option proto 'dhcp'

You can get files across anyway, I assume you have some kind of serial access?

Using something like this https://www.xmodulo.com/embed-binary-file-bash-script.html

I've gotten my openwrt image over to the box and done the sysupgrade flash... and issued this set_current_image invocation... but the box won't boot into the new fw. It hangs at "verifying checksum" and reports the ramdisk image is corrupt. Is this some sort of HW protection Aerohive started including, or are there some variations to the set_current_image invocation to try to make this behave?

Played around with it, figuring that the worst outcome is the box is more bricked than it would be in a unbootable state. Outcome was positive. Setting the current image to image2 worked and booted OpenWRT! Hooray. Image0 was nonexistant, and image1 was what was failing the checksum. But image2 got it to boot.