# Loading a bitstream from boot through the SD card

**URL:** <https://discuss.pynq.io/t/loading-a-bitstream-from-boot-through-the-sd-card/5725>\
**Category:** Support\
**Created:** [June 21, 2023, 4:23am UTC](https://discuss.pynq.io/t/loading-a-bitstream-from-boot-through-the-sd-card/5725 "2023-06-21T04:23:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![techguy](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@techguy](https://discuss.pynq.io/u/techguy)\
**Post date:** [June 21, 2023, 4:23am UTC](https://discuss.pynq.io/t/loading-a-bitstream-from-boot-through-the-sd-card/5725/1 "2023-06-21T04:23:31Z")

</div>

**Board** : Pynq-z1  
**OS** : v3.0.1  
Good day community,  
I would like to load my custom overlay at boot by using the SD card. Are there any recommendations on this approach? I have searched the forums and there doesn’t seem to be a way to do this easily. I have tried modifying the boot.py script to include the execution of the Overlay() object which takes the .bit file (and .hwh in the same directory) to load the bit stream.  
Thanks!

---

<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 23, 2023, 3:33pm UTC](https://discuss.pynq.io/t/loading-a-bitstream-from-boot-through-the-sd-card/5725/2 "2023-06-23T15:33:59Z")

</div>

> [@techguy](#):
>
> ould like to load my custom overlay at boot by using the SD card.

Does boot.py method not work? This should be the easiest way.  
Perhaps try give the absolute path to the overlay bit/hwh if you have not already done this.

Cathal

---

<div class="post-metadata">

**Author:** ![techguy](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@techguy](https://discuss.pynq.io/u/techguy)\
**Post date:** [June 27, 2023, 7:14pm UTC](https://discuss.pynq.io/t/loading-a-bitstream-from-boot-through-the-sd-card/5725/3 "2023-06-27T19:14:02Z")

</div>

Thank you for your reply Cathal!  
This worked like a charm, my procedure:

- Load the custom bit file into the /boot directory
- Modify the boot.py script to include the Overlay library
- Put the absolute file path to the bit stream in the Python script’s Overlay object

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [June 27, 2023, 8:51pm UTC](https://discuss.pynq.io/t/loading-a-bitstream-from-boot-through-the-sd-card/5725/4 "2023-06-27T20:51:10Z")

</div>


