clean user before guest build

This commit is contained in:
Ciro Santilli
2017-08-04 07:27:17 +01:00
parent 0bb3e8519a
commit c730f9df20
2 changed files with 6 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ Why this is very bad and you should be ashamed:
- segfaults can trivially lead to a kernel crash, and require a reboot
- your disk could get erased. Yes, this can also happen with `sudo` from userland. But you should not use `sudo` when developing newbie programs. And for the kernel you don't have the choice not to use `sudo`
- even more subtle problems like [not being able to rmmod](https://unix.stackexchange.com/questions/78858/cannot-remove-or-reinsert-kernel-module-after-error-while-inserting-it-without-r)
- can't control which kernel version to use. So some of the modules may simply not compile because of kernel API changes, since [the Linux kernel does not have a stable kernel module API](https://stackoverflow.com/questions/37098482/how-to-build-a-linux-kernel-module-so-that-it-is-compatible-with-all-kernel-rele/45429681#45429681).
- can't control which kernel version and build options to use. So some of the modules may simply not compile because of kernel API changes, since [the Linux kernel does not have a stable kernel module API](https://stackoverflow.com/questions/37098482/how-to-build-a-linux-kernel-module-so-that-it-is-compatible-with-all-kernel-rele/45429681#45429681).
- can't control which hardware is are using, notably the CPU architecture
- can't step debug it with GDB easily

6
run
View File

@@ -29,7 +29,11 @@ case "$arch" in
;;
esac
cd buildroot
# Otherwise compiled
cd kernel_module
./make-host.sh clean
cd ../buildroot
for p in $(find '../buildroot_patches/' -maxdepth 1 -name '*.patch' -print); do
patch -N -r - -p 1 <"$p" || :
done