Error in linux cross compilation u-boot - bootloader

When i am cross compile u-boot code in ubuntu and gives command as follow
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- distclean
error is:
System not configured -see readme Error[1]
What is solution for this?
thank you.
hardik gajjar

To compile U-Boot, the easiest way is to export the CROSS_COMPILE variable :
$ export CROSS_COMPILE=/directory/.../arm-none-linux-gnueabi-
And then you have to choose the board configuration, for example :
$ make lpc4350-board_config
Then you can compile :
$ make

The distclean target is used to undo/clear any changes made to the local working directory by selecting any board/device-specific config.
The error System not configured -see readme Error[1] indicates that the current u-boot working-directory is NOT yet configured for any device/board and hence the distclean target to make is redundant at this point.

Related

Raspian kernel cross compilation failing

I want to cross-compile a Raspbian kernel that I downloaded from www.github.com/raspberrypi/linux on my host machine (Linux Mint Cinnamon 64bit).
I was executing the following steps:
Create folders leading to path home/sven/Develop/Raspbian
Cloning repo from link above leading to home/sven/Develop/Raspbian/linux containing the source code
Cleaning kernel by running make mrproper
Creating .config from my running raspberry pi 3B+ by running sudo scp pi#.../proc/config.gz . and then unzipping it with gunzip -c config.gz > .config
Running ARCH=arm CROSS_COMPILE=${CCPREFIX} make oldconfig
grep -v DEBUG_INFO < .config > newconfig
mv newconfig .config
ARCH=arm CROSS_COMPILE=${CCPREFIX} make oldconfig
ARCH=arm CROSS_COMPILE=${CCPREFIX} make
However, the last step is always failing (Error 2 or Error 1). I have also tried the following commands that have also been unsuccessful:
make ARCH=arm CROSS_COMPILE=${CCPREFIX}
make ARCH=arm CROSS_COMPILE=
If I type in only make oldconfig or only make, it works but then I have no idea if it's really compiled for ARM or with the gcc compiler...
My .profile file looks like this at the end:
PATH=/opt/toolchain/.../gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/:$PATH
export CCPREFIX=arm-linux-gnueabihf-
I have already tried the PATH without the "/bin/" at the end, also not working.
Does anyone have an idea???

Makefile : What does #VAR# do?

I'm trying to build mod_wsgi from sources.
But when I'm trying to use "make", I get the following issue :
/bin/sh: APXS#: command not found
Makefile.in:31: recipe for target 'src/server/mod_wsgi.la' failed
make: *** [src/server/mod_wsgi.la] Error 127
I checked the Makefile.in file and I line 31 is this one :
$(APXS) -c $(CPPFLAGS) $(CFLAGS) $(SRCFILES) $(LDFLAGS) $(LDLIBS)
And at the line 15 :
APXS = #APXS#
I checked and apxs is installed.
What is #APXS# supposed to do? Giving the path to apxs? (like which apxs?) Use an environment variable?
Why doesn't it work here? I'm building a docker container, could it be the problem?
Thank you for your help!
The #VAR# notation is an autoconf idiosyncrasy, together with the .in suffix in your file Makefile.in, it leads me to think that you did not ./configure your package.
What does it mean to configure my package?
The autoconf software is a tool to write ./configure scripts, meant to detect the characteristics of the system they are running on: What is the path where this program is stored? Where are these C headers? These are questions typically answered by the ./configure script. When it has gathered its answers, it exports the answers by processing a list of files – usually ending with .in like your Makefile.in – and replaces the #VAR# placeholders by the values it guessed.
How do I configure my package?
I do not know the details of your software package, but given the information you provided, you should try to run the ./configure script. Use ./configure --help to review its options. If such a script is not available, try to generate it by using the autoconf command in the toplevel directory of your package.

Installing Glibc with some additional CFLAGS

I am trying to install a secondary glibc on my machine. As its "INSTALL" file says, the following steps must suffice:
mkdir glibc-build
cd glibc-build
../glibc-2.19/configure --prefix=/path/to/glibc-build
make
make install
I actually do not have any problem with the simple installation, however, I do not know how I should add my desired CFLAGS to the whole process. I have tried "make CFLAGS=-da" instead of simple "make", however, it returns me errors. I have tried with other options too. Errors appear again.
Another way was to modify the "config.make" inside the glibc-build. It did not work neither. So, I would appreciate it if you could share your experience in this regard.
P.S.: My desired options are: -da -dv -S
In case you wanna compile glibc with your desired CFLAGS, you need to include -Ox to the set of flags you are passing as the CFLAGS environment variable.

cross compile opencv for porting to TI DM6446

I have set up target fs on
/home/myself/filesys/bin..etc//
GCC
compile:
host $ arm_v5t_le-gcc hello.c -o hello
run:
target $ cd /opt/hello
target $./hello
I have installed opencv2.3 on host ubuntu machine now I want opencv to be ported to DM6446
so i follow
uncompress opencv2.3 tarball
sudo cmake OpenCV-2.3.1
sudo make ARCH=arm CROSS_COMPILE=arm_v5t_le-
but when I run the sample test from bin it runs on x86 machine which was made for ARM
I think I am not following the correct procedure to make opencv.
Is there anything I have to do to make opencv for ARM architecture,
what are the steps to follow in cross compiling?
The 2nd command you executed should provide a clue as to whether you are cross-compiling or not. If you look closely it would have shown that it was building for the i686 and not for the ARM platform.
This blog discusses how to Cross Compile using cmake.
cmake uses different environment variables from standard make (so don't use ARCH, and CROSS-COMPILE).

generic makefile?

Is there a generic makefile i can use to build a simple c++ project? on windows?
i modified a working wii makefile to win32 but could not build properly (difference in make? the make app and the makefile seem to be found). I did a little hack and made a copy of mingw32-make as make.
-edit-
export PATH seem to be the reason i got my old error (make: make Command not found)
now using my new makefile (single file instead of 2) i get
"make"
make[1]: Nothing to be done for `/c/nightly/test/test.exe'.
this is my current makefile
http://pastie.org/318548
I am using mingw. I have a installation from that site along with another with codeblocks. the 'make' binary is a copied mingw32-make.exe where i chopped off the prefix. doing make -h i get "This program built for i686-pc-msys" so it looks correct
Your make file looks fine, for the most part.
Check to see that gcc and g++ are installed correctly.
Also the Clean target uses: rm -rf
rm is the unix (linux et al) command for remove. In order to get rm on windows, I recommend using Cygwin.
Which C++ compiler are you using?
As indicated in the error message, the problem does not come from your Makefile.
"make" itself couldn't be found in your path.

Resources