Difference between revisions of "Uboot FPGA firmware update from Linux"

From ArmadeusWiki
Jump to: navigation, search
(New page: The U-Boot FPGA firmware can be updated by means of U-Boot (Target_Software_Installation#FPGA_firmware_installation) or directly from Linux as described herewith. Under Linux: At fir...)
 
m (For APF6_SP)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The U-Boot FPGA firmware can be updated by means of U-Boot ([[Target_Software_Installation#FPGA_firmware_installation]]) or directly from Linux as described herewith.
+
[[Category: FPGA]]
 +
 
 +
== APF9328, APF27, APF51 ==
 +
 
 +
The FPGA firmware partition (mainly used from U-Boot) can be updated by means of U-Boot (see [[Target_Software_Installation#FPGA_firmware_installation|here]]) or directly from Linux as described herewith.
  
 
Under Linux:
 
Under Linux:
  
At first download your FPGA firmware:
+
* At first, download your FPGA firmware:
  [armadeus]$ tftp -g -r myFirmwareFile myServerIpAddress
+
<pre class="apf">
<br>
+
  # tftp -g -r my_firmware.bit 192.168.0.2
 +
</pre>
 +
 
 +
* Then, determine which partition in the flash is the firmware partition:
 +
<pre class="apf">
 +
  # cat /proc/mtd
 +
  dev:    size  erasesize  name
 +
  mtd0: 00100000 00020000 "u-boot"
 +
  mtd1: 00080000 00020000 "env"
 +
  mtd2: 00080000 00020000 "env2"
 +
  mtd3: 00100000 00020000 "firmware"
 +
  mtd4: 00080000 00020000 "dtb"
 +
  mtd5: 00080000 00020000 "splash"
 +
  mtd6: 00800000 00020000 "kernel"
 +
  mtd7: 1f400000 00020000 "rootfs"
 +
</pre>
 +
The example above is taken from an APF51 running Armadeus version 5.2 and we can see that mtd3 is the firmware partition. If yours is different, then replace mtd3 by what you found out to be the right one in the following commands.
 +
 
 +
* Once done, the firmware partition has to be erased:
 +
<pre class="apf">
 +
# flash_erase /dev/mtd3 0 0
 +
</pre>
 +
 
 +
* Then your FPGA .bit file can be written:
 +
<pre class="apf">
 +
# nandwrite -p /dev/mtd3 my_firmware.bit
 +
</pre>
 +
 
 +
That's all !
 +
 
 +
== For APF6_SP ==
  
Once done the U-Boot Firmware partition has to be erased
+
For APF6 there is no fpga partition. Then to flash it, the bitstream must be saved under the regular rootfs partition as [[Target_Software_Installation#APF6_SP |explain here]].
[armadeus]$ flash_eraseall /dev/mtd2/
+
<br>
+
  
Then your FPGA .bit file can be written
 
[armadeus]$ nandwrite -p /dev/mtd2 myFirmwareFile
 
<br>
 
  
That's all
+
[[Category:System Update]]

Latest revision as of 07:38, 27 August 2015


APF9328, APF27, APF51

The FPGA firmware partition (mainly used from U-Boot) can be updated by means of U-Boot (see here) or directly from Linux as described herewith.

Under Linux:

  • At first, download your FPGA firmware:
 # tftp -g -r my_firmware.bit 192.168.0.2
  • Then, determine which partition in the flash is the firmware partition:
  # cat /proc/mtd 
  dev:    size   erasesize  name
  mtd0: 00100000 00020000 "u-boot"
  mtd1: 00080000 00020000 "env"
  mtd2: 00080000 00020000 "env2"
  mtd3: 00100000 00020000 "firmware"
  mtd4: 00080000 00020000 "dtb"
  mtd5: 00080000 00020000 "splash"
  mtd6: 00800000 00020000 "kernel"
  mtd7: 1f400000 00020000 "rootfs"

The example above is taken from an APF51 running Armadeus version 5.2 and we can see that mtd3 is the firmware partition. If yours is different, then replace mtd3 by what you found out to be the right one in the following commands.

  • Once done, the firmware partition has to be erased:
 # flash_erase /dev/mtd3 0 0
  • Then your FPGA .bit file can be written:
 # nandwrite -p /dev/mtd3 my_firmware.bit

That's all !

For APF6_SP

For APF6 there is no fpga partition. Then to flash it, the bitstream must be saved under the regular rootfs partition as explain here.