画像は Bing Image Creator より (トラブル防止のため商用利用禁止、無断転載禁止)。



MuditaOS (Mudita Pure on Linux Simulator) のビルド方法です。 VirtualBox, Ubuntu 20.04 や Mozc のインストールなどは済ませてあるものとします。


参考:


ビルド要件としてメモリは8GB, ディスク容量は 40GB 以上必要です。CPUはシングルコアでも問題ありません。ビルド時間短縮のためSSD または RAMディスク推奨です。パソコンやプログラミング初心者にとって苦痛かもしれませんがゆっくり進めてかまいません。


Github アカウントの作成や API の設定などしなくても、とりあえずネットに接続してあればビルドはできます。オフラインでビルド作業するのでしたらバージョン情報の取得・生成処理とアセットのダウンロード処理部分に関するスクリプトの書き換えが必要になります。


MuditaOS の評価・ビルド環境として構築した仮想マシンイメージの外部共有をしないであれば正規の手順で行うことをお勧めします。

 

省略したものや手違いで Harmony のビルドログも混ざってしまっているので、あくまで参考程度です。

この記事の修正は合間を見て修正しますが、これをもって MuditaOS のビルド方法に関する解説を終了とさせていただきます。

 

sudoの設定をしていないアカウントの場合は、このページの後半にある手順を参照してください。


muditaos@muditaos:~/MuditaOS$ apt sudo install git -y
muditaos@muditaos:~/MuditaOS$ apt sudo install gcc-10 -y
muditaos@muditaos:~/MuditaOS$ apt sudo install cmake -y
muditaos@muditaos:~/MuditaOS$ apt sudo install ninja-build -y
muditaos@muditaos:~/MuditaOS$ apt sudo install clang-tidy
muditaos@muditaos:~/MuditaOS$ apt sudo install libdev-icu
muditaos@muditaos:~/MuditaOS$ apt sudo install cchache -y

これで数十ギガバイト程度の通信容量を使いますので注意してください。
muditaos@muditaos:~/MuditaOS$ git clone --recurse-submodules https://github.com/mudita/MuditaOS.git


未検証: シャロ―コピーではリビジョンが取得できないらしいので気にする人は使わないこと。
muditaos@muditaos:~/MuditaOS$ git clone -b master --depth=1 --single-branch --recurse-submodules https://github.com/mudita/MuditaOS.git

※リポジトリからMuditaOSのzip/tar.gzアーカイブを持ってきた場合はサブモジュールがアーカイブに含まれていないためサブモジュールの更新が必要だと思います (quickstart_ja-jp.md参照)。


muditaos@muditaos:~/MuditaOS$ cd MuditaOS
muditaos@muditaos:~/MuditaOS$ cd config && ./bootstrap.sh 0-

---- bootstrap.sh
*このスクリプトは root 権限での実行ははじかれます。

muditaos@muditaos:~/MuditaOS$ cd config && ./bootstrap.sh 0-
test_if_run_as_root
START:install_hooks(0)
END:(10)
install_hooks
Install style checking hooks
by default hook is reporting error only
if you would like to make it automatically fix style errors add config "user.fixinstage" to your git configuration:
    git config user.fixinstage true
add_ignore_revs_for_blame
install_ubuntu_packages
# Install necessary packages
This will change your system, press CTRL+C if you do not want to install required packages, or press enter to continue...

(ここでEnterキーを押す)

[sudo] password for muditaos: 

(root アカウント以外ではパスワードの入力)


アップグレード: 28 個、新規インストール: 166 個、削除: 0 個、保留: 262 個。
180 MB 中 178 MB のアーカイブを取得する必要があります。
この操作後に追加で 918 MB のディスク容量が消費されます。
続行しますか? [Y/n] y


ここで Terminal を再起動。

各種 json を参考に Public Asset は image ディレクトリにコピーしておく。

muditaos@muditaos:~/MuditaOS$ cd ..
muditaos@muditaos:~/MuditaOS$ sudo apt install python3.8-venv
muditaos@muditaos:~/MuditaOS$ python3 -m venv venv
muditaos@muditaos:~/MuditaOS$ source venv/bin/activate
muditaos@muditaos:~/MuditaOS$ pip3 install -r docker/assets/requirements.txt
muditaos@muditaos:~/MuditaOS$ ./configure.sh BellHybrid linux debug -DASSETS_TYPE=Community "-G Ninja"
build dir:
    build-BellHybrid-linux-Debug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/home/muditaos/MuditaOS/Target_Linux.cmake -DPRODUCT=BellHybrid -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DWITH_DEVELOPMENT_FEATURES=OFF -DASSETS_TYPE=Community -G Ninja /home/muditaos/MuditaOS 
