From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 42EE0138350 for ; Sat, 2 May 2020 01:40:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7313CE09B4; Sat, 2 May 2020 01:40:53 +0000 (UTC) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 305ADE09B4 for ; Sat, 2 May 2020 01:40:53 +0000 (UTC) Received: by mail-pj1-f52.google.com with SMTP id a7so648891pju.2 for ; Fri, 01 May 2020 18:40:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wncyBtmR+Tn4LDK61cV7BspvnHnRaW6BWzYMU2xdwLE=; b=DYRLkzYJ+FoCHwBTkGHfYNhUyavNQzGqqeBX5902pwEWG2uE9J1vFluT/0i0t8YMYs e8yaJ10OX3fjREWdXQRN/hKG3W2mWf4J+fhEtq4m50P/28K6EFsusAadzKsFcEDaHuXw +1dUm+BcCI8FDLDK2rtKj3sGsunXR7LfIixXy8g7a+8uFsovLdUXFG2O0WET54hPPMjr 1NfNv5YXmLLVkH6++NHYThmgA5PHFqHzVWTrxFsoTN7BQ0TtG12TOlS8gjJUht2zH8S3 M4kiI3Cii/2hOaEduOpISQ83FiILFNe/9wS6Z2FGktEKur2XIt7dt+jyKiAG16Twh9/Y Dhcw== X-Gm-Message-State: AGi0Pua1UJtRKaWJnrcHXVaI2dFUaEFa9vkay7CK/kAsNVZ/CoJ/sVEO nsaeJFEc7ae3j1z27hqr+64Fz5MA X-Google-Smtp-Source: APiQypIdH6iFhbNvBFJ7T+zqjx0V8MzIBxjuowoBcfjc4E7B3MEH1cLH7pDCk/GxHr1cLklf8mRl6w== X-Received: by 2002:a17:90a:9b82:: with SMTP id g2mr3063479pjp.72.1588383651894; Fri, 01 May 2020 18:40:51 -0700 (PDT) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id r28sm3330851pfg.186.2020.05.01.18.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2020 18:40:51 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 3/8] targets: Inline filesystem-functions.sh Date: Fri, 1 May 2020 18:40:31 -0700 Message-Id: <20200502014036.1039317-3-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200502014036.1039317-1-mattst88@gentoo.org> References: <20200502014036.1039317-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 43237b8c-7966-4ee3-bf71-000cb2147824 X-Archives-Hash: 99257d36fb75ef7d4c0e8b8ea936385d Signed-off-by: Matt Turner --- targets/support/filesystem-functions.sh | 19 ------------------- targets/support/target_image_setup.sh | 20 ++++++-------------- 2 files changed, 6 insertions(+), 33 deletions(-) delete mode 100755 targets/support/filesystem-functions.sh diff --git a/targets/support/filesystem-functions.sh b/targets/support/filesystem-functions.sh deleted file mode 100755 index a95ae0b9..00000000 --- a/targets/support/filesystem-functions.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# Dont forget to update functions.sh check_looptype -# $1 is the target directory for the filesystem - -create_squashfs() { - echo "Creating squashfs..." - export loopname="image.squashfs" - gensquashfs -D "${clst_destpath}" ${clst_fsops} "$1/${loopname}" \ - || die "gensquashfs failed, did you emerge squashfs-tools-ng?" -} - -create_jffs2(){ - echo "Creating jffs2..." - export loopname="image.jffs" - # fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd - mkfs.jffs2 --root=${clst_destpath} --output=$1/${loopname} ${clst_fsops} \ - || die "Could not create a jffs2 filesystem" -} diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh index 423dc4c4..03cb4741 100755 --- a/targets/support/target_image_setup.sh +++ b/targets/support/target_image_setup.sh @@ -1,25 +1,17 @@ #!/bin/bash source ${clst_shdir}/support/functions.sh -source ${clst_shdir}/support/filesystem-functions.sh -# Make the directory if it doesnt exist -mkdir -p $1 +mkdir -p "${1}" -loopret=1 +echo "Creating ${clst_fstype} filesystem" case ${clst_fstype} in squashfs) - create_squashfs $1 - loopret=$? + gensquashfs -D "${clst_destpath}" "${clst_fsops}" "${1}/image.squashfs" \ + || die "Failed to create squashfs filesystem" ;; jffs2) - create_jffs2 $1 - loopret=$? + mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" "${clst_fsops}" \ + || die "Failed to create jffs2 filesystem" ;; esac - -if [ ${loopret} = "1" ] -then - die "Filesystem not setup" -fi -exit $loopret -- 2.26.2