cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
651 Views
Registered: ‎10-04-2018

Newbie petalinux question: Is it possible to add SDL gaming library to the kernel through a yocto build?

Jump to solution

I am not a newbie EE (over 60) and I do have an Ultra96 development board that I have been experimenting with. But I am new to the Zync processor and especially to Petalinux (but not linux itself).

While I know that Petalinux and yocto are not linux in and of themselves but are methods/scripts using bitbake and openembedded and others in order to build a linux distribution, I was wondering if I could link the SDL library, "libsdl2" into the build for petalinux.

Otherwise, is it possible to do a typical install like one would do on a "normal" linux installation such as ubuntu or debian? Using a "configure", "make" and "install"?

Yes, I do realize that there may be a limitation due to the fact that the Ultra96 v2 has only 2GB of onboard ddr.

Thank You

Tom

 

0 Kudos
Reply
1 Solution

Accepted Solutions
Visitor
Visitor
581 Views
Registered: ‎08-31-2014

Tom,

    Since you I have an Ultra96, I would start here (check if it's v1 or v2) and build a PetaLinux project from scratch. Once you have that booting, there's a link at the bottom of the linked page to UG1144. Use this guide to see if you can simply add the library you want from the PetaLinux config menu. If not, Chapter 7 says you can include a shared object that is pre-compiled. You can compile the source yourself using the appropriate cross complier from the PetaLinux tools. Or, and this may be an idea so crazy it just might work, you could extract the contents of the SDL2 Arch Linux ARM package.  Good luck!

-Jordan

View solution in original post

4 Replies
Visitor
Visitor
582 Views
Registered: ‎08-31-2014

Tom,

    Since you I have an Ultra96, I would start here (check if it's v1 or v2) and build a PetaLinux project from scratch. Once you have that booting, there's a link at the bottom of the linked page to UG1144. Use this guide to see if you can simply add the library you want from the PetaLinux config menu. If not, Chapter 7 says you can include a shared object that is pre-compiled. You can compile the source yourself using the appropriate cross complier from the PetaLinux tools. Or, and this may be an idea so crazy it just might work, you could extract the contents of the SDL2 Arch Linux ARM package.  Good luck!

-Jordan

View solution in original post

Adventurer
Adventurer
553 Views
Registered: ‎10-04-2018
Thank you Jordan, for the reply. I will take your suggestions as the starting point for this endeavor. My Ultra96 is v2. I already attempted building a Petalinux project from scratch, which, compiled, etc. but did not boot. The original SD card image I downloaded from Avnet did, in fact, boot, so it must have been some mistake that I made.
Thank You again
Tom
0 Kudos
Reply
Visitor
Visitor
543 Views
Registered: ‎08-31-2014

Glad to have helped Tom. I recently built a PetaLinux project for my Zynq 7020 based PYNQ board using the BSP for the ARTY 7Z (the boards are almost exactly the same). At first, I got it to boot but the root filesystem didn't occupy the entire partition of the SD for the root filesystem. When I tried to resize the data in the partition, that broke it all. Found a comment somewhere (on my phone and can't relocate the Stack Exchange question/answer) that said to run fsck on the image before you dd it to the SD and resize that it. That fixed that problem. If you're not even getting to U-boot, then your FSBL, BOOT.BIN, or FAT partition has an issue.

I used fdisk similar to the instructions here to set up the SD card.

-Jordan
Adventurer
Adventurer
528 Views
Registered: ‎10-04-2018
Jordan. Fascinating! I use the linux command dd (data duplicator) when I am cloning my linux drives (one line of code does everything) but I always need to run fsck on the new clone when booting it up for the first time. Some modules or other get messed up but fsck always fixes it. I'll remember that when attempting to boot my Petalinux build.

Thank You
Tom
0 Kudos
Reply