mirror of
https://github.com/drasko/codezero.git
synced 2026-01-20 06:43:16 +01:00
Minor mods on linux patches
This commit is contained in:
@@ -19,7 +19,7 @@ from scripts.loader.generate_loader_asm import *
|
||||
from config.lib import *
|
||||
|
||||
# Function to determine the LMA for 'final.elf'
|
||||
def find_lma_codezero(target, source, env):
|
||||
def find_loader_load_address(target, source, env):
|
||||
# Start/end addresses of various physical memory regions defined
|
||||
array_start = []
|
||||
array_end = []
|
||||
@@ -52,7 +52,7 @@ def find_lma_codezero(target, source, env):
|
||||
# Create target file
|
||||
with open(source[1].path, 'r') as input:
|
||||
buffer = input.read()
|
||||
print 'LMA FOR FINAL.ELF IS : ' + str(conv_hex(loadaddr))
|
||||
#print 'Load address for final.elf: ' + str(conv_hex(loadaddr))
|
||||
with open(target[0].path, 'w+') as output:
|
||||
output.write(buffer % str(conv_hex(loadaddr)))
|
||||
|
||||
@@ -67,7 +67,7 @@ loader_image_S = Command(join(PROJROOT, 'loader/images.S'), [join(BUILDDIR, 'ker
|
||||
gen_loader_images_S)
|
||||
lma_lds = Command(join(BUILDDIR, 'loader/linker.lds'), \
|
||||
[join(BUILDDIR, 'kernel.elf'), \
|
||||
join(PROJROOT, 'loader/linker.lds.in')], find_lma_codezero)
|
||||
join(PROJROOT, 'loader/linker.lds.in')], find_loader_load_address)
|
||||
src = Glob('*.[cS]')
|
||||
objs = env.Object(src)
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
* Copyright (C) 2008-2009 B Labs Ltd.
|
||||
*/
|
||||
|
||||
lma_codezero = %s;
|
||||
load_address = %s;
|
||||
ENTRY(_start)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = lma_codezero;
|
||||
. = load_address;
|
||||
.text : { *(.text.head) *(.text) }
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata1 : { *(.rodata1) }
|
||||
|
||||
Reference in New Issue
Block a user