All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support
@ 2014-08-27  4:57 Zhenhua Luo
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support Zhenhua Luo
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Zhenhua Luo @ 2014-08-27  4:57 UTC (permalink / raw)
  To: meta-freescale

The patch serias add the recipes of FSL layerscape1 ARM targets support.

Supported targets: ls1021aqds, ls1021atwr

The QorIQ LS1021A processor provides extensive integration and power 
efficiency for fanless, small form factor enterprise networking applications. 
Incorporating dual ARM? Cortex?-A7 cores running up to 1.0 GHz, the LS1021A 
processor delivers pre-silicon CoreMark performance of over 6,000, as well 
as virtualization support, advanced security features and the broadest array 
of high-speed interconnects and optimized peripheral features ever offered 
in a sub-3 W processor.

More details can be found in
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=LS1021A&fsrch=1&sr=1&pageNum=1

Zhenhua Luo (6):
  Add common configure files for Layerscape1 support
  Add u-boot recipe for Layerscape1 support
  Add kernel recipe for Layerscape1 support
  Add rcw recipe for Layerscape1 support
  Add machine conf for ls1021atwr
  Add machine conf file for ls1021aqds

 conf/machine/include/fsl-ls-default-providers.inc |   6 ++
 conf/machine/include/fsl-ls-default-settings.inc  |   4 +
 conf/machine/include/fsl-ls-default-versions.inc  |   2 +
 conf/machine/include/ls-base.inc                  |  20 ++++
 conf/machine/ls1021aqds.conf                      |  15 +++
 conf/machine/ls1021atwr.conf                      |  14 +++
 recipes-bsp/rcw/rcw_git.bb                        |  50 ++++++++++
 recipes-bsp/u-boot/u-boot-ls1_2013.10.bb          | 109 ++++++++++++++++++++++
 recipes-kernel/linux/linux-ls1.inc                |  30 ++++++
 recipes-kernel/linux/linux-ls1_3.12.bb            |  15 +++
 10 files changed, 265 insertions(+)
 create mode 100644 conf/machine/include/fsl-ls-default-providers.inc
 create mode 100644 conf/machine/include/fsl-ls-default-settings.inc
 create mode 100644 conf/machine/include/fsl-ls-default-versions.inc
 create mode 100644 conf/machine/include/ls-base.inc
 create mode 100644 conf/machine/ls1021aqds.conf
 create mode 100644 conf/machine/ls1021atwr.conf
 create mode 100644 recipes-bsp/rcw/rcw_git.bb
 create mode 100644 recipes-bsp/u-boot/u-boot-ls1_2013.10.bb
 create mode 100644 recipes-kernel/linux/linux-ls1.inc
 create mode 100644 recipes-kernel/linux/linux-ls1_3.12.bb

-- 
1.9.3



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

* [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support
  2014-08-27  4:57 [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support Zhenhua Luo
@ 2014-08-27  4:57 ` Zhenhua Luo
  2014-08-27 12:46   ` Otavio Salvador
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe " Zhenhua Luo
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Zhenhua Luo @ 2014-08-27  4:57 UTC (permalink / raw)
  To: meta-freescale

* conf/machine/include/fsl-ls-default-providers.inc
* conf/machine/include/fsl-ls-default-settings.inc
* conf/machine/include/fsl-ls-default-versions.inc
* conf/machine/include/ls-base.inc

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 conf/machine/include/fsl-ls-default-providers.inc |  6 ++++++
 conf/machine/include/fsl-ls-default-settings.inc  |  4 ++++
 conf/machine/include/fsl-ls-default-versions.inc  |  2 ++
 conf/machine/include/ls-base.inc                  | 20 ++++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 conf/machine/include/fsl-ls-default-providers.inc
 create mode 100644 conf/machine/include/fsl-ls-default-settings.inc
 create mode 100644 conf/machine/include/fsl-ls-default-versions.inc
 create mode 100644 conf/machine/include/ls-base.inc

diff --git a/conf/machine/include/fsl-ls-default-providers.inc b/conf/machine/include/fsl-ls-default-providers.inc
new file mode 100644
index 0000000..827124c
--- /dev/null
+++ b/conf/machine/include/fsl-ls-default-providers.inc
@@ -0,0 +1,6 @@
+# Freescale BSP default providers
+
+PREFERRED_PROVIDER_u-boot_ls102xa ?= "u-boot-ls1"
+PREFERRED_PROVIDER_virtual/bootloader_ls102xa ?= "u-boot-ls1"
+PREFERRED_PROVIDER_virtual/kernel_ls102xa ?= "linux-ls1"
+
diff --git a/conf/machine/include/fsl-ls-default-settings.inc b/conf/machine/include/fsl-ls-default-settings.inc
new file mode 100644
index 0000000..45ca43a
--- /dev/null
+++ b/conf/machine/include/fsl-ls-default-settings.inc
@@ -0,0 +1,4 @@
+# Freescale BSP default settings
+
+IMAGE_CLASSES = "image_types_uboot"
+
diff --git a/conf/machine/include/fsl-ls-default-versions.inc b/conf/machine/include/fsl-ls-default-versions.inc
new file mode 100644
index 0000000..ddfaf52
--- /dev/null
+++ b/conf/machine/include/fsl-ls-default-versions.inc
@@ -0,0 +1,2 @@
+# Freescale BSP default versions
+
diff --git a/conf/machine/include/ls-base.inc b/conf/machine/include/ls-base.inc
new file mode 100644
index 0000000..567f55f
--- /dev/null
+++ b/conf/machine/include/ls-base.inc
@@ -0,0 +1,20 @@
+# Provides the Layerscape common settings
+
+include conf/machine/include/fsl-ls-default-settings.inc
+include conf/machine/include/fsl-ls-default-versions.inc
+include conf/machine/include/fsl-ls-default-providers.inc
+
+require conf/machine/include/soc-family.inc
+
+UBOOT_ENTRYPOINT_ls102xa = "0x80008000"
+
+MACHINE_FEATURES = "pci ext2 ext3 serial"
+MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"
+
+KERNEL_IMAGETYPE ?= "uImage"
+
+SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyEHV0 115200;ttyLP0"
+SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
+USE_VT ?= "0"
+
+DEFAULTTUNE_ls102xa = "cortexa7hf-neon"
-- 
1.9.3



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

* [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe for Layerscape1 support
  2014-08-27  4:57 [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support Zhenhua Luo
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support Zhenhua Luo
@ 2014-08-27  4:57 ` Zhenhua Luo
  2014-08-27 12:55   ` Otavio Salvador
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 3/6] Add kernel " Zhenhua Luo
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Zhenhua Luo @ 2014-08-27  4:57 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 recipes-bsp/u-boot/u-boot-ls1_2013.10.bb | 109 +++++++++++++++++++++++++++++++
 1 file changed, 109 insertions(+)
 create mode 100644 recipes-bsp/u-boot/u-boot-ls1_2013.10.bb

diff --git a/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb b/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb
new file mode 100644
index 0000000..703c6fc
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb
@@ -0,0 +1,109 @@
+require recipes-bsp/u-boot/u-boot.inc
+
+LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1"
+LIC_FILES_CHKSUM = " \
+    file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \
+    file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \
+    file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+    file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \
+"
+
+SRC_URI = "git://git.freescale.com/layerscape/ls1021a/u-boot.git;branch=LS1-dev"
+SRCREV = "48bfc6985a0524bc5c388bb9a9a6a6bc4a121ec5"
+
+PROVIDES += "u-boot"
+
+UBOOT_LOCALVERSION ?= "${SDK_VERSION}"
+
+S = "${WORKDIR}/git"
+
+do_stage_endian_swap_tool () {
+    install -m 755 ${S}/byte_swap.tcl ${STAGING_BINDIR_NATIVE}
+}
+
+addtask stage_endian_swap_tool before do_compile after do_patch
+
+do_compile () {
+    unset LDFLAGS
+    unset CFLAGS
+    unset CPPFLAGS
+
+    if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
+    then
+        head=`git rev-parse --verify --short HEAD 2> /dev/null`
+        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion
+        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion
+    fi
+
+    if [ "x${UBOOT_MACHINES}" = "x" ]; then
+        UBOOT_MACHINES="${UBOOT_MACHINE}"
+    fi
+
+    for board in ${UBOOT_MACHINES}; do
+        oe_runmake O=${board} distclean
+        oe_runmake O=${board} ${board}
+        oe_runmake O=${board} all
+        case "${board}" in
+             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
+             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
+             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap"
+                       ${bindir}/tclsh byte_swap.tcl ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin 8 ;;
+             *)        UBOOT_TARGET="u-boot";;
+        esac
+    done
+}
+
+do_install(){
+    if [ "x${UBOOT_MACHINES}" = "x" ]; then
+        UBOOT_MACHINES="${UBOOT_MACHINE}"
+    fi
+
+    for board in ${UBOOT_MACHINES}; do
+        case "${board}" in   
+             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
+             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
+             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
+             *)        UBOOT_TARGET="u-boot";;
+        esac
+
+        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
+            install -d ${D}/boot/
+            install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
+            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin
+        fi
+    done
+}
+
+do_deploy(){
+    if [ "x${UBOOT_MACHINES}" = "x" ]; then
+        UBOOT_MACHINES="${UBOOT_MACHINE}"
+    fi
+
+    for board in ${UBOOT_MACHINES}; do
+        case "${board}" in
+             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
+             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
+             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
+             *)        UBOOT_TARGET="u-boot";;
+        esac
+       
+        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
+            mkdir -p ${DEPLOYDIR}
+            install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
+            cd ${DEPLOYDIR}
+            rm -f ${UBOOT_TARGET}-${board}.bin
+            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin
+        fi
+    done
+}
+addtask deploy after do_install
+
+PACKAGES += "${PN}-images"
+FILES_${PN}-images += "/boot"
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
+
-- 
1.9.3



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