-- The C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
Setting PROJECT_LIB_DIRECTORY to /home/muditaos/MuditaOS/build-BellHybrid-linux-Debug/lib/
Selected product: BellHybrid
Selected board:   linux
Board revision:   1
PROJECT_TARGET:   TARGET_Linux
Assets version:   Community
Version:          ..-
Project target name: linux
CMake Deprecation Warning at test/googletest/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at test/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at test/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.10") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
Adding disk image target: Test.img
-- Performing Test FLAG_SUPPORTED_stdc89
-- Performing Test FLAG_SUPPORTED_stdc89 - Success
-- Performing Test FLAG_SUPPORTED_pedantic
-- Performing Test FLAG_SUPPORTED_pedantic - Success
-- Performing Test FLAG_SUPPORTED_Wall
-- Performing Test FLAG_SUPPORTED_Wall - Success
-- Performing Test FLAG_SUPPORTED_Wextra
-- Performing Test FLAG_SUPPORTED_Wextra - Success
-- Performing Test FLAG_SUPPORTED_Werror
-- Performing Test FLAG_SUPPORTED_Werror - Success
-- Performing Test FLAG_SUPPORTED_Wstrictprototypes
-- Performing Test FLAG_SUPPORTED_Wstrictprototypes - Success
-- Performing Test FLAG_SUPPORTED_Wwritestrings
-- Performing Test FLAG_SUPPORTED_Wwritestrings - Success
-- Performing Test FLAG_SUPPORTED_Wshadow
-- Performing Test FLAG_SUPPORTED_Wshadow - Success
-- Performing Test FLAG_SUPPORTED_Winitself
-- Performing Test FLAG_SUPPORTED_Winitself - Success
-- Performing Test FLAG_SUPPORTED_Wcastalign
-- Performing Test FLAG_SUPPORTED_Wcastalign - Success
-- Performing Test FLAG_SUPPORTED_Wformat2
-- Performing Test FLAG_SUPPORTED_Wformat2 - Success
-- Performing Test FLAG_SUPPORTED_Wmissingprototypes
-- Performing Test FLAG_SUPPORTED_Wmissingprototypes - Success
-- Performing Test FLAG_SUPPORTED_Wstrictoverflow2
-- Performing Test FLAG_SUPPORTED_Wstrictoverflow2 - Success
-- Performing Test FLAG_SUPPORTED_Wcastqual
-- Performing Test FLAG_SUPPORTED_Wcastqual - Success
-- Performing Test FLAG_SUPPORTED_Wundef
-- Performing Test FLAG_SUPPORTED_Wundef - Success
-- Performing Test FLAG_SUPPORTED_Wswitchdefault
-- Performing Test FLAG_SUPPORTED_Wswitchdefault - Success
-- Performing Test FLAG_SUPPORTED_Wconversion
-- Performing Test FLAG_SUPPORTED_Wconversion - Success
-- Performing Test FLAG_SUPPORTED_Wccompat
-- Performing Test FLAG_SUPPORTED_Wccompat - Success
-- Performing Test FLAG_SUPPORTED_fstackprotectorstrong
-- Performing Test FLAG_SUPPORTED_fstackprotectorstrong - Success
-- Performing Test FLAG_SUPPORTED_Wcomma
-- Performing Test FLAG_SUPPORTED_Wcomma - Failed
-- Performing Test FLAG_SUPPORTED_Wdoublepromotion
-- Performing Test FLAG_SUPPORTED_Wdoublepromotion - Success
-- Performing Test FLAG_SUPPORTED_Wparentheses
-- Performing Test FLAG_SUPPORTED_Wparentheses - Success
-- Performing Test FLAG_SUPPORTED_Wformatoverflow
-- Performing Test FLAG_SUPPORTED_Wformatoverflow - Success
-- Performing Test FLAG_SUPPORTED_Wunusedmacros
-- Performing Test FLAG_SUPPORTED_Wunusedmacros - Success
-- Performing Test FLAG_SUPPORTED_Wmissingvariabledeclarations
-- Performing Test FLAG_SUPPORTED_Wmissingvariabledeclarations - Failed
-- Performing Test FLAG_SUPPORTED_Wusedbutmarkedunused
-- Performing Test FLAG_SUPPORTED_Wusedbutmarkedunused - Failed
-- Performing Test FLAG_SUPPORTED_Wswitchenum
-- Performing Test FLAG_SUPPORTED_Wswitchenum - Success
-- Performing Test FLAG_SUPPORTED_fvisibilityhidden
-- Performing Test FLAG_SUPPORTED_fvisibilityhidden - Success
Adding test entity: platform
test assets: test1.txt;test2.txt;test_dir2/test1.txt;test_dir2/test2.txt;test_read_1.txt
Adding test entity: sys
Adding test entity: utils
Adding test entity: vfs
Adding test entity: gui
Adding test entity: db
Adding test entity: cellular
Adding test entity: audio
Adding test entity: tagsfetcher
Adding test entity: services
configurables added: antenna;appmgr;audio;bluetooth;cellular;db;desktop;eink;evtmgr;fileindexer;gui;time;test
-> configuring option and define for: antenna
    adding option: antenna
    adding definition for: antenna
