On Fri 2024-02-16 @ 11:06:03 AM, Quentin Schulz wrote: > Hi Trevor, > > On 2/16/24 09:29, Trevor Woerner via lists.yoctoproject.org wrote: > > 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 and > > sizes 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 and size of the SPL partition is a hard dependency since the > > Just because I like being pedantic, I don't thhink the size is a hard > dependency. The location is (well there are a few possible though :) ), but > the size is part of the header(s) that is parsed by the BootROM, the BootROM > will only fetch what it needs as far as I remember. It's a bit of convoluted > code but it's done in tools/rkcommon.c in U-Boot source code. > > What we can say though is that the TPL+SPL has a maximum size, since it > needs to fit inside the SRAM. But I don't think any SoC has been released by > Rockchip that has 2.5MiB of SRAM, it's usually a few tens of KiB max only. > Anyway, the message is fine, just wanted to give a bit more info there.
I appreciate pedantic, so don't hesitate to jump in. In fact up until this point we have been playing fast and loose with the partition sizes, so I already had proof that the sizing was not a hard dependency. And I never mind in-depth explanations and experiences. > > [...] > > > diff --git a/conf/machine/include/rockchip-extlinux.inc > > b/conf/machine/include/rockchip-extlinux.inc > > new file mode 100644 > > index 000000000000..3af7ed629e34 > > --- /dev/null > > +++ b/conf/machine/include/rockchip-extlinux.inc > > @@ -0,0 +1,12 @@ > > +UBOOT_EXTLINUX ?= "1" > > +UBOOT_EXTLINUX_ROOT ?= "root=PARTLABEL=root" > > +UBOOT_EXTLINUX_FDTDIR ?= "${@bb.utils.contains('KERNEL_IMAGETYPE', > > 'fitImage', '', '/boot', d)}" > > +NONFITDT ?= "${@d.getVar('KERNEL_DEVICETREE').split('/')[1]}" > > Maybe keep the comment explaining the logic of this line? Done. But tweaked a little. The reasons for having it before (as part of the boot files is slightly different than the reason for keeping it for EXTLINUX, but very similar. > > > +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_RRECOMMENDS += "u-boot-extlinux" > > Going back to the mail I sent a few minutes ago on the v1 (which was sent > after your v2 was sent :) ), I have a gut feeling we need _RDEPENDS here and > not _RRECOMMENDS. Ah got it. I misunderstood your comments. I thought you had been asking whether it was necessary at all and I was pointing out that without that package being added to the rootfs it wouldn't work. Not a problem, I've upgraded it from a recommendation to a dependency.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62535): https://lists.yoctoproject.org/g/yocto/message/62535 Mute This Topic: https://lists.yoctoproject.org/mt/104389371/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-