-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
624 lines (478 loc) · 15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
<!DOCTYPE html>
<html>
<head>
<meta charset=“UTF-8”>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Port Jailhouse to agl </title>
<link rel="stylesheet" href="reset.css" type="text/css" />
<link rel="stylesheet" href="styles.css" type="text/css" />
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<!-- google fonts -->
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/slider.js"></script>
<script type="text/javascript" src="js/superfish.js"></script>
<script type="text/javascript" src="/js/custom.js"></script>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<style media="screen">
body {
background-image: url('starry.jpg');
}
</style>
</head>
<body>
<div id="container" class="width">
<header>
<div class="width" id="Project">
<h1><a href="https://github.com/d80ep08th/Port-Jailhouse-to-AGL">Port Jailhouse to AGL</a></h1>
</div>
<div class="clear" id="weeks"></br>
<nav>
<ul class="sf-menu dropdown">
<li class="selected"><a href="index.html">Walkthrough</a>
</li>
<li><a href="week1.html">Week1</a>
<ul>
<li><a href="three-column.html">Build an image for raspberry pi4 containing the jailhouse hypervisor to experiment with</a></li>
</ul>
</li>
<li><a href="week2.html">Week2</a>
<ul>
<li><a href="#">Initialize jailhouse hypervisor on the raspi4 with the image built from jailhouse-images repo</a></li>
<li><a href="#">Run an inmate in a jailhouse cell</a></li>
<li><a href="#">Research the yocto project for building images for AGL.</a></li>
</ul>
</li>
<li><a href="week3.html">Week3</a>
<ul>
<li><a href="#">Build minimal agl images from yocto with jailhouse</a></li>
<li><a href="#">Build a jailhouse package based on a git repository commit</a></li>
</ul>
</li>
<li><a href="week4.html">Week4</a>
<ul>
<li><a href="#">Connect a raspberry pi 4 to a CAN bus module(controller-MCP2515 & transceiver-TJA1050)</a></li>
</ul>
</li>
<li><a href="week5.html">Week5</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
<li><a href="week5.html">Week6</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
<li><a href="week7.html">Week7</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
<li><a href="week8.html">Week8</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
<li><a href="week9.html">Week9</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
<li><a href="week10.html">Week10</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
<li><a href="week11.html">Week11</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
<li><a href="week12.html">Week12</a>
<ul>
<li><a href="#"></a></li>
</ul>
</li>
</ul>
<div class="clear"></div>
</nav>
</div>
</header>
<div id="intro">
<div class="width">
<div class="intro-content" >
<h2>A long time ago, in a galaxy far far away</br> a jedi made a walkthrough</h2></br>
</br>
</br>
</br>
<h5>
We use AGL as the main OS to install a hypervisor on an AGL reference platform.
</br>
</br>
We can then partition the CPU using that hypervisor.</br>
</br>
This hypervisor will give the RTOS a virtual operating platform.</br>
</br>
This is where the Jailhouse hypervisor becomes a core part of the project.</br>
</br>
The RTOS running as guest on the hypervisor can then procure data in real time and communicate it with the AGL OS.</br>
</br>
</h5>
</div>
</div>
</div>
<div id="body" class="width">
<div>
<!-- Cloning AGL -->
<section>
</br>
</br>
</br>
<h2> Download the AGL master branch </h2>
Run the following commands consecutively in the directory</br>
where you want to build the AGL OS</br>
</section>
<section id="content" class="two-column with-right-sidebar">
<article>
<p>
$ mkdir AGL</br>
$ cd AGL</br>
$ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo</br>
$ repo sync</br>
</p>
</article>
</section>
You can click here to get a more verbose guide to cloning AGL:
<a href="https://wiki.automotivelinux.org/agl-distro/source-code">SOURCE CODE</a>
</br>
</br>
</div>
<div>
<!-- Inside Build Dir -->
<section>
</br>
</br>
</br>
<h2>Create the Build Directory</h2></br>
To build the QEMU version of the AGL OS with the Jailhouse hypervisor</br>
</br>
</br>
Run the following command, it will build a directory where all the work specific to that
build will be stored.
</section>
<section id="content" class="two-column with-right-sidebar" >
<p>
$ source /meta-agl/scripts/aglsetup.sh -m qemux86-64 -b build-dir-name agl-demo agl-devel agl-jailhouse</br>
</br>
##this will automotically change the directory to the build-dir-name/ </br>
##structure of this direct-tree :)
##.</br>
##├── agl-init-build-env</br>
##├── aglsetup.manifest</br>
##└── conf</br>
#### ├── bblayers.conf</br>
#### ├── fragments.log</br>
#### ├── local.conf</br>
#### ├── setup.log</br>
#### └── templateconf.cfg</br>
</p>
</section>
The following are features and why they are used: </br>
agl-demo: enable layer meta-agl-demo and meta-qt5 - required to build agl-demo-platform </br>
agl-devel: activate development options (empty root password, debugger, strace, valgrind …)</br>
agl-jailhouse : enable layer meta-agl-jailhouse , required to build the out-of-kernel Jailhouse module </br>
</br>
</div>
<div>
<section>
</br>
</br>
</br>
source this script to be able to start bit-baking(or in fancy words, to initialize the build environment)
</section>
<section id="content" class="two-column with-right-sidebar" >
<p>
$ source agl-init-build-dev</br>
<h5>
<a>
Common targets are:</br>
- meta-agl layer:</br>
- included by default</br>
* agl-image-boot (just enough to boot)</br>
* agl-image-minimal (minimal filesystem with APIs)</br>
* agl-image-minimal-crosssdk (crosssdk for ^^)</br>
</br>
- with 'agl-profile-graphical'</br>
* agl-image-weston (minimal filesystem with weston)</br>
</br>
- with 'agl-profile-graphical-qt5'</br>
* agl-image-graphical-qt5 (weston plus qt5 framework libs)</br>
* agl-image-graphical-qt5-crosssdk (crosssdk for ^^)</br>
</br>
- with 'agl-profile-graphical-html5'</br>
* agl-image-graphical-html5 (weston plus chromium for html5)</br>
</br>
- with 'agl-profile-cluster'</br>
* agl-image-cluster (minimal image with APIs for cluster)</br>
- with 'agl-profile-cluster-qt5'</br>
* agl-image-cluster-qt5 (image with QT5 and APIs for cluster)</br>
- with 'agl-profile-telematics'</br>
* agl-image-telematics (image with APIs for telematics)</br>
</br>
- meta-agl-cluster-demo layer: (Instrument Cluster demo with UI)</br>
- with 'agl-cluster-demo'</br>
* agl-cluster-demo-platform (cluster demo image)</br>
* agl-cluster-demo-platform-crosssdk (sdk for ^^)</br>
* agl-cluster-demo-qtcompositor (cluster demo using own compositor)</br>
</br>
- meta-agl-telematics-demo layer: (Telematics demo w/o UI)</br>
- with 'agl-telematics-demo'</br>
* agl-telematics-demo-platform (telematics demo image)</br>
* agl-telematics-demo-platform-crosssdk (sdk for ^^)</br>
</br>
- meta-agl-demo: (IVI demo with UI)</br>
- with 'agl-demo'</br>
* agl-image-ivi (base for IVI targets)</br>
* agl-image-ivi-crosssdk (sdk for ^^)</br>
</br>
* agl-demo-platform (* default IVI demo target *)</br>
* agl-demo-platform-crosssdk (sdk for ^^)</br>
</br>
</a>
</h5>
</p>
</section>
<img> shows the output given by agl-init-build-dev </img>
</br>
</div>
<div>
<section>
</br>
</br>
</br>
<h2> Bitbake </h2>
NOTE : THIS MAY TAKE ALOT OF TIME(hours) TO BUILD</br>
</br>
[ DEPENDING ON HOW POWERFUL YOUR MACHINE IS]</br>
</br>
[Even the most powerful machine will take atleast half an hr to get done with the build]</br>
</br>
You can manipulate this to some extent by properly assigning the variables </br>
</br>
DL_DIR & SSTATE_DIR in conf/local.conf in your build-directory.</br>
</br>
bitbake will by default create a tmp/ directory on the first build</br>
where all the work is stored </br>
You can delete this directory if something goes wrong and restart the build </br>
</br>
</section>
<section id="content" class="two-column with-right-sidebar" >
<p>
$ bitbake agl-image-minimal</br>
##the above command will build the OS , enough to be able to boot on qemux86-64</br>
##this will build both the jailhouse module and the kernel but,</br>
</br>
##you can specifically build the jailhouse module (for changes you make to its layer)</br>
##$ bitbake jailhouse</br>
##You can also do the same for the kernel.</br>
##To get kernel source tree, you have to build kernel once</br>
##$ bitbake virtual/kernel</br>
</p>
</section>
To know more about bitbake and what it can do, click here:
<a href="https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html">BITBAKE</a>
</br>
</br>
To read more about the way directories are structured and their purpose , click here:
<a href="http://git.yoctoproject.org/cgit.cgi/poky/plain/README.structure?h=blinky"> POKY DIRECTORY TREE </a>
</br>
</div>
<div>
<section>
</br>
</br>
</br>
<h2> Qemu x86-64</h2></br>
</section>
<section id="content" class="two-column with-right-sidebar" >
<p>
<!-- $bitbake -e | grep -i ^QB -->
##this will start the qemu machine based on the preconfigured QB(qemu-boot) variables</br>
## Use the command--> $ bitbake -e | grep -i ^QB </br>##to checkout the configuration</br>
$ runqemu slirp kvm nographic</br>
</p>
</section>
Enter the user login as: root
</br>
NOTE: bitbake -e : prints the environment dump that gets parsed even before the build starts
</br>
</br>
</div>
<div>
<!-- Connecting to the qemu machine externally -->
<section>
</section>
<section id="content" class="two-column with-right-sidebar">
<p>
## Externally connect to the qemu machine by executing this command</br>
## on another shell on the same machine </br>
## This will help us view the progress of Jailhouse hypervisor in a more verbose manner
</br>
$ nc localhost 4321</br>
</p>
</section>
<img src="porting/login.png"></img>
</br>
</div>
<div>
<!--- Inside Qemu -->
<section>
</br>
</br>
</br>
</section>
<section id="content" class="two-column with-right-sidebar">
<p>
$ jailhouse hardware check </br>
<a>
Feature Availability</br>
------------------------------ ------------------</br>
Number of CPUs > 1 ok</br>
Long mode ok</br>
x2APIC ok</br>
</br>
VT-x (VMX) ok</br>
VMX outside SMX ok</br>
VMX inside SMX missing (optional)</br>
IA32_TRUE_*_CLTS ok</br>
NMI exiting ok</br>
Preemption timer ok</br>
I/O bitmap ok</br>
MSR bitmap ok</br>
Secondary controls ok</br>
Optional CR3 interception ok</br>
Virtualize APIC access ok</br>
RDTSCP ok</br>
Unrestricted guest ok</br>
INVPCID missing (optional)</br>
XSAVES ok</br>
EPT ok</br>
4-level page walk ok</br>
EPTP write-back ok</br>
2M pages ok</br>
1G pages missing (optional)</br>
INVEPT ok</br>
Single or all-context ok</br>
VM-exit save IA32_PAT ok</br>
VM-exit load IA32_PAT ok</br>
VM-exit save IA32_EFER ok</br>
VM-exit load IA32_EFER ok</br>
VM-entry load IA32_PAT ok</br>
VM-entry load IA32_EFER ok</br>
Activity state HLT ok</br>
</br>
VT-d (IOMMU #0) ok</br>
39-bit AGAW ok</br>
48-bit AGAW missing (optional)</br>
2M pages ok</br>
1G pages ok</br>
Queued invalidation ok</br>
Interrupt remapping ok</br>
Extended interrupt mode ok</br>
</br>
Check passed!</br>
</a>
$ jailhouse enable /usr/share/jailhouse/cells/qemu-agl.cell</br>
</p>
</section>
<img src="pics/enable.png"></img>
</br>
<img src="porting/enable.png"></png>
</br>
</div>
<div>
<section>
</br>
</br>
____________________________________________________________________________
</section>
<section id="content" class="two-column with-right-sidebar">
<p>
$ jailhouse cell create /usr/share/jailhouse/cells/agl-apic-demo.cell</br>
</p>
</section>
<img src="pics/create.png"></img>
</br>
<img src="porting/create.png"></img>
</br>
</div>
<div>
<section>
</br>
</br>
____________________________________________________________________________
</section>
<section id="content" class="two-column with-right-sidebar">
<p>
$ jailhouse cell load apic-demo /usr/share/jailhouse/inmate/apic-demo.bin</br>
</p>
</section>
<img src="pics/load.png"></img>
</br>
<img src="porting/load.png"></img>
</br>
</div>
<div>
<section>
</br>
</br>
____________________________________________________________________________
</section>
<section id="content" class="two-column with-right-sidebar">
<p>
$ jailhouse cell start apic-demo</br>
$ jailhouse cell stats apic-demo</br>
</p>
</section>
<img src="pics/start.png"></img>
</br>
<img src="porting/start.png"></img>
</div>
<div>
<section>
</br>
</br>
____________________________________________________________________________
</section>
<section id="content" class="two-column with-right-sidebar">
<p>
$ jailhouse cell shutdown apic-demo</br>
$ jailhouse cell destroy apic-demo</br>
</p>
</section>
<img src="pics/shutdown.png"></img>
</br>
<img src="porting/shutdown.png"></img>
</br>
<img src="pics/destroy.png"></img>
</br>
<img src="porting/destroy.png"></img>
</br>
</div>
<!--
<aside class="sidebar big-sidebar right-sidebar">
</aside>
<div class="clear"></div>
</div>
</div>
-->
</div>
<footer>
</footer>
</body>
</html>