From patchwork Tue May 26 08:19:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 476411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id EBFE5140E11 for ; Tue, 26 May 2015 18:20:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 40D63A3390; Tue, 26 May 2015 08:20:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xoF0Z5oWW2Ui; Tue, 26 May 2015 08:20:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 50514A3356; Tue, 26 May 2015 08:20:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4E48B1C227F for ; Tue, 26 May 2015 08:20:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4A199915B1 for ; Tue, 26 May 2015 08:20: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 8JK8TSgSo833 for ; Tue, 26 May 2015 08:20:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by whitealder.osuosl.org (Postfix) with ESMTPS id 21DD991653 for ; Tue, 26 May 2015 08:20:11 +0000 (UTC) Received: by wichy4 with SMTP id hy4so71819014wic.1 for ; Tue, 26 May 2015 01:20:09 -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=4Fh/+8y45wNWVhD+SdY/YsXDdjtEFroIwCQ83cNIThs=; b=kFqXbFfCYOrZfPYqFkQzlcY5moXYcTRiD4gSgyjzo4Rxc0wor97wIsjaGafqsP5+uh hnm38Nw5hBArASD0pjx2ZMttwNZAXWCALc1G3sQNSUoDMeA+UriL/fPrv0+kGgCfdE4o gFvr6MV4O+ac7hoaXjhK/06GuLLexwFZhlVp6aBSC9e4c5y1y/paKukXBgF8wIMQ1unY ieZSHM/kZvPdgbI9fJtWRWGIerxm1yR/EEM7/h5xkEV6TreLNU1JxzqVS/AsscltkGrg l3qLccm5qXBxMG/TYiF4j8YLhMzwxBjlRSMVe5EWNUJppkwYmYOCD4+M7hdof6rO+x24 rMXw== X-Gm-Message-State: ALoCoQlx7WdgtOeQM310gzee9QpeBr4fE5IpwnW+ejG8RJytaTWPlz9qVkSDewwJ6U3WzCCwNsoh X-Received: by 10.194.185.8 with SMTP id ey8mr33187281wjc.118.1432628409771; Tue, 26 May 2015 01:20:09 -0700 (PDT) Received: from t450s.lan (89-92-157-132.hfc.dyn.abo.bbox.fr. [89.92.157.132]) by mx.google.com with ESMTPSA id a18sm20468582wja.46.2015.05.26.01.20.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 May 2015 01:20:09 -0700 (PDT) From: Gary Bisson To: buildroot@busybox.net Date: Tue, 26 May 2015 10:19:40 +0200 Message-Id: <1432628382-16799-12-git-send-email-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1432628382-16799-1-git-send-email-gary.bisson@boundarydevices.com> References: <1432628382-16799-1-git-send-email-gary.bisson@boundarydevices.com> Cc: thomas.petazzoni@free-electrons.com, jezz@sysmic.org, luca@lucaceresoli.net Subject: [Buildroot] [PATCH v2 11/13] board/boundarydevices: rework and update u-boot scripts 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" Those scripts are executed by u-boot in order to detect the hardware configuration (board, displays etc...), configure the bootargs and device tree accordingly or update the bootloader located in NOR flash. This update is necessary due to the kernel bump to version 3.10.53. The rework consists of replacing the binaries by their text file equivalent and generate the binaries from the post-build.sh script. Signed-off-by: Gary Bisson --- board/boundarydevices/nitrogen6x/6x_bootscript | Bin 3207 -> 0 bytes board/boundarydevices/nitrogen6x/6x_bootscript.txt | 186 +++++++++++++++++++++ .../nitrogen6x/{6x_upgrade => 6x_upgrade.txt} | Bin 1465 -> 1393 bytes board/boundarydevices/nitrogen6x/post-build.sh | 6 +- configs/nitrogen6x_defconfig | 1 + 5 files changed, 191 insertions(+), 2 deletions(-) delete mode 100644 board/boundarydevices/nitrogen6x/6x_bootscript create mode 100644 board/boundarydevices/nitrogen6x/6x_bootscript.txt rename board/boundarydevices/nitrogen6x/{6x_upgrade => 6x_upgrade.txt} (92%) diff --git a/board/boundarydevices/nitrogen6x/6x_bootscript b/board/boundarydevices/nitrogen6x/6x_bootscript deleted file mode 100644 index 05442a6b0eeffafabdf8857fc57fed73b5b6cbac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3207 zcmd5<&2HO95H>1|37=%JEKGO{YfAW|oB+yL<<0g~Q?C3h(;Omby%B~vwY z=u70#C+exUK1ko7vr8^XF^XZghjuR_IkWTo&5yo&{LP2o|MEY*|Lxa5kB**P9M$LR zN8TTgAANNc3L&A0a=wy=)cbw%Tz%j%IJa@JO9Y|#MCEqHcItr_SG#8(c<#(q2iE7= zW-Lnyry!Rsvj7jvHo()B$R&(q%j(2DVFmw%Su81-<}8?0%*rZ~FABU#!i3Fl2$%Cz zP!@ooQ_5H%_^yCL#e19V6Wcwksw=ZqB*Nf;pB zRtedf*zBkI>8y!}0)X;kT!39FH$S4EHUt5_IxCW~#O{040O3B6P|?$fK-gctYayXy zIKYBpEX!FDD4rqmScCoGJY1RUPs%AOyF(YU43VV@^M9O3gOdY}#`2_er*m11+c-JR zqlRFcJ49i|RMIg0Jj{vYBD0$`-%Cs9X3!O*<5Z=kUx$^6AjLXb0yY?#izH!9N$$gL z@&(vkZx&=9a;@DpjsyFt@0R{#4@3S$b&nb^4dctVXJ@02AG+15*i1!ryXL(B9MPdu z3;&;1J(f*5nYq21zggncsC(3;LWk*57+xxxmV5wthg&?(6dW0M_9diKk+Ej(9FXnk zK4%6~!(g|`KpYh!VS$ueoHE|f^GfNpt=hU_|VwYsY@LS;3g@o-W zrgBaw&2j(oyh=h-n~JvNizU+H`qUed5o9bglc1~|Ql)Y;&qNk6(kSnzzb!eev$@*d z#v)6$bG)Msth&AW1TW9eaNnY=04}*VQO7P1nlAMA&PJ%HQ=iBq0yr+sv81X zQ!XGSTfmi-#4(E`qi8@4m%B4$w(mAW>o+M`uqH%ZXgGC@_nXH+0U~X;^L7OF2qW-n gK +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 + + 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 +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 + else + setenv bootargs $bootargs tsc2004.calibration=$tsc_calibration + 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 ''; +fi + +if itest.s "x" != "x$have_lcd" ; then + echo "----- found LCD display"; +else + fdt rm lcd_display; +fi + +setenv bootargs "$bootargs console=ttymxc1,115200 vmalloc=400M consoleblank=0 rootwait" + +if itest.s x$bootpart == x ; then + bootpart=1 +fi + +if test "sata" = "${dtype}" ; then + setenv bootargs "$bootargs root=/dev/sda$bootpart" ; +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 +fi + +if itest.s "x" != "x${disable_giga}" ; then + 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$gpumem" ; then + setenv bootargs $bootargs galcore.contiguousSize=$gpumem +fi + +if itest.s "x" != "x$show_fdt" ; then + fdt print / +fi + +if itest.s "x" != "x$show_env" ; then + printenv +fi + +if ${fs}load ${dtype} ${disk}:1 10800000 ${bootdir}uImage ; then + bootm 10800000 - $fdt_addr +fi +echo "Error loading kernel image" diff --git a/board/boundarydevices/nitrogen6x/6x_upgrade b/board/boundarydevices/nitrogen6x/6x_upgrade.txt similarity index 92% rename from board/boundarydevices/nitrogen6x/6x_upgrade rename to board/boundarydevices/nitrogen6x/6x_upgrade.txt index 395f13faee825d22c4104d91af785436f59a745c..3f1b96ff3401219cc8a9606a9adffa872d3401f6 100644 GIT binary patch delta 8 PcmdnV{gG>jb<$b J32Z221pp@&4|)Iq diff --git a/board/boundarydevices/nitrogen6x/post-build.sh b/board/boundarydevices/nitrogen6x/post-build.sh index 2b43aa3..f68fa0e 100755 --- a/board/boundarydevices/nitrogen6x/post-build.sh +++ b/board/boundarydevices/nitrogen6x/post-build.sh @@ -8,11 +8,13 @@ BOARD_DIR="$(dirname $0)" # bd u-boot looks for bootscript here -install -D -m 0644 $BOARD_DIR/6x_bootscript $TARGET_DIR/6x_bootscript +$HOST_DIR/usr/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ +-n "boot script" -d $BOARD_DIR/6x_bootscript.txt $TARGET_DIR/6x_bootscript # u-boot / update script for bd upgradeu command if [ -e $BINARIES_DIR/u-boot.imx ]; then install -D -m 0644 $BINARIES_DIR/u-boot.imx $TARGET_DIR/u-boot.imx - install -D -m 0644 $BOARD_DIR/6x_upgrade $TARGET_DIR/6x_upgrade + $HOST_DIR/usr/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "upgrade script" -d $BOARD_DIR/6x_upgrade.txt $TARGET_DIR/6x_upgrade fi diff --git a/configs/nitrogen6x_defconfig b/configs/nitrogen6x_defconfig index d04745d..71b01f0 100644 --- a/configs/nitrogen6x_defconfig +++ b/configs/nitrogen6x_defconfig @@ -6,6 +6,7 @@ BR2_cortex_a9=y BR2_TARGET_GENERIC_GETTY=y BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/nitrogen6x/post-build.sh" +BR2_PACKAGE_HOST_UBOOT_TOOLS=y # filesystem BR2_TARGET_ROOTFS_EXT2=y