Okay, minutes from the last meeting are posted to the wiki, and the
next meeting is scheduled for tomorrow, 3 hours earlier to accommodate
Jean in China (0600MDT, 0800EDT, 1200UTC). Email me if you want to
attend and I'll add you to the invite.
g.
On Thu, Jun 23, 2011 at 10:47 PM, Grant Likely
<grant.likely(a)secretlab.ca> wrote:
> Hi all,
>
> here are the notes from today's meeting. Please look over it an make
> sure all of it is okay by you for posting on the public wiki. If
> there is anything sensitive that should not be published, then let me
> know right away so that I can edit it out.
>
> Cheers,
> g.
>
>
>
> Meeting notes from ARM Boot Architecture Meeting, June 23, 2011
>
> https://wiki.linaro.org/OfficeofCTO/BootArchitecture/2011-06-23
>
> == Attendees ==
>
> Loïc Minier
> Grant Likely
> Olivier Martin
> Jean-Christophe PLAGNIOL-VILLARD
> Jon Masters
> Andrew Pickard
>
>
> == Minutes ==
>
> * Need to think about what do we actually care about and write it down
> * Should be careful to consider non-Linux OSes
> * Want to get to a standard ARM platform
>
> * Time to market also an important consideration
>
>
> Notes on process:
> - We are not a standards body - need to be agile and try to base on
> existing standards
> - We need to be congnisent of other operating systems and other architectures
>
> Other Topics (maybe to put on the backburner):
> * How to we boot multiple CPUs of heterogeneous architectures
> * How does the boot architecture define how to start other CPUs, and
> other scenarii like kexec or virtualization? security / secure boot
> also impact the boot architecture subtly
>
> Licensing: GPL might be a problem for some specific pieces of code,
> e.g. touching CPU initialization
> * Specifications should remain as abstract of the licensing as
> possible though
> * Eveything we discuss should be public and avaiable free of charge
>
> Bootloader consolidation: we agree that there wont be consolidation on
> a single bootloader, instead a variety of bootloaders have to be
> supported
>
> Skeleton of boot architecture plan at
> https://wiki.linaro.org/OfficeofCTO/BootArchitecture/
> * Not clear whether we want to specify UI though
>
> What's the output?
> * Standard?
> * Wiki page? web site?
> * Need to work dynamically in the beginning, then freeze a version 1
> or something of the recommendations
> * Deliverable of some kind at the August Linaro meeting
>
> Dealing with legacy?
> * Could provide old-world boot media chainloading into new-world boot
> architecture media
> * Hard to implement security architecture in this mode
> * Don't care about legacy beyond a point (why care with product lifecycles?)
>
> Another output is one or more reference implementation(s) which can be
> deployed in production (be it UEFI, Barebox or whatever)
>
> Need to make sure we document the things which are NOT covered in our
> outputs/documents
>
> Should add definitions for terms; particuarly in the case of secure
> boot terminology.
>
> Need to handle booting secondary "bootloaders" like GRUB. Need to
> handle bits beyond just kernel, including initramfs, and other data
> images that need to be loaded by the bootloader.
>
>
> Power Management & PM handoff to the kernel.
>
> Plan agenda ahead of calls and assign time slots
>
> Suggest having a whole day/half day to advance (bootstrap!) this effort
>
> Topics raised after meeting:
> Privacy: The goal is to have everything open and public, but anybody
> can request for a conversation on the mailing list to be kept private
> in the interest of open communication.
>
> Minimal "run time" service type of interface for example to allow
> second stage bootloader to retrieve "files". However, this should not
> be massive overkill.
>
>
>
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Hey
QEMU is really handy to try out OMAP and Versatile Express boot stuff;
the Linaro QEMU version has patches (progressively being upstreamed)
for OMAP support and allows emulating vexpress, overo, beaglexm and
beagle boards which is a good collection already. It's based of a
modern QEMU commit and contains plenty of good fixes (all on their way
to mainline).
Get a tarball from:
https://launchpad.net/qemu-linaro
Source code at:
http://git.linaro.org/gitweb?p=qemu/qemu-linaro.git;a=summarygit://git.linaro.org/qemu/qemu-linaro.git
(This is like a regular qemu git tree or tarball; usual QEMU
documentation applies.)
Binaries are available in Ubuntu and backports are in the
linaro-maintainers/tools PPA.
Some QEMU HowTos are hosted on the Linaro wiki, but they are a bit
specific to Linaro images and tools to manipulate them. Basically you
can run a beagle xm SD image with:
qemu-system-arm -M beaglexm -sd your.img
(You might want to throw the serial line output directly on your
terminal or disable graphics or various other things.)
For vexpress, you can only boot by passing a kernel or ELF image to
QEMU:
qemu-system-arm -M vexpress-a9 -kernel u-boot.bin
Cheers,
--
Loïc Minier
Hey
(followup to today's call0
This is an attempt to write down an use case which expresses the
concept of "modules" that the boot architecture would cover. I don't
really like the name modules, if you have better names please propose!
So here's the writeup; this is completely fictional, and is just meant
to illustrate modules.
Here are the steps that could be taken to load a plain linux kernel:
a) your SoC starts up in a SoC-specific way
b) the boot architecture mandates how vmlinuz is loaded and started
c) control is passed to linux
d) profit!1!
in a very dumbed down version of our boot architecture, we could say
for b):
a file named "bootme" is loaded from the first FAT partition of the
SD card; its type is detected and if it's a linux kernel, it's
started with a device tree blob provided by the firmware to the
kernel
Good:
* easy to install or update a kernel by replacing the vmlinuz file
Bad:
* miss way to pass kernel cmdline
* miss way to pass (optional) initrd
* miss way to load/replace the DT
all of the above bad points could be alleviated by pushing this data in
the vmlinuz file, but it's not as practical as the modern linux systems
we know.
Another approach would be to put U-Boot or Barebox in the "bootme"
file, but then U-Boot or Barebox would have to decide how to load the
kernel and implement drivers for the SD card and this wouldn't be a
SoC-agnostic boot image anymore.
So the only possible approach I see in this case is to put a general
purpose ARM bootloader in the "bootme" file which will talk to firmware
to load additional files from the SD card (thanks to non-resident
support from the firmware); this would then go away once linux runs.
Now to "modules": instead of defining b) as just loading a single
"bootme" file, we'd define a config file which lists what to load (e.g.
something like grub.cfg/menu.lst) so that we could pass combinations
such as:
- vmlinuz + initrd + DT
- vmlinuz + DT
- Xen + DT + the OS modules it should load (linux and initrd)
it would also allow setting things like kernel cmdline or other OS
specific things.
Maybe I misunderstood Grant's idea, but it felt like he was mandating a
single payload from being loaded and just deferring to that payload. I
feel that if we go that route, we've specified too little to be able to
construct useful images and have deffered to an implementation specific
architecture (even if it could support multiple SoCs).
So my conclusion is that we should specify:
* either a single payload to start which would be something like a
generic ARM bootloader talking to the firmware to load the other bits
(e.g. via UEFI), but then also how it loads the next things
* or a config file which points at "modules" (by lack of a better name)
to load; these will get loaded by SoC specific code (likely an UEFI
implementation)
the main difference is whether we specify how a generic ARM bootloader
is loaded and then defer to it to decide how to load the OS, or whether
we specify OS-ish bits to load, and leave the loading to the
implementation.
Does that make any sense?
Cheers,
--
Loïc Minier
On Thu, Jun 23, 2011 at 5:25 AM, Olivier Martin <olivier.martin(a)arm.com> wrote:
> Thanks Nicolas for the link. You right the zImage has a signature. I read
> again the code I wrote and it is the signature for the non compressed image
> I have not found.
> My function was able to detect uImage and zImage but I had to assume if it
> is not one of these formats the image was a non-compressed image. Which it
> is ok as far as we have got only 3 formats, but that could cause trouble for
> any additional formats that would have some requirements from the boot
> loader.
>
>
> FYI, our UEFI implementation already supports ATAG (and partially DT). We
> can pass a DT to the kernel but we have not implemented yet the update of
> the tree in the firmware; for example to pass new arguments to the kernel.
> Again same argument as the binary format, if in the future a new format
> incompatible with the DT format is introduced to answer some limitations of
> the Flat Device Tree at this time; should the ARM boot 'standardization' be
> rewriting again and break the legacy mechanism ?
>
>
> I had a look again to this page:
> https://wiki.linaro.org/OfficeofCTO/BootArchitecture
> It seems the current concern is more about the firmware itself than the
> interface between the OS loader and the kernel. I guess this Blue Print has
> been created to solve the issues of the boot fragmentation in the ARM world.
> I suppose the idea is to introduce some requirements for booting ARM
> platforms.
> But should we only limit our view to the requirements of booting Linux 3.0
> (zImage? and Device Tree). Could we also think about defining some
> 'standards' in the interface between the OS Loader and the Linux kernel to
> leave some flexibility for any future technology that involves the boot
> firmware to initialize the platform for the Linux kernel.
I think in general, yes we should constrain our view to 3.0+. That
doesn't preclude firmware from supporting what it already supports.
Indeed it would be crazy to ask firmware projects to remove things
that it currently supports. Rather, I think that the process of
creating a standard implementable by any firmware should be /focused/
on new kernels since we cannot change the stuff that is already
deployed anyway.
> As I suggested in my first email, defining a signature (binary format:zImage
> + machine type:DT) could be a way to define our current requirements and
> leave some place for any future requirements
I've added signature/CRC/identification as a topic to the boot
architecture page.
g.
On Tue, 21 Jun 2011, Olivier Martin wrote:
> Thanks Grant for adding me to the list,
> To introduce myself, I am part of the UEFI team at ARM Ltd. I am also the
> maintainer of the ARM Packages in the Open Source implementation of UEFI
> (http://www.tianocore.org/ ).
>
> Maybe an issue this "ARM Boot Architecture" topic should solve is the
> interface between the boot loader and the Linux kernel binary.
>
> Recently, I was trying to extend our ARM UEFI boot loader to detect the type
> of the Linux kernel binary:
> - zImage, non-compressed Image, uImage format
> - ATAG or FDT support
> ... to start any kernel by passing the correct parameters and jump to the
> right offset.
>
> Unfortunately, it was not as easy as it should be. In fact it does not look
> to be possible right now. Defining a signature (eg: kernel binary format +
> machine type) in the kernel binary would make the task easier. Some of the
> formats have a signature (eg: u-boot) but not all the formats.
The zImage format has a signature too. I documented it here a _long_
time ago:
http://lists.arm.linux.org.uk/lurker/message/20020226.165754.4c7e6539.en.ht…
Of course some things have changed since then. For a while now, the
zImage is fully position independent. I can be loaded anywhere in
memory and branched directly to it as it takes care of relocating itself
when needed. Therefore the load address at offset 0x28 is now always
zero, except when the zImage is linked to be executed directly from
flash memory (but I doubt that case is relevant to UEFI).
For that matter, the uImage format is broken. It insists on absolute
addresses in its header. This is therefore not a good format if we want
to support multiple SoCs with the same kernel binary, as some of them
have their physical RAM at different addresses. You may want to support
it if you want, but it is likely not to be suitable anymore in the
future. Hence having the ability to boot a zImage directly is likely to
be the most flexible option.
> Actually, if we try to boot a Linux kernel with the wrong settings then the
> kernel would crash or raise an error. And it is not be possible to recover
> from this state without restarting the platform.
What kind of parameters do you have in mind?
> Making these information available to the boot loader (u-boot, uefi, etc)
> would also make easier the migration from the legacy ATAG to the Flat Device
> Tree (FDT) support.
How would it make that transition easier? The link between those issues
is not obvious to me.
With regard to ATAGs, I don't think UEFI should bother with them. If we
really want to move to device tree, and it seems we do, then ATAGs
should be left behind. We do have a compatibility layer going into
zImage to convert ATAGs into DT properties at run time to allow booting
a DT kernel on legacy bootloaders. Adding ATAg support to UEFI might
impair the move to DT in the kernel by making it a lower priority.
Nicolas
On 18:01 Tue 21 Jun , Olivier Martin wrote:
> Thanks Grant for adding me to the list,
> To introduce myself, I am part of the UEFI team at ARM Ltd. I am also the
> maintainer of the ARM Packages in the Open Source implementation of UEFI
> (http://www.tianocore.org/ ).
>
> Maybe an issue this "ARM Boot Architecture" topic should solve is the
> interface between the boot loader and the Linux kernel binary.
>
> Recently, I was trying to extend our ARM UEFI boot loader to detect the type
> of the Linux kernel binary:
> - zImage, non-compressed Image, uImage format
> - ATAG or FDT support
> ... to start any kernel by passing the correct parameters and jump to the
> right offset.
>
> Unfortunately, it was not as easy as it should be. In fact it does not look
> to be possible right now. Defining a signature (eg: kernel binary format +
> machine type) in the kernel binary would make the task easier. Some of the
> formats have a signature (eg: u-boot) but not all the formats.
>
> Actually, if we try to boot a Linux kernel with the wrong settings then the
> kernel would crash or raise an error. And it is not be possible to recover
> from this state without restarting the platform.
> Making these information available to the boot loader (u-boot, uefi, etc)
> would also make easier the migration from the legacy ATAG to the Flat Device
> Tree (FDT) support.
in Barebox we use the same as u-boot but we can boot a zImage directly
>
>
> BTW, Thursday 15:00UTC is fine for me.
15:00UTC is a bit late for I as I live now in China Shanghai
I'd prefer 14:00UTC as if the call take 2h it will be already midnight here
Best Regards,
J.
Hi all,
Following up from the decisions made at UDS last month[1], we need to
organize a boot architecture coordination meeting. Currently the
proposal is to hold a meeting either as part of the Linaro platform
sprint[2] in the week on August 1-5, 2011, or in the weekend between
the platform sprint and the ARM Partners Meeting the week after.
Personally, my preference is to schedule a full day meeting on Friday,
Aug 5 as part of the platform sprint, but I'd like to get some
feedback before settling on that date.
[1] https://blueprints.launchpad.net/linaro/+spec/linaro-kernel-o-bootarchitect…
[2] https://wiki.linaro.org/Events/2011-08-LDS
Right now I'm in the process of organizing the information and topics
which were discussed during UDS and get them out onto the Linaro wiki.
Expect to see some early draft documents showing up late this week or
early next week. After that, I'm going to be soliciting feedback and
help to make them reflect the priorities and requirements that Linux
vendors, users and developers have for the boot architecture. By the
time the Linaro platform sprint rolls around, we should have a solid
set of documents covering both requirements and a draft boot
architecture. At the boot architecture meeting, my goal is to first
come to agreement on the general approach and draft design, second to
make decisions about how the boot architecture fits in with existing
technologies like Fastboot, UEFI and U-Boot, and third to kick off
work on implementation and detailed design.
In order to be successful, we need to make sure the appropriate people
are involved. I've started by sending this email to the people who I
know are interested in the topic, but I know I've missed folks. I'm
also going to cc: the boot-architecture(a)lists.linaro.org[3] for any
boot architecture traffic. Please let me know if there is anybody
else that I should be inviting. In addition to the meeting in August,
I'm considering a regular boot architecture conference call as part of
the document drafting process, so I'd like to put together a list of
critical stakeholders by the end of next week.
[3] http://lists.linaro.org/mailman/listinfo/boot-architecture
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
On Mon, Jun 13, 2011 at 7:56 AM, Steve McIntyre
<steve.mcintyre(a)linaro.org> wrote:
> On Mon, Jun 13, 2011 at 07:51:05AM -0600, Grant Likely wrote:
>>Hi everyone,
>>
>>Note: I'm sending this directly to everyone on my 'interested
>>individuals' list, but future traffic will only get sent to the
>>boot-architecture(a)lists.linaro.org mailing list. If you're not
>>already, and would like to stay in the loop, please subscribe to the
>>list.
>>
>>Given the feedback I've received so far, I'm going to tentatively
>>schedule the meeting for Friday, July 5, at the end of the Linaro
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^August, surely?
Gah! yes. Friday, August 5th. Thanks for catching that.
g.