ACM driver install issues

I am attempting to use an Arduino with my TX2 and it is not showing up under /dev/ttyACM* and after some research discovered it may because of the lack of an ACM driver. I have attempted to install this using JetsonHack’s tutorials on building the kernel to include modules and have been getting errors each time that I attempt to make the kernel. I am on 4.4.15-tegra.
The following is the output from

./makeKernel.sh 1>/dev/null

showing only the errors.

In file included from include/linux/platform/tegra/mc.h:22:0,
                 from drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.c:17:
include/linux/platform/tegra/tegra_mc.h: In function ‘mc_get_carveout_info’:
include/linux/platform/tegra/tegra_mc.h:77:10: error: ‘ENODEV’ undeclared (first use in this function)
  return -ENODEV;
          ^
include/linux/platform/tegra/tegra_mc.h:77:10: note: each undeclared identifier is reported only once for each function it appears in
make[5]: *** [drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.o] Error 1
make[4]: *** [drivers/../../t18x/drivers/platform/tegra/mc] Error 2
make[3]: *** [drivers/../../t18x/drivers/platform/tegra] Error 2
make[2]: *** [drivers/../../t18x/drivers/platform] Error 2
make[1]: *** [drivers/../../t18x/drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from include/soc/tegra/tegra_powergate.h:21:0,
                 from drivers/ata/tegra/ahci_tegra.c:20:
include/linux/tegra-powergate.h:74:19: error: redefinition of ‘tegra_powergate_is_powered’
 static inline int tegra_powergate_is_powered(int id)
                   ^
In file included from drivers/ata/tegra/ahci_tegra.h:30:0,
                 from drivers/ata/tegra/ahci_tegra.c:17:
include/soc/tegra/pmc.h:131:19: note: previous definition of ‘tegra_powergate_is_powered’ was here
 static inline int tegra_powergate_is_powered(int id)
                   ^
In file included from include/soc/tegra/tegra_powergate.h:21:0,
                 from drivers/ata/tegra/ahci_tegra.c:20:
include/linux/tegra-powergate.h:101:19: error: redefinition of ‘tegra_powergate_remove_clamping’
 static inline int tegra_powergate_remove_clamping(int id)
                   ^
In file included from drivers/ata/tegra/ahci_tegra.h:30:0,
                 from drivers/ata/tegra/ahci_tegra.c:17:
include/soc/tegra/pmc.h:146:19: note: previous definition of ‘tegra_powergate_remove_clamping’ was here
 static inline int tegra_powergate_remove_clamping(int id)
                   ^
include/soc/tegra/pmc.h:64:29: error: expected identifier or ‘(’ before numeric constant
 #define TEGRA_POWERGATE_SOR 17
                             ^
include/soc/tegra/tegra_powergate.h:28:12: note: in expansion of macro ‘TEGRA_POWERGATE_SOR’
 extern int TEGRA_POWERGATE_SOR;
            ^
make[3]: *** [drivers/ata/tegra/ahci_tegra.o] Error 1
make[2]: *** [drivers/ata/tegra] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [drivers/ata] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
net/wireless/scan.c:73:0: warning: "IEEE80211_SCAN_RESULT_EXPIRE" redefined
 #define IEEE80211_SCAN_RESULT_EXPIRE (30 * HZ)
 ^
net/wireless/scan.c:59:0: note: this is the location of the previous definition
 #define IEEE80211_SCAN_RESULT_EXPIRE (7 * HZ)
 ^

Once I run that, trying to run

./copyImage.sh

results in

cp: cannot stat 'arch/arm64/boot/Image': No such file or directory

Any assistance with this would be greatly appreciated!

I can’t say for sure, but it seems you may have started with a configuration which has some sort of conflict. What did you use for the initial configuration? I recommend copy of “/proc/config.gz”…this is a reflection of the configuration of the running kernel produced by the kernel itself. Starting there and then adding the ACM driver would be the most reliable way to begin.

@LoganF Did you git checkout the tagged version for 4.4.15?

The version is vL4T27.1

@Kangalow I tried both versions vL4T27.1 and vL4T28.1 just to make sure and had no success either time. I also just re-tried the L4T 27.1 tutorial you have for this and changed the local version to “-tegra” and ran makeKernel.sh with 1>/dev/null. This was the output of running this specifically.

drivers/platform/tegra/Kconfig:113:warning: ignoring type redefinition of 'TEGRA_SOCTHERM' from 'tristate' to 'boolean'
mm/cma.c: In function ‘cma_release’:
mm/cma.c:529:14: warning: passing argument 1 of ‘__dma_remap’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  __dma_remap(pages, count << PAGE_SHIFT, PAGE_KERNEL_EXEC);
              ^
mm/cma.c:371:13: note: expected ‘struct page *’ but argument is of type ‘const struct page *’
 static void __dma_remap(struct page *page, size_t size, pgprot_t prot)
             ^
In file included from drivers/../../t18x/drivers/platform/tegra/nvadsp/os-t18x.c:18:0:
include/linux/irqchip/tegra-agic.h:31:53: error: ‘enum tegra_agic_cpu’ declared inside parameter list [-Werror]
 extern int tegra_agic_route_interrupt(int irq, enum tegra_agic_cpu cpu);
                                                     ^
include/linux/irqchip/tegra-agic.h:31:53: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
cc1: all warnings being treated as errors
make[5]: *** [drivers/../../t18x/drivers/platform/tegra/nvadsp/os-t18x.o] Error 1
make[4]: *** [drivers/../../t18x/drivers/platform/tegra/nvadsp] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [drivers/../../t18x/drivers/platform/tegra] Error 2
make[2]: *** [drivers/../../t18x/drivers/platform] Error 2
make[1]: *** [drivers/../../t18x/drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
drivers/base/cacheinfo.c:640:12: warning: ‘cacheinfo_cpu_callback’ defined but not used [-Wunused-function]
 static int cacheinfo_cpu_callback(struct notifier_block *nfb,
            ^
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
In file included from sound/soc/tegra-alt/tegra210_adsp_alt.c:40:0:
include/linux/irqchip/tegra-agic.h:31:53: error: ‘enum tegra_agic_cpu’ declared inside parameter list [-Werror]
 extern int tegra_agic_route_interrupt(int irq, enum tegra_agic_cpu cpu);
                                                     ^
include/linux/irqchip/tegra-agic.h:31:53: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
cc1: all warnings being treated as errors
make[3]: *** [sound/soc/tegra-alt/tegra210_adsp_alt.o] Error 1
make[2]: *** [sound/soc/tegra-alt] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2
fs/pstore/inode.c: In function ‘pstore_rtrace_seq_show’:
fs/pstore/inode.c:177:16: warning: format ‘%p’ expects argument of type ‘void *’, but argument 5 has type ‘long unsigned int’ [-Wformat=]
  seq_printf(s, "%d %c %p <- %p  %pF\n",
                ^
fs/pstore/inode.c:177:16: warning: format ‘%p’ expects argument of type ‘void *’, but argument 6 has type ‘long unsigned int’ [-Wformat=]
In file included from drivers/media/platform/tegra/tpg/tpg_t18x.c:28:0:
../nvhost/drivers/video/tegra/host/nvcsi/nvcsi.h:87:0: error: "DESKEW_COMPARE" redefined [-Werror]
 #define DESKEW_COMPARE    (0xf << 20)
 ^
In file included from drivers/media/platform/tegra/camera/vi/../csi/csi.h:26:0,
                 from drivers/media/platform/tegra/camera/vi/mc_common.h:33,
                 from drivers/media/platform/tegra/tpg/tpg_t18x.c:25:
drivers/media/platform/tegra/camera/csi/csi4_registers.h:189:0: note: this is the location of the previous definition
 #define DESKEW_COMPARE    (0x4 << 20)
 ^
In file included from drivers/media/platform/tegra/tpg/tpg_t18x.c:28:0:
../nvhost/drivers/video/tegra/host/nvcsi/nvcsi.h:89:0: error: "DESKEW_SETTLE" redefined [-Werror]
 #define DESKEW_SETTLE    (0xf << 16)
 ^
In file included from drivers/media/platform/tegra/camera/vi/../csi/csi.h:26:0,
                 from drivers/media/platform/tegra/camera/vi/mc_common.h:33,
                 from drivers/media/platform/tegra/tpg/tpg_t18x.c:25:
drivers/media/platform/tegra/camera/csi/csi4_registers.h:190:0: note: this is the location of the previous definition
 #define DESKEW_SETTLE    (0x6 << 16)
 ^
In file included from drivers/media/platform/tegra/tpg/tpg_t18x.c:28:0:
../nvhost/drivers/video/tegra/host/nvcsi/nvcsi.h:91:0: error: "CLK_SETTLE" redefined [-Werror]
 #define CLK_SETTLE    (0x3f << 8)
 ^
In file included from drivers/media/platform/tegra/camera/vi/../csi/csi.h:26:0,
                 from drivers/media/platform/tegra/camera/vi/mc_common.h:33,
                 from drivers/media/platform/tegra/tpg/tpg_t18x.c:25:
drivers/media/platform/tegra/camera/csi/csi4_registers.h:191:0: note: this is the location of the previous definition
 #define CLK_SETTLE     (0x21 << 8)
 ^
In file included from drivers/media/platform/tegra/tpg/tpg_t18x.c:28:0:
../nvhost/drivers/video/tegra/host/nvcsi/nvcsi.h:93:0: error: "THS_SETTLE" redefined [-Werror]
 #define THS_SETTLE    0x7f
 ^
In file included from drivers/media/platform/tegra/camera/vi/../csi/csi.h:26:0,
                 from drivers/media/platform/tegra/camera/vi/mc_common.h:33,
                 from drivers/media/platform/tegra/tpg/tpg_t18x.c:25:
drivers/media/platform/tegra/camera/csi/csi4_registers.h:193:0: note: this is the location of the previous definition
 #define THS_SETTLE     (0x14 << 0)
 ^
cc1: all warnings being treated as errors
make[5]: *** [drivers/media/platform/tegra/tpg/tpg_t18x.o] Error 1
make[4]: *** [drivers/media/platform/tegra/tpg] Error 2
make[3]: *** [drivers/media/platform/tegra] Error 2
make[2]: *** [drivers/media/platform] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2

Have you flashed your Jetson with JetPack? Which version of JetPack did you use?

I apologize, I’ve got two devices I am working with. The one that was on 27.1 is not going to be used. The device we will be using is on L4T R28.1 and uname -r results in

4.4.38-tegra-leopard

We are using a custom board from Leopard Imaging if that makes any difference.

I will re-try running the kernel rebuild process for 28.1 and check back with the results.

Rebuilding the kernel with 28.1 worked and my arduino showed up at /dev/ttyACM0!

It must be a holiday miracle! I’m glad you got it to work.