mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 20:44:26 +01:00
readme: fix position of gem5 ruby build section
This commit is contained in:
72
README.adoc
72
README.adoc
@@ -12149,42 +12149,6 @@ Indirect leak of 1346 byte(s) in 2 object(s) allocated from:
|
|||||||
|
|
||||||
From the message, this appears however to be a Python / pyenv11 bug however and not in gem5 specifically. I think it worked when I tried it in the past in an older gem5 / Ubuntu.
|
From the message, this appears however to be a Python / pyenv11 bug however and not in gem5 specifically. I think it worked when I tried it in the past in an older gem5 / Ubuntu.
|
||||||
|
|
||||||
== Buildroot
|
|
||||||
|
|
||||||
=== Introduction to Buildroot
|
|
||||||
|
|
||||||
https://en.wikipedia.org/wiki/Buildroot[Buildroot] is a set of Make scripts that download and compile from source compatible versions of:
|
|
||||||
|
|
||||||
* GCC
|
|
||||||
* Linux kernel
|
|
||||||
* C standard library: Buildroot supports several implementations, see: xref:libc-choice[xrefstyle=full]
|
|
||||||
* https://en.wikipedia.org/wiki/BusyBox[BusyBox]: provides the shell and basic command line utilities
|
|
||||||
|
|
||||||
It therefore produces a pristine, blob-less, debuggable setup, where all moving parts are configured to work perfectly together.
|
|
||||||
|
|
||||||
Perhaps the awesomeness of Buildroot only sinks in once you notice that all it takes is 4 commands as explained at https://stackoverflow.com/questions/47557262/how-to-download-the-torvalds-linux-kernel-master-recompile-it-and-boot-it-wi/49349237#49349237
|
|
||||||
|
|
||||||
....
|
|
||||||
git clone https://github.com/buildroot/buildroot
|
|
||||||
cd buildroot
|
|
||||||
git checkout 2018.02
|
|
||||||
make qemu_aarch64_virt_defconfig
|
|
||||||
make olddefconfig
|
|
||||||
time make BR2_JLEVEL="$(nproc)"
|
|
||||||
qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -smp 1 -kernel output/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=output/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
|
|
||||||
....
|
|
||||||
|
|
||||||
This repo basically wraps around that, and tries to make everything even more awesome for kernel developers.
|
|
||||||
|
|
||||||
The downsides of Buildroot are:
|
|
||||||
|
|
||||||
* the first build takes a while, but it is well worth it
|
|
||||||
* the selection of software packages is relatively limited if compared to Debian, e.g. no Java or Python package in guest out of the box.
|
|
||||||
+
|
|
||||||
In theory, any software can be packaged, and the Buildroot side is easy.
|
|
||||||
+
|
|
||||||
The hard part is dealing with crappy third party build systems and huge dependency chains.
|
|
||||||
|
|
||||||
==== gem5 Ruby build
|
==== gem5 Ruby build
|
||||||
|
|
||||||
Ruby is a system that includes the SLICC domain specific language to describe memory systems: http://gem5.org/Ruby
|
Ruby is a system that includes the SLICC domain specific language to describe memory systems: http://gem5.org/Ruby
|
||||||
@@ -12223,6 +12187,42 @@ xdg-open "$(./getvar --arch aarch64 --gem5-build-id ruby gem5_build_build_dir)/A
|
|||||||
|
|
||||||
A minimized ruby config which was not merged upstream can be found for study at: https://gem5-review.googlesource.com/c/public/gem5/+/13599/1
|
A minimized ruby config which was not merged upstream can be found for study at: https://gem5-review.googlesource.com/c/public/gem5/+/13599/1
|
||||||
|
|
||||||
|
== Buildroot
|
||||||
|
|
||||||
|
=== Introduction to Buildroot
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Buildroot[Buildroot] is a set of Make scripts that download and compile from source compatible versions of:
|
||||||
|
|
||||||
|
* GCC
|
||||||
|
* Linux kernel
|
||||||
|
* C standard library: Buildroot supports several implementations, see: xref:libc-choice[xrefstyle=full]
|
||||||
|
* https://en.wikipedia.org/wiki/BusyBox[BusyBox]: provides the shell and basic command line utilities
|
||||||
|
|
||||||
|
It therefore produces a pristine, blob-less, debuggable setup, where all moving parts are configured to work perfectly together.
|
||||||
|
|
||||||
|
Perhaps the awesomeness of Buildroot only sinks in once you notice that all it takes is 4 commands as explained at https://stackoverflow.com/questions/47557262/how-to-download-the-torvalds-linux-kernel-master-recompile-it-and-boot-it-wi/49349237#49349237
|
||||||
|
|
||||||
|
....
|
||||||
|
git clone https://github.com/buildroot/buildroot
|
||||||
|
cd buildroot
|
||||||
|
git checkout 2018.02
|
||||||
|
make qemu_aarch64_virt_defconfig
|
||||||
|
make olddefconfig
|
||||||
|
time make BR2_JLEVEL="$(nproc)"
|
||||||
|
qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -smp 1 -kernel output/images/Image -append "root=/dev/vda console=ttyAMA0" -netdev user,id=eth0 -device virtio-net-device,netdev=eth0 -drive file=output/images/rootfs.ext4,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0
|
||||||
|
....
|
||||||
|
|
||||||
|
This repo basically wraps around that, and tries to make everything even more awesome for kernel developers.
|
||||||
|
|
||||||
|
The downsides of Buildroot are:
|
||||||
|
|
||||||
|
* the first build takes a while, but it is well worth it
|
||||||
|
* the selection of software packages is relatively limited if compared to Debian, e.g. no Java or Python package in guest out of the box.
|
||||||
|
+
|
||||||
|
In theory, any software can be packaged, and the Buildroot side is easy.
|
||||||
|
+
|
||||||
|
The hard part is dealing with crappy third party build systems and huge dependency chains.
|
||||||
|
|
||||||
=== Custom Buildroot configs
|
=== Custom Buildroot configs
|
||||||
|
|
||||||
We provide the following mechanisms:
|
We provide the following mechanisms:
|
||||||
|
|||||||
Reference in New Issue
Block a user