[OE-core] [PATCH] boot-directdisk: mount root by MBR disk signature for Linux 3.8+

Jonathan Liu net147 at gmail.com
Tue Jul 9 13:58:22 UTC 2013


On 11/06/2013 2:26 AM, Darren Hart wrote:
>
> On 06/08/2013 06:03 AM, Jonathan Liu wrote:
>> Hi Darren,
>>
>>>> +		sed -i "s|\broot=[^ ]*|root=PARTUUID=$DISK_SIGNATURE-02|" $HDDDIR/syslinux.cfg
>>> In bootimg.bbclass I have been abstracting out the boot loader so it is
>>> not explicitly referenced. Something like that is in order here. For
>>> example, an EFI boot-directdisk (which admittedly doesn't exist yet)
>>> would not have a syslinux.cfg but would still need the change. Consider
>>> using the syslinux class to abstract this necessary change. Then I can
>>> add the gummiboot change when EFI support is added.
>> Do you mean adding a function to the syslinux class which updates root=
>> in syslinux.cfg previously created by build_syslinux_cfg()?
> In the words of a wise director at a large technology company, "I meant
> whatever is the most intelligent." :-)
>
> This could be a new function in syslinux.bbclass. It could also be a
> parameter to build_syslinux_cfg which would allow it to be used from
> either bootimg.bbclass, boot-directdisk.bbclass, with or without EFI,
> with various kernel versions, etc. I suspect some parameterization will
> result in the cleanest, most maintainable approach, but investigation is
> required.
>
> Thanks!
>
> Darren
Submitted V3 patch which sets SYSLINUX_ROOT appropriately instead of 
modifying syslinux.cfg directly.

Regards,
Jonathan

>
>>> --
>>> Darren
>>>
>>>> +	fi
>>>> +
>>>>    	mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS
>>>>    	mcopy -i $HDDIMG -s $HDDDIR/* ::/
>>>>    
>>>> @@ -71,10 +88,8 @@ build_boot_dd() {
>>>>    	END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1`
>>>>    
>>>>    	echo $ROOTFSBLOCKS $TOTALSIZE $END1 $END2 $END3
>>>> -	rm -rf $IMAGE
>>>>    	dd if=/dev/zero of=$IMAGE bs=1024 seek=$TOTALSIZE count=1
>>>>    
>>>> -	parted $IMAGE mklabel msdos
>>>>    	parted $IMAGE mkpart primary fat16 0 ${END1}B
>>>>    	parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
>>>>    	parted $IMAGE set 1 boot on
>>>>
>> Regards,
>> Jonathan
>>




More information about the Openembedded-core mailing list