On Fri, Dec 20, 2024 at 04:06 AM, Mikko Rapeli wrote:

> 
> I don't think this feature should be genericarm64 specific. I think it
> should be defined similar to x86 one:
> https://git.yoctoproject.org/yocto-kernel-cache/tree/features/intel-persistent-memory/intel-x86-64-pmem.cfg
> 
> 
> and added to genericarm64 machine (and any other arm64 machine when
> required) via MACHINE_FEATURES in the machine definition:
> https://github.com/yoctoproject/poky/blob/master/meta-yocto-bsp/conf/machine/genericarm64.conf#L11
> Ok, sounds sensible.
> Can someone help me how to apply changes to kernel-meta git tree via
> patches in SRC_URI?
> This way I can test the real thing and enable this via MACHINE_FEATURES.

AFAIR, when I tested my changes in yocto-kernel-cacheĀ  I used the following 
approach:
1. The localĀ  yocto-kernel-cache repo with my changes in "arm" branch in 
/path/to/yocto-kernel-cache
2. In my local.conf I had:

SRC_URI:pn-linux-yocto = " 
git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https
 ( 
git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=$%7BKBRANCH%7D;protocol=https
 ) \ 
git:///path/to/yocto-kernel-cache;type=kmeta;name=meta;branch=arm;destsuffix=${KMETA};protocol=file"
 SRCREV_meta:pn-linux-yocto = "${AUTOREV}"

You can also create a inux-yocto_%.bbappend file in meta-yocto-bsp with the 
definitions above instead of using local.conf

> 
> 
>> 
>>> Build into kernel instead of modules since the driver is likely
>>> needed to find main rootfs, possibly inside initrd.
>> 
>> genericarm64 machine includes initrd into images. But, the Yocto init
>> script doesn't load these drivers even if they are included into initrd
>> and
>> DeviceTree includes a pmem node. I did a quick check but couldn't find an
>> obvious issue in the init script. I don't know what would be the best
>> option - either built-in the drivers or fix the init script and include
>> the drivers as modules. I prefer the latter (and it works with other Linux
>> distros), but I don't know how ease it would be to fix the init script.
> 
> Yes, the initrd images are a bit arcane at the moment. I'd like to see an
> initrd with systemd, udev and a lot of kernel driver modules, which
> would get loaded if HW is detected. systemd services know to wait for udev
> 
> if for example kernel driver for rootfs isn't immediately available.

I might be not 100% correct, because I spent a very short time for looking at 
the issue. But, I think the problem with the Yocto init script is that it tries 
to mount rootfs too soon. Either before device manager started or before it 
finished. I think the former. Most likely the idea was (before the initrd was 
intorduced) - let's mount rootfs and start device manager with all the drivers 
from the rootfs. When initrd is added into images this approach fails when some 
modules are required to mount rootfs. I didn't have time to investigate it 
further.

Thanks,
Anton
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14687): 
https://lists.yoctoproject.org/g/linux-yocto/message/14687
Mute This Topic: https://lists.yoctoproject.org/mt/110211337/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to