From patchwork Tue Sep 15 12:18:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 517845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A836814017E for ; Tue, 15 Sep 2015 22:19:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=ZhLzgGiT; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 38F6028BDD0; Tue, 15 Sep 2015 14:17:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, T_DKIM_INVALID autolearn=no version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6821C28BDD0 for ; Tue, 15 Sep 2015 14:17:37 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 15 Sep 2015 14:17:36 +0200 (CEST) Received: by lbbmp1 with SMTP id mp1so83845705lbb.1 for ; Tue, 15 Sep 2015 05:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=2u/cCN5mxyhTccNksRc18nmi0bAgPpNbvjtgSADhE+M=; b=ZhLzgGiTCOVQmjwcd58RnyEptHiupv2qRVBOd03wlnTFVGhpD3sHf9ema+ZOsnbIhB H1hmuoxGJGVyzjmkdl48rPHysizKkamOmdmwPO402CyunnEy8Uy4JFz3JBLSxT8zOYBv mLPsHzJAUt1WCLKq53yqLmSiCA8h+bMKncVokz8UfI8JrLF26CkDu2N+O7bdxVMTx7Y/ ssKVNs8JyGUInF4VoCNvcPKBjik5qS063xHad/8ZpV45f3OzfJB7gtZFXKiZEjh65hHS yaKce+OIj7xIWDISmmHuw4nwtDhr7AkFDzfTXGbx8bP0Z9Z62LvzTuBMKzQpNmgrHhN2 ErKw== X-Received: by 10.152.8.233 with SMTP id u9mr20500869laa.8.1442319525857; Tue, 15 Sep 2015 05:18:45 -0700 (PDT) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id wg9sm3238824lbb.6.2015.09.15.05.18.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 05:18:45 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: openwrt-devel@lists.openwrt.org, John Crispin Date: Tue, 15 Sep 2015 14:18:42 +0200 Message-Id: <1442319522-11585-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Subject: [OpenWrt-Devel] [PATCH] ipq806x: add platform_pre_upgrade for sysupgrade X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" We're in process of cleaning nand_do_platform_check. Currently is leaves a special mark in /tmp/sysupgrade-nand-path triggering some diffent code path in nand_upgrade_stage1. This can be a bit confusing. The plan is to have the check function only check the image and nothing else. Then platform code (platform_pre_upgrade) should trigger NAND specific upgrade path. This is what this patch implements. This follows ar71xx, lantiq and partially bcm53xx. Signed-off-by: Rafał Miłecki --- I'd like to push it in a month if I won't get any reply. --- target/linux/ipq806x/base-files/lib/upgrade/platform.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 75a01b7..c0e19a1 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -16,4 +16,15 @@ platform_check_image() { esac } +platform_pre_upgrade() { + local board=$(ipq806x_board_name) + + case "$board" in + AP148 |\ + r7500) + nand_do_upgrade "$1" + ;; + esac +} + # use default for platform_do_upgrade()