From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 37C78E00998; Mon, 20 Apr 2015 17:06:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.45 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C4041E00932 for ; Mon, 20 Apr 2015 17:06:03 -0700 (PDT) Received: by pacyx8 with SMTP id yx8so222572625pac.1 for ; Mon, 20 Apr 2015 17:06:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GM/MV40gmjkFzYOdKM1vRlKTG3Vvku3a+pwjJDq9DAk=; b=OLAZtnd3hML8b9Mf9Scxd5dvITmKh5JAQgRJn4AILuZpOcHvS8ekE2yurxiHWs/HWa Sp51hu2jKZKh0CBMgHHtBa4HqM03VvzQTcN4zEEfOz1grQggNMpCTXT5BDOoTWve/eUp DUlyaapsvjIAk5K+J+4QX5FKaQt4sDmjAWv+hdM1777wb4w2TwfxYVkAaK7vjq3plvNw LxfQSRUfGxI71JGr6pGQFypYn2nCZlJFyPj0JiUBugzsq7EQzpNlP6sC9Wce13C1a1ZU 9WoI8f32AQA7FieBfNMBA4AA5OueQpTi1wfGuW3FuF8r9eOjBZ9sw3Eg113xOn7rXfcF 5Tuw== X-Gm-Message-State: ALoCoQlop2drsYJYKjvgH+UvsIa+3wEBkH1mxnRyiVUYUYNgyXp00KBchD/57oF/6agvZOpWGX/v X-Received: by 10.68.251.227 with SMTP id zn3mr32477585pbc.157.1429574763239; Mon, 20 Apr 2015 17:06:03 -0700 (PDT) Received: from psidhu.gw (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by mx.google.com with ESMTPSA id kq3sm98383pbc.74.2015.04.20.17.06.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Apr 2015 17:06:02 -0700 (PDT) From: Pushpal Sidhu To: Date: Mon, 20 Apr 2015 17:03:42 -0700 Message-Id: <1429574624-29176-2-git-send-email-psidhu@gateworks.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1429574624-29176-1-git-send-email-psidhu@gateworks.com> References: <1429574624-29176-1-git-send-email-psidhu@gateworks.com> Cc: otavio@ossystems.com.br Subject: [meta-fsl-arm-extra][PATCH v2 1/3] uboot-gwventana: initial recipe for uboot X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 00:06:05 -0000 Add the initial recipes for Gateworks Ventana boards. This includes a bootscript recipe along with a bootloader recipe. Signed-off-by: Pushpal Sidhu --- recipes-bsp/u-boot/u-boot-gwventana_2014.04.bb | 14 ++ recipes-bsp/u-boot/u-boot-script-gateworks.bb | 30 +++++ .../6x_bootscript-yocto.txt | 141 +++++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-gwventana_2014.04.bb create mode 100644 recipes-bsp/u-boot/u-boot-script-gateworks.bb create mode 100644 recipes-bsp/u-boot/u-boot-script-gateworks/6x_bootscript-yocto.txt diff --git a/recipes-bsp/u-boot/u-boot-gwventana_2014.04.bb b/recipes-bsp/u-boot/u-boot-gwventana_2014.04.bb new file mode 100644 index 0000000..3343f9b --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-gwventana_2014.04.bb @@ -0,0 +1,14 @@ +require recipes-bsp/u-boot/u-boot.inc + +DESCRIPTION = "U-Boot for Gateworks Ventana Family SBC's" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb" +DEPENDS = "u-boot-mkimage-native" + +PV = "v2014.04+git${SRCPV}" + +SRCREV = "f2a73003969ef178e4734a3658d8295dde63901e" +SRC_URI = "git://github.com/Gateworks/u-boot-imx6.git;branch=gateworks_v2014.04" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(gwventana)" diff --git a/recipes-bsp/u-boot/u-boot-script-gateworks.bb b/recipes-bsp/u-boot/u-boot-script-gateworks.bb new file mode 100644 index 0000000..827e2e2 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-script-gateworks.bb @@ -0,0 +1,30 @@ +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891" +DEPENDS = "u-boot-mkimage-native" + +SRC_URI = "file://6x_bootscript-yocto.txt" + +DESTDIR = "/boot" +S = "${WORKDIR}" + +do_compile() { + bootscript="${THISDIR}/u-boot-script-gateworks/6x_bootscript-yocto.txt" + echo "bootscript == $bootscript" + + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "boot script" -d $bootscript \ + 6x_bootscript +} + +do_install() { + install -d ${D}/${DESTDIR} + install ${S}/6x_bootscript ${D}${DESTDIR}/6x_bootscript-${MACHINE}-${PV}-${PR} + + cd ${D}${DESTDIR} + ln -sf 6x_bootscript-${MACHINE}-${PV}-${PR} 6x_bootscript-${MACHINE} +} + +FILES_${PN} = "${DESTDIR}/*" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(gwventana)" diff --git a/recipes-bsp/u-boot/u-boot-script-gateworks/6x_bootscript-yocto.txt b/recipes-bsp/u-boot/u-boot-script-gateworks/6x_bootscript-yocto.txt new file mode 100644 index 0000000..b7478f0 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-script-gateworks/6x_bootscript-yocto.txt @@ -0,0 +1,141 @@ +setenv _bscriptver "v1.01" + +echo "## Gateworks Ventana Yocto Bootscript ${_bscriptver} ####################" + +## First: Memory Allocations ################################################### +if test -z "${mem}" ; then + echo "Detected ${mem_mb}MB DRAM - adjusting CMA memory allocation..." + + # Freescale doesn't provide a 'best practice' for choosing CMA. We determine + # it using following formula (please customize mem to your own req's): + # cma=min(((${mem_mb}/2) - round(${mem_mb}*.125))M, 384M) + if itest.s "x${mem_mb}" == "x256" ; then + setenv mem "cma=96M" + elif itest.s "x${mem_mb}" == "x512" ; then + setenv mem "cma=192M" + elif itest.s "x${mem_mb}" == "x1024" ; then + setenv mem "cma=384M" + elif itest.s "x${mem_mb}" == "x2048" ; then + setenv mem "cma=384M" + elif itest.s "x${mem_mb}" == "x4096" ; then + setenv mem "cma=384M" + else + echo "Unable to pigeonhole memory. Defaulting CMA to 96M." + setenv mem "cma=96M" + fi +fi + +if itest.s "x${mem}" == "xNA" ; then + echo "Leaving CMA alone..." +else + setenv extra "${extra}" "${mem}" + echo "Memory configuration used from env mem: $mem" +fi + +## Second: Video Options ####################################################### +if test -z "${video}" ; then + # locally used variables + setenv fb_num 0 + setenv lvds_flag + setenv hdmi_flag + setenv cvbs_flag + setenv max_disp 3 # 0-3 displays + + # Detect displays if req'd (HDMI->LVDS->CVBS) + if test -z "$display" ; then + if test -z "$panel" ; then + # Start detection scheme + i2c dev 2 + if hdmidet ; then # HDMI + setenv display "$display" "HDMI" + echo "HDMI Detected" + fi + if i2c probe 0x04 ; then # Freescale MXC-LVDS1 + setenv display "$display" "LVDS" + echo "LVDS Detected" + fi + if i2c probe 0x14 ; then # DLC800FIGT3 + setenv display "$display" "LVDS" + echo "LVDS Detected" + fi + if i2c probe 0x38 ; then # DLC700JMGT4 + setenv display "$display" "LVDS" + echo "LVDS Detected" + fi + fi + fi + + echo "Display(s) to configure: ${display}" + + # Configure displays + for disp in ${display} ; do + if itest.s "x${disp}" == "xHDMI" ; then + if test -z "$hdmi_flag" ; then # Only allow one HDMI display + setenv hdmi_flag 1 + test -n "$hdmi" || hdmi=1080p + if itest.s "x${hdmi}" == "x1080p" ; then + setenv hdmi "1920x1080M@60" + elif itest.s "x${hdmi}" == "x720p" ; then + setenv hdmi "1280x720M@60" + elif itest.s "x${hdmi}" == "x480p" ; then + setenv hdmi "720x480M@60" + fi + setenv video "$video" "video=mxcfb${fb_num}:dev=hdmi,${hdmi},if=RGB24,bpp=32" + + echo "Setting HDMI Display to mxcfb${fb_num}" + setexpr fb_num $fb_num + 1 + fi + elif itest.s "x${disp}" == "xLVDS" ; then + if test -z "$lvds_flag" ; then # Only allow one LVDS display + setenv lvds_flag 1 + setenv video "$video" "video=mxcfb${fb_num}:dev=ldb,bpp=32,if=RGB666" + + echo "Setting LVDS Display to mxcfb${fb_num}" + setexpr fb_num $fb_num + 1 + fi + elif itest.s "x${disp}" == "xCVBS" ; then + if test -z "$cvbs_flag" ; then # Only allow one CVBS display + setenv cvbs_flag 1 + setenv video "$video" "video=mxcfb${fb_num}:dev=adv739x,BT656-NTSC,if=BT656,fbpix=RGB565,bpp=32" + + echo "Setting CVBS Display to mxcfb${fb_num}" + setexpr fb_num $fb_num + 1 + fi + else + echo "${disp} is an unsupported display type (HDMI|LVDS|CVBS)." + fi + done + + # Add CVBS display if !(HDMI || LVDS || CVBS || DISPLAY || PANEL) + if test -z "$hdmi_flag" ; then + if test -z "$lvds_flag" ; then + if test -z "$cvbs_flag" ; then + if test -z "$display" ; then + if test -z "$panel" ; then + setenv cvbs_flag 1 + setenv video "$video" "video=mxcfb${fb_num}:dev=adv739x,BT656-NTSC,if=BT656,fbpix=RGB565,bpp=32" + + echo "Defaulting CVBS Display to mxcfb${fb_num}" + setexpr fb_num $fb_num + 1 + fi + fi + fi + fi + fi + + # Mark the rest of the displays to 'off' if panel is not set + if test -z "$panel" ; then + while test "$fb_num" -le "$max_disp" ; do + setenv video "$video" "video=mxcfb${fb_num}:off" + setexpr fb_num $fb_num + 1 + done + fi + + # Set only if video is set + if test -n "$video" ; then + setenv video "${video}" + fi +fi +echo "Video configuration used from env video: $video" + +echo "## End Gateworks Ventana Yocto Bootscript ${_bscriptver} ################" -- 2.3.5