All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/25] xilinx-kernel: bbclass to handle linux kernel hw/sw integration
@ 2011-01-17 20:29 Adrian Alonso
  2011-01-17 20:29 ` [PATCH 02/25] xilinx-boot: bbclass to handle u-boot " Adrian Alonso
                   ` (23 more replies)
  0 siblings, 24 replies; 42+ messages in thread
From: Adrian Alonso @ 2011-01-17 20:29 UTC (permalink / raw)
  To: poky@yoctoproject.org; +Cc: Adrian Alonso

* This class handles the Xilinx hardware project
  introinspection for exporting the device-tree blob
  to match hardware/software co-design in Xilinx FPGA's
* xilinx-bsp class delated to split the kernel/u-boot
  hw/sw introinspection in two separate classes for easier
  maintenance

Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
---
 classes/xilinx-bsp.bbclass    |  118 -----------------------------------------
 classes/xilinx-kernel.bbclass |   57 ++++++++++++++++++++
 2 files changed, 57 insertions(+), 118 deletions(-)
 delete mode 100644 classes/xilinx-bsp.bbclass
 create mode 100644 classes/xilinx-kernel.bbclass

diff --git a/classes/xilinx-bsp.bbclass b/classes/xilinx-bsp.bbclass
deleted file mode 100644
index ea8e0bf..0000000
--- a/classes/xilinx-bsp.bbclass
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
-# Copyright (C) 2010, Adrian Alonso <aalonso00@gmail.com>
-# Released under the MIT license (see packages/COPYING)
-#
-#This class handles all the intricasies of getting the required files from the
-#ISE/EDK/project to the kernel and prepare the kernel for compilation.
-#The Xilinx EDK supports 2 different architectures : PowerPC (ppc 405,440) and Microblaze
-#Only the PowerPC BSP has been tested so far
-#For this to work correctly you need to add XILINX_BSP_PATH and XILINX_BOARD to your
-#local.conf
-#XILINX_BSP_PATH should have the complete path to your project dir
-#XILINX_BOARD should have the board type i.e ML403
-#
-#Currently tested on
-#Xilinx ML405
-#Xilinx ML507
-#More to come soon ;)
-
-def map_target(a, d):
-	import re
-	board = bb.data.getVar('XILINX_BOARD', d, 1)
-	cpu = bb.data.getVar('TARGET_CPU', d, 1)
-
-	if re.match('powerpc', a):
-		return 'ppc' + cpu + '-' + board
-	else:
-		return 'system'
-
-def uboot_machine(a, d):
-    import re
-
-    board = bb.data.getVar('XILINX_BOARD', d, 1)
-    if board in ['ml300', 'ml401', 'ml403', 'ml405', 'ml507', 'ml510']:
-        if re.match('powerpc', a):
-            if board == 'ml403':
-                return 'ml401_config'
-            elif board == 'ml510':
-                return 'ml507_config'
-            else:
-                return board + '_config'
-        else:
-            return 'microblaze-generic_config'
-
-def uboot_target(a, d):
-    import re
-
-    board = bb.data.getVar('XILINX_BOARD', d, 1)
-    target = bb.data.getVar('TARGET_CPU', d, 1) + '-generic'
-    if board in ['ml300', 'ml401', 'ml403', 'ml405', 'ml507', 'ml510']:
-        if re.match('powerpc', a):
-            if board == 'ml403':
-                return 'ml401'
-            elif board == 'ml510':
-                return 'ml507'
-            else:
-                return board
-        else:
-            return target
-
-do_configure_prepend() {
-#first check that the XILINX_BSP_PATH and XILINX_BOARD have been defined in local.conf
-#now depending on the board type and arch do what is nessesary
-if [ -n "${XILINX_BSP_PATH}" ]; then
-	if [ -n "${XILINX_BOARD}" ]; then
-		if [ -d "${S}/arch/${TARGET_ARCH}/boot" ]; then
-			dts=`find "${XILINX_BSP_PATH}" -name *.dts -print`
-			if [ -e "$dts" ]; then
-				oenote "Replacing device tree to match hardware model"
-				if [ "${TARGET_ARCH}" == "powerpc" ]; then
-					cp -pP ${dts} ${S}/arch/powerpc/boot/dts/virtex${TARGET_BOARD}.dts
-				else
-					cp -pP ${dts} ${S}/arch/microblaze/platform/generic/${TARGET_BOARD}.dts
-				fi
-			else
-				oefatal "No device tree found, missing hardware ref design?"
-				exit 1
-			fi
-		elif [ -d "${S}/board/xilinx" ]; then
-			oenote "Replacing xparameters header to match hardware model"
-			if [ "${TARGET_ARCH}" == "powerpc" ]; then
-				xparam="${XILINX_BSP_PATH}/ppc${TARGET_CPU}_0/include/xparameters.h"
-				cpu="PPC`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`"
-			else
-				xparam="${XILINX_BSP_PATH}/${TARGET_CPU}_0/include/xparameters.h"
-				cpu=`echo ${TARGET_CPU} | tr '[:lower:]' '[:upper:]'`
-			fi
-			if [ -e "$xparam" ]; then
-				cp ${xparam} ${S}/board/xilinx/${UBOOT_TARGET}
-				echo "/*** Cannonical definitions ***/
-#define XPAR_PLB_CLOCK_FREQ_HZ XPAR_PROC_BUS_0_FREQ_HZ
-#define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_${cpu}_CORE_CLOCK_FREQ_HZ
-#ifndef XPAR_DDR2_SDRAM_MEM_BASEADDR
-# define XPAR_DDR2_SDRAM_MEM_BASEADDR XPAR_DDR_SDRAM_MPMC_BASEADDR
-#endif
-#define XPAR_PCI_0_CLOCK_FREQ_HZ    0" >> ${S}/board/xilinx/${UBOOT_TARGET}/xparameters.h
-			else
-				oefatal "No xparameters header file found, missing hardware ref design?"
-                exit 1
-			fi
-		fi
-	else
-		oefatal "XILINX_BOARD not defined ! Exit"
-		exit 1
-	fi
-else
-	oefatal "XILINX_BSP_PATH not defined ! Exit"
-	exit 1
-fi
-}
-
-do_deploy_prepend() {
-# Install u-boot elf image
-if [ -d "${XILINX_BSP_PATH}" ]; then
-	if [ -e "${S}/u-boot" ]; then
-		install ${S}/u-boot ${XILINX_BSP_PATH}
-	fi
-fi
-}
diff --git a/classes/xilinx-kernel.bbclass b/classes/xilinx-kernel.bbclass
new file mode 100644
index 0000000..decf570
--- /dev/null
+++ b/classes/xilinx-kernel.bbclass
@@ -0,0 +1,57 @@
+# Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved
+# Copyright (C) 2010, Adrian Alonso <aalonso00@gmail.com>
+# Released under the MIT license (see packages/COPYING)
+#
+#This class handles all the intricasies of getting the required files from the
+#ISE/EDK/project to the kernel and prepare the kernel for compilation.
+#The Xilinx EDK supports 2 different architectures : PowerPC (ppc 405,440) and Microblaze
+#Only the PowerPC BSP has been tested so far
+#For this to work correctly you need to add XILINX_BSP_PATH and XILINX_BOARD to your
+#local.conf
+#XILINX_BSP_PATH should have the complete path to your project dir
+#XILINX_BOARD should have the board type i.e ML403
+#
+#Currently tested on
+#Xilinx ML405
+#Xilinx ML507
+#More to come soon ;)
+
+def map_target(a, d):
+	import re
+	board = bb.data.getVar('XILINX_BOARD', d, 1)
+	cpu = bb.data.getVar('TARGET_CPU', d, 1)
+
+	if re.match('powerpc', a):
+		return cpu + '-' + board
+	else:
+		return 'system'
+
+
+do_configure_prepend() {
+#first check that the XILINX_BSP_PATH and XILINX_BOARD have been defined in local.conf
+#now depending on the board type and arch do what is nessesary
+if [ -n "${XILINX_BSP_PATH}" ]; then
+	if [ -n "${XILINX_BOARD}" ]; then
+		if [ -d "${S}/arch/${TARGET_ARCH}/boot" ]; then
+			dts=`find "${XILINX_BSP_PATH}" -name *.dts -print`
+			if [ -e "$dts" ]; then
+				oenote "Replacing device tree to match hardware model"
+				if [ "${TARGET_ARCH}" == "powerpc" ]; then
+					cp -pP ${dts} ${S}/arch/powerpc/boot/dts/virtex${TARGET_BOARD}.dts
+				else
+					cp -pP ${dts} ${S}/arch/microblaze/platform/generic/${TARGET_BOARD}.dts
+				fi
+			else
+				oefatal "No device tree found, missing hardware ref design?"
+				exit 1
+			fi
+		fi
+	else
+		oefatal "XILINX_BOARD not defined ! Exit"
+		exit 1
+	fi
+else
+	oefatal "XILINX_BSP_PATH not defined ! Exit"
+	exit 1
+fi
+}
-- 
1.7.3.4



