I'm switching from busybox
to toybox
in a customized Yocto.
After the switch I no longer have /dev/block/
populated.
I'd like to learn how /dev/block/bootdevice/by-name
is populated?
Is this done by mdev
?
The toybox
mdev
command is still in pending
.
However, the /dev/block/bootdevice/by-name
seems to be an Android feature which is using toybox
irc.
In Android there are a couple of parts to this:
/dev/block/bootdevice
is created by an init script, for example init.hardware.rc:In this case the
ro.boot.boot_devices
property is derived from the kernel command line argument set when the kernel image is built by BoardConfig-common.mk:(All
androidboot.*
command line options are converted intoro.boot.*
properties byinit
, seeProcessKernelCmdline()
)./dev/block/platform/*
links are created byueventd
(which is part of the Android version ofinit
). The function responsible for this is DeviceHandler::GetBlockDeviceSymlinks().This function is also responsible for creating the
/dev/block/platform/*/by-name
links based on the partition names supplied by the kernel in the uevent. Not all partition schemes supply a partition name, for example GPT does while a DOS MBR partition table does not.More recent versions of this function will also create generic links in
/dev/block/by-name
for partitions on the boot device. The boot device is again identified using theandroidboot.boot_devices
kernel command line option.