See the following commit for more information: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b52d2bb46ed7c893077ccf9e5a83dc7f11c7f61b
Hi I checked out the commit and it seems that this variable is set automatically by the build system? The directdisk.bbclass sets it ultimately by calling some function. Can you tell me if there are cases where the user would ever hand-set this variable? Thanks, Scott
(In reply to comment #1) > Hi > > I checked out the commit and it seems that this variable is set > automatically by the build system? The directdisk.bbclass sets it > ultimately by calling some function. Can you tell me if there are cases > where the user would ever hand-set this variable? > > Thanks, > Scott DISK_SIGNATURE is different each time you build an directdisk image. GNU Parted generates a random one already but too late in the build process (the root filesystem is already built) to allow us to create a boot loader configuration based on it which is why we generate it ourselves. Normally I use the auto-generated DISK_SIGNATURE to set SYSLINUX_ROOT = "root=PARTUUID=${DISK_SIGNATURE}-02". You can set DISK_SIGNATURE to a fixed value if you don't want syslinux.cfg changing for each build. This could be useful for if you want to upgrade the root filesystem on a device without having to recreate or modify the master boot record. DISK_SIGNATURE is the MBR disk signature (http://en.wikipedia.org/wiki/Master_boot_record#Sector_layout at offset 440). Linux support for specifying a root device by MBR disk signature and partition number is available in Linux 3.8 and later (https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/init/do_mounts.c?id=d33b98fc82b0908e91fb05ae081acaed7323f9d2). Regards, Jonathan
Jonathan, Thanks for the extra information. I have added a description of DISK_SIGNATURE into the ref-manual's glossary. I based it on your description, which was very nice by the way. I am not sure if I got all the technical parts correct. I took some extra steps to explain "directdisk image" in the note based on YP "live" option and IMAGE_FSTYPES. Anyway, I need you to review this now and comment for corrections or additions as needed. http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-DISK_SIGNATURE Thanks, Scott
I would change the documentation to the following: DISK_SIGNATURE 32-bit MBR disk signature used by directdisk images. By default, it is set to an automatically generated disk signature but may be overridden in the image recipe by setting DISK_SIGNATURE to an 8 digit hex string. You may want to override DISK_SIGNATURE if you want the disk signature to remain constant between image builds. When using Linux 3.8 or later, the DISK_SIGNATURE variable can be used to specify the root by UUID to allow the kernel to locate the root device even if the device name changes due to differences in hardware configuration. By default, SYSLINUX_ROOT is set to "root=/dev/sda2" but this can be changed to locate the root device using the disk signature instead: SYSLINUX_ROOT = "root=PARTUUID=${DISK_SIGNATURE}-02"
Jonathan, Check out http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-DISK_SIGNATURE now. I took your input and sort of melded it a bit with what was there. I felt there was some other information that I did not want to lose. Thanks, Scott
As far as I can tell, the "live" IMAGE_FSTYPES option is not the same as a directdisk image so I am not sure why it is mentioned in the Note box. Otherwise it looks good to me.
Jonathan, I could not find a "directdisk" image type in the list of IMAGE_TYPES (http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-IMAGE_TYPES). I was told that "live" was the way we produced these types of images. Maybe I got that information wrong. Scott
(In reply to comment #7) > Jonathan, > > I could not find a "directdisk" image type in the list of IMAGE_TYPES > (http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var- > IMAGE_TYPES). I was told that "live" was the way we produced these types of > images. Maybe I got that information wrong. > > Scott boot-directdisk is a class that you inherit inside an image recipe. I don't think there is an image type that directly corresponds to it. The vmdk image type inherits from directdisk and adds some additional things to create a vmdk image out of the directdisk image.
That helps me a lot to understand it. I obviously did not. So, I removed the note completely. I am going to mark the documentation flag as "Done" and the status to RESOLVED now. You can see the fix at http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-DISK_SIGNATURE. Thanks for your help Jonathan. Scott