Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
toh:aerohive:hiveap-330 [2022/02/17 21:04] – [Getting and Flashing Firmware] Added old flashing / installation method chunkeeytoh:aerohive:hiveap-330 [2022/02/19 18:32] – [Snapshot Releases] new method chunkeey
Line 118: Line 118:
 The method depends on what release you want to install. The method depends on what release you want to install.
  
-=== 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.
  
-=== Releases older or equal to 21.02 ===+<code> 
 +setenv owrt_boot 'setenv bootargs \"console=ttyS0,$baudrate\";bootm 0xEC040000 - 0xEC000000' 
 +save 
 +</code>
  
-Run the following commands in uboot+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 ==== 
 + 
 +If you are downgrading from a later snapshot release: You need to set and save the original boot command parameters that were used before the re-partitioning of the device: 
 +<code> 
 +setenv owrt_boot "setenv bootargs root=/dev/ram console=ttyS0,9600 ramdisk_size=700000 cache-sram-size=0x10000; cp.l 0xEC040000 0x2000000 0x500000; bootm 0xEE840000 0x2000000 0xEC000000" 
 +save 
 +</code> 
 + 
 +To run the installation enter the following commands in uboot:
 <code> <code>
 tftpboot 0x1000000 192.168.1.101:mpc85xx-p1020-hiveap-330-initramfs tftpboot 0x1000000 192.168.1.101:mpc85xx-p1020-hiveap-330-initramfs
  • Last modified: 2024/02/11 21:39
  • by 127.0.0.1