Build yocto for x86 Linux desktop - linux

I want to build yocto sumo 2.5 for x86 Linux desktop. Does anyone have an idea or any documentation to do that ?.

Please familiar with this doc - Quick introduction to Yocto Project, which consist information how to start and where to go next.

meta-intel has "intel-core2-32" machine. you should use this or use qemux86.
edit your poky/build/local.conf file and set MACHINE to "intel-core2-32"
$ cd poky/
$ git clone -b sumo git://git.yoctoproject.org/meta-intel
$ source oe-init-build-env
$ bitbake core-image-minimal

1-) Install required packages
sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl lzop asciidoc u-boot-tools gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping
2-) Clone poky
git clone -b version git://git.yoctoproject.org/poky.git poky-version
cd poky-version
3-) Clone open embedded
git clone -b version git://git.openembedded.org/meta-openembedded
4-) Clone meta raspberrypi
git clone -b version git://git.yoctoproject.org/meta-raspberrypi
5-) Clone meta freescale
git clone -b version https://git.yoctoproject.org/git/meta-freescale
6-) Clone meta ti
git clone -b version git://git.yoctoproject.org/meta-ti
7-) Clone meta-qt4
git clone -b version git://git.yoctoproject.org/meta-qt4
8-) Clone meta-qt5
git clone -b version git://github.com/meta-qt5/meta-qt5.git
version : morty, rocko, sumo and so on...
PS: It works on the ubuntu 16.04. You can use these short guide and the packages can change according to linux OS.

Related

Issue Installing ninja-build for centos 7

I can successfully build ninja locally in ~/programs in CentOS7 using the following set of commands:
mkdir -p programs
cd programs
git clone https://github.com/ninja-build/ninja.git
cd ninja
git checkout release
./configure.py --bootstrap
./ninja --version
1.11.1
However, I am trying to install it system-wide but it is only recognizable in ~/programs/ninja. Shouldn't ./configure.py --bootstrap install it automatically?
How can I install it in /usr/bin/ninja?
After build ninja move it to /usr/bin
mv ./ninja /usr/bin

how to install gcc-12 on ubuntu

$ sudo apt search gcc-12
Sorting... Done
Full Text Search... Done
$ uname -a
Linux Han 5.10.81.1-microsoft-standard-WSL2 #1 SMP Mon Nov 22 18:52:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I am using the default sources.list file, I want to install gcc-12 but I can't find it in the mirror source, what should I do!
gcc-12 is not available in ubuntu 20.04, so we need to compile it from source code, here are the steps which I borrowed from this video:
Step 1: clone gcc source code and checkout gcc-12 branch
$ git clone https://gcc.gnu.org/git/gcc.git gcc-source
$ cd gcc-source/
$ git branch -a
$ git checkout remotes/origin/releases/gcc-12
Step 2: make another build dir
Note this is important as running ./configure from within the source directory is not supported as documented here.
$ mkdir ../gcc-12-build
$ cd ../gcc-12-build/
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
Step 3: installing GCC prequisites and run configure again
The missing libraries will be shown in above ./confgiure output, search and install them one by one.
$ apt-cache search MPFR
$ sudo apt-get install libmpfrc++-dev
$ apt-cache search MPC | grep dev
$ sudo apt-get install libmpc-dev
$ apt-cache search GMP | grep dev
$ sudo apt-get install libgmp-dev
$ sudo apt-get install gcc-multilib
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
An alternartive is to run the download_prerequisites script.
$ cd ../
$ cd gcc-source/
$ ./contrib/download_prerequisites
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
Step 4: compile gcc-12
$ make -j16
Still flex is missing:
$ sudo apt-get install flex
$ ./../gcc-source/configure --prefix=$HOME/install/gcc-12 --enable-languages=c,c++
$ make -j16
$ make install
Another way is to use Ubuntu 22.04 where gcc-12 is available. In Ubuntu 22.04, gcc-12 can be installed with apt:
$ sudo apt install gcc-12
You can use Homebrew to install pre-built binaries.
Follow instructions to install Homebrew at https://brew.sh/, then
brew install gcc for default GCC (currently 11) or brew install gcc#12 for gcc-12.
Note that it may compile missing dependencies.
I would add if you are adding for 64 bit only, you'll want to add "--disable=multilib" to the end of your configure statement.

How do I run the ./configure script on git package?

