Mercurial > hg > Members > taiki > EFITest
changeset 12:56e8a3d49069
add README to how to use efi executable.
author | taiki |
---|---|
date | Sun, 30 Mar 2014 19:39:52 +0900 |
parents | 7d337b6fb379 |
children | f21ccddc12cb |
files | Makefile README.txt bootx64.c |
diffstat | 3 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Sun Mar 30 19:15:20 2014 +0900 +++ b/Makefile Sun Mar 30 19:39:52 2014 +0900 @@ -35,9 +35,6 @@ qemu-nbd -c /dev/nbd0 disk/disk.qcow2 mount /dev/nbd0 /mnt/nbd cp bootx64.efi /mnt/nbd/EFI/BOOT/ - umount /mnt/nbd - qemu-nbd -d /dev/nbd0 - rmmod nbd clean: rm -f $(TARGET) $(OBJS)
--- a/README.txt Sun Mar 30 19:15:20 2014 +0900 +++ b/README.txt Sun Mar 30 19:39:52 2014 +0900 @@ -40,3 +40,10 @@ -- Mount % mount -t vfat /dev/mapper/nbd0p1 /mnt + + +-- execute on EFI shell +need full path. +don't need device name. ex.fs0 + +bootx64.efi \EFI\BOOT\my_kernel
--- a/bootx64.c Sun Mar 30 19:15:20 2014 +0900 +++ b/bootx64.c Sun Mar 30 19:39:52 2014 +0900 @@ -52,6 +52,8 @@ CHAR16 *kernel_name = (CHAR16 *)AllocatePool((options - start_ptr + 1) * sizeof(CHAR16)); RtCopyMem(kernel_name, start_ptr, (options - start_ptr) * sizeof(CHAR16)); + + // delete last 0 kernel_name[options - start_ptr] = 0; Print(L"kernel name: -%s- name size: %d\n", kernel_name, (options - start_ptr)); @@ -91,13 +93,11 @@ path = FileDevicePath(handle_buffer[handle_idx], kernel_name); - Print(L"Path Type %d\n", path->Type); if (!path) { status = EFI_NOT_FOUND; break; } - Print(L"OpenSimpleReadFile\n"); status = OpenSimpleReadFile(TRUE, NULL, 0, &path, &device_handle, &read_handle); if (!EFI_ERROR(status)) { @@ -113,8 +113,8 @@ } if (read_handle) { - Print(L"CloseSimpleReadFile.\n"); - CloseSimpleReadFile(read_handle); + Print(L"Should execute CloseSimpleReadFile function.\n"); + //CloseSimpleReadFile(read_handle); } if (path) {