]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix usb support
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 9 Apr 2010 23:56:51 +0000 (01:56 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 9 Apr 2010 23:56:51 +0000 (01:56 +0200)
ChangeLog.emu-modload
conf/any-emu.rmk
include/grub/libusb.h [new file with mode: 0644]

index dd0ea6bf0dd7ec5e727db539a21f269673269fa8..c675021de2604a682c72ccf8b482dd74ae2a3edc 100644 (file)
@@ -7,10 +7,15 @@
        (TARGET_CFLAGS): Add -DGRUB_TARGET_NO_MODULES=1 if applicable.
        (CFLAGS): Likewise.
        * conf/any-emu.rmk: Generate symlist.
+       (kernel_img_HEADERS): Add util/datetime.h.
+       (kernel_img_HEADERS) [sdl]: Add sdl.h.
+       (kernel_img_HEADERS) [libusb]: Add libusb.h.
+       (kernel_img_SOURCES) [TARGET_NO_MODULES = no && !x86]: Add
+       kern/$(target_cpu)/cache.S.
        * configure.ac (grub-emu-modules): New option.
        * genmk.rb: Handle multiple source lists.
-       * genmoddep.awk: Output all undefined symbols.
        * include/grub/sdl.h: New file.
+       * include/grub/libusb.h: Likewise.
        * util/grub-emu.c (main): Hanle (host) root.
        * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Error with
        GRUB_ERR_UNKNOWN_DEVICE.
index e27a6978bfd5fa95105c604423578937d0ac8f4b..ddc6b0fd42488825683aa95f93e146df830aa409 100644 (file)
@@ -15,7 +15,7 @@ kernel_img_SOURCES = kern/device.c kern/disk.c kern/dl.c kern/env.c   \
        \
        gnulib/progname.c util/hostfs.c disk/host.c
 kernel_img_HEADERS += datetime.h
-kernel_img_CFLAGS = $(CPPFLAGS) $(CFLAGS) -Wno-undef
+kernel_img_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-undef -I$(srcdir)/gnulib
 kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
 TARGET_NO_STRIP = yes
 
@@ -46,6 +46,8 @@ endif
 grub_emu_LDFLAGS = $(LIBCURSES)
 
 ifeq ($(enable_grub_emu_usb), yes)
+kernel_img_HEADERS += libusb.h
+
 pkglib_MODULES += libusb.mod
 libusb_mod_SOURCES = util/usb.c
 libusb_mod_CFLAGS = 
diff --git a/include/grub/libusb.h b/include/grub/libusb.h
new file mode 100644 (file)
index 0000000..26548bc
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2010  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+void EXPORT_FUNC (usb_bulk_write) (void);
+void EXPORT_FUNC (usb_find_busses) (void);
+void EXPORT_FUNC (usb_init) (void);
+void EXPORT_FUNC (usb_find_devices) (void);
+void EXPORT_FUNC (usb_open) (void);
+void EXPORT_FUNC (usb_get_busses) (void);
+void EXPORT_FUNC (usb_control_msg) (void);
+void EXPORT_FUNC (usb_release_interface) (void);
+void EXPORT_FUNC (usb_close) (void);
+void EXPORT_FUNC (usb_bulk_read) (void);
+void EXPORT_FUNC (usb_claim_interface) (void);