9
0
Fork 0

rename U-Boot-v2 project to barebox

This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-12-15 09:11:09 +01:00
parent caa5cec7b1
commit a3ffa97f40
379 changed files with 1378 additions and 1378 deletions

12
.gitignore vendored
View File

@ -27,16 +27,16 @@ tags
TAGS
cross_arch
cross_compile
uboot
uboot.S
uboot.bin
uboot.netx
uboot.map
barebox
barebox.S
barebox.bin
barebox.netx
barebox.map
System.map
Module.symvers
ARCH
CROSS_COMPILE
uboot_default_env
barebox_default_env
#
# Generated include files

14
COPYING
View File

@ -1,16 +1,16 @@
NOTE! This copyright does *not* cover the so-called "standalone"
applications that use U-Boot services by means of the jump table
provided by U-Boot exactly for this purpose - this is merely
considered normal use of U-Boot, and does *not* fall under the
applications that use barebox services by means of the jump table
provided by barebox exactly for this purpose - this is merely
considered normal use of barebox, and does *not* fall under the
heading of "derived work".
The header files "include/image.h" and "include/asm-*/u-boot.h"
define interfaces to U-Boot. Including these (unmodified) header
files in another file is considered normal use of U-Boot, and does
The header files "include/image.h" and "include/asm-*/barebox.h"
define interfaces to barebox. Including these (unmodified) header
files in another file is considered normal use of barebox, and does
*not* fall under the heading of "derived work".
Also note that the GPL below is copyrighted by the Free Software
Foundation, but the instance of code that it refers to (the U-Boot
Foundation, but the instance of code that it refers to (the barebox
source code) is copyrighted by me and others who actually wrote it.
-- Wolfgang Denk

View File

@ -5,7 +5,7 @@
#
#
# This is at least a partial credits-file of individual people that
# have contributed to the U-Boot project. It is sorted by name and
# have contributed to the barebox project. It is sorted by name and
# formatted to allow easy grepping and beautification by scripts.
# The fields are: name (N), email (E), web-address (W), PGP key ID
# and fingerprint (P), description (D), and snail-mail address (S).
@ -123,7 +123,7 @@ D: FLAGA DM Support
N: Wolfgang Denk
E: wd@denx.de
D: U-Boot initial version, continuing maintenance, ARMBoot merge
D: barebox initial version, continuing maintenance, ARMBoot merge
W: http://www.denx.de
N: Dan A. Dickey

View File

@ -1,9 +1,9 @@
/** @mainpage Universal Bootloader
@section uboot_v2_intro Introduction
@section barebox_v2_intro Introduction
This is u2boot, our proposal for a next generation of the famous U-Boot
bootloader. U-Boot offers an excellent choice as a bootloader for
This is barebox, our proposal for a next generation of the famous barebox
bootloader. barebox offers an excellent choice as a bootloader for
today's embedded systems, seen from a user's point of view.
Nevertheless, there are quite some design flaws which turned out over
the last years and we think that they cannot be solved in a production
@ -13,7 +13,7 @@ about losing support for old boards.
@par General features include:
- A posix based file API
- inside U-Boot the usual open/close/read/write/lseek functions are used.
- inside barebox the usual open/close/read/write/lseek functions are used.
This makes it familiar to everyone who has programmed under unix systems.
- usual shell commands like ls/cd/mkdir/echo/cat,...
@ -47,12 +47,12 @@ about losing support for old boards.
the code.
- simulation target
- U-Boot can be compiled to run under Linux. While this is rather useless
- barebox can be compiled to run under Linux. While this is rather useless
in real world this is a great debugging and development aid. New features
can be easily developped and tested on long train journeys and started
under gdb. There is a console driver for linux which emulates a serial
device and a tap based ethernet driver. Linux files can be mapped to
devices under U-Boot to emulate storage devices.
devices under barebox to emulate storage devices.
- device parameter support
- Each device can have a unlimited number of parameters. They can be accessed
@ -65,22 +65,22 @@ about losing support for old boards.
- getopt
- There is a small getopt implementation. Some commands got really
complicated (both in code and in usage) due to the fact that U-Boot only
complicated (both in code and in usage) due to the fact that barebox only
allowed positional parameters.
- editor
- Scripts can be edited with a small editor. This editor has no features
except the ones really needed: moving the cursor and typing characters.
@par Building U-Boot
@par Building barebox
U-Boot uses the Linux kernel's build system. It consists of two parts:
barebox uses the Linux kernel's build system. It consists of two parts:
the makefile infrastructure (kbuild), plus a configuration system
(kconfig). So building U-Boot is very similar to building the Linux
(kconfig). So building barebox is very similar to building the Linux
kernel.
For the examples below, we use the User Mode U-Boot implementation, which
is a port of U-Boot to the Linux userspace. This makes it possible to
For the examples below, we use the User Mode barebox implementation, which
is a port of barebox to the Linux userspace. This makes it possible to
test drive the code without having real hardware. So for this test
scenario, ARCH=sandbox is the valid architecture selection. This currently
only works on ia32 hosts and partly on x86-64.
@ -94,7 +94,7 @@ architecture:
@code # ln -s sandbox cross_arch @endcode
In order to configure the various aspects of U-Boot, start the U-Boot
In order to configure the various aspects of barebox, start the barebox
configuration system:
@code # make menuconfig @endcode
@ -105,49 +105,49 @@ finished (you can simulate this by using the standard demo config file
with 'make sandbox_defconfig'), there is a .config file in the toplevel
directory of the sourcode.
Once U-Boot is configured, we can start the compilation
Once barebox is configured, we can start the compilation
@code # make @endcode
If everything goes well, the result is a file called uboot:
If everything goes well, the result is a file called barebox:
@code
# ls -l uboot
-rwxr-xr-x 1 rsc ptx 114073 Jun 26 22:34 uboot
# ls -l barebox
-rwxr-xr-x 1 rsc ptx 114073 Jun 26 22:34 barebox
@endcode
U-Boot usually needs an environment for storing the configuation data.
barebox usually needs an environment for storing the configuation data.
You can generate an environment using the example environment contained
in examples/environment:
@code # ./scripts/ubootenv -s -p 0x10000 examples/environment/ env.bin @endcode
@code # ./scripts/bareboxenv -s -p 0x10000 examples/environment/ env.bin @endcode
To get some files to play with you can generate a cramfs image:
@code # mkcramfs somedir/ cramfs.bin @endcode
The U-Boot image is a normal Linux executable, so it can be started
The barebox image is a normal Linux executable, so it can be started
just like every other program:
@code
# ./uboot -e env.bin -i cramfs.bin
# ./barebox -e env.bin -i cramfs.bin
U-Boot 2.0.0-trunk (Jun 26 2007 - 22:34:38)
barebox 2.0.0-trunk (Jun 26 2007 - 22:34:38)
loading environment from /dev/env0
uboot\> /
barebox\> /
@endcode
Specifying -[ie] \<file\> tells U-Boot to map the file as a device
Specifying -[ie] \<file\> tells barebox to map the file as a device
under /dev. Files given with '-e' will appear as /dev/env[n]. Files
given with '-i' will appear as /dev/fd[n].
If U-Boot finds a valid configuration sector on /dev/env0 it will
If barebox finds a valid configuration sector on /dev/env0 it will
load it to /env. It then executes /env/init if it exists. If you have
loaded the example environment U-Boot will show you a menu asking for
loaded the example environment barebox will show you a menu asking for
your settings.
If you have started U-Boot as root you will find a new tap device on your
host which you can configure using ifconfig. Once you configured U-Boots
If you have started barebox as root you will find a new tap device on your
host which you can configure using ifconfig. Once you configured bareboxs
network settings accordingly you can do a ping or tftpboot.
If you have mapped a cramfs image try mounting it with
@ -160,7 +160,7 @@ If you have mapped a cramfs image try mounting it with
Memory can be examined as usual using md/mw commands. They both understand
the -f \<file\> option to tell the commands that they should work on the
specified files instead of /dev/mem which holds the complete address space.
Note that if you call 'md /dev/fd0' (without -f) U-Boot will segfault on
Note that if you call 'md /dev/fd0' (without -f) barebox will segfault on
the host, because it will interpret /dev/fd0 as a number.
@par Directory layout
@ -195,7 +195,7 @@ scripts / -> Kconfig system
Documentation / ->
@endverbatim
@section license U-Boot's License
@section license barebox's License
@verbatim
This program is free software; you can redistribute it and/or

View File

@ -1,6 +1,6 @@
/** @page supported_boards Supported Boards
This is a list of boards that are currently supported by U-Boot-v2.
This is a list of boards that are currently supported by barebox.
PowerPC type:

View File

@ -1,6 +1,6 @@
-------------- U-Boot consoles ------------------
-------------- barebox consoles ------------------
U-Boot supports multiple consoles which may be simultaneously active.
barebox supports multiple consoles which may be simultaneously active.
Depending on the configuration none, the first or all consoles are
activated on startup, see CONSOLE_ACTIVATE_FIRST and CONSOLE_ACTIVATE_ALL
options.

View File

@ -1,23 +1,23 @@
/** @page developers_manual Developer's Manual
This part of the documentation is intended for developers of U-Boot-v2.
This part of the documentation is intended for developers of barebox.
@section devel_backgrounds Some background knowledge for some frameworks U-Boot-v2
@section devel_backgrounds Some background knowledge for some frameworks barebox
@li @subpage driver_model
@li @subpage dev_params
@section devel_hints Hints and tips for simply adapting U-Boot-v2
@section devel_hints Hints and tips for simply adapting barebox
@li @subpage dev_architecture
@li @subpage dev_cpu
@li @subpage dev_board
@section devel_themes Various themes about U-Boot-v2
@section devel_themes Various themes about barebox
@li @subpage how_mount_works
@li @subpage boot_preparation
@li @subpage uboot_simul
@li @subpage barebox_simul
@li @subpage io_access_functions
@li @subpage mcfv4e_MCDlib

View File

@ -1,5 +1,5 @@
---------- Devices and drivers in U-Boot --------------
---------- Devices and drivers in barebox --------------
We follow a rather simplistic driver model here. There is a struct device which
describes a particular device present in the system. A struct driver represents

View File

@ -6,7 +6,7 @@ than listed here. But these files are the main control files:
- Documentation
- Documentation/Doxyfile
- Documentation/uboot-main.dox
- Documentation/barebox-main.dox
- Documentation/users_manual.dox
- Documentation/commands.dox
- Documentation/developers_manual.dox

View File

@ -1,5 +1,5 @@
When porting from old U-Boot the follwing steps must be taken (please complain
When porting from old barebox the follwing steps must be taken (please complain
if there's something missing here ;)
@ -9,24 +9,24 @@ if there's something missing here ;)
configured with the Kconfig system feel free to add them there.
- The linker script needs a new section for the initcalls. The handling of the
U-Boot command table has changed, too. (The commands are now sorted by the
barebox command table has changed, too. (The commands are now sorted by the
linker instead at runtime.) To change it you need an entry like the following
in your linker script:
#include <asm-generic/u-boot.lds.h>
#include <asm-generic/barebox.lds.h>
__u_boot_cmd_start = .;
.u_boot_cmd : { U_BOOT_CMDS }
__u_boot_cmd_end = .;
__barebox_cmd_start = .;
.barebox_cmd : { BAREBOX_CMDS }
__barebox_cmd_end = .;
__u_boot_initcalls_start = .;
.u_boot_initcalls : { INITCALLS }
__u_boot_initcalls_end = .;
__barebox_initcalls_start = .;
.barebox_initcalls : { INITCALLS }
__barebox_initcalls_end = .;
- Rename your linker script to u-boot.lds.S and add the following entry to the
- Rename your linker script to barebox.lds.S and add the following entry to the
Makefile to make sure the linker script is generated:
extra-y += u-boot.lds
extra-y += barebox.lds
- Register the devices present in your system in the board specific .c file.
To see anything you have to at least register a console. In scb9328.c this
@ -72,7 +72,7 @@ extra-y += u-boot.lds
set_mac_address() set the MAC address in the device. All magic previously
done with getenv/setenv(ethaddr) must be removed.
During startup U-Boot calls get_mac_address() to see if an EEPROM is
During startup barebox calls get_mac_address() to see if an EEPROM is
connected. If so, it calls set_mac_address() with this address. This
is done even if networking is not used during startup. This makes sure
that the MAC address is set in the device and Linux can pick it up later.
@ -91,8 +91,8 @@ extra-y += u-boot.lds
- Adjust start.S. On PowerPC there is at least the Problem that the relocation
offset is defined at compile time. It is easily possible to determine the
address U-Boot is currently starting from at runtime and thus allowing it
U-Boot to be started at any address. Look at the relocation code and replace
address barebox is currently starting from at runtime and thus allowing it
barebox to be started at any address. Look at the relocation code and replace
TEXT_BASE with the following calculation of the runtime address:
bl calc_source /* Calculate Source Address */
@ -105,7 +105,7 @@ calc_source:
fortunately I know next to nothing of PowerPC assembler, so if you have
a better way to archieve this, please write to the list.)
On PowerPC U-Boot now runs at the address it was linked to, so you have
On PowerPC barebox now runs at the address it was linked to, so you have
to adjust TEXT_BASE to be in RAM. This makes the various fixup relocation
functions unnecessary. On PowerPC the removal of -fPIC saves around 10% of
binary space. It also simplifies debugging because you will see the correct

