From patchwork Mon Nov 7 16:54:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 691987 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]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tCJSV6VRGz9s3T for ; Tue, 8 Nov 2016 03:54:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b="LIrhCT4u"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6C9FC91E72; Mon, 7 Nov 2016 16:54:14 +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 oUkomDe38c7b; Mon, 7 Nov 2016 16:54:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A450591E49; Mon, 7 Nov 2016 16:54: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 B70681C1EB7 for ; Mon, 7 Nov 2016 16:54:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B528491E43 for ; Mon, 7 Nov 2016 16:54: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 MzAywt4oGro8 for ; Mon, 7 Nov 2016 16:54:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by whitealder.osuosl.org (Postfix) with ESMTPS id 052DA91E49 for ; Mon, 7 Nov 2016 16:54:08 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id a197so194639041wmd.0 for ; Mon, 07 Nov 2016 08:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=laKOx3eGJYNriEwqor0J8PqpMzXgR/tNiy09QoX/uSM=; b=LIrhCT4u0UG4riuyuXif1YlYppsO4KoXhrjfMx2jjKi2G+3x+atBXKuXhoXCYFuhEq 5VGf795KMO9cd89I9croMgFN9Oy9+2R4F5L6YzsXNDsXADoLn4dMjJnzFuvwOAs7PGfe nBCAJjM5ibNpMegWl14u7w9X4TGzKjMCe+Sv7NJzdY4XQw/mpIKZrUkNX5OqcVslBYcX 9ii8CMSsHS+Ql1lTNtbM+Qx+7hE62FPjaAtWD4j885FVEol4nDzqqsQJLQKAamzNEhi3 q6kP06i80zmt2YoZYnBSxqt0v2FBblKXrN3G0ZLu5vYINk3NrIuJFsstEaSFSPYh8pAa EAzQ== 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; bh=laKOx3eGJYNriEwqor0J8PqpMzXgR/tNiy09QoX/uSM=; b=cactfFwyw9cv7oF1KfhmQjal2dNqIfUri/aUoaj2xJch9CThmhjXBWZvQ/+ykY0lLW tE+0+GuXTWD9jK8UycxQu0G6sD++uQgVEUJbJ1IVNWu/EYmrCfDiNc+AI0o95b2V1YZ4 qqHCeOWinXkREV90MX2iyQVZ51pJwbWP59kFciUhbIBAXCem30jF0+UI0q1FEbBfwuUk XPev3DNsRFe+iSZ4xX+jcZZrUPrpRxXt1D0mcO3a/q7cSZTa8vWkwircVyi9SFPZB8XN nHhrJ5V3kgWRjx3fMrfVylDkJW8MYF8tiriezAI/UwU4xEoXzuUHPAm3NOl7IIaOPd0T X6pQ== X-Gm-Message-State: ABUngvfZyNgGBwvl8LLUkxJIrfKyYwqAVkN4vydzTk7aH34vljNkWqfbBoPpJ7oKauNrLg== X-Received: by 10.28.125.3 with SMTP id y3mr8724991wmc.30.1478537647357; Mon, 07 Nov 2016 08:54:07 -0800 (PST) Received: from t450s.lan (89-92-98-28.hfc.dyn.abo.bbox.fr. [89.92.98.28]) by smtp.googlemail.com with ESMTPSA id m194sm14560801wmg.11.2016.11.07.08.54.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 08:54:06 -0800 (PST) From: Gary Bisson To: buildroot@busybox.net Date: Mon, 7 Nov 2016 17:54:00 +0100 Message-Id: <20161107165400.28802-1-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.9.3 Cc: thomas.petazzoni@free-electrons.com Subject: [Buildroot] [PATCH] board/boundarydevices: fix boot partition number in bootscript 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" It was previously hardcoded to use the 1st partition although the bootpart variable was used to download kernel/dtb from any partition. Signed-off-by: Gary Bisson --- Hi, Just realized our bootscript was harcoding the partition number. It is not suitable for systems which need to boot from any partition. It is especially useful when using a A/B update scheme which means you either boot from part 1 or 2 depending on last update (testing swupdate right now, nice project!). Regards, Gary --- board/boundarydevices/common/6x_bootscript.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/board/boundarydevices/common/6x_bootscript.txt b/board/boundarydevices/common/6x_bootscript.txt index e8a08aa..2fc687a 100644 --- a/board/boundarydevices/common/6x_bootscript.txt +++ b/board/boundarydevices/common/6x_bootscript.txt @@ -92,14 +92,12 @@ fi setenv bootargs "${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc" -bpart=1 - if test "sata" = "${dtype}" ; then - setenv bootargs "${bootargs} root=/dev/sda${bpart}" ; + setenv bootargs "${bootargs} root=/dev/sda${bootpart}" ; elif test "usb" = "${dtype}" ; then - setenv bootargs "${bootargs} root=/dev/sda${bpart}" ; + setenv bootargs "${bootargs} root=/dev/sda${bootpart}" ; else - setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bpart}" + setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bootpart}" fi if itest.s "x" != "x${disable_giga}" ; then