Skip to content

Developing MiniMyth2

heitbaum edited this page Jun 27, 2021 · 3 revisions

Overview

MiniMyth2 uses GAR as build system. GAR is Makefile controlled build system and usually Makefile is only place where all building specific are defined.

GAR build system - before building - always checks package sources integrity. So - if there is any change in source code (new versions of source code and/or new or changed patches) - GAR build systems must have its 'check' checksums updated accordingly.

To update checksums:

cd <package top dir>

make makesums[makesums-all]

make makesums generates checksums for all files used for current compilation.

make makesums-all is required when changes in sources are in files that not used by current target but for other targets (i.e. you are building kernel for aarch64, but change is for kernel config for x86_64 target)

Below are some most frequently used actions that you probably use in the GAR build system:

Update package sources (i.e. to new source versions)

To update a package source to a new version, usually it is enough to:

  1. change GARVERSION in Makefile (or in package-api.mk)
  2. run make makesums (or makesums-all if change is in sources used by targets other than current target)
  3. optionally you can run also make garchive to cache sources files in local cache - so any future make clean & make build will use locally cached sources instead of downloading them again.

Adding patches to existing code

When you want to add new patch to existing package, you need to:

  1. create files dir in package top dir
  2. put patch in files dir
  3. add PATCHFILES = 'patch filename' in make file
  4. run make makesums in package dir

Testing new binaries on target without completing a new image generation

For some most frequently changing components, MiniMyth2 has utility to quick rsync updated binaries from GAR system to RAMFS on running on target to test them without time consuming re-generation of rootfs & burning it to device boot flash memory.

Utility script covers currently following components:

  • MythTV
  • Mesa3D
  • Linux Kernel
  • FFmpeg

To use this capability:

  1. open telnet on target
  2. run devel-update-component.sh
  3. select desired component to update

Note: above script requires some setup on GAR hosting machine. Script will print the required rsync.conf fragment for you. GAR build system sets GAR host IP address & GAR home path in script at image build time - but it is worth to verify are those variables set correctly...