-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 316a5a2
Showing
21 changed files
with
1,714 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*~ | ||
*.o | ||
*.a | ||
*.bin | ||
*.efi | ||
*.img | ||
*.map | ||
*.bgra | ||
GPATH | ||
GRTAGS | ||
GSYMS | ||
GTAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
CC = x86_64-w64-mingw32-gcc | ||
OBJCOPY = x86_64-w64-mingw32-objcopy | ||
CFLAGS = -Wall -Wextra | ||
CFLAGS += -nostdinc -nostdlib -fno-builtin -fno-common | ||
CFLAGS += -Wl,--subsystem,10 | ||
|
||
poiboot.efi: poiboot.o libuefi/libuefi.a | ||
$(CC) $(CFLAGS) -e efi_main -o $@ $+ | ||
|
||
poiboot.o: poiboot.c | ||
$(CC) $(CFLAGS) -Iinclude -c -o $@ $< | ||
|
||
libuefi/libuefi.a: | ||
make -C libuefi CC=$(CC) CFLAGS="$(CFLAGS)" | ||
|
||
deploy: poiboot.efi | ||
mkdir -p ../fs/EFI/BOOT | ||
cp $< ../fs/EFI/BOOT/BOOTX64.EFI | ||
|
||
clean: | ||
rm -f *~ *.o *.efi | ||
make -C libuefi clean | ||
|
||
.PHONY: clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef _COMMON_H_ | ||
#define _COMMON_H_ | ||
|
||
#define NULL (void *)0 | ||
#define TRUE 1 | ||
#define FALSE 0 | ||
#define SC_OFS 0x1680 | ||
#define SC_ESC (SC_OFS + 0x0017) | ||
|
||
void putc(unsigned short c); | ||
void puts(unsigned short *s); | ||
void puth(unsigned long long val, unsigned char num_digits); | ||
unsigned short getc(void); | ||
unsigned int gets(unsigned short *buf, unsigned int buf_size); | ||
int strcmp(const unsigned short *s1, const unsigned short *s2); | ||
void strncpy(unsigned short *dst, unsigned short *src, unsigned long long n); | ||
unsigned long long strlen(unsigned short *str); | ||
unsigned long long hexstrtoull(char *str); | ||
unsigned char check_warn_error(unsigned long long status, unsigned short *name); | ||
void assert(unsigned long long status, unsigned short *message); | ||
|
||
#endif |
Oops, something went wrong.