I enabled CONFIG_EARLY_PRINTK and CONFIG_DEBUG_KERNEL in my TI Sitara board configuration file. While building the uImage the following error comes. Why is it coming?
I tried to find out, but I am not able to figure it out properly.
....
CC arch/arm/kernel/io.o
AS arch/arm/kernel/debug.o
arch/arm/kernel/debug.S: Assembler messages:
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `sub ,r1,r2'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `ldr r1,[,#0]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `ldr r2,[,#4]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#0]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#4]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#8]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#0]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#4]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#8]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#0]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#4]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `str r1,[,#8]'
arch/arm/kernel/debug.S:157: Error: ARM register expected -- `ldr ,[,#8]'
arch/arm/kernel/debug.S:157: Error: shift expression expected -- `add r1,r1,'
arch/arm/kernel/debug.S:157: Error: shift expression expected -- `add r2,r2,'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `sub ,r1,r2'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `ldr r1,[,#0]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `ldr r2,[,#4]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#0]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#4]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#8]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#0]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#4]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#8]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#0]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#4]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `str r1,[,#8]'
arch/arm/kernel/debug.S:173: Error: ARM register expected -- `ldr ,[,#8]'
arch/arm/kernel/debug.S:173: Error: shift expression expected -- `add r1,r1,'
arch/arm/kernel/debug.S:173: Error: shift expression expected -- `add r2,r2,'
make[1]: *** [arch/arm/kernel/debug.o] Error 1
make: *** [arch/arm/kernel] Error 2
Recent mainline kernel versions for the Sitara processor expect the user to specify the DEBUG_LL UART via the kernel configuration. The options for the different board and processor variants show up when you enable EARLY_PRINTK.
The right UART port should also be selected.
Related
AS arch/arm64/mm/proc.o
../arch/arm64/mm/proc.S: Assembler messages:
../arch/arm64/mm/proc.S:283: Error: unknown mnemonic `pte_to_phys' -- `pte_to_phys cur_pmdp,pud'
../arch/arm64/mm/proc.S:302: Error: unknown mnemonic `pte_to_phys' -- `pte_to_phys cur_ptep,pmd'
Fixing an issue error build
Looking at the source setting CMAKE_ASM_NASM_OBJECT_FORMAT should be sufficient, however this does not seem to be the case.
I expected the following to create a valid build configuration for a macOS application using the macho64 file format.
project(hello_world ASM_NASM)
set(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
add_executable(hello_world source/main.asm)
However, when running make with VERBOSE=1
/usr/local/bin/nasm -f macho -o CMakeFiles/main.dir/source/main.asm.o /hello-world/source/main.asm
/hello-world/source/main.asm:6: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:7: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:8: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:9: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:12: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:13: error: instruction not supported in 32-bit mode
make[2]: *** [CMakeFiles/main.dir/source/main.asm.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2
We can clearly see the 32 bit version of mach-o is passed to the format flag instead of the expected 64 bit version: macho64.
Versions
CMake 3.12.2
NASM 2.13.03
macOS 10.14
The compiler is checked at the project() call.
You need to move setting the CMAKE_ASM_NASM_OBJECT_FORMAT variable before that call.
I am building igatools logstream error, try to solve the problem through http://logstream.sourceforge.net/ download loglog, but logtream installation failed, has been studied for two weeks, still unresolved,
Error:
[ 47%] Building CXX object CMakeFiles/igatools.dir/source/base/tensor.cpp.o
In file included from
/usr/local/src/igatools/include/igatools/base/tensor.h:26:0,
from /usr/local/src/igatools/source/base/tensor.cpp:21:
/usr/local/src/igatools/include/igatools/base/logstream.h: In member
function ‘iga::LogStream& iga::LogStream::operator<<(double)’:
/usr/local/src/igatools/include/igatools/base/logstream.h:667:14: error:
‘numeric_limits’ is not a member of ‘std’
if (!(t <= std::numeric_limits<double>::max()))
^~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected primary-expression before ‘double’
if (!(t <= std::numeric_limits<double>::max()))
^~~~~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected ‘)’ before ‘double’
/usr/local/src/igatools/include/igatools/base/logstream.h:668:16: error:
expected ‘)’ before ‘;’ token
stream << t;
^
make[2]: *** [CMakeFiles/igatools.dir/source/base/tensor.cpp.o] Error 1
make[1]: *** [CMakeFiles/igatools.dir/all] Error 2
make: *** [all] Error 2
This is my system environment:
System:CentOS 6.7 x86_64
Cmake:3.1.0
Doxygen:1.8.1
Boost:1..64.0
Trilinos:11.6.1
GCC:6.2.0 (gcc,g++,gfortran)
Igatools:git clone https://github.com/igatoolsProject/igatools.git
Igatools install:
Before the installation boost1.54.0 boost report error, and finally in the boost1.54.0 on the basis of the same method used to compile and install boost1.64.0, to solve the problem of boost error, although it still shows boost1.54.0, but should not affect if Maybe, I think it is not difficult to solve
[root#localhost build_igatools]# cmake ${IGATOOLS_SOURCE} \
> -DTrilinos_PREFIX=${TRILINOS_PREFIX} \
> -DCMAKE_INSTALL_PREFIX=${IGATOOLS_PREFIX} \
> -DCMAKE_CXX_COMPILER=/usr/local/bin/g++
-- The CXX compiler identification is GNU 6.2.0
-- The C compiler identification is GNU 6.2.0
-- Check for working CXX compiler: /usr/local/bin/g++
-- Check for working CXX compiler: /usr/local/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found sed: /bin/sed.
-- Found PythonInterp: /usr/bin/python (found version "2.6.6")
-- Found Doxygen: /usr/local/bin/doxygen (found suitable version "1.8.1",
minimum required is "1.8.1")
-- TRILINOS support is enabled.
-- NURBS support is enabled.
-- Quadruple precision support (EXPERIMENTAL) is not enabled.
-- Multipatch features (EXPERIMENTAL) are not enabled.
-- Hierarchical splines support (EXPERIMENTAL) is not enabled.
-- Mesh refinement support (EXPERIMENTAL) is enabled.
-- Serialization support (EXPERIMENTAL) is not enabled.
-- Paraview plugin building (EXPERIMENTAL) is not enabled.
-- XML I/O support (EXPERIMENTAL) is not enabled.
-- VTK support (EXPERIMENTAL) is not enabled.
-- CGAL support (EXPERIMENTAL) is not enabled.
-- Boost version: 1.54.0
-- Found Trilinos: version 11.6.1.
-- IGATOOLS build type: DEBUG
Configuring instantiations
-- Generating physical basis table.
Default instantiation table was created.
Configuring Tutorial
-- Configured: example_06
-- Configured: example_02
-- Configured: example_07
-- Configured: example_05
-- Configured: example_08
-- Configured: example_01
-- Configured: example_04
-- Configured: example_09
-- Configured: example_03
Configuring unit tests
******************************************************************
**
** [1] To compile and install the library run:
** make install
**
** [2] To use the library it should be made visible to the loader.
** Add the following line to your ~/.bash_rc
** export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib
**
** [3] To generate and install the online documentation run:
** make doc
**
******************************************************************
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/build_igatools
[root#localhost build_igatools]#
When i make install on the error, suggesting that logtream error message, I tried to install logtream package, but failed
[root#localhost build_igatools]# make install
[ 0%] Generating file io/writer.inst
[ 0%] Generating file base/tensor.inst
[ 2%] Generating file base/quadrature_lib.inst
...
...
...
[ 43%] Generating file functions/ig_function_handler.inst
[ 43%] Generating file functions/sub_grid_function_element.inst
[ 45%] Generating file functions/grid_function_handler.inst
[ 45%] Generating file functions/function_element.inst
[ 45%] Generating file functions/sub_grid_function.inst
Scanning dependencies of target igatools
[ 47%] Building CXX object CMakeFiles/igatools.dir/source/base/tensor.cpp.o
In file included from
/usr/local/src/igatools/include/igatools/base/tensor.h:26:0,
from /usr/local/src/igatools/source/base/tensor.cpp:21:
/usr/local/src/igatools/include/igatools/base/logstream.h: In member
function ‘iga::LogStream& iga::LogStream::operator<<(double)’:
/usr/local/src/igatools/include/igatools/base/logstream.h:667:14: error:
‘numeric_limits’ is not a member of ‘std’
if (!(t <= std::numeric_limits<double>::max()))
^~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected primary-expression before ‘double’
if (!(t <= std::numeric_limits<double>::max()))
^~~~~~
/usr/local/src/igatools/include/igatools/base/logstream.h:667:34: error:
expected ‘)’ before ‘double’
/usr/local/src/igatools/include/igatools/base/logstream.h:668:16: error:
expected ‘)’ before ‘;’ token
stream << t;
^
make[2]: *** [CMakeFiles/igatools.dir/source/base/tensor.cpp.o] Error 1
make[1]: *** [CMakeFiles/igatools.dir/all] Error 2
make: *** [all] Error 2
Oh,my god ,help me!
I'm having trouble building Microsoft's P language compiler on Mac OS X El Capitan 10.11.6.
Relevant portions of the build log (cd Bld; ./build.sh):
~/workspace/P/Bld
-- The C compiler identification is AppleClang 8.0.0.8000038
-- The CXX compiler identification is AppleClang 8.0.0.8000038
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jlieberm/workspace/P/Bld/build
Scanning dependencies of target Prt
[ 12%] Building C object Prt/CMakeFiles/Prt.dir/API/PrtUser.c.o
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.c:1:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.h:9:
In file included from /Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:4:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/Prt.h:9:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtProgram.h:14:
/Users/jlieberm/workspace/P/Src/Prt/API/PrtValues.h:255:8: error: unknown type
name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
/Users/jlieberm/workspace/P/Src/Prt/API/PrtValues.h:326:8: error: unknown type
name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
/Users/jlieberm/workspace/P/Src/Prt/API/PrtValues.h:436:8: error: unknown type
name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.c:1:
In file included from /Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.h:9:
/Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:164:122: error: unknown
type name 'PRT_FUN_PARAM_STATUS'
...PRT_MACHINEINST_PRIV * context, _In_ PRT_UINT32 varIndex, _In_ PRT_FUN_P...
^
/Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:184:8: error: unknown
type name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS status,
^
/Users/jlieberm/workspace/P/Src/Prt/Core/PrtExecution.h:500:8: error: unknown
type name 'PRT_FUN_PARAM_STATUS'
_In_ PRT_FUN_PARAM_STATUS payloadStatus,
^
/Users/jlieberm/workspace/P/Src/Prt/API/PrtUser.c:508:3: error: use of
undeclared identifier 'PRT_FUN_PARAM_STATUS'
PRT_FUN_PARAM_STATUS argStatus = va_arg(argp, PRT_FUN_PA...
^
7 errors generated.
make[2]: *** [Prt/CMakeFiles/Prt.dir/API/PrtUser.c.o] Error 1
make[1]: *** [Prt/CMakeFiles/Prt.dir/all] Error 2
make: *** [all] Error 2
I am using mono 4.6.0 stable and cmake 3.6.2, which meet the minimum requirements in the P build guide for OS X and Linux.
What am I doing wrong?
This was a bug with the source code. The P team failed to include the PRT_FUN_PARAM_STATUS enum declaration in PrtValues.h:
typedef enum PRT_FUN_PARAM_STATUS
{
PRT_FUN_PARAM_CLONE,
PRT_FUN_PARAM_SWAP,
PRT_FUN_PARAM_XFER
} PRT_FUN_PARAM_STATUS;
Fixed with 1fd291c.
I am learning writing Linux Kernel Modules and following the book Linux Device Drivers. which instructs building and configure a kernel of 2.6.x . I am using kernel version 2.6.10. I followed the steps on thegeekstuff.com/compile-linux-kernel
i.e. I after untarring in the /usr/src directory, I did
$ make menuconfig #this opened up a gui
then I saved the config without making any changes, in the hope to enforce default configuration and then
$ make.
when I did make, it gave me this error and the warning’
include/asm/mpspec_def.h:78:2: warning: ‘packed’ attribute ignored for field
of type ‘unsigned char[6]’ [-Wattributes]
arch/i386/kernel/process.c: In function ‘show_regs’:
arch/i386/kernel/process.c:259:2: warning: pointer targets in passing argument 2 of ‘show_trace’ differ in signedness [-Wpointer-sign]
include/asm/processor.h:499:6: note: expected ‘long unsigned int *’ but argument is of type ‘long int *
arch/i386/kernel/process.c: Assembler messages:
arch/i386/kernel/process.c:384: Error: operand type mismatch for mov'
arch/i386/kernel/process.c:385: Error: operand type mismatch formov'
arch/i386/kernel/process.c:461: Error: operand type mismatch for `mov'
include/linux/elfcore.h:92: Error: operand type mismatch for mov'
include/linux/elfcore.h:92: Error: operand type mismatch formov'
arch/i386/kernel/process.c:583: Error: operand type mismatch for mov'
arch/i386/kernel/process.c:584: Error: operand type mismatch formov'
arch/i386/kernel/process.c:591: Error: operand type mismatch for mov'
arch/i386/kernel/process.c:592: Error: operand type mismatch formov'
make1: [arch/i386/kernel/process.o] Error 1
make: [arch/i386/kernel] Error 2
I have not written professional kernel code before so I am not sure if I should make any changes in the code. Can anybody help me with why this error occurred and how it can be removed. I used the default kernel config. prior to calling make using make menu-config.
The error in the process.c is in savesegment(fs,p->thread.fs); (all instances of the error are from the same function)
Thanks
It is not clear from your question that what are the exact steps you did.
This error may be due to some issues in configuration.
Please try the following steps and see if it solves the problem:
> make defconfig #Creates a default config based on your machine architecture
> make
I used a kernel version who version was closer to my native kernel version ~ 3.11.1. and used make oldconfig instead. This was easier than figuring out each configuration setting for my architecture.