View File

@ -1,6 +1,6 @@
------------ U-Boot timekeeping -------------
------------ barebox timekeeping -------------
In U-Boot we use the clocksource mechanism from the Linux Kernel. This makes
In barebox we use the clocksource mechanism from the Linux Kernel. This makes
it fairly easy to add timer functionality for a new board or architecture.
Apart from initialization there is only one function required:
clocksource_read(). This function returns the current value of a free running

View File

@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = U-Boot
PROJECT_NAME = barebox
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or

View File

@ -1,10 +1,10 @@
#########################################################################
# #
# Regular Maintainers for U-Boot board support: #
# Regular Maintainers for barebox board support: #
# #
# For any board without permanent maintainer, please contact #
# Wolfgang Denk <wd@denx.de> #
# and Cc: the <U-Boot-Users@lists.sourceforge.net> mailing lists. #
# and Cc: the <barebox-Users@lists.sourceforge.net> mailing lists. #
# #
# Note: lists sorted by Maintainer Name #
#########################################################################

172
Makefile
View File

@ -23,7 +23,7 @@ MAKEFLAGS += -rR --no-print-directory
# their own directory. If in some directory we have a dependency on
# a file in another dir (which doesn't happen often, but it's often
# unavoidable when linking the built-in.o targets which finally
# turn into uboot), we will call a sub make in that other dir, and
# turn into barebox), we will call a sub make in that other dir, and
# after that we are sure that everything which is in that other dir
# is now up to date.
#
@ -292,13 +292,13 @@ LINUXINCLUDE := -Iinclude \
-I$(objtree)/arch/$(ARCH)/include \
-include include/linux/autoconf.h
CPPFLAGS := -D__KERNEL__ -D__U_BOOT__ $(LINUXINCLUDE) -fno-builtin -ffreestanding
CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -Os -pipe
AFLAGS := -D__ASSEMBLY__
LDFLAGS := -Map uboot.map
LDFLAGS := -Map barebox.map
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
@ -395,7 +395,7 @@ config %config: scripts_basic outputmakefile FORCE
else
# ===========================================================================
# Build targets only - this includes uboot, arch specific targets, clean
# Build targets only - this includes barebox, arch specific targets, clean
# targets and others. In general all targets except *config targets.
# Additional helpers built in scripts/
@ -405,7 +405,7 @@ PHONY += scripts
scripts: scripts_basic include/config/auto.conf
$(Q)$(MAKE) $(build)=$(@)
# Objects we will link into uboot / subdirs we need to visit
# Objects we will link into barebox / subdirs we need to visit
common-y := common/ drivers/ commands/ lib/ net/ fs/
ifeq ($(dot-config),1)
@ -434,8 +434,8 @@ endif # $(dot-config)
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel
# Defaults uboot but it is usually overridden in the arch makefile
all: uboot.bin
# Defaults barebox but it is usually overridden in the arch makefile
all: barebox.bin
include $(srctree)/arch/$(ARCH)/Makefile
@ -461,58 +461,58 @@ CFLAGS += $(call cc-option,-Wno-pointer-sign,)
# set in the environment
# Also any assignments in arch/$(ARCH)/Makefile take precedence over
# this default value
export KBUILD_IMAGE ?= uboot
export KBUILD_IMAGE ?= barebox
uboot-dirs := $(patsubst %/,%,$(filter %/, $(common-y)))
barebox-dirs := $(patsubst %/,%,$(filter %/, $(common-y)))
uboot-alldirs := $(sort $(uboot-dirs) $(patsubst %/,%,$(filter %/, \
barebox-alldirs := $(sort $(barebox-dirs) $(patsubst %/,%,$(filter %/, \
$(common-n) $(common-) \
$(core-n) $(core-) $(drivers-n) $(drivers-) \
$(net-n) $(net-) $(libs-n) $(libs-))))
common-y := $(patsubst %/, %/built-in.o, $(common-y))
# Build uboot
# Build barebox
# ---------------------------------------------------------------------------
# uboot is built from the objects selected by $(uboot-init) and
# $(uboot-main). Most are built-in.o files from top-level directories
# barebox is built from the objects selected by $(barebox-init) and
# $(barebox-main). Most are built-in.o files from top-level directories
# in the kernel tree, others are specified in arch/$(ARCH)Makefile.
# Ordering when linking is important, and $(uboot-init) must be first.
# Ordering when linking is important, and $(barebox-init) must be first.
#
# FIXME: This picture is wrong for U-Boot. We have no init, driver, mm
# FIXME: This picture is wrong for barebox. We have no init, driver, mm
#
# uboot
# barebox
# ^
# |
# +-< $(uboot-init)
# +-< $(barebox-init)
# | +--< init/version.o + more
# |
# +--< $(uboot-main)
# +--< $(barebox-main)
# | +--< driver/built-in.o mm/built-in.o + more
# |
# +-< kallsyms.o (see description in CONFIG_KALLSYMS section)
#
# uboot version cannot be updated during normal
# barebox version cannot be updated during normal
# descending-into-subdirs phase since we do not yet know if we need to
# update uboot.
# update barebox.
#
# System.map is generated to document addresses of all kernel symbols
uboot-common := $(common-y)
uboot-all := $(uboot-common)
uboot-lds := $(lds-y)
barebox-common := $(common-y)
barebox-all := $(barebox-common)
barebox-lds := $(lds-y)
# Rule to link uboot
# Rule to link barebox
# May be overridden by arch/$(ARCH)/Makefile
quiet_cmd_uboot__ ?= LD $@
cmd_uboot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_uboot) -o $@ \
-T $(uboot-lds) $(uboot-head) \
--start-group $(uboot-common) --end-group \
$(filter-out $(uboot-lds) $(uboot-common) FORCE ,$^)
quiet_cmd_barebox__ ?= LD $@
cmd_barebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \
-T $(barebox-lds) $(barebox-head) \
--start-group $(barebox-common) --end-group \
$(filter-out $(barebox-lds) $(barebox-common) FORCE ,$^)
# Generate new uboot version
quiet_cmd_uboot_version = GEN .version
cmd_uboot_version = set -e; \
# Generate new barebox version
quiet_cmd_barebox_version = GEN .version
cmd_barebox_version = set -e; \
if [ ! -r .version ]; then \
rm -f .version; \
echo 1 >.version; \
@ -526,16 +526,16 @@ quiet_cmd_uboot_version = GEN .version
quiet_cmd_sysmap = SYSMAP
cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
# Link of uboot
# Link of barebox
# Generate System.map and verify that the content is consistent
# Use + in front of the uboot_version rule to silent warning with make -j2
# Use + in front of the barebox_version rule to silent warning with make -j2
# First command is ':' to allow us to use + in front of the rule
define rule_uboot__
define rule_barebox__
:
$(call cmd,uboot__)
$(call cmd,barebox__)
$(Q)echo 'cmd_$@ := $(cmd_uboot__)' > $(@D)/.$(@F).cmd
$(Q)echo 'cmd_$@ := $(cmd_barebox__)' > $(@D)/.$(@F).cmd
$(Q)$(if $($(quiet)cmd_sysmap), \
echo ' $($(quiet)cmd_sysmap) System.map' &&) \
@ -547,20 +547,20 @@ define rule_uboot__
endef
ifdef CONFIG_KALLSYMS
# Generate section listing all symbols and add it into uboot $(kallsyms.o)
# Generate section listing all symbols and add it into barebox $(kallsyms.o)
# It's a three stage process:
# o .tmp_uboot1 has all symbols and sections, but __kallsyms is
# o .tmp_barebox1 has all symbols and sections, but __kallsyms is
# empty
# Running kallsyms on that gives us .tmp_kallsyms1.o with
# the right size - uboot version is updated during this step
# o .tmp_uboot2 now has a __kallsyms section of the right size,
# the right size - barebox version is updated during this step
# o .tmp_barebox2 now has a __kallsyms section of the right size,
# but due to the added section, some addresses have shifted.
# From here, we generate a correct .tmp_kallsyms2.o
# o The correct .tmp_kallsyms2.o is linked into the final uboot.
# o Verify that the System.map from uboot matches the map from
# .tmp_uboot2, just in case we did not generate kallsyms correctly.
# o The correct .tmp_kallsyms2.o is linked into the final barebox.
# o Verify that the System.map from barebox matches the map from
# .tmp_barebox2, just in case we did not generate kallsyms correctly.
# o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using
# .tmp_uboot3 and .tmp_kallsyms3.o. This is only meant as a
# .tmp_barebox3 and .tmp_kallsyms3.o. This is only meant as a
# temporary bypass to allow the kernel to be built while the
# maintainers work out what went wrong with kallsyms.
@ -575,22 +575,22 @@ kallsyms.o := .tmp_kallsyms$(last_kallsyms).o
define verify_kallsyms
$(Q)$(if $($(quiet)cmd_sysmap), \
echo ' $($(quiet)cmd_sysmap) .tmp_System.map' &&) \
$(cmd_sysmap) .tmp_uboot$(last_kallsyms) .tmp_System.map
$(cmd_sysmap) .tmp_barebox$(last_kallsyms) .tmp_System.map
$(Q)cmp -s System.map .tmp_System.map || \
(echo Inconsistent kallsyms data; \
echo Try setting CONFIG_KALLSYMS_EXTRA_PASS; \
rm .tmp_kallsyms* ; /bin/false )
endef
# Update uboot version before link
# Update barebox version before link
# Use + in front of this rule to silent warning about make -j1
# First command is ':' to allow us to use + in front of this rule
cmd_ksym_ld = $(cmd_uboot__)
cmd_ksym_ld = $(cmd_barebox__)
define rule_ksym_ld
:
+$(call cmd,uboot_version)
$(call cmd,uboot__)
$(Q)echo 'cmd_$@ := $(cmd_uboot__)' > $(@D)/.$(@F).cmd
+$(call cmd,barebox_version)
$(call cmd,barebox__)
$(Q)echo 'cmd_$@ := $(cmd_barebox__)' > $(@D)/.$(@F).cmd
endef
# Generate .S file with all kernel symbols
@ -600,18 +600,18 @@ quiet_cmd_kallsyms = KSYM $@
.tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE
$(call if_changed_dep,as_o_S)
.tmp_kallsyms%.S: .tmp_uboot% $(KALLSYMS)
.tmp_kallsyms%.S: .tmp_barebox% $(KALLSYMS)
$(call cmd,kallsyms)
# .tmp_uboot1 must be complete except kallsyms, so update uboot version
.tmp_uboot1: $(uboot-lds) $(uboot-all) FORCE
# .tmp_barebox1 must be complete except kallsyms, so update barebox version
.tmp_barebox1: $(barebox-lds) $(barebox-all) FORCE
$(call if_changed_rule,ksym_ld)
.tmp_uboot2: $(uboot-lds) $(uboot-all) .tmp_kallsyms1.o FORCE
$(call if_changed,uboot__)
.tmp_barebox2: $(barebox-lds) $(barebox-all) .tmp_kallsyms1.o FORCE
$(call if_changed,barebox__)
.tmp_uboot3: $(uboot-lds) $(uboot-all) .tmp_kallsyms2.o FORCE
$(call if_changed,uboot__)
.tmp_barebox3: $(barebox-lds) $(barebox-all) .tmp_kallsyms2.o FORCE
$(call if_changed,barebox__)
# Needs to visit scripts/ before $(KALLSYMS) can be used.
$(KALLSYMS): scripts ;
@ -619,7 +619,7 @@ $(KALLSYMS): scripts ;
# Generate some data for debugging strange kallsyms problems
debug_kallsyms: .tmp_map$(last_kallsyms)
.tmp_map%: .tmp_uboot% FORCE
.tmp_map%: .tmp_barebox% FORCE
($(OBJDUMP) -h $< | $(AWK) '/^ +[0-9]/{print $$4 " 0 " $$2}'; $(NM) $<) | sort > $@
.tmp_map3: .tmp_map2
@ -630,39 +630,39 @@ endif # ifdef CONFIG_KALLSYMS
# Do modpost on a prelinked vmlinux. The finally linked vmlinux has
# relevant sections renamed as per the linker script.
quiet_cmd_uboot-modpost = LD $@
cmd_uboot-modpost = $(LD) $(LDFLAGS) -r -o $@ \
$(vmlinux-init) --start-group $(uboot-main) --end-group \
$(filter-out $(uboot-init) $(uboot-main) $(uboot-lds) FORCE ,$^)
define rule_uboot-modpost
quiet_cmd_barebox-modpost = LD $@
cmd_barebox-modpost = $(LD) $(LDFLAGS) -r -o $@ \
$(vmlinux-init) --start-group $(barebox-main) --end-group \
$(filter-out $(barebox-init) $(barebox-main) $(barebox-lds) FORCE ,$^)
define rule_barebox-modpost
:
+$(call cmd,uboot-modpost)
+$(call cmd,barebox-modpost)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
$(Q)echo 'cmd_$@ := $(cmd_uboot-modpost)' > $(dot-target).cmd
$(Q)echo 'cmd_$@ := $(cmd_barebox-modpost)' > $(dot-target).cmd
endef
uboot.bin: uboot
$(Q)$(OBJCOPY) -O binary uboot uboot.bin
$(Q)$(OBJDUMP) -d uboot > uboot.S
barebox.bin: barebox
$(Q)$(OBJCOPY) -O binary barebox barebox.bin
$(Q)$(OBJDUMP) -d barebox > barebox.S
# uboot image
uboot: $(uboot-lds) $(uboot-head) $(uboot-common) $(kallsyms.o) FORCE
$(call uboot-modpost)
$(call if_changed_rule,uboot__)
# barebox image
barebox: $(barebox-lds) $(barebox-head) $(barebox-common) $(kallsyms.o) FORCE
$(call barebox-modpost)
$(call if_changed_rule,barebox__)
$(Q)rm -f .old_version
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(uboot-head) $(uboot-common) ) $(uboot-lds): $(uboot-dirs) ;
$(sort $(barebox-head) $(barebox-common) ) $(barebox-lds): $(barebox-dirs) ;
# Handle descending into subdirectories listed in $(uboot-dirs)
# Handle descending into subdirectories listed in $(barebox-dirs)
# Preset locale variables to speed up the build process. Limit locale
# tweaks to this spot to avoid wrong language settings when running
# make menuconfig etc.
# Error messages still appears in the original language
PHONY += $(uboot-dirs)
$(uboot-dirs): prepare scripts
PHONY += $(barebox-dirs)
$(barebox-dirs): prepare scripts
$(Q)$(MAKE) $(build)=$@
# Build the kernel release string
@ -754,7 +754,7 @@ ifneq ($(KBUILD_SRC),)
/bin/false; \
fi;
$(Q)if [ ! -d include2 ]; then mkdir -p include2; fi;
$(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/u-boot.h ]; then \
$(Q)if [ -e $(srctree)/include/asm-$(SRCARCH)/barebox.h ]; then \
ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \
fi
endif
@ -778,10 +778,10 @@ prepare0: archprepare FORCE
# All the preparing..
prepare prepare-all: prepare0
# Leave this as default for preprocessing uboot.lds.S, which is now
# Leave this as default for preprocessing barebox.lds.S, which is now
# done in arch/$(ARCH)/kernel/Makefile
export CPPFLAGS_uboot.lds += -P -C -U$(ARCH)
export CPPFLAGS_barebox.lds += -P -C -U$(ARCH)
# FIXME: The asm symlink changes when $(ARCH) changes. That's
# hard to detect, but I suppose "make mrproper" is a good idea
@ -869,7 +869,7 @@ all: modules
# Build modules
PHONY += modules
modules: $(uboot-dirs) $(if $(KBUILD_BUILTIN),uboot)
modules: $(barebox-dirs) $(if $(KBUILD_BUILTIN),barebox)
@echo ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@ -937,9 +937,9 @@ endif # CONFIG_MODULES
# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
CLEAN_FILES += uboot System.map include/uboot_default_env.h \
.tmp_version .tmp_uboot* uboot.bin uboot.S \
.tmp_kallsyms* uboot_default_env
CLEAN_FILES += barebox System.map include/barebox_default_env.h \
.tmp_version .tmp_barebox* barebox.bin barebox.S \
.tmp_kallsyms* barebox_default_env
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2 usr/include
@ -952,7 +952,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \
#
clean: rm-dirs := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
clean-dirs := $(addprefix _clean_,$(srctree) $(uboot-alldirs))
clean-dirs := $(addprefix _clean_,$(srctree) $(barebox-alldirs))
PHONY += $(clean-dirs) clean archclean
$(clean-dirs):
@ -1025,7 +1025,7 @@ help:
@echo ''
@echo 'Other generic targets:'
@echo ' all - Build all targets marked with [*]'
@echo '* uboot - Build the bare kernel'
@echo '* barebox - Build the bare kernel'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[ois] - Build specified target only'
@echo ' dir/file.ko - Build module including final link'

58
README
View File

@ -1,8 +1,8 @@
U2Boot
barebox
------
This is u2boot, our proposal for a next generation of the famous U-Boot
bootloader. U-Boot offers an excellent choice as a bootloader for
This is barebox, our proposal for a next generation of the famous barebox
bootloader. barebox offers an excellent choice as a bootloader for
today's embedded systems, seen from a user's point of view.
Nevertheless, there are quite some design flaws which turned out over
the last years and we think that they cannot be solved in a production
@ -12,7 +12,7 @@ about losing support for old boards.
General features include:
- A posix based file API
inside U-Boot the usual open/close/read/write/lseek functions are used.
inside barebox the usual open/close/read/write/lseek functions are used.
This makes it familiar to everyone who has programmed under unix systems.
- usual shell commands like ls/cd/mkdir/echo/cat,...
@ -46,12 +46,12 @@ General features include:
the code.
- simulation target
U-Boot can be compiled to run under Linux. While this is rather useless
barebox can be compiled to run under Linux. While this is rather useless
in real world this is a great debugging and development aid. New features
can be easily developped and tested on long train journeys and started
under gdb. There is a console driver for linux which emulates a serial
device and a tap based ethernet driver. Linux files can be mapped to
devices under U-Boot to emulate storage devices.
devices under barebox to emulate storage devices.
- device parameter support
Each device can have a unlimited number of parameters. They can be accessed
@ -64,7 +64,7 @@ General features include:
- getopt
There is a small getopt implementation. Some commands got really
complicated (both in code and in usage) due to the fact that U-Boot only
complicated (both in code and in usage) due to the fact that barebox only
allowed positional parameters.
- editor
@ -72,16 +72,16 @@ General features include:
except the ones really needed: moving the cursor and typing characters.
Building U-Boot
Building barebox
---------------
U-Boot uses the Linux kernel's build system. It consists of two parts:
barebox uses the Linux kernel's build system. It consists of two parts:
the makefile infrastructure (kbuild), plus a configuration system
(kconfig). So building U-Boot is very similar to building the Linux
(kconfig). So building barebox is very similar to building the Linux
kernel.
For the examples below, we use the User Mode U-Boot implementation, which
is a port of U-Boot to the Linux userspace. This makes it possible to
For the examples below, we use the User Mode barebox implementation, which
is a port of barebox to the Linux userspace. This makes it possible to
test drive the code without having real hardware. So for this test
scenario, ARCH=sandbox is the valid architecture selection. This currently
only works on ia32 hosts and partly on x86-64.
@ -89,7 +89,7 @@ only works on ia32 hosts and partly on x86-64.
Selection of the architecture and the cross compiler can be done by using
the environment variables ARCH and CROSS_COMPILE.
In order to configure the various aspects of U-Boot, start the U-Boot
In order to configure the various aspects of barebox, start the barebox
configuration system:
# make menuconfig
@ -100,44 +100,44 @@ finished (you can simulate this by using the standard demo config file
with 'make sandbox_defconfig'), there is a .config file in the toplevel
directory of the sourcode.
Once U-Boot is configured, we can start the compilation
Once barebox is configured, we can start the compilation
# make
If everything goes well, the result is a file called uboot:
If everything goes well, the result is a file called barebox:
# ls -l uboot
-rwxr-xr-x 1 rsc ptx 114073 Jun 26 22:34 uboot
# ls -l barebox
-rwxr-xr-x 1 rsc ptx 114073 Jun 26 22:34 barebox
U-Boot usually needs an environment for storing the configuation data.
barebox usually needs an environment for storing the configuation data.
You can generate an environment using the example environment contained
in examples/environment:
# ./scripts/ubootenv -s -p 0x10000 examples/environment/ env.bin
# ./scripts/bareboxenv -s -p 0x10000 examples/environment/ env.bin
To get some files to play with you can generate a cramfs image:
# mkcramfs somedir/ cramfs.bin
The U-Boot image is a normal Linux executable, so it can be started
The barebox image is a normal Linux executable, so it can be started
just like every other program:
# ./uboot -e env.bin -i cramfs.bin
# ./barebox -e env.bin -i cramfs.bin
U-Boot 2.0.0-trunk (Jun 26 2007 - 22:34:38)
barebox 2.0.0-trunk (Jun 26 2007 - 22:34:38)
loading environment from /dev/env0
uboot> /
barebox> /
Specifying -[ie] <file> tells U-Boot to map the file as a device
Specifying -[ie] <file> tells barebox to map the file as a device
under /dev. Files given with '-e' will appear as /dev/env[n]. Files
given with '-i' will appear as /dev/fd[n].
If U-Boot finds a valid configuration sector on /dev/env0 it will
If barebox finds a valid configuration sector on /dev/env0 it will
load it to /env. It then executes /env/init if it exists. If you have
loaded the example environment U-Boot will show you a menu asking for
loaded the example environment barebox will show you a menu asking for
your settings.
If you have started U-Boot as root you will find a new tap device on your
host which you can configure using ifconfig. Once you configured U-Boots
If you have started barebox as root you will find a new tap device on your
host which you can configure using ifconfig. Once you configured bareboxs
network settings accordingly you can do a ping or tftpboot.
If you have mapped a cramfs image try mounting it with
@ -148,7 +148,7 @@ If you have mapped a cramfs image try mounting it with
Memory can be examined as usual using md/mw commands. They both understand
the -f <file> option to tell the commands that they should work on the
specified files instead of /dev/mem which holds the complete address space.
Note that if you call 'md /dev/fd0' (without -f) U-Boot will segfault on
Note that if you call 'md /dev/fd0' (without -f) barebox will segfault on
the host, because it will interpret /dev/fd0 as a number.
Directory layout

12
TODO
View File

@ -16,10 +16,10 @@ TODO
Run-up and run-down should be reentrant, so if bootm is failing the system
can re-initialize devices. csc 21.03.2008 19:48:49)
[ ] Clean up make system. Currently I think there are many things from the
Linux make system which are not needed for U-Boot.
Linux make system which are not needed for barebox.
(Please retain definitions and related for module loading and relocation, so
that special U-Boot modules containing an ELF object can be linked to the
running U-Boot. csc 21.03.2008 19:52:49)
that special barebox modules containing an ELF object can be linked to the
running barebox. csc 21.03.2008 19:52:49)
[ ] get/set for nonextisting parameters crashes
[ ] There is a xmalloc function which panics when out of memory. Use this
function where we don't want to check for oom. Same applies to
@ -69,7 +69,7 @@ TODO
preprocessor.
The #ifdefs should be located in their related header files only.
[ ] Create an example board, which implements all functions stubs required
to compile a full U-Boot build. Functions are just stubs containing a
to compile a full barebox build. Functions are just stubs containing a
panic() call - Real code must be filled in accordingly.
Can be copied as starting point for a new target board.
[ ] Add generic PCI bios code and a PCI bus driver model. The driver should
@ -81,14 +81,14 @@ TODO
DONE
----
[x] Rename vmlinux -> u-boot
[x] Rename vmlinux -> barebox
[x] Implement current work directory
[x] ARCH=linux should catch ctrl-c
[x] Implement 'rm'
[x] the mount command currently does not accept a full path (i.e. /dev/nor0) but
only a device id string (nor0). This sucks.
[x] FS support is not optional eventhough the Kconfig system claims it.
[x] U-Boot used to have support for different consoles. The old code was huge and
[x] barebox used to have support for different consoles. The old code was huge and
ineffective, so I removed it. Reimplement it using the driver model.
[x] Mount without options should show mounted filesystems
[x] Add/fix help texts for commands

