Modulize the partition map support and add support for the amiga
partition map.
* commands/ls.c: Include <grub/partition.h> instead of
<grub/machine/partition.h>.
* kern/disk.c: Likewise.
* kern/rescue.c: Likewise.
* loader/i386/pc/chainloader.c: Likewise.
* normal/cmdline.c: Likewise.
* kern/powerpc/ieee1275/init.c: Likewise.
(grub_machine_init): Call `grub_pc_partition_map_init',
`grub_amiga_partition_map_init' and
`grub_apple_partition_map_init'.
* conf/i386-pc.rmk (kernel_img_SOURCES): Remove
`disk/i386/pc/partition.c'. Add `kern/partition.c'.
(kernel_img_HEADERS): Remove `machine/partition.h'. Add
`partition.h' and `pc_partition.h'.
(grub_setup_SOURCES): Remove
`disk/i386/pc/partition.c'. Add `kern/partition.c',
`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
(grub_emu_SOURCES): Likewise.
(pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
(amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
(apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
`disk/powerpc/ieee1275/partition.c'. Add `kern/partition.c',
`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
(grubof_SOURCES): Likewise.
* disk/i386/pc/partition.c: File removed.
* disk/powerpc/ieee1275/partition.c: Likewise.
* include/grub/powerpc/ieee1275/partition.h: Likewise.
* include/grub/i386/pc/partition.h: Likewise.
* kern/partition.c: New file.
* partmap/amiga.c: Likewise.
* partmap/apple.c: Likewise.
* partmap/pc.c: Likewise.
* include/grub/partition.h: Likewise..
* include/grub/pc_partition.h: Likewise.
* util/grub-emu.c: Include <grub/partition.h> instead of
<grub/machine/partition.h>.
(main): Call `grub_pc_partition_map_init',
`grub_amiga_partition_map_init' and
`grub_apple_partition_map_init' and deinitialize afterwards.
* util/i386/pc/biosdisk.c: Include `#include
<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
`<grub/machine/partition.h>'.
* util/i386/pc/grub-setup.c: Likewise.
* util/i386/pc/biosdisk.c: Likewise.
(grub_util_biosdisk_get_grub_dev): Only access the PC specific
partition information in case of a PC partition.
* util/i386/pc/grub-setup.c: Include `#include
<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
`<grub/machine/partition.h>'.
(setup): Only access the PC specific partition information in case
of a PC partition.
* commands/ls.c (grub_ls_list_files): Use the string following the
initial ')', if present, as the filesystem path.
* kern/rescue.c (grub_rescue_cmd_ls): Likewise.
* conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
* conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
(grub_mkimage_LDFLAGS): Likewise.
(grub_emu_SOURCES): Likewise.
(kernel_img_HEADERS): Added fshelp.h.
* fs/ext2.c: Include <grub/fshelp.h>.
(FILETYPE_REG): New macro.
(FILETYPE_INO_REG): Likewise.
(grub_ext_sblock): Renamed to `grub_ext2_sblock'.
Changed all users.
(ext2_block_group): Renamed to `grub_ext2_block_group'. Changed
all users.
(grub_fshelp_node): New struct.
(grub_ext2_data): Added member `diropen'. Changed member `inode'
to a pointer.
(grub_ext2_get_file_block): Removed function.
(grub_ext2_read_block): New function.
(grub_ext2_read_file): Replaced parameter `data' by `node'.
This function was written.
(grub_ext2_mount): Read the root inode. Create a diropen struct.
(grub_ext2_find_file): Removed function.
(grub_ext2_read_symlink): New function.
(grub_ext2_iterate_dir): Likewise.
(grub_ext2_open): Rewritten.
(grub_ext2_dir): Rewritten.
* include/grub/fshelp.h: New file.
* fs/fshelp.c: Likewise.
Add support for the JFS filesystem.
* fs/jfs.c: New file.
* include/grub/fs.h (grub_jfs_init): New prototype.
(grub_jfs_fini): New prototype.
* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
(grub_emu_SOURCES): Likewise.
(pkgdata_MODULES): Add jfs.mod.
(jfs_mod_SOURCES): New variable.
(jfs_mod_CFLAGS): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
(grubof_SOURCES): Likewise.
* util/grub-emu.c (main): Initialize and deinitialize JFS support.
* fs/fat.c (grub_fat_find_dir): Convert the filename little
endian to the host endian.
(grub_fat_utf16_to_utf8): Move function from there...
* kern/misc.c (grub_utf16_to_utf8): ...to here. Do not convert
the endianess of the source string anymore.
* include/grub/misc.h (grub_utf16_to_utf8): New prototype.
Add support for UFS version 1 and 2. Add support for the minix
filesystem version 1 and 2, both the variants with 14 and 30 long
filenames.
* conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
fs/minix.c.
(grub_emu_SOURCES): Likewise.
(pkgdata_MODULES): Add ufs.mod and minix.mod.
(ufs_mod_SOURCES): New variable.
(ufs_mod_CFLAGS): Likewise.
(minix_mod_SOURCES): Likewise.
(minix_mod_CFLAGS): Likewise.
* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
fs/minix.c.
(grubof_SOURCES): Likewise.
* fs/ufs.c: New file.
* fs/minix.c: New file.
* include/grub/fs.h (grub_ufs_init): New prototype.
(grub_ufs_fini): Likewise.
(grub_minix_init): Likewise.
(grub_minix_fini): Likewise.
* util/grub-emu.c (main): Initialize and deinitialize UFS and
minix fs.
All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
and grub_, respectively. Because the conversion is trivial and
mechanical, I omit the details here. Please refer to the CVS
if you need more information.
Add support for the newworld apple macintosh (PPC). This has been
tested on the powerbook 2000 only. It only adds support for
generic ieee1275 functions, console and disk support. This should
be easy to port to other architectures with support for Open
Firmware.
* configure.ac: Accept the powerpc as host_cpu. In the case of
the powerpc cpu set the host_vendor to ieee1275. Make sure the i386
specific tests are only executed while building for the i386.
Inverse test for crosscompile.
* genmk.rb (Utility): Allow assembler files.
* normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
* conf/powerpc-ieee1275.rmk: New file.
* disk/powerpc/ieee1275/ofdisk.c: Likewise.
* disk/powerpc/ieee1275/partition.c: Likewise.
* include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
* include/pupa/powerpc/ieee1275/console.h: Likewise.
* include/pupa/powerpc/ieee1275/partition.h: Likewise.
* include/pupa/powerpc/ieee1275/time.h: Likewise.
* include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
* include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
* include/pupa/powerpc/ieee1275/loader.h
* include/pupa/powerpc/setjmp.h: Likewise.
* include/pupa/powerpc/types.h: Likewise.
* kern/powerpc/ieee1275/init.c: Likewise.
* kern/powerpc/ieee1275/openfw.c: Likewise.
* term/powerpc/ieee1275/ofconsole.c: Likewise.
These files were written by Johan Rydberg
(jrydberg@night.trouble.net) and I only modified them slightly.
* boot/powerpc/ieee1275/cmain.c: New file.
* boot/powerpc/ieee1275/crt0.S: Likewise.
* boot/powerpc/ieee1275/ieee1275.c: Likewise.
* include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.