* [meta-fsl-arm][PATCH v2 3/6] Add kernel recipe for Layerscape1 support
  2014-08-27  4:57 [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support Zhenhua Luo
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support Zhenhua Luo
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe " Zhenhua Luo
@ 2014-08-27  4:57 ` Zhenhua Luo
  2014-08-27 13:00   ` Otavio Salvador
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 4/6] Add rcw " Zhenhua Luo
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Zhenhua Luo @ 2014-08-27  4:57 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 recipes-kernel/linux/linux-ls1.inc     | 30 ++++++++++++++++++++++++++++++
 recipes-kernel/linux/linux-ls1_3.12.bb | 15 +++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-ls1.inc
 create mode 100644 recipes-kernel/linux/linux-ls1_3.12.bb

diff --git a/recipes-kernel/linux/linux-ls1.inc b/recipes-kernel/linux/linux-ls1.inc
new file mode 100644
index 0000000..c1c976b
--- /dev/null
+++ b/recipes-kernel/linux/linux-ls1.inc
@@ -0,0 +1,30 @@
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+inherit kernel
+
+# Append a local version if it is defined 
+SCMVERSION ?= "y"
+
+SRC_URI = "git://git.freescale.com/layerscape/ls1021a/linux.git;branch=${SRCBRANCH}"
+
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend() {
+    # copy desired defconfig so we pick it up for the real kernel_do_configure
+    cp ${KERNEL_DEFCONFIG} ${B}/.config
+
+    # add git revision to the local version
+    if [ "${SCMVERSION}" = "y" ]; then
+        # append sdk version if SDK_VERSION is defined
+        sdkversion=''
+        if [ -n "${SDK_VERSION}" ]; then
+            sdkversion="-${SDK_VERSION}"
+        fi
+        head=`git rev-parse --verify --short HEAD 2> /dev/null`
+        printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion
+    fi
+}
+
diff --git a/recipes-kernel/linux/linux-ls1_3.12.bb b/recipes-kernel/linux/linux-ls1_3.12.bb
new file mode 100644
index 0000000..c0a4de4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ls1_3.12.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Linux Kernel for Freescale layerscape platforms"
+DESCRIPTION = "Linux Kernel provided and supported by Freescale with focus on \
+Layerscape1 Family Boards. "
+
+require recipes-kernel/linux/linux-ls1.inc
+require recipes-kernel/linux/linux-dtb.inc
+
+DEPENDS_append = " libgcc"
+KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
+KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
+
+SRCBRANCH = "ls1-dev"
+SRCREV = "de1cb4b3c16be38cf3981fd0afa143ad24283d07"
+
+COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
-- 
1.9.3



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