View File

@ -5,7 +5,7 @@
Never include an object file by name directly! Linker Script Files defines the
layout, not the content. Content is defined in objecfiles instead.
Don't rely on the given object file order to create your binary U-Boot v2! This
Don't rely on the given object file order to create your binary barebox v2! This
may work, but is not relyable in all cases (and its a very bad style)!
For the special case some layout contraints exists, use specific section
@ -19,11 +19,11 @@ For example the ARM architecture starts its reset code at address 0x0000000,
the x86 architecture at 0x000FFFF0, PowerPC at 0x00000100 or 0xFFFFF100.
So for the special reset code on all architectures it must be located at
architecture specific locations within the binary U-Boot image.
architecture specific locations within the binary barebox image.
All reset code uses section ".text_entry" for its localisation within the
binary U-Boot image. Its up to the linker script file to use this section name
to find the right place in whatever environment and U-Boot sizes.
binary barebox image. Its up to the linker script file to use this section name
to find the right place in whatever environment and barebox sizes.
@code
.section ".text_entry","ax"
@ -45,7 +45,7 @@ Features required for every CPU:
@section time_keeping Time keeping
In U-Boot-v2 we are using the clocksource mechanism from the Linux Kernel.
In barebox we are using the clocksource mechanism from the Linux Kernel.
This makes it fairly easy to add timer functionality for a new board or
architecture.
@ -78,7 +78,7 @@ the Linux Kernel can be used nearly 1:1, except for the register accesses.
Note: For clocksources the __lshrdi3 symbol is needed. You can find the
function for your architecture in the Linux Kernel or a libc of your choice.
Note: U-Boot-v2 expects an upward counting counter!
Note: barebox expects an upward counting counter!
@section reset_function Reset function

