Dear technical supporter,
I installed VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_SD-USB_V20190830.7z on microSDcard + VIM3 Pro board. In order to use NPU facility of VIM3 Pro board, I downloaded the aml_npu_sdk.tgz file at https://www.khadas.com/npu-toolkit-vim3. Then, I found the galcore.ko file at linux_sdk/linux_sdk_6.3.3.4/build/sdk/ReadMe.txt file after decompressing aml_npu_sdk.tgz file.
The ReadMe.txt describes how to run “galcore.ko” file with the “insmod” command as follows.
dmesg log messages
[138716.608197] galcore irq number is 36.
[138716.608208] Galcore version 6.3.3.210826
[138716.608211] Galcore options:
[138716.608215] irqLine = 36
[138716.608218] registerMemBase = 0xFF100000
[138716.608222] registerMemSize = 0x00020000
[138716.608226] contiguousSize = 0x00400000
[138716.608229] contiguousBase = 0xFFFFFFFFFFFFFFFF
[138716.608232] externalSize = 0x00000000
[138716.608236] externalBase = 0x00000000
[138716.608239] bankSize = 0x00000000
[138716.608242] fastClear = -1
[138716.608245] compression = 15
[138716.608248] powerManagement = 1
[138716.608252] baseAddress = 0x00000000
[138716.608255] physSize = 0x00000000
[138716.608258] recovery = 1
[138716.608261] stuckDump = 0
[138716.608264] gpuProfiler = 0
[138716.608268] userClusterMask = 0x0
[138716.608271] smallBatch = 1
[138716.608274] irqs = 36, -1, -1, -1, -1, -1, -1, -1, -1, -1,
[138716.608306] registerBases = 0xFF100000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
[138716.608338] registerSizes = 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
[138716.608403] chipIDs = 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
[138716.608435] core 0 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFF000000, 0xFFFFFFFF,
[138716.608449] core 1 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608463] core 2 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608477] core 3 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608490] core 4 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608504] core 5 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608518] core 6 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608531] core 7 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608545] core 8 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608559] core 9 sRAMBases = 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
[138716.608573] Build options:
[138716.608576] gcdGPU_TIMEOUT = 20000
[138716.608580] gcdGPU_2D_TIMEOUT = 4000
[138716.608583] gcdINTERRUPT_STATISTIC = 1
[138716.610957] request mem galcore contiguous memory(0xffffffffffffffff - 0x3ffffe) failed
[138716.611247] galcore: probe of ff100000.galcore failed with error -22
[139161.482930] galcore: disagrees about version of symbol module_layout
Question1: However, when I run “insmod /galcore.ko registerMemBase=0x80000000 irqLine=104 contiguousSize=0x400000”, I could not find “/dev/galcore” file. And, when I type the “dmesg” command, I get the below error message. How can I fix this issue? And
Is the galcore.ko of the aml_npu_sdk.tgz file valid?
Running applications on the target machine
==========================================
1. Copy the libraries to the target
On the target machine:
cp galcore.ko /
cp libEGL.so libGLESv1_CM.so libGAL.so libGLSLC.so libGLESv2.so /lib
2. Install the kernel driver
insmod /galcore.ko registerMemBase=<REG_MEM_BASE> irqLine=<IRQ> contiguousSize=<CONTIGUOUS_MEM_SIZE>
eg. On ARM EB development board:
insmod /galcore.ko registerMemBase=0x80000000 irqLine=104 contiguousSize=0x400000
Question 2: I could not find “samples” folder after decompressing the aml_npu_sdk.tgz file. Could you tell me the location of the “samples” folder?
3. Run the application
eg.
cd $SDK_DIR/samples/vdk; ./tutorial1