[elbe-devel] [BUG] UEFI boot

Claudius Heine ch at denx.de
Fri Feb 26 11:03:11 CET 2016


Hi Manuel,

On 26.02.2016 10:15, Manuel Traut wrote:
> Hi Claudius,
>  
>> I am currently trying to create a rfs image for the Intel Galileo
>> platform and had some issues with ELBE 1.0.
>>
>> The Intel Galileo platform uses UEFI to boot, so I had to setup a GPT
>> partition layout and within it a FAT32 boot partition with the "0xEF00"
>> partition type. I would expect that this partition type is
>> automatically chosen within a GPT when I define the "bootable" tag for
>> the partition.
>>
>> For some reason ELBE wants to add "LBA" flags to the partitions and
>> because GPT doesn't support those an exception is raised.
>>
>> Is this a bug or am I missing something?
> 
> if it ends in a backtrace it's always a bug :)

Not always. For instance at some point I used elbe-testing on my host
system and elbe 1.0 within the initvm because I forgot to change the
repo paths within the XML and got backtraces because of SOAP protocol
incompatibilities.

In my current experience, ELBE is a rather complex software piece and
therefore its easy to do something wrong, forget something or
misunderstand the documentation. Because I couldn't find any examples or
"how-to" documentation about GPT partitions and UEFI, it is possible
that I might have done something wrong or had wrong expectations about
the process.

Hopefully in the future ELBE will develop into a tool, that meets my
expectations or I will become more familiar with its inner workings to
be able to differentiate bugs in the software and a fault on my part.

For instance in the example of the SOAP protocol incompatibilities I
would have expected a warning or error message about the incompatible
interface. Instead I got a backtrace with some text about the number of
parameters that didn't match.

I am not used to these SOAP RPC mechanisms. The only RPC mechanisms I
use actively while developing are SSH, syscalls and http for git
occasionally ;)

Cheers,
Claudius

> 
> Regards,
> 
>   Manuel
>  
>> regards,
>> Claudius Heine
>>
>> ----
>>
>> Snippet from galileo-jessie.xml:
>> ...
>> <images>
>> 	<gpthd>
>> 		<name>sdcard.img</name>
>> 		<size>6GiB</size>
>> 			<partition>
>> 				<size>512MiB</size>
>> 				<label>boot</label>
>> 				<bootable />
>> 			</partition>
>> 			<partition>
>> 				<size>remain</size>
>> 				<label>rfs</label>
>> 			</partition>
>> 	</gpthd>
>> </images>
>> <fstab>
>> 	<bylabel>
>> 		<label>rfs</label>
>> 		<mountpoint>/</mountpoint>
>> 		<fs>
>> 			<type>ext2</type>
>> 			<tune2fs>-i 0</tune2fs>
>> 		</fs>
>> 	</bylabel>
>> 	<bylabel>
>> 		<label>boot</label>
>> 		<mountpoint>/boot</mountpoint>
>> 		<fs>
>> 			<type>vfat</type>
>> 		</fs>
>> 	</bylabel>
>> </fstab>
>> ...
>>
>> $ tail -n 20 elbe-build-20160224-110749/log.txt
>> running cmd +mv "/var/cache/elbe/581717dc-3168-477c-bc4a-
>> 63544dfcead7/filesystems/rfs"/* "/var/cache/elbe/581717dc-3168-477c-
>> bc4a-63544dfcead7/target/"+
>> running cmd +mv "/var/cache/elbe/581717dc-3168-477c-bc4a-
>> 63544dfcead7/filesystems/boot"/* "/var/cache/elbe/581717dc-3168-477c-
>> bc4a-63544dfcead7/target/boot"+
>> Build failed
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/elbepack/asyncworker.py", line
>> 86, in execute
>>     self.project.build(skip_pkglist=True, build_bin=self.build_bin,
>> build_sources=self.build_src)
>>   File "/usr/lib/python2.7/dist-packages/elbepack/elbeproject.py", line
>> 246, in build
>>     self.targetfs.part_target( self.builddir, grub_version )
>>   File "/usr/lib/python2.7/dist-packages/elbepack/efilesystem.py", line
>> 263, in part_target
>>     self.images = do_hdimg( self.log, self.xml, targetdir, self,
>> grub_version )
>>   File "/usr/lib/python2.7/dist-packages/elbepack/hdimg.py", line 440,
>> in do_hdimg
>>     img = do_image_hd( outf, i, fslabel, target, grub_version )
>>   File "/usr/lib/python2.7/dist-packages/elbepack/hdimg.py", line 344,
>> in do_image_hd
>>     ppart.setFlag(_ped.PARTITION_LBA)
>>   File "/usr/lib/python2.7/dist-packages/parted/decorators.py", line
>> 32, in new
>>     ret = fn(*args, **kwds)
>>   File "/usr/lib/python2.7/dist-packages/parted/partition.py", line
>> 156, in setFlag
>>     return self.__partition.set_flag(flag, 1)
>> PartitionException: The flag 'lba' is not available for gpt disk
>> labels.
>>
>>
> 
> 
> 
>> _______________________________________________
>> elbe-devel mailing list
>> elbe-devel at linutronix.de
>> https://linutronix.de/mailman/listinfo/elbe-devel
> 
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch at denx.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20160226/0314c75a/attachment.sig>


More information about the elbe-devel mailing list