Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add elftosb tools to evbarm userland and toolchain.
details: https://anonhg.NetBSD.org/src/rev/989f533a2fcc
branches: trunk
changeset: 782706:989f533a2fcc
user: jkunz <jkunz%NetBSD.org@localhost>
date: Thu Nov 15 19:49:11 2012 +0000
description:
Add elftosb tools to evbarm userland and toolchain.
Elftosb is used to create a digitaly signed "secure boot" file.
This sb file can be booted by the first stage boot loader found in
Freescale i.MX23 and i.MX28 application processors.
Copyright (c) 2004-2010 Freescale Semiconductor, Inc.
diffstat:
distrib/sets/lists/base/md.evbarm | 5 +-
distrib/sets/lists/man/mi | 11 +-
external/bsd/Makefile | 4 +-
external/bsd/elftosb/Makefile | 8 +
external/bsd/elftosb/Makefile.inc | 25 +
external/bsd/elftosb/dist/COPYING | 28 +
external/bsd/elftosb/dist/ReadMe.txt | 45 +
external/bsd/elftosb/dist/bdfiles/basic_test_cmd.e | 192 +
external/bsd/elftosb/dist/bdfiles/complex.bd | 260 +
external/bsd/elftosb/dist/bdfiles/habtest.bd | 36 +
external/bsd/elftosb/dist/bdfiles/simple.e | 8 +
external/bsd/elftosb/dist/bdfiles/test_cmd.e | 120 +
external/bsd/elftosb/dist/common/AESKey.cpp | 78 +
external/bsd/elftosb/dist/common/AESKey.h | 144 +
external/bsd/elftosb/dist/common/Blob.cpp | 123 +
external/bsd/elftosb/dist/common/Blob.h | 70 +
external/bsd/elftosb/dist/common/BootImage.h | 54 +
external/bsd/elftosb/dist/common/DataSource.cpp | 224 +
external/bsd/elftosb/dist/common/DataSource.h | 299 +
external/bsd/elftosb/dist/common/DataSourceImager.cpp | 143 +
external/bsd/elftosb/dist/common/DataSourceImager.h | 54 +
external/bsd/elftosb/dist/common/DataTarget.cpp | 59 +
external/bsd/elftosb/dist/common/DataTarget.h | 122 +
external/bsd/elftosb/dist/common/ELF.h | 332 +
external/bsd/elftosb/dist/common/ELFSourceFile.cpp | 529 +
external/bsd/elftosb/dist/common/ELFSourceFile.h | 224 +
external/bsd/elftosb/dist/common/EncoreBootImage.cpp | 1372 +
external/bsd/elftosb/dist/common/EncoreBootImage.h | 967 +
external/bsd/elftosb/dist/common/EndianUtilities.h | 141 +
external/bsd/elftosb/dist/common/EvalContext.cpp | 111 +
external/bsd/elftosb/dist/common/EvalContext.h | 99 +
external/bsd/elftosb/dist/common/ExcludesListMatcher.cpp | 88 +
external/bsd/elftosb/dist/common/ExcludesListMatcher.h | 67 +
external/bsd/elftosb/dist/common/GHSSecInfo.cpp | 100 +
external/bsd/elftosb/dist/common/GHSSecInfo.h | 72 +
external/bsd/elftosb/dist/common/GlobMatcher.cpp | 129 +
external/bsd/elftosb/dist/common/GlobMatcher.h | 59 +
external/bsd/elftosb/dist/common/HexValues.cpp | 34 +
external/bsd/elftosb/dist/common/HexValues.h | 21 +
external/bsd/elftosb/dist/common/IVTDataSource.cpp | 113 +
external/bsd/elftosb/dist/common/IVTDataSource.h | 296 +
external/bsd/elftosb/dist/common/Logging.cpp | 91 +
external/bsd/elftosb/dist/common/Logging.h | 226 +
external/bsd/elftosb/dist/common/Operation.cpp | 63 +
external/bsd/elftosb/dist/common/Operation.h | 168 +
external/bsd/elftosb/dist/common/OptionContext.h | 50 +
external/bsd/elftosb/dist/common/OptionDictionary.cpp | 170 +
external/bsd/elftosb/dist/common/OptionDictionary.h | 107 +
external/bsd/elftosb/dist/common/OutputSection.cpp | 9 +
external/bsd/elftosb/dist/common/OutputSection.h | 72 +
external/bsd/elftosb/dist/common/Random.cpp | 85 +
external/bsd/elftosb/dist/common/Random.h | 57 +
external/bsd/elftosb/dist/common/RijndaelCBCMAC.cpp | 86 +
external/bsd/elftosb/dist/common/RijndaelCBCMAC.h | 62 +
external/bsd/elftosb/dist/common/SHA1.cpp | 274 +
external/bsd/elftosb/dist/common/SHA1.h | 149 +
external/bsd/elftosb/dist/common/SRecordSourceFile.cpp | 176 +
external/bsd/elftosb/dist/common/SRecordSourceFile.h | 83 +
external/bsd/elftosb/dist/common/SearchPath.cpp | 121 +
external/bsd/elftosb/dist/common/SearchPath.h | 58 +
external/bsd/elftosb/dist/common/SourceFile.cpp | 178 +
external/bsd/elftosb/dist/common/SourceFile.h | 156 +
external/bsd/elftosb/dist/common/StELFFile.cpp | 531 +
external/bsd/elftosb/dist/common/StELFFile.h | 196 +
external/bsd/elftosb/dist/common/StExecutableImage.cpp | 463 +
external/bsd/elftosb/dist/common/StExecutableImage.h | 251 +
external/bsd/elftosb/dist/common/StSRecordFile.cpp | 235 +
external/bsd/elftosb/dist/common/StSRecordFile.h | 119 +
external/bsd/elftosb/dist/common/StringMatcher.h | 62 +
external/bsd/elftosb/dist/common/Value.cpp | 43 +
external/bsd/elftosb/dist/common/Value.h | 138 +
external/bsd/elftosb/dist/common/Version.cpp | 143 +
external/bsd/elftosb/dist/common/Version.h | 51 +
external/bsd/elftosb/dist/common/crc.cpp | 292 +
external/bsd/elftosb/dist/common/crc.h | 48 +
external/bsd/elftosb/dist/common/format_string.cpp | 79 +
external/bsd/elftosb/dist/common/format_string.h | 20 +
external/bsd/elftosb/dist/common/int_size.h | 22 +
external/bsd/elftosb/dist/common/options.cpp | 1140 +
external/bsd/elftosb/dist/common/options.h | 488 +
external/bsd/elftosb/dist/common/rijndael.cpp | 1604 +
external/bsd/elftosb/dist/common/rijndael.h | 159 +
external/bsd/elftosb/dist/common/smart_ptr.h | 232 +
external/bsd/elftosb/dist/common/stdafx.cpp | 8 +
external/bsd/elftosb/dist/common/stdafx.h | 83 +
external/bsd/elftosb/dist/elftosb.ccscc | 7 +
external/bsd/elftosb/dist/elftosb.sln | 46 +
external/bsd/elftosb/dist/elftosb.suo | Bin
external/bsd/elftosb/dist/elftosb.xcodeproj/creed.mode1 | 1527 +
external/bsd/elftosb/dist/elftosb.xcodeproj/creed.mode1v3 | 1569 +
external/bsd/elftosb/dist/elftosb.xcodeproj/creed.pbxuser | 4452 +++
external/bsd/elftosb/dist/elftosb.xcodeproj/project.pbxproj | 943 +
external/bsd/elftosb/dist/elftosb2/BootImageGenerator.cpp | 80 +
external/bsd/elftosb/dist/elftosb2/BootImageGenerator.h | 69 +
external/bsd/elftosb/dist/elftosb2/ConversionController.cpp | 1428 +
external/bsd/elftosb/dist/elftosb2/ConversionController.h | 153 +
external/bsd/elftosb/dist/elftosb2/Doxyfile | 250 +
external/bsd/elftosb/dist/elftosb2/ElftosbAST.cpp | 1352 +
external/bsd/elftosb/dist/elftosb2/ElftosbAST.h | 1227 +
external/bsd/elftosb/dist/elftosb2/ElftosbErrors.h | 29 +
external/bsd/elftosb/dist/elftosb2/ElftosbLexer.cpp | 149 +
external/bsd/elftosb/dist/elftosb2/ElftosbLexer.h | 97 +
external/bsd/elftosb/dist/elftosb2/EncoreBootImageGenerator.cpp | 297 +
external/bsd/elftosb/dist/elftosb2/EncoreBootImageGenerator.h | 57 +
external/bsd/elftosb/dist/elftosb2/FlexLexer.h | 208 +
external/bsd/elftosb/dist/elftosb2/elftosb.cpp | 700 +
external/bsd/elftosb/dist/elftosb2/elftosb2.vcproj | 585 +
external/bsd/elftosb/dist/elftosb2/elftosb_lexer.cpp | 2241 +
external/bsd/elftosb/dist/elftosb2/elftosb_lexer.l | 299 +
external/bsd/elftosb/dist/elftosb2/elftosb_parser.tab.cpp | 2955 ++
external/bsd/elftosb/dist/elftosb2/elftosb_parser.tab.hpp | 152 +
external/bsd/elftosb/dist/elftosb2/elftosb_parser.y | 978 +
external/bsd/elftosb/dist/encryptgpk/encryptgpk.cpp | 442 +
external/bsd/elftosb/dist/encryptgpk/encryptgpk.vcproj | 349 +
external/bsd/elftosb/dist/keygen/Doxyfile | 250 +
external/bsd/elftosb/dist/keygen/keygen.cpp | 346 +
external/bsd/elftosb/dist/keygen/keygen.vcproj | 478 +
external/bsd/elftosb/dist/makefile | 32 +
external/bsd/elftosb/dist/makefile.rules | 178 +
external/bsd/elftosb/dist/sbtool/Doxyfile | 250 +
external/bsd/elftosb/dist/sbtool/EncoreBootImageReader.cpp | 370 +
external/bsd/elftosb/dist/sbtool/EncoreBootImageReader.h | 117 +
external/bsd/elftosb/dist/sbtool/sbtool.cpp | 626 +
external/bsd/elftosb/dist/sbtool/sbtool.vcproj | 495 +
external/bsd/elftosb/dist/stdafx.h | 66 +
external/bsd/elftosb/dist/test_elftosb.bat | 12 +
external/bsd/elftosb/dist/test_elftosb.sh | 26 +
external/bsd/elftosb/dist/test_files/ProfileSeed.bin | Bin
external/bsd/elftosb/dist/test_files/ProfileSeedFile50k.bin | Bin
external/bsd/elftosb/dist/test_files/hello_NOR_arm | Bin
external/bsd/elftosb/dist/test_files/hello_NOR_arm.map | 38 +
external/bsd/elftosb/dist/test_files/hello_NOR_mixed | Bin
external/bsd/elftosb/dist/test_files/hello_NOR_mixed.map | 39 +
external/bsd/elftosb/dist/test_files/hello_NOR_thumb | Bin
external/bsd/elftosb/dist/test_files/hello_NOR_thumb.map | 38 +
external/bsd/elftosb/dist/test_files/hostlink | Bin
external/bsd/elftosb/dist/test_files/player_linfix.elf | Bin
external/bsd/elftosb/dist/test_files/plugin_complex | Bin
external/bsd/elftosb/dist/test_files/plugin_hello | Bin
external/bsd/elftosb/dist/test_files/redboot_gcc.srec | 3397 +++
external/bsd/elftosb/dist/test_files/rom_nand_ldr_profile | Bin
external/bsd/elftosb/dist/test_files/sd_player_gcc | Bin
external/bsd/elftosb/dist/test_files/sd_player_gcc.srec | 11250 ++++++++++
external/bsd/elftosb/dist/test_files/test0.key | 1 +
external/bsd/elftosb/lib/Makefile | 43 +
external/bsd/elftosb/usr.sbin/Makefile | 6 +
external/bsd/elftosb/usr.sbin/Makefile.inc | 4 +
external/bsd/elftosb/usr.sbin/elftosb/Makefile | 29 +
external/bsd/elftosb/usr.sbin/elftosb/elftosb.8 | 71 +
external/bsd/elftosb/usr.sbin/sbkeygen/Makefile | 16 +
external/bsd/elftosb/usr.sbin/sbkeygen/sbkeygen.8 | 70 +
external/bsd/elftosb/usr.sbin/sbtool/Makefile | 16 +
external/bsd/elftosb/usr.sbin/sbtool/sbtool.8 | 62 +
share/mk/bsd.own.mk | 4 +-
tools/Makefile | 6 +-
tools/elftosb/Makefile | 11 +
156 files changed, 56696 insertions(+), 6 deletions(-)
diffs (truncated from 57366 to 300 lines):
diff -r 36d2e61ead65 -r 989f533a2fcc distrib/sets/lists/base/md.evbarm
--- a/distrib/sets/lists/base/md.evbarm Thu Nov 15 18:51:54 2012 +0000
+++ b/distrib/sets/lists/base/md.evbarm Thu Nov 15 19:49:11 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbarm,v 1.10 2012/01/30 03:28:35 nisimura Exp $
+# $NetBSD: md.evbarm,v 1.11 2012/11/15 19:49:11 jkunz Exp $
./usr/mdec/gzboot_ADI_BRH_0x00140000.bin base-sysutil-bin
./usr/mdec/gzboot_GEMINI_0x01600000.bin base-sysutil-bin
./usr/mdec/gzboot_IQ80310_0x00080000.bin base-sysutil-bin
@@ -8,3 +8,6 @@
./usr/mdec/gzboot_SMDK2800_0x00100000.bin base-sysutil-bin
./usr/mdec/gzboot_TS7200_0x60660000.bin base-sysutil-bin
./usr/mdec/bootmini2440 base-sysutil-bin
+./usr/sbin/elftosb base-sysutil-bin
+./usr/sbin/sbtool base-sysutil-bin
+./usr/sbin/sbkeygen base-sysutil-bin
diff -r 36d2e61ead65 -r 989f533a2fcc distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Thu Nov 15 18:51:54 2012 +0000
+++ b/distrib/sets/lists/man/mi Thu Nov 15 19:49:11 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1406 2012/11/14 02:36:53 rkujawa Exp $
+# $NetBSD: mi,v 1.1407 2012/11/15 19:49:11 jkunz Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2305,6 +2305,9 @@
./usr/share/man/cat8/etcupdate.0 man-sysutil-catman .cat
./usr/share/man/cat8/evbarm/MAKEDEV.0 man-obsolete obsolete
./usr/share/man/cat8/evbarm/bootmini2440.0 man-sysutil-catman .cat
+./usr/share/man/cat8/evbarm/elftosb.0 man-sysutil-catman .cat
+./usr/share/man/cat8/evbarm/sbkeygen.0 man-sysutil-catman .cat
+./usr/share/man/cat8/evbarm/sbtool.0 man-sysutil-catman .cat
./usr/share/man/cat8/evbarm/makedev.0 man-obsolete obsolete
./usr/share/man/cat8/evbmips/MAKEDEV.0 man-obsolete obsolete
./usr/share/man/cat8/evbmips/makedev.0 man-obsolete obsolete
@@ -5067,6 +5070,9 @@
./usr/share/man/html8/eeprom.html man-sysutil-htmlman html
./usr/share/man/html8/emips/boot.html man-sys-htmlman html
./usr/share/man/html8/evbarm/bootmini2440.html man-sysutil-htmlman html
+./usr/share/man/html8/evbarm/elftosb.html man-sysutil-htmlman html
+./usr/share/man/html8/evbarm/sbkeygen.html man-sysutil-htmlman html
+./usr/share/man/html8/evbarm/sbtool.html man-sysutil-htmlman html
./usr/share/man/html8/envstat.html man-sysutil-htmlman html
./usr/share/man/html8/error.html man-postfix-htmlman postfix,html
./usr/share/man/html8/eshconfig.html man-sysutil-htmlman html
@@ -7901,6 +7907,9 @@
./usr/share/man/man8/emips/installboot.8 man-obsolete obsolete
./usr/share/man/man8/emips/makedev.8 man-obsolete obsolete
./usr/share/man/man8/evbarm/bootmini2440.8 man-sysutils-man .man
+./usr/share/man/man8/evbarm/elftosb.8 man-sysutil-man .man
+./usr/share/man/man8/evbarm/sbkeygen.8 man-sysutil-man .man
+./usr/share/man/man8/evbarm/sbtool.8 man-sysutil-man .man
./usr/share/man/man8/envstat.8 man-sysutil-man .man
./usr/share/man/man8/error.8 man-postfix-man postfix,.man
./usr/share/man/man8/eshconfig.8 man-sysutil-man .man
diff -r 36d2e61ead65 -r 989f533a2fcc external/bsd/Makefile
--- a/external/bsd/Makefile Thu Nov 15 18:51:54 2012 +0000
+++ b/external/bsd/Makefile Thu Nov 15 19:49:11 2012 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.33 2012/10/08 01:45:11 jkoshy Exp $
+# $NetBSD: Makefile,v 1.34 2012/11/15 19:49:12 jkunz Exp $
.include <bsd.own.mk>
-SUBDIR= acpica am-utils bind byacc cron dhcpcd fetch file flex less \
+SUBDIR= acpica am-utils bind byacc cron dhcpcd elftosb fetch file flex less \
libarchive libevent liblzf libpcap mdocml ntp openresolv tcpdump \
tmux top tre wpa
diff -r 36d2e61ead65 -r 989f533a2fcc external/bsd/elftosb/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/elftosb/Makefile Thu Nov 15 19:49:11 2012 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.1 2012/11/15 19:49:12 jkunz Exp $
+
+.include <bsd.own.mk>
+
+SUBDIR= lib .WAIT usr.sbin
+
+.include <bsd.subdir.mk>
+
diff -r 36d2e61ead65 -r 989f533a2fcc external/bsd/elftosb/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/elftosb/Makefile.inc Thu Nov 15 19:49:11 2012 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile.inc,v 1.1 2012/11/15 19:49:12 jkunz Exp $
+
+.include <bsd.own.mk>
+
+DIST= ${NETBSDSRCDIR}/external/bsd/elftosb/dist
+
+.PATH: ${DIST}/common
+
+LIBELFTOSBOBJDIR!= cd ${DIST}/../lib && ${PRINTOBJDIR}
+
+.ifndef HOSTPROG
+DPADD+= ${LIBELFTOSBOBJDIR}/libelftosb.a
+LDADD+= -L${LIBELFTOSBOBJDIR} -lelftosb
+.endif
+
+CPPFLAGS+= -I${DIST}/common
+CPPFLAGS+= -I${DIST}/elftosb2
+CPPFLAGS+= -DLinux
+
+CWARNFLAGS+= -Wno-multichar
+
+LIBISCXX= yes
+
+BINDIR= /usr/sbin
+
diff -r 36d2e61ead65 -r 989f533a2fcc external/bsd/elftosb/dist/COPYING
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/elftosb/dist/COPYING Thu Nov 15 19:49:11 2012 +0000
@@ -0,0 +1,28 @@
+Copyright (c) 2004-2010 Freescale Semiconductor, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this list
+ of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+
+* Neither the name of the Freescale Semiconductor, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff -r 36d2e61ead65 -r 989f533a2fcc external/bsd/elftosb/dist/ReadMe.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/elftosb/dist/ReadMe.txt Thu Nov 15 19:49:11 2012 +0000
@@ -0,0 +1,45 @@
+elftosb 2.x read me
+-------------------
+
+Directories
+
+elftosb2 - elftosb 2.x
+sbtool - sbtool 1.x
+keygen - keygen 1.x
+common - source files common between elftosb2, sbtool, and keygen
+winsupport - files needed only by the windows build
+elftosb - old elftosb 1.x, does not use anything from common
+generatekeys - old key generation tool for elftosb 1.x
+decrypt - old decryption tool for elftosb 1.x
+unittests - old unit tests for elftosb 1.x
+test_files - test ELF and Srecord files
+old - contains old makefiles for elftosb 1.x
+
+Development
+
+The preferred way to work on elftosb and related tools is to use Xcode on Mac OS X. The
+elftosb.xcodeproj directory is an Xcode project "file". It has targets for elftosb,
+keygen, sbtool, and an aggregate target that builds all of the above. The main reason
+to use Xcode is that the project is set up so that the flex and bison input files are
+processed automatically and the output files compiled.
+
+The Windows project and Linux makefile are not configured to build the flex or bison
+source files. They simply use the output files copied into the elftosb2 directory.
+You can run flex or bison manually to generate these files if you don't want to use Xcode.
+If you do use the Xcode project and make changes to the .l or .y files, be sure to copy
+the output .cpp files into the elftosb2 directory before you move the changes to either
+Windows or Linux.
+
+Building
+
+On Windows, open the .sln file in Microsoft Visual Studio. The solution contains projects
+for each of the individual projects, including the old elftosb 1.x and related tools.
+
+For Linux, run 'make all' from within the top level elftosb directory. This will build only
+the new elftosb 2.x, sbtool, and keygen. The old makefile to build elftosb 1.x and its
+tools is located in the "old" directory.
+
+On Mac OS X just open the .xcodeproj project and build the "Everything" target.
+
+
+
diff -r 36d2e61ead65 -r 989f533a2fcc external/bsd/elftosb/dist/bdfiles/basic_test_cmd.e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/elftosb/dist/bdfiles/basic_test_cmd.e Thu Nov 15 19:49:11 2012 +0000
@@ -0,0 +1,192 @@
+
+# ooh! test input command file for elftosb 2!
+
+options {
+ coalesce = yes;
+
+ # most elf files are GHS produced
+ toolset = "GHS";
+
+ # set versions
+ productVersion = "111.222.333";
+ componentVersion = "999.888.777";
+
+ # set file flags
+ flags = (1 << 0) | (1 << 1);
+}
+
+constants {
+ ocram_start = 0;
+ ocram_size = 256K;
+ ocram_end = ocram_start + ocram_size - 1;
+
+# ocram = ocram_start .. ocram_end;
+#
+# ocram = ocram_start +.. ocram_size;
+
+ string_addr = 0x4500;
+
+ # boot modes
+ USB_BM = 0;
+ JTAG_BM = 7;
+ newBootMode = USB_BM;
+}
+
+sources {
+ hello = extern(0); # elf
+ redboot = extern(1); # srec
+ hostlink = extern(2); # elf
+ sd_player = extern(3) ( toolset="GCC" ); # elf
+ datasrc = "test0.key"; # binary
+}
+
+section (0) {
+ # load dcd
+ load dcd {{ 00 11 22 33 }} > 0;
+
+ # same load without dcd
+ load {{ 00 11 22 33 }} > 0;
+
+ call 0xf000;
+
+ hab call 0xf0000000 (128);
+ hab jump 0;
+
+/*
+ # load a simple IVT to an absolute address
+ # this fills in the IVT self address field from the target address
+ load ivt (entry=hello:_start) > 0x1000;
+
+ # load simple IVT. the IVT self address is set explicitly in the IVT declaration,
+ # giving the IVT a natural address so you don't have to tell where to load it.
+ load ivt (entry=hello:_start, self=0x1000);
+
+ load ivt (entry=hello:_start, self=0x1000, csf=0x2000, dcd=0);
+
+ # Setting IVT entry point to the default entry point of a source file.
+ load ivt (entry=hostlink) > 0;
+
+ load ivt (entry=hello:_start, self=0x1000);
+ hab call 0x1000;
+
+ # Special syntax that combines the load and call into one statement.
+ hab call ivt(entry=hello:_start, self=0x1000);
+
+
+
+ load ivt (
+ entry = hello:_start,
+ csf = 0x2000
+ ) > 0x1000;
+
+ # All supported IVT fields.
+ load ivt (
+ entry = hello:,
+ dcd = 0,
+ boot_data = 0,
+ self = 0,
+ csf = 0
+ );
+
+ hab call ivt; # Call the last loaded IVT. */
+}
+
+section (32) {
+ # load a string to some address
+ load "some string" > string_addr;
+
+ # byte fill a region
+ load 0x55.b > ocram_start..ocram_end;
+
+ from hostlink {
+ load $*;
+ }
+
+ # jump to a symbol
Home |
Main Index |
Thread Index |
Old Index