* [meta-fsl-arm][PATCH v2 4/6] Add rcw recipe for Layerscape1 support
  2014-08-27  4:57 [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support Zhenhua Luo
                   ` (2 preceding siblings ...)
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 3/6] Add kernel " Zhenhua Luo
@ 2014-08-27  4:57 ` Zhenhua Luo
  2014-08-27 13:07   ` Otavio Salvador
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 5/6] Add machine conf for ls1021atwr Zhenhua Luo
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 6/6] Add machine conf file for ls1021aqds Zhenhua Luo
  5 siblings, 1 reply; 20+ messages in thread
From: Zhenhua Luo @ 2014-08-27  4:57 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 recipes-bsp/rcw/rcw_git.bb | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 recipes-bsp/rcw/rcw_git.bb

diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb
new file mode 100644
index 0000000..f6cd4d8
--- /dev/null
+++ b/recipes-bsp/rcw/rcw_git.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Reset Configuration Word"
+DESCRIPTION = "Reset Configuration Word - hardware boot-time parameters for the QorIQ targets"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e"
+
+inherit deploy
+
+SRC_URI = "git://git.freescale.com/layerscape/ls1021a/rcw.git;branch=LS1-SDK"
+SRCREV = "7b358441dfd35afbf01491649cc3f4396154a546"
+
+S = "${WORKDIR}/git"
+
+export PYTHON
+do_compile_append () {
+    if [ "ls1021aqds" = "${M}" ];then
+       for img in `find ${S} -name "*qspiboot*.bin"`; do
+           img_swap=`echo ${img} | awk '{sub("qspiboot","qspiboot_swap"); print $0}'`
+           ${bindir}/tclsh ${M}/byte_swap.tcl ${img} ${img_swap} 8
+       done
+    fi
+}
+
+do_install () {
+    make install
+
+    M=`echo ${MACHINE} | sed s/-64b//g`
+    for img in `find ${S} -name "*qspiboot_swap*.bin"`; do
+        rcw_subdir="`dirname ${img} | xargs basename`"
+        install ${img} ${S}/${M}/${M}/${rcw_subdir}
+    done
+
+    install -d ${D}/boot/rcw
+    cp -r ${S}/${M}/${M}/* ${D}/boot/rcw
+}
+
+do_deploy () {
+    M=`echo ${MACHINE} | sed s/-64b//g`
+    install -d ${DEPLOYDIR}/rcw
+    cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw
+}
+addtask deploy after do_install
+
+PACKAGES += "${PN}-image"
+FILES_${PN}-image += "/boot"
+
+ALLOW_EMPTY_${PN} = "1"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_HOST_ls102xa = "arm-poky-linux-gnueabi"
+COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
-- 
1.9.3



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

* [meta-fsl-arm][PATCH v2 5/6] Add machine conf for ls1021atwr
  2014-08-27  4:57 [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support Zhenhua Luo
                   ` (3 preceding siblings ...)
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 4/6] Add rcw " Zhenhua Luo
@ 2014-08-27  4:57 ` Zhenhua Luo
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 6/6] Add machine conf file for ls1021aqds Zhenhua Luo
  5 siblings, 0 replies; 20+ messages in thread
From: Zhenhua Luo @ 2014-08-27  4:57 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 conf/machine/ls1021atwr.conf | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 conf/machine/ls1021atwr.conf

diff --git a/conf/machine/ls1021atwr.conf b/conf/machine/ls1021atwr.conf
new file mode 100644
index 0000000..e142dc1
--- /dev/null
+++ b/conf/machine/ls1021atwr.conf
@@ -0,0 +1,14 @@
+#@TYPE: Machine
+#@NAME: Freescale LS1021ATWR board
+#@SOC: ls102xa
+#@DESCRIPTION: Machine configuration for running LS1021ATWR in 32-bit mode
+#@MAINTAINER: Zhenhua Luo <zhenhua.luo@freescale.com>
+
+require conf/machine/include/ls-base.inc
+require conf/machine/include/tune-cortexa7.inc
+
+SOC_FAMILY = "ls102xa"
+UBOOT_MACHINE ?= "ls1021atwr_nor ls1021atwr_sdcard ls1021atwr_letech"
+KERNEL_DEVICETREE ?= "ls1021a-twr.dtb"
+KERNEL_DEFCONFIG ?= "${S}/arch/arm/configs/ls1021a_defconfig"
+
-- 
1.9.3



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

* [meta-fsl-arm][PATCH v2 6/6] Add machine conf file for ls1021aqds
  2014-08-27  4:57 [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support Zhenhua Luo
                   ` (4 preceding siblings ...)
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 5/6] Add machine conf for ls1021atwr Zhenhua Luo
@ 2014-08-27  4:57 ` Zhenhua Luo
  5 siblings, 0 replies; 20+ messages in thread
From: Zhenhua Luo @ 2014-08-27  4:57 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
---
 conf/machine/ls1021aqds.conf | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 conf/machine/ls1021aqds.conf

diff --git a/conf/machine/ls1021aqds.conf b/conf/machine/ls1021aqds.conf
new file mode 100644
index 0000000..6249d2d
--- /dev/null
+++ b/conf/machine/ls1021aqds.conf
@@ -0,0 +1,15 @@
+#@TYPE: Machine
+#@NAME: Freescale LS1021AQDS board
+#@SOC: ls102xa
+#@DESCRIPTION: Machine configuration for running LS1021AQDS in 32-bit mode
+#@MAINTAINER: Zhenhua Luo <zhenhua.luo@freescale.com>
+
+require conf/machine/include/ls-base.inc
+require conf/machine/include/tune-cortexa7.inc
+
+SOC_FAMILY = "ls102xa"
+UBOOT_MACHINE ?= "ls1021aqds_nor ls1021aqds_spi \
+        ls1021aqds_nor_secboot ls1021aqds_letech"
+KERNEL_DEVICETREE = "ls1021a-qds.dtb"
+KERNEL_DEFCONFIG = "${S}/arch/arm/configs/ls1021a_defconfig"
+
-- 
1.9.3



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

* Re: [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support Zhenhua Luo
@ 2014-08-27 12:46   ` Otavio Salvador
  2014-08-28 10:44     ` zhenhua.luo
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2014-08-27 12:46 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: meta-freescale

On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
> * conf/machine/include/fsl-ls-default-providers.inc
> * conf/machine/include/fsl-ls-default-settings.inc
> * conf/machine/include/fsl-ls-default-versions.inc

Please let's get these included in ls-base.inc. I plan to get rid of
similar files from imx very soon as it is easier to spot the values if
you have it on the family's file.

> * conf/machine/include/ls-base.inc
>
> Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>

Also the commit log needs rework:

ls-base.inc: Add base configuration for Layerspace1 support

<small description of what this includes>

Signed-of-by: ...

> ---
>  conf/machine/include/fsl-ls-default-providers.inc |  6 ++++++
>  conf/machine/include/fsl-ls-default-settings.inc  |  4 ++++
>  conf/machine/include/fsl-ls-default-versions.inc  |  2 ++
>  conf/machine/include/ls-base.inc                  | 20 ++++++++++++++++++++
>  4 files changed, 32 insertions(+)
>  create mode 100644 conf/machine/include/fsl-ls-default-providers.inc
>  create mode 100644 conf/machine/include/fsl-ls-default-settings.inc
>  create mode 100644 conf/machine/include/fsl-ls-default-versions.inc
>  create mode 100644 conf/machine/include/ls-base.inc
>
> diff --git a/conf/machine/include/fsl-ls-default-providers.inc b/conf/machine/include/fsl-ls-default-providers.inc
> new file mode 100644
> index 0000000..827124c
> --- /dev/null
> +++ b/conf/machine/include/fsl-ls-default-providers.inc
> @@ -0,0 +1,6 @@
> +# Freescale BSP default providers
> +
> +PREFERRED_PROVIDER_u-boot_ls102xa ?= "u-boot-ls1"
> +PREFERRED_PROVIDER_virtual/bootloader_ls102xa ?= "u-boot-ls1"
> +PREFERRED_PROVIDER_virtual/kernel_ls102xa ?= "linux-ls1"

Please move to ls-base.inc.

> diff --git a/conf/machine/include/fsl-ls-default-settings.inc b/conf/machine/include/fsl-ls-default-settings.inc
> new file mode 100644
> index 0000000..45ca43a
> --- /dev/null
> +++ b/conf/machine/include/fsl-ls-default-settings.inc
> @@ -0,0 +1,4 @@
> +# Freescale BSP default settings
> +
> +IMAGE_CLASSES = "image_types_uboot"

Does ALL machines using ls going to use this? I'd prefer this to be in
machine file.

> diff --git a/conf/machine/include/fsl-ls-default-versions.inc b/conf/machine/include/fsl-ls-default-versions.inc
> new file mode 100644
> index 0000000..ddfaf52
> --- /dev/null
> +++ b/conf/machine/include/fsl-ls-default-versions.inc
> @@ -0,0 +1,2 @@
> +# Freescale BSP default versions

Drop.

> diff --git a/conf/machine/include/ls-base.inc b/conf/machine/include/ls-base.inc
> new file mode 100644
> index 0000000..567f55f
> --- /dev/null
> +++ b/conf/machine/include/ls-base.inc
> @@ -0,0 +1,20 @@
> +# Provides the Layerscape common settings
> +
> +include conf/machine/include/fsl-ls-default-settings.inc
> +include conf/machine/include/fsl-ls-default-versions.inc
> +include conf/machine/include/fsl-ls-default-providers.inc

Drop as its content will be here.

> +require conf/machine/include/soc-family.inc
> +
> +UBOOT_ENTRYPOINT_ls102xa = "0x80008000"
> +
> +MACHINE_FEATURES = "pci ext2 ext3 serial"
> +MACHINE_EXTRA_RRECOMMENDS = "u-boot udev-extraconf"

u-boot should be a dependency of the image, not added in all machines.

> +KERNEL_IMAGETYPE ?= "uImage"

Ok.

> +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyEHV0 115200;ttyLP0"
> +SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"

Those ought to be in machine files. This vary from one machine to another.

> +USE_VT ?= "0"

This is default.

> +DEFAULTTUNE_ls102xa = "cortexa7hf-neon"

Ok.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe for Layerscape1 support
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe " Zhenhua Luo
@ 2014-08-27 12:55   ` Otavio Salvador
  2014-08-28 11:53     ` zhenhua.luo
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2014-08-27 12:55 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: meta-freescale

On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
> Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>

Please follow the guidelines for commit log:

u-boot-ls1: Add recipe for Layerscape1 support

...

Signed-off-by: ...


> ---
>  recipes-bsp/u-boot/u-boot-ls1_2013.10.bb | 109 +++++++++++++++++++++++++++++++
>  1 file changed, 109 insertions(+)
>  create mode 100644 recipes-bsp/u-boot/u-boot-ls1_2013.10.bb
>
> diff --git a/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb b/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb
> new file mode 100644
> index 0000000..703c6fc
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot-ls1_2013.10.bb
> @@ -0,0 +1,109 @@
> +require recipes-bsp/u-boot/u-boot.inc
> +
> +LICENSE = "GPLv2 & BSD-3-Clause & BSD-2-Clause & LGPL-2.0 & LGPL-2.1"
> +LIC_FILES_CHKSUM = " \
> +    file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> +    file://Licenses/bsd-2-clause.txt;md5=6a31f076f5773aabd8ff86191ad6fdd5 \
> +    file://Licenses/bsd-3-clause.txt;md5=4a1190eac56a9db675d58ebe86eaf50c \
> +    file://Licenses/lgpl-2.0.txt;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
> +    file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \
> +"
> +

...

> +SRC_URI = "git://git.freescale.com/layerscape/ls1021a/u-boot.git;branch=LS1-dev"
> +SRCREV = "48bfc6985a0524bc5c388bb9a9a6a6bc4a121ec5"

Use SRCBRANCH.

> +PROVIDES += "u-boot"
> +
> +UBOOT_LOCALVERSION ?= "${SDK_VERSION}"

UBOOT_LOCALVERSION is already supported in u-boot.inc

> +S = "${WORKDIR}/git"
> +
> +do_stage_endian_swap_tool () {
> +    install -m 755 ${S}/byte_swap.tcl ${STAGING_BINDIR_NATIVE}
> +}
> +
> +addtask stage_endian_swap_tool before do_compile after do_patch

What this tcl script does? it seems it should be split from here.

> +do_compile () {
> +    unset LDFLAGS
> +    unset CFLAGS
> +    unset CPPFLAGS
> +
> +    if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
> +    then
> +        head=`git rev-parse --verify --short HEAD 2> /dev/null`
> +        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${B}/.scmversion
> +        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head > ${S}/.scmversion
> +    fi

UBOOT_LOCALVERSION is already supported in u-boot.inc

> +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> +    fi
> +
> +    for board in ${UBOOT_MACHINES}; do
> +        oe_runmake O=${board} distclean
> +        oe_runmake O=${board} ${board}
> +        oe_runmake O=${board} all
> +        case "${board}" in
> +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap"
> +                       ${bindir}/tclsh byte_swap.tcl ${S}/${board}/u-boot.bin ${S}/${board}/${UBOOT_TARGET}.bin 8 ;;
> +             *)        UBOOT_TARGET="u-boot";;
> +        esac
> +    done
> +}
> +
> +do_install(){
> +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> +    fi
> +
> +    for board in ${UBOOT_MACHINES}; do
> +        case "${board}" in
> +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
> +             *)        UBOOT_TARGET="u-boot";;
> +        esac
> +
> +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
> +            install -d ${D}/boot/
> +            install ${S}/${board}/${UBOOT_TARGET}.bin ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${D}/boot/${UBOOT_TARGET}.bin
> +        fi
> +    done
> +}
> +
> +do_deploy(){
> +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> +    fi
> +
> +    for board in ${UBOOT_MACHINES}; do
> +        case "${board}" in
> +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
> +             *)        UBOOT_TARGET="u-boot";;
> +        esac
> +
> +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
> +            mkdir -p ${DEPLOYDIR}
> +            install ${S}/${board}/${UBOOT_TARGET}.bin ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> +            cd ${DEPLOYDIR}
> +            rm -f ${UBOOT_TARGET}-${board}.bin
> +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin ${UBOOT_TARGET}-${board}.bin
> +        fi
> +    done
> +}
> +addtask deploy after do_install
> +
> +PACKAGES += "${PN}-images"
> +FILES_${PN}-images += "/boot"
> +
> +ALLOW_EMPTY_${PN} = "1"
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
> +

I understand why you are doing this all here but I think we need to
address this in the uboot-config.bbclass so we have a standard way for
this.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH v2 3/6] Add kernel recipe for Layerscape1 support
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 3/6] Add kernel " Zhenhua Luo
@ 2014-08-27 13:00   ` Otavio Salvador
  2014-08-28 12:14     ` zhenhua.luo
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2014-08-27 13:00 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: meta-freescale

On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
> Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
> ---
>  recipes-kernel/linux/linux-ls1.inc     | 30 ++++++++++++++++++++++++++++++
>  recipes-kernel/linux/linux-ls1_3.12.bb | 15 +++++++++++++++
>  2 files changed, 45 insertions(+)
>  create mode 100644 recipes-kernel/linux/linux-ls1.inc
>  create mode 100644 recipes-kernel/linux/linux-ls1_3.12.bb
>
> diff --git a/recipes-kernel/linux/linux-ls1.inc b/recipes-kernel/linux/linux-ls1.inc
> new file mode 100644
> index 0000000..c1c976b
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1.inc
> @@ -0,0 +1,30 @@
> +LICENSE = "GPLv2"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
> +
> +inherit kernel
> +
> +# Append a local version if it is defined
> +SCMVERSION ?= "y"
> +
> +SRC_URI = "git://git.freescale.com/layerscape/ls1021a/linux.git;branch=${SRCBRANCH}"
> +
> +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
> +
> +S = "${WORKDIR}/git"
> +
> +do_configure_prepend() {
> +    # copy desired defconfig so we pick it up for the real kernel_do_configure
> +    cp ${KERNEL_DEFCONFIG} ${B}/.config
> +
> +    # add git revision to the local version
> +    if [ "${SCMVERSION}" = "y" ]; then
> +        # append sdk version if SDK_VERSION is defined
> +        sdkversion=''
> +        if [ -n "${SDK_VERSION}" ]; then
> +            sdkversion="-${SDK_VERSION}"
> +        fi
> +        head=`git rev-parse --verify --short HEAD 2> /dev/null`
> +        printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion
> +    fi
> +}

We have similar code in linux-imx.inc; I think we ought to move this
to a fsl-kernel-localversion.bbclass file to avoid duplicating the
logic here. I can work on this if you want.

> diff --git a/recipes-kernel/linux/linux-ls1_3.12.bb b/recipes-kernel/linux/linux-ls1_3.12.bb
> new file mode 100644
> index 0000000..c0a4de4
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1_3.12.bb
> @@ -0,0 +1,15 @@
> +SUMMARY = "Linux Kernel for Freescale layerscape platforms"
> +DESCRIPTION = "Linux Kernel provided and supported by Freescale with focus on \
> +Layerscape1 Family Boards. "
> +
> +require recipes-kernel/linux/linux-ls1.inc
> +require recipes-kernel/linux/linux-dtb.inc
> +
> +DEPENDS_append = " libgcc"
> +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
> +KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"

Seems very wrong. What the reasion for this?

> +SRCBRANCH = "ls1-dev"
> +SRCREV = "de1cb4b3c16be38cf3981fd0afa143ad24283d07"
> +
> +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"

I'd use the SoC family here.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH v2 4/6] Add rcw recipe for Layerscape1 support
  2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 4/6] Add rcw " Zhenhua Luo
@ 2014-08-27 13:07   ` Otavio Salvador
  2014-08-28 12:32     ` zhenhua.luo
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2014-08-27 13:07 UTC (permalink / raw)
  To: Zhenhua Luo; +Cc: meta-freescale

On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com> wrote:
> Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>

Same drill for the commit log.

> ---
>  recipes-bsp/rcw/rcw_git.bb | 50 ++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 recipes-bsp/rcw/rcw_git.bb
>
> diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb
> new file mode 100644
> index 0000000..f6cd4d8
> --- /dev/null
> +++ b/recipes-bsp/rcw/rcw_git.bb
> @@ -0,0 +1,50 @@
> +SUMMARY = "Reset Configuration Word"
> +DESCRIPTION = "Reset Configuration Word - hardware boot-time parameters for the QorIQ targets"
> +LICENSE = "BSD"
> +LIC_FILES_CHKSUM = "file://rcw.py;beginline=8;endline=28;md5=9ba0b28922dd187b06b6c8ebcfdd208e"
> +
> +inherit deploy
> +
> +SRC_URI = "git://git.freescale.com/layerscape/ls1021a/rcw.git;branch=LS1-SDK"
> +SRCREV = "7b358441dfd35afbf01491649cc3f4396154a546"
> +
> +S = "${WORKDIR}/git"
> +
> +export PYTHON
> +do_compile_append () {
> +    if [ "ls1021aqds" = "${M}" ];then
> +       for img in `find ${S} -name "*qspiboot*.bin"`; do
> +           img_swap=`echo ${img} | awk '{sub("qspiboot","qspiboot_swap"); print $0}'`
> +           ${bindir}/tclsh ${M}/byte_swap.tcl ${img} ${img_swap} 8
> +       done
> +    fi

The tcl file needs to come from a dependency so we need, as I said in
the u-boot patch, split it out and have it as dependency here. Another
thing, this calls should be moved to the Makefile and have a
RCW_MACHINE concept or similar.

> +}
> +
> +do_install () {
> +    make install
> +
> +    M=`echo ${MACHINE} | sed s/-64b//g`
> +    for img in `find ${S} -name "*qspiboot_swap*.bin"`; do
> +        rcw_subdir="`dirname ${img} | xargs basename`"
> +        install ${img} ${S}/${M}/${M}/${rcw_subdir}
> +    done
> +
> +    install -d ${D}/boot/rcw
> +    cp -r ${S}/${M}/${M}/* ${D}/boot/rcw

This should be done in the Makefile.

> +}
> +
> +do_deploy () {
> +    M=`echo ${MACHINE} | sed s/-64b//g`
> +    install -d ${DEPLOYDIR}/rcw
> +    cp -r ${S}/${M}/${M}/* ${DEPLOYDIR}/rcw
> +}
> +addtask deploy after do_install
> +
> +PACKAGES += "${PN}-image"
> +FILES_${PN}-image += "/boot"
> +
> +ALLOW_EMPTY_${PN} = "1"
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +COMPATIBLE_HOST_ls102xa = "arm-poky-linux-gnueabi"

This makes this not compatible with custom SDKs.

> +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"

I'd use SoC family.

> --
> 1.9.3
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale



-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support
  2014-08-27 12:46   ` Otavio Salvador
@ 2014-08-28 10:44     ` zhenhua.luo
  2014-08-31 19:47       ` Otavio Salvador
  0 siblings, 1 reply; 20+ messages in thread
From: zhenhua.luo @ 2014-08-28 10:44 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

> -----Original Message-----
> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
> Behalf Of Otavio Salvador
> Sent: Wednesday, August 27, 2014 8:47 PM
> 
> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
> wrote:
> > diff --git a/conf/machine/include/fsl-ls-default-settings.inc
> > b/conf/machine/include/fsl-ls-default-settings.inc
> > new file mode 100644
> > index 0000000..45ca43a
> > --- /dev/null
> > +++ b/conf/machine/include/fsl-ls-default-settings.inc
> > @@ -0,0 +1,4 @@
> > +# Freescale BSP default settings
> > +
> > +IMAGE_CLASSES = "image_types_uboot"
> 
> Does ALL machines using ls going to use this? I'd prefer this to be in
> machine file.
[Luo Zhenhua-B19537] Current supported ls1 targets use the same setting, the variable will be moved to machine conf if there is special case in future. 

> > +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyEHV0
> 115200;ttyLP0"
> > +SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
> 
> Those ought to be in machine files. This vary from one machine to another.
> 
> > +USE_VT ?= "0"
> This is default.
[Luo Zhenhua-B19537] I double-checked the sysvinit-inittab recipe, the default value of USE_VT is "1", so the item should be here. 


Best Regards,

Zhenhua

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

* Re: [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe for Layerscape1 support
  2014-08-27 12:55   ` Otavio Salvador
@ 2014-08-28 11:53     ` zhenhua.luo
  2014-08-31 19:54       ` Otavio Salvador
  0 siblings, 1 reply; 20+ messages in thread
From: zhenhua.luo @ 2014-08-28 11:53 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

> -----Original Message-----
> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
> Behalf Of Otavio Salvador
> Sent: Wednesday, August 27, 2014 8:55 PM
> 
> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
> wrote:
> 
> > +do_stage_endian_swap_tool () {
> > +    install -m 755 ${S}/byte_swap.tcl ${STAGING_BINDIR_NATIVE} }
> > +
> > +addtask stage_endian_swap_tool before do_compile after do_patch
> 
> What this tcl script does? it seems it should be split from here.
[Luo Zhenhua-B19537] the script swaps the byte for QSPI boot image, currently it is maintained in ls1 u-boot  What do you mean by "split from here"? 

> > +    if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
> > +    then
> > +        head=`git rev-parse --verify --short HEAD 2> /dev/null`
> > +        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head >
> ${B}/.scmversion
> > +        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head >
> ${S}/.scmversion
> > +    fi
> 
> UBOOT_LOCALVERSION is already supported in u-boot.inc
[Luo Zhenhua-B19537] The UBOOT_LOCALVERSION code is in do_compile function, LS1 build process is different from the definition in poky/meta/recipes-bsp/u-boot/u-boot.inc, so we rewrite the function and keep the code UBOOT_LOCALVERSION code here. 

> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> > +    fi
> > +
> > +    for board in ${UBOOT_MACHINES}; do
> > +        oe_runmake O=${board} distclean
> > +        oe_runmake O=${board} ${board}
> > +        oe_runmake O=${board} all
> > +        case "${board}" in
> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap"
> > +                       ${bindir}/tclsh byte_swap.tcl ${S}/${board}/u-
> boot.bin ${S}/${board}/${UBOOT_TARGET}.bin 8 ;;
> > +             *)        UBOOT_TARGET="u-boot";;
> > +        esac
> > +    done
> > +}
> > +
> > +do_install(){
> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> > +    fi
> > +
> > +    for board in ${UBOOT_MACHINES}; do
> > +        case "${board}" in
> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
> > +             *)        UBOOT_TARGET="u-boot";;
> > +        esac
> > +
> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
> > +            install -d ${D}/boot/
> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
> ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> ${D}/boot/${UBOOT_TARGET}.bin
> > +        fi
> > +    done
> > +}
> > +
> > +do_deploy(){
> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> > +    fi
> > +
> > +    for board in ${UBOOT_MACHINES}; do
> > +        case "${board}" in
> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
> > +             *)        UBOOT_TARGET="u-boot";;
> > +        esac
> > +
> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
> > +            mkdir -p ${DEPLOYDIR}
> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
> ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> > +            cd ${DEPLOYDIR}
> > +            rm -f ${UBOOT_TARGET}-${board}.bin
> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> ${UBOOT_TARGET}-${board}.bin
> > +        fi
> > +    done
> > +}
> > +addtask deploy after do_install
> > +
> > +PACKAGES += "${PN}-images"
> > +FILES_${PN}-images += "/boot"
> > +
> > +ALLOW_EMPTY_${PN} = "1"
> > +
> > +PACKAGE_ARCH = "${MACHINE_ARCH}"
> > +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
> > +
> 
> I understand why you are doing this all here but I think we need to
> address this in the uboot-config.bbclass so we have a standard way for
> this.
[Luo Zhenhua-B19537] Does this mean UBOOT_MACHINE usage will be replaced by UBOOT_CONFIG usage? 
	Seems like only one u-boot config can be built at one time, is it possible to build multiple u-boot options at one build? This is the reason we rewrite the u-boot compile/install/deploy code.  


Best Regards,

Zhenhua

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

* Re: [meta-fsl-arm][PATCH v2 3/6] Add kernel recipe for Layerscape1 support
  2014-08-27 13:00   ` Otavio Salvador
@ 2014-08-28 12:14     ` zhenhua.luo
  2014-08-31 19:49       ` Otavio Salvador
  0 siblings, 1 reply; 20+ messages in thread
From: zhenhua.luo @ 2014-08-28 12:14 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

> -----Original Message-----
> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
> Behalf Of Otavio Salvador
> Sent: Wednesday, August 27, 2014 9:01 PM
> 
> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
> wrote:
> > +
> > +do_configure_prepend() {
> > +    # copy desired defconfig so we pick it up for the real
> kernel_do_configure
> > +    cp ${KERNEL_DEFCONFIG} ${B}/.config
> > +
> > +    # add git revision to the local version
> > +    if [ "${SCMVERSION}" = "y" ]; then
> > +        # append sdk version if SDK_VERSION is defined
> > +        sdkversion=''
> > +        if [ -n "${SDK_VERSION}" ]; then
> > +            sdkversion="-${SDK_VERSION}"
> > +        fi
> > +        head=`git rev-parse --verify --short HEAD 2> /dev/null`
> > +        printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion
> > +    fi
> > +}
> 
> We have similar code in linux-imx.inc; I think we ought to move this to a
> fsl-kernel-localversion.bbclass file to avoid duplicating the logic here.
> I can work on this if you want.
[Luo Zhenhua-B19537] Please go ahead. 

> > +DEPENDS_append = " libgcc"
> > +KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
> > +KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
> 
> Seems very wrong. What the reasion for this?
[Luo Zhenhua-B19537] This code is useless and will be dropped. 

> 
> > +SRCBRANCH = "ls1-dev"
> > +SRCREV = "de1cb4b3c16be38cf3981fd0afa143ad24283d07"
> > +
> > +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
> 
> I'd use the SoC family here.
[Luo Zhenhua-B19537] will use SoC family. 


Best Regards,

Zhenhua

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

* Re: [meta-fsl-arm][PATCH v2 4/6] Add rcw recipe for Layerscape1 support
  2014-08-27 13:07   ` Otavio Salvador
@ 2014-08-28 12:32     ` zhenhua.luo
  0 siblings, 0 replies; 20+ messages in thread
From: zhenhua.luo @ 2014-08-28 12:32 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

> -----Original Message-----
> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
> Behalf Of Otavio Salvador
> Sent: Wednesday, August 27, 2014 9:07 PM
> 
> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
> wrote:
> > +
> > +export PYTHON
> > +do_compile_append () {
> > +    if [ "ls1021aqds" = "${M}" ];then
> > +       for img in `find ${S} -name "*qspiboot*.bin"`; do
> > +           img_swap=`echo ${img} | awk
> '{sub("qspiboot","qspiboot_swap"); print $0}'`
> > +           ${bindir}/tclsh ${M}/byte_swap.tcl ${img} ${img_swap} 8
> > +       done
> > +    fi
> 
> The tcl file needs to come from a dependency so we need, as I said in the
> u-boot patch, split it out and have it as dependency here. Another thing,
> this calls should be moved to the Makefile and have a RCW_MACHINE concept
> or similar.
[Luo Zhenhua-B19537] Yes, the tcl script can be splitted as a separated recipe(E.g. uboot-byteswap-tool). U-boot and rcw can depends on it. This can avoid duplicated location of same script. 

> > +do_install () {
> > +    make install
> > +
> > +    M=`echo ${MACHINE} | sed s/-64b//g`
> > +    for img in `find ${S} -name "*qspiboot_swap*.bin"`; do
> > +        rcw_subdir="`dirname ${img} | xargs basename`"
> > +        install ${img} ${S}/${M}/${M}/${rcw_subdir}
> > +    done
> > +
> > +    install -d ${D}/boot/rcw
> > +    cp -r ${S}/${M}/${M}/* ${D}/boot/rcw
> 
> This should be done in the Makefile.
[Luo Zhenhua-B19537] I will try to update the Makefile. 

> > +PACKAGE_ARCH = "${MACHINE_ARCH}"
> > +COMPATIBLE_HOST_ls102xa = "arm-poky-linux-gnueabi"
> 
> This makes this not compatible with custom SDKs.
[Luo Zhenhua-B19537] Seems like above line is not needed, I will double-check. 

> > +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
> 
> I'd use SoC family.
[Luo Zhenhua-B19537] Sounds good. 


Best Regards,

Zhenhua

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

* Re: [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support
  2014-08-28 10:44     ` zhenhua.luo
@ 2014-08-31 19:47       ` Otavio Salvador
  0 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2014-08-31 19:47 UTC (permalink / raw)
  To: zhenhua.luo; +Cc: meta-freescale

On Thu, Aug 28, 2014 at 7:44 AM, zhenhua.luo@freescale.com
<zhenhua.luo@freescale.com> wrote:
>> -----Original Message-----
>> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
>> Behalf Of Otavio Salvador
>> Sent: Wednesday, August 27, 2014 8:47 PM
>>
>> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
>> wrote:
>> > diff --git a/conf/machine/include/fsl-ls-default-settings.inc
>> > b/conf/machine/include/fsl-ls-default-settings.inc
>> > new file mode 100644
>> > index 0000000..45ca43a
>> > --- /dev/null
>> > +++ b/conf/machine/include/fsl-ls-default-settings.inc
>> > @@ -0,0 +1,4 @@
>> > +# Freescale BSP default settings
>> > +
>> > +IMAGE_CLASSES = "image_types_uboot"
>>
>> Does ALL machines using ls going to use this? I'd prefer this to be in
>> machine file.
> [Luo Zhenhua-B19537] Current supported ls1 targets use the same setting, the variable will be moved to machine conf if there is special case in future.
>
>> > +SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyEHV0
>> 115200;ttyLP0"
>> > +SERIAL_CONSOLES_CHECK ?= "${SERIAL_CONSOLES}"
>>
>> Those ought to be in machine files. This vary from one machine to another.
>>
>> > +USE_VT ?= "0"
>> This is default.
> [Luo Zhenhua-B19537] I double-checked the sysvinit-inittab recipe, the default value of USE_VT is "1", so the item should be here.

I'd prefer to have those in the machine file. I understand why you
want to disable it but this should be done on the machine file not in
a .inc file.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH v2 3/6] Add kernel recipe for Layerscape1 support
  2014-08-28 12:14     ` zhenhua.luo
@ 2014-08-31 19:49       ` Otavio Salvador
  0 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2014-08-31 19:49 UTC (permalink / raw)
  To: zhenhua.luo; +Cc: meta-freescale

On Thu, Aug 28, 2014 at 9:14 AM, zhenhua.luo@freescale.com
<zhenhua.luo@freescale.com> wrote:
>> -----Original Message-----
>> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
>> Behalf Of Otavio Salvador
>> Sent: Wednesday, August 27, 2014 9:01 PM
>>
>> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
>> wrote:
>> > +
>> > +do_configure_prepend() {
>> > +    # copy desired defconfig so we pick it up for the real
>> kernel_do_configure
>> > +    cp ${KERNEL_DEFCONFIG} ${B}/.config
>> > +
>> > +    # add git revision to the local version
>> > +    if [ "${SCMVERSION}" = "y" ]; then
>> > +        # append sdk version if SDK_VERSION is defined
>> > +        sdkversion=''
>> > +        if [ -n "${SDK_VERSION}" ]; then
>> > +            sdkversion="-${SDK_VERSION}"
>> > +        fi
>> > +        head=`git rev-parse --verify --short HEAD 2> /dev/null`
>> > +        printf "%s%s%s" $sdkversion +g $head > ${S}/.scmversion
>> > +    fi
>> > +}
>>
>> We have similar code in linux-imx.inc; I think we ought to move this to a
>> fsl-kernel-localversion.bbclass file to avoid duplicating the logic here.
>> I can work on this if you want.
> [Luo Zhenhua-B19537] Please go ahead.

Great. I will do this and submit a patch here this week. So we could
try to get same class in meta-fsl-arm and avoid duplicating this code.


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe for Layerscape1 support
  2014-08-28 11:53     ` zhenhua.luo
@ 2014-08-31 19:54       ` Otavio Salvador
  2014-09-02 10:13         ` zhenhua.luo
  0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2014-08-31 19:54 UTC (permalink / raw)
  To: zhenhua.luo; +Cc: meta-freescale

On Thu, Aug 28, 2014 at 8:53 AM, zhenhua.luo@freescale.com
<zhenhua.luo@freescale.com> wrote:
>> -----Original Message-----
>> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
>> Behalf Of Otavio Salvador
>> Sent: Wednesday, August 27, 2014 8:55 PM
>>
>> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo <zhenhua.luo@freescale.com>
>> wrote:
>>
>> > +do_stage_endian_swap_tool () {
>> > +    install -m 755 ${S}/byte_swap.tcl ${STAGING_BINDIR_NATIVE} }
>> > +
>> > +addtask stage_endian_swap_tool before do_compile after do_patch
>>
>> What this tcl script does? it seems it should be split from here.
> [Luo Zhenhua-B19537] the script swaps the byte for QSPI boot image, currently it is maintained in ls1 u-boot  What do you mean by "split from here"?

This has been discussed in the other message and you agreed in split
this out. So I am just commenting here for completeness.

>> > +    if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
>> > +    then
>> > +        head=`git rev-parse --verify --short HEAD 2> /dev/null`
>> > +        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head >
>> ${B}/.scmversion
>> > +        printf "%s%s%s" ${UBOOT_LOCALVERSION} +g $head >
>> ${S}/.scmversion
>> > +    fi
>>
>> UBOOT_LOCALVERSION is already supported in u-boot.inc
> [Luo Zhenhua-B19537] The UBOOT_LOCALVERSION code is in do_compile function, LS1 build process is different from the definition in poky/meta/recipes-bsp/u-boot/u-boot.inc, so we rewrite the function and keep the code UBOOT_LOCALVERSION code here.

I will handle this as the same way I will do for the kernel and I will
provide a class for us to share this code.

>> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
>> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
>> > +    fi
>> > +
>> > +    for board in ${UBOOT_MACHINES}; do
>> > +        oe_runmake O=${board} distclean
>> > +        oe_runmake O=${board} ${board}
>> > +        oe_runmake O=${board} all
>> > +        case "${board}" in
>> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
>> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
>> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap"
>> > +                       ${bindir}/tclsh byte_swap.tcl ${S}/${board}/u-
>> boot.bin ${S}/${board}/${UBOOT_TARGET}.bin 8 ;;
>> > +             *)        UBOOT_TARGET="u-boot";;
>> > +        esac
>> > +    done
>> > +}
>> > +
>> > +do_install(){
>> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
>> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
>> > +    fi
>> > +
>> > +    for board in ${UBOOT_MACHINES}; do
>> > +        case "${board}" in
>> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
>> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
>> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
>> > +             *)        UBOOT_TARGET="u-boot";;
>> > +        esac
>> > +
>> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
>> > +            install -d ${D}/boot/
>> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
>> ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> ${D}/boot/${UBOOT_TARGET}.bin
>> > +        fi
>> > +    done
>> > +}
>> > +
>> > +do_deploy(){
>> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
>> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
>> > +    fi
>> > +
>> > +    for board in ${UBOOT_MACHINES}; do
>> > +        case "${board}" in
>> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
>> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
>> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
>> > +             *)        UBOOT_TARGET="u-boot";;
>> > +        esac
>> > +
>> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
>> > +            mkdir -p ${DEPLOYDIR}
>> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
>> ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> > +            cd ${DEPLOYDIR}
>> > +            rm -f ${UBOOT_TARGET}-${board}.bin
>> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> ${UBOOT_TARGET}-${board}.bin
>> > +        fi
>> > +    done
>> > +}
>> > +addtask deploy after do_install
>> > +
>> > +PACKAGES += "${PN}-images"
>> > +FILES_${PN}-images += "/boot"
>> > +
>> > +ALLOW_EMPTY_${PN} = "1"
>> > +
>> > +PACKAGE_ARCH = "${MACHINE_ARCH}"
>> > +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
>> > +
>>
>> I understand why you are doing this all here but I think we need to
>> address this in the uboot-config.bbclass so we have a standard way for
>> this.
> [Luo Zhenhua-B19537] Does this mean UBOOT_MACHINE usage will be replaced by UBOOT_CONFIG usage?
>         Seems like only one u-boot config can be built at one time, is it possible to build multiple u-boot options at one build? This is the reason we rewrite the u-boot compile/install/deploy code.

When having several configs, the UBOOT_CONFIG is the way to go. The
possibility to build several binaries we need to add in Poky.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe for Layerscape1 support
  2014-08-31 19:54       ` Otavio Salvador
@ 2014-09-02 10:13         ` zhenhua.luo
  2014-09-02 12:18           ` Otavio Salvador
  0 siblings, 1 reply; 20+ messages in thread
From: zhenhua.luo @ 2014-09-02 10:13 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

> -----Original Message-----
> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
> Behalf Of Otavio Salvador
> Sent: Monday, September 01, 2014 3:54 AM
> 
> On Thu, Aug 28, 2014 at 8:53 AM, zhenhua.luo@freescale.com
> <zhenhua.luo@freescale.com> wrote:
> >> -----Original Message-----
> >> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
> >> Behalf Of Otavio Salvador
> >> Sent: Wednesday, August 27, 2014 8:55 PM
> >>
> >> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo
> >> <zhenhua.luo@freescale.com>
> >> wrote:
> >>
> >> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> >> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> >> > +    fi
> >> > +
> >> > +    for board in ${UBOOT_MACHINES}; do
> >> > +        oe_runmake O=${board} distclean
> >> > +        oe_runmake O=${board} ${board}
> >> > +        oe_runmake O=${board} all
> >> > +        case "${board}" in
> >> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> >> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> >> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap"
> >> > +                       ${bindir}/tclsh byte_swap.tcl
> >> > + ${S}/${board}/u-
> >> boot.bin ${S}/${board}/${UBOOT_TARGET}.bin 8 ;;
> >> > +             *)        UBOOT_TARGET="u-boot";;
> >> > +        esac
> >> > +    done
> >> > +}
> >> > +
> >> > +do_install(){
> >> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> >> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> >> > +    fi
> >> > +
> >> > +    for board in ${UBOOT_MACHINES}; do
> >> > +        case "${board}" in
> >> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> >> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> >> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
> >> > +             *)        UBOOT_TARGET="u-boot";;
> >> > +        esac
> >> > +
> >> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
> >> > +            install -d ${D}/boot/
> >> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
> >> ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> >> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> >> ${D}/boot/${UBOOT_TARGET}.bin
> >> > +        fi
> >> > +    done
> >> > +}
> >> > +
> >> > +do_deploy(){
> >> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
> >> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
> >> > +    fi
> >> > +
> >> > +    for board in ${UBOOT_MACHINES}; do
> >> > +        case "${board}" in
> >> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
> >> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
> >> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
> >> > +             *)        UBOOT_TARGET="u-boot";;
> >> > +        esac
> >> > +
> >> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
> >> > +            mkdir -p ${DEPLOYDIR}
> >> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
> >> ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> >> > +            cd ${DEPLOYDIR}
> >> > +            rm -f ${UBOOT_TARGET}-${board}.bin
> >> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
> >> ${UBOOT_TARGET}-${board}.bin
> >> > +        fi
> >> > +    done
> >> > +}
> >> > +addtask deploy after do_install
> >> > +
> >> > +PACKAGES += "${PN}-images"
> >> > +FILES_${PN}-images += "/boot"
> >> > +
> >> > +ALLOW_EMPTY_${PN} = "1"
> >> > +
> >> > +PACKAGE_ARCH = "${MACHINE_ARCH}"
> >> > +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
> >> > +
> >>
> >> I understand why you are doing this all here but I think we need to
> >> address this in the uboot-config.bbclass so we have a standard way
> >> for this.
> > [Luo Zhenhua-B19537] Does this mean UBOOT_MACHINE usage will be
> replaced by UBOOT_CONFIG usage?
> >         Seems like only one u-boot config can be built at one time, is
> it possible to build multiple u-boot options at one build? This is the
> reason we rewrite the u-boot compile/install/deploy code.
> 
> When having several configs, the UBOOT_CONFIG is the way to go. The
> possibility to build several binaries we need to add in Poky.
[Luo Zhenhua-B19537] I will inherit the bbclass for LOCALVERSION definition, is it Ok to reserve the code for multiple u-boot binary build until the function is available in poky. 


Best Regards,

Zhenhua 

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

* Re: [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe for Layerscape1 support
  2014-09-02 10:13         ` zhenhua.luo
@ 2014-09-02 12:18           ` Otavio Salvador
  0 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2014-09-02 12:18 UTC (permalink / raw)
  To: zhenhua.luo; +Cc: meta-freescale

On Tue, Sep 2, 2014 at 7:13 AM, zhenhua.luo@freescale.com
<zhenhua.luo@freescale.com> wrote:
>> -----Original Message-----
>> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
>> Behalf Of Otavio Salvador
>> Sent: Monday, September 01, 2014 3:54 AM
>>
>> On Thu, Aug 28, 2014 at 8:53 AM, zhenhua.luo@freescale.com
>> <zhenhua.luo@freescale.com> wrote:
>> >> -----Original Message-----
>> >> From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On
>> >> Behalf Of Otavio Salvador
>> >> Sent: Wednesday, August 27, 2014 8:55 PM
>> >>
>> >> On Wed, Aug 27, 2014 at 1:57 AM, Zhenhua Luo
>> >> <zhenhua.luo@freescale.com>
>> >> wrote:
>> >>
>> >> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
>> >> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
>> >> > +    fi
>> >> > +
>> >> > +    for board in ${UBOOT_MACHINES}; do
>> >> > +        oe_runmake O=${board} distclean
>> >> > +        oe_runmake O=${board} ${board}
>> >> > +        oe_runmake O=${board} all
>> >> > +        case "${board}" in
>> >> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
>> >> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
>> >> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap"
>> >> > +                       ${bindir}/tclsh byte_swap.tcl
>> >> > + ${S}/${board}/u-
>> >> boot.bin ${S}/${board}/${UBOOT_TARGET}.bin 8 ;;
>> >> > +             *)        UBOOT_TARGET="u-boot";;
>> >> > +        esac
>> >> > +    done
>> >> > +}
>> >> > +
>> >> > +do_install(){
>> >> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
>> >> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
>> >> > +    fi
>> >> > +
>> >> > +    for board in ${UBOOT_MACHINES}; do
>> >> > +        case "${board}" in
>> >> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
>> >> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
>> >> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
>> >> > +             *)        UBOOT_TARGET="u-boot";;
>> >> > +        esac
>> >> > +
>> >> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
>> >> > +            install -d ${D}/boot/
>> >> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
>> >> ${D}/boot/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> >> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> >> ${D}/boot/${UBOOT_TARGET}.bin
>> >> > +        fi
>> >> > +    done
>> >> > +}
>> >> > +
>> >> > +do_deploy(){
>> >> > +    if [ "x${UBOOT_MACHINES}" = "x" ]; then
>> >> > +        UBOOT_MACHINES="${UBOOT_MACHINE}"
>> >> > +    fi
>> >> > +
>> >> > +    for board in ${UBOOT_MACHINES}; do
>> >> > +        case "${board}" in
>> >> > +             *sdcard*) UBOOT_TARGET="u-boot-with-spl-pbl";;
>> >> > +             *nand*)   UBOOT_TARGET="u-boot-with-spl-pbl";;
>> >> > +             *spi*)    UBOOT_TARGET="u-boot-qspiboot_swap";;
>> >> > +             *)        UBOOT_TARGET="u-boot";;
>> >> > +        esac
>> >> > +
>> >> > +        if [ -f ${S}/${board}/${UBOOT_TARGET}.bin ]; then
>> >> > +            mkdir -p ${DEPLOYDIR}
>> >> > +            install ${S}/${board}/${UBOOT_TARGET}.bin
>> >> ${DEPLOYDIR}/${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> >> > +            cd ${DEPLOYDIR}
>> >> > +            rm -f ${UBOOT_TARGET}-${board}.bin
>> >> > +            ln -sf ${UBOOT_TARGET}-${board}-${PV}-${PR}.bin
>> >> ${UBOOT_TARGET}-${board}.bin
>> >> > +        fi
>> >> > +    done
>> >> > +}
>> >> > +addtask deploy after do_install
>> >> > +
>> >> > +PACKAGES += "${PN}-images"
>> >> > +FILES_${PN}-images += "/boot"
>> >> > +
>> >> > +ALLOW_EMPTY_${PN} = "1"
>> >> > +
>> >> > +PACKAGE_ARCH = "${MACHINE_ARCH}"
>> >> > +COMPATIBLE_MACHINE = "(ls1021aqds|ls1021atwr)"
>> >> > +
>> >>
>> >> I understand why you are doing this all here but I think we need to
>> >> address this in the uboot-config.bbclass so we have a standard way
>> >> for this.
>> > [Luo Zhenhua-B19537] Does this mean UBOOT_MACHINE usage will be
>> replaced by UBOOT_CONFIG usage?
>> >         Seems like only one u-boot config can be built at one time, is
>> it possible to build multiple u-boot options at one build? This is the
>> reason we rewrite the u-boot compile/install/deploy code.
>>
>> When having several configs, the UBOOT_CONFIG is the way to go. The
>> possibility to build several binaries we need to add in Poky.
> [Luo Zhenhua-B19537] I will inherit the bbclass for LOCALVERSION definition, is it Ok to reserve the code for multiple u-boot binary build until the function is available in poky.

I don't think so; we need to go and work on Poky to fix it. If we
accept  it, it will never be fixed.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

end of thread, other threads:[~2014-09-02 12:18 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-27  4:57 [meta-fsl-arm][PATCH v2 0/6] Add recipes for layerscape1 support Zhenhua Luo
2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 1/6] Add common configure files for Layerscape1 support Zhenhua Luo
2014-08-27 12:46   ` Otavio Salvador
2014-08-28 10:44     ` zhenhua.luo
2014-08-31 19:47       ` Otavio Salvador
2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 2/6] Add u-boot recipe " Zhenhua Luo
2014-08-27 12:55   ` Otavio Salvador
2014-08-28 11:53     ` zhenhua.luo
2014-08-31 19:54       ` Otavio Salvador
2014-09-02 10:13         ` zhenhua.luo
2014-09-02 12:18           ` Otavio Salvador
2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 3/6] Add kernel " Zhenhua Luo
2014-08-27 13:00   ` Otavio Salvador
2014-08-28 12:14     ` zhenhua.luo
2014-08-31 19:49       ` Otavio Salvador
2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 4/6] Add rcw " Zhenhua Luo
2014-08-27 13:07   ` Otavio Salvador
2014-08-28 12:32     ` zhenhua.luo
2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 5/6] Add machine conf for ls1021atwr Zhenhua Luo
2014-08-27  4:57 ` [meta-fsl-arm][PATCH v2 6/6] Add machine conf file for ls1021aqds Zhenhua Luo

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.