From patchwork Sun Apr 21 09:53:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3080 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DAFD540F88 for ; Sun, 21 Apr 2024 11:53:59 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-56c1b105949sf2787883a12.3 for ; Sun, 21 Apr 2024 02:53:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713693239; cv=pass; d=google.com; s=arc-20160816; b=Gjlv/OWKTZp/jOSdJEsOcP0zlOs3VW8E39pvYs1osnHGIh6psnOc+0aaJ2jHtQmj8A d1hCh8B69IEcboPpVNKlGwrmHyCCjscYTFrDU5PyBKzWP0wIusv4aE5UScfxtBvanem3 gNlrGpLnXD52givvni++Sgr1/fYCOcbsqgGssdcSUsGXRqOahv0jJtLJFZXajrZzKG0S 0ir1BIN1qHr1BgDKrkwjkDxqmgDgIUXTahG2ZkVNqFc7xeoF9ktfUw/PihBCVdCRzx8Z 748aqZZX3dSj43Gmh7xr974OfvZUPnc5cDJbBgC007aVwuDQDuE9ho5lYP3x2v/ojlDd yB9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=eM89Mec7UskAs2CKiOe8VEB33d0QRpW3MztLwllvBCU=; fh=PLPEjrR/HUtC9IwzCDQbdXVJg/SNzn32sIq+abef4iA=; b=anV7NS9uBFEK1PE8/Qiwm4pabu6JsbN5YVQNJo/Ek/X4tQqe/H00AXadmjwZ1F7ffK MzD+L7DzKAp9R19A4oR1eYVnf6EQoK+e9wQP6gxKq2UCCoWA/DrVBMqCrcqiMv5zie8+ fX6OGbvnjVWoIsavA2MBNqhURECPVKCXohotV7yWvxasmroUcyIE14rBrAH0vAGuYduU rZXMkcL7t8ejkAWK+K+4+Ux95iZ6VSH2DlwWpZfEhvCdfS9vYMCWN/SsfNK7VwO6wPcV W8Is/UcOWlTQ+Zd5uaGEIoo2KNo5M/UIc0ORZZ8T29gRD07meoVMJVpbzitmvz4Pj6WQ iNkw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P3UrW+1d; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1713693239; x=1714298039; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eM89Mec7UskAs2CKiOe8VEB33d0QRpW3MztLwllvBCU=; b=B1btccBhfVRjctDnNxGrhHFJP+Wbjisr1mwtRAbsanAS5nF7NXHsVO6rj/cwIMZy4q GCM+vZ21s0sslXg6qfAHLpxy6VwJpaELewUwLXHAPap21kMXCYRfR1UqJTtr5B1W039z cjP3bs1sPr9zxTuzJayXDFfdN1Avcga4+qTg0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713693239; x=1714298039; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eM89Mec7UskAs2CKiOe8VEB33d0QRpW3MztLwllvBCU=; b=AZpO7tnkhJlafaW1U/LtlODhvJAbL4/1GCo/j81epkhQxHlMGa2sBuMe3iYn40BQ7U /s9oOTAQzL09PzPpTDyob2xLv3glYJw7u7t4cAnLM1NkvFryiLKj40r93aOZ2Ic5Cm81 PN98CHQwoyCiUpNsvPjUlWh+YA4fUFrmM5KmvzwuTDp0OjN/gWAchzCnnR8Q/p0mMUIl +tyrUwZ3qa8hV2f6EArNEDvODuHtReaTBoXNmLewLcVlWakCjzcG4OGwhsjRWSyZUxRI OeK8RZm4dBYOKqITTNpCNDS8xeMpRVRXIWCWf6i+ztaZMxEG2DetvVTgCjlyC/8CTjSv gLYQ== X-Forwarded-Encrypted: i=2; AJvYcCU+EDVH55GwededQpYuSF/rO194I4yGYD/l8B8RrvhI8966n6W3gZ5eJ7GAVRqMvenZQu5qwUiwvVx2mpEMfRmWdztcAK1dnzxDvVhPGfgWntI7I/yd9OU9HJbfkg== X-Gm-Message-State: AOJu0YxJnde0tS0X3G6KLEH42I8Y29csKWWDZlACc3HiKKR4azQzSO6p WHiMqbnNT5B0tOQnH05XIevRDhuD/sCWv0TM2xGCuPrUWTUVCwhkYP5ntRmVcyNDgQ== X-Google-Smtp-Source: AGHT+IEdJgJF2SnSXSBf04cB6VROdOAvuaOWSzG3LjM6GTJKqFnAOMHTc5tCl5qZ/nXH7TbB3wmMnQ== X-Received: by 2002:a50:cd8c:0:b0:570:5b38:1bf2 with SMTP id p12-20020a50cd8c000000b005705b381bf2mr4357298edi.30.1713693239441; Sun, 21 Apr 2024 02:53:59 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:3890:b0:572:40d:913e with SMTP id 4fb4d7f45d1cf-572040d922els101584a12.1.-pod-prod-04-eu; Sun, 21 Apr 2024 02:53:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWulPGGCCqm2tt7cIoxeoDQSv5XbuHkd5uTl7EjBS2KWEXFNnyu0NiyZsQjMn7e03oE4E5tUh5Yx9U4kMSVp7XvghoE/S+GXPqsC6UFseOnATcT X-Received: by 2002:a50:cdd7:0:b0:571:cb02:418a with SMTP id h23-20020a50cdd7000000b00571cb02418amr3948396edj.40.1713693237822; Sun, 21 Apr 2024 02:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713693237; cv=none; d=google.com; s=arc-20160816; b=ZA7yR19fncjN/IqEjKaoAAwyOhwmk5ja+DgRDzoSNWIAacr03g2gIy3Txl60jzqR3L qSvlb0y1pYfvlFeDuhAz5Hb9b8lyk0X6Nl+3Rb+HHy3of1Ae8UwTlzJsJuPdpSdHtl1o asitDbgvFoIAJ3AFnSBDBkcFc/G61xqDg3sEq12Ttzo5KkHMQp7a//gZWSJk3Vl/0XJG tuMOQN1KoGxBYNrI7bn4yw5YtvqKBHDkZsZEOk3emcoSziDvzP9c9Wp1w5wRPrK8CTbq PHki9TpJB7nTaqgYXVUAJMuk8bcNTNpv78NfI8c5WnemzVB9wZ8zlZOFovVsDzLyWYU2 qJ6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=29Tp5nFBIbiiAjhlfkbARueAlWqacRY5aGoBqBv1/4A=; fh=qJbyavjJb6SbapBMlTSLoL9L6caRt3XONkoHocAitCk=; b=KBI1DoyynpxdT68G4WboQnJbnEtIPyYS0i7U2daNeBVNmGzbF7uJ9qPmo2Vtft0Km9 8t4wLY4gUaX5no8AVIwhXfUhnJNewd3xfVk0yWZsh7R+RPSQX3x0uVP7ABeb5BzOP3/n nxJaST/FJRqKxMj6gMnptrp2YeUbQvxaYec3UOP+qFOQHhwRvsVkoOquW+nCPMUDcXJ0 RxmV6B1bmV75XnvEOUWMOw8qWHAI+m32tU07f6sVleUwd/EXr173OId+wij4H0Tc+54E cVqIWHkYaC+sBesVAG8bRcvz0iPn8MJzpRORxakwZGmIU4xr6nWq+vIHYSmwl0AISw1f F+3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P3UrW+1d; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id v13-20020a50d58d000000b0056c06c613dbsor1689215edi.4.2024.04.21.02.53.57 for (Google Transport Security); Sun, 21 Apr 2024 02:53:57 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCXdVQCIjUCfO0fyN/z9Uk/SSGlazGjYExtKzTbi2zlxArzp6pBR4OV5M02xc6GbUQZHFzW0hI4rNauFqc5wPf83t4fGToIJ0aTYTMM8816PBuO6 X-Received: by 2002:a50:ab1a:0:b0:56e:2b31:b111 with SMTP id s26-20020a50ab1a000000b0056e2b31b111mr4422565edc.7.1713693237384; Sun, 21 Apr 2024 02:53:57 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-8-99-67.retail.telecomitalia.it. [87.8.99.67]) by smtp.gmail.com with ESMTPSA id f15-20020aa7d84f000000b00571db231915sm2318427eds.78.2024.04.21.02.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 02:53:57 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Xuanhao Shi , Anand Gadiyar , michael@amarulasolutions.com, linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [RFC PATCH 1/2] support/scripts/genimage.sh: support creating a bmap image Date: Sun, 21 Apr 2024 11:53:52 +0200 Message-ID: <20240421095353.208034-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240421095353.208034-1-dario.binacchi@amarulasolutions.com> References: <20240421095353.208034-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P3UrW+1d; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch adds an option to create, in addition to the usual image, an image of type bmap that drastically reduces the amount of data that needs to be written to an SD card, resulting in time savings. This makes it possible to activate this option easily and maintain backward compatibility for all configurations already using the genimage tool for creating the image to be written to the SD card: BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board///genimage.cfg -b" +BR2_PACKAGE_HOST_BMAP_TOOLS=y It follows that the script now assumes a broader functionality that extends beyond just being an interface for the genimage tool. An alternative implementation could have been to create another script, such as support/scripts/bmap.sh, capable of creating the bmap image using the same parameters passed to support/scripts/genimage.sh (i. e. -c board///genimage.cfg). However, in this case, the script would also need to know that the image is located in the ${BINARIES} directory. This could be achieved by adding an additional parameter, but it might cause genimage.sh to fail due to an unrecognized parameter. Signed-off-by: Dario Binacchi --- support/scripts/genimage.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/support/scripts/genimage.sh b/support/scripts/genimage.sh index 2796e19eb778..72592ebb710d 100755 --- a/support/scripts/genimage.sh +++ b/support/scripts/genimage.sh @@ -4,19 +4,26 @@ die() { cat <&2 Error: $@ -Usage: ${0} -c GENIMAGE_CONFIG_FILE +Usage: ${0} -c GENIMAGE_CONFIG_FILE [-b] + -b create bmap image + -c configuration file + EOF exit 1 } # Parse arguments and put into argument list of the script -opts="$(getopt -n "${0##*/}" -o c: -- "$@")" || exit $? +opts="$(getopt -n "${0##*/}" -o bc: -- "$@")" || exit $? eval set -- "$opts" GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" +GENIMAGE_CREATE_BMAP="no" while true ; do case "$1" in + -b) + GENIMAGE_CREATE_BMAP="yes" + shift 1 ;; -c) GENIMAGE_CFG="${2}"; shift 2 ;; @@ -46,3 +53,13 @@ genimage \ --inputpath "${BINARIES_DIR}" \ --outputpath "${BINARIES_DIR}" \ --config "${GENIMAGE_CFG}" + +if [ "${GENIMAGE_CREATE_BMAP}" = "yes" ]; then + while IFS= read -r image; do + cnt=$(grep -c "${image}" "${GENIMAGE_CFG}") + [ "${cnt}" -gt 1 ] && continue; + image_path="${BINARIES_DIR}/${image}" + bmaptool create "${image_path}" -o "${image_path}.bmap" + gzip -c "${image_path}" > "${image_path}.gz" + done < <(grep '^image ' "${GENIMAGE_CFG}" | cut -d ' ' -f 2) +fi From patchwork Sun Apr 21 09:53:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3081 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 64014412C8 for ; Sun, 21 Apr 2024 11:54:00 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-570255977efsf5055815a12.1 for ; Sun, 21 Apr 2024 02:54:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713693240; cv=pass; d=google.com; s=arc-20160816; b=A+gTh8nRsGg8eMAZx769RqB05Letf+he/FrRy+a8eDcT5QgHN/FO2HfCW1WC2Zrp8V mFKeNC9cHAgmTNl6poVf3JOP993QWno6ccgyry3CqvykJt3LsKLC6CJ7BsUic946JN01 0nLPrbSUX2j+e+TdE/2mOn7GCcKCsorxKkZIz8fh0zFQxL1Z7suj9ytcbqgJ0NXkYCX3 aqYdlShVSYRPbmxlw0UO2ctacvAfzt2pr2GPHyCv5xlC4hahV6in/1n3RwnwqNWzLz1e hP33K7X/NDCca+knLniMj4LoA/8L6DyUm2jQ4q0K4EZtO3djQukmr1wJmbAJPrjmVs1d oP7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=KJD4oACvN1j5ogNj/vekpRozi0X0zzLW65CkhzCSl+M=; fh=CTrp35HSpUynUq8MCfE+WfwgLUg71htuR9CElcw72xA=; b=jww/CIQsyArhCvA52pqYaVyz2cuvF+m2e1KGTR/0Bkseup9kqqDAchd4bdRnbx/k1v x7tEs06SLvG0j2Xb7x6c9SuLdK3iva4YLk2r4kXErb02t/gqFfTjo7iUKhfuAM16WadR RHZkA7RFXl1qTzuNAfCfrlPWJ1BNr5e4tWLKdgm62V+PLJe7JxJVol88PrT6GC4y1vVI T7BI8nzrdgwzBlszQ7NPRZ9wSK2zFG3n1+X8t6kDw5iIJGQTkPj5tHdM0UiwcBsU7cbt X4xy90VIQlp2XcYjl7ahar3PeeSueyw+cChXQTsGXfExFxjd6amwrIjvvgOysgdUQxlm F8UA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cOKPPdfA; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1713693240; x=1714298040; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=KJD4oACvN1j5ogNj/vekpRozi0X0zzLW65CkhzCSl+M=; b=NfROUW6D4C0Nx/6ZQG8d1snq/K7bJSM1oZG6LhaaNmpux24R9pXlStz8klvwCCcAYO d/acSldOc/sBn/kxE0/Nzc7JSinUF425lB6nA2b1aS/1M7jdSX1S81eAPB2R1tu9dTkb sWeniEC5B0Ju2DLjg/TLpbpizlc5ov4TNa+oo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713693240; x=1714298040; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KJD4oACvN1j5ogNj/vekpRozi0X0zzLW65CkhzCSl+M=; b=f9YUT6v1QF0gI+Gi9MZ+PGC3ECSSMEKn0pZBT4ygBGt6/AikMDutdwnf3jBO0hF7HQ ZFKrIRMoL4/aNoZ8VOMh1X0aHj97EYdxOFiEVt/8Ip7hokW8L7fSwbGdUasY2pVLYnDy S1+zz0kjn/1jLQrM+vbNn/g3EReg/RRKPt69vxUJF0kDBEWng8CCGZduxCaQgA5LTg9R PfSLjvaAjU4PL0PwQ7k7mJlFSXqRb1UuXXofbNEJF3WKzCFVHbrm0X4T/4KqU6ByzxUA yNQ72M6EUOkLy2n8ZnZn98QeOMA44BaW5S8SvXWUxlfnoSQTYidq1cxDmJpQFWC6Zbnz wGyw== X-Forwarded-Encrypted: i=2; AJvYcCWk8J9YyQMAavkObwd0m33ScyhI7C+ily90AyBPzrkGUYpZiFvtyuFesqKVmBJKSQ0hlC0rZJgvM4Ikg5oPl+tBBsHGMOoXUL/nDDdDijL+su85xjNveMeRH3GCjA== X-Gm-Message-State: AOJu0YweCfNel1c2bjGHmIaZuKSPcsXpO/IILzts46T57f0pSQofmvNs hqVkXJ+kVXTx5O7I2WEmiG/Bp45QVt6yilzHXuYkaF7b7CCN7Y6cD9xX2Hs0O/qr6A== X-Google-Smtp-Source: AGHT+IGmrnEiYRR2zDMvgi+8LmvckElfqshOZxSet7I3LzMIN0qmQX6CydZZndA2Q6jJDAlt6Ot2wQ== X-Received: by 2002:a05:6402:3591:b0:572:602:2ed7 with SMTP id y17-20020a056402359100b0057206022ed7mr492810edc.14.1713693240150; Sun, 21 Apr 2024 02:54:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:e9f:b0:571:bf98:23c5 with SMTP id 4fb4d7f45d1cf-571cc5c7c24ls1310401a12.2.-pod-prod-00-eu; Sun, 21 Apr 2024 02:53:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXnpWwtz3PjP5e3OHLu3gHoFn8Aj7zy89SuNFjPqnrAxpiNejSQfqZ0Iq03KedP6stZXXOS0O/VVa0icOuSsPvLRN3eIQLPHlBOupIcVfsbeA0W X-Received: by 2002:a05:6402:6c6:b0:571:badc:203d with SMTP id n6-20020a05640206c600b00571badc203dmr9073978edy.16.1713693238515; Sun, 21 Apr 2024 02:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713693238; cv=none; d=google.com; s=arc-20160816; b=L0uqloty8tsFGGGZ2QP+D8+8dWssRBiOL/7HOrHJ6vqt2+MhOG2M09wTG+vFa5wwkt s11g1hEHNPXryzb3jQKNmT9FCSRBZu3ekV3h8QoTgQSQn2tXXS+CI04RX4EBNxD44u7I x83liLRj1V9N6aqfGpxqkqTXVp80f39gI6XtVz0RTifEsys+E7ughOtbXvDeyXEl3dro oLM/zKh3N2keAK2kPDrrOepq/SoRTmLBLTizRM+PdT72MIndDIasCHiUOhbOTCvwkp1P 0Q+ddGSfgyhiQy71Wf/8E/0ftOQ3M57M3sWDKwHTWIujSBzVO1zszUcccRRFrJQWF+wF Fl0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=kCM/H82T9SSxONTHQuQnnSbmIg7C+OwrC53vcl5eOLM=; fh=OVsYii4+qqu284hLeRgd476kWo6vHr64bGvaDWf9jSs=; b=p3crLvlJ74uqDM31tevaIdQWvNK248FLrABpVtVF9hiOuR6x/NYmsOhFMiXycp9P2Z 4CFb60d+rIH/JIYZOfY3wZK2XHMbSUj5vBqmZIwzUfIhQBAsh0Swb6jmETHulcco3uDc lKJbgymhTTIq1grUxPm51klCiVNpO46kN1rFFkjmG0ihsFghYXbzenLXddQqMVeTghfV JWHNvHLuP13j2prerHVSZEDV/DjhxMVm1KtJafMG1tk3081Offio+w+q6CFFMv/y9UFL FzkuJqTBRJ/3ufzZwd6cPxaJeB6Egp0nUojQ1NQft5qmIoPWyWSaXsDknMfHCqiV9arC 0ZIw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cOKPPdfA; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id t27-20020a50d71b000000b0056bc06874d4sor2966608edi.4.2024.04.21.02.53.58 for (Google Transport Security); Sun, 21 Apr 2024 02:53:58 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCVYMuXmGdg3m+MgdFu/lcxvwogDV+9D8l9fQugrGGIv799Yr/5JhDV4oN9ur04aLylvgjeJnOYMXRTXiXJhGTl3f+SZKuYEwkNv3gno2+itPl+r X-Received: by 2002:a05:6402:340e:b0:56b:f2d8:1552 with SMTP id k14-20020a056402340e00b0056bf2d81552mr9021172edc.13.1713693238206; Sun, 21 Apr 2024 02:53:58 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-8-99-67.retail.telecomitalia.it. [87.8.99.67]) by smtp.gmail.com with ESMTPSA id f15-20020aa7d84f000000b00571db231915sm2318427eds.78.2024.04.21.02.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 02:53:57 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Xuanhao Shi , Anand Gadiyar , michael@amarulasolutions.com, linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [RFC PATCH 2/2] configs/ti_am62x_sk_defconfig: create the bmap image Date: Sun, 21 Apr 2024 11:53:53 +0200 Message-ID: <20240421095353.208034-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240421095353.208034-1-dario.binacchi@amarulasolutions.com> References: <20240421095353.208034-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cOKPPdfA; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The use of a bmap image allows for speeding up the writing of the image to the SD card, as can be seen from the following results: $time sudo dd if=output/images/sdcard.img of=/dev/sda [sudo] password for dario: 655361+0 records in 655361+0 records out 335544832 bytes (336 MB, 320 MiB) copied, 49,1122 s, 6,8 MB/s real 0m52,177s user 0m0,022s sys 0m0,017s $time sudo bmaptool copy output/images/sdcard.img.gz /dev/sda bmaptool: info: discovered bmap file 'sdcard.img.bmap' bmaptool: info: block map format version 2.0 bmaptool: info: 81921 blocks of size 4096 (320.0 MiB), mapped 29339 blocks (114.6 MiB or 35.8%) bmaptool: info: copying image 'sdcard.img.gz' to block device '/dev/sda' using bmap file 'sdcard.img.bmap' bmaptool: info: 100% copied bmaptool: info: synchronizing '/dev/sda' bmaptool: info: copying time: 11.8s, copying speed 9.7 MiB/sec real 0m11,885s user 0m0,004s sys 0m0,011s Signed-off-by: Dario Binacchi --- configs/ti_am62x_sk_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/ti_am62x_sk_defconfig b/configs/ti_am62x_sk_defconfig index 5c7b97b3b0b1..708cb98f22d5 100644 --- a/configs/ti_am62x_sk_defconfig +++ b/configs/ti_am62x_sk_defconfig @@ -5,7 +5,7 @@ BR2_DOWNLOAD_FORCE_CHECK_HASHES=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/common/am6xx/post-build.sh" BR2_ROOTFS_POST_BUILD_SCRIPT_ARGS="-c ttyS2,115200n8 -d k3-am625-sk.dtb -l am62x-sk-buildroot -r /dev/mmcblk1p2 -x earlycon=ns16550a,mmio32,0x02800000" BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg" +BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/ti/am62x-sk/genimage.cfg -b" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.18" @@ -44,6 +44,7 @@ BR2_TARGET_UBOOT_FORMAT_IMG=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="tispl.bin" BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin" +BR2_PACKAGE_HOST_BMAP_TOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y