Skip to content

Commit

Permalink
Break kernel into smaller kernel initiation stages
Browse files Browse the repository at this point in the history
Make the /Beryllium/usr/lib/kernel folder
  • Loading branch information
bill88t committed Jun 4, 2024
1 parent bcda158 commit 7ab5f5e
Show file tree
Hide file tree
Showing 8 changed files with 437 additions and 413 deletions.
Empty file.
18 changes: 15 additions & 3 deletions scripts/make_kernel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from os import system, mkdir, listdir, environ, getcwd, chdir, remove
from sys import argv
from sys import path as spath
from shutil import copyfile

spath.append("../scripts/CircuitMPY/")
spath.append("./jz")
Expand Down Expand Up @@ -50,16 +51,27 @@ def errexit():
errexit()

olddir = getcwd()
chdir("core_packages/kernel")
chdir("kernel_stages")
for filee in listdir():
copyfile(filee, f"../core_packages/kernel/{filee}")
chdir(olddir)
chdir("./core_packages/kernel")
execstr = ""
for filee in listdir():
execstr += f", '{filee}'"
execstr = "compress(" + execstr[2:] + ", '../kernel.jpk')"
exec(execstr)
chdir(olddir)

for filee in kern_files:
remove(f"./core_packages/kernel/{filee[:-3]}.mpy")
for filee in listdir("core_packages/kernel"):
if filee not in [
"Manifest.json",
"kernel.jpk",
"installer.py",
"strap.py",
"uninstaller.py",
]:
remove(f"core_packages/kernel/{filee}")
print("Done")

print("\n[2/4] Building jcurses package")
Expand Down
Loading

0 comments on commit 7ab5f5e

Please sign in to comment.