# Linux Kernel Module Cheat

### 26.9. Report upstream bugs

When asking for help on upstream repositories outside of this repository, you will need to provide the commands that you are running in detail without referencing our scripts.

For example, QEMU developers will only want to see the final QEMU command that you are running.

For the configure and build, search for the `Building` and `Configuring` parts of the build log, then try to strip down all Buildroot related paths, to keep only options that seem to matter.

We make that easy by building commands as strings, and then echoing them before evaling.

So for example when you run:

    ./run --arch arm

the very first stdout output of that script is the actual QEMU command that is being run.

The command is also saved to a file for convenience:

    cat "$(./getvar --arch arm run_cmd_file)"

which you can manually modify and execute during your experiments later:

    vim "$(./getvar --arch arm run_cmd_file)"
    ./"$(./getvar --arch arm run_cmd_file)"

If you are not already on the master of the given component, you can do that neatly with Build variants.

E.g., to check if a QEMU bug is still present on `master`, you can do as explained at QEMU build variants:

    git -C "$(./getvar qemu_source_dir)" checkout master
    ./build-qemu --clean --qemu-build-id master
    ./build-qemu --qemu-build-id master
    git -C "$(./getvar qemu_source_dir)" checkout -
    ./run --qemu-build-id master

Then, you will also want to do a Bisection to pinpoint the exact commit to blame, and CC that developer.

Finally, give the images you used save upstream developers' time as shown at: Section 38.19.2, “release-zip”.

For Buildroot problems, you should wither provide the config you have:

    ./getvar buildroot_config_file

or try to reproduce with a minimal config, see: https://github.com/cirosantilli/buildroot/tree/in-tree-package-master