--usedefault. Also a few misc. small changes.
normally run Linux, you can run it in a VirtualBox or similar virtual
machine. (I describe some unsupported non-Linux build options shortly.)
-* A standard set of Linux development tools, based on GCC.
+* A standard set of Linux development tools, based on GCC. (I've tried
+ using clang 3.4 under Ubuntu, with partial success. The main rEFInd
+ binary, gptsync, and some drivers compile successfully; but only gptsync
+ runs normally. The drivers I've tried and the main rEFInd binary crash.)
* One of the following:
CFLAGS = $(OPTIMFLAGS) -fno-stack-protector -fshort-wchar -Wall
# ...for GNU-EFI....
-GNUEFI_CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I../include -I../refind -I../libeg -I../mok
-#GNUEFI_CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I. -I./../include -I./../libeg -I./../mok -I../include -I../refind -I../libeg
+GNUEFI_CFLAGS = -fpic -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I../include -I../refind -I../libeg -I../mok
# ...and for TianoCore....
TIANO_INCLUDE_DIRS = -I $(EDK2BASE)/MdePkg \
TIANO_LDFLAGS = -nostdlib -n -q --gc-sections --script=$(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script \
--entry $(ENTRYPOINT) -u $(ENTRYPOINT) -m $(LD_CODE)
-
-
#
# objcopy flags for GNU-EFI
#
FORMAT = --target=efi-app-$(ARCH)
FORMAT_DRIVER = --target=efi-bsdrv-$(ARCH)
-
#
# Modifications on a per-architecture basis....
#
ARCH_CFLAGS = -DEFIX64 -DEFI_FUNCTION_WRAPPER -m64 -mno-red-zone
ifeq ($(MAKEWITH),TIANO)
ARCH_CFLAGS += -mcmodel=large "-DEFIAPI=__attribute__((ms_abi))"
-endif
-ifeq ($(MAKEWITH),GNUEFI)
- ARCH_CFLAGS += -fpic
endif
ARCHDIR = X64
UC_ARCH = X64
endif
ARCH_CFLAGS = -m32 -DEFI32 -malign-double
-ifeq ($(MAKEWITH),GNUEFI)
- ARCH_CFLAGS += -fpic
-endif
ARCHDIR = Ia32
UC_ARCH = IA32
FILENAME_CODE = ia32
all: $(FILESYSTEMS)
-xfs:
- rm -f fsw_efi.obj
- +make DRIVERNAME=xfs -f Make.tiano
-
ext2:
rm -f fsw_efi.obj
+make DRIVERNAME=ext2 -f Make.tiano
all_gnuefi: $(FILESYSTEMS_GNUEFI)
-xfs_gnuefi:
- rm -f fsw_efi.o
- +make DRIVERNAME=xfs -f Make.gnuefi
-
ext2_gnuefi:
rm -f fsw_efi.o
+make DRIVERNAME=ext2 -f Make.gnuefi
#else
#include "../include/tiano_includes.h"
#endif
-#define memcpy(a, b, c) CopyMem(a, b, c)
#ifdef __cplusplus
#include <vector>
return Length;
} // int MyStrlen()
+VOID *memset (VOID *s, int c, size_t n) {
+ SetMem(s, c, n);
+ return s;
+}
+
+VOID *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) {
+ CopyMem(__dest, __src, __n);
+ return __dest;
+}
+
typedef struct _lode_color {
UINT8 red;
UINT8 green;
# Revision history:
#
# 0.10.1 -- Improve extraction of default kernel options from /proc/cmdline.
-# Add support for AMD64 (aka AARCH64, aa64) platform.
+# Add support for AMD64 (aka AARCH64, aa64) platform. Added
+# warning when --alldrivers used without --usedefault.
# 0.10.0 -- Enable running under OS X's recovery system & add warning about
# SIP & brief instructions on how to deal with it if SIP is
# detected to be enabled. Also change way refind_linux.conf default
echo "The --keepname option is incompatible with --usedefault! Aborting!"
exit 1
fi
+ if [[ "$InstallDrivers" == "all" && "$TargetDir" != "/EFI/BOOT" ]] ; then
+ echo "The --alldrivers option is meant for creating USB flash drives with (near-)"
+ echo "universal boot support. Using it on a hard disk partition runs the risk of"
+ echo "creating serious problems, up to and including rendering your computer"
+ echo -n "unbootable. Are you SURE you want to proceed (Y/N)? "
+ ReadYesNo
+ if [[ "$YesNo" != "Y" && "$YesNo" != "y" ]] ; then
+ echo "Aborting installation!"
+ exit 0
+ fi
+ fi
RLConfFile="$RootDir/boot/refind_linux.conf"
EtcKeysDir="$RootDir/etc/refind.d/keys"
} # GetParams()
{
EG_IMAGE *Background;
- if (SelectionImages != NULL) {
- if (selected) {
- Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos,
+ if (selected) {
+ Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos,
+ SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
+ egComposeImage(Background, SelectionImages[Entry->Row], 0, 0);
+ BltImageCompositeBadge(Background, Entry->Image, Entry->BadgeImage, XPos, YPos);
+ } else { // Image not selected; copy background
+ egDrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos,
SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
- egComposeImage(Background, SelectionImages[Entry->Row], 0, 0);
- BltImageCompositeBadge(Background, Entry->Image, Entry->BadgeImage, XPos, YPos);
- } else { // Image not selected; copy background
- egDrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos,
- SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height);
- } // if/else
- } // if
+ } // if/else
} // VOID DrawMainMenuEntry()
static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN *itemPosX,