Giter VIP home page Giter VIP logo

oe4t / linux-tegra-4.9 Goto Github PK

View Code? Open in Web Editor NEW
56.0 10.0 78.0 1.01 GB

NVIDIA downstream Linux kernel source Jetson platforms in single-repo form, derived from the L4T R32.x series BSP

License: Other

Makefile 0.31% C 97.97% Assembly 1.36% C++ 0.03% Shell 0.06% Perl 0.16% Awk 0.01% Python 0.06% GDB 0.01% sed 0.01% Yacc 0.01% Lex 0.01% UnrealScript 0.01% Gherkin 0.01% XS 0.01% Roff 0.01% Clojure 0.01% M4 0.01% SmPL 0.01% Raku 0.01%

linux-tegra-4.9's Introduction

        Linux kernel release 4.x <http://kernel.org/>

These are the release notes for Linux version 4.  Read them carefully,
as they tell you what this is all about, explain how to install the
kernel, and what to do if something goes wrong.

WHAT IS LINUX?

  Linux is a clone of the operating system Unix, written from scratch by
  Linus Torvalds with assistance from a loosely-knit team of hackers across
  the Net. It aims towards POSIX and Single UNIX Specification compliance.

  It has all the features you would expect in a modern fully-fledged Unix,
  including true multitasking, virtual memory, shared libraries, demand
  loading, shared copy-on-write executables, proper memory management,
  and multistack networking including IPv4 and IPv6.

  It is distributed under the GNU General Public License - see the
  accompanying COPYING file for more details.

ON WHAT HARDWARE DOES IT RUN?

  Although originally developed first for 32-bit x86-based PCs (386 or higher),
  today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
  UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
  IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
  Xtensa, Tilera TILE, AVR32, ARC and Renesas M32R architectures.

  Linux is easily portable to most general-purpose 32- or 64-bit architectures
  as long as they have a paged memory management unit (PMMU) and a port of the
  GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has
  also been ported to a number of architectures without a PMMU, although
  functionality is then obviously somewhat limited.
  Linux has also been ported to itself. You can now run the kernel as a
  userspace application - this is called UserMode Linux (UML).

DOCUMENTATION:

 - There is a lot of documentation available both in electronic form on
   the Internet and in books, both Linux-specific and pertaining to
   general UNIX questions.  I'd recommend looking into the documentation
   subdirectories on any Linux FTP site for the LDP (Linux Documentation
   Project) books.  This README is not meant to be documentation on the
   system: there are much better sources available.

 - There are various README files in the Documentation/ subdirectory:
   these typically contain kernel-specific installation notes for some
   drivers for example. See Documentation/00-INDEX for a list of what
   is contained in each file.  Please read the Changes file, as it
   contains information about the problems, which may result by upgrading
   your kernel.

 - The Documentation/DocBook/ subdirectory contains several guides for
   kernel developers and users.  These guides can be rendered in a
   number of formats:  PostScript (.ps), PDF, HTML, & man-pages, among others.
   After installation, "make psdocs", "make pdfdocs", "make htmldocs",
   or "make mandocs" will render the documentation in the requested format.

