From: Trevor Woerner <twoerner@gmail.com>
To: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] [meta-rockchip][PATCH 2/4] rockchip.wks: add all Rockchip partitions
Date: Thu, 15 Feb 2024 14:20:18 -0500 [thread overview]
Message-ID: <20240215192018.GA7766@localhost> (raw)
In-Reply-To: <20297b5e-af8b-4bce-a192-9bf799d8a36a@theobroma-systems.com>
On Thu 2024-02-15 @ 06:06:42 PM, Quentin Schulz wrote:
> Hi Trevor,
>
> On 2/12/24 21:23, Trevor Woerner via lists.yoctoproject.org wrote:
> > 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
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> > wic/rockchip.wks | 18 ++++++++++++------
> > 1 file changed, 12 insertions(+), 6 deletions(-)
> >
> > diff --git a/wic/rockchip.wks b/wic/rockchip.wks
> > index b14ec0d1690a..8dc4d20f2f54 100644
> > --- a/wic/rockchip.wks
> > +++ b/wic/rockchip.wks
> > @@ -9,16 +9,22 @@
> > # wic uses 1KB blocks. The following table uses 512 byte sectors:
> > #
> > # 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)
> > +# vstorage 7168 512 (serial number, MAC address, etc)
> > +# reserved 7680 384 (not used)
> > +# reserved1 8064 64 (legacy DRM key)
> > +# uboot_env 8128 64 (U-Boot environment)
> > +# reserved2 8192 8192 (legacy parameters, ATAGS, etc)
> > # loader2 16384 8192 (U-Boot proper)
> > -# atf 24576 8192
> > +# atf 24576 8192 (trusted OS e.g. ATR, OP-TEE, etc)
> > # boot 32768 229376
> > # root 262144 - (suggested)
> > -part loader1 --offset 32 --fixed-size 4000K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}"
> > -part reserved1 --offset 4032 --fixed-size 64K --fstype=none
> > +part loader1 --offset 32 --fixed-size 3552K --fstype=none --source rawcopy --sourceparams="file=${SPL_BINARY}"
> > +part vstorage --offset 3584 --fixed-size 256K --fstype=none
> > +part reserved --offset 3840 --fixed-size 192K --fstype=none
> > +part reserved1 --offset 4032 --fixed-size 32K --fstype=none
> > +part uboot_env --offset 4064 --fixed-size 32K --fstype=none
> > part reserved2 --offset 4096 --fixed-size 4096K --fstype=none
> > part loader2 --offset 8192 --fixed-size 4096K --fstype=none --source rawcopy --sourceparams="file=u-boot.${UBOOT_SUFFIX}"
> > part atf --offset 12288 --fixed-size 4096K --fstype=none
> >
>
> This is... quite dangerous. I assume people access raw partitions via their
> index number, and now they would be changed, making it harder to do partial
> updates. It depends how one sees this file, but could be seen as immutable
> for existing partitions to avoid backward compatibility issues.
I don't think that's a huge problem, but I could be wrong. People will see
their builds fail, investigate, update, and move on?
But I think I saw something in wic about not adding a partition to the table,
or not giving it a number? So it might be possible to define these partitions
and not change the numbers? I could look into it a bit more.
> I was wondering whether there is support for partition labels or something
> like that for raw partitions, but doesn't seem like it. Which is quite odd,
> wouldn't that kind of information be stored in the partition table for
> example?
Yes, I noticed some things that should probably be there and aren't, such as
the label thing you point out. Also not formatting raw partitions; or not
requiring an explicit fstype on raw partitions to keep from formatting them.
> Also, maybe use sectors for offsets and fixed-sizes since you document them
> this way? S is the suffix for it.
>
> Random thought, but we could probably also get the env from U-Boot recipe
> (or any other recipe that generates one) (if one is generated) and install
> it into uboot_env partition?
That's exactly where I'm going with this. I already have a spreadsheet
listing all the rockchip devices, and their U-Boot environment configurations
(location, size, etc) to see which ones come with environment configurations,
and to make sure they're all the correct location and size for those that do
(they are). I also already have Yocto pieces generating and placing
the U-Boot environment in the U-Boot environment partition (via wic) but
haven't submitted the patches yet (as well as generating a correct
/etc/fw_env.config file. My next step is to add in env support in U-Boot for
those missing it.
next prev parent reply other threads:[~2024-02-15 19:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 20:23 [meta-rockchip][PATCH 1/4] rockchip.wks: specify fstype Trevor Woerner
2024-02-12 20:23 ` [meta-rockchip][PATCH 2/4] rockchip.wks: add all Rockchip partitions Trevor Woerner
2024-02-15 17:06 ` [yocto] " Quentin Schulz
2024-02-15 19:20 ` Trevor Woerner [this message]
2024-02-16 8:59 ` Quentin Schulz
2024-02-12 20:23 ` [meta-rockchip][PATCH 3/4] remove /boot partition from wic:bootimg-paritition Trevor Woerner
2024-02-15 17:45 ` [yocto] " Quentin Schulz
2024-02-16 8:25 ` Trevor Woerner
2024-02-16 9:31 ` Quentin Schulz
2024-02-18 17:28 ` Trevor Woerner
2024-02-21 18:31 ` Quentin Schulz
2024-02-21 19:18 ` Trevor Woerner
2024-02-22 9:37 ` Quentin Schulz
2024-02-12 20:23 ` [meta-rockchip][PATCH 4/4] wks file cleanup Trevor Woerner
2024-02-15 17:47 ` [yocto] " Quentin Schulz
2024-02-15 16:49 ` [yocto] [meta-rockchip][PATCH 1/4] rockchip.wks: specify fstype Quentin Schulz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240215192018.GA7766@localhost \
--to=twoerner@gmail.com \
--cc=quentin.schulz@theobroma-systems.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.