Waldek, this patch looks good, but is it still relevant? Now that you can move the kernel's VM address separately from its physical address, do you ever want to move its physical address?
Some additional minor thoughts below. On Sat, Jun 8, 2019 at 9:27 PM Waldemar Kozaczuk <jwkozac...@gmail.com> wrote: > When one changes kernel_base in Makefile to different value > the safest approach is to do a full rebuild as it is > not clear which files depend on it. > By the way, this is the primary reason why ccache is so useful: It allows you to do "make clean; make" and the new make will run very quickly, as most compilation products will be automatically copied from the cache because the compilation command line will have remained the same. But you're right that it's even nicer for "make" to just work, without needing a manual "make clean". Maybe when cows fly, GNU Make will acquire this capability: https://savannah.gnu.org/bugs/?51495 > > > diff --git a/scripts/gen-kernel-base-header > b/scripts/gen-kernel-base-header > new file mode 100755 > index 00000000..6aadc049 > --- /dev/null > +++ b/scripts/gen-kernel-base-header > @@ -0,0 +1,29 @@ > +#!/bin/sh > + > +if [ "$#" -ne 2 ]; then > + echo "usage: $(basename $0) KERNEL_BASE OUTPUT" >&2 > + exit 1 > +fi > + > +kernel_base=$1 > +output=$2 > + > +tmp=$(mktemp) > + > +cat >$tmp <<EOL > +/* This file is generated automatically. */ > +#ifndef OSV_KERNEL_BASE_H > +#define OSV_KERNEL_BASE_H > + > +#define OSV_KERNEL_BASE $kernel_base > + > +#endif > +EOL > + > +if cmp -s $tmp $output > +then > + rm $tmp > +else > + mkdir -p $(dirname $output) > + mv $tmp $output > +fi > This and gen-version-header do basically the same thing (with different content), so can we just have one script? This will also make it easier to add yet more variables like this in the future. By the way, you can use "#pragma once" instead of the old-style "#ifndef ...." to eliminate another reason for difference between the two scripts. We've been using "#pragma once" in the Seastar project for several years, and it's great. -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/CANEVyjsh84B_jQEZtDv9ACQJUqOkrp64RJWmDf9U5PG3hovWmA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.