Commit Graph

31 Commits

Author SHA1 Message Date
17dd3f76f0 build-gem5: --regression-test 2019-01-25 00:00:04 +00:00
72cd8f580d build-gem5: --clang 2019-01-25 00:00:03 +00:00
7b99c45ac2 build-gem5: build individual unit tests 2019-01-25 00:00:02 +00:00
ce8e363ca1 gem5: expose unit tests 2019-01-25 00:00:00 +00:00
c858e57ed9 build-gem5: fix worktree checkout 2019-01-24 00:00:02 +00:00
da900a579c LKMC v3.0
This is a squash commit, the unsquashed development went through many
unstable phases which would break bisects. The unsquashed branch is:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/v3.0-unsquash

The main improvement of this release was to greatly generalize the testing system.

The key addition was cli_function.py, which allows scripts such as ./run to
be transparently called either from Python or from the command line.

New tests scripts were created using this improved framework: test-baremetal
and test-user-mode.

We were lazy to port some of less important tests to the new setup, TODO's were
added, and we need comes they will be fixed. Getting started is however sacred
as usual and should work.

Other changes include:

-   gem5: update to 7fa4c946386e7207ad5859e8ade0bbfc14000d91

-   run: --tmux-args implies --tmux

-   run: add --userland-args to make userland arguments across QEMU and gem5

    Get rid of --userland-before as a consequence.

-   bring initrd and initramfs back to life

-   build-userland: create --static to make build a bit easier

-   gem5: --gem5-worktree also set --gem5-build-id

-   remove --gem5, use --emulator gem5 everywhere

    Allow passing --emulator multiple times for transparent tests selection
    just like --arch.

-   test-userland: allow selecting just a few tests

-   linux: update to v4.20

-   buildroot: update to 2018.08

    The main motivation for this was to fix the build for Ubuntu 18.10, which
    has glibc 2.28, which broke the 2018.05 build at the m4-host package with:

        #error "Please port gnulib fseeko.c to your platform!

-   getvar --type input

-   failed xen attempt, refactor timer, failed svc attempt, aarch64 use gicv3

-   build-doc: exit 1 on error, add to release testing

-   build: add --apt option to make things easier on other distros

-   build-linux: --no-modules-install
2019-01-22 00:00:00 +00:00
5b6a716a9b gem5: update to a5bc2291391b0497fdc60fdc960e07bcecebfb8f
gem5-build: use --gold-linker by default
2018-11-23 00:00:03 +00:00
2684133597 build-gem5: use arm-linux-gnueabihf- to match build -D 2018-11-17 19:42:33 +00:00
8fb9db3931 manually encode newlines on all printed commands
This way we group key value arguments: e.g.:

    make \
    -j 8 \
    all

instead of:

    make \
    -j \
    8 \
    all

and reach CLI nirvana, while also subtly breaking several commands due to
lack of testing.
2018-11-04 00:00:01 +00:00
bb1bb370a6 build-gem5: factor dtb copy with copy_dir_if_update_non_recursive
Less code, less boring + cp prints, only copy if modified.
2018-10-26 00:00:02 +00:00
3980974e91 common: factor -j --nproc to all builds 2018-10-23 00:00:02 +00:00
4b99e522dd common.run_cmd: assert result == 0 by default 2018-10-23 09:58:30 +01:00
4cd9c533b8 move all builds to components 2018-10-23 09:58:30 +01:00
2a77df690c common: create a Component class to factor out builds
Not yet finished factoring, but half way there, do for all build-
2018-10-18 00:00:00 +00:00
bc73cebff1 Build the Linux kernel independently from Buildroot
This will allow for other types of root filesystems that don't rely on Buildroot
to be added and used in the future.

Propagate --verbose on all build scripts to see full GCC commands.

build-all: allow for neat subsets

also 9p share rootfs_overlay. TODO document.
2018-10-12 09:30:33 +01:00
e8cd0caa9e gem5: add --gem5-build-dir for private out of tree builds 2018-10-09 19:42:32 +01:00
b6d00baac0 gem5: renamame --gem5-src to --gem5-source
And fix outdated README references to --gem5-worktree.
2018-10-09 19:26:46 +01:00
ca55bc2d61 gem5: replace --gem5-src with --gem5-worktree-path 2018-09-28 00:00:00 +00:00
75a555daa8 common: print cd pdw on paths
print only modified variables on PATH

