How do I compile Minix source code? - makefile

I intend to make modifications to the Minix kernel. But before I start, I want to compile it, so that I know any further compilation issues are caused by things that I did.
I have obtained the Minix 3 source code from github, where it is mirrored:
git clone git://github.com/minix3/minix
Now, I wish to compile it before making any modifications to the code. When I do make in src, I get the message
Makefile:109: *** missing separator. Stop.
I tried compiling just the kernel by doing make in src/minix/kernel. In this case, I get the message
Makefile:2: *** missing separator. Stop.
How do I circumvent this problem? How do I compile the Minix source?

Minix building procedure is different. Please read through Crosscompiling MINIX with build.sh and MinixOnARM before trying anything. The Makefile under minix/kernel is not designed in normal as to compile with a simple make command. check if you are able to compile with build.sh tool at the minix/ folder

This is how I do it: After logging in as root I navigate to /usr/src/tools and type in "make new fresh" (no quotations). It then compiles.
If you've made changes and you want Minix to boot to that new image, then do the following: After it finishing compiling it will say "Done." Then type in "shutdown -h now". Then at the next prompt type in "exit". It will then start to reboot. Hit "3" and then Minix will boot to that custom boot image you just made when you did the "make new fresh."

Related

Buildroot - menuconfig creates config, but won't make

I'm trying to use buildroot to create a cross-compiler toolchain for MIPS64 (little endian).
I have run make menuconfig and have set the target to MIPS64 (little endian). Also I am being told that the config file has been generated and I can run make (as below)
configuration written to /home/blah/Downloads/buildroot-2018.02.6/mipsel64.config
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
So, I then run make and I get the following:
Makefile:864: *** Please configure Buildroot first (e.g. "make menuconfig"). Stop.
Any ideas?
Try to copy your buildroot config file to .config file in your buildroot directory. It may look like:
cp /home/blah/Downloads/buildroot-2018.02.6/mipsel64.config /home/blah/Downloads/buildroot-2018.02.6/.config
assuming that /home/blah/Downloads/buildroot-2018.02.6/ is your buildroot compilation directory.
Then try to do make.
Don't ask menuconfig to save to a file, just exit and answer Yes when asked Do you wish to save your new configuration?. This way it will save a file named .config, which is exactly the file neeeded for building.

Getting arm-buildroot-linux-uclibcgnueabihf-gcc: Command not found

I am trying to build Linux for my Raspberry Pi 3.
When I do make, I get the below error.
make[2]: /home/rohit/workplace/rp/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gcc: Command not found
A little background will help. I am following this link . To summarize this is what I ran.
make raspberrypi3_defconfig
make linux-menuconfig
make
From the error I get that the cross gcc is not available at the path as it should be. But I am not sure what I am missing.
The complete log of the make is pasted here. The output/host/usr/bin folder also doesn't contain arm-buildroot-linux-uclibcgnueabihf-gcc, though it does contain arm-buildroot-linux-uclibcgnueabi-gcc. I have pasted the contents of the folder here.
Please help.
i was having this problem and after a make clean the problem was solved. I think the error was because different toolchains used in different builds. The manual says that is one of the cases that you have to do a make clean

Make Error with Osmo Trx

I am working on a project with the Beaglebone Black and ran into an issue. As part of my project, I would like to use OpenBTS to communicate over the GSM network. However, because the Beaglebone is ARM based, the Transceiver52M that ships with OpenBTS is unusable. Therefore, I need to install an ARM friendly transceiver. The transceiver that I think will do best is Osmo-Trx.
I followed the instructions on their website:
http://openbsc.osmocom.org/trac/wiki/OsmoTRX
However, when it came to making the project, got an error and am really stuck. When I do the command "make" after "./configure --with-neon", I get the error:
make: ***No rule to make target '/Makefile.common', needed by 'Makefile.in'. Stop.
Would anyone be able to help me fix this. I've search around and can't find any applicable answers. I would really appreciate it. Thank you so much in advance!
P.S. All the source code for the OsmoTRX can be found at: https://github.com/osmocom/osmo-trx
A missing Makefile is often caused by a missed/failed step in the autotools process.
My suspcion is that you either forgot to run autoreconf -i or it wasn't successfull. Try
cd osmo-trx
git clean -xdf ##Attention: clean slate afterwards!
autoreconf -i ##make sure it reports success
./configure --with-neon ## make sure it reports success
make ## make sure it reports success
sudo make install

