Commit e6ee5434 authored by Vincent Wei's avatar Vincent Wei

Merge branch 'master' of gitlab.fmsoft.cn:VincentWei/build-minigui-4-0

parents 04f52ec8 b41dacbd
# Building MiniGUI 4.0
- [Prerequisites](#prerequisites)
- [Steps](#steps)
- [Commands to build dependencies](#commands-to-build-dependencies)
- [Cross Building](#cross-building)
- [Change Log](#change-log)
- [Copying](#copying)
+ [Special Statement](#special-statement)
+ [Other Notes](#other-notes)
This repo contains some scripts and dependencies to build MiniGUI 4.0.x
This instruction assumes that you are using Ubuntu Linux 16.04 LTS or 18.04 LTS.
......@@ -119,6 +128,21 @@ $ make; sudo make install
$ cd ../..
```
## Cross Building
MiniGUI 4.0.x can run on lots of CPUs with different architechtures, such as
ARM, MIPS and so on, after cross compiled. There is a directory named
"cross-build", in which there are some scripts for cross compile.
As an example, there is a directory name "arm-r16-linux", which means: This
directory is for ARM CPU --- r16, and the Operation System is Linux. In this
directory, there are two scipts for download packages, and build MiniGUI 4.0.x
for ARM version. You can read the README.md in this directory in detail:
- [arm-r16-linux](cross-build/arm-r16-linux/README.md)
Of course you can build your own directory for your developped CPU and OS.
## Change Log
Currently, this repo just includes some scripts to build MiniGUI 4.0.x
......
......@@ -18,9 +18,3 @@ cmake .
make -j$NR_JOBS; sudo make install
cd ../..
echo "BUILDING harfbuzz"
cd 3rd-party/harfbuzz
./autogen.sh
./config-extern.sh
make -j$NR_JOBS; sudo make install
cd ../..
# Cross Compile MiniGUI 4.0 on r16
This repo contains some scripts to fetch and build MiniGUI 4.0.x
This instruction assumes that you are using Ubuntu Linux 18.04 LTS.
- [Current Status](#current-status)
+ [Known issues](#known-issues)
+ [Upcoming features](#upcoming-features)
- [Building MiniGUI 4.0](#building-minigui-50)
+ [Prerequisites](#prerequisites)
+ [Building steps](#building-steps)
+ [Options for build-minigui.sh script](#options-for-build-miniguish-script)
+ [Notes for demos](#notes-for-demos)
+ [Commands to build dependencies](#commands-to-build-dependencies)
- [Change Log](#change-log)
- [Copying](#copying)
+ [Special Statement](#special-statement)
+ [Other Notes](#other-notes)
## Building MiniGUI 4.0 on R16
### Prerequisites
You should run `apt install <package_name>` to install the following packages
on your Ubuntu Linux.
* Building tools:
* git
* gcc/g++
* binutils
* autoconf/automake
* libtool
* make
* cmake
* pkg-config
* meson
* ninja
* tools Kit for r16
* Dependent libraries:
Some dependent libraries will be compiled with r16 tools kit, and others will
be compiled with packages downloaded.
You can run the following commands to install all above software packages on Ubuntu 18.04:
```
$ sudo apt install git g++ binutils autoconf automake libtool make cmake pkg-config
$ sudo apt-get install meson
$ sudo apt-get install ninja
```
### Building steps
Please make sure that you can visit GitHub and you can do `sudo` on your Linux box.
1. Build your r16 System:
```
$ cd your-r16/tinav2.5
$ source ./build/envsetup.sh
$ lunch
choose your develop board type.
$ make menuconfig
$ make
```
In this step, when you run command 'make menuconfig', your MUST select option:
```
choose Libraries -> SSL -> libopenssl, and select all options
choose Libraries -> libcurl, libxml2
```
DO NOT Choose:
```
choose Libraries -> libfreetype, libjpeg, libpng, zlib
```
After command "make", you will get the rootfs for r16, and libopenssl and libxml2 are
inclusive.
1. Modify the file: modify-this-config.sh
In file modify-this-config.sh, there are some variables which will be used in cross
compile process. The only line you have to modify is:
```
TINA_DIR=/home/projects/r16/tinav2.5
```
You change this path according to your system.
The other line:
```
REPO_URL=https://gitlab.fmsoft.cn/VincentWei
```
You can modify with other url address, which download speed is high.
1. Run `fetch-all.sh` to fetch all source from GitHub:
```
$ ./fetch-all.sh
```
This script creates a directroy named "3rd-party", and packages will be downloaded
in this directory, and decompressed.
1. Run `build-all.sh` to build and install libraries:
```
$ ./build-all.sh
```
After cross compile, there is a directory named "rootfs", which stores all output
libraries. You can copy the contents in this directory to your r16 rootfs, and in
your r16 path, use command:
```
$ pack -d
```
to make our r16 image files.
## Change Log
Currently, this repo just includes some scripts to build MiniGUI 4.0.x
core, components, and demonstration apps.
## Copying
Copyright (C) 2018 ~ 2020 Beijing FMSoft Technologies Co., Ltd.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This diff is collapsed.
diff -Naur ./constraints/cpDampedRotarySpring.h /home/gengyue/constraints/cpDampedRotarySpring.h
--- ./constraints/cpDampedRotarySpring.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpDampedRotarySpring.h 2020-04-12 17:11:06.212380416 +0800
@@ -21,7 +21,7 @@
typedef cpFloat (*cpDampedRotarySpringTorqueFunc)(struct cpConstraint *spring, cpFloat relativeAngle);
-const cpConstraintClass *cpDampedRotarySpringGetClass();
+const cpConstraintClass *cpDampedRotarySpringGetClass(void);
typedef struct cpDampedRotarySpring {
cpConstraint constraint;
diff -Naur ./constraints/cpDampedSpring.h /home/gengyue/constraints/cpDampedSpring.h
--- ./constraints/cpDampedSpring.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpDampedSpring.h 2020-04-12 17:11:06.212380416 +0800
@@ -23,7 +23,7 @@
typedef cpFloat (*cpDampedSpringForceFunc)(struct cpConstraint *spring, cpFloat dist);
-const cpConstraintClass *cpDampedSpringGetClass();
+const cpConstraintClass *cpDampedSpringGetClass(void);
typedef struct cpDampedSpring {
cpConstraint constraint;
diff -Naur ./constraints/cpGearJoint.h /home/gengyue/constraints/cpGearJoint.h
--- ./constraints/cpGearJoint.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpGearJoint.h 2020-04-12 17:11:06.212380416 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpGearJointGetClass();
+const cpConstraintClass *cpGearJointGetClass(void);
typedef struct cpGearJoint {
cpConstraint constraint;
diff -Naur ./constraints/cpGrooveJoint.h /home/gengyue/constraints/cpGrooveJoint.h
--- ./constraints/cpGrooveJoint.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpGrooveJoint.h 2020-04-12 17:11:06.212380416 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpGrooveJointGetClass();
+const cpConstraintClass *cpGrooveJointGetClass(void);
typedef struct cpGrooveJoint {
cpConstraint constraint;
diff -Naur ./constraints/cpPinJoint.h /home/gengyue/constraints/cpPinJoint.h
--- ./constraints/cpPinJoint.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpPinJoint.h 2020-04-12 17:11:06.216380388 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpPinJointGetClass();
+const cpConstraintClass *cpPinJointGetClass(void);
typedef struct cpPinJoint {
cpConstraint constraint;
diff -Naur ./constraints/cpPivotJoint.h /home/gengyue/constraints/cpPivotJoint.h
--- ./constraints/cpPivotJoint.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpPivotJoint.h 2020-04-12 17:11:06.212380416 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpPivotJointGetClass();
+const cpConstraintClass *cpPivotJointGetClass(void);
typedef struct cpPivotJoint {
cpConstraint constraint;
diff -Naur ./constraints/cpRatchetJoint.h /home/gengyue/constraints/cpRatchetJoint.h
--- ./constraints/cpRatchetJoint.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpRatchetJoint.h 2020-04-12 17:11:06.212380416 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpRatchetJointGetClass();
+const cpConstraintClass *cpRatchetJointGetClass(void);
typedef struct cpRatchetJoint {
cpConstraint constraint;
diff -Naur ./constraints/cpRotaryLimitJoint.h /home/gengyue/constraints/cpRotaryLimitJoint.h
--- ./constraints/cpRotaryLimitJoint.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpRotaryLimitJoint.h 2020-04-12 17:11:06.212380416 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpRotaryLimitJointGetClass();
+const cpConstraintClass *cpRotaryLimitJointGetClass(void);
typedef struct cpRotaryLimitJoint {
cpConstraint constraint;
diff -Naur ./constraints/cpSimpleMotor.h /home/gengyue/constraints/cpSimpleMotor.h
--- ./constraints/cpSimpleMotor.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpSimpleMotor.h 2020-04-12 17:11:06.212380416 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpSimpleMotorGetClass();
+const cpConstraintClass *cpSimpleMotorGetClass(void);
typedef struct cpSimpleMotor {
cpConstraint constraint;
diff -Naur ./constraints/cpSlideJoint.h /home/gengyue/constraints/cpSlideJoint.h
--- ./constraints/cpSlideJoint.h 2020-04-09 17:53:05.000000000 +0800
+++ /home/gengyue/constraints/cpSlideJoint.h 2020-04-12 17:11:06.216380388 +0800
@@ -19,7 +19,7 @@
* SOFTWARE.
*/
-const cpConstraintClass *cpSlideJointGetClass();
+const cpConstraintClass *cpSlideJointGetClass(void);
typedef struct cpSlideJoint {
cpConstraint constraint;
#!/bin/bash
# ================ Get global settings ===================
source modify-this-config.sh
# ================ Get global settings ===================
# ================ Get 3rd-party packages ================
# create 3rd-party directory
rm -fr 3rd-party
mkdir 3rd-party
cd 3rd-party
# get 3rd-party libaries now
for comp in harfbuzz chipmunk; do
git clone $REPO_URL/$comp.git;
done
# get zlib-dev
wget http://minigui.org/downloads/common/zlib-1.2.8.tar.gz
tar zxf zlib-1.2.8.tar.gz
rm -f zlib-1.2.8.tar.gz
# get libjpeg-dev
wget http://minigui.org/downloads/common/jpegsrc.v7.tar.gz
tar zxf jpegsrc.v7.tar.gz
rm -f jpegsrc.v7.tar.gz
# get libpng-dev (libpng-dev on Ubuntu Linux 18.04 instead)
wget http://minigui.org/downloads/common/libpng-1.6.36.tar.gz
tar zxf libpng-1.6.36.tar.gz
rm -f libpng-1.6.36.tar.gz
# get libfreetype6-dev
wget http://minigui.org/downloads/common/freetype-2.6.1.tar.gz
tar zxf freetype-2.6.1.tar.gz
rm -f freetype-2.6.1.tar.gz
#get libmtdev
wget http://minigui.org/downloads/common/mtdev-1.1.4.tar.gz
tar zxf mtdev-1.1.4.tar.gz
rm -f mtdev-1.1.4.tar.gz
#get libudev
wget http://minigui.org/downloads/common/udev-182.tar.gz
tar zxf udev-182.tar.gz
rm -f udev-182.tar.gz
#get libevdev
wget http://minigui.org/downloads/common/libevdev-1.8.0.tar.xz
tar xvJf libevdev-1.8.0.tar.xz
rm -f libevdev-1.8.0.tar.xz
#get kmoddev
wget http://minigui.org/downloads/common/kmod_26.orig.tar.gz
tar zxf kmod_26.orig.tar.gz
rm -f kmod_26.orig.tar.gz
#get libblkid-dev
wget http://minigui.org/downloads/common/util-linux_2.31.1.orig.tar.xz
tar xvJf util-linux_2.31.1.orig.tar.xz
rm -f util-linux_2.31.1.orig.tar.xz
# get libinput-dev
wget http://minigui.org/downloads/common/libinput-1.10.0.tar.xz
tar xvJf libinput-1.10.0.tar.xz
rm -f libinput-1.10.0.tar.xz
# get libdrm-dev
wget http://minigui.org/downloads/common/libdrm_2.4.99.orig.tar.gz
tar zxf libdrm_2.4.99.orig.tar.gz
rm -f libdrm_2.4.99.orig.tar.gz
# get libsqlite3-dev
wget http://minigui.org/downloads/common/sqlite-autoconf-3310100.tar.gz
tar zxf sqlite-autoconf-3310100.tar.gz
rm -f sqlite-autoconf-3310100.tar.gz
cd ..
# ================ Get 3rd-party packages ================
# ================ Get MiniGUI packages ==================
# MiniGUI, MiniGUI components and samples, demos
# Now, mg-test only for intel cpu, so do not compile it.
for comp in minigui-res minigui mgutils mgplus mgeff mgncs mgncs4touch mg-samples mg-demos; do
git clone $REPO_URL/$comp.git -b $BRANCH_NAME
done
# ================ Get MiniGUI packages ==================
# ================ Create root filesystem ================
mkdir ./rootfs
mkdir ./rootfs/etc
mkdir ./rootfs/usr
mkdir ./rootfs/usr/local
mkdir ./rootfs/usr/local/lib
mkdir ./rootfs/usr/local/include
mkdir ./rootfs/usr/local/etc
# ================ Create root filesystem ================
diff -Naur ./meson_options.txt ../gengyue/meson_options.txt
--- ./meson_options.txt 2018-02-13 09:51:33.000000000 +0800
+++ ../gengyue/meson_options.txt 2020-04-13 16:26:22.721825431 +0800
@@ -4,17 +4,17 @@
description: 'udev base directory [default=$prefix/lib/udev]')
option('libwacom',
type: 'boolean',
- value: true,
+ value: false,
description: 'Use libwacom for tablet identification (default=true)')
option('debug-gui',
type: 'boolean',
- value: true,
+ value: false,
description: 'Enable the "debug-gui" feature in the libinput tool [default=true]')
option('tests',
type: 'boolean',
- value: true,
+ value: false,
description: 'Build the tests [default=true]')
option('documentation',
type: 'boolean',
- value: true,
+ value: false,
description: 'Build the documentation [default=true]')
[binaries]
c = 'arm-openwrt-linux-muslgnueabi-gcc'
cpp = 'arm-openwrt-linux-muslgnueabi-g++'
ar = 'arm-openwrt-linux-muslgnueabi-ar'
strip = 'arm-openwrt-linux-muslgnueabi-strip'
c_ld = 'arm-openwrt-linux-muslgnueabi-ld'
cpp_ld = 'arm-openwrt-linux-muslgnueabi-ld'
pkgconfig = 'pkg-config'
[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'R16-ARMv8'
endian = 'little'
[build_machine]
system = 'linux'
cpu_family = 'x86_64'
cpu = 'i686'
endian = 'little'
[properties]
c_args = ['-Icurrent_path/rootfs/usr/local/include']
c_link_args = ['-Lcurrent_path/rootfs/usr/local/lib']
cpp_args = ['-Icurrent_path/rootfs/usr/local/include']
cpp_link_args = ['-Lcurrent_path/rootfs/usr/local/lib']
[paths]
prefix = 'current_path/rootfs/usr/local'
# This is the template of `myconfig.sh`, and the later
# will be included in every script.
# You must set TINA_DIR for r16 tina dirctory.
# It is the ONLY line you have to modify in the whole compiling process.
TINA_DIR=/home/projects/r16/tinav2.5
#
# The URL prefix of remote repository.
# Use this if you want to visit GitHub via HTTPS
REPO_URL=https://gitlab.fmsoft.cn/VincentWei
# Use this one if you can visit GitHub via SSH
# REPO_URL=git@github.com:VincentWei
# Use this one if you are a developer of MiniGUI
# REPO_URL=git4os@gitlab.fmsoft.cn:VincentWei
#
# The branch name; MiniGUI 4.0.x are located in rel-4-0 branch
BRANCH_NAME=rel-4-0
#
# Global configuration options
#GOPTS="--enable-develmode"
GOPTS=
#
# The runtime mode of MiniGUI; can be ths, procs, or sa.
RUNMODE=ths
#
# extra options for configuring MiniGUI core.
# MGOPTS="--with-targetname=external"
MGOPTS=
#
# The jobs number for building source.
NRJOBS=`getconf _NPROCESSORS_ONLN`
......@@ -10,7 +10,7 @@ source myconfig.sh
git clone $REPO_URL/gvfb.git
# The third-party libraries, alawys in master
for comp in harfbuzz chipmunk; do
for comp in chipmunk; do
cd 3rd-party; git clone $REPO_URL/$comp.git; cd ..
done
......
......@@ -35,7 +35,7 @@ for comp in minigui minigui-res mgutils mgplus mgeff mgncs mg-tests mg-samples m
done
echo MAKE TARBALLS OF THIRD-PARTY PACKAGES
for comp in chipmunk harfbuzz; do
for comp in chipmunk; do
cd 3rd-party/$comp
make dist || make package_source
mv *.tar.[xgb]z* ../..
......
......@@ -11,7 +11,7 @@ echo Updating gvfb
cd gvfb; git pull; cd ..
# The third-party libraries
for comp in harfbuzz chipmunk; do
for comp in chipmunk; do
echo Updating $comp
cd 3rd-party/$comp; git pull; cd ../..
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment