* [PATCH] u-boot_git.bb: add xilinx-ml507 support @ 2010-03-19 17:17 Adrian Alonso 2010-03-21 11:28 ` Stefan Schmidt 0 siblings, 1 reply; 4+ messages in thread From: Adrian Alonso @ 2010-03-19 17:17 UTC (permalink / raw) To: openembedded-devel * 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. Signed-off-by: Adrian Alonso <aalonso00@gmail.com> --- recipes/u-boot/u-boot_git.bb | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/recipes/u-boot/u-boot_git.bb b/recipes/u-boot/u-boot_git.bb index e8570e6..f2ea968 100644 --- a/recipes/u-boot/u-boot_git.bb +++ b/recipes/u-boot/u-boot_git.bb @@ -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 +} -- 1.6.6.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] u-boot_git.bb: add xilinx-ml507 support 2010-03-19 17:17 [PATCH] u-boot_git.bb: add xilinx-ml507 support Adrian Alonso @ 2010-03-21 11:28 ` Stefan Schmidt 2010-03-22 17:21 ` Adrian Alonso 0 siblings, 1 reply; 4+ messages in thread From: Stefan Schmidt @ 2010-03-21 11:28 UTC (permalink / raw) To: openembedded-devel 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] u-boot_git.bb: add xilinx-ml507 support 2010-03-21 11:28 ` Stefan Schmidt @ 2010-03-22 17:21 ` Adrian Alonso 2010-03-22 17:40 ` Stefan Schmidt 0 siblings, 1 reply; 4+ messages in thread From: Adrian Alonso @ 2010-03-22 17:21 UTC (permalink / raw) To: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 2411 bytes --] 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 On Sun, Mar 21, 2010 at 5:28 AM, Stefan Schmidt <stefan@datenfreihafen.org>wrote: > 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 > > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel > -- Saludos Adrian Alonso http://aalonso.wordpress.com [-- Attachment #2: 0001-u-boot_git.bb-add-xilinx-ml507-support.patch --] [-- Type: text/x-patch, Size: 2021 bytes --] From c3da019980a9aa2b27a86b1c703098d6533039bb Mon Sep 17 00:00:00 2001 From: Adrian Alonso <aalonso00@gmail.com> 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. Signed-off-by: Adrian Alonso <aalonso00@gmail.com> --- recipes/u-boot/u-boot_git.bb | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/recipes/u-boot/u-boot_git.bb b/recipes/u-boot/u-boot_git.bb index fb81caf..928642d 100644 --- a/recipes/u-boot/u-boot_git.bb +++ b/recipes/u-boot/u-boot_git.bb @@ -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 +} -- 1.6.6.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] u-boot_git.bb: add xilinx-ml507 support 2010-03-22 17:21 ` Adrian Alonso @ 2010-03-22 17:40 ` Stefan Schmidt 0 siblings, 0 replies; 4+ messages in thread From: Stefan Schmidt @ 2010-03-22 17:40 UTC (permalink / raw) To: openembedded-devel Hello. On Mon, 2010-03-22 at 11:21, Adrian Alonso wrote: > > 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. OK, thanks for the time explaining it. Will test your patch and push it. regards Stefan Schmidt ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-22 17:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-03-19 17:17 [PATCH] u-boot_git.bb: add xilinx-ml507 support Adrian Alonso 2010-03-21 11:28 ` Stefan Schmidt 2010-03-22 17:21 ` Adrian Alonso 2010-03-22 17:40 ` Stefan Schmidt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox