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
inbox:toh:cisco:vedge_1000 [2024/08/03 20:27] – [Notes] bluecmdinbox:toh:cisco:vedge_1000 [2024/08/11 12:20] – [Installing OpenWrt] bluecmd
Line 55: Line 55:
 ==== Installing OpenWrt ==== ==== Installing OpenWrt ====
  
 +=== Alternative 1: Boot installation from unlocked u-boot via TFTP ===
  
-=== Alternative 1: Boot installation from inside OEM OS (USB drive, SD card, SSH, HTTP(S)) ===+  * Download the ''openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin'' file somewhere locally and set up a TFTP server serving the file. 
 +    * Example TFTP server command to serve the files in the current directory: ''sudo /usr/sbin/in.tftpd -sLv .'' 
 +  * Calculate the CRC32 of your boot file using the following command: <code>python3 -c 'd = open("openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin", "rb").read(); import binascii; print("crc32 -v 0x20000000 " + hex(len(d)) + " " + hex(binascii.crc32(d))[2:].rjust(8, "0"))'</code> 
 + 
 +  * If you are not in the u-boot prompt, reboot the device and press **Ctrl-x** to enter u-boot 
 +    * If this does not work, see the "Unlock u-boot" section. 
 +  * Connect the vEdge 1000 via the management Ethernet port to a network with DHCP available 
 +  * Run the following commands, replace the IP with your TFTP server: 
 +    * ''setenv ethact octmgmt0; dhcp; setenv serverip 10.1.2.3'' 
 +    * ''setenv ethact octmgmt0; tftpboot $loadaddr $serverip:/openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin'' 
 +    * ''crc32 -v 0x20000000 0x?????? ????????'' (use the already prepared CRC32 command from earlier) 
 +    * If the previous crc32 command does not complain, continue with the boot 
 +    * ''bootoctlinux $loadaddr endbootargs'' 
 +  * Continue with the **Prepare the disk** step 
 + 
 +=== Alternative 2: Boot installation from inside OEM OS (USB drive, SD card, SSH, HTTP(S)) ===
  
 **Note:** OEM OS only supports mounting vfat partitions automatically **Note:** OEM OS only supports mounting vfat partitions automatically
  
-  * Copy ./bin/targets/octeon/generic/openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin  to /boot/openwrt-install.bin+  * Copy ''openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin'' to ''/boot/openwrt-install.bin''
   * ''touch /boot/in_prod'' to unlock u-boot if required   * ''touch /boot/in_prod'' to unlock u-boot if required
   * Reboot vEdge   * Reboot vEdge
Line 68: Line 84:
     * ''ext2load usb 0:1 $loadaddr openwrt-install.bin''     * ''ext2load usb 0:1 $loadaddr openwrt-install.bin''
     * ''bootoctlinux $loadaddr endbootargs''     * ''bootoctlinux $loadaddr endbootargs''
-  * Skip to the **Prepare the disk step** +  * Continue with the **Prepare the disk** step
- +
-=== Alternative 2: Boot installation from unlocked u-boot via TFTP === +
- +
-  * If you are not in the u-boot prompt, reboot the device and press **Ctrl-x** to enter u-boot +
-    * If this does not work, see the "Unlock u-boot" section. +
-  * Connect the vEdge 1000 via the management Ethernet port to a network with DHCP available +
-  * Run the following commands, replace the IP with your TFTP server: +
-    * ''setenv ethact octmgmt0; dhcp; setenv serverip 10.1.2.3'' +
-    * ''setenv ethact octmgmt0; tftpboot $loadaddr $serverip:/openwrt-octeon-generic-cisco_vedge1000-initramfs-kernel.bin'' +
-    * ''bootoctlinux $loadaddr endbootargs'' +
- +
-Example tftp server command: ''sudo /usr/sbin/in.tftpd -sLv .''+
  
 === Prepare the disk === === Prepare the disk ===
Line 90: Line 94:
   * Generate a new disk ID by running the following commands:   * Generate a new disk ID by running the following commands:
     * <code>     * <code>
-udhcpc -i br-lan 
-echo 'nameserver 1.1.1.1' > /etc/resolv.conf 
-opkg update 
-opkg install sfdisk 
 source /lib/upgrade/platform.sh source /lib/upgrade/platform.sh
 sfdisk --disk-id "$(platform_get_n821_disk)" 0x10"${RANDOM}" sfdisk --disk-id "$(platform_get_n821_disk)" 0x10"${RANDOM}"
Line 103: Line 103:
 You need to make the file ''openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar'' available to the installation. You need to make the file ''openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar'' available to the installation.
  
-== HTTP from Github ==+**Example using OpenSSH:**
  
 <code> <code>
 udhcpc -i br-lan udhcpc -i br-lan
-echo 'nameserver 8.8.8.8' > /etc/resolv.conf +# On another machinescp -openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar root@10.x.x.x:/tmp/ 
-cd /tmp/ +sysupgrade -n /tmp/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar
-wget https://github.com/sonix-network/openwrt/releases/download/[..]octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar +
-sysupgrade -n /tmp/*vedge1000-squashfs-sysupgrade.tar+
 </code> </code>
  
-== USB drive ==+**Example using a USB drive:**
  
 <code> <code>
 mount /dev/sdb1 /mnt mount /dev/sdb1 /mnt
 sysupgrade -n /mnt/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar sysupgrade -n /mnt/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar
-</code> 
- 
-== OpenSSH SCP == 
- 
-<code> 
-udhcpc -i br-lan 
-# On another machine: scp -O openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar root@10.x.x.x:/tmp/ 
-sysupgrade -n /tmp/openwrt-octeon-generic-cisco_vedge1000-squashfs-sysupgrade.tar 
 </code> </code>
  
Line 979: Line 969:
 ===== Notes ===== ===== Notes =====
  
-====== USB power switching ======+==== USB power switching ====
  
 To power down the top port you can do: To power down the top port you can do:
  • Last modified: 2024/09/02 20:29
  • by bluecmd