From patchwork Fri Jan 8 10:27:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stijn Segers X-Patchwork-Id: 1423724 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=volatilesystems.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=P4hKlfp5; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=i87asXmL; dkim=fail reason="signature verification failed" (1024-bit key) header.d=volatilesystems.org header.i=@volatilesystems.org header.a=rsa-sha256 header.s=mail header.b=qQ+oQRtR; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DBztd4nWtz9sWl for ; Fri, 8 Jan 2021 21:32:09 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2u0CW+uD41r1d76ML9f9bQ/hmchr29xnH1ScHPp+32Y=; b=P4hKlfp5jVEFb1CEZLjBZFnHjO okPDmG2r/NNCZ7qVbi1V1aOZ2ittoYsUtdwALcUnJHhh+Qb260SzBo2xcZyXWCJrkfi2epuE2YB4k 50Yz+73Gq61cuFppvTLAkzp/MTAQHYRkQHYRodLOupuFj/G/zxgM8R3DRUftku/aL6E5+PHPv48X+ VqaXV6WQXZiJqqlwfkrO23X1HVrSme13olHor2lVvnN2l1aQGJrAIR6rzWuqI0qHKASfPr7Orb6k9 s+itvHXDikvE3rTygFkcIA84/1e/iiDQc86NCpgf6kj1+C3y7FDo5Vh5h7vx4TP16LSk5Bx+3t6ti wx9x2NpA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxp0h-0007m3-B9; Fri, 08 Jan 2021 10:28:47 +0000 Received: from volatilesystems.org ([51.91.248.52]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxp0S-0007gT-K2 for openwrt-devel@lists.openwrt.org; Fri, 08 Jan 2021 10:28:34 +0000 Received: by volatilesystems.org (Postfix, from userid 112) id ACE53FA316; Fri, 8 Jan 2021 11:28:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1610101701; bh=pNgzKOXPsn9ucfccLLm6IGa15klWhlI1zM5nYKUWdBw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=i87asXmLkh8KFUg6qe22DMRdi/jAiQUPM6s9+RdPiAsmGLqun4gvG63T1de3V5RWG Q/F1gfplzUBqTPRQ7jThFwneMiPTP4uKTlEPwyW3pv8ISCIwuZ7SjeGlOnXH1O/a6P U4LocCD1NV9NRrTQDnog/wxTVrr0D4xNVbvwXSoU= X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on atalanta X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from okeanos.lan (94.105.113.38.dyn.edpnet.net [94.105.113.38]) by volatilesystems.org (Postfix) with ESMTPSA id D08E5FA312 for ; Fri, 8 Jan 2021 11:28:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=volatilesystems.org; s=mail; t=1610101700; bh=pNgzKOXPsn9ucfccLLm6IGa15klWhlI1zM5nYKUWdBw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qQ+oQRtRGSxCBENh6b7gC40RlfgL7X02FKSRNtcsH1iX5nmuRTdB2HjIht53BV8t6 o6Glkw3xLE74dGidZjg7G7eZ9wS0oTcDoixMcaOCcdL++X4CeYp3QPlgsdgr14CTt1 Jec6kQrjN6gAMNrsg2d6ezE7GmmiQN02hgi/BCpY= From: Stijn Segers To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/2] octeon: rename erlite to ubnt,erlite Date: Fri, 8 Jan 2021 11:27:41 +0100 Message-Id: <20210108102742.8233-2-foss@volatilesystems.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210108102742.8233-1-foss@volatilesystems.org> References: <20210108102742.8233-1-foss@volatilesystems.org> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at atalanta X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_052832_785085_C5561132 X-CRM114-Status: GOOD ( 13.12 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Prefix EdgeRouter Lite board_name value with vendor abbreviation UBNT, as other Ubiquiti devices do, and use full name "Ubiquiti EdgeRouter Lite" as model value. Signed-off-by: Stijn Segers --- .../octeon/base-files/lib/preinit/01_sysinfo | 10 ++++++++-- .../octeon/base-files/lib/preinit/79_move_config | 2 +- .../octeon/base-files/lib/upgrade/platform.sh | 16 ++++++++-------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/target/linux/octeon/base-files/lib/preinit/01_sysinfo b/target/linux/octeon/base-files/lib/preinit/01_sysinfo index d66618b0cf..497116b2c7 100644 --- a/target/linux/octeon/base-files/lib/preinit/01_sysinfo +++ b/target/linux/octeon/base-files/lib/preinit/01_sysinfo @@ -6,7 +6,8 @@ do_sysinfo_octeon() { case "$machine" in "UBNT_E100"*) - name="erlite" + name="ubnt,erlite" + model="Ubiquiti EdgeRouter Lite" ;; "UBNT_E200"*) @@ -34,7 +35,12 @@ do_sysinfo_octeon() { [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" echo "$name" > /tmp/sysinfo/board_name - echo "$machine" > /tmp/sysinfo/model + if [ -z "$model" ] + then + echo "$machine" > /tmp/sysinfo/model + else + echo "$model" > /tmp/sysinfo/model + fi } boot_hook_add preinit_main do_sysinfo_octeon diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config b/target/linux/octeon/base-files/lib/preinit/79_move_config index 5a84e6f18a..fb917ec39e 100644 --- a/target/linux/octeon/base-files/lib/preinit/79_move_config +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config @@ -15,7 +15,7 @@ octeon_move_config() { . /lib/functions.sh case "$(board_name)" in - erlite) + ubnt,erlite) move_config "/dev/sda1" ;; itus,shield-router) diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh b/target/linux/octeon/base-files/lib/upgrade/platform.sh index ad5baef4a1..5e5f33b719 100755 --- a/target/linux/octeon/base-files/lib/upgrade/platform.sh +++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh @@ -19,11 +19,6 @@ platform_get_rootfs() { platform_copy_config() { case "$(board_name)" in - erlite) - mount -t vfat /dev/sda1 /mnt - cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" - umount /mnt - ;; itus,shield-router) mount -t vfat /dev/mmcblk1p1 /mnt cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" @@ -34,6 +29,11 @@ platform_copy_config() { cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" umount /mnt ;; + ubnt,erlite) + mount -t vfat /dev/sda1 /mnt + cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE" + umount /mnt + ;; esac } @@ -87,7 +87,7 @@ platform_do_upgrade() { ubnt,edgerouter-4) kernel=mmcblk0p1 ;; - erlite) + ubnt,erlite) kernel=sda1 ;; itus,shield-router) @@ -112,9 +112,9 @@ platform_check_image() { case "$board" in er | \ - erlite | \ itus,shield-router | \ - ubnt,edgerouter-4) + ubnt,edgerouter-4 | \ + ubnt,erlite) local kernel_length=$(tar xf $tar_file $board_dir/kernel -O | wc -c 2> /dev/null) local rootfs_length=$(tar xf $tar_file $board_dir/root -O | wc -c 2> /dev/null) [ "$kernel_length" = 0 -o "$rootfs_length" = 0 ] && {