u-boot_git.bb: add xilinx-ml507 support
PATCH 1/1 u-boot_git.bb: add xilinx-ml507 support
* Based on xilinx official repos
* If a hardware project dir is set in local.conf XILINX_BSP_PATH
* it will over write xparameters header and append some canonical
* definitions. It also install u-boot elf executable for bare metal
* execution, early development stages.
--- recipes/u-boot/u-boot_git.bb | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-)
recipes/u-boot/u-boot_git.bb +23 -1
@@ -1,5 +1,5 @@ require u-boot.inc -PR ="r42" +PR ="r43" FILESPATHPKG =. "u-boot-git:"
@@ -193,6 +193,9 @@ SRC_URI_append_c7x0 = "file://pdaXrom-u-boot.patch;patch=1 \ SRC_URI_sheevaplug = "git://git.denx.de/u-boot-marvell.git;protocol=git;branch=testing" SRCREV_sheevaplug = "119b9942da2e450d4e525fc004208dd7f7d062e0" +SRC_URI_xilinx-ml507 = "git://git.xilinx.com/u-boot-xlnx.git;protocol=git" +SRCREV_xilinx-ml507 = "26e999650cf77c16f33c580abaadab2532f5e8b2" + S = "${WORKDIR}/git"
@@ -223,3 +226,22 @@ do_deploy_prepend_mini2440() { do_deploy_prepend_micro2440() { cp ${S}/u-boot-nand16k.bin ${S}/u-boot.bin } + +do_configure_prepend_xilinx-ml507() { +if [ -e ${XILINX_BSP_PATH}/ppc440_0/include/xparameters.h ]; then + oenote "Replacing device definitions" + cp ${XILINX_BSP_PATH}/ppc440_0/include/xparameters.h \ + ${S}/board/xilinx/ml507 + oenote "Append canonical definitions" + echo "#define XPAR_PLB_CLOCK_FREQ_HZ XPAR_CPU_PPC440_MPLB_FREQ_HZ +#define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ +#define XPAR_PCI_0_CLOCK_FREQ_HZ 0" >> ${S}/board/xilinx/ml507/xparameters.h +fi +} + +do_deploy_prepend_xilinx-ml507() { +if [ -d ${XILINX_BSP_PATH} ]; then + oenote "Installing u-boot elf image in bsp path" + install ${S}/u-boot ${XILINX_BSP_PATH}/u-boot +fi +}
Signature · 1 line
1.6.6.1
Hello.
The first part, PR and SRCREV, is obviously fine. The second part raises a question here. If it is preferred to have the xparameters header file from the BSP would it make more sense to have it in OE? Be it a package or just the file.
The patch also has the problem that it does not work if XILINX_BSP_PATH is not set. Your test in deploy if the directory exists triggers this here:
NOTE: Running task 1042 of 1048 (ID: 11, /home/stefan/Projekte/OpenEmbedded/build/openmoko/openembedded/recipes/u-boot/u-boot_git.bb,do_deploy)
ERROR: function do_deploy failed
ERROR: log data follows (/home/stefan/Projekte/OpenEmbedded/build/openmoko/tmp/work/xilinx-ml507-angstrom-linux/u-boot-git-r43/temp/log.do_deploy.19446) | NOTE: Installing u-boot elf image in bsp path
| install: cannot create regular file `/u-boot': Permission denied
The variable is empty and test thinks that is fine and wants to install the u-boot into / as no other path is set. Please fix, resend and I'll apply it.
regards
Stefan Schmidt
HI,
Fix previous error a patch should be at patchqueue, also is attached.
u-boot source code provides a parameter definition for a hardware reference design
documented at [1]; Even trying to replicating this hardware project it would not necessary
match the hardware address model used by u-boot so is safer to overwrite this header file (xparameters.h);
Also u-boot expects a set of macros that are not generated whit xilinx tools, and I append them
at the end of the header file, I know this is ugly but there's no way to provide a patch since the
header file is generated based on the hardware modules included in the project.
This probably can be included in xilinx-bsp.bbclass but I will need to detect when u-boot or linux-kernel
is inheriting the class to perform the right action. But at the moment I don't know ho to do it.
[1] http://xilinx.wikidot.com/u-boot
<http://xilinx.wikidot.com/u-boot>Regards
Quoted 36 lines · Stefan Schmidt
Hello.
The first part, PR and SRCREV, is obviously fine. The second part raises a question here. If it is preferred to have the xparameters header file from the
BSP would it make more sense to have it in OE? Be it a package or just the file.The patch also has the problem that it does not work if
XILINX_BSP_PATHis not
set. Your test in deploy if the directory exists triggers this here:NOTE: Running task 1042 of 1048 (ID: 11,
/home/stefan/Projekte/OpenEmbedded/build/openmoko/openembedded/recipes/u-boot/u-boot_git.bb,do_deploy)
ERROR: functiondo_deployfailed
ERROR: log data follows(
/home/stefan/Projekte/OpenEmbedded/build/openmoko/tmp/work/xilinx-ml507-angstrom-linux/u-boot-git-r43/temp/log.do_deploy.19446) | NOTE: Installing u-boot elf image in bsp path
| install: cannot create regular file `/u-boot': Permission deniedThe variable is empty and test thinks that is fine and wants to install the u-boot into / as no other path is set. Please fix, resend and I'll apply it.
regards
Stefan Schmidt_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 3 lines
Saludos Adrian Alonso http://aalonso.wordpress.com
From c3da019980a9aa2b27a86b1c703098d6533039bb Mon Sep 17 00:00:00 2001
From: Adrian Alonso <[email protected]>
Date: Sun, 21 Mar 2010 23:46:39 -0600
Subject: [PATCH v2] u-boot_git.bb: add xilinx ml507 support
* Based on xilinx official repos
* If a hardware project dir is set in local.conf XILINX_BSP_PATH
* it will over write xparameters header and append some canonical
* definitions. It also install u-boot elf executable for bare metal
* execution, early development stages.
--- recipes/u-boot/u-boot_git.bb | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-)
recipes/u-boot/u-boot_git.bb +20 -1
@@ -1,5 +1,5 @@ require u-boot.inc -PR ="r42" +PR ="r43" FILESPATHPKG =. "u-boot-git:"
@@ -207,6 +207,9 @@ SRC_URI_append_c7x0 = "file://pdaXrom-u-boot.patch;patch=1 \ SRC_URI_sheevaplug = "git://git.denx.de/u-boot-marvell.git;protocol=git;branch=testing" SRCREV_sheevaplug = "119b9942da2e450d4e525fc004208dd7f7d062e0" +SRC_URI_xilinx-ml507 = "git://git.xilinx.com/u-boot-xlnx.git;protocol=git" +SRCREV_xilinx-ml507 = "26e999650cf77c16f33c580abaadab2532f5e8b2" + S = "${WORKDIR}/git"
@@ -237,3 +240,19 @@ do_deploy_prepend_mini2440() { do_deploy_prepend_micro2440() { cp ${S}/u-boot-nand16k.bin ${S}/u-boot.bin } + +do_configure_prepend_xilinx-ml507() { +if [ -e "${XILINX_BSP_PATH}/ppc440_0/include/xparameters.h" ]; then + cp ${XILINX_BSP_PATH}/ppc440_0/include/xparameters.h \ + ${S}/board/xilinx/ml507 + echo "#define XPAR_PLB_CLOCK_FREQ_HZ XPAR_CPU_PPC440_MPLB_FREQ_HZ +#define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC440_CORE_CLOCK_FREQ_HZ +#define XPAR_PCI_0_CLOCK_FREQ_HZ 0" >> ${S}/board/xilinx/ml507/xparameters.h +fi +} + +do_deploy_prepend_xilinx-ml507() { +if [ -d "${XILINX_BSP_PATH}" ]; then + install ${S}/u-boot ${XILINX_BSP_PATH} +fi +}
Signature · 1 line
1.6.6.1
Hello.
Quoted 16 lines · Adrian Alonso
Fix previous error a patch should be at patchqueue, also is attached.
u-boot source code provides a parameter definition for a hardware reference design
documented at [1]; Even trying to replicating this hardware project it would not necessary
match the hardware address model used by u-boot so is safer to overwrite this header file (xparameters.h);
Also u-boot expects a set of macros that are not generated whit xilinx tools, and I append them
at the end of the header file, I know this is ugly but there's no way to provide a patch since the
header file is generated based on the hardware modules included in the project.
Quoted 4 lines
This probably can be included in xilinx-bsp.bbclass but I will need to detect when u-boot or linux-kernel
is inheriting the class to perform the right action. But at the moment I don't know ho to do it.
OK, thanks for the time explaining it. Will test your patch and push it.
regards
Stefan Schmidt