-
Notifications
You must be signed in to change notification settings - Fork 9
Developing MiniArch
MiniArch (the same like MiniMyth2) uses common build system based on GAR (https://www.linuxjournal.com/article/5819)
Most frequently actions are described here: https://github.com/warpme/minimyth2/wiki/Developing-MiniMyth2
MiniArch related components are in ~/minimyth2/script/miniarch
- do desired changes in kernel config (helpful might be
make menuconfig
in(mm_home)/script/kernel/kernel-<ver>
dir) - go to
(mm_home)/script/kernel/kernel-<ver>
- run
make makesums-all clean
- go to
(mm_home)/script/meta/miniarch/
- run
make update-kernel
steep 4 will build image for board you have in $(HOME)/.minimyth2/minimyth.conf
file (variable mm_BOARD_TYPE=
)- so good practice is to set your desired board in this file. (alternatively - you can again rebuild image for different board by using prepare-miniarch-image.sh
script
- go to
~/minimyth2/script/kernel/linux-x.y/work/main.d/linux-x.y.z
- do desired changes in kernel code
- go to
~/minimyth2/script/kernel/linux-x.y
- run
make rebuild reinstall
- go to
~/minimyth2/script/miniarch
- run
make update-kernel
- run
./build-image-for-board.sh
- type number to select desired board then press Enter
- after some time You should get sd card image for selected board in
build
dir
Note: running make clean in ~/minimyth2/script/kernel/linux-x.y
will delete all your changes. If you want to have them permanently, please do following:
Here is example for linux kernel:
- go to
~/minimyth2/script/kernel/linux-x.y
- run
make clean patch
- do desired changes in kernel code in
~/minimyth2/script/kernel/linux-x.y/work/main.d/linux-x.y.z
- run
make makepatch
in~/minimyth2/script/kernel/linux-x.y
- you will get
current-changes.patch
file in~/minimyth2/script/kernel/linux-x.y
copy this file to~/minimyth2/script/kernel/linux-x.y/files
dir with desired patch_file_name - add
PATCHFILES += patch_file_name
entry in~/minimyth2/script/kernel/linux-x.y/Makefile
at end of PATCHFILES +=... list - go to
~/minimyth2/script/kernel/linux-x.y
and runmake makesums-all
Now you can build kernel with your changes by make clean install
in ~/minimyth2/script/kernel/linux-x.y
and then build MiniArch image by following Example: rebuilding MiniArch image with updated kernel
Note: due nature how patch
utility works - please do make makepatch
on clean sources.
If you do this on sources with build artefacts - then current-changes.patch
file will contain also build artefacts.
To avoid this, you may do whole Include your code changes in MiniMyth2 build system procedure in some temp dir.
Example:
- copy
~/minimyth2/script/kernel/linux-x.y
to~/minimyth2/script/kernel/linux-x.y-temp
- go to
~/minimyth2/script/kernel/linux-x.y-temp
and do Include your code changes in MiniMyth2 build system procedure - copy
current-changes.patch
file from~/minimyth2/script/kernel/linux-x.y-temp
to~/minimyth2/script/kernel/linux-x.y/files
dir with desired patch_file_name - add
PATCHFILES += patch_file_name
entry in~/minimyth2/script/kernel/linux-x.y/Makefile
at end of PATCHFILES +=... list - go to
~/minimyth2/script/kernel/linux-x.y
and runmake makesums-all
Now you can build kernel with your changes by make clean install
in ~/minimyth2/script/kernel/linux-x.y
and then build MiniArch image by following Example: rebuilding MiniArch image with updated kernel
Happy developing