Commit graph

3618 commits

Author SHA1 Message Date
Colin Watson
da90820083 * docs/grub.texi (Naming convention): Use GRUB 2 syntax.
(File name syntax): Likewise.
(help): --all is no longer supported in GRUB 2.  Be more precise
about pattern matching.
2010-06-07 22:18:00 +01:00
Colin Watson
fb55c3acf9 * normal/completion.c (grub_normal_do_completion): When completing
arguments to "set" and the current word contains an equals sign,
skip to after the equals sign before starting completion.
2010-06-07 22:13:26 +01:00
Colin Watson
258c2573a6 * fs/i386/pc/pxe.c (grub_pxe_open): Fix parsing of gateway_ip. 2010-06-07 21:29:25 +01:00
Colin Watson
ee75515e69 * docs/grub.texi (Network): New section.
(Device syntax): The network device is called `(pxe)' in GRUB 2, not
`(nd)' as in GRUB Legacy.
(pxe_unload): New section.
2010-06-07 21:26:30 +01:00
Colin Watson
a6a700aa52 * docs/grub.texi (Troubleshooting): `echo' is not usually available
in the rescue shell, so recommend using `set' instead.  Thanks,
Jordan Uggla.
2010-06-07 21:10:29 +01:00
Colin Watson
4003dd38df * docs/grub.texi (Filesystem): Refer to search' instead of find'.
(password): New section.
(password_pbkdf2): New section.
(search): New section.
(Security): New section.
(Troubleshooting): New section, currently very incomplete.
(Invoking grub-mkpasswd-pbkdf2): New section.
(Internals): New section, currently very incomplete.
2010-06-07 14:32:12 +01:00
Colin Watson
e1cbcc40a4 * util/grub.d/00_header.in: Add some more quoting (of
"${prev_saved_entry}" and "${boot_once}") needed to make savedefault
work again.
Reported by: Mario 'BitKoenig' Holbe (Debian bug #584812).
2010-06-07 14:22:40 +01:00
Colin Watson
db8fa1ad87 * util/grub-mkpasswd-pbkdf2.c (main): Rename top-level `c' variable
to `count', fixing variable shadowing that broke the -c option.
2010-06-07 14:15:57 +01:00
Colin Watson
71c3809882 * util/grub.d/00_header.in: Quote values assigned to `saved_entry',
in case they contain spaces.
2010-06-05 20:44:44 +01:00
Colin Watson
f28a9212b4 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Prepend
"part_" to partmap module names, in line with grub-install.
Reported by: Jindřich Makovička (Debian bug #584426).
2010-06-04 13:53:30 +01:00
Colin Watson
9cdfe32f09 * util/grub-mkimage.c: Make target-related error messages slightly
more helpful; -O talks about "format".  Explicitly point to the use
of -O if no target is specified.
Reported by: Didier Raboud (Debian bug #584415).
2010-06-04 13:38:10 +01:00
Colin Watson
795b593a47 * INSTALL: Document several build requirements for optional features
(libdevmapper, ncurses, libusb, SDL, FreeType, GNU Unifont).
2010-06-03 09:48:23 +01:00
Grégoire Sutre
9d9b583350 Handle all possible disk device names for NetBSD. 2010-06-03 00:47:22 +02:00
Colin Watson
0819fec8a1 * docs/grub.texi (Simple configuration): Fix copy-and-paste typo.
Thanks to Jordan Uggla for spotting this.
2010-06-02 22:48:13 +01:00
Vladimir 'phcoder' Serbinenko
7a4c893eb0 Poll device in usbtest 2010-06-02 21:55:29 +02:00
Vladimir 'phcoder' Serbinenko
f5db3949e7 Some hotplug support (buggy) 2010-06-02 21:54:51 +02:00
Vladimir 'phcoder' Serbinenko
5434f8bf3a Remove extra empty line 2010-06-02 21:54:25 +02:00
Vladimir 'phcoder' Serbinenko
440ab68551 Restructure usbms as a preparation for hotplug 2010-06-02 19:52:17 +02:00
Vladimir 'phcoder' Serbinenko
4f034dd24d Merge mainline into usb 2010-06-02 18:05:01 +02:00
Aleš Nesrsta
1515ec8684 2010-06-02 Aleš Nesrsta <starous@volny.cz>
Finally make USB usable.

	* bus/usb/ohci.c (grub_ohci_reg_t): Add missing values.
	(GRUB_OHCI_RHUB_PORT_POWER_MASK): New macro.
	(GRUB_OHCI_RHUB_PORT_ALL_POWERED): Likewise.
	(GRUB_OHCI_REG_FRAME_INTERVAL_FSMPS_MASK): Likewise.
	(GRUB_OHCI_REG_FRAME_INTERVAL_FSMPS_SHIFT): Likewise.
	(GRUB_OHCI_REG_FRAME_INTERVAL_FI_SHIFT): Likewise.
	(GRUB_OHCI_FSMPS): Likewise.
	(GRUB_OHCI_PERIODIC_START): Likewise.
	(GRUB_OHCI_FRAME_INTERVAL): Likewise.
	(GRUB_OHCI_SET_PORT_ENABLE): Likewise.
	(GRUB_OHCI_CLEAR_PORT_ENABLE): Likewise.
	(GRUB_OHCI_SET_PORT_RESET): Likewise.
	(GRUB_OHCI_SET_PORT_RESET_STATUS_CHANGE): Likewise.
	* bus/usb/ohci.c (grub_ohci_pci_iter): Various important fixups.
	(grub_ohci_transaction): Likewise.
	(grub_ohci_transfer): Improve condition detection algorithms.
	Handle toggle property. Program the transactions correctly.
	Improve error handling. Various important fixups.
	(grub_ohci_portstatus): Put register writes in right order.
	* bus/usb/uhci.c (grub_free_queue): Compute last_trans.
	(grub_uhci_transfer): Don't show "failed" message on success.
	* bus/usb/usb.c (grub_usb_set_configuration): Zero-fill whole "toggle"
	array.
	(grub_usb_device_initialize): Read first 8 bytes of descriptor to
	determine its size.
	* bus/usb/usbtrans.c (grub_usb_control_msg): Use descdev.maxsize0 even
	before initialization is completed. Use IN direction for empty
	transfers. Use last_trans and compute toggle.
	* include/grub/usbtrans.h (grub_usb_transfer): New field last_trans.
	(GRUB_USB_FEATURE_ENDP_HALT): Correct the value.
	(GRUB_USB_FEATURE_DEV_REMOTE_WU): Likewise.
	(GRUB_USB_FEATURE_TEST_MODE): Likewise.
	* include/grub/usb.h (grub_usb_err_t): New value GRUB_USB_ERR_UNRECOVERABLE.
	(grub_usb_device): Increase toggle to 256.
	(grub_usbms_subclass_t): New values GRUB_USBMS_SUBCLASS_RBC,
	GRUB_USBMS_SUBCLASS_MMC2, GRUB_USBMS_SUBCLASS_UFI and
	GRUB_USBMS_SUBCLASS_SFF8070.
	* include/grub/scsicmd.h (grub_scsi_test_unit_ready): New structure.
	(grub_scsi_inquiry): New member page and alloc_length.
	(grub_scsi_request_sense): New structure.
	(grub_scsi_request_sense_data): Likewise.
	(grub_scsi_read_capacity): New fields logical_block_addr, PMI and
	control.
	* disk/scsi.c (grub_scsi_request_sense): New function.
	(grub_scsi_test_unit_ready): Likewise.
	(grub_scsi_inquiry): Fill new fields.
	(grub_scsi_read_capacity): Likewise.
	(grub_scsi_read10): Add request sense at the end.
	(grub_scsi_read12): Likewise.
	(grub_scsi_write10): Likewise.
	(grub_scsi_write12): Likewise.
	(grub_scsi_open): Add Test Unit Ready.
	* disk/usbms.c (grub_usbms_finddevs): Check configcnt.
	Support additional subclasses. Con't clear halt yet. Activate the
	proper config. Calculate LUNs correctly.
	(grub_usbms_transfer): Various important fixups.

2010-06-02  Vladimir Serbinenko  <phcoder@gmail.com>

	* bus/pci.c (grub_pci_iterate) [GRUB_MACHINE_MIPS_YEELOONG]: Skip ghosts.
	* bus/usb/ohci.c (grub_ohci_portstatus): Handle R/WC correctly.
	(grub_ohci_fini_hw): New function.
	(grub_ohci_restore_hw): Likewise.
	(GRUB_MOD_INIT(ohci)): Register preboot hook.
	(GRUB_MOD_FINI(ohci)): Shutdown OHCI.
	* term/usb_keyboard.c: Remove include of grub/machine/console.h.

2010-06-02  Vladimir Serbinenko  <phcoder@gmail.com>

	Dedicated DMA allocations.

	* bus/pci.c (grub_memalign_dma32): New function
	(grub_dma_free): Likewise.
	(grub_dma_get_virt): Likewise.
	(grub_dma_get_phys): Likewise.
	* bus/usb/ohci.c (grub_ohci): New members hcca_addr and hcca_chunk.
	(grub_ohci_pci_iter): Use dma32_alloc.
	(grub_ohci_transfer): Likewise.
	* bus/usb/usbtrans.c (grub_usb_control_msg): Likewise.
	(grub_usb_bulk_readwrite): Likewise.
	* include/grub/pci.h: Add declarations.

2010-06-02  Vladimir Serbinenko  <phcoder@gmail.com>

	CS5536 support.

	* bus/cs5536.c: New file.
	* bus/usb/ohci.c (grub_ohci_pci_iter): Check for CS5536.
	* conf/i386.rmk (pkglib_MODULES): Add cs5536.mod.
	(cs5536_mod_SOURCES): New variable.
	(cs5536_mod_CFLAGS): Likewise.
	(cs5536_mod_LDFLAGS): Likewise.
	* conf/mips-yeeloong.rmk (kernel_img_HEADERS): Add cs5536.h and
	machine/pci.h.
	(kernel_img_SOURCES): Add bus/cs5536.c.
	(pkglib_MODULES): Add usb.mod, usbtest.mod, ohci.mod, usbms.mod and
	usb_keyboard.mod.
	(usb_mod_SOURCES): New variable.
	(usb_mod_CFLAGS): New variable.
	(usb_mod_LDFLAGS): New variable.
	(usbtest_mod_SOURCES): New variable.
	(usbtest_mod_CFLAGS): New variable.
	(usbtest_mod_LDFLAGS): New variable.
	(ohci_mod_SOURCES): New variable.
	(ohci_mod_CFLAGS): New variable.
	(ohci_mod_LDFLAGS): New variable.
	(usbms_mod_SOURCES): New variable.
	(usbms_mod_CFLAGS): New variable.
	(usbms_mod_LDFLAGS): New variable.
	(usb_keyboard_mod_SOURCES): New variable.
	(usb_keyboard_mod_CFLAGS): New variable.
	(usb_keyboard_mod_LDFLAGS): New variable.
	* include/grub/smbus.h: New file.
	* include/grub/cs5536.h: New file.

	Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2010-06-02 17:16:20 +02:00
Vladimir 'phcoder' Serbinenko
49396b4f61 Add ChangeLog 2010-06-02 16:52:16 +02:00
Vladimir 'phcoder' Serbinenko
7db51e329b Remove double defines and use dma_free 2010-06-02 16:51:54 +02:00
Vladimir 'phcoder' Serbinenko
5d538b8b4a Use memset 2010-06-02 16:49:22 +02:00
Vladimir 'phcoder' Serbinenko
f133a8a74b Enable USB on 64-bit (still won't work with >= 4GiB memory). 2010-06-02 16:48:10 +02:00
Vladimir 'phcoder' Serbinenko
8bd3a1fb30 Add necessarry cast 2010-06-02 16:46:55 +02:00
Vladimir 'phcoder' Serbinenko
f0e6cceb81 Remove leftover early debug exit. 2010-06-02 16:46:37 +02:00
Vladimir 'phcoder' Serbinenko
11dccbfd4d Sort scsi_cmd_t. 2010-06-02 16:45:43 +02:00
Colin Watson
0b35b2a921 * util/grub.d/00_header.in: Add safety check to make sure that
${locale_dir} exists before trying to probe it.
2010-06-02 13:57:13 +01:00
Colin Watson
ca0afd5bab * docs/grub.texi (SCO UnixWare): Remove, at Vladimir's request and
per the GNU Coding Standards; this is now too obscure to be worth
documenting.
(QNX): Likewise.
(chainloader): Remove cross-reference to `SCO UnixWare'.
2010-06-02 13:11:33 +01:00
Colin Watson
1c41aa7883 * docs/grub.texi (Chain-loading): New section.
(DOS/Windows): New section, borrowed from GRUB Legacy with details
adjusted for GRUB 2.
(SCO UnixWare): Likewise.
(QNX): Likewise.
(chainloader): Add reference to `Block list syntax'.
(drivemap): New section.
(parttool): New section.
2010-06-02 12:47:11 +01:00
Colin Watson
bb8ea0f5c3 * docs/grub.texi (GNU GRUB manual): Remove reference to `Invoking
the grub shell'.
(Installation): Add reference to `Making a GRUB bootable CD-ROM'.
(Installing GRUB using grub-install): Remove reference to the grub
shell; mention `grub-mkimage' and `grub-setup' instead.
(Invoking grub-install): Likewise.
(Interface): Add reference to `Menu entry editor'.
(serial): Remove `--device' option.
2010-06-02 11:26:28 +01:00
Colin Watson
288dd6ed3d * docs/grub.texi (Configuration): New section, documenting
configuration file generation using grub-mkconfig.  I've left a slot
for documenting the full shell scripting format but have not yet
started on writing that up.
(Invoking grub-mkconfig): New section.
2010-06-02 11:14:02 +01:00
Vladimir 'phcoder' Serbinenko
d495544497 Shut down PHCI controller harder 2010-06-02 05:00:54 +02:00
Vladimir 'phcoder' Serbinenko
f1cb760c99 Disable unused list 2010-06-02 04:52:52 +02:00
Vladimir 'phcoder' Serbinenko
2325800310 Fix last_trans determination 2010-06-02 04:52:35 +02:00
Vladimir 'phcoder' Serbinenko
a18c783473 Fewstylistic fixes 2010-06-02 04:51:35 +02:00
Colin Watson
34c9f0e949 * docs/grub.texi (direntry): Remove grub-terminfo reference.
(GNU GRUB manual): Likewise.
(General commands): Update description of `terminfo' for GRUB 2.
2010-06-02 02:50:04 +01:00
Colin Watson
9121567e16 * commands/gptsync.c (grub_cmd_gptsync): Fix typos.
(GRUB_MOD_INIT): Fix capitalisation.
* docs/grub.texi (Command-line and menu entry commands): Document
gettext and gptsync commands.
2010-06-02 02:37:55 +01:00
Colin Watson
ab6316112c * conf/any-emu.rmk (kernel_img_SOURCES) [!x86]: Include
kern/$(target_cpu)/cache.S even if TARGET_NO_MODULES = yes.
2010-06-02 01:23:34 +01:00
Aleš Nesrsta
390b0676c4 Use dev->descdev.maxsize0 even if dev->initialized isn't set 2010-06-02 02:04:45 +02:00
Colin Watson
bde4a9ac1d Add btrfs probing support, currently only in the single-device case.
* kern/emu/getroot.c (find_root_device_from_mountinfo): New
function.
(grub_guess_root_device): Call find_root_device_from_mountinfo
before looking in /dev.
2010-06-01 18:30:20 +01:00
Colin Watson
0d9ff59345 * kern/emu/getroot.c (find_root_device_from_mountinfo): Use getline instead
of fgets into a static buffer.  Use sizeof instead of strlen on a constant
string.  Thanks to Vladimir for review.
2010-06-01 18:05:29 +01:00
Aleš Nesrsta
7d4873c26a Merge Aleš' latest patch 2010-06-01 02:10:19 +02:00
Vladimir 'phcoder' Serbinenko
b1d17e10e0 * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Use
GRUB_DISK_SIZE_UNKNOWN.
	* disk/ieee1275/ofdisk.c (grub_ofdisk_open): Likewise.
2010-05-31 21:01:01 +02:00
Jiro SEKIBA
dfbfe00473 * include/grub/disk.h (GRUB_DISK_SIZE_UNKNOWN): New macro.
* fs/nilfs.c: Support 2nd super block in case 1st one is accidently
	corrupted or not synced properly.
2010-05-31 20:49:42 +02:00
Vladimir 'phcoder' Serbinenko
c2ffc8e956 * normal/main.c (grub_normal_add_menu_entry): Avoid going out of args.
Reported by: Seth Goldberg.
2010-05-31 20:46:16 +02:00
Vladimir 'phcoder' Serbinenko
5629316656 * loader/multiboot_mbi2.c (grub_multiboot_make_mbi): Fix incorrect
addition of dest.
	Reported by: Seth Goldberg.
2010-05-31 20:43:28 +02:00
Vladimir 'phcoder' Serbinenko
7620e7debd * commands/setpci.c (grub_setpci_iter): Fix an incorrect function check.
Reported by: Seth Goldberg.
2010-05-31 20:40:42 +02:00
Vladimir 'phcoder' Serbinenko
c837af3f38 * loader/multiboot_elfxx.c (grub_multiboot_load_elfXX) [__mips]: Check
64-bit address as signed on MIPS.
2010-05-31 20:23:51 +02:00
Vladimir 'phcoder' Serbinenko
89d90892d0 Merge usb into yeeloongfw 2010-05-31 14:21:34 +02:00