diff --git a/build_module.sh b/build_module.sh index 2b494e563c7fa948ef616a525f9ede5e5de4341e..acccdf2ef2f7be039bb0269205e9ef01f9bc2eb0 100755 --- a/build_module.sh +++ b/build_module.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd ./pb_utils/mod_gen/mods/ +cd /mnt/pb_utils/mod_gen/mods/ make cd - diff --git a/build_pb_submitter.sh b/build_pb_submitter.sh index 56ea2188c90f53928ee889ebe886288f42cc886c..ef878335be27e67b3dc8133ad07f63d8c2c9ebf0 100755 --- a/build_pb_submitter.sh +++ b/build_pb_submitter.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd ./pb_utils/pb_submitter +cd /mnt/pb_utils/pb_submitter ./build.sh cd - diff --git a/pb_utils/README.md b/pb_utils/README.md index eb5f75153bd9abdf1d6b5f371d2d75d900e5052d..8ed82ae34fa19ba27062a23a8a55883767f1717b 100644 --- a/pb_utils/README.md +++ b/pb_utils/README.md @@ -17,7 +17,21 @@ to build: apt update apt-get install -y fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison cd /mnt -./build +./build_kernel.sh +``` + +## chroot into debian rootfs to build test modules +run `./chroot_image.sh`, this drops you in a shell on the created debian and run + +```bash +/mnt/build_module.sh +``` + +## chroot into debian rootfs to build pb_submitter +run `./chroot_image.sh`, this drops you in a shell on the created debian and run + +```bash +/mnt/build_pb_submitter.sh ``` # run the build kernel with the created rootfs diff --git a/pb_utils/readme.md b/pb_utils/readme.md deleted file mode 100644 index 6372d259c9a6ba932609616f6f917f7080b0d57a..0000000000000000000000000000000000000000 --- a/pb_utils/readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# dependencies -- build is tested on a ubuntu -- for qemu minimum needed: `sudo apt install qemu qemu-system-x86` - -# build -## create an image file with a debian rootfs (only needed first time) - -run `./create_image.sh`, this downloads dbootstrap and installs a debian into a image file - -## chroot into debian rootfs to build the kernel -(build on your system is possible, but for example ubuntu 20.04 libs throw exceptions) - -run `./chroot_image.sh`, this drops you in a shell on the created debian - -to build: -```bash -apt update -apt-get install -y fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison -cd /mnt -./build -``` - -## chroot into debian rootfs to build test modules -run `./chroot_image.sh`, this drops you in a shell on the created debian and run -```bash -/mnt/pb_utils/mod_gen/build.sh -``` - -## chroot into debian rootfs to build pb_submitter -run `./chroot_image.sh`, this drops you in a shell on the created debian and run -```bash -/mnt/pb_utils/pb_submitter/build.sh -``` - -# run the build kernel with the created rootfs -run `./run_qemu.sh` - -# debug using gdb -run `./run_qemu.sh gdb` - -run in a seperate shell: -```bash -cd .. # to workspace root - -gdb vmlinux \ - -ex 'lx-symbols' \ - -ex 'target remote :1234' \ - -ex 'hb init_pb_rq' -``` - -look for gdb `add-auto-load-safe-path` warning and follow instruction to enable loading of kernel gdb scripts - -use hardware breakpoints instead of software breaks