INSTALLING the kernel source:

 - If you install the full sources, put the kernel tarball in a
   directory where you have permissions (e.g. your home directory) and
   unpack it:

     xz -cd linux-4.X.tar.xz | tar xvf -

   Replace "X" with the version number of the latest kernel.

   Do NOT use the /usr/src/linux area! This area has a (usually
   incomplete) set of kernel headers that are used by the library header
   files.  They should match the library, and not get messed up by
   whatever the kernel-du-jour happens to be.

 - You can also upgrade between 4.x releases by patching.  Patches are
   distributed in the xz format.  To install by patching, get all the
   newer patch files, enter the top level directory of the kernel source
   (linux-4.X) and execute:

     xz -cd ../patch-4.x.xz | patch -p1

   Replace "x" for all versions bigger than the version "X" of your current
   source tree, _in_order_, and you should be ok.  You may want to remove
   the backup files (some-file-name~ or some-file-name.orig), and make sure
   that there are no failed patches (some-file-name# or some-file-name.rej).
   If there are, either you or I have made a mistake.

   Unlike patches for the 4.x kernels, patches for the 4.x.y kernels
   (also known as the -stable kernels) are not incremental but instead apply
   directly to the base 4.x kernel.  For example, if your base kernel is 4.0
   and you want to apply the 4.0.3 patch, you must not first apply the 4.0.1
   and 4.0.2 patches. Similarly, if you are running kernel version 4.0.2 and
   want to jump to 4.0.3, you must first reverse the 4.0.2 patch (that is,
   patch -R) _before_ applying the 4.0.3 patch. You can read more on this in
   Documentation/applying-patches.txt

   Alternatively, the script patch-kernel can be used to automate this
   process.  It determines the current kernel version and applies any
   patches found.

     linux/scripts/patch-kernel linux

   The first argument in the command above is the location of the
   kernel source.  Patches are applied from the current directory, but
   an alternative directory can be specified as the second argument.

 - Make sure you have no stale .o files and dependencies lying around:

     cd linux
     make mrproper

   You should now have the sources correctly installed.

SOFTWARE REQUIREMENTS

   Compiling and running the 4.x kernels requires up-to-date
   versions of various software packages.  Consult
   Documentation/Changes for the minimum version numbers required
   and how to get updates for these packages.  Beware that using
   excessively old versions of these packages can cause indirect
   errors that are very difficult to track down, so don't assume that
   you can just update packages when obvious problems arise during
   build or operation.

BUILD directory for the kernel:

   When compiling the kernel, all output files will per default be
   stored together with the kernel source code.
   Using the option "make O=output/dir" allows you to specify an alternate
   place for the output files (including .config).
   Example:

     kernel source code: /usr/src/linux-4.X
     build directory:    /home/name/build/kernel

   To configure and build the kernel, use:

     cd /usr/src/linux-4.X
     make O=/home/name/build/kernel menuconfig
     make O=/home/name/build/kernel
     sudo make O=/home/name/build/kernel modules_install install

   Please note: If the 'O=output/dir' option is used, then it must be
   used for all invocations of make.

CONFIGURING the kernel:

   Do not skip this step even if you are only upgrading one minor
   version.  New configuration options are added in each release, and
   odd problems will turn up if the configuration files are not set up
   as expected.  If you want to carry your existing configuration to a
   new version with minimal work, use "make oldconfig", which will
   only ask you for the answers to new questions.

 - Alternative configuration commands are:

     "make config"      Plain text interface.

     "make menuconfig"  Text based color menus, radiolists & dialogs.

     "make nconfig"     Enhanced text based color menus.

     "make xconfig"     Qt based configuration tool.

     "make gconfig"     GTK+ based configuration tool.

     "make oldconfig"   Default all questions based on the contents of
                        your existing ./.config file and asking about
                        new config symbols.

     "make silentoldconfig"
                        Like above, but avoids cluttering the screen
                        with questions already answered.
                        Additionally updates the dependencies.

     "make olddefconfig"
                        Like above, but sets new symbols to their default
                        values without prompting.

     "make defconfig"   Create a ./.config file by using the default
                        symbol values from either arch/$ARCH/defconfig
                        or arch/$ARCH/configs/${PLATFORM}_defconfig,
                        depending on the architecture.

     "make ${PLATFORM}_defconfig"
                        Create a ./.config file by using the default
                        symbol values from
                        arch/$ARCH/configs/${PLATFORM}_defconfig.
                        Use "make help" to get a list of all available
                        platforms of your architecture.

     "make allyesconfig"
                        Create a ./.config file by setting symbol
                        values to 'y' as much as possible.

     "make allmodconfig"
                        Create a ./.config file by setting symbol
                        values to 'm' as much as possible.

     "make allnoconfig" Create a ./.config file by setting symbol
                        values to 'n' as much as possible.

     "make randconfig"  Create a ./.config file by setting symbol
                        values to random values.

     "make localmodconfig" Create a config based on current config and
                           loaded modules (lsmod). Disables any module
                           option that is not needed for the loaded modules.

                           To create a localmodconfig for another machine,
                           store the lsmod of that machine into a file
                           and pass it in as a LSMOD parameter.

                   target$ lsmod > /tmp/mylsmod
                   target$ scp /tmp/mylsmod host:/tmp

                   host$ make LSMOD=/tmp/mylsmod localmodconfig

                           The above also works when cross compiling.

     "make localyesconfig" Similar to localmodconfig, except it will convert
                           all module options to built in (=y) options.

   You can find more information on using the Linux kernel config tools
   in Documentation/kbuild/kconfig.txt.

 - NOTES on "make config":

    - Having unnecessary drivers will make the kernel bigger, and can
      under some circumstances lead to problems: probing for a
      nonexistent controller card may confuse your other controllers

    - A kernel with math-emulation compiled in will still use the
      coprocessor if one is present: the math emulation will just
      never get used in that case.  The kernel will be slightly larger,
      but will work on different machines regardless of whether they
      have a math coprocessor or not.

    - The "kernel hacking" configuration details usually result in a
      bigger or slower kernel (or both), and can even make the kernel
      less stable by configuring some routines to actively try to
      break bad code to find kernel problems (kmalloc()).  Thus you
      should probably answer 'n' to the questions for "development",
      "experimental", or "debugging" features.

COMPILING the kernel:

 - Make sure you have at least gcc 3.2 available.
   For more information, refer to Documentation/Changes.

   Please note that you can still run a.out user programs with this kernel.

 - Do a "make" to create a compressed kernel image. It is also
   possible to do "make install" if you have lilo installed to suit the
   kernel makefiles, but you may want to check your particular lilo setup first.

   To do the actual install, you have to be root, but none of the normal
   build should require that. Don't take the name of root in vain.

 - If you configured any of the parts of the kernel as `modules', you
   will also have to do "make modules_install".

 - Verbose kernel compile/build output:

   Normally, the kernel build system runs in a fairly quiet mode (but not
   totally silent).  However, sometimes you or other kernel developers need
   to see compile, link, or other commands exactly as they are executed.
   For this, use "verbose" build mode.  This is done by passing
   "V=1" to the "make" command, e.g.

     make V=1 all

   To have the build system also tell the reason for the rebuild of each
   target, use "V=2".  The default is "V=0".

 - Keep a backup kernel handy in case something goes wrong.  This is
   especially true for the development releases, since each new release
   contains new code which has not been debugged.  Make sure you keep a
   backup of the modules corresponding to that kernel, as well.  If you
   are installing a new kernel with the same version number as your
   working kernel, make a backup of your modules directory before you
   do a "make modules_install".

   Alternatively, before compiling, use the kernel config option
   "LOCALVERSION" to append a unique suffix to the regular kernel version.
   LOCALVERSION can be set in the "General Setup" menu.

 - In order to boot your new kernel, you'll need to copy the kernel
   image (e.g. .../linux/arch/x86/boot/bzImage after compilation)
   to the place where your regular bootable kernel is found.

 - Booting a kernel directly from a floppy without the assistance of a
   bootloader such as LILO, is no longer supported.

   If you boot Linux from the hard drive, chances are you use LILO, which
   uses the kernel image as specified in the file /etc/lilo.conf.  The
   kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
   /boot/bzImage.  To use the new kernel, save a copy of the old image
   and copy the new image over the old one.  Then, you MUST RERUN LILO
   to update the loading map! If you don't, you won't be able to boot
   the new kernel image.

   Reinstalling LILO is usually a matter of running /sbin/lilo.
   You may wish to edit /etc/lilo.conf to specify an entry for your
   old kernel image (say, /vmlinux.old) in case the new one does not
   work.  See the LILO docs for more information.

   After reinstalling LILO, you should be all set.  Shutdown the system,
   reboot, and enjoy!

   If you ever need to change the default root device, video mode,
   ramdisk size, etc.  in the kernel image, use the 'rdev' program (or
   alternatively the LILO boot options when appropriate).  No need to
   recompile the kernel to change these parameters.

 - Reboot with the new kernel and enjoy.

IF SOMETHING GOES WRONG:

 - If you have problems that seem to be due to kernel bugs, please check
   the file MAINTAINERS to see if there is a particular person associated
   with the part of the kernel that you are having trouble with. If there
   isn't anyone listed there, then the second best thing is to mail
   them to me ([email protected]), and possibly to any other
   relevant mailing-list or to the newsgroup.

 - In all bug-reports, *please* tell what kernel you are talking about,
   how to duplicate the problem, and what your setup is (use your common
   sense).  If the problem is new, tell me so, and if the problem is
   old, please try to tell me when you first noticed it.

 - If the bug results in a message like

     unable to handle kernel paging request at address C0000010
     Oops: 0002
     EIP:   0010:XXXXXXXX
     eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
     esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
     ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
     Pid: xx, process nr: xx
     xx xx xx xx xx xx xx xx xx xx

   or similar kernel debugging information on your screen or in your
   system log, please duplicate it *exactly*.  The dump may look
   incomprehensible to you, but it does contain information that may
   help debugging the problem.  The text above the dump is also
   important: it tells something about why the kernel dumped code (in
   the above example, it's due to a bad kernel pointer). More information
   on making sense of the dump is in Documentation/oops-tracing.txt

 - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
   as is, otherwise you will have to use the "ksymoops" program to make
   sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
   This utility can be downloaded from
   ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops/ .
   Alternatively, you can do the dump lookup by hand:

 - In debugging dumps like the above, it helps enormously if you can
   look up what the EIP value means.  The hex value as such doesn't help
   me or anybody else very much: it will depend on your particular
   kernel setup.  What you should do is take the hex value from the EIP
   line (ignore the "0010:"), and look it up in the kernel namelist to
   see which kernel function contains the offending address.

   To find out the kernel function name, you'll need to find the system
   binary associated with the kernel that exhibited the symptom.  This is
   the file 'linux/vmlinux'.  To extract the namelist and match it against
   the EIP from the kernel crash, do:

     nm vmlinux | sort | less

   This will give you a list of kernel addresses sorted in ascending
   order, from which it is simple to find the function that contains the
   offending address.  Note that the address given by the kernel
   debugging messages will not necessarily match exactly with the
   function addresses (in fact, that is very unlikely), so you can't
   just 'grep' the list: the list will, however, give you the starting
   point of each kernel function, so by looking for the function that
   has a starting address lower than the one you are searching for but
   is followed by a function with a higher address you will find the one
   you want.  In fact, it may be a good idea to include a bit of
   "context" in your problem report, giving a few lines around the
   interesting one.

   If you for some reason cannot do the above (you have a pre-compiled
   kernel image or similar), telling me as much about your setup as
   possible will help.  Please read the REPORTING-BUGS document for details.

 - Alternatively, you can use gdb on a running kernel. (read-only; i.e. you
   cannot change values or set break points.) To do this, first compile the
   kernel with -g; edit arch/x86/Makefile appropriately, then do a "make
   clean". You'll also need to enable CONFIG_PROC_FS (via "make config").

   After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
   You can now use all the usual gdb commands. The command to look up the
   point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
   with the EIP value.)

   gdb'ing a non-running kernel currently fails because gdb (wrongly)
   disregards the starting offset for which the kernel is compiled.

linux-tegra-4.9's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linux-tegra-4.9's Issues

WARNING in nl80211 when connecting to wifi on Jetson Xavier NX

When connecting to the wifi network with wpa_supplicant on Jetson Xavier NX, the following warning is emitted:

[   13.364004] ------------[ cut here ]------------
[   13.364219] WARNING: CPU: 0 PID: 4434 at net/wireless/nl80211.c:14141 cfg80211_ch_switch_notify+0x138/0x158 [cfg80211]
[   13.364396] Modules linked in: rtl8822ce mttcan rtk_btusb can_dev btusb btrtl btbcm btintel cfg80211 spidev nvgpu overlay
[   13.364681] 
[   13.364717] CPU: 0 PID: 4434 Comm: RTW_CMD_THREAD Not tainted 4.9.201-l4t-r32.5+ge443483e8c9c #1
[   13.364860] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[   13.364968] task: ffffffc1efd57000 task.stack: ffffffc1d9c74000
[   13.365145] PC is at cfg80211_ch_switch_notify+0x138/0x158 [cfg80211]
[   13.365746] LR is at rtw_cfg80211_ch_switch_notify+0x94/0x98 [rtl8822ce]
[   13.365866] pc : [<ffffff8001169eb0>] lr : [<ffffff8001328fc0>] pstate: 60c00045
[   13.365991] sp : ffffffc1d9c77c30
[   13.366054] x29: ffffffc1d9c77c30 x28: 0000000000000000 
[   13.366163] x27: ffffff80012bc190 x26: ffffffc1dbabd200 
[   13.366466] x25: ffffff800bf721bc x24: 0000000000000000 
[   13.366886] x23: ffffffc1da779000 x22: ffffffc1efd7b400 
[   13.368562] x21: ffffffc1da78b800 x20: 0000000000000001 
[   13.374338] x19: ffffffc1d9c77cb8 x18: 0000000000000000 
[   13.380023] x17: 0000000000000002 x16: 0000000000000000 
[   13.385710] x15: 0000000000000030 x14: 0000000000000008 
[   13.391650] x13: 7f1201c7fffc002a x12: 0105c00363fffa03 
[   13.397338] x11: 0000000000000004 x10: 0000000000000002 
[   13.403025] x9 : 0000000000000004 x8 : ffffffc1d9c77d4a 
[   13.408801] x7 : 0000000000000000 x6 : 0000000000000001 
[   13.414312] x5 : 0000000000000040 x4 : ffffffc1da78d748 
[   13.419650] x3 : 000000000000143c x2 : 0000000000000001 
[   13.424988] x1 : 0000145a00000003 x0 : 0000000000000000 
[   13.430073] 
[   13.431727] ---[ end trace 90ada372a32d1e76 ]---
[   13.436191] Call trace:
[   13.438725] [<ffffff8001169eb0>] cfg80211_ch_switch_notify+0x138/0x158 [cfg80211]
[   13.446037] [<ffffff8001328fc0>] rtw_cfg80211_ch_switch_notify+0x94/0x98 [rtl8822ce]
[   13.453204] [<ffffff80012bc0fc>] rtw_chk_start_clnt_join+0x424/0x4b8 [rtl8822ce]
[   13.460457] [<ffffff80012bc3c8>] join_cmd_hdl+0x238/0x328 [rtl8822ce]
[   13.466310] [<ffffff800127a4dc>] rtw_cmd_thread+0x3f4/0x5f8 [rtl8822ce]
[   13.471987] [<ffffff80080d9d7c>] kthread+0xec/0xf0
[   13.476795] [<ffffff80080838a0>] ret_from_fork+0x10/0x30

This doesn't seem to cause any problems with connectivity. The kernel revision is: e443483e8c9c25d878caf33e7b97193eee22fef2 and the system is just regular yocto system based on meta-tegra.

Can't complete installation 'internal error: process exited while connecting to monitor: qemu-system-aarch64: Initialization of device arm_gic failed: KVM with user space irqchip only works when the host kernel supports KVM_CAP_ARM_USER_IRQ'

Hello.

I’ve recompiled the kernel on ubuntu 20.04,installed following this tutorial :

https://qengineering.eu/install-ubuntu-20.04-on-jetson-nano.html

of my Jetson nano because I wanted to enable kvm. I’ve found this tutorial and I’ve completed until the end :

https://github.com/lattice0/jetson_nano_kvm

and I've enabled kvm with kernel 4.9.201-tegra,but when I try to virtualize something,like freebsd using virt-manager I get the following error :

Can't complete installation 'internal error: process exited while connecting to monitor: qemu-system-aarch64: Initialization of device arm_gic failed: KVM with user space irqchip only works when the host kernel supports KVM_CAP_ARM_USER_IRQ'

how can I fix it ? Your source code will fix this error ?

Wifi hiccups with oe4t-patches-l4t-r32.7.4

Hello,

I am using the branch oe4t-patches-l4t-r32.7.3 and the cypress 43455 wifi driver and it works great. But when updating to oe4t-patches-l4t-r32.7.4 then we get hiccups in the wifi connection. Like some short hangs, it's not fluent anymore. It really is a huge difference. Is there any commit that could be the culprit for this? Also the latest version oe4t-patches-l4t-r32.7.5 has the issue.

Thanks for any pointers,
Best regards

How to treat warnings not as errors....

Hello bro.

I'm trying to recompile the kernel 4.9 for my Jetson nano using your latest patches,but I'm not able to compile the code. Can you give me some help ? thanks.

# git clone https://github.com/OE4T/linux-tegra-4.9.git

# cd linux-tegra-4.9

# git checkout oe4t-patches-l4t-r32.7.4

# cp /proc/config.gz .

# gunzip config.gz

# mv config .config

# CFLAGS=-Wno-error make -j4

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CC      kernel/rcu/sync.o
  CC      mm/nobootmem.o
In file included from ./include/trace/define_trace.h:95:0,
                 from ./include/trace/events/sched.h:1113,
                 from kernel/sched/core.c:96:
./include/trace/events/sched.h: In function ‘trace_raw_output_sched_load_avg_task’:
./include/trace/events/sched.h:666:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘long unsigned int’ [-Wformat=]
  TP_printk("comm=%s pid=%d cpu=%d load_avg=%lu util_avg=%lu util_fast_avg=%lu"
            ^
./include/trace/events/sched.h:676:5:
     (unsigned long)__entry->util_avg_walt,
     ~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:327:22: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  trace_seq_printf(s, print);     \
                      ^~~~~
./include/trace/trace_events.h:65:9: note: in expansion of macro ‘PARAMS’
         PARAMS(print));         \
         ^~~~~~
./include/trace/events/sched.h:626:1: note: in expansion of macro ‘TRACE_EVENT’
 TRACE_EVENT(sched_load_avg_task,
 ^~~~~~~~~~~
./include/trace/events/sched.h:666:2: note: in expansion of macro ‘TP_printk’
  TP_printk("comm=%s pid=%d cpu=%d load_avg=%lu util_avg=%lu util_fast_avg=%lu"
  ^~~~~~~~~
In file included from ./include/trace/trace_events.h:361:0,
                 from ./include/trace/define_trace.h:95,
                 from ./include/trace/events/sched.h:1113,
                 from kernel/sched/core.c:96:
./include/trace/events/sched.h:667:38: note: format string is defined here
    "util_avg_pelt=%lu util_avg_walt=%u load_sum=%llu"
                                     ~^
                                     %lu
In file included from ./include/trace/define_trace.h:95:0,
                 from ./include/trace/events/sched.h:1113,
                 from kernel/sched/core.c:96:
./include/trace/events/sched.h: In function ‘trace_raw_output_sched_load_avg_cpu’:
./include/trace/events/sched.h:715:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘long unsigned int’ [-Wformat=]
  TP_printk("cpu=%d load_avg=%lu util_avg=%lu util_fast_avg=%lu "
            ^
./include/trace/events/sched.h:719:29:
     __entry->util_avg_pelt, (unsigned long)__entry->util_avg_walt)
                             ~~~~~~~~~~~~~~~~~~~~~~~~~
./include/trace/trace_events.h:327:22: note: in definition of macro ‘DECLARE_EVENT_CLASS’
  trace_seq_printf(s, print);     \
                      ^~~~~
./include/trace/trace_events.h:65:9: note: in expansion of macro ‘PARAMS’
         PARAMS(print));         \
         ^~~~~~
./include/trace/events/sched.h:685:1: note: in expansion of macro ‘TRACE_EVENT’
 TRACE_EVENT(sched_load_avg_cpu,
 ^~~~~~~~~~~
./include/trace/events/sched.h:715:2: note: in expansion of macro ‘TP_printk’
  TP_printk("cpu=%d load_avg=%lu util_avg=%lu util_fast_avg=%lu "
  ^~~~~~~~~
In file included from ./include/trace/trace_events.h:361:0,
                 from ./include/trace/define_trace.h:95,
                 from ./include/trace/events/sched.h:1113,
                 from kernel/sched/core.c:96:
./include/trace/events/sched.h:716:40: note: format string is defined here
      "util_avg_pelt=%lu util_avg_walt=%u",
                                       ~^
                                       %lu
  CC      kernel/rcu/srcu.o
  CC      fs/fs_pin.o
    CC [M]  sound/drivers/mpu401/mpu401_uart.o
  CC      sound/core/sound.o
sound/core/sound.c: In function ‘snd_request_other’:
sound/core/sound.c:89:2: warning: format not a string literal and no format arguments [-Wformat-security]
  request_module(str);
  ^~~~~~~~~~~~~~
  CC      drivers/base/firmware.o
  CC      sound/core/init.o
  LD [M]  sound/drivers/mpu401/snd-mpu401-uart.o
  LD      sound/drivers/opl3/built-in.o
  CC [M]  sound/drivers/opl3/opl3_lib.o
  CC [M]  fs/fscache/proc.o
  CC      drivers/base/init.o
  LD [M]  fs/fscache/fscache.o
  LD      fs/fuse/built-in.o
  CC [M]  fs/fuse/dev.o
  CC      drivers/base/map.o
  CC      sound/core/memory.o
  CC [M]  sound/drivers/opl3/opl3_synth.o
  CC      drivers/base/devres.o
  CC      sound/core/control.o
  CC [M]  sound/drivers/opl3/opl3_seq.o
sound/drivers/opl3/opl3_seq.c: In function ‘snd_opl3_seq_probe’:
sound/drivers/opl3/opl3_seq.c:240:11: warning: format not a string literal and no format arguments [-Wformat-security]
           name);
           ^~~~
  CC      drivers/base/attribute_container.o
  CC [M]  sound/drivers/opl3/opl3_midi.o
  CC [M]  fs/fuse/dir.o
  CC      drivers/base/transport_class.o
  CC [M]  sound/drivers/opl3/opl3_drums.o
  CC      sound/core/misc.o
  LD [M]  sound/drivers/opl3/snd-opl3-lib.o
  LD [M]  sound/drivers/opl3/snd-opl3-synth.o
  LD      sound/drivers/opl4/built-in.o
  LD      sound/drivers/pcsp/built-in.o
  LD      sound/drivers/vx/built-in.o
  CC [M]  sound/drivers/aloop.o
  CC      drivers/base/topology.o
  CC [M]  fs/fuse/file.o
  CC      drivers/base/container.o
  CC      sound/core/device.o
  CC      drivers/base/property.o
  LD      sound/drivers/built-in.o
  LD [M]  sound/drivers/snd-aloop.o
  LD      sound/firewire/built-in.o
  CC      sound/hda/hda_bus_type.o
  CC      sound/core/info.o
  CC      sound/hda/hdac_bus.o
  CC      sound/core/vmaster.o
  CC      drivers/base/cacheinfo.o
  CC [M]  fs/fuse/inode.o
  CC      sound/hda/hdac_device.o
  CC      sound/core/ctljack.o
  CC      drivers/base/devtmpfs.o
  CC      sound/core/jack.o
  CC      sound/hda/hdac_sysfs.o
  CC      drivers/base/dma-contiguous.o
  CC [M]  fs/fuse/control.o
  CC      sound/core/hwdep.o
  CC      sound/hda/hdac_regmap.o
  CC      drivers/base/power/sysfs.o
drivers/base/power/sysfs.c: In function ‘rtpm_status_show’:
drivers/base/power/sysfs.c:184:2: error: format not a string literal and no format arguments [-Werror=format-security]
  return sprintf(buf, p);
  ^~~~~~
  CC [M]  fs/fuse/xattr.o
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:338: drivers/base/power/sysfs.o] Errore 1
make[2]: *** [scripts/Makefile.build:652: drivers/base/power] Errore 2
make[1]: *** [scripts/Makefile.build:652: drivers/base] Errore 2
make: *** [Makefile:1122: drivers] Errore 2
make: *** Attesa per i processi non terminati....
  CC [M]  fs/fuse/acl.o
  CC      sound/hda/hdac_controller.o
  CC      sound/core/timer.o
  CC [M]  fs/fuse/cuse.o
  LD [M]  fs/fuse/fuse.o
    CC [M]  sound/pci/emu10k1/emu10k1x.o
In file included from sound/core/seq/seq_info.h:24:0,
                 from sound/core/seq/seq_clientmgr.c:36:
sound/core/seq/seq_clientmgr.c: In function ‘snd_seq_info_dump_subscribers’:
./include/sound/info.h:123:21: warning: format not a string literal and no format arguments [-Wformat-security]
  seq_printf((struct seq_file *)(buf)->buffer, fmt, ##args)
                     ^
sound/core/seq/seq_clientmgr.c:2411:2: note: in expansion of macro ‘snd_iprintf’
  snd_iprintf(buffer, msg);
  ^~~~~~~~~~~
  LD      fs/jbd2/jbd2.o
  LD      fs/jbd2/built-in.o
    LD [M]  fs/overlayfs/overlay.o
  CC      fs/proc/task_mmu.o
sound/usb/mixer_quirks.c: In function ‘snd_create_std_mono_ctl_offset’:
sound/usb/mixer_quirks.c:103:2: warning: format not a string literal and no format arguments [-Wformat-security]
  snprintf(kctl->id.name, sizeof(kctl->id.name), name);
  ^~~~~~~~
  CC      fs/ntfs/file.o
  CC      sound/usb/mixer_scarlett.o
   LD      fs/pstore/built-in.o
  CC      fs/quota/quota_v2.o
fs/quota/dquot.c: In function ‘find_quota_format’:
fs/quota/dquot.c:202:7: warning: format not a string literal and no format arguments [-Wformat-security]
       request_module(module_names[qm].qm_mod_name))
       ^~~~~~~~~~~~~~
  CC      fs/quota/quota_tree.o
  LD      fs/proc/proc.o
   LD      fs/built-in.o

# make -j4 Image

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  CC      drivers/base/power/sysfs.o
  CC      net/socket.o
drivers/base/power/sysfs.c: In function ‘rtpm_status_show’:
drivers/base/power/sysfs.c:184:2: error: format not a string literal and no format arguments [-Werror=format-security]
  return sprintf(buf, p);
  ^~~~~~
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:338: drivers/base/power/sysfs.o] Errore 1
make[2]: *** [scripts/Makefile.build:652: drivers/base/power] Errore 2
make[1]: *** [scripts/Makefile.build:652: drivers/base] Errore 2
make: *** [Makefile:1122: drivers] Errore 2
make: *** Attesa per i processi non terminati....
  CC      net/802/p8022.o
  CC      net/802/psnap.o

root@jetson:/home/aresuser/Desktop/antmicro/linux-tegra-4.9# find . -name Image
nothing

spi-tegra114.c has a big delay after transfer

I am not sure if here is the right place to ask this. If I am in a wrong place, please advise me.

I have a Jetson Xavier NX that runs Yocto linux with the branch of oe4t-patches-l4t-r32.5 of linux-tegra-4.9.
And I have applied rt patches.

SPI master runs in the NX and needs to read multiple 2-byte registers one-by-one. To reduce whole transmission time, I hope to use ioctl(fd, SPI_IOC_MESSAGE(len), buf) call.
My problem is there is a big delay after transfer the data. It is about 100us for each 2 bytes data tranmission.
image
In the above, yellow is SCK and cyan is CS. First two transmissions use SPI_IOC_MESSAGE(1) in ioctl call and 3rd to 5th transmission uses SPI_IOC_MESSAGE(3) where each message is 2 bytes. The delay is too big.

I found this part of the code of spi-tegra114.c is one that takes long time:

		if (tspi->polling_mode)
			timeleft = tegra_spi_status_poll(tspi);
		else
			timeleft = wait_for_completion_timeout(
					&tspi->xfer_completion,
					SPI_DMA_TIMEOUT);

I tried either way and they are the same. Why does this take a long time of more than 50 us?


I measured the time by ktime_get_ns(). This is the sample:
image

[81056.799779] spi-tegra114 3210000.spi:         1686 41856
[81056.799783] spi-tegra114 3210000.spi:         1687 46176
[81056.799798] spi-tegra114 3210000.spi:         1689 60576
[81056.799853] spi-tegra114 3210000.spi:         1691 115648

The /proc/sys/kernel/sched_rt_runtime_us does not work ?

@gebi @awilliam @augustl @mpalmer

[environment]
Linux EAXVA05_B 4.9.253-tegra #27 SMP PREEMPT Wed May 18 17:58:14 CST 2022 aarch64 aarch64 aarch64 GNU/Linux

[question description]
question 1:
As we know, the default value of /proc/sys/kernel/sched_rt_period_us is 1000000, /proc/sys/kernel/sched_rt_runtime_us is 950000.
When I run a thread with sched policy SCHED_FIFO and another thread with the default sched policy,the two threads are bond to the same cpu core. We cal the first thread thread1 and call the second thread thread2 below.

We should see the thread1 use cpu 95% and thread2 5%, but I see the thread1 cpu 100%, thread2 0% ? Whats the reason, how to solve it ?

question 2:
When I set /proc/sys/kernel/sched_rt_runtime_us smaller than 950000, it failed with "Invalid argument". How to solve it ?

question 1 test code:

#define _GNU_SOURCE
#include <errno.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/unistd.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>

#define gettid() syscall(__NR_gettid)

#define SCHED_DEADLINE 6

/* XXX use the proper syscall numbers */
#ifdef __x86_64__
#define __NR_sched_setattr 314
#define __NR_sched_getattr 315
#endif

#ifdef __i386__
#define __NR_sched_setattr 351
#define __NR_sched_getattr 352
#endif

#ifdef __arm__
#define __NR_sched_setattr 380
#define __NR_sched_getattr 381
#endif

static volatile int done;

struct sched_attr {
  __u32 size;

  __u32 sched_policy;
  __u64 sched_flags;

  /* SCHED_NORMAL, SCHED_BATCH */
  __s32 sched_nice;

  /* SCHED_FIFO, SCHED_RR */
  __u32 sched_priority;

  /* SCHED_DEADLINE (nsec) */
  __u64 sched_runtime;
  __u64 sched_deadline;
  __u64 sched_period;
};

int sched_setattr(pid_t pid, const struct sched_attr *attr, unsigned int flags) {
  return syscall(__NR_sched_setattr, pid, attr, flags);
}

int sched_getattr(pid_t pid, struct sched_attr *attr, unsigned int size, unsigned int flags) {
  return syscall(__NR_sched_getattr, pid, attr, size, flags);
}

int32_t SetAffinity() {
  cpu_set_t cpuset;
  CPU_ZERO(&cpuset);
  CPU_SET(1, &cpuset);

  if (pthread_setaffinity_np(pthread_self(), sizeof(cpuset), &cpuset) != 0) {
    printf("set affinity error, %s\n", strerror(errno));
    return -1;
  }
  return 0;
}

void *run_fifo(void *data) {
  struct sched_attr attr;
  int x = 0;
  int ret;
  unsigned int flags = 0;

  SetAffinity();

  attr.size = sizeof(attr);
  attr.sched_flags = 0;
  attr.sched_nice = 0;
  attr.sched_priority = 0;

  attr.sched_policy = SCHED_FIFO;
  attr.sched_priority = 90;

  ret = sched_setattr(gettid(), &attr, flags);
  if (ret < 0) {
    done = 0;
    perror("sched_setattr");
    exit(-1);
  }

  while (!done) {
    x++;
  }

  return NULL;
}

void *run_other(void *data) {
  int x = 0;
  SetAffinity();
  while (!done) {
    x++;
  }
  return NULL;
}

int main(int argc, char **argv) {
  pthread_t thread;

  printf("main thread [%ld]\n", gettid());

  pthread_create(&thread, NULL, run_fifo, NULL);

  pthread_t thread1;
  pthread_create(&thread1, NULL, run_other, NULL);
  sleep(1000);

  done = 1;
  pthread_join(thread, NULL);

  printf("main dies [%ld]\n", gettid());
  return 0;
}

Thanks very much for your help.

drivers/base/dma-coherent.c:973:12: error: ?shrink_thread? defined but not used [-Werror=unused-function]

I'm trying to compile your source code because I want to enable kvm,but :

root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# git clone https://github.com/OE4T/linux-tegra-4.9.git
root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# cd linux-tegra-4.9/
root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# git checkout oe4t-patches-l4t-r32.6
root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# cp /proc/config.gz .
root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# gunzip config.gz
root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# mv config .config
root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# make menuconfig (enable KVM)
root@marietto:/home/marietto/Desktop/jetson_nano_kvm/linux-tegra-4.9# make -j4

  HOSTCC  scripts/kconfig/conf.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  WRAP    arch/arm64/include/generated/asm/bugs.h
  WRAP    arch/arm64/include/generated/asm/clkdev.h
  WRAP    arch/arm64/include/generated/asm/cputime.h
  CHK     include/generated/uapi/linux/version.h
  WRAP    arch/arm64/include/generated/asm/delay.h
  WRAP    arch/arm64/include/generated/asm/div64.h
  UPD     include/generated/uapi/linux/version.h
  WRAP    arch/arm64/include/generated/asm/dma.h
  WRAP    arch/arm64/include/generated/asm/dma-contiguous.h
  WRAP    arch/arm64/include/generated/asm/early_ioremap.h
  WRAP    arch/arm64/include/generated/asm/emergency-restart.h
  WRAP    arch/arm64/include/generated/asm/errno.h
  WRAP    arch/arm64/include/generated/asm/hw_irq.h
  WRAP    arch/arm64/include/generated/asm/ioctl.h
  WRAP    arch/arm64/include/generated/asm/ioctls.h
  WRAP    arch/arm64/include/generated/asm/ipcbuf.h
  WRAP    arch/arm64/include/generated/asm/irq_regs.h
  WRAP    arch/arm64/include/generated/asm/kdebug.h
  WRAP    arch/arm64/include/generated/asm/kmap_types.h
  WRAP    arch/arm64/include/generated/asm/kvm_para.h
  WRAP    arch/arm64/include/generated/asm/local.h
  WRAP    arch/arm64/include/generated/asm/local64.h
  HOSTCC  scripts/basic/fixdep
  WRAP    arch/arm64/include/generated/asm/mcs_spinlock.h
  WRAP    arch/arm64/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm64/include/generated/asm/mman.h
  WRAP    arch/arm64/include/generated/asm/msgbuf.h
  WRAP    arch/arm64/include/generated/asm/msi.h
  WRAP    arch/arm64/include/generated/asm/mutex.h
  WRAP    arch/arm64/include/generated/asm/poll.h
  WRAP    arch/arm64/include/generated/asm/preempt.h
  WRAP    arch/arm64/include/generated/asm/resource.h
  WRAP    arch/arm64/include/generated/asm/rwsem.h
  WRAP    arch/arm64/include/generated/asm/segment.h
  WRAP    arch/arm64/include/generated/asm/sembuf.h
  WRAP    arch/arm64/include/generated/asm/serial.h
  WRAP    arch/arm64/include/generated/asm/shmbuf.h
  WRAP    arch/arm64/include/generated/asm/simd.h
  WRAP    arch/arm64/include/generated/asm/sizes.h
  WRAP    arch/arm64/include/generated/asm/socket.h
  WRAP    arch/arm64/include/generated/asm/sockios.h
  WRAP    arch/arm64/include/generated/asm/swab.h
  WRAP    arch/arm64/include/generated/asm/switch_to.h
  WRAP    arch/arm64/include/generated/asm/termbits.h
  WRAP    arch/arm64/include/generated/asm/termios.h
  WRAP    arch/arm64/include/generated/asm/trace_clock.h
  WRAP    arch/arm64/include/generated/asm/types.h
  WRAP    arch/arm64/include/generated/asm/unaligned.h
  WRAP    arch/arm64/include/generated/asm/user.h
  WRAP    arch/arm64/include/generated/asm/vga.h
  WRAP    arch/arm64/include/generated/asm/xor.h
  WRAP    arch/arm64/include/generated/uapi/asm/kvm_para.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/dtc/dtc.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/dtc/flattree.o
  MKELF   scripts/mod/elfconfig.h
  CHK     scripts/mod/devicetable-offsets.h
  UPD     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTLD  scripts/mod/modpost
  SHIPPED scripts/dtc/dtc-lexer.lex.c
  SHIPPED scripts/dtc/dtc-parser.tab.h
  SHIPPED scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
make[1]: Nothing to be done for 'dtbs'.
  UPD     include/config/kernel.release
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
  UPD     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  LDS     arch/arm64/kernel/vdso/vdso.lds
  VDSOA   arch/arm64/kernel/vdso/gettimeofday.o
  VDSOA   arch/arm64/kernel/vdso/note.o
  VDSOA   arch/arm64/kernel/vdso/sigreturn.o
  VDSOL   arch/arm64/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  LD      usr/built-in.o
  CC      init/main.o
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      arch/arm64/mm/dma-mapping.o
  CC      init/do_mounts.o
  CC      arch/arm64/kernel/debug-monitors.o
  AS      arch/arm64/kernel/entry.o
  CC      arch/arm64/kernel/irq.o
  CC      arch/arm64/kernel/fpsimd.o
  AS      arch/arm64/kernel/entry-fpsimd.o
  CC      init/noinitramfs.o
  CC      arch/arm64/kernel/process.o
  CC      arch/arm64/mm/extable.o
  CC      arch/arm64/mm/fault.o
  CC      init/calibrate.o
  CC      init/init_task.o
  CC      arch/arm64/kernel/ptrace.o
  CC      arch/arm64/kernel/setup.o
  CC      arch/arm64/mm/init.o
  CC      init/version.o
  LD      init/mounts.o
  CC      arch/arm64/kernel/signal.o
  LD      init/built-in.o
  CC      arch/arm64/kernel/sys.o
  CC      arch/arm64/kvm/../../../virt/kvm/kvm_main.o
  AS      arch/arm64/mm/cache.o
  CC      arch/arm64/mm/copypage.o
  CC      arch/arm64/mm/flush.o
  CC      arch/arm64/mm/ioremap.o
  CC      arch/arm64/kernel/stacktrace.o
  CC      arch/arm64/kernel/time.o
  CC      arch/arm64/mm/mmap.o
  CC      arch/arm64/mm/pgd.o
  CC      arch/arm64/kernel/traps.o
  CC      arch/arm64/kernel/io.o
  CC      arch/arm64/mm/mmu.o
  CC      arch/arm64/kernel/vdso.o
  AS      arch/arm64/kernel/hyp-stub.o
  CC      arch/arm64/kernel/psci.o
  CC      arch/arm64/kernel/cpu_ops.o
  CC      arch/arm64/kernel/insn.o
  CC      arch/arm64/kvm/../../../virt/kvm/coalesced_mmio.o
  CC      arch/arm64/mm/context.o
  CC      arch/arm64/kvm/../../../virt/kvm/eventfd.o
  AS      arch/arm64/mm/proc.o
  CC      arch/arm64/kvm/../../../virt/kvm/vfio.o
  CC      arch/arm64/mm/pageattr.o
  CC      arch/arm64/kernel/return_address.o
  LD      arch/arm64/mm/built-in.o
  CC      arch/arm64/kernel/cpuinfo.o
  CC      kernel/fork.o
  CC      arch/arm64/kernel/cpu_errata.o
  CC      arch/arm64/kvm/../../../arch/arm/kvm/arm.o
  CC      arch/arm64/kernel/cpufeature.o
  CC      arch/arm64/kernel/alternative.o
  CC      arch/arm64/kernel/cacheinfo.o
  CC      arch/arm64/kernel/smp.o
  CC      arch/arm64/kvm/../../../arch/arm/kvm/mmu.o
  CC      kernel/exec_domain.o
  CC      arch/arm64/kernel/smp_spin_table.o
  CC      arch/arm64/kernel/topology.o
  CC      kernel/panic.o
  AS      arch/arm64/kernel/smccc-call.o
  AS      arch/arm64/kernel/sleep.o
  LD      certs/built-in.o
  CC      mm/filemap.o
  CC      arch/arm64/kernel/suspend.o
  CC      kernel/cpu.o
  CC      arch/arm64/kvm/../../../arch/arm/kvm/mmio.o
  CC      arch/arm64/kernel/efi.o
  CC      arch/arm64/kvm/../../../arch/arm/kvm/psci.o
  AS      arch/arm64/kernel/efi-entry.o
  CC      arch/arm64/kernel/ssbd.o
  AS      arch/arm64/kernel/bpi.o
  CC      kernel/exit.o
  LD      arch/arm64/kernel/probes/built-in.o
  CC      arch/arm64/kvm/../../../arch/arm/kvm/perf.o
  OBJCOPY arch/arm64/kernel/vdso/vdso.so
  AS      arch/arm64/kernel/vdso/vdso.o
  LD      arch/arm64/kernel/vdso/built-in.o
  AS      arch/arm64/kernel/head.o
  LDS     arch/arm64/kernel/vmlinux.lds
  OBJCOPY arch/arm64/kernel/efi-entry.stub.o
  LD      arch/arm64/kernel/built-in.o
  CC      mm/mempool.o
  CC      arch/arm64/kvm/inject_fault.o
  CC      fs/open.o
  CC      arch/arm64/kvm/regmap.o
  CC      mm/oom_kill.o
  AS      arch/arm64/kvm/hyp.o
  CC      kernel/softirq.o
  AS      arch/arm64/kvm/hyp-init.o
  CC      arch/arm64/kvm/handle_exit.o
  CC      fs/read_write.o
  CC      mm/maccess.o
  CC      arch/arm64/kvm/guest.o
  CC      kernel/resource.o
  CC      mm/page_alloc.o
  CC      arch/arm64/kvm/debug.o
  CC      fs/file_table.o
  CC      kernel/sysctl.o
  CC      arch/arm64/kvm/reset.o
  CC      fs/super.o
  CC      arch/arm64/kvm/sys_regs.o
  CC      kernel/sysctl_binary.o
  CC      fs/char_dev.o
  CC      mm/page-writeback.o
  CC      arch/arm64/kvm/sys_regs_generic_v8.o
  CC      kernel/capability.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/aarch32.o
  CC      fs/stat.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic.o
  CC      kernel/ptrace.o
  CC      fs/exec.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-init.o
  CC      mm/readahead.o
  CC      kernel/user.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-irqfd.o
  CC      kernel/signal.o
  CC      fs/pipe.o
  CC      mm/swap.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-v2.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-v3.o
  CC      fs/namei.o
  CC      mm/truncate.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-mmio.o
  CC      mm/vmscan.o
  CC      kernel/sys.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v2.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.o
  CC      kernel/kmod.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-kvm-device.o
  CC      mm/shmem.o
  CC      kernel/workqueue.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/vgic/vgic-its.o
  CC      fs/fcntl.o
  CC      fs/ioctl.o
  CC      arch/arm64/kvm/../../../virt/kvm/irqchip.o
  CC      fs/readdir.o
  CC      mm/util.o
  CC      arch/arm64/kvm/../../../virt/kvm/arm/arch_timer.o
  CC      fs/select.o
  CC      mm/mmzone.o
  CC      arch/arm64/kvm/hyp/../../../../virt/kvm/arm/hyp/vgic-v2-sr.o
  CC      mm/vmstat.o
  CC      kernel/pid.o
  CC      arch/arm64/kvm/hyp/../../../../virt/kvm/arm/hyp/vgic-v3-sr.o
  CC      fs/dcache.o
  CC      kernel/task_work.o
  CC      arch/arm64/kvm/hyp/../../../../virt/kvm/arm/hyp/timer-sr.o
  CC      mm/backing-dev.o
  CC      kernel/extable.o
  CC      arch/arm64/kvm/hyp/sysreg-sr.o
  CC      kernel/params.o
  CC      mm/mm_init.o
  CC      arch/arm64/kvm/hyp/debug-sr.o
  CC      mm/mmu_context.o
  AS      arch/arm64/kvm/hyp/entry.o
  CC      kernel/kthread.o
  CC      arch/arm64/kvm/hyp/switch.o
  CC      mm/percpu.o
  CC      fs/inode.o
  AS      arch/arm64/kvm/hyp/fpsimd.o
  CC      arch/arm64/kvm/hyp/tlb.o
  CC      kernel/sys_ni.o
  CC      kernel/nsproxy.o
  AS      arch/arm64/kvm/hyp/hyp-entry.o
  CC      arch/arm64/kvm/hyp/s2-setup.o
  CC      mm/slab_common.o
  CC      fs/attr.o
  LD      arch/arm64/kvm/hyp/built-in.o
  LD      arch/arm64/kvm/kvm.o
  LD      arch/arm64/kvm/built-in.o
  CC      kernel/notifier.o
  CC      kernel/ksysfs.o
  LD      ipc/built-in.o
  CC      kernel/cred.o
  CC      fs/bad_inode.o
  CC      mm/compaction.o
  CC      mm/vmacache.o
  CC      fs/file.o
  CC      kernel/reboot.o
  CC      mm/interval_tree.o
  CC      mm/list_lru.o
  CC      kernel/async.o
  CC      mm/workingset.o
  CC      kernel/range.o
  CC      fs/filesystems.o
  CC      fs/namespace.o
  CC      kernel/smpboot.o
  CC      mm/debug.o
  CC      kernel/ucount.o
  CC      mm/gup.o
  CC      kernel/groups.o
  CC      mm/highmem.o
  CC      kernel/irq/irqdesc.o
  CC      kernel/irq/handle.o
  CC      kernel/irq/manage.o
  CC      mm/memory.o
  LD      kernel/livepatch/built-in.o
  CC      mm/mincore.o
  CC      fs/seq_file.o
  CC      kernel/locking/mutex.o
  CC      kernel/locking/semaphore.o
  CC      fs/xattr.o
  CC      kernel/irq/spurious.o
  CC      mm/mlock.o
  CC      kernel/irq/resend.o
  CC      kernel/locking/rwsem.o
  CC      fs/libfs.o
  CC      kernel/irq/chip.o
  CC      kernel/irq/dummychip.o
  CC      mm/mmap.o
  CC      kernel/locking/percpu-rwsem.o
  CC      fs/fs-writeback.o
  CC      kernel/locking/spinlock.o
  CC      kernel/irq/devres.o
  CC      fs/pnode.o
  CC      mm/mprotect.o
  CC      kernel/locking/osq_lock.o
  CC      kernel/irq/autoprobe.o
  CC      fs/splice.o
  CC      kernel/locking/rtmutex.o
  CC      mm/mremap.o
  CC      kernel/irq/irqdomain.o
  CC      kernel/locking/rwsem-xadd.o
  CC      mm/msync.o
  CC      kernel/irq/proc.o
  LD      kernel/locking/built-in.o
  CC      mm/rmap.o
  CC      fs/sync.o
  CC      mm/vmalloc.o
  CC      kernel/irq/cpuhotplug.o
  CC      fs/utimes.o
  CC      kernel/irq/pm.o
  CC      mm/pagewalk.o
  CC      fs/stack.o
  CC      kernel/irq/affinity.o
  CC      fs/fs_struct.o
  CC      fs/statfs.o
  LD      kernel/irq/built-in.o
  CC      fs/fs_pin.o
  CC      kernel/power/qos.o
  CC      mm/pgtable-generic.o
  CC      kernel/power/main.o
  CC      fs/nsfs.o
  CC      mm/process_vm_access.o
  CC      fs/buffer.o
  CC      kernel/power/console.o
  CC      fs/block_dev.o
  CC      mm/init-mm.o
  CC      kernel/power/process.o
  CC      mm/nobootmem.o
  CC      mm/fadvise.o
  CC      kernel/power/suspend.o
  CC      fs/direct-io.o
  CC      mm/madvise.o
  CC      kernel/power/wakeup_reason.o
  CC      fs/mpage.o
  LD      kernel/power/built-in.o
  CC      kernel/printk/printk.o
  CC      mm/memblock.o
  CC      kernel/printk/printk_safe.o
  CC      fs/proc_namespace.o
  CC      mm/page_io.o
  CC      fs/efivarfs/inode.o
  CC      fs/devpts/inode.o
  LD      kernel/printk/built-in.o
  CC      kernel/rcu/update.o
  CC      fs/efivarfs/file.o
  CC      mm/swap_state.o
  LD      fs/devpts/devpts.o
  LD      fs/devpts/built-in.o
  LD      fs/exofs/built-in.o
  CC      mm/swapfile.o
  CC      kernel/rcu/sync.o
  CC      fs/efivarfs/super.o
  CC      kernel/rcu/srcu.o
  CC      kernel/rcu/tree.o
  LD      fs/efivarfs/efivarfs.o
  LD      fs/efivarfs/built-in.o
  CC      fs/exportfs/expfs.o
  CC      fs/kernfs/mount.o
  LD      fs/exportfs/exportfs.o
  LD      fs/exportfs/built-in.o
  CC      fs/kernfs/inode.o
  CC      fs/kernfs/dir.o
  CC      fs/kernfs/file.o
  CC      mm/dmapool.o
  CC      fs/kernfs/symlink.o
  CC      mm/sparse.o
  CC      mm/sparse-vmemmap.o
  LD      fs/kernfs/built-in.o
  CC      fs/nls/nls_base.o
  LD      kernel/rcu/built-in.o
  CC      kernel/sched/core.o
  CC      kernel/sched/loadavg.o
  CC      mm/mmu_notifier.o
  LD      fs/nls/built-in.o
  CC      fs/notify/fsnotify.o
  CC      kernel/sched/clock.o
  CC      mm/slub.o
  CC      mm/migrate.o
  CC      fs/notify/notification.o
  CC      fs/notify/group.o
  CC      fs/notify/inode_mark.o
  CC      mm/early_ioremap.o
  CC      fs/notify/mark.o
  CC      fs/notify/vfsmount_mark.o
  CC      fs/notify/fdinfo.o
  CC      fs/notify/dnotify/dnotify.o
  LD      fs/notify/fanotify/built-in.o
  CC      fs/notify/inotify/inotify_fsnotify.o
  LD      fs/notify/dnotify/built-in.o
  CC      fs/notify/inotify/inotify_user.o
  LD      mm/built-in.o
  CC      security/commoncap.o
  CC      kernel/sched/cputime.o
  CC      kernel/sched/idle_task.o
  CC      kernel/sched/fair.o
  LD      fs/notify/inotify/built-in.o
  CC      kernel/sched/rt.o
  LD      fs/notify/built-in.o
  CC      fs/proc/task_mmu.o
  CC      security/min_addr.o
  LD      security/built-in.o
  LD      crypto/built-in.o
  CC      fs/proc/inode.o
  CC      fs/proc/root.o
  CC      kernel/sched/deadline.o
  CC      fs/proc/base.o
  CC      fs/proc/generic.o
  CC      kernel/sched/stop_task.o
  CC      fs/proc/array.o
  CC      kernel/sched/wait.o
  CC      fs/proc/fd.o
  CC      kernel/sched/swait.o
  CC      fs/proc/proc_tty.o
  CC      fs/proc/cmdline.o
  CC      fs/proc/consoles.o
  CC      kernel/sched/completion.o
  CC      fs/proc/cpuinfo.o
  CC      fs/proc/devices.o
  CC      fs/proc/interrupts.o
  CC      kernel/sched/idle.o
  CC      fs/proc/loadavg.o
  CC      kernel/sched/cpupri.o
  CC      kernel/sched/cpudeadline.o
  CC      fs/proc/meminfo.o
  CC      kernel/sched/energy.o
  CC      fs/proc/stat.o
  CC      fs/proc/uptime.o
  CC      fs/proc/version.o
  LD      kernel/sched/built-in.o
  CC      kernel/time/time.o
  CC      kernel/time/timer.o
  CC      fs/proc/softirqs.o
  CC      fs/proc/namespaces.o
  CC      fs/proc/self.o
  CC      kernel/time/hrtimer.o
  CC      fs/proc/thread_self.o
  CC      fs/proc/uid.o
  CC      kernel/time/itimer.o
  CC      fs/proc/proc_sysctl.o
  CC      fs/proc/kmsg.o
  CC      kernel/time/posix-timers.o
  CC      kernel/time/posix-cpu-timers.o
  CC      fs/proc/page.o
  CC      kernel/time/timekeeping.o
  LD      fs/proc/proc.o
  LD      fs/proc/built-in.o
  LD      fs/quota/built-in.o
  CC      fs/ramfs/inode.o
  CC      kernel/time/ntp.o
  CC      kernel/time/clocksource.o
  CC      fs/ramfs/file-mmu.o
  CC      kernel/time/jiffies.o
  CC      kernel/time/timer_list.o
  CC      kernel/time/timeconv.o
  LD      fs/ramfs/ramfs.o
  LD      fs/ramfs/built-in.o
  CC      fs/sysfs/file.o
  CC      fs/sysfs/dir.o
  CC      kernel/time/timecounter.o
  CC      kernel/time/posix-clock.o
  CC      kernel/time/alarmtimer.o
  CC      fs/sysfs/symlink.o
  CC      fs/sysfs/mount.o
  CC      fs/sysfs/group.o
  CC      kernel/time/clockevents.o
  CC      kernel/time/tick-common.o
  CC      kernel/time/tick-broadcast.o
  LD      fs/sysfs/built-in.o
  CC      fs/eventpoll.o
  CC      kernel/time/sched_clock.o
  CC      block/bio.o
  CC      block/elevator.o
  LD      kernel/time/built-in.o
  CC      kernel/freezer.o
  CC      kernel/futex.o
  CC      fs/anon_inodes.o
  CC      block/blk-core.o
  CC      fs/signalfd.o
  CC      block/blk-tag.o
  CC      fs/timerfd.o
  CC      fs/eventfd.o
  CC      kernel/smp.o
  CC      fs/aio.o
  CC      fs/locks.o
  CC      kernel/kallsyms.o
  CC      block/blk-sysfs.o
  CC      kernel/utsname.o
  CC      block/blk-flush.o
  CC      kernel/pid_namespace.o
  CC      fs/binfmt_script.o
  CC      block/blk-settings.o
  CC      kernel/stop_machine.o
  CC      fs/binfmt_elf.o
  CC      drivers/amba/bus.o
  CC      block/blk-ioc.o
  CC      kernel/utsname_sysctl.o
  LD      drivers/amba/built-in.o
  LD      drivers/auxdisplay/built-in.o
  CC      drivers/base/component.o
  CC      kernel/elfcore.o
  CC      block/blk-map.o
  CC      kernel/irq_work.o
  CC      drivers/base/core.o
  CC      fs/coredump.o
  CC      kernel/cpu_pm.o
  CC      block/blk-exec.o
  CC      kernel/membarrier.o
  CC      block/blk-merge.o
  CC      fs/drop_caches.o
  CC      kernel/memremap.o
  CC      fs/fhandle.o
  CC      drivers/base/bus.o
  LD      kernel/built-in.o
  LD      sound/built-in.o
  LD      firmware/built-in.o
  LD      net/built-in.o
  AS      arch/arm64/lib/bitops.o
  AS      arch/arm64/lib/clear_page.o
  AS      arch/arm64/lib/clear_user.o
  AS      arch/arm64/lib/copy_from_user.o
  AS      arch/arm64/lib/copy_in_user.o
  AS      arch/arm64/lib/copy_page.o
  AS      arch/arm64/lib/copy_to_user.o
  CC      arch/arm64/lib/delay.o
  CC      block/blk-softirq.o
  LD      fs/built-in.o
  CC      lib/lockref.o
  AS      arch/arm64/lib/memchr.o
  CC      drivers/base/dd.o
  AS      arch/arm64/lib/memcmp.o
  AS      arch/arm64/lib/memcpy.o
  AS      arch/arm64/lib/memmove.o
  AS      arch/arm64/lib/memset.o
  CC      lib/bcd.o
  CC      block/blk-timeout.o
  AS      arch/arm64/lib/strchr.o
  CC      lib/div64.o
  AS      arch/arm64/lib/strcmp.o
  AS      arch/arm64/lib/strlen.o
  CC      lib/sort.o
  AS      arch/arm64/lib/strncmp.o
  AS      arch/arm64/lib/strnlen.o
  CC      lib/parser.o
  AS      arch/arm64/lib/strrchr.o
  CC      drivers/base/syscore.o
  AR      arch/arm64/lib/lib.a
  EXPORTS arch/arm64/lib/lib-ksyms.o
  LD      arch/arm64/lib/built-in.o
  CC      block/blk-lib.o
  LD      virt/lib/built-in.o
  LD      virt/built-in.o
  CC      block/blk-mq.o
  CC      lib/halfmd4.o
  CC      lib/debug_locks.o
  CC      drivers/base/driver.o
  CC      lib/random32.o
  CC      lib/bust_spinlocks.o
  CC      drivers/base/class.o
  CC      block/blk-mq-tag.o
  CC      lib/kasprintf.o
  CC      lib/bitmap.o
  CC      drivers/base/platform.o
  CC      block/blk-mq-sysfs.o
  CC      block/blk-mq-cpumap.o
  CC      lib/scatterlist.o
  CC      drivers/base/cpu.o
  CC      block/ioctl.o
  CC      block/genhd.o
  CC      lib/gcd.o
  CC      drivers/base/firmware.o
  CC      lib/lcm.o
  CC      lib/list_sort.o
  CC      lib/uuid.o
  CC      drivers/base/init.o
  CC      block/scsi_ioctl.o
  CC      lib/flex_array.o
  CC      drivers/base/map.o
  CC      block/partition-generic.o
  CC      lib/iov_iter.o
  CC      drivers/base/devres.o
  CC      block/ioprio.o
  CC      drivers/base/attribute_container.o
  CC      block/badblocks.o
  CC      block/partitions/check.o
  CC      drivers/base/transport_class.o
  CC      drivers/base/topology.o
  CC      block/partitions/msdos.o
  CC      drivers/base/container.o
  CC      drivers/base/property.o
  CC      drivers/base/cacheinfo.o
  CC      lib/clz_ctz.o
  CC      lib/bsearch.o
  CC      block/partitions/efi.o
  CC      lib/find_bit.o
  CC      lib/llist.o
  CC      drivers/base/power/sysfs.o
  CC      lib/memweight.o
  CC      lib/kfifo.o
  CC      drivers/base/power/generic_ops.o
  LD      block/partitions/built-in.o
  CC      block/bounce.o
  CC      drivers/base/power/common.o
  CC      lib/percpu-refcount.o
  CC      drivers/base/power/qos.o
  CC      drivers/base/power/runtime.o
  CC      block/bsg.o
  CC      lib/percpu_ida.o
  CC      lib/rhashtable.o
  CC      lib/reciprocal_div.o
  CC      drivers/base/power/wakeirq.o
  CC      lib/once.o
  CC      lib/string_helpers.o
  CC      drivers/base/power/main.o
  CC      block/noop-iosched.o
  CC      block/deadline-iosched.o
  CC      lib/hexdump.o
  CC      lib/kstrtox.o
  CC      lib/pci_iomap.o
  CC      lib/iomap_copy.o
  CC      block/cfq-iosched.o
  CC      lib/devres.o
  CC      lib/hweight.o
  CC      drivers/base/power/wakeup.o
  CC      drivers/base/power/clock_ops.o
  CC      lib/bitrev.o
  CC      lib/rational.o
  HOSTCC  lib/gen_crc32table
  CC      drivers/base/dma-mapping.o
  CC      lib/genalloc.o
  LD      drivers/base/power/built-in.o
  CC      drivers/base/dma-coherent.o
  CC      drivers/base/firmware_class.o
  CC      lib/percpu_counter.o
drivers/base/dma-coherent.c:973:12: error: ?shrink_thread? defined but not used [-Werror=unused-function]
 static int shrink_thread(void *arg)
            ^~~~~~~~~~~~~
drivers/base/dma-coherent.c:280:12: error: ?declare_coherent_heap? defined but not used [-Werror=unused-function]
 static int declare_coherent_heap(struct device *dev, phys_addr_t base,
            ^~~~~~~~~~~~~~~~~~~~~
drivers/base/dma-coherent.c:96:13: error: ?dma_debugfs_init? defined but not used [-Werror=unused-function]
 static void dma_debugfs_init(struct device *dev, struct heap_info *heap)
             ^~~~~~~~~~~~~~~~
  CC      lib/swiotlb.o
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:336: drivers/base/dma-coherent.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC      lib/iommu-helper.o
  LD      block/built-in.o
  CC      lib/iommu-common.o
  CC      lib/syscall.o
make[1]: *** [scripts/Makefile.build:649: drivers/base] Error 2
make: *** [Makefile:1121: drivers] Error 2
make: *** Waiting for unfinished jobs....
  CC      lib/checksum.o
  CC      lib/strncpy_from_user.o
  CC      lib/strnlen_user.o
  CC      lib/ucs2_string.o
  CC      lib/sbitmap.o
  CC      lib/argv_split.o
  CC      lib/bug.o
  CC      lib/chacha20.o
  CC      lib/cmdline.o
  CC      lib/cpumask.o
  CC      lib/ctype.o
  CC      lib/dec_and_lock.o
  CC      lib/decompress.o
  CC      lib/dma-noop.o
  CC      lib/dump_stack.o
  CC      lib/earlycpio.o
  CC      lib/extable.o
  CC      lib/fdt.o
  CC      lib/fdt_empty_tree.o
  CC      lib/fdt_ro.o
  CC      lib/fdt_rw.o
  CC      lib/fdt_strerror.o
  CC      lib/fdt_sw.o
  CC      lib/fdt_wip.o
  CC      lib/flex_proportions.o
  CC      lib/idr.o
  CC      lib/int_sqrt.o
  CC      lib/ioremap.o
  CC      lib/irq_regs.o
  CC      lib/is_single_threaded.o
  CC      lib/klist.o
  CC      lib/kobject.o
  CC      lib/kobject_uevent.o
  CC      lib/md5.o
  CC      lib/nmi_backtrace.o
  CC      lib/nodemask.o
  CC      lib/plist.o
  CC      lib/radix-tree.o
  CC      lib/ratelimit.o
  CC      lib/rbtree.o
  CC      lib/seq_buf.o
  CC      lib/sha1.o
  CC      lib/show_mem.o
  CC      lib/siphash.o
  CC      lib/string.o
  CC      lib/timerqueue.o
  CC      lib/vsprintf.o
  CC      lib/win_minmax.o
  GEN     lib/crc32table.h
  CC      lib/crc32.o
  AR      lib/lib.a
  EXPORTS lib/lib-ksyms.o
  LD      lib/built-in.o

[oe4t-patches-l4t-r32.7] Device tree for Jetson Xavier NX Dev Kit

I am trying compile the device tree for the Jetson Xavier NX Dev Kit (P3668-0000). So I am using that DTS tegra194-p3668-all-p3509-0000.dts, but I got an error with the "i2c7" label because it does not exist:
ERROR (phandle_references): Reference to non-existent node or label "i2c7"

The only one reference for this label is there:

But indeed, this label is never defined.

I also checked the pinmux about that i2c7 and it is also unused. Am I missing anything here ?

By just commenting out the line, I was able to compile it.

Thank you for your support.

Insmod: ERROR: could not insert module ./overlay.ko: Invalid module format

Hi!
How can i fix this trouble?

Thank you for the future answers.

root@nano:~# cd /lib/modules/4.9.253-tegra/kernel/fs
root@nano:/lib/modules/4.9.253-tegra/kernel/fs# ls -a
.  ..  binfmt_misc.ko  btrfs  cifs  fuse  nfs_common  nfsd  overlayfs
root@nano:/lib/modules/4.9.253-tegra/kernel/fs# cd overlayfs/
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# ls -al
total 100
drwxr-xr-x 2 root root  4096 aug  2  2021 .
drwxr-xr-x 8 root root  4096 aug  2  2021 ..
-rw-r--r-- 1 root root 92760 jul 26  2021 overlay.ko
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# insmod ./overlay.ko 
insmod: ERROR: could not insert module ./overlay.ko: Invalid module format
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# insmod overlay.ko 
insmod: ERROR: could not insert module overlay.ko: Invalid module format
root@nano:/lib/modules/4.9.253-tegra/kernel/fs/overlayfs# 

uname -a :

 uname -a
Linux nano 4.9.337-tegra #1 SMP PREEMPT Thu Jun 8 21:19:14 PDT 2023 aarch64 aarch64 aarch64 GNU/Linux

Nouveau driver does not build

Building Nouveau driver (CONFIG_DRM_NOUVEAU) fails on branch patches-l4t-r32.2.1:

| .../kernel-source/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c: In function 'nvkm_device_tegra_power_up':
| .../kernel-source/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:51:8: error: implicit declaration of function 'tegra_powergate_remove_clamping'; did you mean 'tegra_pmc_cpu_remove_clamping'? [-Werror=implicit-function-declaration]
|   ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D);
|         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|         tegra_pmc_cpu_remove_clamping
|   CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm204.o
|   CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/dport.o
|   CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.o
| .../kernel-source/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:51:40: error: 'TEGRA_POWERGATE_3D' undeclared (first use in this function); did you mean 'TEGRA_POWERGATE_3D0'?
|   ret = tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D);
|                                         ^~~~~~~~~~~~~~~~~~
|                                         TEGRA_POWERGATE_3D0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.