Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
toh:aerohive:hiveap-330 [2022/02/19 18:10] – [Bootloader versions] added md5sum chunkeeytoh:aerohive:hiveap-330 [2022/02/19 18:32] – [Snapshot Releases] new method chunkeey
Line 74: Line 74:
 The following bootloader versions have been confirmed to be able to flash and boot OpenWrt correctly: The following bootloader versions have been confirmed to be able to flash and boot OpenWrt correctly:
  
-  * Aerohive Boot Loader v1.0.3.4d, Build time Thu Jan 12 08:29:18 2017  +  * Aerohive Boot Loader v1.0.3.4d, Build time Thu Jan 12 08:29:18 2017
-    * md5sum: <code>d84b45a2e8aca60d630fbd422efc6b39</code>+
  
 ===== Getting and Flashing Firmware ===== ===== Getting and Flashing Firmware =====
Line 121: Line 120:
 ==== Snapshot Releases ==== ==== Snapshot Releases ====
  
-TBD/TBD+If you start out fresh you can preemptively set the new openwrt boot command. 
 +For this to work, the uboot has to be modified (which we do in a later step). 
 +Otherwise, the stock uboot will always use a internal bootcmd that can't be 
 +overwritten and it won't boot the sysupgraded'/installed kernel later.
  
 +<code>
 +setenv owrt_boot 'setenv bootargs \"console=ttyS0,$baudrate\";bootm 0xEC040000 - 0xEC000000'
 +save
 +</code>
 +
 +To boot the initramfs, enter the following commands into uboot's prompt: 
 +<code>
 +setenv bootargs console=ttyS0,$baudrate
 +tftpboot 1000000 192.168.1.101:mpc85xx-p1020-hiveap-330-initramfs.bin
 +bootm
 +</code>
 +
 +6. Once OpenWrt booted:
 +carefully copy and paste this into the root shell. One step at a time.
 +
 +6.1 install kmod-mtd-rw from the internet and load it
 +
 +  opkg update; opkg install kmod-mtd-rw
 +  insmod mtd-rw i_want_a_brick=y
 +
 +6.2 create scripts that modifies uboot
 +
 +  cat <<- "EOF" > /tmp/uboot-update.sh
 +  . /lib/functions/system.sh
 +  cp "/dev/mtd$(find_mtd_index 'u-boot')" /tmp/uboot
 +  cp /tmp/uboot /tmp/uboot_patched
 +  ofs=$(strings -n80 -td < /tmp/uboot | grep '^ [0-9]* setenv bootargs.*cp\.l' | cut -f2 -d' ')
 +  for off in $ofs; do
 +    printf "run owrt_boot;            " | dd of=/tmp/uboot_patched bs=1 seek=${off} conv=notrunc
 +  done
 +  md5sum /tmp/uboot*
 +  EOF
 +
 +6.2 run the script to generated a patched uboot
 +
 +  sh /tmp/uboot-update.sh
 +
 +The script will print out three md5sums to verify that /tmp/uboot and /tmp/uboot_patched are good. You can verify your results with the md5sums in [[toh:aerohive:hiveap-330|Aerohive HiveAP 330 / HiveAP 350]]
 +   
 +For reference: my md5sum looked like this
 +
 +   d84b45a2e8aca60d630fbd422efc6b39  /tmp/uboot
 +   6dc420f24c2028b9cf7f0c62c0c7f692  /tmp/uboot_patched
 +   98ebc7e7480ce9148cd2799357a844b0  /tmp/uboot-update.sh <-- just for reference (an extra space/newline will change it)
 +
 +6.3 flash the patched uboot
 +
 +  mtd write /tmp/uboot_patched u-boot
 +  
 +This uboot runs the bootcommand in the //owrt_boot// in the uboot environment. You can now upgrade back and forth by
 +editing this uboot environment variable.
 +
 +7. permanent installation
 +
 +If you have LuCI (included in Releases), you can now load up LuCI at 192.168.1.1, and use the sysupgrade option to flash the full image to the device using the sysupgrade file for the HiveAP-330. From this point on, any future updates/builds can just be flashed through LuCI.
 +
 +If you don't have LuCI, you have to copy over the sysupgrade file via SFTP/SCP/SSH or download it on the device through wget or curl and use sysupgrade -n hiveap-330-sysupgrade.bin to make the installation permanent.
 ==== (Downgrade) to Releases older or equal to 21.02 ==== ==== (Downgrade) to Releases older or equal to 21.02 ====
  
  • Last modified: 2024/02/11 21:39
  • by 127.0.0.1