^ permalink raw reply related	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2011-01-25 22:50 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-17 20:29 [PATCH 01/25] xilinx-kernel: bbclass to handle linux kernel hw/sw integration Adrian Alonso
2011-01-17 20:29 ` [PATCH 02/25] xilinx-boot: bbclass to handle u-boot " Adrian Alonso
2011-01-17 20:29 ` [PATCH 03/25] gcc: crosssdk unset TARGET_FPU Adrian Alonso
2011-01-17 23:55   ` Ilya Yanok
2011-01-18  0:59     ` Adrian Alonso
2011-01-18  1:45       ` Ilya Yanok
2011-01-20  2:11       ` Ilya Yanok
2011-01-20 17:35         ` Saul Wold
2011-01-20 17:53           ` Adrian Alonso
2011-01-21  0:43             ` Ilya Yanok
2011-01-21  0:47           ` [PATCH] native,nativesdk,crosssdk: reset TARGET_FPU Ilya Yanok
2011-01-17 20:29 ` [PATCH 04/25] u-boot: update version use xilinx-boot bbclass Adrian Alonso
2011-01-17 20:29 ` [PATCH 05/25] u-boot: disable -Os option not supported by gcc Adrian Alonso
2011-01-20 18:53   ` Darren Hart
2011-01-20 18:55     ` Darren Hart
2011-01-20 21:41       ` Adrian Alonso
2011-01-20 23:05     ` Wolfgang Denk
2011-01-20 23:24       ` Richard Purdie
2011-01-22 14:48         ` Wolfgang Denk
2011-01-23  0:11           ` Richard Purdie
2011-01-25  9:09             ` Wolfgang Denk
2011-01-25 22:49               ` Richard Purdie
2011-01-17 20:29 ` [PATCH 06/25] virtex4: fix machine name in u-boot preferred version Adrian Alonso
2011-01-17 20:29 ` [PATCH 07/25] virtex5: " Adrian Alonso
2011-01-17 20:29 ` [PATCH 08/25] xilinx-boot: add ml405 in default target configuration Adrian Alonso
2011-01-17 20:29 ` [PATCH 09/25] u-boot-xilinx: ml405 uartlite support Adrian Alonso
2011-01-17 20:29 ` [PATCH 10/25] xilinx-boot: split configure function Adrian Alonso
2011-01-17 20:29 ` [PATCH 11/25] xilinx-boot: add do_mk_xparam function Adrian Alonso
2011-01-17 20:29 ` [PATCH 12/25] u-boot-xilinx: ml507 uartlite support Adrian Alonso
2011-01-17 20:29 ` [PATCH 13/25] u-boot-xilinx: remove hardcoded include path Adrian Alonso
2011-01-17 20:29 ` [PATCH 14/25] linux-xilinx: update kernel version 2.6.37 rc4 Adrian Alonso
2011-01-17 20:29 ` [PATCH 15/25] linux-xilinx: remove hardcoded include path Adrian Alonso
2011-01-17 20:29 ` [PATCH 16/25] linux-xilinx: add license files checksum Adrian Alonso
2011-01-17 20:29 ` [PATCH 17/25] device-table: add tty uartlite static dev nodes Adrian Alonso
2011-01-17 20:29 ` [PATCH 18/25] u-boot-xilinx: add license files checksum Adrian Alonso
2011-01-17 20:29 ` [PATCH 19/25] tune-ppc405: append ppc440 in PACKAGE_EXTRA_ARCHS Adrian Alonso
2011-01-17 20:29 ` [PATCH 20/25] tune-ppc440: append ppc405 " Adrian Alonso
2011-01-17 20:29 ` [PATCH 21/25] virtex4: update default serial console Adrian Alonso
2011-01-17 20:29 ` [PATCH 22/25] virtex5: " Adrian Alonso
2011-01-17 20:29 ` [PATCH 23/25] defconfig: virtex4 config for linux 2.6.37.rc4 Adrian Alonso
2011-01-17 20:29 ` [PATCH 24/25] defconfig: virtex5 " Adrian Alonso
2011-01-17 20:29 ` [PATCH 25/25] openssl: powerpc gnueabi toolchain support Adrian Alonso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.