compilation and simulation of embedded linux system
TRANSCRIPT
-
8/7/2019 Compilation and Simulation of Embedded Linux system
1/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d
Q E M U / A R M h a n d s o n
l m e n
F e d o r a
I U t h m P H I H
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
2/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
1
e n d
2
p d o i m d d d s q ! l s n t t q o
3
o m k o n d
4
e n d E o n t i w G e w
5
p d o e w s n t t
6
t o n c
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
3/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
A g e n d a
p d o i m d d d s q ! l s n t t q o
o m k o n d k n o l
e n d E o n t i w G e w
p d o e w s n t t
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
4/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
q o l E t t X G G d o o j t F o G k G s q G i m d d d
C r e a t e h i g h q u a l i t y p a c k a g e s o f c r o s s - c o m p i l e r s a n d r e l a t e d
t o o l s
P r o v i d e p a c k a g i n g g u i d e l i n e s
M a k e d i s t r i b u t i o n r e l e a s e s o n s u b a r c h i t e c t u r e s
t d l t o m G X e w D e Q P D e D f l k ( n D
s q g g D i w D o t
p o t t l k l l o o n e w t t
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://fedoraproject.org/wiki/SIGs/Embeddedhttp://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
5/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
W h y F e d o r a o n A R M a r c h i t e c t u r e ? M u l t i p l e r e a s o n s !
P H H U X W V 7 o o n l l o n m o l o n o l d t
l t o n e w o o F
P H H W X W H 7 o l l m d d d Q P E t s g o o e w
o o F
P H I H X S f l l o n e w W o o n d o
e w o o t o n t m k t E w l l 9
n n o n m n t
e w o o E i l
b a s e d o n C o r t e x A 1 5 a r c h i t e c t u r e , i t h a s h a r d w a r e
v i r t u a l i z a t i o n s u p p o r t !
y v g o n o j t n t t d t o p d o
e w o t
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
6/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
S o m e b a c k g r o u n d
l t o m G o o l t o n o v n x G m d d d o j t
a t - l e a s t 3 2 b i t p r o c e s s o r
p r o c e s s o r s h o u l d h a v e a M M U
n o n - M M U b a s e d p r o c e s s o r s c a n u s e u c L i n u x
h o w e v e r y o u h a v e t o m o d i f y a p p l i c a t i o n s t o o
o a t i n g p o i n t u n i t
w h i c h o p t i o n a l a n d c a n b e e m u l a t e d b y l i b r a r i e s
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
7/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
W h y d o w e n e e d a b o o t l o a d e r ?
l o t o o k d o n o o t l o d F
u n l m t t l o t o t m n t l z t o n l d
d o n X
c o n g u r i n g m e m o r y s u b - s y s t e m .
l o a d i n g k e r n e l i m a g e a t t h e c o r r e c t m e m o r y a d d r e s s
l o a d i n g i n i t i a l R A M d i s k ( o p t i o n a l )
i n i t i a l i z i n g b o o t p a r a m e t e r s
o b t a i n i n g t h e A R M L i n u x m a c h i n e t y p e
i n i t i a l i z i n g r e g i s t e r v a r i a b l e s f o r e n t r y i n t o k e r n e l
t n o d o l l t X
h i g h l y e r r o r p r o n e , r e p e t i t i v e , c u m b e r s o m e a n d b o r i n g
a r e a d y m a d e b o o t l o a d e r g e n e r a l l y j u s t t s i n
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
8/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
W h y d o w e n e e d L i n u x K e r n e l ?
v n x D o E o D y n o
n d o s n d n d n
y s o m l n
d r d o t
l n x k n l m n d d l d l t o m o n
p r o v i d e u s w i t h w e l l d e n e d d e v i c e i n t e r f a c e s
d o e s t h e g r u n t w o r k o f h a r d w a r e l e v e l i n t e r f a c i n g w i t h t h e
d e v i c e s
d r i v e r w o r k s o n a n o t h e r h a r d w a r e w i t h u s u a l l y v e r y f e w c h a n g e s
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
9/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
A b o u t Q E M U
i w n m l t o o o l g
x 8 6 , A R M , P o w e r P C , S p a r c 3 2 / 6 4 , M I P S a n d C o l d F i r e
A V R 3 2 s u p p o r t i s i n p r o g r e s s a t
h t t p : / / r e p o . o r . c z / w / q e m u / a v r 3 2 . g i t
I t a l s o s i m u l a t e s p e r i p h e r a l d e v i c e s , b a s i c a l l y a c o m p l e t e
S y s t e m o n C h i p .
t m k i w l o d o n m d d d t m
d l o m n t c
N o n e e d o f a c t u a l h a r d w a r e f o r p r o t o t y p i n g .
I t s g r e e n e r - n o n e e d o f a n y p o w e r s o u r c e .
M a n y p r o j e c t s a l r e a d y u s e Q E M U
A n d r o i d , M e e G o , e t c .
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://repo.or.cz/w/qemu/avr32.githttp://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
10/20
A g e n d a
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
H a n d s - o n . W e w i l l d i s c u s s t h e f o l l o w i n g :
h l o m n t t
A R M t o o l c h a i n , Q E M U e t c .
t n t t m t c
I n i t i a l i z a t i o n .
B o o t l o a d e r .
K e r n e l .
I n i t i a l r o o t l e s y s t e m .
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
11/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
S y s t e m s e t u p
p d o e w o o l n
A R M v 5 o n l y -
h t t p : / / f e d o r a p r o j e c t . o r g / w i k i / A r c h i t e c t u r e s / A R M / C r o s s T o o l c h a i n
i w G e w
m k m E t o o l t o t o o t m
o t t o o l
b r i d g e - u t i l s ( o p t i o n a l )
k o j i
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://fedoraproject.org/wiki/Architectures/ARM/CrossToolchainhttp://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
12/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
W h a t h a p p e n s w h e n a n A R M b a s e d b o a r d i s p o w e r e d O N ?
n d t n d t m m o m o e w n d y w
t t o d
F i r s t i n s t r u c t i o n
V e c t o r t a b l e
S t a c k i n i t i a l i z a t i o n
R e l o c a t i n g t h e R A M t o a d i e r e n t a d d r e s s
R u n n i n g f r o m R A M
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
13/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
H a n d s o n :
t d E t l f E m l t d i w
v t m k m n m l t l n x d t m o n e w
p o l l o n t n o l d X
C o m p i l e a n d c o n g u r e U - B o o t b o o t - l o a d e r
C o m p i l e a n d c o n g u r e L i n u x K e r n e l
C r e a t e a r o o t l e - s y s t e m
W e w i l l u s e B u s y b o x f o r s h e l l c o m m a n d i n t e r f a c e
S h o v e a l l o f t h e m i n t o a o n e b i g c h u n k t o b e a s h e d o n t o
m e m o r y
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
14/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
W h a t w e l e a r n f r o m t h i s e x c e r c i s e ?
s t t l n n x n
r o t n o t o d t n t l o n t m F
s t d o n 9 t l t o t o n d o o t k F
p d o e w o t o l t o l m X
P r o v e n p a c k a g i n g t e c h n o l o g y a l r e a d y i n u s e i n m a n y o f t h e
m o s t p o p u l a r d i s t r o s
R e d u c e d e v e l o p m e n t t i m e a n d t i m e t o m a r k e t f o r y o u r n e x t
d e v i c e
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
15/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
F e d o r a A R M I n f r a s t r u c t u r e
n g n t o h l o m n t o y n n o l o @ g h y A
t t o o l o g o m t t d t n g o l l D o o n t o F
t t X G G z n t F n F o n F G k G n d x F G p d o e w o n d
t t X G G z n t F n F o n F G k G n d x F G p d o e w u o j f l d
v t t n X
h t t p : / / f e d o r a - a r m . b l o g s p o t . c o m /
h t t p : / / p a u l f e d o r a . w o r d p r e s s . c o m /
g n t t t
h t t p : / / a r m . k o j i . f e d o r a p r o j e c t . o r g / s t a t u s /
n t d o l l n
h t t p : / / f s o s s . s e n e c a c . o n . c a / 2 0 1 0 / n o d e / 2 4
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://fsoss.senecac.on.ca/2010/node/24http://arm.koji.fedoraproject.org/status/http://paulfedora.wordpress.com/http://fedora-arm.blogspot.com/http://zenit.senecac.on.ca/wiki/index.php/Fedora_ARM_Koji_Buildsystemhttp://zenit.senecac.on.ca/wiki/index.php/Fedora_ARM_Secondary_Architecturehttp://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
16/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
B u l d i n g p a c k a g e s f o r F e d o r a A R M
g t o ( x n x t n w k
d l l d o n e w u o j t o t w
g k n d ( x n
e w u o j n t
w o o n r o t o k o j
h t t p : / / f e d o r a p r o j e c t . o r g / w i k i / K o j i
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://fedoraproject.org/wiki/Kojihttp://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
17/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
C o n t r i b u t i n g t o F e d o r a / A R M
d o o j t F o G k G e t t G e w G r o o m
w l n l t
h t t p s : / / a d m i n . f e d o r a p r o j e c t . o r g / m a i l m a n / l i s t i n f o / a r m
s g E 5 d o E m o n F n o d F n t
s n o t t o l d X
h t t p s : / / b u g z i l l a . r e d h a t . c o m / s h o w _ b u g . c g i ? i d = A R M T r a c k e r
w o n o t X
h t t p : / / f e d o r a p r o j e c t . o r g / w i k i / A r c h i t e c t u r e s / A R M / T e a m _ a n d _ D e v e l o
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://fedoraproject.org/wiki/Architectures/ARM/Team_and_Developershttps://bugzilla.redhat.com/show_bug.cgi?id=ARMTrackerhttps://admin.fedoraproject.org/mailman/listinfo/armhttp://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
18/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
C u r r e n t s t a t e o f a a i r s i n F e d o r a / A R M
p d o I Q l o e w l l o l l n m F
d l t t o o l n t l l o e w S n d d o n 9 t o t
d o m o t m o d n e w g n 9 t o t m l l d
p l o t n o n t o t n t p d o G e w o t o o l n X
D i s c u s s i o n i s o n f o r w h i c h o f s o f t / s o f t f p o r h a r d f p t o s e l e c t f o r
u p c o m i n g A R M v 7 t o o l c h a i n
y v g @ n t l t o n l o n t o p d o e w o
l l o j t A
t h e y s e e m t o b e a i m i n g t o j u m p f r o m F - 1 1 t o F - 1 4 , f o r t h e i r
n e x t r e l e a s e
i t s n o t c l e a r i f t h a t i n c l u d e s X O - 1 . 7 5 ( t h e O L P C ' s A R M
t a r g e t ) .
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
19/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
Q u e s t i o n s ?
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
A g e n d a
http://find/http://goback/ -
8/7/2019 Compilation and Simulation of Embedded Linux system
20/20
F e d o r a E m b e d d e d S I G S p e c i a l I n t e r e s t G r o u p
S o m e b a c k g r o u n d
A b a s i c h a n d s - o n w i t h Q E M U / A R M
F e d o r a A R M I n f r a s t r u c t u r e
Q u e s t i o n s ?
T h a n k y o u !
t x d n t 5 d o E m o n F n o d F n t
S a l e e m A n s a r i f o s s . i n / 2 0 1 0 - F e d o r a E m b e d d e d a n d Q E M U / A R M h a n d s o
http://find/http://goback/