I am trying to install gnash on debian. I did (as root):
git clone git://git.sv.gnu.org/gnash.git
cd gnash/
./configure
And got:
bash: ./configure: No such file or directory
Gnash :
apt-get install g++ autoconf libtool libgconf2-dev libjemalloc-dev libgif-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libspeex-dev libspeexdsp-dev libagg-dev xulrunner-dev libming-dev libming-util mtasc haxe swfmill libcsound64-dev dejagnu
git clone git://git.sv.gnu.org/gnash.git
cd gnash/
./autogen.sh
./configure
make

Install git or update git without apt-get or yum

I have some linux boxes that do not allow me to use yum to install packages. Instead I need to download the zip or tar and then use a package manager to install the items on my linux boxes.
When you go to the git-scm page, the only way they provide to install git is to use yum, apt-get, etc from the command line.
Why is there not just a zip file?
Where can I find the package to install?
Has anyone else had this same issue?
I had the same issue before. I tried to install git from source and it works.
Intalling these packages first:
curl
autoconf
zlib-devel
openssl-devel
perl
cpio
expat-devel
gettext-devel
Getting the GIT scm source code:
git-latest.tar.gz
Compiling the GIT scm from source
tar xzvf git-latest.tar.gz
cd git-{date} // edit it
autoconf
./configure --with-curl=/usr/local
make
make install

How do I install Cppcheck using the tar file on Linux?

I'm trying to install Cppcheck via telnet on a Linux box. I have the cppcheck-1.67.tar file and I untar it. I don't see anything that will install it for me. Am I approaching this the correct way?
Actual on a date publication of this answer.
Download file from there https://sourceforge.net/projects/cppcheck/
Go to the folder with for downloads
cd ~/Downloads/
Unpack archive
tar -xvf cppcheck-1.76.1.tar.bz2
Go to unpacked folder
cd cppcheck-1.76.1/
Install package as root
sudo make install
Check up result
$ which cppcheck
/usr/bin/cppcheck
Testing it
$ touch simple.c
$ echo "int main(){ int a; a + 1; return 0}" > simple.c
$ cppcheck simple.c
Checking simple.c ...
[simple.c:1]: (error) Uninitialized variable: a
This package also exists in a standard repository.
$ aptitude search cppcheck
p cppcheck - tool for static C/C++ code analysis
Testing environment
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
$ uname -a
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
The instructions are in the readme.txt file. The short answer is make install.
Remember never to install things from a tar file when you can use your distribution's package manager.
The readme.txt file makes no mention of "make install".
It looks like the supplied Makefile is borked:
It passes "CFG=" param to compile, without DESTDIR
But "make install" prepends DESTDIR to CFGDIR
In my case, I edited Makefile to remove DESTDIR from make install, and cppcheck is happy with that.
For me the magic lines turned out to be the following in Docker on Ubuntu 18.04 (Bionic Beaver):
RUN cd /tmp \
&& git clone https://github.com/danmar/cppcheck.git \
&& cd cppcheck \
&& git checkout 1.72 \
&& make SRCDIR=build CFGDIR=/usr/bin/cfg HAVE_RULES=yes install \
&& cd /tmp \
&& rm -rf /tmp/cppcheck \
&& ldconfig
I assume the following will work for any version. I am not sure where it makes sense to install the configuration to. This works for me:
make SRCDIR=build CFGDIR=/usr/bin/cfg HAVE_RULES=yes install
If you want a later version than in the other answers, and you want to install it, then you can use the bash script below which is up to date and builds on the other answers. It should also clean itself up afterwards. It works for version 2.7 on debian/ubuntu but you can change the git checkout tag and try your luck on newer versions.
installcppcheck.sh
#!/usr/bin/env bash
set -e
cd /tmp
git clone https://github.com/danmar/cppcheck.git
cd cppcheck
git checkout 2.7
make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
cd /tmp
rm -rf /tmp/cppcheck
ldconfig
cppcheck --version
If you don't have sudo privileges you can follow #Seti Volkylany's answer, replacing step 5 with
OUT_PATH=/home/user/bin # target location of binary
make SRCDIR=build CFGDIR=~/Downloads/cppcheck-1.76.1/cfg PREFIX=$OUT_PATH
make install CFGDIR=$OUT_PATH/cppcheck-1.76.1/cfg PREFIX=$OUT_PATH

Resources