Модули теперь автоматически копируются из modules/bin
This commit is contained in:
parent
9e8bc4b343
commit
292d1bd560
|
@ -4,6 +4,7 @@ bin/
|
|||
limine/
|
||||
ovmf/
|
||||
iso_root/
|
||||
output/
|
||||
*.so
|
||||
*.o
|
||||
*.ko
|
||||
|
|
5
build.sh
5
build.sh
|
@ -1,8 +1,9 @@
|
|||
#!/bin/sh
|
||||
cd modules/
|
||||
mkdir -p bin
|
||||
dos2unix */*.sh
|
||||
cd helloworld/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd music/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
#cd helloworld/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
#cd music/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd simd/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd cpubench/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
cd pci/ && chmod +x build.sh && ./build.sh && cd ..
|
||||
|
|
|
@ -26,4 +26,4 @@ TERM_WALLPAPER=boot:///boot.jpg
|
|||
MODULE_CMDLINE=[MOD]cpubench.ko
|
||||
|
||||
MODULE_PATH=boot:///mod/pci.ko
|
||||
MODULE_CMDLINE=[MOD]pci.ko
|
||||
MODULE_CMDLINE=[MOD]pci.ko
|
|
@ -1,3 +1,3 @@
|
|||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 1
|
||||
#define VERSION_BUILD 430
|
||||
#define VERSION_BUILD 438
|
||||
|
|
|
@ -3,4 +3,5 @@ echo "Название: CPUBENCH"
|
|||
echo "Лицензия: Публичное достояние"
|
||||
gcc -I../../modlib -O0 -finput-charset=UTF-8 -fexec-charset=cp1251 -c -fPIC -nostdlib main.c -o cpubench.o
|
||||
gcc -Wl,--entry=init -fPIC -shared -nostdlib cpubench.o -o cpubench.ko
|
||||
cp cpubench.ko ../bin/
|
||||
echo "Сборка завершена, файл: cpubench.ko"
|
||||
|
|
|
@ -3,4 +3,5 @@ echo "Название: Hello world"
|
|||
echo "Лицензия: Публичное достояние"
|
||||
gcc -mcmodel=large -I../../modlib -O0 -finput-charset=UTF-8 -fexec-charset=cp1251 -c -fPIC -nostdlib main.c -o hello.o
|
||||
gcc -mcmodel=large -Wl,--entry=init -fPIC -shared -nostdlib hello.o -o hello.ko
|
||||
cp hello.ko ../bin/
|
||||
echo "Сборка завершена, файл: hello.ko"
|
||||
|
|
|
@ -3,4 +3,5 @@ echo "Название: Мелодия из тетриса"
|
|||
echo "Лицензия: Публичное достояние"
|
||||
gcc -I../../modlib -O0 -finput-charset=UTF-8 -fexec-charset=cp1251 -c -fPIC -nostdlib main.c -o music.o
|
||||
gcc -Wl,--entry=init -fPIC -shared -nostdlib music.o -o music.ko
|
||||
cp music.ko ../bin/
|
||||
echo "Сборка завершена, файл: music.ko"
|
||||
|
|
|
@ -3,4 +3,5 @@ echo "Название: PCI"
|
|||
echo "Лицензия: Публичное достояние"
|
||||
gcc -I../../modlib -O0 -finput-charset=UTF-8 -fexec-charset=cp1251 -c -fPIC -nostdlib main.c -o pci.o
|
||||
gcc -Wl,--entry=init -fPIC -shared -nostdlib pci.o -o pci.ko
|
||||
cp pci.ko ../bin/
|
||||
echo "Сборка завершена, файл: pci.ko"
|
||||
|
|
|
@ -3,4 +3,5 @@ echo "Название: SIMD"
|
|||
echo "Лицензия: Публичное достояние"
|
||||
gcc -I../../modlib -O0 -finput-charset=UTF-8 -fexec-charset=cp1251 -c -fPIC -nostdlib main.c -o simd.o
|
||||
gcc -Wl,--entry=init -fPIC -shared -nostdlib simd.o -o simd.ko
|
||||
cp simd.ko ../bin/
|
||||
echo "Сборка завершена, файл: simd.ko"
|
||||
|
|
|
@ -133,7 +133,7 @@ def create_hdd(IMAGE_NAME):
|
|||
os.system(f"mformat -i {IMAGE_NAME}.hdd@@1M")
|
||||
os.system(f"mmd -i {IMAGE_NAME}.hdd@@1M ::/mod ::/EFI ::/EFI/BOOT ::/user")
|
||||
os.system(f"mcopy -i {IMAGE_NAME}.hdd@@1M kernel.elf configs/limine.cfg limine/limine-bios.sys ::/")
|
||||
os.system(f"mcopy -i {IMAGE_NAME}.hdd@@1M modules/pci/pci.ko modules/simd/simd.ko modules/cpubench/cpubench.ko ::/mod")
|
||||
os.system(f"mcopy -i {IMAGE_NAME}.hdd@@1M modules/bin/*.ko ::/mod")
|
||||
os.system(f"mcopy -i {IMAGE_NAME}.hdd@@1M limine/BOOTX64.EFI limine/BOOTIA32.EFI ::/EFI/BOOT")
|
||||
os.system(f"mcopy -i {IMAGE_NAME}.hdd@@1M boot.jpg boot.tga ::/")
|
||||
os.system(f"./limine/limine bios-install {IMAGE_NAME}.hdd")
|
||||
|
@ -145,10 +145,7 @@ def create_iso(IMAGE_NAME):
|
|||
os.system(f"mkdir -p iso_root")
|
||||
os.system(f"cp -v kernel.elf boot.jpg boot.tga configs/limine.cfg limine/limine-bios.sys limine/limine-bios-cd.bin limine/limine-uefi-cd.bin iso_root/")
|
||||
os.system(f"mkdir -p iso_root/EFI/BOOT")
|
||||
os.system(f"mkdir -p iso_root/mod")
|
||||
os.system(f"cp -v modules/pci/pci.ko iso_root/mod/")
|
||||
os.system(f"cp -v modules/simd/simd.ko iso_root/mod/")
|
||||
os.system(f"cp -v modules/cpubench/cpubench.ko iso_root/mod/")
|
||||
shutil.copytree("modules/bin", "iso_root/mod")
|
||||
os.system(f"cp -v limine/BOOTX64.EFI iso_root/EFI/BOOT/")
|
||||
os.system(f"cp -v limine/BOOTIA32.EFI iso_root/EFI/BOOT/")
|
||||
os.system(f"xorriso -as mkisofs -b limine-bios-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table --efi-boot limine-uefi-cd.bin -efi-boot-part --efi-boot-image --protective-msdos-label iso_root -o {IMAGE_NAME}.iso")
|
||||
|
|
Loading…
Reference in New Issue