-> configuring option and define for: appmgr
    adding option: appmgr
    adding definition for: appmgr
-> configuring option and define for: audio
    adding option: audio
    adding definition for: audio
-> configuring option and define for: bluetooth
    adding option: bluetooth
    adding definition for: bluetooth
service-bluetooth  /home/muditaos/MuditaOS/module-services/service-bluetooth
-> configuring option and define for: cellular
    adding option: cellular
    adding definition for: cellular
service-cellular  /home/muditaos/MuditaOS/module-services/service-cellular
service-cellular-call  /home/muditaos/MuditaOS/module-services/service-cellular/call
-> configuring option and define for: db
    adding option: db
    adding definition for: db
service-db  /home/muditaos/MuditaOS/module-services/service-db
-> configuring option and define for: desktop
    adding option: desktop
    adding definition for: desktop
-> configuring option and define for: eink
    adding option: eink
    adding definition for: eink
service-eink  /home/muditaos/MuditaOS/module-services/service-eink
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'gtkmm-3.0'
--   Found gtkmm-3.0, version 3.24.2
-> configuring option and define for: evtmgr
    adding option: evtmgr
    adding definition for: evtmgr
-> configuring option and define for: fileindexer
    adding option: fileindexer
    adding definition for: fileindexer
-> configuring option and define for: gui
    adding option: gui
    adding definition for: gui
-> configuring option and define for: test
-> configuring option and define for: time
    adding option: time
    adding definition for: time
service-time  /home/muditaos/MuditaOS/module-services/service-time
defines for ENABLED_SERVICES_DEFINES set to: ENABLE_SERVICE_ANTENNA;ENABLE_SERVICE_APPMGR;ENABLE_SERVICE_AUDIO;ENABLE_SERVICE_BLUETOOTH;ENABLE_SERVICE_CELLULAR;ENABLE_SERVICE_DB;ENABLE_SERVICE_DESKTOP;ENABLE_SERVICE_EINK;ENABLE_SERVICE_EVTMGR;ENABLE_SERVICE_FILEINDEXER;ENABLE_SERVICE_GUI;ENABLE_SERVICE_TIME
Adding test entity: apps
configurables added: alarm-clock;antenna;calculator;calendar;call;desktop;meditation;messages;music-player;notes;onboarding;phonebook;calllog;special-input;settings;test
-> configuring option and define for: alarm-clock
    adding option: alarm-clock
    adding definition for: alarm-clock
-> configuring option and define for: antenna
-> configuring option and define for: calculator
    adding option: calculator
    adding definition for: calculator
-> configuring option and define for: calendar
    adding option: calendar
    adding definition for: calendar
-> configuring option and define for: call
    adding option: call
    adding definition for: call
-> configuring option and define for: calllog
    adding option: calllog
    adding definition for: calllog
-> configuring option and define for: desktop
    adding option: desktop
    adding definition for: desktop
-> configuring option and define for: meditation
    adding option: meditation
    adding definition for: meditation
-> configuring option and define for: messages
    adding option: messages
    adding definition for: messages
-> configuring option and define for: music-player
    adding option: music-player
    adding definition for: music-player
