Permalink
Browse files

. 支持U盘使用udf文件系统。

  可启动U盘制作:把grldr_hd_udf.bin复制到U盘逻辑0扇区。
  • Loading branch information...
yaya
yaya committed Oct 4, 2017
1 parent 6f31294 commit b748082ce92aba4fa55f8073fdd8600501e6d7c8
Showing with 452 additions and 83 deletions.
  1. +5 −0 ChangeLog_chenall.txt
  2. +1 −1 build
  3. +1 −0 stage2/Makefile.am
  4. +1 −0 stage2/Makefile.in
  5. +5 −3 stage2/builtins.c
  6. +155 −66 stage2/fsys_iso9660.c
  7. +264 −6 stage2/grldrstart.S
  8. +19 −7 stage2/iso9660.h
  9. +1 −0 stage2/shared.h
View
@@ -1,4 +1,9 @@
更新说明:
2017-10-04(yaya)
支持U盘使用udf文件系统。版本至2.01。
格式化U盘:在Windows系统的cmd命令行:format u盘驱动器号: /fs:udf /q
可启动U盘制作:把grldr_hd_udf.bin复制到U盘逻辑0扇区。
2017-08-30(yaya)
displaymem 函数增加参数 --s,以 512 字节扇区的单位显示可用 RAM。
View
2 build
@@ -13,7 +13,7 @@ RELEASE=grub4dos-${VER}-${DATE}
COPY_FILES="COPYING README_GRUB4DOS*.txt ChangeLog_*.txt \
config.sys default menu.lst grub.pif \
stage2/grldr stage2/grub.exe stage2/badgrub.exe stage2/grldr.mbr stage2/bootlace.com \
stage2/hmload.com stage2/grldr.pbr stage2/grldr_cd.bin"
stage2/hmload.com stage2/grldr.pbr stage2/grldr_cd.bin stage2/grldr_hd_udf.bin"
rm -rf *.zip *.7z *~ || exit $?
[ -z "$GRUB4DOS_TEMP" ] && GRUB4DOS_TEMP=/tmp/grub4dos-temp
View
@@ -137,6 +137,7 @@ bootlace.com: bootlacestart #Note: S
$(AM_V_at)cp bootlacestart bootlace.com && chmod a+x bootlace.com
$(AM_V_at)dd if=bootlace.com of=grldr.pbr bs=512 skip=57 count=10 #skip(1): "EB 58 90 00" position in the bootlace.com redress: skip +(-) 1
$(AM_V_at)dd if=bootlace.com of=grldr_cd.bin bs=512 skip=67 count=1 #skip(2): = skip(1) + 10
$(AM_V_at)dd if=bootlace.com of=grldr_hd_udf.bin bs=512 skip=68 count=2 #skip(3): = skip(2) + 1
$(AM_V_at)cat grldr.mbr >> bootlace.com
hmloadstart_exec_SOURCES = hmloadstart.S
View
@@ -1801,6 +1801,7 @@ bootlace.com: bootlacestart #Note: S
$(AM_V_at)cp bootlacestart bootlace.com && chmod a+x bootlace.com
$(AM_V_at)dd if=bootlace.com of=grldr.pbr bs=512 skip=57 count=10 #skip(1): "EB 58 90 00" position in the bootlace.com redress: skip +(-) 1
$(AM_V_at)dd if=bootlace.com of=grldr_cd.bin bs=512 skip=67 count=1 #skip(2): = skip(1) + 10
$(AM_V_at)dd if=bootlace.com of=grldr_hd_udf.bin bs=512 skip=68 count=2 #skip(3): = skip(2) + 1
$(AM_V_at)cat grldr.mbr >> bootlace.com
hmloadstart_exec-hmloadstart.$(OBJEXT): stage2_size.h
View
@@ -6739,7 +6739,7 @@ uuid_func (char *argument, int flags)
saved_drive = current_drive = drive;
saved_partition = current_partition = part;
if (drive < 0x90)
if (drive < 0x90 && grub_memcmp(fsys_table[fsys_type].name, "iso9660", 7) != 0)
{
biosdisk_standard (0x02, (unsigned char)drive, 0, 0, 1, 1, 0x2F00);
if (!(probe_bpb((struct master_and_dos_boot_sector *)0x2f000)) && open_device())
@@ -7021,8 +7021,9 @@ get_vol (char* vol_found, int flags)
}
break;
case ISO_TYPE_udf:
if (udf_BytePerSector == 0x800)
emu_iso_sector_size_2048 = 1;
devread(*(unsigned long *)FSYS_BUF, 0, 0x800, (unsigned long long)(unsigned int)(char *)BUFFER, 0xedde0d90);
devread(*(unsigned long *)FSYS_BUF, 0, udf_BytePerSector, (unsigned long long)(unsigned int)(char *)BUFFER, 0xedde0d90);
if (!flags)
{
if (*(BUFFER + 0x70) == 16)
@@ -7057,8 +7058,9 @@ get_vol (char* vol_found, int flags)
}
*(unsigned char *)(BUFFER + 4) = h;
if (udf_BytePerSector == 0x800)
emu_iso_sector_size_2048 = 1;
devread(*(unsigned long *)FSYS_BUF, 0, 0x800, (unsigned long long)(unsigned int)(char *)BUFFER, 0x900ddeed);
devread(*(unsigned long *)FSYS_BUF, 0, udf_BytePerSector, (unsigned long long)(unsigned int)(char *)BUFFER, 0x900ddeed);
}
break;
}
Oops, something went wrong.

0 comments on commit b748082

Please sign in to comment.