View File

@ -57,9 +57,9 @@ source arch/arm/mach-omap/Kconfig
source arch/arm/mach-s3c24xx/Kconfig
config AEABI
bool "Use the ARM EABI to compile u-boot"
bool "Use the ARM EABI to compile barebox"
help
This option allows for u-boot to be compiled using the latest
This option allows for barebox to be compiled using the latest
ARM ABI (aka EABI).
To use this you need GCC version 4.0.0 or later.

View File

@ -82,11 +82,11 @@ CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
ifndef CONFIG_MODULES
# Add cleanup flags
CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS_uboot += -static --gc-sections
LDFLAGS_barebox += -static --gc-sections
endif
uboot.netx: uboot.bin
$(Q)scripts/gen_netx_image -i uboot.bin -o uboot.netx \
barebox.netx: barebox.bin
$(Q)scripts/gen_netx_image -i barebox.bin -o barebox.netx \
--sdramctrl=$(CONFIG_NETX_SDRAM_CTRL) \
--sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL) \
--memctrl=$(CONFIG_NETX_MEM_CTRL) \
@ -94,7 +94,7 @@ uboot.netx: uboot.bin
--cookie=$(CONFIG_NETX_COOKIE);
ifeq ($(machine-y),netx)
KBUILD_IMAGE := uboot.netx
KBUILD_IMAGE := barebox.netx
endif
all: $(KBUILD_IMAGE)
@ -120,7 +120,7 @@ endif
common-y += $(BOARD) $(MACH)
common-y += arch/arm/lib/ arch/arm/cpu/
lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/arm/lib/u-boot.lds
lds-$(CONFIG_BOARD_LINKER_SCRIPT) := $(BOARD)/u-boot.lds
lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/arm/lib/barebox.lds
lds-$(CONFIG_BOARD_LINKER_SCRIPT) := $(BOARD)/barebox.lds
CLEAN_FILES += arch/arm/include/asm/mach-types.h arch/arm/lib/u-boot.lds
CLEAN_FILES += arch/arm/include/asm/mach-types.h arch/arm/lib/barebox.lds

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc9
# barebox version: 2.0.0-rc9
# Wed Jul 1 14:15:55 2009
#
CONFIG_ARCH_TEXT_BASE=0x31fc0000
@ -75,7 +75,7 @@ CONFIG_EXPERIMENTAL=y
# CONFIG_KALLSYMS is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=38400
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc9
# barebox version: 2.0.0-rc9
# Wed Jul 1 14:23:41 2009
#
CONFIG_ARCH_TEXT_BASE=0x31fc0000
@ -75,7 +75,7 @@ CONFIG_EXPERIMENTAL=y
# CONFIG_KALLSYMS is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=38400
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Tue Oct 21 18:24:32 2008
#
CONFIG_ARCH_TEXT_BASE=0x23f00000
@ -51,7 +51,7 @@ CONFIG_STACK_SIZE=0x8000
CONFIG_MALLOC_SIZE=0x400000
# CONFIG_BROKEN is not set
# CONFIG_EXPERIMENTAL is not set
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc10
# barebox version: 2.0.0-rc10
# Sat Sep 26 18:45:28 2009
#
CONFIG_ARCH_TEXT_BASE=0x23f00000

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc10
# barebox version: 2.0.0-rc10
# Thu Oct 22 16:38:29 2009
#
CONFIG_ARCH_TEXT_BASE=0xa0000000
@ -84,7 +84,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc8
# barebox version: 2.0.0-rc8
# Wed Apr 8 13:06:07 2009
#
CONFIG_ARCH_TEXT_BASE=0x87f00000
@ -67,7 +67,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
# CONFIG_LONGHELP is not set
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc7
# barebox version: 2.0.0-rc7
# Mon Feb 2 16:43:49 2009
#
CONFIG_ARCH_TEXT_BASE=0x87f00000
@ -64,7 +64,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc8
# barebox version: 2.0.0-rc8
# Tue May 19 09:44:44 2009
#
CONFIG_ARCH_TEXT_BASE=0x23f00000
@ -67,7 +67,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc8
# barebox version: 2.0.0-rc8
# Tue Apr 28 08:40:15 2009
#
CONFIG_ARCH_TEXT_BASE=0xc0000000
@ -67,7 +67,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Thu Aug 21 16:59:40 2008
#
CONFIG_ARCH_TEXT_BASE=0xa0000000
@ -53,7 +53,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Thu Jul 3 09:34:20 2008
#
CONFIG_ARCH_TEXT_BASE=0x81f00000
@ -55,7 +55,7 @@ CONFIG_BROKEN=y
# CONFIG_KALLSYMS is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Wed Jun 4 13:18:29 2008
#
CONFIG_ARCH_TEXT_BASE=0x80e80000

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Tue Jun 24 02:22:41 2008
#
CONFIG_ARCH_TEXT_BASE=0x80e80000

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc9
# barebox version: 2.0.0-rc9
#
CONFIG_ARCH_TEXT_BASE=0xa7f00000
CONFIG_BOARDINFO="Phytec phyCard-i.MX27"
@ -68,7 +68,7 @@ CONFIG_MALLOC_SIZE=0x500000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Thu Jul 3 09:29:45 2008
#
CONFIG_ARCH_TEXT_BASE=0x87f00000
@ -48,7 +48,7 @@ CONFIG_STACK_SIZE=0x8000
CONFIG_MALLOC_SIZE=0x400000
# CONFIG_BROKEN is not set
# CONFIG_EXPERIMENTAL is not set
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc10
# barebox version: 2.0.0-rc10
# Wed Dec 9 17:03:10 2009
#
# CONFIG_BOARD_LINKER_SCRIPT is not set
@ -91,7 +91,7 @@ CONFIG_MALLOC_SIZE=0x1000000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc8
# barebox version: 2.0.0-rc8
# Fri Apr 17 13:27:24 2009
#
CONFIG_ARCH_TEXT_BASE=0x87f00000
@ -67,7 +67,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Tue Aug 26 09:41:29 2008
#
CONFIG_ARCH_TEXT_BASE=0x23f00000
@ -52,7 +52,7 @@ CONFIG_MALLOC_SIZE=0x400000
# CONFIG_EXPERIMENTAL is not set
CONFIG_MACH_HAS_LOWLEVEL_INIT=y
CONFIG_MACH_DO_LOWLEVEL_INIT=y
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_LONGHELP=y
CONFIG_CBSIZE=1024

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-git
# barebox version: 2.0.0-git
# Fri Oct 19 11:00:09 2007
#
CONFIG_ARCH_TEXT_BASE=0x08f80000
@ -34,7 +34,7 @@ CONFIG_HAS_MODULES=y
CONFIG_TEXT_BASE=0x08f80000
# CONFIG_BROKEN is not set
# CONFIG_EXPERIMENTAL is not set
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_CMDLINE_EDITING=y
# CONFIG_AUTO_COMPLETE is not set