-> configuring option and define for: notes
    adding option: notes
    adding definition for: notes
-> configuring option and define for: onboarding
    adding option: onboarding
    adding definition for: onboarding
-> configuring option and define for: phonebook
    adding option: phonebook
    adding definition for: phonebook
-> configuring option and define for: settings
    adding option: settings
    adding definition for: settings
-> configuring option and define for: special-input
    adding option: special-input
    adding definition for: special-input
-> configuring option and define for: test
defines for ENABLED_APPS_DEFINES set to: ENABLE_APP_ALARM_CLOCK;ENABLE_APP_CALCULATOR;ENABLE_APP_CALENDAR;ENABLE_APP_CALL;ENABLE_APP_CALLLOG;ENABLE_APP_DESKTOP;ENABLE_APP_MEDITATION;ENABLE_APP_MESSAGES;ENABLE_APP_MUSIC_PLAYER;ENABLE_APP_NOTES;ENABLE_APP_ONBOARDING;ENABLE_APP_PHONEBOOK;ENABLE_APP_SETTINGS;ENABLE_APP_SPECIAL_INPUT
Adding test entity: bluetooth
Linux specific includes
-----------------------
-- Found BLKID: /usr/include/blkid  
-- Found FUSE: /usr/include  
# date: USE_SYSTEM_TZ_DB OFF
# date: MANUAL_TZ_DB OFF
# date: USE_TZ_DB_IN_DOT OFF
# date: BUILD_SHARED_LIBS OFF
# date: ENABLE_DATE_TESTING OFF
# date: DISABLE_STRING_VIEW OFF
-- Performing Test C_SUPPORTS_NO_FORMAT_TRUNCATION
-- Performing Test C_SUPPORTS_NO_FORMAT_TRUNCATION - Success
-- Performing Test C_SUPPORTS_NO_STRINGOP_TRUNCATION
-- Performing Test C_SUPPORTS_NO_STRINGOP_TRUNCATION - Success
-- Performing Test C_SUPPORTS_NO_MAYBE_UNINITIALIZED
-- Performing Test C_SUPPORTS_NO_MAYBE_UNINITIALIZED - Success
-- Found Perl: /usr/bin/perl (found version "5.30.0") 
-- Found the following ICU libraries:
--   uc (required)
--   i18n (required)
-- Failed to find all ICU components (missing: ICU_LIBRARY) (found version "66.1")
-- Optional package Berkeley DB was not found
-- Looking for include file byteswap.h
-- Looking for include file byteswap.h - found
-- Looking for include file dirent.h
-- Looking for include file dirent.h - found
-- Looking for include file endian.h
-- Looking for include file endian.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for include file sys/endian.h
-- Looking for include file sys/endian.h - not found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/utsname.h
-- Looking for include file sys/utsname.h - found
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file wctype.h
-- Looking for include file wctype.h - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- Looking for access
-- Looking for access - found
-- Looking for fork
-- Looking for fork - found
-- Looking for getopt
-- Looking for getopt - found
-- Looking for getpid
-- Looking for getpid - found
-- Looking for getpwent
-- Looking for getpwent - found
-- Looking for gmtime_r
-- Looking for gmtime_r - found
-- Looking for localtime_r
-- Looking for localtime_r - found
-- Looking for mkdir
-- Looking for mkdir - found
-- Looking for open
-- Looking for open - found
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for signal
-- Looking for signal - found
-- Looking for stat
-- Looking for stat - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for strncasecmp
-- Looking for strncasecmp - found
-- Looking for read
-- Looking for read - found
-- Looking for unlink
-- Looking for unlink - found
-- Looking for usleep
-- Looking for usleep - found
-- Looking for waitpid
-- Looking for waitpid - found
-- Looking for write
-- Looking for write - found
-- Looking for alarm
-- Looking for alarm - found
-- Looking for iswspace
-- Looking for iswspace - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for unsetenv
-- Looking for unsetenv - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of intptr_t
-- Check size of intptr_t - done
-- Check size of pid_t
-- Check size of pid_t - done
-- Check size of size_t
-- Check size of size_t - done
-- Check size of ssize_t
-- Check size of ssize_t - done
-- Check size of time_t
-- Check size of time_t - done
-- Check size of wint_t
-- Check size of wint_t - failed
-- Looking for pthread_attr_get_np in pthread
-- Looking for pthread_attr_get_np in pthread - found
-- Looking for pthread_getattr_np in pthread
-- Looking for pthread_getattr_np in pthread - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for include files pthread.h, pthread_np.h
-- Looking for include files pthread.h, pthread_np.h - not found
-- Performing Test C_SUPPORTS_UNUSED_BUT_SET
-- Performing Test C_SUPPORTS_UNUSED_BUT_SET - Success
-- Performing Test C_SUPPORTS_LOGICAL_OP
-- Performing Test C_SUPPORTS_LOGICAL_OP - Success
-- Performing Test C_SUPPORTS_POINTER_MEMACCESS
-- Performing Test C_SUPPORTS_POINTER_MEMACCESS - Success
-- Performing Test C_SUPPORTS_FORMAT_SECURITY
-- Performing Test C_SUPPORTS_FORMAT_SECURITY - Success
-- Performing Test C_SUPPORTS_REDUNDANT_DECLS
-- Performing Test C_SUPPORTS_REDUNDANT_DECLS - Success
-- Performing Test CXX_SUPPORTS_UNUSED_BUT_SET
-- Performing Test CXX_SUPPORTS_UNUSED_BUT_SET - Success
-- Performing Test CXX_SUPPORTS_LOGICAL_OP
-- Performing Test CXX_SUPPORTS_LOGICAL_OP - Success
-- Performing Test CXX_SUPPORTS_POINTER_MEMACCESS
-- Performing Test CXX_SUPPORTS_POINTER_MEMACCESS - Success
-- Performing Test CXX_SUPPORTS_REORDER
-- Performing Test CXX_SUPPORTS_REORDER - Success
-- Performing Test CXX_SUPPORTS_FORMAT_SECURITY
-- Performing Test CXX_SUPPORTS_FORMAT_SECURITY - Success
-- Performing Test CXX_SUPPORTS_REDUNDANT_DECLS
-- Performing Test CXX_SUPPORTS_REDUNDANT_DECLS - Success
PROJECT_SOURCE_DIR: /home/muditaos/MuditaOS/third-party/libical/libical
ICALSCRIPTS: /home/muditaos/MuditaOS/third-party/libical/libical/scripts/
-- The following features have been enabled:

 * Option WITH_CXX_BINDINGS, build the C++ bindings. Requires a C++ compiler
 * Option STATIC_ONLY, Build static libraries only.
 * Option USE_BUILTIN_TZDATA, (Careful) Build using libical's built-in timezone data, else use the system timezone data on non-Windows systems. ALWAYS true on Windows. Non-Windows users should know what they're doing if they choose not to use system provided timezone data. The libical project does not guarantee that the built-in timezone data is up-to-date.

