Menu

Feedback on Building Refind on macOS

dakanji
2020-05-16
2020-07-31
  • dakanji

    dakanji - 2020-05-16

    Hi,

    Was able to build Refind 0.12.0 on my Mac using the TianoCore Approach. Needed some small modifications from what was in the BUILDING.txt file but it went great and able to repeat.

    I did it to implement GOP support from Clover for those of us on classic MacPros as the previous efi we had has been stuck on v0.10.3 which was what someone did before moving on.

    I have now been able to bump this up to v0.12.0 as stored here: https://github.com/dakanji/Refind-GOPFix/releases

    The old v0.10.3 GOP efi also had Memlog added from Clover to generate a log on progres of loading the BootScreen which I have not yet managed to get working but will tackle that next.

    Anyway, just wanted to flag up some build warnings which look to my untrained eyes as things that could be addressed in a future release:

    /Path/to/RefindPkg/refind/menu.c:1378:9: warning: variable 'TimerEvent' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (Timeout == 0) {
            ^~~~~~~~~~~~
    /Path/to/RefindPkg/refind/menu.c:1392:41: note: uninitialized use occurs here
        refit_call1_wrapper(BS->CloseEvent, TimerEvent);
                                            ^~~~~~~~~~
    /Path/to/RefindPkg/refind/../include/refit_call_wrapper.h:41:11: note: expanded from macro 'refit_call1_wrapper'
            f(a1)
              ^~
    /Path/to/RefindPkg/refind/menu.c:1378:5: note: remove the 'if' if its condition is always false
        if (Timeout == 0) {
        ^~~~~~~~~~~~~~~~~~~
    /Path/to/RefindPkg/refind/menu.c:1375:25: note: initialize the variable 'TimerEvent' to silence this warning
        EFI_EVENT TimerEvent;
                            ^
                             = NULL
    1 warning generated.
    

    Here are the changes to the documented items in BUILDING.txt that were needed for the build (I built on macOS using TianoCore as stated):

    Preparing Your Development Kit
    1. ITEM 2A: Copy to /usr/local is not really needed. It can be in any path. Using a subfolder under Documents
    2. ITEM 5: Actually easier to set ACTIVE_PLATFORM to "RefindPkg/RefindPkg.dsc". With this, you can just use "build" at the end. Also cleaner as does not build the MdePkg stuff

    Compiling rEFInd the TianoCore Way
    1. ITEM 7: You can just use "build" here if ACTIVE_PLATFORM is already properly set in Conf/target.txt

    Compiling rEFInd Under OS X
    1. BULLET POINT 1: It doesn't build with current release as of today, May 2020, but does 100% of the time with UDK2018.
    2. BULLET POINT 2: Seems best to install all the items on the referenced page including Qemu. I use HomeBrew.
    3. BULLET POINT 5: The build fails until the "StdLib" folder from UDK2018 is copied into RefindPkg.

     

    Last edit: dakanji 2020-07-26
  • dakanji

    dakanji - 2020-05-16

    BULLET POINT 5: The build fails until the "StdLib" folder from UDK2018 is copied into RefindPkg.

    Changing StdLib/Include to ../StdLib/Include in my RefindPkg.dec file achieves the same end.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.