[igt-dev] [PATCH i-g-t 1/1] tools/generate_cb_buffer: Add script to assemble CB kernel
Abodunrin, Akeem G
akeem.g.abodunrin at intel.com
Thu Feb 20 01:06:09 UTC 2020
> > +export ASSEMBLY_SOURCE=./tools/assembly_source
> > +
> > +function get_help {
> > + echo "Usage: asm_eu_kernel.sh [options]"
> > + echo "Remember to run this as root"
>
> I can't spot why this would need root.
Since we are generating new file, and writing to it - the script definitely needs root access... otherwise commands like this " prefix_header $i915_filename "Media CB Kernel for gen7.5 devices"" fails
>
>
> > + echo " "
> > + echo "Please make sure your MESA tool is compiled, and run this script
> from igt home directory"
>
> Mesa written as "Mesa" and IGT written as "IGT". And it's "source root
> directory", not "home directory".
>
> Does the assembler require specific build options for Mesa? Note them here.
Yes, it does - but the options are hardcoded in this script - so, mentioning them in the help function is irrelevant...
> > +
> > +if [ "x$gen_device" != "x" ]; then
> > + if [ "$gen_device" == "hsw" ]; then
> > + input_asm_source="${ASSEMBLY_SOURCE}/hsw_clear_buf.asm"
> > + elif [ "$gen_device" == "ivb" ]; then
> > + input_asm_source="${ASSEMBLY_SOURCE}/ivb_clear_buf.asm"
> > + else
> > + echo "Unknown platform specified"
> > + get_help
> > + exit 1
> > + fi
> > + asm_cb_kernel
> > +fi
>
> If -g is not given at all, the script exits silently.
Good catch!
Thanks,
~Akeem
More information about the igt-dev
mailing list