mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Created a config directory for configuration files. Moved all absolute path variables to a projpaths.py file All scripts can now universally learn absolute paths via projpaths.py Moved the config_symbols class to the configuration.py file. Moved libs to loader since they are only referred by the loader
36 lines
699 B
Python
Executable File
36 lines
699 B
Python
Executable File
# -*- mode: python; coding: utf-8; -*-
|
|
#
|
|
# Codezero -- a microkernel for embedded systems.
|
|
#
|
|
# Copyright © 2009 B Labs Ltd
|
|
|
|
import os, sys, shelve
|
|
|
|
# Convert address from python literal to numeric value
|
|
def address_remove_literal(address):
|
|
value = hex(int(address, 16) - 0xf0000000)
|
|
if value[-1] in ['l', 'L']:
|
|
value = value[:-1]
|
|
return value
|
|
|
|
ksym_header = \
|
|
'''
|
|
/*
|
|
* %s autogenerated from %s.
|
|
*
|
|
* This file is included by the loader sources so that any
|
|
* kernel symbol address can be known in advance and stopped
|
|
* at by debuggers before virtual memory is enabled.
|
|
*/
|
|
'''
|
|
|
|
symbol_section = \
|
|
'''
|
|
.section .text
|
|
.align 4
|
|
.global %s
|
|
.type %s, function
|
|
.equ %s, %s
|
|
'''
|
|
|