[KERNEL][TEST] Compile kernel instead of downloading it

* Change copyright
* Fix kernel copying on server



git-svn-id: svn://kolibrios.org@9312 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Magomed Kostoev (mkostoevr) 2021-11-25 20:53:33 +00:00
parent 2c7ecbb305
commit f4d71d2b55

View File

@ -1,6 +1,5 @@
#!/usr/bin/python3 #!/usr/bin/python3
# Copyright 2021 KolibriOS Team # Copyright 2021 Magomed Kostoev
# Copyright 2021 Nekos Team
# Published under MIT License # Published under MIT License
import os import os
@ -80,7 +79,8 @@ def check_tools(tools):
# Check available tools # Check available tools
tools = (("mcopy", "mtools"), tools = (("mcopy", "mtools"),
("qemu-system-i386", "qemu-system-x86"), ("qemu-system-i386", "qemu-system-x86"),
("wget", "wget")) ("wget", "wget"),
("fasm", "fasm"))
check_tools(tools) check_tools(tools)
# Get IMG # Get IMG
@ -106,10 +106,13 @@ if floppy_image_clusters - free_clusters < 500:
# Get test kernel # Get test kernel
if not os.path.exists("kernel.mnt.pretest"): if not os.path.exists("kernel.mnt.pretest"):
if len(sys.argv) == 1: if len(sys.argv) == 1:
execute("wget -q --show-progress http://builds.kolibrios.org/eng/data/kernel/trunk/kernel.mnt.pretest -O kernel.mnt.pretest") with open("lang.inc", "w") as lang_inc:
lang_inc.write("lang fix en\n")
execute("fasm bootbios.asm bootbios.bin.pretest -dpretest_build=1")
execute("fasm -m 65536 kernel.asm kernel.mnt.pretest -dpretest_build=1 -ddebug_com_base=0xe9")
else: else:
builds_eng = sys.argv[1] builds_eng = sys.argv[1]
execute("cp {builds_eng}/data/kernel/trunk/kernel.mnt.pretest kernel.mnt.pretest", mute = True) execute(f"cp {builds_eng}/data/kernel/trunk/kernel.mnt.pretest kernel.mnt.pretest", mute = True)
# Put the kernel into IMG # Put the kernel into IMG
execute("mcopy -D o -i kolibri_test.img kernel.mnt.pretest ::kernel.mnt", mute = True) execute("mcopy -D o -i kolibri_test.img kernel.mnt.pretest ::kernel.mnt", mute = True)