-- The following OPTIONAL packages have been found:

 * PythonInterp
 * Threads
 * Git

-- The following REQUIRED packages have been found:

 * BLKID
 * FUSE
 * Perl
   Required by the libical build system.
 * PkgConfig

-- The following features have been disabled:

 * Option SHARED_ONLY, Build shared (dynamic) libraries only. Takes precedence over STATIC_ONLY.
 * RSCALE support (RFC7529), build in RSCALE support
 * Berkeley DB storage support, build in support for Berkeley DB storage
 * Option ICAL_ERRORS_ARE_FATAL, icalerror_* calls will abort instead of internally signaling an error.
 * Option ICAL_ALLOW_EMPTY_PROPERTIES, Prevents empty properties from being replaced with X-LIC-ERROR properties.
 * Option GOBJECT_INTROSPECTION, Build GObject introspection "typelib" files. Requires GObject Introspection development package 0.6.7 or higher.
 * Option ICAL_GLIB_VAPI, Build Vala "vapi" files.
 * Option LIBICAL_BUILD_LIBICALSS, Build libicalss.
 * Option LIBICAL_BUILD_LIBICALVCAL, Build libicalvcal
 * Option ICAL_GLIB, Build libical-glib interface. Requires glib 2.44 and libxml 2.7.3 development packages or higher.
 * Option ABI_DUMPER, (Developer-only) Build for abi-dumper.
 * Option ADDRESS_SANITIZER, (Developer-only) Build with the address sanitizer.
 * Option THREAD_SANITIZER, (Developer-only) Build with the thread sanitizer.
 * Option UNDEFINED_SANITIZER, (Developer-only) Build with the undefined sanitizer.
 * Option ENABLE_LTO_BUILD, Build a link-time optimized version.
 * Option LIBICAL_BUILD_TESTING, Build tests.
 * Option ICAL_BUILD_DOCS, Build documentation