Compile error from gmake, but single line runs fine

I'm editing a makefile with multiple targets, using the Unity unit testing framework. Pressing the "Build" button in Code Composer Studio runs through fine until the following line
$(C_COMPILER) $(INC_DIRS) $(SRC_FILES1) -o $(TARGET1)
Also in the makefile are the following lines:
C_COMPILER=C:\MinGW\bin\mingw32-gcc.exe
UNITY_ROOT=../test/unity/
UNITY_C=$(UNITY_ROOT)unity.c
UNITY_H=$(UNITY_ROOT)unity.h
INC_DIRS=-I../include/ -I$(UNITY_ROOT)
SRC_FILES1=$(UNITY_C) ../source/ProductionCode.c ../test/TestProductionCode.c ../test/test_runners/TestProductionCode_Runner.c
TARGET_BASE1=test1
TARGET_EXTENSION=.out
TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION)
And when building in Code Composer, this is the error that is displayed
C:\MinGW\bin\mingw32-gcc.exe -I../include/ -I../test/unity/ ../test/unity/unity.c ../source/ProductionCode.c ../test/TestProductionCode.c ../test/test_runners/TestProductionCode_Runner.c -o test1.out
gmake[1]: *** [default] Error 1
gmake[1]: Leaving directory `C:/Users/matt.harding/Documents/SubversionDirectories/pt_listen_only_can_interface/sw/ccs6_workspace/makefile_project_test1/Debug'
gmake: *** [all] Error 2
So I opened up Cygwin and tried it there to see if I could find the cause. Entering just this problem line, it ran perfectly fine and generated the target successfully! So I'm not sure what would be the problem in Code Composer...
Any ideas? Thanks!
EDIT: If I run the same makefile with gmake in cygwin, it displays the same error as in CCS. So... why is there a problem running this with gmake rather than just running the compiler from Cygwin?
EDIT: From what I can gather, it looks like a compiler incompatibility between Windows and Cygwin? If I change the compiler in the makefile to
C_COMPILER=C:\cygwin\bin\gcc.exe
There is still a problem when running the makefile from Code Composer, but running gmake all works perfectly in Cygwin!
So I found a solution to my problem.
I changed the compiler to
C_COMPILER=C:\MinGW\bin\gcc.exe
Still didn't work in Code Composer Studio (CCS)
I added C:\MinGW\bin\ to the system PATH.
Still didn't work in CCS.
I closed and reopened CCS after having added MinGW to the system PATH.
SUCCESS!
I don't fully understand why things didn't work why I expected them to, but at least we have a solution.

Trying compiling in minix3

I'm using minix3 on VMware Player and i'm having trouble compiling a system call.
I actually tried to see if i can add a simple command in a system call just to see that working and i put a simple printf("my message"); in protect.c file which it is on usr/src/servers/vfs.
I saved it, and tried to compile it with make command while i am on vfs directory.
It says that protect.c is up to date.
I try change a file's owner (protect.c has the chown mode code in it) and i'm waiting as a result my message. Instead it's just run the command correctly without printing my message.
I assume that i did something wrong with compiling and i'm searching for hours over the internet trying to fix it. But the only command that cames repeatedly is make hdboot. I know that this command it's not gonna work because i'm using minix3 as a virtual OS, but i tried it just to confirmed it and as i said didn't work.
Is anyone know anything about compiling in minix3?
IF your problem is indeed with compilation and you've implemented your system call correctly then after making any edits in /usr/src you should call "make install" from /usr/src/releasetools and then call "reboot" to restart minix

Resources