Closed EmilioPeJu closed 3 years ago
I have converted this to a draft pull request, as we'll have to merge all of the following in one big action:
I have converted PRs (1) and (2) above to draft status for now, as they definitely need to be merged at the same time.
Am I getting confused? Is this merge request really dependent on PandABlocks-FPGA#33?
Does this also need a CONFIG.example
update?
@Araneidae , Updating the kernel implies that the FPGA loading script should be changed.
The xdevcfg
device doesn't exist anymore (the associated driver is deprecated), and the new way is using the FPGA manager interface.
The FPGA repo will likely need a change similar to the one shown below:
diff --git a/etc/load-panda-firmware b/etc/load-panda-firmware
index 45711560..14c476a2 100755
--- a/etc/load-panda-firmware
+++ b/etc/load-panda-firmware
@@ -33,6 +33,15 @@ configure_gpio_m0()
echo $GPIO_M0 >/sys/class/gpio/unexport
}
+load_fpga()
+{
+ local bitstream="$1"
+ # Set flags for loading full bitstream
+ echo 0 > /sys/class/fpga_manager/fpga0/flags
+ mkdir -p /lib/firmware
+ cp -f "$bitstream" /lib/firmware
+ echo "$(basename $bitstream)" > /sys/class/fpga_manager/fpga0/firmware
+}
[ -e $carrier_firmware -a -e $slow_firmware ] ||
fail "Firmware not installed"
@@ -44,6 +53,6 @@ configure_gpio_m0 &&
$check_ipmi &&
# If FMC passes then load the carrier firmware
-cat $carrier_firmware >/dev/xdevcfg &&
+load_fpga $carrier_firmware &&
# Finally load the slow FPGA
$slow_load <$slow_firmware
Ah. Ok, so these two merges still need to be synchronised. Think I've done everything I need to here?
All looks good to me!
This change intends to support building rootfs for the xu5 board, the way to specify the target is with the variable PLATFORM which can be zynq or zynqmp. Here is a list of important facts to consider:
Here is an example CONFIG used to test the changes: