Skip to content
Snippets Groups Projects
Commit 3dd9bc13 authored by fu5520tp's avatar fu5520tp
Browse files

changed pb_submitter build, added to readme

parent 6ecdbb4e
No related branches found
No related tags found
No related merge requests found
pb_submitter
test_prog
obj-m += pb_module.o
all:
make -C $(PWD)/../../ M=$(PWD) modules
clean:
make -C $(PWD)/../../ M=$(PWD) clean
#!/bin/bash #!/bin/bash
#make if [ ! -d "/mnt/pb_utils/pb_submitter" ]; then
mkdir -p mnt echo "are you running this in chroot or the build system?"
exit 1
fi
cd /mnt/pb_utils/pb_submitter
gcc -static -o pb_submitter pb_submitter.c gcc -static -o pb_submitter pb_submitter.c
gcc -static -o test_prog test_prog.c gcc -static -o test_prog test_prog.c
sudo mount -o loop ../build/qemu-image.img ./mnt cp pb_submitter test_prog example_run.sh example_plan /root
sudo cp pb_submitter test_prog example_run.sh example_plan ./mnt/root
sudo umount ./mnt echo "All done. Run '/root/example_run.sh' within ./run_qemu.sh now"
echo "All done. Run ./run_qemu.sh now"
#!/bin/sh #!/bin/sh
cd /root
./pb_submitter test_prog example_plan ./pb_submitter test_prog example_plan
...@@ -71,7 +71,8 @@ int main(int argc, char** argv) ...@@ -71,7 +71,8 @@ int main(int argc, char** argv)
return -1; return -1;
} }
for (size_t i = 0; i < plan.num_tasks; i++) { size_t i;
for (i = 0; i < plan.num_tasks; i++) {
cnt = getline(&line, &len, fp); cnt = getline(&line, &len, fp);
if (cnt < 0) { if (cnt < 0) {
......
...@@ -26,6 +26,12 @@ run `./chroot_image.sh`, this drops you in a shell on the created debian and run ...@@ -26,6 +26,12 @@ run `./chroot_image.sh`, this drops you in a shell on the created debian and run
/mnt/pb_utils/mod_gen/build.sh /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 the build kernel with the created rootfs
run `./run_qemu.sh` run `./run_qemu.sh`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment