# Boot.py to download different bitstream

**URL:** <https://discuss.pynq.io/t/boot-py-to-download-different-bitstream/4354>\
**Category:** Support\
**Created:** [June 13, 2022, 1:39pm UTC](https://discuss.pynq.io/t/boot-py-to-download-different-bitstream/4354 "2022-06-13T13:39:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 13, 2022, 1:39pm UTC](https://discuss.pynq.io/t/boot-py-to-download-different-bitstream/4354/1 "2022-06-13T13:39:24Z")

</div>

For customize purpose, we would like to download the specified bitstream which put into the sd card already, and execute some python or linux code to initial the design/IP automatically without end use connect the board via Jupyter Notebook or micro USB port.  
Could we modify the boot.py to download other bitstream during the board boot and execute relative operations?

---

<div class="post-metadata">

**Author:** ![cathalmccabe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cathalmccabe/32/3348_2.png) [@cathalmccabe](https://discuss.pynq.io/u/cathalmccabe)\
**Post date:** [June 13, 2022, 2:03pm UTC](https://discuss.pynq.io/t/boot-py-to-download-different-bitstream/4354/2 "2022-06-13T14:03:38Z")

</div>

Yes, you can do this. This script runs at the end of the boot process.

Just remember this is a Python script. If some code at the start of the script gives an error, the script will stop executing.

Cathal

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [June 13, 2022, 2:30pm UTC](https://discuss.pynq.io/t/boot-py-to-download-different-bitstream/4354/3 "2022-06-13T14:30:26Z")

</div>

> [@Boot overlay or bit load after power up](https://discuss.pynq.io/t/boot-overlay-or-bit-load-after-power-up/4178):
>
> I may be getting this wrong or I missed the detail a bit. As I had tried from: [https://pynq.readthedocs.io/en/latest/pynq\_sd\_card.html?&\_ga=2.118423182.629833020.1651139285-1104757757.1650982329#leveraging-boot-py-to-modify-sd-card-boot-behavior](https://pynq.readthedocs.io/en/latest/pynq_sd_card.html?&_ga=2.118423182.629833020.1651139285-1104757757.1650982329#leveraging-boot-py-to-modify-sd-card-boot-behavior) The instruction said adding boot.py aka packages/ └── boot\_leds ├── boot.py └── pre.sh While what I observe is the base bit and boot.py is run after PYNQ Linux, based on Ubuntu 20.04 pynq ttyPS0 pynq login: xilinx (automatic login) Welcome to …

Provide previous experience again.

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 13, 2022, 7:40pm UTC](https://discuss.pynq.io/t/boot-py-to-download-different-bitstream/4354/4 "2022-06-13T19:40:54Z")

</div>

Got it. Thanks for your suggestion.

---

<div class="post-metadata">

**Author:** ![Willy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/willy/32/3440_2.png) [@Willy](https://discuss.pynq.io/u/Willy)\
**Post date:** [June 13, 2022, 7:47pm UTC](https://discuss.pynq.io/t/boot-py-to-download-different-bitstream/4354/5 "2022-06-13T19:47:51Z")

</div>

Thanks again for your great reply.  
i’m fortunate to use 2.7 version. One more question about your post:  
// ==================  
we allow users to disable FPGA manager by setting `FPGA_MANAGER_${BOARD}` to 0. This may have many use cases. For example, users may want the bitstream to be downloaded at boot to enable some board components as early as possible. Another use case is that users want to enable interrupt for XRT. _The side effect of this, is that users may not be able to reload a bitstream after boot._  
// ==================  
In my understanding, the FPGA manger = 0 should cause end user can’t download any bitstream after the board boot up. (The board can only use the default bitstream which includes in the BSP)

It seems the boot.py can out of control for the FPGA manager from your experiment:

> The overlay can still be reload even setting the flag to 0.