View File

@ -135,14 +135,14 @@ int icache_status (void)
* Prepare a "clean" CPU for Linux to run
* @return 0 (always)
*
* This function is called by the generic U-Boot part just before we call
* This function is called by the generic barebox part just before we call
* Linux. It prepares the processor for Linux.
*/
int cleanup_before_linux (void)
{
int i;
shutdown_uboot();
shutdown_barebox();
#ifdef CONFIG_MMU
mmu_disable();
@ -158,7 +158,7 @@ int cleanup_before_linux (void)
*
* For ARM we never enable data cache so we do not need to disable it again.
* Linux can be called with instruction cache enabled. As this is the
* default setting we are running in U-Boot, there's no special preparation
* default setting we are running in barebox, there's no special preparation
* required.
*/
@ -180,8 +180,8 @@ static int do_icache(cmd_tbl_t *cmdtp, int argc, char *argv[])
static const __maybe_unused char cmd_icache_help[] =
"Usage: icache [0|1]\n";
U_BOOT_CMD_START(icache)
BAREBOX_CMD_START(icache)
.cmd = do_icache,
.usage = "show/change icache status",
U_BOOT_CMD_HELP(cmd_icache_help)
U_BOOT_CMD_END
BAREBOX_CMD_HELP(cmd_icache_help)
BAREBOX_CMD_END

View File

@ -129,8 +129,8 @@ static int do_cpuinfo(cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
U_BOOT_CMD_START(cpuinfo)
BAREBOX_CMD_START(cpuinfo)
.cmd = do_cpuinfo,
.usage = "Show info about CPU",
U_BOOT_CMD_END
BAREBOX_CMD_END

View File

@ -83,8 +83,8 @@ _fiq: .word fiq
/*
* These are defined in the board-specific linker script.
*/
.globl _u_boot_start
_u_boot_start:
.globl _barebox_start
_barebox_start:
.word _start
.globl _bss_start
@ -210,13 +210,13 @@ finished_inval:
bl board_init_lowlevel
#endif
relocate: /* relocate U-Boot to RAM */
relocate: /* relocate barebox to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
cmp r0, r1 /* don't reloc during debug */
beq stack_setup
ldr r2, _u_boot_start
ldr r2, _barebox_start
ldr r3, _bss_start
sub r2, r3, r2 /* r2 <- size of armboot */
add r2, r0, r2 /* r2 <- source end address */
@ -246,4 +246,4 @@ clbss_l:
ldr pc, _start_armboot
_start_armboot:
.word start_uboot
.word start_barebox

View File

@ -26,8 +26,8 @@
* MA 02111-1307 USA
*/
#ifndef _U_BOOT_ARM_H_
#define _U_BOOT_ARM_H_ 1
#ifndef _BAREBOX_ARM_H_
#define _BAREBOX_ARM_H_ 1
/* for the following variables, see start.S */
extern ulong _armboot_start; /* code start */
@ -41,4 +41,4 @@ int cleanup_before_linux(void);
int board_init(void);
int dram_init (void);
#endif /* _U_BOOT_ARM_H_ */
#endif /* _BAREBOX_ARM_H_ */

View File

@ -26,16 +26,16 @@
* MA 02111-1307 USA
*
********************************************************************
* NOTE: This header file defines an interface to U-Boot. Including
* NOTE: This header file defines an interface to barebox. Including
* this (unmodified) header file in another file is considered normal
* use of U-Boot, and does *not* fall under the heading of "derived
* use of barebox, and does *not* fall under the heading of "derived
* work".
********************************************************************
*/
#ifndef _U_BOOT_H_
#define _U_BOOT_H_ 1
#ifndef _BAREBOX_H_
#define _BAREBOX_H_ 1
//typedef struct bd_info {} bd_t;
#endif /* _U_BOOT_H_ */
#endif /* _BAREBOX_H_ */

View File

@ -1 +1 @@
u-boot.lds
barebox.lds

View File

@ -20,5 +20,5 @@ obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS) += memcpy.o
obj-$(CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS) += memset.o
obj-$(CONFIG_MODULES) += module.o
extra-$(CONFIG_GENERIC_LINKER_SCRIPT) += u-boot.lds
extra-$(CONFIG_GENERIC_LINKER_SCRIPT) += barebox.lds

View File

@ -1,7 +1,7 @@
#include <common.h>
#include <init.h>
#include <mem_malloc.h>
#include <asm/u-boot-arm.h>
#include <asm/barebox-arm.h>
#include <asm-generic/memory_layout.h>
#include <reloc.h>

View File

@ -38,7 +38,7 @@
#include <asm/byteorder.h>
#include <asm/global_data.h>
#include <asm/setup.h>
#include <asm/u-boot-arm.h>
#include <asm/barebox-arm.h>
static struct tag *params;
static int armlinux_architecture = 0;
@ -244,7 +244,7 @@ static int do_bootz(cmd_tbl_t *cmdtp, int argc, char *argv[])
void *zimage;
if (argc != 2) {
u_boot_cmd_usage(cmdtp);
barebox_cmd_usage(cmdtp);
return 1;
}
@ -300,11 +300,11 @@ static const __maybe_unused char cmd_bootz_help[] =
"Usage: bootz [FILE]\n"
"Boot a Linux zImage\n";
U_BOOT_CMD_START(bootz)
BAREBOX_CMD_START(bootz)
.cmd = do_bootz,
.usage = "bootz - start a zImage",
U_BOOT_CMD_HELP(cmd_bootz_help)
U_BOOT_CMD_END
BAREBOX_CMD_HELP(cmd_bootz_help)
BAREBOX_CMD_END
#endif /* CONFIG_CMD_BOOTZ */
#ifdef CONFIG_CMD_BOOTU
@ -314,7 +314,7 @@ static int do_bootu(cmd_tbl_t *cmdtp, int argc, char *argv[])
const char *commandline = getenv("bootargs");
if (argc != 2) {
u_boot_cmd_usage(cmdtp);
barebox_cmd_usage(cmdtp);
return 1;
}
@ -334,9 +334,9 @@ static int do_bootu(cmd_tbl_t *cmdtp, int argc, char *argv[])
static const __maybe_unused char cmd_bootu_help[] =
"Usage: bootu <address>\n";
U_BOOT_CMD_START(bootu)
BAREBOX_CMD_START(bootu)
.cmd = do_bootu,
.usage = "bootu - start a raw linux image",
U_BOOT_CMD_HELP(cmd_bootu_help)
U_BOOT_CMD_END
BAREBOX_CMD_HELP(cmd_bootu_help)
BAREBOX_CMD_END
#endif /* CONFIG_CMD_BOOTU */

View File

@ -22,7 +22,7 @@
*
*/
#include <asm-generic/u-boot.lds.h>
#include <asm-generic/barebox.lds.h>
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
@ -55,16 +55,16 @@ SECTIONS
.got : { *(.got*) }
. = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { U_BOOT_CMDS }
__u_boot_cmd_end = .;
__barebox_cmd_start = .;
.barebox_cmd : { BAREBOX_CMDS }
__barebox_cmd_end = .;
__u_boot_initcalls_start = .;
.u_boot_initcalls : { INITCALLS }
__u_boot_initcalls_end = .;
__barebox_initcalls_start = .;
.barebox_initcalls : { INITCALLS }
__barebox_initcalls_end = .;
__usymtab_start = .;
__usymtab : { U_BOOT_SYMS }
__usymtab : { BAREBOX_SYMS }
__usymtab_end = .;
. = ALIGN(4);

View File

@ -1,5 +1,5 @@
/* This document is intended to provide the developer with information
* how to integrate a new CPU (MACH) into this part of the U-Boot tree
* how to integrate a new CPU (MACH) into this part of the barebox tree
*/
/** @page dev_arm_mach ARM based CPU (MACH) into the tree
@ -26,14 +26,14 @@ In the case the boot happens from NAND flash memory, further steps are required.
Most of the known processor devices are reading the first few blocks from the
NAND flash memory into some kind of internal SRAM. This small part must be able
to initialize the SDRAM controller and to read the remaining rest of the
U-Boot-v2 binary from the NAND flash memory prior returning from \<board_init_lowlevel\>.
barebox binary from the NAND flash memory prior returning from \<board_init_lowlevel\>.
When \<board_init_lowlevel\> returns it will be assumed there is now a working
RAM that can be used for all further steps.
Next step is relocation of U-Boot itself (if not already done). It gets copied
to RAM and the last assembler instruction is a jump into start_uboot(). This
target address is the first C instruction in U-Boot. At this point of time:\n
Next step is relocation of barebox itself (if not already done). It gets copied
to RAM and the last assembler instruction is a jump into start_barebox(). This
target address is the first C instruction in barebox. At this point of time:\n
"runtime address == link address".
@section mach_arm_files List of changes

View File

@ -46,9 +46,9 @@ static __maybe_unused char cmd_clko_help[] =
" -s <source> Clock select. See Ref. Manual for valid sources. Use -1\n"
" for disabling clock output\n";
U_BOOT_CMD_START(clko)
BAREBOX_CMD_START(clko)
.cmd = do_clko,
.usage = "Adjust CLKO setting",
U_BOOT_CMD_HELP(cmd_clko_help)
U_BOOT_CMD_END
BAREBOX_CMD_HELP(cmd_clko_help)
BAREBOX_CMD_END

View File

@ -76,8 +76,8 @@ static int do_clocks (cmd_tbl_t *cmdtp, int argc, char *argv[])
return 0;
}
U_BOOT_CMD_START(dump_clocks)
BAREBOX_CMD_START(dump_clocks)
.cmd = do_clocks,
.usage = "show clock frequencies",
U_BOOT_CMD_END
BAREBOX_CMD_END

View File

@ -91,7 +91,7 @@ int loadxc(int xcno) {
memset32((void*)NETX_PA_XPEC(xcno) + XPEC_RAM_START, 0, 0x2000);
memset32((void*)NETX_PA_XMAC(xcno), 0, 0x800);
/* can't use u-boot memcpy here, we need 32bit accesses */
/* can't use barebox memcpy here, we need 32bit accesses */
if(xcno == 0) {
memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_RPU_PROGRAM_START), rpu_eth0, sizeof(rpu_eth0));
memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_TPU_PROGRAM_START), tpu_eth0, sizeof(tpu_eth0));
@ -143,8 +143,8 @@ void reset_cpu(ulong addr)
}
U_BOOT_CMD_START(loadxc)
BAREBOX_CMD_START(loadxc)
.cmd = do_loadxc,
.usage = "load xmac/xpec engine with ethernet firmware",
U_BOOT_CMD_END
BAREBOX_CMD_END

