From e2fd2fd3d65efb056900a2e997777ede26f67f6b Mon Sep 17 00:00:00 2001 From: YoungSoo Shin Date: Mon, 13 Jan 2025 17:01:04 +0900 Subject: [PATCH] DOCS: Add odroid-stamper --- Writerside/d.tree | 1 + Writerside/topics/Use-ODROID-STAMPER.md | 116 ++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 Writerside/topics/Use-ODROID-STAMPER.md diff --git a/Writerside/d.tree b/Writerside/d.tree index 8174ca5..af81b47 100644 --- a/Writerside/d.tree +++ b/Writerside/d.tree @@ -17,6 +17,7 @@ + \ No newline at end of file diff --git a/Writerside/topics/Use-ODROID-STAMPER.md b/Writerside/topics/Use-ODROID-STAMPER.md new file mode 100644 index 0000000..95a6d15 --- /dev/null +++ b/Writerside/topics/Use-ODROID-STAMPER.md @@ -0,0 +1,116 @@ +# Use ODROID-STAMPER + +[`odroid-stamper`](https://github.com/tobetter/odroid-stamper) is Odroid Image Generation Tool. + +## Basic usage +```Bash +sudo apt install git wget dialog pv lynx qemu-user-static\ + dialog rsync squashfs-tools uuid-runtime + +git clone https://github.com/tobetter/odroid-stamper.git +cd odroid-stamper +export ODROID_STAMPER_CHECKOUT=$PWD +sudo -E ./odroid-stamper +``` + +```Plain Text + ODROID-STAMPER +┌───────────────────────Custom Ubuntu Recipe─────────────────────────┐ +│ Please customize the installation. │ +│ ┌────────────────────────────────────────────────────────────────┐ │ +│ │ 0 Target () │ │ +│ │ 1 Board () │ │ +│ │ 2 Distro (focal) │ │ +│ │ 3 Flavour (server) │ │ +│ │ 4 Default user │ │ +│ │ 5 Password of default user │ │ +│ └────────────────────────────────────────────────────────────────┘ │ +├────────────────────────────────────────────────────────────────────┤ +│ < OK > < Done > │ +└────────────────────────────────────────────────────────────────────┘ +``` +Once you select the board and other settings you want, the image will be built. + +## In the command line +```Bash +$ ./odroid-stamper --help +Usage: odroid-stamper [--help] [--output=] [--live] + + --help: this help message + --output=: output directory for image files. + --iso: build target OS image as ISO format. + --live: enforce to build live boot system image. + --compress: compress the final OS image using 'xz'. + --keep-builddir: prevent removing temporary directory + after building an image. + --kernel: kernel package name to use + --linuxfactory: alternative server IP address of 'ppa.linuxfactory.or.kr' + +``` + +You can use it from the command line as below. +```Bash +export ODROID_STAMPER_CHECKOUT=$PWD +sudo -E ./odroid-stamper --compress --board=odroidm2 --distro=focal\ + --flavour=server --username=odroid --password=odroid +``` + +## Use custom +If you want to add the packages you want during odroid-stamper operation, Use custom directory. + +For example, if you want build `custom/npu` image, use command below. +```Bash +export ODROID_STAMPER_CHECKOUT=$PWD +sudo -E ./odroid-stamper --custom=npu +``` + +Custom/npu is structured as follows. + +- config +- fixups +- overlay +- packages + +### config +`config` Defines the default settings for the image. +```Plain Text +BOARD=odroidm1 +ARCH=arm64 +DISTRO=focal +FLAVOUR=gnome-desktop +DEFAULT_USER=odroid +DEFAULT_PASSWD=odroid +ALLOW_ROOT_LOGIN=false +``` +You can override it on the command line. + +```Bash +export ODROID_STAMPER_CHECKOUT=$PWD +sudo -E ./odroid-stamper --custom=npu --board=odroidm2 --distro=noble +``` + +### package +`package` is a list of packages to be installed during image generation. + +```Plain Text +cmake +g++ +git +libopencv-dev +librga-dev +python3-dev +python3-pip +python3-venv +python3.9 +python3.9-dev +python3.9-venv +``` + +### fixup +The script in the `fixup` directory is executed during image generation. +It also runs the fixup script located in the `custom/npu/fixup` directory. + +### overlay +The file to add based on the `/` path. +`custom/etc/udev/rules.d/99-odroid-video.rules` file will be copied in `/etc/udev/rules.d/99-odroid-video.rules` +