Gentoo Archives: gentoo-embedded

From: Peter Stuge <peter@×××××.se>
To: gentoo-embedded <gentoo-embedded@l.g.o>
Subject: Re: [gentoo-embedded] coreboot + alix + startup times
Date: Fri, 05 Sep 2008 00:04:24
Message-Id: 20080905000421.12250.qmail@stuge.se
In Reply to: Re: [gentoo-embedded] Embedded Not a Blog by Ed W
1 Ed W wrote:
2 > >(Power-to-app in milliseconds, for example.)
3 >
4 > Can you please expand a little more on this with particular regard
5 > to the Alix2?
6
7 For ms to be possible, the app has to be simple enough that it does
8 not require a full operating system to be running. If that's the case
9 it can be linked against libpayload rather than glibc/other libc, and
10 the resulting binary is a payload that will be running quite quickly
11 after power on.
12
13 (This might not seem like too big a deal, but libpayload is maturing
14 and there are some apps available, although most are utilities
15 (coreinfo, the bayou menu) or demos. (the tint tetris game)
16 libpayload even has curses.)
17
18
19 > TinyBios already boots to the linux kernel in a couple of seconds,
20 > but I am personally having trouble getting the kernel to load in
21 > less than about 10-12 seconds (using a lightly tweaked 2.6 kernel).
22 > Shorter boot times would be quite desirable for my design...
23
24 Two concrete suggestions:
25
26 First, coreboot can load your kernel directly from boot flash if you
27 make a payload out of it. This means you're skipping the BIOS stage,
28 and the bootloader stage, which should save you 4-5 seconds.
29
30 The flash chip on all alix boards is 4Mbit == 512kbyte, so not large
31 enough for a kernel, but the LPC header allows you to use a larger
32 flash chip, and 16Mbit == 2Mbyte should be enough for an alix kernel.
33 (coreboot just needs 32kb or so.) The SST49LF160C should work and
34 comes in PLCC which fits the socket on the LPC.1A. (But LPC.1A stands
35 up from the alix board, so doesn't fit in the standard case. :\)
36
37 Second, tweak your kernel. This can save you another few seconds.
38
39 Third, init scripts. I understand OpenRC is snappy but I haven't
40 tried it. I'm using three super simple init scripts
41 (sysinit+boot+default) to cut the startup time.
42
43
44 > Also you have quite a lot of yellow in your support matrix. Given
45 > I need all the features of the board for my design (pretty much),
46 > including the flashing lights and the optional buzzer, what
47 > problems am I going to run into with stuff not working?
48
49 There is a known bug with the LEDs. I do believe it's a relatively
50 easy fix, but noone has looked into it. AMD are good with data sheets
51 for the Geode so if you want to you can even get on fixing it
52 yourself right away. :)
53
54 As for optional buzzer, I don't believe anyone has tested that. It
55 may or may not work. I'm guessing it will not work, but on the other
56 hand I don't think it will be more difficult to fix than the LEDs.
57
58
59 > Am I likely to care that ACPI is unsupported?
60
61 For a serverish appliance I don't think so. ACPI is needed primarily
62 for suspend/resume things. Wake-on-LAN qualifies, but I think your
63 box wants to be always on.
64
65
66 > My design is basically a fancy router + mail server + couple of
67 > other embedded apps.
68
69 Cool.
70
71
72 > It's commercial so it would be useful to understand how to comply
73 > with the (GPL) licensing terms?
74
75 Yes, coreboot is GPL2. libpayload has a BSD license so that everyone
76 who wants to use it can link their apps against it.
77
78 coreboot is not combined with the payload by way of linking, so
79 the payload doesn't need to have a GPL-compatible license.
80
81 coreboot should not add any new licensing complications to your
82 product, as usual you just have to make sure that all your customers
83 who receive binaries built from GPL source also have a way to acquire
84 the source code for said binaries.
85
86 You could avoid the support issue completely by sending the source
87 along with the binaries in the first place. I usually burn a CD-R.
88
89 Other popular approaches are to put source online on a web site that
90 your customers (and ideally also everyone else, although AFAIK that
91 is not required at least by GPL2) can access, or to include an email
92 or postal address that processes source requests in the
93 documentation.
94
95
96 Hope this helps.
97
98 //Peter