]> code.delx.au - refind/commitdiff
Add warning to refind-install when --alldrivers is used without
authorsrs5694 <srs5694@users.sourceforge.net>
Mon, 7 Dec 2015 22:49:34 +0000 (17:49 -0500)
committersrs5694 <srs5694@users.sourceforge.net>
Mon, 7 Dec 2015 22:49:34 +0000 (17:49 -0500)
--usedefault. Also a few misc. small changes.

BUILDING.txt
Make.common
filesystems/Makefile
libeg/lodepng.h
libeg/lodepng_xtra.c
refind-install
refind/menu.c

index 890e178df97822c61a31b3ad0dbcc235e23b26ba..14096c5a81e7348180169eadf89b755ef13a73f0 100644 (file)
@@ -11,7 +11,10 @@ To compile rEFInd, you'll need the following:
   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:
 
index d46be779b533560f74ea9db38493b11bcd27a39e..1ebce500081263f62bb5a72c8d2b5dedba804194 100644 (file)
@@ -65,8 +65,7 @@ OPTIMFLAGS      = -Os -fno-strict-aliasing
 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 \
@@ -98,8 +97,6 @@ TIANO_LDSCRIPT   = $(EDK2BASE)/BaseTools/Scripts/gcc4.4-ld-script
 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
 #
@@ -107,7 +104,6 @@ TIANO_LDFLAGS   = -nostdlib -n -q --gc-sections --script=$(EDK2BASE)/BaseTools/S
 FORMAT          = --target=efi-app-$(ARCH)
 FORMAT_DRIVER   = --target=efi-bsdrv-$(ARCH)
 
-
 #
 # Modifications on a per-architecture basis....
 #
@@ -118,9 +114,6 @@ ifeq ($(ARCH),x86_64)
   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
@@ -140,9 +133,6 @@ ifeq ($(ARCH),ia32)
   endif
 
   ARCH_CFLAGS = -m32 -DEFI32 -malign-double
-ifeq ($(MAKEWITH),GNUEFI)
-  ARCH_CFLAGS += -fpic
-endif
   ARCHDIR = Ia32
   UC_ARCH = IA32
   FILENAME_CODE = ia32
index 563b52f5385833bb6e741d968a0e4681e7f175c6..99452ed65d0ea2bde4857f4f4418b6ec6820ac95 100644 (file)
@@ -21,10 +21,6 @@ TEXTFILES = $(FILESYSTEMS:=*.txt)
 
 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
@@ -59,10 +55,6 @@ gnuefi: $(FILESYSTEMS_GNUEFI)
 
 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
index 45939490d1a788ec850df352681d7aaa49e62ec8..2b2cc89c3e85a6984fc22635b0055d51ec594560 100644 (file)
@@ -46,7 +46,6 @@ int MyStrlen(const char *InString);
 #else
 #include "../include/tiano_includes.h"
 #endif
-#define memcpy(a, b, c) CopyMem(a, b, c)
 
 #ifdef __cplusplus
 #include <vector>
index 343fbffc1c67501efecee5bb4622370b44658fb0..684e10e44956521c9c791909666eede0b804e1e4 100644 (file)
@@ -85,6 +85,16 @@ int MyStrlen(const char *InString) {
    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;
index 495892f09a9a53b5e394a15d8cad5aac7ac2fd53..32aa8d9ecd2f29a81690bb5e66fd449fd21316ad 100755 (executable)
@@ -40,7 +40,8 @@
 # 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
@@ -181,6 +182,17 @@ GetParams() {
       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()
index 35a8f26cdcb18c3cf75ae606831a4651ef56b4b4..4fa93b15d576b6ec8ebf94f7ea16cf999db3d995 100644 (file)
@@ -970,17 +970,15 @@ static VOID DrawMainMenuEntry(REFIT_MENU_ENTRY *Entry, BOOLEAN selected, UINTN X
 {
    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,