fix: framebuffer ok sans UEFI, debogue simplifié

This commit is contained in:
Nicolas Hordé 2018-10-14 09:58:34 +02:00
parent c179f61bff
commit 03aa538dc9
9 changed files with 159 additions and 629 deletions

0
final/harddisk.img.xz Normal file → Executable file
View File

BIN
final/harddiskuefi.img.xz Normal file → Executable file

Binary file not shown.

View File

@ -8,8 +8,8 @@ echo ${lo}
losetup -P ${lo} harddisk.img
mkfs.ext2 ${lo}p1
mount ${lo}p1 /mnt
grub-install --no-floppy --install-modules="biosdisk part_msdos ext2 configfile normal multiboot2" --boot-directory=/mnt/boot ${lo} --target=i386-pc
grub-install --no-floppy --install-modules="biosdisk part_msdos ext2 configfile normal multiboot2 video video_colors video_cirrus video_fb" --boot-directory=/mnt/boot ${lo} --target=i386-pc
echo -en "set timeout=4\nset default=0\nmenuentry "cos2000" {\nset root=(hd0,1)\nmultiboot2 /boot/system.sys\nboot\n}" > /mnt/boot/grub/grub.cfg
umount /mnt
losetup -d ${lo}
xz -c harddisk.img > harddisk.img.xz
#xz -c harddisk.img > harddisk.img.xz

4
final/makeimageuefi Normal file → Executable file
View File

@ -12,9 +12,9 @@ mkfs.ext2 ${lo}p2
mount ${lo}p1 /mnt
mkdir /mnt/grub
echo -en "(hd0) ${lo}\n(hd0,1) ${lo}p1\n(hd0,2) ${lo}p2" > /mnt/grub/device.map
grub-install --no-floppy --boot-directory=/mnt/ --efi-directory=/mnt/ ${lo} --install-modules="part_gpt ext2 configfile normal multiboot2" --locales=fr --target=x86_64-efi --no-nvram
grub-install --no-floppy --boot-directory=/mnt/ --efi-directory=/mnt/ ${lo} --install-modules="part_gpt ext2 configfile normal multiboot2 video video_colors video_cirrus video_fb videotest" --locales=fr --target=x86_64-efi --no-nvram
mkdir /mnt/EFI/BOOT
grub-mkimage -d /usr/lib/grub/x86_64-efi -o /mnt/EFI/BOOT/bootx64.efi -p "(hd0,1)/grub/" -O x86_64-efi fat part_gpt ext2 configfile normal multiboot2
grub-mkimage -d /usr/lib/grub/x86_64-efi -o /mnt/EFI/BOOT/bootx64.efi -p "(hd0,1)/grub/" -O x86_64-efi video video_fb part_gpt ext2 configfile normal multiboot2
echo -en "set timeout=4\nset default=0\n\nmenuentry "cos2000" {\nmultiboot2 (hd0,2)/boot/system.sys\nboot\n}" > /mnt/grub/grub.cfg
umount /mnt
mount ${lo}p2 /mnt

View File

@ -48,5 +48,4 @@
void setdebugreg(u8 number,u8 *address, u8 type);
u8* getdebugreg(u8 number);
u32 disas(u8 *a);
u32 decode(bool at, u8 *a, bool show);
u32 disasm(u8 *a, u8 *string, bool show);

View File

@ -20,7 +20,7 @@ int info();
int err();
int view();
int test(void);
int disasm(u8* commandline);
int disas(u8* commandline);
int bpset(u8* commandline);
int bpclr(u8* commandline);
int help();

View File

@ -154,7 +154,7 @@ void show_lightcpu(save_stack *stack)
size=pointer;
size+=50;
while(pointer<size) {
pointer+=decode(false, pointer,false);
pointer+=disasm(pointer, NULL, false);
if (pointer==stack->eip) break;
}
if (pointer==stack->eip) break;
@ -171,7 +171,7 @@ void show_lightcpu(save_stack *stack)
print("\33[41m\33[1m");
else
print("\33[40m\33[0m");
pointer+=disas(pointer);
pointer+=disasm(pointer, NULL, true);
}
printf("\33[0m\r\n\r\n\r\nSTACK\r\n");

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@ static command commands[] = {
{"err" , "", &err},
{"test" , "", &test},
{"view" , "", &view},
{"disasm" , "", &disasm},
{"disasm" , "", &disas},
{"bpset" , "", &bpset},
{"bpclr" , "", &bpclr},
{"help" , "", &help},
@ -141,7 +141,7 @@ int bpclr(u8* commandline)
/*******************************************************************************/
/* Desassemble une zone de mémoire donnée */
int disasm(u8* commandline)
int disas(u8* commandline)
{
u8 arg[] = " \000";
u8* size;
@ -159,7 +159,7 @@ int disasm(u8* commandline)
size+=strtoint(&arg);
while(pointer<size)
{
pointer+=disas(pointer);
pointer+=disasm(pointer, NULL, true);
}
}