element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Petalinux custom app with library guidance
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 5 replies
  • Subscribers 312 subscribers
  • Views 1972 views
  • Users 0 members are here
Related

Petalinux custom app with library guidance

Former Member
Former Member over 9 years ago

Hello everyone,
I am using Petalinux 2014.4 for Zedboard.
I want to add a new app which references openssl library. Using petalinux-create I have created a sample app, which I am modifying. I need to do something like
#include <openssl/sha.h>
So on compilation I get 'undefined reference to `SHA1_Init', undefined reference to `SHA1_Update' etc.
I added openssl binaries through petalinux-config, but I understand this is not enough.
How do I specify in my make file, the external libary needed for my app?
I am new to Linux developement, I have been primarily been doing microcontroller development using easy UI tools. Can anyone point me to few docs which will explain using petalinux makefiles?

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 9 years ago

    GK,

      While you can use custom makefiles with PetaLinux, and indeed at the top level that is useful so you don't have to remember some of the complex and lengthy options that are applicable to various commands, the PetaLinux environment presents a simplified interface for Linux newbies that hides much of the detail.  So it is best within the environment (at least for getting started) to follow the steps for PetaLinux development, rather than the traditional flow used by Linux experts.

    If you look at Xilinx user guide 1144, there are sections on adding pre-built and custom libraries, and also how to add userspace applications that make use of those libraries.  The information there should get you past your compilation problems.

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    Hi Ron,
    Thanks for replying.
    I am using the same document. I used it to create a app as I mentioned and started modifying source code in it. I want to reference openssl library. That guide is incomplete in terms of explaining how to reference libraries in a new application. As openssl is already included in rootfs, all I want is a way to reference it in my application.

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    If you include the openssl package in the kernel, that just provides the binaries in the target root file system.  You can demonstrate that openssl is functional by also including dropbear, and then using an SSL client like Putty to create a secure connection into the running target.  

    However, if you actually want to develop an application that calls the openssl-dev API, then you have to include the development libraries in the PetaLinux build environment, so you can link your program to them and create a final binary that would get included in the target root file system.

    So I don't think you actually have what you need for development by simply including the openssl library in the target rootfs.  That is why you have to install additional libraries in the development environment.  Make sense?

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    Hi Ron,
    Yes it does. Thanks.
    I will try to include source files as a library.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dmoby
    0 dmoby over 6 years ago in reply to Former Member

    Hi GK,

    have you been able to include source files (*.h) in the <TMPDIR>/work/{ARCH}-xilinx-linux-gnueabi/openssl/.../usr/include/openssl/  to your app, and build your app successfully?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube