Changes since April

Clean up of build directories.
Simplifications to capability model.
This commit is contained in:
Bahadir Balban
2010-06-01 15:08:13 +03:00
parent aef14b55ec
commit 6fa4884a5a
450 changed files with 10449 additions and 7383 deletions

View File

@@ -75,7 +75,7 @@ _eng = {
"GOBUTTON":"Go to...",
"GOTOBYNAME":"Go to symbol by name: ",
"GPROMPT":"Symbol to set or edit: ",
"HELPBANNER": "Press ? for help on current symbol, h for command help",
"HELPBANNER": "Press h for help on current symbol, c for command help",
"HELPBUTTON":"Help",
"HELPFOR":"Help for %s",
"HSEARCHBUTTON":"Search help text...",
@@ -207,7 +207,7 @@ Type `x' to save configuration and exit, `q' to exit without saving, `s' to
save the configuration to a named file, and `i' to read in a configuration by
filename. -I reads in a configuration and freezes the variables.
Type '?' to see any help text associated with the current symbol. Type 'h'
Type 'h' to see any help text associated with the current symbol. Type 'c'
to see this command summary again. Some expert commands are documented
in separate help; press TAB from this help screen to see it.\
""",
@@ -297,7 +297,7 @@ using the `Go' command to visit a suppressed symbol, or by doing a Search.
""",
"CLIHELP":"""\
Usage: clmlconfigure.py [-tcxqbs] [-[Dd] sym] [-[Ii] file]
Usage: cmlconfigure.py [-tcxqbs] [-[Dd] sym] [-[Ii] file]
[-B banner] [-o output] [-v]
-t force tty (line-oriented) mode
@@ -1648,7 +1648,7 @@ class curses_style_menu:
(self.lines, self.columns) = self.window.getmaxyx()
self.menus.viewport_height = self.lines-1
recompute = 1
elif cmd in (curses.ascii.TAB, ord('h')):
elif cmd in (curses.ascii.TAB, ord('c')):
if self.in_menu():
self.menus.push(string.split(lang["CURSHELP"], "\n"))
self.msgbuf = lang["WELCOME"] % (configuration.banner) \
@@ -1682,7 +1682,7 @@ class curses_style_menu:
else:
self.menus.push(entry.menu.items, entry)
recompute = 1
elif cmd == ord('?'):
elif cmd == ord('h'):
if not self.in_menu():
self.help_popup("PRESSANY", (lang["NOSYMBOL"],))
else:

View File

@@ -2,40 +2,39 @@
import elf
# Define section markers for various sections in elf
# Define header markers for various program headers in elf
def elf_loadable_section_info(img):
elffile = elf.ElfFile.from_file(img)
# Sections markers for RW sections
# Markers
rw_sections_start = 0
rw_sections_end = 0
# Section markers for RX and RO section combined
rx_sections_start = 0
rx_sections_end = 0
# Flag encoding used by elf
sh_flag_write = 1 << 0
sh_flag_load = 1 << 1
sh_flag_execute = 1 << 2
PF_X = 1 << 0
PF_W = 1 << 1
PF_R = 1 << 2
for sheader in elffile.sheaders:
x = sheader.ai
loadable_header = 1
# Check for loadable sections
if x.sh_flags.get() & sh_flag_load:
start = x.sh_addr.get()
end = start + x.sh_size.get()
for pheader in elffile.pheaders:
x = pheader.ai
# RW Section
if x.sh_flags.get() & sh_flag_write:
if (rw_sections_start == 0) or (rw_sections_start > start):
rw_sections_start = start
if (rw_sections_end == 0) or (rw_sections_end < end):
rw_sections_end = end
# Check for loadable headers
if x.p_type.get() >> loadable_header == 0:
start = x.p_vaddr.get()
end = start + x.p_memsz.get()
# RX, RO Section
else:
# RW header
if x.p_flags.get() & (~(PF_R | PF_W)) == 0:
if (rw_sections_start == 0) or (rw_sections_start > start):
rw_sections_start = start
if (rw_sections_end == 0) or (rw_sections_end < end):
rw_sections_end = end
# RX header
elif x.p_flags.get() & (~(PF_R | PF_X)) == 0:
if (rx_sections_start == 0) or (rx_sections_start > start):
rx_sections_start = start
if (rx_sections_end == 0) or (rx_sections_end < end):
@@ -43,4 +42,3 @@ def elf_loadable_section_info(img):
return rw_sections_start, rw_sections_end, \
rx_sections_start, rx_sections_end

View File

@@ -21,3 +21,7 @@ def elf_binary_size(img):
paddr_end = x.p_paddr + x.p_memsz
return paddr_end - paddr_start
# Return load address of elf file
def get_elf_load_address(img):
elffile = elf.ElfFile.from_file(img)
return elffile.header.ai.e_entry

View File

@@ -16,5 +16,6 @@ ctags -e --languages=C,C++,Asm --recurse -Ltagfilelist
# exuberant-ctags --languages=C,C++,Asm --recurse -Ltagfilelist
cscope -q -k -R -i tagfilelist
# Remove file list.
rm -f tagfilelist

View File

@@ -6,7 +6,7 @@ import os, sys
PROJRELROOT = '../../'
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
from config.configuration import *
from scripts.config.configuration import *
config = configuration_retrieve()
platform = config.platform
@@ -25,32 +25,37 @@ def main():
include_dir_path = 'include/l4'
search_folder = \
['api', 'arch/'+ arch, 'arch/'+ arch + '/' + subarch, 'drivers', \
'generic', 'glue/' + arch, 'lib', 'platform/' + platform]
['api',
'arch/'+ arch,
'arch/'+ arch + '/' + subarch,
'generic',
'glue/' + arch,
'lib',
'platform/' + platform]
# Check if we need realview directory based on platform selected
if platform == "eb" or \
platform == "pba8" or \
platform == "pba9" or \
platform == "pb11mpcore":
if platform == 'eb' or platform == 'pba9':
search_folder += ['platform/realview']
# Driver selection based on platform selected
if platform == 'beagle':
search_folder += ['drivers/uart/omap', 'drivers/timer/omap', 'drivers/irq/omap3']
elif platform == 'eb' or platform == 'pba9':
search_folder += ['drivers/uart/pl011', 'drivers/timer/sp804', 'drivers/irq/gic']
elif platform == 'pb926':
search_folder += ['drivers/uart/pl011', 'drivers/timer/sp804', 'drivers/irq/pl190']
# Put all sources into a file list.
depth = 1
for extn in file_extn:
for dir in search_folder:
# Directory depth to be searched
if dir == 'drivers':
depth = 5
else:
depth = 1
os.system("find " + join(src_dir_path, dir) + \
" -maxdepth " + str(depth) + " -name '" + extn + "' >> tagfilelist")
os.system("find " + join(include_dir_path, dir) + \
" -maxdepth " + str(depth) + " -name '" + extn + "' >> tagfilelist")
# Use file list to include in tags.
os.system("ctags --languages=C,Asm --recurse -Ltagfilelist")
os.system("ctags --languages=C,Asm --recurse -Ltagfilelist --if0=yes")
os.system("cscope -q -k -R -i tagfilelist")
# Remove file list.

79
tools/tagsgen/tagsgen_linux.py Executable file
View File

@@ -0,0 +1,79 @@
#! /usr/bin/env python2.6
# -*- mode: python; coding: utf-8; -*-
#
# Call this script from codezero/conts/linux/kernel-2.6.34
#
import os, sys
PROJRELROOT = '../..'
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), PROJRELROOT)))
from scripts.config.configuration import *
config = configuration_retrieve()
platform = config.platform
def main():
# Type of files to be included
file_extn = ['*.c', '*.h', '*.s', '*.S', '*.lds', '*.in', 'Makefile', 'Kconfig']
# Kernel directories
src_dir_path = '.' #'kernel-2.6.34'
arch_dir_path = join(src_dir_path, 'arch/arm')
# Add Makefiles etc present in base directories
search_folder = [[src_dir_path, 1], [arch_dir_path, 1]]
# Add architecture files
search_folder += \
[[join(arch_dir_path, 'boot'), 5],
[join(arch_dir_path, 'common'), 5],
[join(arch_dir_path, 'include'), 5],
[join(arch_dir_path, 'kernel'), 5],
[join(arch_dir_path, 'lib'), 5],
[join(arch_dir_path, 'mm'), 5]]
# Check for platform files
if platform == 'pba9':
search_folder += [[join(arch_dir_path, 'mach-vexpress'), 5],
[join(arch_dir_path, 'mach-versatile'), 5],
[join(arch_dir_path, 'plat-versatile'), 5]]
elif platform == 'pb926':
search_folder += [[join(arch_dir_path, 'mach-versatile'), 5],
[join(arch_dir_path, 'plat-versatile'), 5]]
elif platform == 'eb':
search_folder += [join(arch_dir_path, 'mach-realview'), 5]
elif platform == 'beagle':
search_folder += [[join(arch_dir_path, 'mach-omap2'), 5],
[join(arch_dir_path, 'plat-omap'), 5]]
# We may need mach-omap1 also.
else:
print 'Please define platform files path...'
exit(1)
# Add generic kernel directories
search_folder += [[join(src_dir_path, 'mm'), 5],
[join(src_dir_path, 'lib'), 5],
[join(src_dir_path, 'kernel'), 5],
[join(src_dir_path, 'init'), 5],
[join(src_dir_path, 'include'), 5]]
# Put all sources into a file list.
for extn in file_extn:
for dir, depth in search_folder:
os.system("find " + dir + " -maxdepth " + str(depth) + \
" -name '" + extn + "' >> tagfilelist.linux")
# Use file list to include in tags.
os.system("ctags --languages=C,Asm --recurse -Ltagfilelist.linux --if0=yes")
os.system("cscope -q -k -R -i tagfilelist.linux")
# Delete generated files
os.system("rm -f tagfilelist.linux")
if __name__ == "__main__":
main()

View File

@@ -1,3 +1,5 @@
rm -f cscope.*
rm -f tags
# Put all sources into a file list.
find ./loader -name '*.cc' > tagfilelist
@@ -6,15 +8,10 @@ find ./loader -name '*.h' >> tagfilelist
find ./loader -name '*.s' >> tagfilelist
find ./loader -name '*.S' >> tagfilelist
find ./libs -name '*.cc'>> tagfilelist
find ./libs -name '*.c' >> tagfilelist
find ./libs -name '*.h' >> tagfilelist
find ./libs -name '*.s' >> tagfilelist
find ./libs -name '*.S' >> tagfilelist
# Use file list to include in tags.
exuberant-ctags --languages=C,Asm --recurse -Ltagfilelist
ctags --languages=C,Asm --recurse -Ltagfilelist
cscope -q -k -R -i tagfilelist
# Remove file list.
#rm -f tagfilelist
rm -f tagfilelist