Gentoo Archives: gentoo-embedded

From: michael@×××××××××××××.com
To: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo version 0.06 (almost finished)
Date: Wed, 15 Jun 2005 05:57:59
Message-Id: Pine.LNX.4.61.0506141706410.6683@mail.magrittesystems.com
In Reply to: Re: [gentoo-embedded] x86 SBC Gentoo Embedded HowTo version 0.06 (almost finished) by Quentin Arce
1 Thanks Quentin,
2
3 That was exactly it! In my grub.conf I had the root partition wrong.
4
5 Now it boots, and I'm on to my next mission: Add wireless tools to
6 support my wireless network card (D-Link DWL-520)
7
8 Michael
9
10
11 On Tue, 14 Jun 2005, Quentin Arce wrote:
12
13 >
14 >
15 > --- michael@×××××××××××××.com wrote:
16 >
17 >> Hi Yuri, Heath, Gentoo-embedded folks:
18 >>
19 >> I've taken your suggestion, Heath, and built a 2.6
20 >> kernel (instead of
21 >> the 2.4 I made by accident), and I've followed
22 >> version 0.6 of your HOWTO
23 >> with Yuri's comments.
24 >>
25 >> Grub loads, finds the kernel, and booting starts,
26 >> but it doesn't go all
27 >> the way:
28 >>
29 >> warning: unable to open an initial console
30 >> kernel panic: no init found
31 >
32 > I had this exact error for a while with a 2.6 kernel
33 > and using syslinux to boot. It turned out I had the
34 > wrong root device. The naming changed between my
35 > image build system and the real system. I'm assuming
36 > you are building an embedded system for some old
37 > hardware and it's not really an embedded system.
38 >
39 > my 1.5 cents
40 > Q
41 >
42 >> (That's not an exact quote). I've checked that my
43 >> kernel's .config
44 >> includes consoles, and that /dev/console exists and
45 >> is linked to
46 >> character device 5,1.
47 >>
48 >> I haven't done a whole lot of research into this yet
49 >> but wonder if
50 >> anything springs to your collective minds.
51 >>
52 >> As usual, any comments appreciated and any
53 >> suggestions entertained.
54 >>
55 >> Michael
56 >>
57 >>
58 >> On Mon, 6 Jun 2005, Yuri Vasilevski wrote:
59 >>
60 >>> Hi,
61 >>>
62 >>> On Mon, 6 Jun 2005 10:03:26 -0500
63 >>> Heath H Holcomb <liquidcable@×××××.com> wrote:
64 >>>
65 >>>> Version 0.06
66 >>>> Please add, delete, modify. Thanks!
67 >>>
68 >>> Just some things that came to my mind with respect
69 >> to this
70 >>> version.
71 >>>
72 >>>> This procedure produces a working embedded
73 >> rootfs, that boots form a hard
74 >>>> drive on a Geode based SBC (single board
75 >> computer); at least on my
76 >>>> development system.
77 >>>>
78 >>>> I've update my website with this version also.
79 >>>> http://www.bulah.com/embeddedgentoo.html
80 >>>>
81 >>>>
82 >>>>
83 >>
84 > #--------------------------------------------------------------------------------
85 >>>> # Embedded Gentoo How-To for x86
86 >>>> #
87 >>>> # A how-to guide to setup a Gentoo embedded
88 >> environment, you must be root.
89 >>>> # These commands are to be run on your
90 >> development system,
91 >>>> # any x86 Gentoo Linux computer will do. The
92 >> system should be fast,
93 >>>> # to speed development. The target can be any
94 >> x86 based SBC. I'm
95 >>>> # using a Geode based SBC. Latter I'll use a Via
96 >> based SBC.
97 >>>> #
98 >>>> # version 0.06
99 >>>> # 2005.6.6
100 >>>> #
101 >>>> # Heath Holcomb (heath at bulah.com)
102 >>>> # Ned Ludd (embedded Gentoo project lead,
103 >> original commands posted)
104 >>>> # Lloyd Sargent (contributor)
105 >>>> # Yuri Vasilevshi (contributor)
106 >>>
107 >>> It's Vasilevski :-)
108 >>>
109 >>>> # Mike George (contributor)
110 >>>> # Kammi Cazze (contributor)
111 >>>> # Marius Schaefer (contributor)
112 >>>> #
113 >>>> # Definitions and Terms
114 >>>> # system_rootfs = your regular rootfs
115 >>>> # development_rootfs = what you use to build the
116 >> embedded_rootfs
117 >>>> # embedded_rootfs = rootfs you deploy to the
118 >> target system
119 >>>> # SBC = single board computer (here it's an x86
120 >> based)
121 >>>> #
122 >>>> # References
123 >>>> # http://www.gentoo.org/doc/en/handbook/index.xml
124 >>>> # http://www.epiawiki.org
125 >>>> # http://epia.kalf.org
126 >>>> # Gentoo embedded mailing list
127 >> (gentoo-embedded@l.g.o)
128 >>>> #
129 >>>> #
130 >>>> # Overview of process (steps)
131 >>>> # 1 - Prepare the development_rootfs from your
132 >> system_rootfs
133 >>>> # 2 - Build the development_rootfs
134 >>>> # 3 - Build the embedded_rootfs
135 >>>> # 4 - Build and install non-system programs to
136 >> the embedded_rootfs
137 >>>> # 5 - Build and install a kernel to the
138 >> embedded_rootfs
139 >>>> # 6 - Deploy embedded_rootfs to target
140 >>>> #
141 >>>>
142 >>
143 > #--------------------------------------------------------------------------------
144 >>>>
145 >>>> #----- Step 1 - Prepare the development_rootfs
146 >> from your system_rootfs -------
147 >>>>
148 >>>> # You must be root.
149 >>>> su -
150 >>>>
151 >>>> # Create the development_rootfs.
152 >>>> # I use i586 because of target is a Geode
153 >> processor.
154 >>>> mkdir -p
155 >> /opt/i586-gentoo-uclibc-linux/usr/portage
156 >>>>
157 >>>> # Download the latest stage 1 tarball.
158 >>>> wget \
159 >>>>
160 >>
161 > http://gentoo.osuosl.org/experimental/x86/embedded/stages/stage1-x86-uclibc-2005.0.tar.bz2
162 >>>>
163 >>>> # Untar the stage to the development_rootfs.
164 >>>> tar -xvjf stage1-x86-uclibc-2005.0.tar.bz2 -C
165 >> /opt/i586-gentoo-uclibc-linux/
166 >>>
167 >>> it should be tar -xvjpf ...
168 >>> where -p stands for --preserve-permissions
169 >>>
170 >>>>
171 >>>> # Mount the proc and portage directories to your
172 >> development_rootfs.
173 >>>> # Makes your system_rootfs's proc and portage
174 >> directory available from inside
175 >>>> # of your development_rootfs (after chrooting).
176 >>>> mount --bind /proc
177 >> /opt/i586-gentoo-uclibc-linux/proc/
178 >>>> mount --bind /usr/portage
179 >> /opt/i586-gentoo-uclibc-linux/usr/portage
180 >>>>
181 >>>> # Copy over DNS information to the
182 >> development_rootfs.
183 >>>> cp /etc/resolv.conf
184 >> /opt/i586-gentoo-uclibc-linux/etc/resolv.conf
185 >>>>
186 >>>> # Chroot into the development_rootfs.
187 >>>> chroot /opt/i586-gentoo-uclibc-linux /bin/bash
188 >> --login
189 >>>>
190 >>>>
191 >>>> #----- Step 2 - Build the development_rootfs
192 >> ---------------------------------
193 >>>>
194 >>>> # Create new environment and load variables into
195 >> memory.
196 >>>> env-update
197 >>>> source /etc/profile
198 >>>>
199 >>>> # Modify make.conf file to your liking/needs.
200 >>>> nano -w /etc/make.conf
201 >>>> # This is for my target, Geode x86 processor.
202 >>>> /*
203 >>>> USE="bitmap-fonts minimal truetype-fonts uclibc
204 >> mmx"
205 >>>
206 >>> The uclibc USE flag was obsoleted, see:
207 >>>
208 >>
209 > http://www.mail-archive.com/gentoo-embedded@l.g.o/msg00140.html
210 >>>
211 >>>> CHOST="i586-gentoo-linux-uclibc"
212 >>>> CFLAGS="-march=i586 -Os -pipe
213 >> -fomit-frame-pointer -mmmx"
214 >>>> CXXFLAGS="${CFLAGS}"
215 >>>> FEATURES="buildpkg"
216 >>>>
217 >>>> VIDEO_CARDS="chips"
218 >>>> UCLIBC_CPU="586MMX"
219 >>>> */
220 >>>>
221 >>>> # Set profile to use 2.6 kernel.
222 >>>> # The current stage uses 2.4 by default, and for
223 >> most cases you are going
224 >>>> # to want a 2.6.x kernel.
225 >>>> rm /etc/make.profile
226 >>>
227 >>> This are equivalent but I would use:
228 >>> unlink /etc/make.profile
229 >>> for clarity's sake.
230 >>>
231 >>>> ln -s /usr/portage/profiles/uclibc/x86
232 >> /etc/make.profile
233 >>
234 > === message truncated ===
235 >
236 >
237 > __________________________________________________
238 > Do You Yahoo!?
239 > Tired of spam? Yahoo! Mail has the best spam protection around
240 > http://mail.yahoo.com
241 > --
242 > gentoo-embedded@g.o mailing list
243 >
244 >
245 --
246 gentoo-embedded@g.o mailing list