You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.adoc
+32-7Lines changed: 32 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ The design goals are to provide setups that are:
41
41
* highly automated: "just works"
42
42
* thoroughly documented: you know what "just works" means
43
43
* can be fully built from source: to give visibility and allow modifications
44
-
* can also use prebuiltbinaries as much as possible: in case you are lazy or unable to build from source
44
+
* can also use <<prebuilt, prebuilt binaries>> as much as possible: in case you are lazy or unable to build from source
45
45
46
46
== Getting started
47
47
@@ -522,17 +522,24 @@ Our prebuilts currently include:
522
522
* Linux kernel
523
523
* root filesystem
524
524
525
-
Advantages: saves time and disk space.
525
+
Advantage: saves time and disk space on the initial install.
526
526
527
-
Limitations:
527
+
The limitations are severe however:
528
528
529
529
* can't <<gdb,GDB step debug the kernel>>, since the source and cross toolchain with GDB are not available. Buildroot cannot easily use a host toolchain: <<prebuilt-toolchain>>.
530
530
+
531
531
Maybe we could work around this by just downloading the kernel source somehow, and using a host prebuilt GDB, but we felt that it would be too messy and unreliable.
532
532
* can't create new modules or modify the existing ones, since no cross toolchain
533
-
* can't use things that rely on our QEMU fork, e.g. in-fork <<device-models>> or <<tracing>>
534
533
* you won't get the latest version of this repository. Our <<travis>> attempt to automate builds failed, and storing a release for every commit would likely make GitHub mad at us.
535
-
* <<gem5>> is not currently supported, although it should not be too hard to do. One annoyance is that there is no Debian package for it, so you have to compile your own, so you might as well just build the image itself.
534
+
* <<gem5>> is not currently supported, although it should not be too hard to do.
535
+
+
536
+
Annoyances:
537
+
+
538
+
** there is no Debian package for it, so you have to compile your own, so you might as well just build the image itself
539
+
** it does not handle <<gem5-qcow2,qcow2>>, and we haven't gotten <<squashfs>> to work yet, therefore we would have to either distribute large ext2 images, or constantly fight with <<br2_target_rootfs_ext2_size>>
540
+
** QEMU uses bzImage and gdm5 the raw `vmlinux`, and we don't want to distribute the same thing twice... https://github.com/torvalds/linux/blob/master/scripts/extract-vmlinux We could use `extract-vmlinux`, but that would imply cloning the Linux kernel, which is at least half of the kernel build time :-)
541
+
542
+
This setup might be good enough for those developing simulators, as that requires less image modification. But once again, if you are serious about this, why not just let your computer build the <<qemu-buildroot-setup,full featured setup>> while you take a coffee or a nap? :-)
Alternatively, you can also try to use the host QEMU:
572
+
Alternatively, you can also try to use the host QEMU directly with:
566
573
567
574
....
568
-
sudo apt-get install qemu-system-x86
575
+
sudo apt-get install qemu-system-x86 qemu-utils
569
576
./run --prebuilt
570
577
....
571
578
572
579
but QEMU builds are pretty quick, and this further increases the probability of incompatibilities, are you really that lazy?
573
580
581
+
////
582
+
For gem5, do:
583
+
584
+
....
585
+
sudo apt-get install qemu-utils
586
+
./build-gem5
587
+
./run --gem5 --prebuilt
588
+
....
589
+
590
+
`qemu-utils` is required because we currently distribute `.qcow2` files which <<gem5-qcow2,gem5 can't handle>>, so we need `qemu-img` to extract them first.
591
+
////
592
+
574
593
[[host]]
575
594
=== Host kernel module setup
576
595
596
+
**THIS IS DANGEROUS, YOU HAVE BEEN WARNED**
597
+
577
598
This method runs the kernel modules directly on your host computer without a VM, and saves you the compilation time and disk usage of the virtual machine method.
578
599
579
600
It has however severe limitations, and you will soon see that the compilation time and disk usage are well worth it:
@@ -6488,8 +6509,12 @@ index 17498c42b..76b8b351d 100644
6488
6509
6489
6510
The directory of interest is `src/dev/storage`.
6490
6511
6512
+
=== gem5 qcow2
6513
+
6491
6514
qcow2 does not appear supported, there are not hits in the source tree, and there is a mention on Nate's 2009 wishlist: http://gem5.org/Nate%27s_Wish_List
6492
6515
6516
+
This would be good to allow storing smaller sparse ext2 images locally on disk.
6517
+
6493
6518
=== Snapshot
6494
6519
6495
6520
QEMU allows us to take snapshots at any time through the monitor.
0 commit comments