View File

@ -1,10 +1,10 @@
/* This document is intended to provide the developer with information
* how to integrate a new OMAP Architecture into this part of the U-Boot tree
* how to integrate a new OMAP Architecture into this part of the barebox tree
*/
/** @page dev_omap_arch Texas Instrument's OMAP Platforms in U-Boot V2
/** @page dev_omap_arch Texas Instrument's OMAP Platforms in barebox
This document highlights some of the factors for supporting Texas Instrument's OMAP platforms in U-Boot V2.
This document highlights some of the factors for supporting Texas Instrument's OMAP platforms in barebox.
@par Table of Contents
@li @ref omap_boards
@ -24,13 +24,13 @@ This document highlights some of the factors for supporting Texas Instrument's O
@li @subpage arch/arm/mach-omap/omap3_generic.c
@section omap_code_arch How is U-Boot V2 OMAP specific architecture code organized?
@section omap_code_arch How is barebox OMAP specific architecture code organized?
To understand the architecture of U-Boot V2 source code for OMAP processors, we need to understand a bit on OMAP itself.
To understand the architecture of barebox source code for OMAP processors, we need to understand a bit on OMAP itself.
A typical Texas Instrument's Open Multimedia Application Processor (OMAP) solution is built around ARM core with multiple on-the-silicon peripherals. It also has a TI Digital Signal Processor(DSP) and few hardware accelerators to cater to computing intensive applications such as encoder/decoders. See http://focus.ti.com/general/docs/wtbu/wtbugencontent.tsp?templateId=6123&navigationId=11988&contentId=4638 for further details.
Essentially, OMAP is modular with on-silicon peripherals being reused across multiple OMAP versions. U-Boot V2 code organization is driven by this fact.
Essentially, OMAP is modular with on-silicon peripherals being reused across multiple OMAP versions. barebox code organization is driven by this fact.
Motivation for code organization is driven from:
@li Clear distinction between architecture and board features.
@ -53,13 +53,13 @@ All OMAP common headers are located here. Where we have to incorporate a OMAP va
include/asm-arm/arch-omap/silicon.h contains includes for omapX-silicon.h which defines the base addresses for the peripherals on that platform. the usual convention is to use #define OMAP_SOMETHING_BASE to allow re-use.
@section board_omap board/omap directory guidelines
All Board specific files go here. In U-Boot V1, we always had to use common config file which is shared by other drivers to get serial, ethernet baseaddress etc.. we can easily use the device_d structure to handle it with U-Boot V2. This is more like programming for Linux kernel - it is pretty easy.
All Board specific files go here. In barebox V1, we always had to use common config file which is shared by other drivers to get serial, ethernet baseaddress etc.. we can easily use the device_d structure to handle it with barebox. This is more like programming for Linux kernel - it is pretty easy.
Each specific board file has board-XYZ.c and potentially and equivalent h file.
We'd potentially use device_initcall and console_initcalls as required.
@section omap_boot The OMAP boot path
The normal flow is to look for arch_init_lowlevel in the required code. This would be the first function to be called after the ARM common code boots up(arch/arm/cpu/start-arm.S), the job of boot code on OMAP platform would be to preventing watchdog timer from kicking in and spoiling all the fun, setup OMAP clocks to the high performance mode, do other architecture specific initializations. There could be some additional stuff we may need to do based on the specific OMAP we support including setting up a usable interrupt vector table etc - some parts of the code may be desired to be in C code (to let normal humans understand without being an asm junkie), in such a case, U-Boot's stack setup is not ready yet, and we may need to setup a temporary SRAM based stack prior to execution. Some things to keep in mind while handling booting code, we might be executing in eXecute In Place (XIP) mode and that only an SRAM stack is setup. Using global variables or using constructs that create function jump tables is doomed to fail as the required area might not be writable or may not be even initialized. So code in this area tends to use lots of if conditions and local variables. Having C code doing the fun part is easy to maintain, so it is advisable to push as much as possible to C functions where possible.
The normal flow is to look for arch_init_lowlevel in the required code. This would be the first function to be called after the ARM common code boots up(arch/arm/cpu/start-arm.S), the job of boot code on OMAP platform would be to preventing watchdog timer from kicking in and spoiling all the fun, setup OMAP clocks to the high performance mode, do other architecture specific initializations. There could be some additional stuff we may need to do based on the specific OMAP we support including setting up a usable interrupt vector table etc - some parts of the code may be desired to be in C code (to let normal humans understand without being an asm junkie), in such a case, barebox's stack setup is not ready yet, and we may need to setup a temporary SRAM based stack prior to execution. Some things to keep in mind while handling booting code, we might be executing in eXecute In Place (XIP) mode and that only an SRAM stack is setup. Using global variables or using constructs that create function jump tables is doomed to fail as the required area might not be writable or may not be even initialized. So code in this area tends to use lots of if conditions and local variables. Having C code doing the fun part is easy to maintain, so it is advisable to push as much as possible to C functions where possible.
The responsibility of arch_init_lowlevel and related calls is to setup OMAP. No board specific initializations are to be done here.
@ -69,7 +69,7 @@ Once this is past, the code returns back to arm common code (cpu/start-arm.S). H
If the proper CONFIG_MACH_DO_LOWLEVEL_INIT flag is setup, board_init_lowlevel is called. This again would call a common file board/omap/platform.S which setups a temporary SRAM stack and bumps the control to board_init.
Every Board in OMAP platform can potentially define a board_init and enable defconfig in arch/arm/configs directory. The responsibility here is to setup OMAP for board configurations - this includes SDRAM configuration and pin muxing configuration.
Once this is complete, U-boot V2 boot process proceeds by calling init functions and finally entering shell prompt
Once this is complete, barebox boot process proceeds by calling init functions and finally entering shell prompt
board-XYZ file may potentially register every device it is interested in. You can check out how the code is organized in other board directories also, esentially, the method is as simple as:
@code

View File

@ -6,7 +6,7 @@
*
* This includes each of the architecture Clock definitions under it.
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008

View File

@ -4,7 +4,7 @@
*
* FileName: include/asm-arm/arch-omap/omap3-clock.h
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*
*/
/*

View File

@ -8,7 +8,7 @@
* @see include/asm-arm/arch-omap/control.h
* The @ref MUX_VAL macro uses the defines from this file
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008

View File

@ -4,7 +4,7 @@
*
* FileName: include/asm-arm/arch-omap/sdrc.h
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008

View File

@ -7,7 +7,7 @@
*
* These are implemented by the System specific code in omapX-generic.c
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008

View File

@ -6,7 +6,7 @@
*
* Implemented by arch/arm/mach-omap/syslib.c
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2004-2008

View File

@ -15,7 +15,7 @@
* @warning: IMPORTANT: These functions run from ISRAM stack, so no bss sections
* should be used: functions cannot use global variables/switch constructs.
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008

View File

@ -12,7 +12,7 @@
* configurations while running in SDRAM/Flash. This provides
* relocation and execution capability for the same.
*
* Orignally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Orignally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008

View File

@ -48,7 +48,7 @@ arch_init_lowlevel:
mov r0, pc /* Store the current pc address */
sub r0, r0, #8 /* Reduce offset */
ldr r1, arch_start /* Load the link address for arch_int */
ldr r2, uboot_start /* load the link address of start_init*/
ldr r2, barebox_start /* load the link address of start_init*/
sub r1, r1, r2 /* get the offset */
/* subtract the offset from PC of arch=Current start */
sub r0, r0, r1
@ -91,7 +91,7 @@ next:
arch_start:
.word arch_init_lowlevel
uboot_start:
barebox_start:
.word _start
SRAM_INTVECT:
.word OMAP_SRAM_INTVECT

