From ca44b9a0d40e066ca6fa7125022125d7a33f5725 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 17 Mar 2017 17:02:55 +0100 Subject: pistachio: remove custom board detection override Use device tree based model string Signed-off-by: Felix Fietkau --- target/linux/pistachio/base-files/lib/pistachio.sh | 34 ---------------------- .../base-files/lib/preinit/03_preinit_pistachio.sh | 15 ---------- .../pistachio/base-files/lib/upgrade/platform.sh | 2 +- 3 files changed, 1 insertion(+), 50 deletions(-) delete mode 100755 target/linux/pistachio/base-files/lib/pistachio.sh delete mode 100755 target/linux/pistachio/base-files/lib/preinit/03_preinit_pistachio.sh (limited to 'target/linux/pistachio/base-files/lib') diff --git a/target/linux/pistachio/base-files/lib/pistachio.sh b/target/linux/pistachio/base-files/lib/pistachio.sh deleted file mode 100755 index 9390a4c0ff..0000000000 --- a/target/linux/pistachio/base-files/lib/pistachio.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -PISTACHIO_BOARD_NAME= -PISTACHIO_MODEL= - -pistachio_board_detect() { - local machine - local name - - machine=$(cat /proc/device-tree/model) - - case "$machine" in - "IMG Marduk (Creator Ci40)") - name="marduk" - ;; - *) - name="generic" - ;; - esac - - [ -z "$PISTACHIO_BOARD_NAME" ] && PISTACHIO_BOARD_NAME="$name" - [ -z "$PISTACHIO_MODEL" ] && PISTACHIO_MODEL="$machine" - - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - - echo "$PISTACHIO_BOARD_NAME" > /tmp/sysinfo/board_name - echo "$PISTACHIO_MODEL" > /tmp/sysinfo/model -} diff --git a/target/linux/pistachio/base-files/lib/preinit/03_preinit_pistachio.sh b/target/linux/pistachio/base-files/lib/preinit/03_preinit_pistachio.sh deleted file mode 100755 index fda420e7d7..0000000000 --- a/target/linux/pistachio/base-files/lib/preinit/03_preinit_pistachio.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -do_pistachio() { - . /lib/pistachio.sh - - pistachio_board_detect -} - -boot_hook_add preinit_main do_pistachio diff --git a/target/linux/pistachio/base-files/lib/upgrade/platform.sh b/target/linux/pistachio/base-files/lib/upgrade/platform.sh index 2ddac783f3..ee5d5066c3 100755 --- a/target/linux/pistachio/base-files/lib/upgrade/platform.sh +++ b/target/linux/pistachio/base-files/lib/upgrade/platform.sh @@ -33,7 +33,7 @@ platform_nand_pre_upgrade() { local board=$(board_name) case "$board" in - marduk) + img,pistachio-marduk) local boot_partition=$(dmesg | grep "ubi0: attached.*" | sed "s/^.*\(firmware[0-1]\).*/\1/g") echo "Current boot partiton $boot_partition (/dev/mtd$(find_mtd_index $boot_partition))" -- cgit v1.2.3