From patchwork Wed Sep 9 20:21:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 516013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 14C4D14028F for ; Thu, 10 Sep 2015 06:29:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 332AD91840; Wed, 9 Sep 2015 20:29:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tGzhamljkeX5; Wed, 9 Sep 2015 20:29:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 886A391773; Wed, 9 Sep 2015 20:29:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 455231BFA9E for ; Wed, 9 Sep 2015 20:29:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3D25A9178A for ; Wed, 9 Sep 2015 20:29:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BX04bf05WuvN for ; Wed, 9 Sep 2015 20:29:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id D285191792 for ; Wed, 9 Sep 2015 20:29:06 +0000 (UTC) Received: by wicfx3 with SMTP id fx3so279801wic.0 for ; Wed, 09 Sep 2015 13:29:05 -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=s2ufkIjEqWS9X9g7AqERWGwtQIrqlAlRW/cpZGqBhfo=; b=BqBnNBRYf6k31/9p3NOvNUnWdJ6bRPOh/RMVKw+ZG7COGcg5dZzeyXc1dxGJaXMFiA rOk5fcmbtNPeqto0ZK1AIi5F1SR8RaQzxnr34el1jauS2/BuUGEqfau0FpX4VvYXSD1n aIlUf0RMkmoRODrQvrujfguA2avVE2t7TrPv+2R+q4Uxlw/kX7skbgN5TgKQqez7EI3q VrPItujdWZSOARFawTqSUnvAtFS+85jj6LuXhb0/qXi18yjw7v6p67ogftwAa6S+EnpT +5i4hYetfGhgbQDkZ3vcA1uhxt3pBFMJiNQZsHj0VM29obpf8DHNqHHZsLLe900042cY x6FQ== X-Gm-Message-State: ALoCoQk8B/zWxswSu8FuVfhZhBhjJWQ1qfJ1noYcqTwIjck07Ta7i1JGnuWQ2DOZRE05JJO9ki0Z X-Received: by 10.181.13.166 with SMTP id ez6mr60878079wid.24.1441830095648; Wed, 09 Sep 2015 13:21:35 -0700 (PDT) Received: from t450s.lan (89-92-157-132.hfc.dyn.abo.bbox.fr. [89.92.157.132]) by smtp.googlemail.com with ESMTPSA id aw1sm11962403wjc.26.2015.09.09.13.21.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 13:21:35 -0700 (PDT) From: Gary Bisson To: buildroot@busybox.net Date: Wed, 9 Sep 2015 22:21:03 +0200 Message-Id: <1441830063-8190-15-git-send-email-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1441830063-8190-1-git-send-email-gary.bisson@boundarydevices.com> References: <1441830063-8190-1-git-send-email-gary.bisson@boundarydevices.com> Cc: luca@lucaceresoli.net, thomas.petazzoni@free-electrons.com, jezz@sysmic.org, vincent.stehle@freescale.com Subject: [Buildroot] [PATCH 14/14] board/boundarydevices: update u-boot script for 3.14 kernels X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This script will support coming platforms such as iMX6SoloX or iMX6QuadPlus. One important change is that the script now relies on U-Boot to make the display detection in order to simplify the script. Signed-off-by: Gary Bisson --- board/boundarydevices/nitrogen6x/6x_bootscript.txt | 223 ++++++++------------- 1 file changed, 84 insertions(+), 139 deletions(-) diff --git a/board/boundarydevices/nitrogen6x/6x_bootscript.txt b/board/boundarydevices/nitrogen6x/6x_bootscript.txt index ac86fe5..694a9b6 100644 --- a/board/boundarydevices/nitrogen6x/6x_bootscript.txt +++ b/board/boundarydevices/nitrogen6x/6x_bootscript.txt @@ -1,186 +1,131 @@ setenv bootargs '' -if ${fs}load ${dtype} ${disk}:1 10800000 uEnv.txt ; then - env import -t 10800000 $filesize -fi - -if itest.s "x" == "x$dtbname" ; then - dtbname="imx6"; - if itest.s x6SOLO == "x$cpu" ; then - dtbname=${dtbname}dl-; - elif itest.s x6DL == "x$cpu" ; then - dtbname=${dtbname}dl-; +a_script=0x10800000 +a_uImage=0x10800000 +a_fdt=0x13000000 + +setenv initrd_high 0xffffffff +if itest.s "x" == "x${dtbname}" ; then + if itest.s x6SOLO == "x${cpu}" ; then + dtbname=imx6dl-${board}.dtb; + elif itest.s x6DL == "x${cpu}" ; then + dtbname=imx6dl-${board}.dtb; + elif itest.s x6QP == "x${cpu}" ; then + dtbname=imx6qp-${board}.dtb; + elif itest.s x6SX == "x${cpu}" ; then + if itest.s "x1" != "x$m4enabled" ; then + dtbname=imx6sx-${board}.dtb; + else + run m4boot; + dtbname=imx6sx-${board}-m4.dtb; + fi + a_script=0x80800000 + a_uImage=0x80800000 + a_fdt=0x83000000 else - dtbname=${dtbname}q-; - fi - if itest.s x == "x$board" ; then - board=sabrelite + dtbname=imx6q-${board}.dtb; fi - dtbname=${dtbname}${board}.dtb; +fi + +if load ${dtype} ${disk}:1 ${a_script} uEnv.txt ; then + env import -t ${a_script} ${filesize} fi if itest.s x == x${bootdir} ; then bootdir=/boot/ fi -setenv fdt_addr 0x12000000 -if ${fs}load ${dtype} ${disk}:1 $fdt_addr ${bootdir}$dtbname ; then - fdt addr $fdt_addr +if itest.s x${bootpart} == x ; then + bootpart=1 +fi + +if load ${dtype} ${disk}:${bootpart} ${a_fdt} ${bootdir}${dtbname} ; then + fdt addr ${a_fdt} setenv fdt_high 0xffffffff else - echo "!!!! Error loading ${bootdir}$dtbname"; + echo "!!!! Error loading ${bootdir}${dtbname}"; exit; fi -# ------------------- HDMI detection -i2c dev 1 ; -if i2c probe 0x50 ; then - echo "------ have HDMI monitor"; - if itest.s x == x$allow_noncea ; then - setenv bootargs $bootargs mxc_hdmi.only_cea=1; - echo "only CEA modes allowed on HDMI port"; - else - setenv bootargs $bootargs mxc_hdmi.only_cea=0; - echo "non-CEA modes allowed on HDMI, audio may be affected"; - fi -else - fdt rm hdmi_display - echo "------ no HDMI monitor"; -fi - -# ------------------- LVDS detection -if itest.s "x" != "x$lvds_1080p" ; then - echo "----- 1080P dual channel LVDS"; - fdt rm okaya1024x600 - fdt rm lg1280x800 - fdt rm hannstar; - fdt set ldb split-mode 1 - fdt set lvds_display interface_pix_fmt "RGB24" - fdt set ldb/lvds-channel@0 fsl,data-width <24> -else - fdt rm ldb split-mode - fdt rm lvds1080p - - # -------- LVDS0 (bottom on Nitrogen6_Max) - setenv have_lvds - i2c dev 2 - if i2c probe 0x04 ; then - echo "------ have Freescale display"; - setenv have_lvds 1 - else - echo "------ no Freescale display"; - fdt rm hannstar; - fi +# first enable tfp410 +i2c dev 1 +i2c mw 38 8.1 bd - if i2c probe 0x38 ; then - if itest.s "xLDB-WXGA" == "x$panel"; then - screenres=1280,800 - fdt rm okaya1024x600 - else - screenres=1024,600 - fdt rm lg1280x800 - fi - setenv have_lvds 1 - setenv bootargs $bootargs ft5x06_ts.screenres=$screenres - if itest.s "x" -ne "x$calibration" ; then - setenv bootargs $bootargs ft5x06_ts.calibration=$calibration - fi - else - echo "------ no ft5x06 touch controller"; - fdt rm okaya1024x600 - fdt rm lg1280x800 - fi - - if itest.s "x" == "x$have_lvds"; then - fdt rm lvds_display; - fi - - # -------- LVDS1 (top on Nitrogen6_Max) - if itest.s "xhannstar" == "x$lvds1_panel" ; then - echo "configure LVDS1 for Hannstar panel" - fdt rm okaya1024x600_2; - fdt rm lg1280x800_2; - fdt set lvds_display_2 status okay - elif itest.s "xokaya1024x600" == "x$lvds1_panel" ; then - echo "configure LVDS1 for 1024x600 panel" - fdt rm hannstar_2; - fdt rm lg1280x800_2; - fdt set lvds_display_2 status okay - elif itest.s "xlg1280x800" == "x$lvds1_panel" ; then - echo "configure LVDS1 for 1280x800 panel" - fdt rm hannstar_2; - fdt rm okaya1024x600_2; - fdt set lvds_display_2 status okay - else - fdt rm lvds_display_2 ; # ignore errors on boards != 6_max - fi +cmd_xxx_present= +fdt resize +if itest.s "x" != "x${cmd_custom}" ; then + run cmd_custom + cmd_xxx_present=1; fi -# ------------------- LCD detection -setenv have_lcd ''; -if i2c probe 0x48 ; then - setenv have_lcd 1; - echo "------- found TSC2004 touch controller"; - if itest.s "x" -eq "x$tsc_calibration" ; then - setenv bootargs $bootargs tsc2004.calibration=-67247,-764,272499173,324,69283,-8653010,65536 +if itest.s "x" != "x${cmd_hdmi}" ; then + run cmd_hdmi + cmd_xxx_present=1; + if itest.s x == x${allow_noncea} ; then + setenv bootargs ${bootargs} mxc_hdmi.only_cea=1; + echo "only CEA modes allowed on HDMI port"; else - setenv bootargs $bootargs tsc2004.calibration=$tsc_calibration + setenv bootargs ${bootargs} mxc_hdmi.only_cea=0; + echo "non-CEA modes allowed on HDMI, audio may be affected"; fi -elif i2c probe 0x4d ; then - setenv have_lcd 1; - echo "------- found AR1020 touch controller"; fi -if itest.s "x" != "x$ignore_lcd" ; then - echo "------ ignoring LCD display"; - setenv have_lcd ''; +if itest.s "x" != "x${cmd_lcd}" ; then + run cmd_lcd + cmd_xxx_present=1; +fi +if itest.s "x" != "x${cmd_lvds}" ; then + run cmd_lvds + cmd_xxx_present=1; +fi +if itest.s "x" != "x${cmd_lvds2}" ; then + run cmd_lvds2 + cmd_xxx_present=1; fi -if itest.s "x" != "x$have_lcd" ; then - echo "----- found LCD display"; -else - fdt rm lcd_display; +if itest.s "x" == "x${cmd_xxx_present}" ; then + echo "!!!!!!!!!!!!!!!!" + echo "warning: your u-boot may be outdated, please upgrade" + echo "!!!!!!!!!!!!!!!!" fi -setenv bootargs "$bootargs console=ttymxc1,115200 vmalloc=400M consoleblank=0 rootwait" +setenv bootargs "${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc" -if itest.s x$bootpart == x ; then - bootpart=1 -fi +bpart=1 if test "sata" = "${dtype}" ; then - setenv bootargs "$bootargs root=/dev/sda$bootpart" ; + setenv bootargs "${bootargs} root=/dev/sda${bpart}" ; +elif test "usb" = "${dtype}" ; then + setenv bootargs "${bootargs} root=/dev/sda${bpart}" ; else - if test "usb" = "${dtype}" ; then - setenv bootargs "$bootargs root=/dev/sda$bootpart" ; - elif itest 0 -eq ${disk}; then - setenv bootargs "$bootargs root=/dev/mmcblk2p$bootpart" ; - else - setenv bootargs "$bootargs root=/dev/mmcblk3p$bootpart" ; - fi + setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bpart}" fi if itest.s "x" != "x${disable_giga}" ; then - setenv bootargs $bootargs fec.disable_giga=1 + setenv bootargs ${bootargs} fec.disable_giga=1 +fi + +if itest.s "x" != "x${wlmac}" ; then + setenv bootargs ${bootargs} wlcore.mac=${wlmac} fi -if itest.s "x" != "x$wlmac" ; then - setenv bootargs $bootargs wlcore.mac=$wlmac +if itest.s "x" != "x${gpumem}" ; then + setenv bootargs ${bootargs} galcore.contiguousSize=${gpumem} fi -if itest.s "x" != "x$gpumem" ; then - setenv bootargs $bootargs galcore.contiguousSize=$gpumem +if itest.s "x" != "x${cma}" ; then + setenv bootargs ${bootargs} cma=${cma} fi -if itest.s "x" != "x$show_fdt" ; then +if itest.s "x" != "x${show_fdt}" ; then fdt print / fi -if itest.s "x" != "x$show_env" ; then +if itest.s "x" != "x${show_env}" ; then printenv fi -if ${fs}load ${dtype} ${disk}:1 10800000 ${bootdir}uImage ; then - bootm 10800000 - $fdt_addr +if load ${dtype} ${disk}:${bootpart} ${a_uImage} ${bootdir}/uImage ; then + bootm ${a_uImage} - ${a_fdt} fi echo "Error loading kernel image"