GithubHelp home page GithubHelp logo

lucaceresoli / zynqmp-pmufw-builder Goto Github PK

View Code? Open in Web Editor NEW
31.0 6.0 18.0 47 KB

A simple script to build a PMU firmware for Xilinx ZynqMP

License: Other

Shell 100.00%
pmu-firmware xilinx-zynqmp

zynqmp-pmufw-builder's Introduction

zynqmp-pmufw-builder

This is a simple script to build a PMU firmware for the Xilinx ZynqMP System-on-Chip.

It design goals are to:

  • be simple to use: just type a few commands to have a PMU firmware ready
  • be easy to understand and modify to your needs
  • have minimal dependencies: only crosstool-NG and the PMU firmware source code are needed

Usage

  1. Get the source code:

    git clone --recurse-submodules https://github.com/lucaceresoli/zynqmp-pmufw-builder.git
    cd zynqmp-pmufw-builder
    
  2. Generate a suitable microblaze toolchain (this is normally needed only once):

    ./build.sh toolchain
    

    At the end a toolchain will be available in ~/x-tools/microblazeel-xilinx-elf/.

  3. Build it:

    ./build.sh pmufw-build
    

    The PMU firmware will be called pmufw.bin in the current directory. Custom compiler flags can be passed in the CFLAGS environment variable, E.G.:

    CFLAGS="-DENABLE_EM" ./build.sh pmufw-build
    

Enjoy!

zynqmp-pmufw-builder's People

Contributors

erique avatar ierkiaga avatar illukin avatar jacmet avatar joelsoncarl avatar lucaceresoli avatar nealfrager avatar yishai1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

zynqmp-pmufw-builder's Issues

Fatal warning -Wstringop-overflow

I get the following fatal warning when building the pmufw, the xpfw_restart.c file.
I don't think the warning is valid in this case since it is a raw memory copy.
I am curious why someone else hasn't complained about this though.
A fix is adding -Wno-stringop-overflow to CFLAGS in build.sh which I think is okay since we aren't writing any new code here and just want to compile and use the same as xilinx tools are using.

Do you want a patch for this? Or am I just bonkers.

In function 'XPfw_StoreFsblToDDR',
    inlined from 'XPfw_StoreFsblToDDR' at xpfw_restart.c:636:5,
    inlined from 'CheckFsblCompletion' at xpfw_mod_common.c:97:12,
    inlined from 'CheckFsblCompletion' at xpfw_mod_common.c:31:13:
xpfw_restart.c:656:31: warning: 'memcpy' writing 174080 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  656 |                         (void)memcpy((u32 *)FSBL_STORE_ADDR, (u32 *)FSBL_LOAD_ADDR,
      |                               ^
In function 'XPfw_RestoreFsblToOCM',
    inlined from 'XPfw_RestoreFsblToOCM' at xpfw_restart.c:693:5,
    inlined from 'PmMasterRestart' at pm_master.c:973:13,
    inlined from 'PmSystemShutdown' at pm_core.c:1302:12,
    inlined from 'PmProcessRequest' at pm_core.c:2097:3:
xpfw_restart.c:718:23: warning: 'memcpy' writing 174080 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
  718 |                 (void)memcpy((u32 *)FSBL_LOAD_ADDR, (u32 *)FSBL_STORE_ADDR,
      |                       ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.