From patchwork Thu Feb 22 17:04:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 39936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23856C48BF8 for ; Thu, 22 Feb 2024 17:04:29 +0000 (UTC) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mx.groups.io with SMTP id smtpd.web10.18285.1708621465801535536 for ; Thu, 22 Feb 2024 09:04:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iFppbYDP; spf=pass (domain: gmail.com, ip: 209.85.222.169, mailfrom: twoerner@gmail.com) Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-787a2a14d9cso47904985a.2 for ; Thu, 22 Feb 2024 09:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708621464; x=1709226264; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xUuPuHN8gbHkqF/ZEFhLwVn+drImfTSoyXoRPk7D/+4=; b=iFppbYDP4a8Boj6x+sGhsWOTfgRECjdCaYYdHnpHvFo5ahPJNbCoEIZQe1BTV3Fkmn ja3v3Y+pWLe+pXaVJHnQzgrGWkBKlBftKI8dGQ3elo36VcTFtN9EkD3BkEwLuYRyKdLp aUHR2vQ7++rBRUv5CVDkJjxY7/dOMbZ+IS8U8e9t1sNbcxA4hA/erjk36+hcvx7VUbzG IFkN0yGv9FIoiHMxjmlwl+hiCCfDEPUV/C2bz+yox6RYXwbNkBt1ug4g8K9kQ1vIbZ7m nI999DUfxHxdDQdxQlopKLtHxZefU/AtssLOMBTbAGTsFmaAxQTOuPWRLydxFzSk0xuM KzvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708621464; x=1709226264; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xUuPuHN8gbHkqF/ZEFhLwVn+drImfTSoyXoRPk7D/+4=; b=o2ta801BzZHhj/MGgLtiSQ61dnuoG8lcGkQV6fXmmvhT/N4Yx8+AduiiWnQMD6dPDs CzPsZ0yz26zCkbUAV+oztdFzlIAeYNVm9jt3cqH0B8Yv0V/WZhTl444kfOUHeK12S89N 1vYFAvHXj1I1o0FdZ5SaqN9BIeMP8BNV+Xb5BLIL0nLdte3oUPyERUtlLGEvZ5Tv+KZW xlEIaCzwdOdRGQibIBQZd7/2W3Mvxi+mav0CTJ2w93tkwOjfc1t+ADCkDWzwj1hunaW+ 2NDReuXDetEm9OZIJ6pbM1smiC0TaPWh245OEVTbDDc6YCl/+5lSsgDoDp5ggRgZmfB3 +4NQ== X-Gm-Message-State: AOJu0YxlFJUGIeHiD1xpxQcDE0+ur/rd7z1sY0dJOso2EQzChJewUHU4 huyfZt1nz8j1/Z2nu29Xb6bx03JwrahMSB7e6z0ZzNm3oTZd7iR6nIP3zYHZ X-Google-Smtp-Source: AGHT+IHs/UKdzTpheolwovZ3xK/enmaL+bwDMk4C5CyjXMMcJohKFAMiYbqYSAmHTLxM0VTsGeS0dw== X-Received: by 2002:a05:620a:1489:b0:787:6f29:2f43 with SMTP id w9-20020a05620a148900b007876f292f43mr11863526qkj.0.1708621463706; Thu, 22 Feb 2024 09:04:23 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id qj17-20020a05620a881100b007872541c53bsm265848qkn.24.2024.02.22.09.04.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:04:22 -0800 (PST) From: Trevor Woerner To: yocto@lists.yoctoproject.org Cc: Quentin Schulz Subject: [meta-rockchip][PATCH v4 1/5] rockchip.wks: specify offsets in sectors Date: Thu, 22 Feb 2024 12:04:11 -0500 Message-ID: <20240222170415.7061-1-twoerner@gmail.com> X-Mailer: git-send-email 2.43.0.76.g1a87c842ece3 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 22 Feb 2024 17:04:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/62568 In WIC, size arguments can be optionally specified using one of a variety of suffixes (e.g. K, M, G, etc.) thanks to sizetype(). One such suffix being "s/S" for handling sector sizes which are assumed to be 512 bytes, rather than the other size suffixes which are multiples of 1024 bytes. Using the s/S sizetype allows the definition to match the documentation. Unfortunately we can not use the s/S suffix for --fixed-size. Reviewed-by: Quentin Schulz Signed-off-by: Trevor Woerner --- changes in v4: - add Quentin's tag changes in v3: - new --- wic/rockchip.wks | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/wic/rockchip.wks b/wic/rockchip.wks index fac0b8f70112..804e84ceb316 100644 --- a/wic/rockchip.wks +++ b/wic/rockchip.wks @@ -5,8 +5,7 @@ # short-description: Create a disk image suitable for booting Rockchip from SD-card # long-description: Creates a disk image partitioned using GPT, suitable for Rockchip # Disk layout -# Note that the reference documentation refers to 512 byte disk sectors, but -# wic uses 1KB blocks. The following table uses 512 byte sectors: +# See: https://opensource.rock-chips.com/wiki_Partitions # # Partition Start Sector Number of Sectors # loader1 64 8000 (idbloader / U-Boot SPL) @@ -17,12 +16,12 @@ # boot 32768 229376 # root 262144 - (suggested) -part loader1 --offset 32 --fixed-size 4000K --source rawcopy --sourceparams="file=${SPL_BINARY}" -part reserved1 --offset 4032 --fixed-size 64K -part reserved2 --offset 4096 --fixed-size 4096K -part loader2 --offset 8192 --fixed-size 4096K --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" -part atf --offset 12288 --fixed-size 4096K -part /boot --offset 16384 --size 114688K --active --source bootimg-partition --fstype=vfat --label boot --use-uuid --sourceparams="loader=u-boot" +part loader1 --offset 64s --fixed-size 4000K --source rawcopy --sourceparams="file=${SPL_BINARY}" +part reserved1 --offset 8064s --fixed-size 64K +part reserved2 --offset 8192s --fixed-size 4096K +part loader2 --offset 16384s --fixed-size 4096K --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" +part atf --offset 24576s --fixed-size 4096K +part /boot --offset 32768s --size 114688K --active --source bootimg-partition --fstype=vfat --label boot --use-uuid --sourceparams="loader=u-boot" part / --source rootfs --fstype=ext4 --label root --use-uuid bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw rootfstype=ext4 init=/sbin/init" From patchwork Thu Feb 22 17:04:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 39937 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09A23C5479F for ; Thu, 22 Feb 2024 17:04:39 +0000 (UTC) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by mx.groups.io with SMTP id smtpd.web10.18288.1708621469062864136 for ; Thu, 22 Feb 2024 09:04:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kTr867pq; spf=pass (domain: gmail.com, ip: 209.85.222.178, mailfrom: twoerner@gmail.com) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-787a2a14d9cso47910885a.2 for ; Thu, 22 Feb 2024 09:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708621467; x=1709226267; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o//WsqIVankd6wflb3sZWo8vqPxuQ6dY0PMqjdV4Vj0=; b=kTr867pq2T4WdzEaLtuoRtBwSDKdMU+gJ7Vun5p1IrKA1zHKm7IgRAal2f8DhAh8Fc QDGS59XmDfDd4Yd/n3Qr3Rbkq6tQzStsYt1HqPPO6/O+/VLQoLyB+oP1swMRVj/zPw4K M7TkoCAveSY5NXvKuOY1N/EvCDtCR1AO+RJJcXPHPlUky9PDsd8BkZO167LDasnL46NR e+sUXToPtLzRSM8T9px/fX+KGFs3PgMZoEZsg5JntBsvJ3YCyLc+uGAyOiBp73azDtUN pW8RniBDSwH85fam8L8Zg0pZOMeC6srL8oejgot6zqQt3D4icc140FZdRoTl5CSc63Ll 1gbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708621467; x=1709226267; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o//WsqIVankd6wflb3sZWo8vqPxuQ6dY0PMqjdV4Vj0=; b=XTYbZ4ms8uW2G51loMTEt4PHwXZrbSUYWvnKGcEDgrB97bVNRvonAjrBBDAVF2Ym2E az8HMBNbCz6tuBR8aj0f9pqy4IqijCER8kATyERd6fG4dF6tz16vUzdoVlpb2W38Wrcg YWUkJX4VkOrZgdlIBFegTp0M94V/1yDPxpP/mXlYYyE7YfRwZczX/gS9QLC3w8m1GsCc oJSSjJ4Mk4knWQbfc2os3ZcehRupYbRrwcubrZbSk10Lf7wg7rRbAbcNPlWyHT0Iv/+/ X4Xj9X+N2z8IaRvLdrK0SjJ5veSI6uKCW9ytm/Ul5kCX3lKKGu1j35rrUGx5lwjPCHhK WJIw== X-Gm-Message-State: AOJu0Yy+Zd0pbQpySGhd7I5r8UGulYOcgQC9idy57/dBpeYGCgNDRt5o aGtI7YONdUHItcMLqJbvXk/yBZL4kjeGLQ8g28xaDofFi44/sw1wU8sf38yw X-Google-Smtp-Source: AGHT+IGm705k3BSbMh+m3qWm/OD88B1vL72FdXEhhDdbCRXVYGT+oKwL19iNO/5usV7NsqQg2oP+kQ== X-Received: by 2002:a05:620a:3cf:b0:785:d3e7:3b2 with SMTP id r15-20020a05620a03cf00b00785d3e703b2mr21294767qkm.24.1708621466824; Thu, 22 Feb 2024 09:04:26 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id qj17-20020a05620a881100b007872541c53bsm265848qkn.24.2024.02.22.09.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:04:24 -0800 (PST) From: Trevor Woerner To: yocto@lists.yoctoproject.org Cc: Quentin Schulz Subject: [meta-rockchip][PATCH v4 2/5] rockchip.wks: specify fstype Date: Thu, 22 Feb 2024 12:04:12 -0500 Message-ID: <20240222170415.7061-2-twoerner@gmail.com> X-Mailer: git-send-email 2.43.0.76.g1a87c842ece3 In-Reply-To: <20240222170415.7061-1-twoerner@gmail.com> References: <20240222170415.7061-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 22 Feb 2024 17:04:39 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/62569 If the wks file doesn't specify, the assumption is that each partition contains a vfat-formatted filesystem. Most of the partitions in the Rockchip layout don't have filesystems. Implicitly setting the fstype to vfat causes wic to format the partitions. It doesn't make sense to format the rawcopy partitions as vfat just to immediately overwrite them with binaries, and it wastes time formatting partitions that won't ever be used as filesystems. Reviewed-by: Quentin Schulz Signed-off-by: Trevor Woerner --- changes in v4: - none changes in v3: - tweak to accommodate offsets specified in sectors changes in v2: - reword the commit message to add clarity - add Quentin's tag --- wic/rockchip.wks | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wic/rockchip.wks b/wic/rockchip.wks index 804e84ceb316..42b731ac47b2 100644 --- a/wic/rockchip.wks +++ b/wic/rockchip.wks @@ -16,12 +16,12 @@ # boot 32768 229376 # root 262144 - (suggested) -part loader1 --offset 64s --fixed-size 4000K --source rawcopy --sourceparams="file=${SPL_BINARY}" -part reserved1 --offset 8064s --fixed-size 64K -part reserved2 --offset 8192s --fixed-size 4096K -part loader2 --offset 16384s --fixed-size 4096K --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" -part atf --offset 24576s --fixed-size 4096K -part /boot --offset 32768s --size 114688K --active --source bootimg-partition --fstype=vfat --label boot --use-uuid --sourceparams="loader=u-boot" -part / --source rootfs --fstype=ext4 --label root --use-uuid +part loader1 --offset 64s --fixed-size 4000K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}" +part reserved1 --offset 8064s --fixed-size 64K --fstype=none +part reserved2 --offset 8192s --fixed-size 4096K --fstype=none +part loader2 --offset 16384s --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" +part atf --offset 24576s --fixed-size 4096K --fstype=none +part /boot --offset 32768s --size 114688K --fstype=vfat --active --source bootimg-partition --label boot --use-uuid --sourceparams="loader=u-boot" +part / --fstype=ext4 --source rootfs --label root --use-uuid bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw rootfstype=ext4 init=/sbin/init" From patchwork Thu Feb 22 17:04:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 39940 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 215E0C54E41 for ; Thu, 22 Feb 2024 17:04:39 +0000 (UTC) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mx.groups.io with SMTP id smtpd.web11.18083.1708621472184445864 for ; Thu, 22 Feb 2024 09:04:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jSohg0EU; spf=pass (domain: gmail.com, ip: 209.85.222.169, mailfrom: twoerner@gmail.com) Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-787aca0b502so3464785a.1 for ; Thu, 22 Feb 2024 09:04:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708621470; x=1709226270; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bT1lrq1CuwjHEpY6Fw6BfB9P7+U4TdSporDF8e9nens=; b=jSohg0EUpUVaSC0bWq6F0a2RZY3ibrRYBcZwBjq+yCSYwkpsob0g31yOCYRhRRpfAe ScB4dciEWemr2SrT2x7JRSobq3MyrA+SPahl/DW+g0iAE9XA5OZet+6qZx/gs2r+v7F9 gQBXOkYjeBvalil15nNATbe0LbL3zG9N2+jhi6V9dVIvj5WNelZDagwEYkuncueKcmAY CUo/RHz+xHBFYMlvU3u4mxFmmtywpr3DFo9ZmbKOUKb9tg6vrjnhgDfAXpYY0rFMMeiQ Z7cQEF3XgCDGJBiakbUtvfIfo5t9OqH8CIjgzOPeNdzERPHIoL6HZUEsQUCRD+pStqks 5UkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708621470; x=1709226270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bT1lrq1CuwjHEpY6Fw6BfB9P7+U4TdSporDF8e9nens=; b=oBMCPGDTCs+cHBcL5GFl/7ILztzQP0vKrRwk43an+A0Gel2f0LCz7EtAFfgGX3Rhbw UCGuq97UZLeJMl/GhSoyyaDnnR58l0eguIEQ7+nfIIjzowRvznaWuC1+GsmK5fvKw/Zz X1onmqAybEqJe4aaZS3XOuGp5MnNuVTi2CpispkApKjPnTFpCf5Wrq8ldy1jfFjkmBbH g6EkuP0eYyZnNt+qSorDxr0mLSrVgl7FDqff6+MZeZRTjfBI/vr/gx9oIYXfj61FlhUj 8xf+mGtGl4+LsJ9MvshlDnd9wddXom+mdMq0rqJIqb6/Nc6wihMXeo6cHKn5ph1YAKN1 GSLw== X-Gm-Message-State: AOJu0YzallIzxYJwx4Kp2BJS6xwgESDpKzJdKsu+AllAOEWA30Ve7t+j ayI7YJAW4M1Xmsc9dxhNbBMH254zSA/mPOcREvn+WB1YCOAFfCutNYVBiYa8 X-Google-Smtp-Source: AGHT+IHHSkZeVo2iYEBs7o05Vz+Qpd9WOTDjVzxpjRN5lNY9z1RdsK+Gat+s1nSYCUPY6oh4WxnpLw== X-Received: by 2002:a05:620a:12c8:b0:787:25c7:1be6 with SMTP id e8-20020a05620a12c800b0078725c71be6mr24259423qkl.30.1708621469984; Thu, 22 Feb 2024 09:04:29 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id qj17-20020a05620a881100b007872541c53bsm265848qkn.24.2024.02.22.09.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:04:27 -0800 (PST) From: Trevor Woerner To: yocto@lists.yoctoproject.org Cc: Quentin Schulz Subject: [meta-rockchip][PATCH v4 3/5] rockchip.wks: add most Rockchip partitions Date: Thu, 22 Feb 2024 12:04:13 -0500 Message-ID: <20240222170415.7061-3-twoerner@gmail.com> X-Mailer: git-send-email 2.43.0.76.g1a87c842ece3 In-Reply-To: <20240222170415.7061-1-twoerner@gmail.com> References: <20240222170415.7061-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 22 Feb 2024 17:04:39 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/62570 Rockchip defines the expected layout/map of the default storage device. Fill out the wks description so it matches. https://opensource.rock-chips.com/wiki_Partitions There are 2 partitions at the start that can not be specified in rockchip.wks due to a limitation in wic which assumes all sizes (e.g. --size or --fixed-size) are specified in units of 1024 bytes. Since these partitions don't fall on 1024-byte boundaries, they can not be specified at this time. Note: in the Rockchip layout, not all partitions are expected to show up in the gpt partition table. While --no-table could be used to hide these partitions from the partition table, as specified in the wiki, there's no practical reason to do so. In fact, exposing these partitions in the partition table makes it easier and safer for users to interact with them. For example, a user dd'ing some data to a particular area would need to ensure they're using the correct offset and size values when accessing the raw disk directly. However being able to specify a partition ensures data won't accidentally "spill" out into adjacent regions. Note: there is a mistake in the Rockchip table (which I've copied verbatim here in this commit message but corrected in rockchip.wks). Going by the values of the "Start Sector", the size of the "reserved1" partition is listed as being 2x its actual size/number of sectors. Expected: Partition Start Sector Number of Sectors Partition Size PartNum in GPT Requirements MBR 0 00000000 1 00000001 512 0.5KB Primary GPT 1 00000001 63 0000003F 32256 31.5KB loader1 64 00000040 7104 00001bc0 4096000 2.5MB 1 preloader (miniloader or U-Boot SPL) Vendor Storage 7168 00001c00 512 00000200 262144 256KB SN, MAC and etc. Reserved Space 7680 00001e00 384 00000180 196608 192KB Not used reserved1 8064 00001f80 128 00000080 65536 64KB legacy DRM key U-Boot ENV 8128 00001fc0 64 00000040 32768 32KB reserved2 8192 00002000 8192 00002000 4194304 4MB legacy parameter loader2 16384 00004000 8192 00002000 4194304 4MB 2 U-Boot or UEFI trust 24576 00006000 8192 00002000 4194304 4MB 3 trusted-os like ATF, OP-TEE boot 32768 00008000 229376 00038000 117440512 112MB 4 kernel, dtb, extlinux.conf, ramdisk rootfs 262144 00040000 - - - -MB 5 Linux system Prior to this patch: # fdisk -l /dev/mmcblk1 GPT PMBR size mismatch (1504727 != 30375935) will be corrected by write. The backup GPT table is not on the end of the device. Disk /dev/mmcblk1: 14.48 GiB, 15552479232 bytes, 30375936 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 00000000-0000-0000-0000-00004D9B9EF0 Device Start End Sectors Size Type /dev/mmcblk1p1 64 8063 8000 3.9M Microsoft basic data /dev/mmcblk1p2 8064 8191 128 64K Microsoft basic data /dev/mmcblk1p3 8192 16383 8192 4M Microsoft basic data /dev/mmcblk1p4 16384 24575 8192 4M Microsoft basic data /dev/mmcblk1p5 24576 32767 8192 4M Microsoft basic data /dev/mmcblk1p6 32768 330955 298188 145.6M Microsoft basic data /dev/mmcblk1p7 330956 1504693 1173738 573.1M Linux filesystem New: # fdisk -l /dev/mmcblk1 GPT PMBR size mismatch (1504473 != 30375935) will be corrected by write. The backup GPT table is not on the end of the device. Disk /dev/mmcblk1: 14.48 GiB, 15552479232 bytes, 30375936 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 00000000-0000-0000-0000-00004D9B9EF0 Device Start End Sectors Size Type /dev/mmcblk1p1 64 7167 7104 3.5M Linux filesystem /dev/mmcblk1p2 7168 7679 512 256K Linux filesystem /dev/mmcblk1p3 7680 8063 384 192K Linux filesystem /dev/mmcblk1p4 8064 8127 64 32K Linux filesystem /dev/mmcblk1p5 8128 8191 64 32K Linux filesystem /dev/mmcblk1p6 8192 16383 8192 4M Linux filesystem /dev/mmcblk1p7 16384 24575 8192 4M Linux filesystem /dev/mmcblk1p8 24576 32767 8192 4M Linux filesystem /dev/mmcblk1p9 32768 330955 298188 145.6M Microsoft basic data /dev/mmcblk1p10 330956 1504439 1173484 573M Linux filesystem Reviewed-by: Quentin Schulz Signed-off-by: Trevor Woerner --- changes in v4: - remove all --no-table to include all partitions in the gpt table changes in v3: - tweaked to accommodate offsets specified in sectors - clarified that the first 2 partitions can not be added - change name of vstorage to v_storage - fixed typo (ATR -> ATF) - added Quentin's tag changes in v2: - expand the commit message to show past, expected, and new behaviour - spell out that vstorage stands for "vendor storage" --- wic/rockchip.wks | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/wic/rockchip.wks b/wic/rockchip.wks index 42b731ac47b2..714fc5e11e11 100644 --- a/wic/rockchip.wks +++ b/wic/rockchip.wks @@ -8,16 +8,22 @@ # See: https://opensource.rock-chips.com/wiki_Partitions # # Partition Start Sector Number of Sectors -# loader1 64 8000 (idbloader / U-Boot SPL) -# reserved1 8064 128 -# reserved2 8192 8192 +# loader1 64 7104 (idbloader / U-Boot SPL) +# v_storage 7168 512 (vendor storage: e.g. serial number, MAC address, etc) +# reserved 7680 384 (not used) +# reserved1 8064 64 (legacy DRM key) +# uboot_env 8128 64 (U-Boo environment) +# reserved2 8192 8192 (legacy parameters, ATAGS, etc) # loader2 16384 8192 (U-Boot proper) -# atf 24576 8192 +# atf 24576 8192 (trusted OS e.g. ATF, OP-TEE, etc) # boot 32768 229376 # root 262144 - (suggested) -part loader1 --offset 64s --fixed-size 4000K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}" -part reserved1 --offset 8064s --fixed-size 64K --fstype=none +part loader1 --offset 64s --fixed-size 3552K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}" +part v_storage --offset 7168s --fixed-size 256K --fstype=none +part reserved --offset 7680s --fixed-size 192K --fstype=none +part reserved1 --offset 8064s --fixed-size 32K --fstype=none +part uboot_env --offset 8128s --fixed-size 32K --fstype=none part reserved2 --offset 8192s --fixed-size 4096K --fstype=none part loader2 --offset 16384s --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" part atf --offset 24576s --fixed-size 4096K --fstype=none From patchwork Thu Feb 22 17:04:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 39938 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 147AEC48BF8 for ; Thu, 22 Feb 2024 17:04:39 +0000 (UTC) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by mx.groups.io with SMTP id smtpd.web11.18085.1708621474957925495 for ; Thu, 22 Feb 2024 09:04:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=M38yym8Z; spf=pass (domain: gmail.com, ip: 209.85.222.175, mailfrom: twoerner@gmail.com) Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-78731e444daso126476885a.2 for ; Thu, 22 Feb 2024 09:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708621473; x=1709226273; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hwt3j1wSVFmvT2Joq4lYguscb6gf2lyLfnpmczdD3qU=; b=M38yym8ZD8WlYM76tVQ+GHgXhphR1olURBP6f0zqP3BTvBvQL/SXACya/qOevG58HK q6cft31a/U63vpbBDctORA9UbTzZRAN6Eny5UMmCbVDbHTfumuIULqtzHXPEgFvRVWve uOjKw5zg1AFt323q5L88Yfp7KJEmZ1+7NLvLnniTruInb44kNRFWnw/Y3snnhdCwQbcM c43J6MT7FKa/8CDW6mePo/HUHwtBxk0mmLc09hXVYkpWFerisAEQ+HrwZImMo/F4+KjR jDBysnNZwUpX8owLInxkFCyKDrl+nJxmLEKFks6Ee9E+HBb8g8g9qawaQfwUpg9uXZMx U4gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708621473; x=1709226273; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hwt3j1wSVFmvT2Joq4lYguscb6gf2lyLfnpmczdD3qU=; b=Svv53qBsguMicZVDMUj9Ts3MRa0wF7O0O1fPdXOOu0c231YvuH+LH+m6x3jXiVYZoH Ox4or3QuONR5kmp1iRCyhJAi4PGk4huG/7NfVremxfACumr6JqHzHv66XjTMTNbdyp7T tDPFuiJ6vzoQheLPqrLQOim5sz5ou6tW7/khxBoM1R+no2jCIRPbCcfRAUF5V1n+KmoH KWx0LEYt0v9HAXUuv5es6ZLQHrFYBPc/RhLLjOscHABAMYJUfK/Fs9sBxtKnAhV/WAUV LhOO/1+NHSjNyNJqdRtnO0HpeFFL6P2Y9xHs1X1z69D+s3Qrg2FPHcHNUUieh0bR/b3n Kemg== X-Gm-Message-State: AOJu0Yz3J9C7t1lfxSMVyc52GVHrH+tyDGa0MNIL2T1BD8AJ9OwjUXsC 7yIVgG0KSOG6Rh6cQx09xZyaT8kMPe+TdBIYPREkoLcv0qbvBSUdVQftQQ1k X-Google-Smtp-Source: AGHT+IHIsA8pMmZoFw79gZ6ohuZSgBCdGMHBNaTrk6+Bj4eLEnwQ8MuoAGQHAv/pwLGDe8vjLbaUXA== X-Received: by 2002:a05:620a:7f1:b0:784:b12:ba1c with SMTP id k17-20020a05620a07f100b007840b12ba1cmr23199424qkk.78.1708621472687; Thu, 22 Feb 2024 09:04:32 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id qj17-20020a05620a881100b007872541c53bsm265848qkn.24.2024.02.22.09.04.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:04:30 -0800 (PST) From: Trevor Woerner To: yocto@lists.yoctoproject.org Cc: Quentin Schulz Subject: [meta-rockchip][PATCH v4 4/5] remove /boot partition Date: Thu, 22 Feb 2024 12:04:14 -0500 Message-ID: <20240222170415.7061-4-twoerner@gmail.com> X-Mailer: git-send-email 2.43.0.76.g1a87c842ece3 In-Reply-To: <20240222170415.7061-1-twoerner@gmail.com> References: <20240222170415.7061-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 22 Feb 2024 17:04:39 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/62571 In order to boot successfully, most Rockchip SoCs require a specific partitioning scheme which was defined many years (and many SoCs) ago. That partitioning scheme places the SPL and U-Boot at specific offsets at the start of the boot block device: https://opensource.rock-chips.com/wiki_Partitions The Rockchip partitioning scheme goes on to also define the locations of a number of additional partitions, including the "boot" and "root" partitions. Since both the SPL and U-Boot have already been placed on the block device, the "boot" partition only contains the extlinux config file and the kernel+dtb/fitImage; it doesn't contain any bootloader artifacts (other than the extlinux config). The location of the SPL partition is a hard dependency since the BOOTROM etched inside the Rockchip SoCs is programmed to load and run a validated binary it finds at this location. The locations of the "boot" and "root" partitions are not so rigid since it is U-Boot which interacts with them. U-Boot is very flexible with how it finds boot components, and in its support for various devices, filesystems, sizes, etc. Both oe-core's U-Boot metadata and wic's bootimg-partition script contain logic to generate the extlinux pieces required for a bootloader to boot a Linux system. If both are enabled, the wic pieces silently clobber the U-Boot pieces. However, the mechanisms contained in the U-Boot metadata are much more flexible, from a user's point of view, than the mechanisms in wic's bootimg-partition. If a user wishes to setup some sort of A/B redundant update mechanism, they must have redundant root partitions (in order to update their filesystem contents) but they also need to have redundant boot partitions if they wish to update the kernel as part of their update mechanism. Pairing redundant kernel partitions with redundant filesystem partitions becomes unnecessarily complicated. Therefore it makes sense to combine the kernel and the filesystem into the same partition so that both the kernel and filesystem are updated, or rolled back, in lock-step as one unit. Specific kernel versions and configurations often have dependencies on user-space components and versions. The /boot location is not going away. This patch simply transfers responsibility for its creation to the more flexible U-Boot mechanism and includes the kernel as part of the same partition as the root filesystem. Not only does it add flexibility, it also makes update schemes more straightforward. Although having a separate /boot partition is a "requirement" of the Rockchip partitioning scheme, it is not an actual hard requirement when using a flexible, open-source bootloader (such as U-Boot) instead of using Rockchip's proprietary miniloader, preloader, and trust.img. Build-tested for all boards. Run-tested on: nanopi-m4-2gb, nanopi-m4b, nanopi-r2s, nanopi-r4s, roc-rk3328-cc, rock-3a, rock-5a, rock-5b, rock-pi-4b, rock-pi-e, rock-pi-s, rock64 Reviewed-by: Quentin Schulz Signed-off-by: Trevor Woerner --- changes in v4: - updated for latest rockchip.wks - remove offset for /boot partition (let wic calculate this) changes in v3: - add back the comment explaining the need for NONFITDT - change the inclusion of the u-boot-extlinux package from RRECOMMENDS to RDEPENDS - clarify the commit message to remove the un-true statement that sizes are hard requirements - add back the "--ptable gpt" line to rockchip.wks changes in v2: - add UBOOT_EXTLINUX_FDT and tweak UBOOT_EXTLINUX_FDTDIR to modify their behaviour based on whether or not KERNEL_IMAGETYPE is fitImage - remove extraneous WKS_FILE_DEPENDS - remove "--ptable gpt" from wks - move newly added "earlycon" to UBOOT_EXTLINUX_CONSOLE - re-word the commit message to better explain the behaviour of the Rockchip BootROM --- conf/machine/include/rockchip-defaults.inc | 2 ++ conf/machine/include/rockchip-extlinux.inc | 24 ++++++++++++++++++++++ conf/machine/include/rockchip-wic.inc | 20 ++---------------- wic/rockchip.wks | 12 +++++------ 4 files changed, 33 insertions(+), 25 deletions(-) create mode 100644 conf/machine/include/rockchip-extlinux.inc diff --git a/conf/machine/include/rockchip-defaults.inc b/conf/machine/include/rockchip-defaults.inc index 3ce2e246ab0b..2387eb909934 100644 --- a/conf/machine/include/rockchip-defaults.inc +++ b/conf/machine/include/rockchip-defaults.inc @@ -19,3 +19,5 @@ XSERVER = " \ # misc SERIAL_CONSOLES ?= "1500000;ttyS2" +RK_CONSOLE_BAUD ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[0]}" +RK_CONSOLE_DEVICE ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[1].split()[0]}" diff --git a/conf/machine/include/rockchip-extlinux.inc b/conf/machine/include/rockchip-extlinux.inc new file mode 100644 index 000000000000..ca33f4c7f42a --- /dev/null +++ b/conf/machine/include/rockchip-extlinux.inc @@ -0,0 +1,24 @@ +# KERNEL_DEVICETREE follows the pattern of +# 'rockchip/${SOC_FAMILY}-${BOARD}.dtb' which is required when compiling +# the kernel so the kernel's Makefile can find the device tree +# +# when using extlinux with a fitImage the device tree is contained in the +# fitImage +# +# however for non-fitImages it is not found at +# $UBOOT_EXTLINUX_FDTDIR/rockchip/$KERNEL_DEVICETREE but rather at +# $UBOOT_EXTLINUX_FDTDIR/$KERNEL_DEVICETREE therefore we need to strip off +# the 'rockchip/' part for extlinux non-fitImage builds +NONFITDT ?= "${@d.getVar('KERNEL_DEVICETREE').split('/')[1]}" + +UBOOT_EXTLINUX ?= "1" +UBOOT_EXTLINUX_ROOT ?= "root=PARTLABEL=root" +UBOOT_EXTLINUX_FDTDIR ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '/boot', d)}" +UBOOT_EXTLINUX_FDT ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${NONFITDT}', d)}" +UBOOT_EXTLINUX_CONSOLE ?= "earlycon console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8" +UBOOT_EXTLINUX_KERNEL_ARGS ?= "rootwait rw rootfstype=ext4" +UBOOT_EXTLINUX_KERNEL_IMAGE ?= "/boot/${KERNEL_IMAGETYPE}" +UBOOT_EXTLINUX_LABELS ?= "default" +UBOOT_EXTLINUX_MENU_DESCRIPTION:default ?= "${MACHINE}" + +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "u-boot-extlinux" diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc index 67a8310f7d6a..147a36685d7d 100644 --- a/conf/machine/include/rockchip-wic.inc +++ b/conf/machine/include/rockchip-wic.inc @@ -1,33 +1,17 @@ # common meta-rockchip wic/wks items +require conf/machine/include/rockchip-extlinux.inc + SPL_BINARY ?= "idbloader.img" IMAGE_FSTYPES += "wic wic.bmap" WKS_FILE ?= "rockchip.wks" WKS_FILE_DEPENDS ?= " \ - mtools-native \ - dosfstools-native \ e2fsprogs-native \ virtual/bootloader \ - virtual/kernel \ - " -# KERNEL_DEVICETREE follows the pattern of 'rockchip/${SOC_FAMILY}-${BOARD}.dtb' -# but is placed in the deploy directory as simply '${SOC_FAMILY}-${BOARD}.dtb' -# therefore we have to strip off the 'rockchip/' for IMAGE_BOOT_FILES -NONFITDT="${@d.getVar('KERNEL_DEVICETREE').split('/')[1]}" -IMAGE_BOOT_FILES = " \ - ${KERNEL_IMAGETYPE} \ - ${@bb.utils.contains('KERNEL_IMAGETYPE', 'fitImage', '', '${NONFITDT}', d)} \ " -# use the first-defined ; pair in SERIAL_CONSOLES -# for the console parameter in the wks files -RK_CONSOLE_BAUD ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[0]}" -RK_CONSOLE_DEVICE ?= "${@d.getVar('SERIAL_CONSOLES').split(';')[1].split()[0]}" - WICVARS:append = " \ - RK_CONSOLE_BAUD \ - RK_CONSOLE_DEVICE \ SPL_BINARY \ UBOOT_SUFFIX \ " diff --git a/wic/rockchip.wks b/wic/rockchip.wks index 714fc5e11e11..6622e395ee2f 100644 --- a/wic/rockchip.wks +++ b/wic/rockchip.wks @@ -16,18 +16,16 @@ # reserved2 8192 8192 (legacy parameters, ATAGS, etc) # loader2 16384 8192 (U-Boot proper) # atf 24576 8192 (trusted OS e.g. ATF, OP-TEE, etc) -# boot 32768 229376 -# root 262144 - (suggested) +# root 32768 - -part loader1 --offset 64s --fixed-size 3552K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}" +part loader1 --offset 64s --fixed-size 3552K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}" part v_storage --offset 7168s --fixed-size 256K --fstype=none part reserved --offset 7680s --fixed-size 192K --fstype=none part reserved1 --offset 8064s --fixed-size 32K --fstype=none part uboot_env --offset 8128s --fixed-size 32K --fstype=none part reserved2 --offset 8192s --fixed-size 4096K --fstype=none -part loader2 --offset 16384s --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" +part loader2 --offset 16384s --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" part atf --offset 24576s --fixed-size 4096K --fstype=none -part /boot --offset 32768s --size 114688K --fstype=vfat --active --source bootimg-partition --label boot --use-uuid --sourceparams="loader=u-boot" -part / --fstype=ext4 --source rootfs --label root --use-uuid +part / --fstype=ext4 --active --source rootfs --label root -bootloader --ptable gpt --append="console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8 rw rootfstype=ext4 init=/sbin/init" +bootloader --ptable gpt From patchwork Thu Feb 22 17:04:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 39939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08B85C54791 for ; Thu, 22 Feb 2024 17:04:39 +0000 (UTC) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by mx.groups.io with SMTP id smtpd.web10.18291.1708621477890674326 for ; Thu, 22 Feb 2024 09:04:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DJ6h67yX; spf=pass (domain: gmail.com, ip: 209.85.160.175, mailfrom: twoerner@gmail.com) Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-42dc86cc271so43319841cf.2 for ; Thu, 22 Feb 2024 09:04:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708621476; x=1709226276; darn=lists.yoctoproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VyuVZxPwo1oDBYPFaoNzkWHOZG4dTjGGw2i+iW9lvOo=; b=DJ6h67yXJtLWRoIHbi4CWFctHB6aFoxGK0OD+uflsZaWJ5mHGudhyoEKTC7Mom+wog 1DeOyGqWNH4tCTAspBnLgLBrWkUUBvb4d/vUp3uplt7ObUQ1sh63NsILmsSdLzRVmnob z31mtLrCbGaAPRiRDyCHhwEe7cDK+Ko0UAvFakcXdbNm4D4sRuBlRfOlSG5gbWTqlCOH J1qvwU4mxhM7FXAXxBRcZU9qob9ib7dTSXliHBmhC0t5CCkTtwmqww+kUSu09S0x4zGe +BW8EJDcGFpu73MKJA/mfqsGkOhrmqdfhAh6duOFfLjvjsUvgFaosYENSIXd2/RTOSqZ 12/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708621476; x=1709226276; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VyuVZxPwo1oDBYPFaoNzkWHOZG4dTjGGw2i+iW9lvOo=; b=o6H5DjBbNe2YSfAOEQMRvL00P0i5RfdAYlFIKZeU6g9lIaqIS8+aozmX/qRBSMVusq km1diGtLadVY/v+Fb2YTm+TYu3BqsxoRD7jOtMgayVWvnIeZ9qDwTAlkT+ZWSpwAdygw 8sVfo5p770YQq6pKtmYvwtvoiJUkuCLk99AKjJCwtTaGotHhcuAqwHhBoL19pVTsKhEZ 0K77tB+yMsO1Hn0d03Zi2+lOEQmCiU05TzxuIg8oIpglo99SalnuiNNZPgrglXwRIsbP tNOk5f/67kCGSI4T8XUoTt0wwr4XYlmjK0lje4mXwqAOTYSyp8s6QLOzP4iaEIlrXG3u OlIw== X-Gm-Message-State: AOJu0YyfzU/k5bSVQ70BoUfG+FUSNUgimG6o48Qzg4k7d1QsvaxgrTyg J79StHF+NAA4vAIxcnv9NSADLZUfl3hchFYTM39OTueZwtwySuYOFPzeEefc X-Google-Smtp-Source: AGHT+IHnHhtRBKhHVGaShtPioReLi88JICaDAOFgFuLH+L5FgPRq1F15LrCiavO8L83SQUlrp9Qnhg== X-Received: by 2002:a05:622a:11d6:b0:42e:35dd:4f9f with SMTP id n22-20020a05622a11d600b0042e35dd4f9fmr6571849qtk.11.1708621475578; Thu, 22 Feb 2024 09:04:35 -0800 (PST) Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id qj17-20020a05620a881100b007872541c53bsm265848qkn.24.2024.02.22.09.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:04:33 -0800 (PST) From: Trevor Woerner To: yocto@lists.yoctoproject.org Cc: Quentin Schulz Subject: [meta-rockchip][PATCH v4 5/5] rockchip.wks: wks file cleanup Date: Thu, 22 Feb 2024 12:04:15 -0500 Message-ID: <20240222170415.7061-5-twoerner@gmail.com> X-Mailer: git-send-email 2.43.0.76.g1a87c842ece3 In-Reply-To: <20240222170415.7061-1-twoerner@gmail.com> References: <20240222170415.7061-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 22 Feb 2024 17:04:39 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/62572 Cleanup the elements of the wic/rockchip.wks file so that they take up less horizontal space. Reviewed-by: Quentin Schulz Signed-off-by: Trevor Woerner --- changes in v4: - updated for latest rockchip.wks changes in v3: - tweaks to accommodate the existing changes changes in v2: - add Quentin's tag --- wic/rockchip.wks | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/wic/rockchip.wks b/wic/rockchip.wks index 6622e395ee2f..ee660b06d78e 100644 --- a/wic/rockchip.wks +++ b/wic/rockchip.wks @@ -18,14 +18,14 @@ # atf 24576 8192 (trusted OS e.g. ATF, OP-TEE, etc) # root 32768 - -part loader1 --offset 64s --fixed-size 3552K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}" -part v_storage --offset 7168s --fixed-size 256K --fstype=none -part reserved --offset 7680s --fixed-size 192K --fstype=none -part reserved1 --offset 8064s --fixed-size 32K --fstype=none -part uboot_env --offset 8128s --fixed-size 32K --fstype=none -part reserved2 --offset 8192s --fixed-size 4096K --fstype=none -part loader2 --offset 16384s --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" -part atf --offset 24576s --fixed-size 4096K --fstype=none -part / --fstype=ext4 --active --source rootfs --label root +part loader1 --offset 64s --fixed-size 3552K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}" +part v_storage --offset 7168s --fixed-size 256K --fstype=none +part reserved --offset 7680s --fixed-size 192K --fstype=none +part reserved1 --offset 8064s --fixed-size 32K --fstype=none +part uboot_env --offset 8128s --fixed-size 32K --fstype=none +part reserved2 --offset 8192s --fixed-size 4096K --fstype=none +part loader2 --offset 16384s --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}" +part atf --offset 24576s --fixed-size 4096K --fstype=none +part / --label root --active --fstype=ext4 --source rootfs bootloader --ptable gpt