Firstly, I got the DSDT from the remote machine and converted into it form that could be included into the seabios BIOS images. I used the following C source:
And built it with:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int data;
int i = 0;
printf("unsigned char AmlCode[] = {");
for (i=0; (data = getchar()) != EOF; i++)
printf("%s%s0x%2.2x", i>0 ? "," : "",
(i & 7) ? "" : "\n\t", data);
printf("\n};\n");
exit(EXIT_SUCCESS);
}
gcc -Wall hexdump.c -o hexdump
Next I generated a C compilable hex dump of the DSDT.dat raw image:
./hexdump < DSDT.dat > acpi-dsdt.hex
Then I got the seabios sources:
git clone git://git.linuxtogo.org/home/kevin/seabios.git
and the copied the acpi-dsdt.hex to seabios/src
..and then cd into seabios and built using make. This creates bios.bin in the directory called out.
Then I copied the current QEMU bios, vgabios and seabios images to my working directory:
cp -R /usr/share/qemu /usr/share/vgabios /usr/share/seabios/ .
and then copied the compiled seabios image into the newly copied seabios directory:
cp seabios/out/bios.bin seabios
Finally, I ran QEMU using new BIOS image as follows:
qemu -L qemu ubuntu.img
Bit of a hack, but it helped when I did not have the hardware to hand.
No comments:
Post a Comment