-- The following OPTIONAL packages have not been found:

 * BDB, Berkeley DB storage, <https://www.oracle.com/database/berkeley-db>
   For Berkeley DB storage support

-- The following RECOMMENDED packages have not been found:

 * ICU
   For RSCALE (RFC7529) support

-- Detected PHMAP Version - 1.0.0
-- 
-- 3.11.4.0
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long long
-- Check size of long long - done
-- Check size of wchar_t
-- Check size of wchar_t - done
-- Check size of float
-- Check size of float - done
-- Check size of double
-- Check size of double - done
-- Performing Test HAVE_GCC_ATOMIC
-- Performing Test HAVE_GCC_ATOMIC - Success
-- Performing Test HAVE_GCC_BYTESWAP
-- Performing Test HAVE_GCC_BYTESWAP - Success
-- Performing Test HAVE_VSNPRINTF
-- Performing Test HAVE_VSNPRINTF - Success
-- Performing Test HAVE_ISO_STRDUP
-- Performing Test HAVE_ISO_STRDUP - Failed
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")
-- Ensure your cppunit installed version is at least 1.14.0
CMake Warning at third-party/taglib/CMakeLists.txt:163 (message):
  BUILD_TESTING requested, but CppUnit not found, skipping tests.


-- The following features have been enabled:

 * Option WITH_CXX_BINDINGS, build the C++ bindings. Requires a C++ compiler
 * Option STATIC_ONLY, Build static libraries only.
 * Option USE_BUILTIN_TZDATA, (Careful) Build using libical's built-in timezone data, else use the system timezone data on non-Windows systems. ALWAYS true on Windows. Non-Windows users should know what they're doing if they choose not to use system provided timezone data. The libical project does not guarantee that the built-in timezone data is up-to-date.

-- The following OPTIONAL packages have been found:

 * PythonInterp

-- The following REQUIRED packages have been found:

 * BLKID
 * FUSE
 * Perl
   Required by the libical build system.
 * PkgConfig
 * Threads

-- The following features have been disabled:

 * Option SHARED_ONLY, Build shared (dynamic) libraries only. Takes precedence over STATIC_ONLY.
 * RSCALE support (RFC7529), build in RSCALE support
 * Berkeley DB storage support, build in support for Berkeley DB storage
 * Option ICAL_ERRORS_ARE_FATAL, icalerror_* calls will abort instead of internally signaling an error.
 * Option ICAL_ALLOW_EMPTY_PROPERTIES, Prevents empty properties from being replaced with X-LIC-ERROR properties.
 * Option GOBJECT_INTROSPECTION, Build GObject introspection "typelib" files. Requires GObject Introspection development package 0.6.7 or higher.
 * Option ICAL_GLIB_VAPI, Build Vala "vapi" files.
 * Option LIBICAL_BUILD_LIBICALSS, Build libicalss.
 * Option LIBICAL_BUILD_LIBICALVCAL, Build libicalvcal
 * Option ICAL_GLIB, Build libical-glib interface. Requires glib 2.44 and libxml 2.7.3 development packages or higher.
 * Option ABI_DUMPER, (Developer-only) Build for abi-dumper.
 * Option ADDRESS_SANITIZER, (Developer-only) Build with the address sanitizer.
 * Option THREAD_SANITIZER, (Developer-only) Build with the thread sanitizer.
 * Option UNDEFINED_SANITIZER, (Developer-only) Build with the undefined sanitizer.
 * Option ENABLE_LTO_BUILD, Build a link-time optimized version.
 * Option LIBICAL_BUILD_TESTING, Build tests.
 * Option ICAL_BUILD_DOCS, Build documentation

-- The following OPTIONAL packages have not been found:

 * BDB, Berkeley DB storage, <https://www.oracle.com/database/berkeley-db>
   For Berkeley DB storage support
 * ZLIB
 * CppUnit

-- The following RECOMMENDED packages have not been found:

 * ICU
   For RSCALE (RFC7529) support

-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen dot 
CMake Warning at cmake/modules/Version.cmake:17 (message):
  Version not set properly! Setting version to 0.0.0! Requires
  MAJOR.MINOR.PATCH as parameters was: ..