View File

@ -11,7 +11,7 @@
* Important one is @ref a_init which is architecture init code.
* The implemented functions are present in sys_info.h
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008
@ -400,7 +400,7 @@ void a_init(void)
try_unlock_memory();
/* Writing to AuxCR in U-boot using SMI for GP DEV */
/* Writing to AuxCR in barebox using SMI for GP DEV */
/* Currently SMI in Kernel on ES2 devices seems to have an isse
* Once that is resolved, we can postpone this config to kernel
*/

View File

@ -7,7 +7,7 @@
* Provide APIs which can be used from platform/architecture code
* to operate on
*
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/u-boot-v1.tar.gz
* Originally from http://linux.omap.com/pub/bootloader/3430sdp/barebox-v1.tar.gz
*/
/*
* (C) Copyright 2006-2008

View File

@ -240,7 +240,7 @@ EXPORT_SYMBOL(reset_cpu);
/**
@page dev_s3c24xx_arch Samsung's S3C24xx Platforms in U-Boot-v2
@page dev_s3c24xx_arch Samsung's S3C24xx Platforms in barebox
@section s3c24xx_boards Boards using S3C24xx Processors
@ -274,20 +274,20 @@ All S3C24xx common headers are located here.
/** @page dev_s3c24xx_mach Samsung's S3C24xx based platforms
@par U-Boot-v2 Map
@par barebox Map
The location of the U-Boot-v2 itself depends on the available amount of
The location of the barebox itself depends on the available amount of
installed SDRAM memory:
- 0x30fc.0000 Start of U-Boot-v2 when 16MiB SDRAM is available
- 0x31fc.0000 Start of U-Boot-v2 when 32MiB SDRAM is available
- 0x33fc.0000 Start of U-Boot-v2 when 64MiB SDRAM is available
- 0x30fc.0000 Start of barebox when 16MiB SDRAM is available
- 0x31fc.0000 Start of barebox when 32MiB SDRAM is available
- 0x33fc.0000 Start of barebox when 64MiB SDRAM is available
Adjust the CONFIG_TEXT_BASE/CONFIG_ARCH_TEXT_BASE symbol in accordance to
the available memory.
@note The RAM based filesystem and the stack resides always below the
U-Boot-v2 start address.
barebox start address.
@li @subpage dev_s3c24xx_wd_handling
@li @subpage dev_s3c24xx_pll_handling

View File

@ -223,7 +223,7 @@ SDRAMDATA:
@page dev_s3c24xx_sdram_handling SDRAM controller initialisation
The SDRAM controller is very simple and its initialisation requires only a
few steps. U-Boot-v2 provides a generic routine to do this step.
few steps. barebox provides a generic routine to do this step.
Enable CONFIG_S3C24XX_SDRAM_INIT and CONFIG_MACH_HAS_LOWLEVEL_INIT to be able
to call the generic s3c24x0_sdram_init() assembler function from within the
@ -292,14 +292,14 @@ machine specific board_init_lowlevel() assembler function.
an initialized stack pointer.
@note Basicly this routine runs from inside the internal SRAM. After load of
the whole U-Boot-v2 image from the NAND flash memory into the SDRAM it adjusts
the whole barebox image from the NAND flash memory into the SDRAM it adjusts
the link register to the final SDRAM adress and returns.
@note In the NAND boot mode, ECC is not checked. So, the first x KBytes used
by U-Boot-v2 should have no bit error.
by barebox should have no bit error.
Due to the fact the code to load the whole U-Boot-v2 from NAND must fit into
the first 4kiB of the U-Boot-v2 image, the shrinked NAND driver is very
Due to the fact the code to load the whole barebox from NAND must fit into
the first 4kiB of the barebox image, the shrinked NAND driver is very
minimalistic. Setup the NAND access timing is done in a safe manner, what
means: Slowest possible values are used. If you want to increase the speed you
should define the BOARD_DEFAULT_NAND_TIMING to a valid setting into the

View File

@ -13,7 +13,7 @@ CFLAGS += -D__blackfin__
KALLSYMS += --symbol-prefix=_
ifndef CONFIG_BFIN_BOOT_BYPASS
all: uboot.ldr
all: barebox.ldr
endif
archprepare: maketools
@ -36,7 +36,7 @@ endif
common-y += $(BOARD)
common-y += arch/blackfin/lib/ $(CPU)
lds-y += $(BOARD)/u-boot.lds
lds-y += $(BOARD)/barebox.lds
ifdef CONFIG_BFIN_BOOT_FLASH16
FLASHBITS :=-B 16
@ -46,7 +46,7 @@ endif
ifneq ($(cpu-y),)
ifndef CONFIG_BFIN_BOOT_BYPASS
uboot.ldr: uboot
barebox.ldr: barebox
rm -f $@
$(CROSS_COMPILE)ldr -T $(cpu-y) -c $(FLASHBITS) -i $(CPU)/init_sdram.o $@ $<
endif

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# U-Boot version: 2.0.0-rc5-git
# barebox version: 2.0.0-rc5-git
# Thu Jul 3 10:25:25 2008
#
CONFIG_BLACKFIN=y
@ -35,7 +35,7 @@ CONFIG_STACK_SIZE=0x8000
CONFIG_MALLOC_SIZE=0x400000
# CONFIG_BROKEN is not set
# CONFIG_EXPERIMENTAL is not set
CONFIG_PROMPT="uboot:"
CONFIG_PROMPT="barebox:"
CONFIG_BAUDRATE=115200
CONFIG_CMDLINE_EDITING=y
# CONFIG_AUTO_COMPLETE is not set

View File

@ -1,5 +1,5 @@
/*
* U-boot - start.S Startup file of u-boot for BF533/BF561
* barebox - start.S Startup file of barebox for BF533/BF561
*
* Copyright (c) 2005 blackfin.uclinux.org
*
@ -333,8 +333,8 @@ _clear_bss_skip:
[p0] = r0;
#endif
p0.l = _start_uboot;
p0.h = _start_uboot;
p0.l = _start_barebox;
p0.h = _start_barebox;
jump (p0);
reset_start:

View File

@ -1,5 +1,5 @@
/*
* U-boot - u-boot.h Structure declarations for board specific data
* barebox - barebox.h Structure declarations for board specific data
*
* Copyright (c) 2005 blackfin.uclinux.org
*
@ -25,8 +25,8 @@
* MA 02111-1307 USA
*/
#ifndef _U_BOOT_H_
#define _U_BOOT_H_ 1
#ifndef _BAREBOX_H_
#define _BAREBOX_H_ 1
typedef struct bd_info {
int bi_baudrate; /* serial console baudrate */
@ -44,4 +44,4 @@ typedef struct bd_info {
#define bi_env_data bi_env->data
#define bi_env_crc bi_env->crc
#endif /* _U_BOOT_H_ */
#endif /* _BAREBOX_H_ */

View File

@ -1,5 +1,5 @@
/*
* U-boot - bitops.h Routines for bit operations
* barebox - bitops.h Routines for bit operations
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - blackfin.h
* barebox - blackfin.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - blackfin_defs.h
* barebox - blackfin_defs.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - byteorder.h
* barebox - byteorder.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,6 +1,6 @@
/*
* U-boot - cpu.h
* barebox - cpu.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - current.h
* barebox - current.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - entry.h Routines for context saving and restoring
* barebox - entry.h Routines for context saving and restoring
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - hw_irq.h
* barebox - hw_irq.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - io.h IO routines
* barebox - io.h IO routines
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - linkage.h
* barebox - linkage.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - mem_init.h Header file for memory initialization
* barebox - mem_init.h Header file for memory initialization
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - page.h
* barebox - page.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - page_offset.h
* barebox - page_offset.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - posix_types.h
* barebox - posix_types.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - processor.h
* barebox - processor.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - ptrace.h
* barebox - ptrace.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - segment.h
* barebox - segment.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - setup.h
* barebox - setup.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - string.h String functions
* barebox - string.h String functions
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - system.h
* barebox - system.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - traps.h
* barebox - traps.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - types.h
* barebox - types.h
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - bf533_string.c Contains library routines.
* barebox - bf533_string.c Contains library routines.
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - blackfin_linux.c
* barebox - blackfin_linux.c
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - board.c First C file to be called contains init routines
* barebox - board.c First C file to be called contains init routines
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - cpu.c CPU specific functions
* barebox - cpu.c CPU specific functions
*
* Copyright (c) 2005 blackfin.uclinux.org
*
@ -71,9 +71,9 @@ void icache_enable(void)
I0 = (unsigned int *)ICPLB_ADDR0;
I1 = (unsigned int *)ICPLB_DATA0;
/* We only setup instruction caching for U-Boot itself.
/* We only setup instruction caching for barebox itself.
* This has the nice side effect that we trigger an
* exception when U-Boot goes crazy.
* exception when barebox goes crazy.
*/
*I0++ = TEXT_BASE & ~((1 << 20) - 1);
*I1++ = PAGE_SIZE_1MB | CPLB_L1_CHBL | CPLB_USER_RD | CPLB_VALID | CPLB_LOCK;

View File

@ -1,5 +1,5 @@
/*
* U-boot - interrupt.S Processing of interrupts and exception handling
* barebox - interrupt.S Processing of interrupts and exception handling
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - muldi3.c contains routines for mult and div
* barebox - muldi3.c contains routines for mult and div
*
* Copyright (c) 2005 blackfin.uclinux.org
*

View File

@ -1,5 +1,5 @@
/*
* U-boot - traps.c Routines related to interrupts and exceptions
* barebox - traps.c Routines related to interrupts and exceptions
*
* Copyright (c) 2005 blackfin.uclinux.org
*

Some files were not shown because too many files have changed in this diff Show More