(WIP) Loader for 64 bit kernel.
This commit is contained in:
@@ -17,15 +17,26 @@ crtbegin_o = get_crt_object('crtbegin.o')
|
||||
crtend_o = get_crt_object('crtend.o')
|
||||
crti_o = env.Object('src/crt/crti.s')
|
||||
crtn_o = env.Object('src/crt/crtn.s')
|
||||
env['KERNEL_LINKCOM'] = env['LINKCOM'].replace('$_LIBFLAGS', f'{crti_o[0].abspath} {crtbegin_o} $_LIBFLAGS {crtend_o} {crtn_o[0].abspath}')
|
||||
|
||||
i686_sources = Split('''
|
||||
src/kernel/boot.s
|
||||
src/kernel/startup.cpp
|
||||
''')
|
||||
|
||||
env['LINKCOM'] = env['LINKCOM'].replace('$_LIBFLAGS', f'{crti_o[0].abspath} {crtbegin_o} $_LIBFLAGS {crtend_o} {crtn_o[0].abspath}')
|
||||
i686_iso_files = [
|
||||
{
|
||||
"source": env.File("boot/grub.cfg"),
|
||||
"target": "boot/grub/grub.cfg"
|
||||
},
|
||||
{
|
||||
"source": env.File("#os.bin"),
|
||||
"target": "boot/os.bin"
|
||||
}
|
||||
]
|
||||
|
||||
env.Append(KERNEL_SOURCES = [env.File(f) for f in i686_sources])
|
||||
env.Append(KERNEL_DEPENDENCIES = [crti_o, crtn_o])
|
||||
env.Append(ISO_FILES = i686_iso_files)
|
||||
|
||||
Return('env')
|
||||
7
targets/i686/boot/grub.cfg
Normal file
7
targets/i686/boot/grub.cfg
Normal file
@@ -0,0 +1,7 @@
|
||||
set timeout=0
|
||||
set default=0
|
||||
|
||||
menuentry "Bad Apple OS" {
|
||||
multiboot /boot/os.bin
|
||||
boot
|
||||
}
|
||||
Reference in New Issue
Block a user