project-magpie / u-boot-spark

U-Boot bootloader for the spark 71xx STBs. Cloned from STM git: http://git.stlinux.com/?p=stm/u-boot.git;a=summary

Home Page:project-magpie.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation with Yocto/OE Toolchain

The u-boot source can be compiled in this way with the yocto toolchain:

$ source /opt/poky/1.5.1/environment-setup-sh4-poky-linux
# For  more details on this please read:
# http://www.denx.de/wiki/view/ELDK-5/FrequentlyAskedQuestionsAndAnswers#Compiling_U_Boot_or_Linux_fails
$ unset LDFLAGS
$ export CROSS_COMPILE=sh4-poky-linux-
$ make clean
$ make ARCH=st40 mb618_config

Due to the fact that there is no support for the "-m4-nofpu" on the yocto GCC a patch is needed:

diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk
index b3feb2a..a6e3649 100644
--- a/arch/sh/cpu/sh4/config.mk
+++ b/arch/sh/cpu/sh4/config.mk
@@ -24,5 +24,5 @@
 # MA 02111-1307 USA
 #
 #
-PLATFORM_CPPFLAGS += -m4-nofpu
+#PLATFORM_CPPFLAGS += -m4-nofpu
 PLATFORM_RELFLAGS += -ffixed-r13
diff --git a/arch/st40/cpu/config.mk b/arch/st40/cpu/config.mk
index c780793..a6f99a7 100644
--- a/arch/st40/cpu/config.mk
+++ b/arch/st40/cpu/config.mk
@@ -26,7 +26,7 @@

 ### old:  PLATFORM_CPPFLAGS += -m4 -m4-nofpu -U__sh3__
 ### want: PLATFORM_CPPFLAGS += -m4 -mno-implicit-fp
-PLATFORM_CPPFLAGS += -m4-nofpu -U__sh3__ -D__SH4__=1
+PLATFORM_CPPFLAGS += -U__sh3__ -D__SH4__=1

 # all SH (ST40) CPUs will use the same linker script file
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds

After appling the patch you can compile the u-boot:

$ make ARCH=st40

For testing your new u-boot I recommend my JTAG adapter.

About

U-Boot bootloader for the spark 71xx STBs. Cloned from STM git: http://git.stlinux.com/?p=stm/u-boot.git;a=summary

project-magpie.github.io

License:Other


Languages

Language:C 92.0%Language:Assembly 3.9%Language:C++ 3.5%Language:Objective-C 0.5%Language:Shell 0.1%Language:Python 0.0%Language:Awk 0.0%