Call Stack (most recent call first):
  CMakeLists.txt:169 (include)


Adding disk image target: BellHybrid.img
Adding test entity: bell-applications-common
Adding test entity: bell-services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/muditaos/MuditaOS/build-BellHybrid-linux-Debug
cd build-BellHybrid-linux-Debug && ninja <Pure|Bell>



muditaos@muditaos:~/MuditaOS$ cd build-PurePhone-linux-Debug/
muditaos@muditaos:~/MuditaOS/build-PurePhone-linux-Debug$ ninja Pure
[2/1500] Generating version info
-- Version major: 0 minor: 0 path: 0 label: 
[3/1500] Installing scripts for PurePh...bug/sysroot/system_a/scripts directory
rm: cannot remove '/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/sysroot/system_a/scripts/update_udm.lua': No such file or directory
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug
[17/1500] cd /home/muditaos/MuditaOS/b...s/MuditaOS/build-PurePhone-linux-Debug
Database set to be upgraded and installed: {'settings_v2', 'contacts', 'alarms', 'sms', 'custom_quotes', 'events', 'multimedia', 'predefined_quotes', 'notifications', 'notes', 'calllog'}
Upgrading 'settings_v2', devel features: False
-> Upgrading to committed version: 1
Upgrading 'contacts', devel features: False
-> Upgrading to committed version: 0
Upgrading 'alarms', devel features: False
-> Upgrading to committed version: 0
Upgrading 'sms', devel features: False
-> Upgrading to committed version: 1
Upgrading 'custom_quotes', devel features: False
-> Upgrading to committed version: 0
Upgrading 'events', devel features: False
-> Upgrading to committed version: 0
Upgrading 'multimedia', devel features: False
-> Upgrading to committed version: 0
Upgrading 'predefined_quotes', devel features: False
-> Upgrading to committed version: 0
-> Upgrading to the newest available revision: 618dbb3c-ea59-48d7-b882-9c568fd19905
 -> Running upgrade from 0 to 618dbb3c-ea59-48d7-b882-9c568fd19905
Upgrading 'notifications', devel features: False
-> Upgrading to committed version: 0
Upgrading 'notes', devel features: False
-> Upgrading to committed version: 0
Upgrading 'calllog', devel features: False
-> Upgrading to committed version: 0
[1396/1500] Downloading json-community-target from /home/muditaos/MuditaOS/products/PurePhone/assets... for PurePhone to install dir: /home/muditaos/MuditaOS/build-PurePhone-linux-Debug/sysroot/system_a/
/home/muditaos/.local/lib/python3.8/site-packages/ghapi/core.py:102: UserWarning: Neither GITHUB_TOKEN nor GITHUB_JWT_TOKEN found: running as unauthenticated
  else: warn('Neither GITHUB_TOKEN nor GITHUB_JWT_TOKEN found: running as unauthenticated')
download_assets.py
Trying to download release from MuditaOSPublicAssets under name: MuditaOSPublicAssets 0.0.11-pure
[1402/1500] Generating PurePhone-version.json
-- Version major: 0 minor: 0 path: 0 label: 
Configuring version.json file
[1417/1500] Downloading json-common-target from /home/muditaos/MuditaOS/products/PurePhone/assets/as...mmon.json for PurePhone to install dir: /home/muditaos/MuditaOS/build-PurePhone-linux-Debug/sysroot/
/home/muditaos/.local/lib/python3.8/site-packages/ghapi/core.py:102: UserWarning: Neither GITHUB_TOKEN nor GITHUB_JWT_TOKEN found: running as unauthenticated
  else: warn('Neither GITHUB_TOKEN nor GITHUB_JWT_TOKEN found: running as unauthenticated')
download_assets.py
Trying to download release from MuditaOSPublicAssets under name: MuditaOSPublicAssets 0.0.11-pure
[1443/1500] Generate PurePhone.img with: add_image: PurePhone : install_scripts;create_product_databases;remove_var_directory;create_user_directories;assets;PurePhone-version.json-target
Removing previous image file...
Creating empty disk image...
Checking that no-one is using this disk right now ... OK

Disk /home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img: 14.62 GiB, 15678308352 bytes, 30621696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0x09650eb4.
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img1: Created a new partition 1 of type 'Linux' and of size 1 GiB.
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img2: Created a new partition 2 of type 'Linux' and of size 1 GiB.
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img3: Created a new partition 3 of type 'Linux' and of size 12.6 GiB.
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img4: Done.