use common.run_cmd everywhere to get full bash bash commands

readme: recommend private/ instead of the cryptic p/
2018-09-27 00:00:00 +00:00
74b51fc044 gem5: update to 7bfb7f3a43f382eb49853f47b140bfd6caad0fb8
The update is required to include 3c3ca64b5f0dd9eef7b1ce1c65cc6e8e9147dd38
otherwise baremetal does not on VExpress.

baremetal: create a baremetal setup with crosstool-ng

buildroot: improve directory location: move out/dl inside
out/buildroot/download, and add a new out/buildroot/build level

tagline: generalize, deliver more value than howto, since now howtos
are starting to multiply

rename all top scripts to separate words with hyphen more consistently,
e.g. run-gdb instead of rungdb

getvar: list all variables

gem5: make m5out section to focus all releated information at

Prevent m5term Text file busy when rebuilding gem5 while it is running.
2018-09-23 13:56:20 +01:00
a760cb1196 build-gme5: don't try to create worktrees if the submodule was not checked out
Leads to weird states.
2018-09-15 01:37:22 +01:00
7f81db9a46 qemu: use ccache
readme: improve build variants
2018-09-14 16:56:12 +01:00
40b5c5a023 time all builds and run 2018-09-14 15:53:08 +01:00
56738a1c70 lkmc v2-rc
Unsquashed version at v2-rc-unsquashed, but that cannot be merged as it
breaks bisects at several points. All bugs will not bisect to this
humongous change.

It all started with a conversion of the Bash scripts to Python, mainly
because I couldn't stand not being able to properly use --options for
run which has a million options.

Then since that required a full testing, I decided to do all the
refactorings that I had in mind at once, and so I did and it became
v2-rc.

This is the largest patch I have ever done! OMG a few weeks of extra time.
I'm never writing a Bash script for anything that starts getting big again.

Some of the features are:

* separate build-qemu and build-gem5 commands
* common: convert scripts to python. Add --option for everything
* rename build to build-buildroot now that we are splitting all the build
  commands, Linux kernel to follow
* move all git submodules to submodules/ and all buildroot packages to
  packages/
* refactor the out/ structure. Keep projects on toplevel, because guest
  projects separate archs and host ones don't, making a toplevel arch wrong
* do-release: rename to just release
  https://stackoverflow.com/questions/16174992/cant-get-argparse-to-read-quoted-string-with-dashes-in-it
* run: add --terminal and explain gem5 pdb
* just track the lvimrc
* store CLI kernel config fragment inside buildlroot to avoid conflicts
* gem5: document m5 initparam
* readme: make a bunch of things awesomer
* readme: fix broken refs
* parsec-benchmark: update to 75d55ac446a43c47efb1044844a108c6c330184c
  Could not fetch otherwise.
* gem5: M5_OVERRIDE_PY_SOURCE
2018-09-14 07:42:31 +01:00
b8413532a5 Build gem5 through buildroot
Oh, btw, also make it work, since the build was completely broken since
the recent -K refactoring :0)
2018-03-12 03:56:18 +00:00
2092180ac8 Update GEM5 to master to fix x86 boot via 3feeb994ae613fd6b3734c1a991285b2ecbd1946
See also: http://gem5-users.gem5.narkive.com/CQh9J6fU/fail-to-run-fs-mode-with-linux-kernel-v4-8-13-and-ubuntu-image-16-04-1

Start sketching how to tweak system parameters, number of CPUs works, caches don't.
2018-02-25 20:27:35 +00:00
4a9469d83c GEM5 aarch64 2018-02-22 18:50:27 +00:00
9e5173f324 GEM5 checkpoint
Add gem5 as buildroot package to cross compile m5.

Add gem5 as a submodule.

Split gem5 from arch on CLI with "-a arm -g" instead of "-a arm-gem5".
2018-02-21 10:19:35 +00:00
e519caa9c2 Build dhrystone, preparing to run it on gem5 2018-02-20 19:47:25 +00:00
6ddbec9c99 Automate failed gem5 x86 attempt 2017-12-29 13:34:13 +00:00
8ddefa940e gem5 2017-12-28 12:54:24 +00:00