mu icon indicating copy to clipboard operation
mu copied to clipboard

Tutorial for developing UEFI firmware with mu

Open alishir opened this issue 5 years ago • 4 comments

I've developed some UEFI firmware with Tianocore/EDK2. I found that mu is another platform for developing UEFI firmware. Is there any tutorial on how I should start developing UEFI firmware with mu?

alishir avatar Jan 04 '21 17:01 alishir

There are a couple of things you can review.

  1. Read the basic docs here

https://microsoft.github.io/mu

This should give you a basic overview of what Project Mu is and if you are familiar with Tianocore Edk2 then that will help because the process is similar (major difference is the idea of reuse and core layering instead of forking a single repo).

You can also walk thru this doc https://microsoft.github.io/mu/How/using_project_mu/
But it is a little outdated in that it is referencing a iMX8 board. I would now strongly suggest using our QEMU virtual platform.

  1. Get started with a QEMU based reference platform

Repo is here: https://github.com/microsoft/mu_tiano_platforms

A tutorial here should get you running with our QemuQ35 Platform. https://github.com/microsoft/mu_tiano_platforms/blob/release/202008/Platforms/QemuQ35Pkg/Docs/QemuQ35_ReadMe.md

Hope that helps. Please provide feedback if you have any issues.

spbrogan avatar Jan 04 '21 19:01 spbrogan

Hello @spbrogan and thanks for your helpful comment. I tried to setup the development environment according tho this guide https://microsoft.github.io/mu/CodeDevelopment/prerequisites/ but I couldn't find any guide for Linux operating system. Is it possible to use project Mu in Linux? Currently I'm using Debian.

alishir avatar Jan 07 '21 18:01 alishir

Linux is not our primary dev platform but yes it is supported and I would be happy to receive feedback/deal with issues. Building the core Project Mu repositories (mu_basecore, mu_tiano_plus, mu_plus, etc) is supported and done regularly on Linux. We do run Ubuntu based CI on every PR and thus it should work on a recent version of Ubuntu and GCC (and probably fine on debian). In the past, I have also used fedora with success.

You can see our CI pipeline for Ubuntu azure vm here. https://github.com/microsoft/mu_basecore/blob/release/202008/.azurepipelines/Ubuntu-GCC5.yml And the templated steps are in here: https://github.com/microsoft/mu_basecore/tree/release/202008/.azurepipelines/templates

Project Mu environment and build uses this project https://github.com/tianocore/edk2-pytool-extensions. In Mu we try to give more specific steps and details. In the above mentioned project they are more general purpose.

That said you should be able to follow the prereqs and do the similar/appropriate steps on your linux. The only additional step we have seen on Linux is around nuget support. Unfortunately, today this requires the mono framework.
https://github.com/tianocore/edk2-pytool-extensions/blob/master/docs/usability/using_extdep.md#a-note-on-nuget-on-linux

The build for QemuQ35 in the mu_tiano_platforms repo does work on Linux. Not all of the unit test features are supported but basic building and running should work.
https://github.com/microsoft/mu_tiano_platforms/blob/release/202008/Platforms/QemuQ35Pkg/Docs/Development/building.md#developer-environment

hope that helps. Thanks Sean

spbrogan avatar Jan 09 '21 04:01 spbrogan

Thanks a lot for the detailed and helpful answer.

alishir avatar Jan 19 '21 05:01 alishir

This issue has been automatically marked as stale because it has not had activity in 45 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.

github-actions[bot] avatar Nov 29 '22 01:11 github-actions[bot]

This issue has been automatically been closed because it did not have any activity in 45 days and no follow up within 7 days after being marked stale. Thank you for your contributions.

github-actions[bot] avatar Dec 06 '22 23:12 github-actions[bot]