New situation:
Disklabel type: dos
Disk identifier: 0x09650eb4

Device                                                             Boot   Start      End  Sectors  Size Id Type
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img1            1  2097152  2097152    1G 83 Linux
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img2      2097153  4194304  2097152    1G 83 Linux
/home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img3      4194305 30621695 26427391 12.6G 83 Linux

The partition table has been altered.
Syncing disks.
Formatting system_a partition as ext4...
mke2fs 1.45.5 (07-Jan-2020)
Found a dos partition table in /home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img
Formatting system_b partition as ext4...
mke2fs 1.45.5 (07-Jan-2020)
Found a dos partition table in /home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img
Formatting user partition as ext4...
mke2fs 1.45.5 (07-Jan-2020)
Found a dos partition table in /home/muditaos/MuditaOS/build-PurePhone-linux-Debug/PurePhone.img
Image created!
[1500/1500] Linking CXX executable PurePhone.elf


muditaos@muditaos: ./PurePhone.elf



〇その他

Q1. sudo で username not in the sudoers file.  This incident will be reported. のエラーが出る。

A1. sudo が使えるユーザとして登録されていない。root 権限で実行するか。

 

 

 

 


Q2. ビルドしようとしたがディスク容量が足りない。

A2.  ccache で使用しているキャッシュの削除、ディスクの追加、configure.sh で生成した不要なビルドディレクトリの削除など

 


 

Q3. FontBuilder (MuditaOS カスタマイズ版) のビルド方法は?

A3. 以下のとおりです。使い方などは後日とします。


muditaos@muditaos:~/$ git clone -b master --depth=1 --single-branch https://github.com/mudita/fontbuilder.git
muditaos@muditaos:~/$ sudo apt install qtchooser
muditaos@muditaos:~/$ sudo apt install qt5-default
muditaos@muditaos:~/$ cd fontbuilder

muditaos@muditaos:~/$ qmake && make

muditaos@muditaos:~/fontbuilder$ ./bin/FontBuilder &
 

Q4. Harmony のビルド方法は

A4. ターゲットの指定を BellHybrid に変更すれば build-BellHybrid-linux-Debug ディレクトリが生成されますので、そちらで ninja BellHybrid を実行するとできます。ただし、執筆時点ではバイナリの起動に失敗するようです。原因は Pure ターゲットでは生成されるディスクイメージが BellHybrid ターゲットでは生成されないためディスクイメージの読み込みに失敗しているのかもしれません。

 

muditaos@muditaos:~/MuditaOS/build-BellHybrid-linux-Debug$ ./BellHybrid.elf 
Launching BellHybrid 

commit: 7941289 tag: 0.0.0 branch: master

0 ms ERROR [SysMgrService] disk_manager.cpp:46:register_device: Unable to probe the disc errno -9
0 ms FATAL [SysMgrService] vfs_subsystem.cpp:49:initialize: Unable to register block device with error -9
0 ms FATAL [SysMgrService] vfs_subsystem.cpp:98:mount_defaults: Unable to lock disk
0 ms FATAL [SysMgrService] BellHybridMain.cpp:94:operator(): Exception during platform initialization: Failed to initiate filesystem: -5

 

Q5. ビルドの所要時間目安は?
A5. 規模も大きいので結構かかります。

8:30 時過ぎくらいから環境構築してPureのビルドに入ったのは11時くらい。半日くらい余裕をもったほうがいいでしょう。
通信容量は10~20GBくらい使っています。

Q6. オフラインビルドは可能でしょうか?

A6. 可能ですが、スクリプトの書き換えやバイパスなどが必要ですのであなたの技量次第です。

 

Q7. WSL や Linux パソコン実機でビルドする場合も同じですか?

Q7. ほぼ同じです。ディストリビューションによって違いがあることも考えられますので、その場合は修正が必要です。


〇まとめ

ecoboot の件もそうですが、いろいろとサードパーティに対して不親切すぎやしませんかね。
GPLv3 は嫌っていませんけど、ドキュメントが古すぎます。
ユーザがなにを求めているのか再考したほうがいいでしょう。

Mudita 社の経営理念はある程度共感できますが、ベンチャーゆえのぶっちゃけ感はどうにもならないなあと。