mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-02 10:59:15 +00:00
Update files
This commit is contained in:
0
tools/ErrorParser.cpp
Normal file → Executable file
0
tools/ErrorParser.cpp
Normal file → Executable file
75
tools/Fex.c
Normal file
75
tools/Fex.c
Normal file
@ -0,0 +1,75 @@
|
||||
// FEX is a file format. Right now in development.
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
void DumpData(const char *Description, unsigned char *Address, unsigned long Length)
|
||||
{
|
||||
printf("-------------------------------------------------------------------------\n");
|
||||
unsigned char Buffer[17];
|
||||
unsigned long Iterate;
|
||||
|
||||
if (Description != NULL)
|
||||
printf("%s:\n", Description);
|
||||
|
||||
for (Iterate = 0; Iterate < Length; Iterate++)
|
||||
{
|
||||
if ((Iterate % 16) == 0)
|
||||
{
|
||||
if (Iterate != 0)
|
||||
printf(" %s\n", Buffer);
|
||||
printf(" %04x ", Iterate);
|
||||
}
|
||||
|
||||
printf(" %02x", Address[Iterate]);
|
||||
|
||||
if ((Address[Iterate] < 0x20) || (Address[Iterate] > 0x7e))
|
||||
Buffer[Iterate % 16] = '.';
|
||||
else
|
||||
Buffer[Iterate % 16] = Address[Iterate];
|
||||
|
||||
Buffer[(Iterate % 16) + 1] = '\0';
|
||||
}
|
||||
|
||||
while ((Iterate % 16) != 0)
|
||||
{
|
||||
printf(" ");
|
||||
Iterate++;
|
||||
}
|
||||
|
||||
printf(" %s\n", Buffer);
|
||||
printf("-------------------------------------------------------------------------\n");
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
FILE *FilePointer;
|
||||
char FileName[20];
|
||||
unsigned char *Buffer;
|
||||
char BufferChar;
|
||||
struct stat st;
|
||||
|
||||
printf("--- THIS IS NOT A COMPLETE VERSION ---\n\n");
|
||||
FileSelection:
|
||||
printf("File Name: ");
|
||||
fgets(FileName, 20, stdin);
|
||||
FileName[strcspn(FileName, "\r\n")] = 0;
|
||||
FilePointer = fopen(FileName, "r");
|
||||
|
||||
if (NULL == FilePointer)
|
||||
{
|
||||
printf("Error opening file %s. Try again...\n", FileName);
|
||||
FileName[0] = 0;
|
||||
goto FileSelection;
|
||||
}
|
||||
|
||||
stat(FileName, &st);
|
||||
Buffer = (unsigned char *)malloc(st.st_size);
|
||||
fread(Buffer, 1, st.st_size, FilePointer);
|
||||
DumpData(FileName, Buffer, st.st_size);
|
||||
|
||||
fclose(FilePointer);
|
||||
free(Buffer);
|
||||
return 0;
|
||||
}
|
@ -4,19 +4,23 @@ export PATH := $(CROSS_DIR):$(PATH)
|
||||
|
||||
QEMU_VERSION = qemu-7.1.0
|
||||
|
||||
all: do_rep do_ep do_limine clone_all do_binutils64 do_binutils32 do_binutilsarm64 do_gcc64 do_gcc32 do_gccarm64 do_qemu
|
||||
all: do_rep do_ep do_fex do_limine clone_all do_binutils64 do_binutils32 do_binutilsarm64 do_gcc64 do_gcc32 do_gccarm64 do_qemu
|
||||
|
||||
clean:
|
||||
rm -f rep ep
|
||||
rm -f rep ep fex
|
||||
|
||||
do_rep:
|
||||
gcc -w ReadEthernetPackets.c -o rep
|
||||
chmod +x rep
|
||||
|
||||
do_ep:
|
||||
g++ -w e.cpp -o ep
|
||||
g++ -w ErrorParser.cpp -o ep
|
||||
chmod +x ep
|
||||
|
||||
do_fex:
|
||||
gcc -w Fex.c -o fex
|
||||
chmod +x fex
|
||||
|
||||
do_limine:
|
||||
git clone https://github.com/limine-bootloader/limine.git --branch=v4.x-branch-binary --depth=1
|
||||
|
||||
|
@ -5,7 +5,7 @@ INTERFACE_BRANDING=Fennix
|
||||
# DO NOT EDIT!
|
||||
COMMENT=Boot Fennix using Limine protocol
|
||||
PROTOCOL=limine
|
||||
KERNEL_CMDLINE=debug
|
||||
KERNEL_CMDLINE=debug liballoc11
|
||||
KERNEL_PATH=boot:///kernel.fsys
|
||||
|
||||
MODULE_PATH=boot:///initrd.tar.gz
|
||||
|
Reference in New Issue
Block a user