§2023-06-24

  1. Seperated boot and root partition / 单独的boot和root分区
part fs size content
/boot fat >=64MiB u-boot, kernel, initrd, fdt, syslinux config/uboot bootscript
/ any >=2GiB everything else
sda            8:0    1  29.7G  0 disk 
├─sda1         8:1    1     1G  0 part 
└─sda2         8:2    1  28.4G  0 part 
  1. Format
$ sudo mkfs.vfat /dev/sda1

$ sudo mkfs.ext4 /dev/sda2
  1. Mounting
$ pwd
/opt/home/alexlai/build/src
[alexlai@n2MnJaro src]$ sudo mount /dev/sda1 boot
[alexlai@n2MnJaro src]$ sudo mount /dev/sda2 root
  1. pacstrap root base
$ sudo pacstrap root base
  1. Rootfs archive / root档案包
$ pwd
/opt/home/alexlai/build/src
[alexlai@n2MnJaro src]$ wget  http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
$ sudo bsdtar -xvpf ArchLinuxARM-aarch64-latest.tar.gz -C root
  1. genfstab
[alexlai@n2MnJaro src]$ su
Password: 
[root@n2MnJaro src]# genfstab root >> root/etc/fstab 
[root@n2MnJaro src]# cat root/etc/fstab 
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# UUID=95989f9e-1134-47df-ba7f-2592ac5670c5
/dev/sda2               /               ext4            rw,relatime     0 1

# UUID=e76efadf-0945-4820-bf11-9b51b393ca4b
/dev/mmcblk1p3          none            swap            defaults        0 0

/dev/zram0              none            swap            defaults,pri=100        0 0

[root@n2MnJaro src]# blkid
/dev/mmcblk1p3: UUID="e76efadf-0945-4820-bf11-9b51b393ca4b" TYPE="swap" PARTUUID="82ff7d1c-03"
/dev/mmcblk1p1: SEC_TYPE="msdos" LABEL_FATBOOT="BOOT_MNJRO" LABEL="BOOT_MNJRO" UUID="1857-7BBF" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="82ff7d1c-01"
/dev/mmcblk1p4: UUID="1ebdeaf4-3f76-46cd-ac34-1885e10e2793" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="82ff7d1c-04"
/dev/mmcblk1p2: LABEL="ROOT_MNJRO" UUID="09c2f6bf-fcad-4197-9688-7f9c4aadcf39" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="82ff7d1c-02"
/dev/sda2: UUID="95989f9e-1134-47df-ba7f-2592ac5670c5" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="04c2bffc-a621-704a-a261-208654d01fdf"
/dev/sda1: UUID="E570-B759" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="bootfs" PARTUUID="d10b7fec-0bcf-af4d-a274-67504d80a2de"
/dev/zram0: LABEL="zram0" UUID="4ca4f717-1748-4d1d-bfa1-1a4ada086812" TYPE="swap"
  1. arch-chroot
$ sudo arch-chroot root
[sudo] password for alexlai: 
[root@n2MnJaro /]# # pacman-key --init
[root@n2MnJaro /]# pacman-key --populate archlinuxarm
==> Appending keys from archlinuxarm.gpg...
==> Updating trust database...
gpg: next trustdb check due at 2023-07-07
[root@n2MnJaro /]# passwd
[root@n2MnJaro /]# useradd -m  -G wheel -u 1026 alexlai
[root@n2MnJaro /]# passwd alexlai
# Removal of the kernel and firmware 
[root@n2MnJaro /]# pacman -Rcns linux-aarch64
[root@n2MnJaro /]# pacman -R linux-aarch64 linux-firmware linux-firmware-whence
error: duplicated database entry 'archlinux-keyring'
error: duplicated database entry 'gawk'
error: duplicated database entry 'glib2'
error: duplicated database entry 'gnupg'
error: duplicated database entry 'device-mapper'
error: duplicated database entry 'libelf'
error: duplicated database entry 'dbus'
error: duplicated database entry 'pacman'
error: duplicated database entry 'systemd-sysvcompat'
error: duplicated database entry 'less'
error: duplicated database entry 'filesystem'
error: duplicated database entry 'libgpg-error'
error: duplicated database entry 'coreutils'
error: duplicated database entry 'licenses'
error: duplicated database entry 'mpfr'
error: duplicated database entry 'nettle'
error: duplicated database entry 'sqlite'
error: duplicated database entry 'cryptsetup'
error: duplicated database entry 'libnftnl'
error: duplicated database entry 'curl'
error: duplicated database entry 'kbd'
error: duplicated database entry 'libbpf'
error: duplicated database entry 'iana-etc'
error: duplicated database entry 'xz'
error: duplicated database entry 'libcap-ng'
error: duplicated database entry 'systemd'
error: duplicated database entry 'pam'
error: duplicated database entry 'tpm2-tss'
error: duplicated database entry 'argon2'
error: duplicated database entry 'pciutils'
error: duplicated database entry 'keyutils'
error: duplicated database entry 'util-linux-libs'
error: duplicated database entry 'libxml2'
error: duplicated database entry 'libseccomp'
error: duplicated database entry 'systemd-libs'
error: duplicated database entry 'tzdata'
error: duplicated database entry 'hwdata'
error: duplicated database entry 'iproute2'
error: duplicated database entry 'ca-certificates-mozilla'
error: duplicated database entry 'libassuan'
error: duplicated database entry 'attr'
error: duplicated database entry 'sed'
error: duplicated database entry 'npth'
error: duplicated database entry 'gettext'
error: duplicated database entry 'findutils'
error: duplicated database entry 'libsysprof-capture'
error: duplicated database entry 'gpgme'
error: duplicated database entry 'util-linux'
error: duplicated database entry 'brotli'
error: duplicated database entry 'libldap'
error: duplicated database entry 'zstd'
error: duplicated database entry 'audit'
error: duplicated database entry 'libgcrypt'
error: duplicated database entry 'tar'
error: duplicated database entry 'libnghttp2'
error: duplicated database entry 'linux-api-headers'
error: duplicated database entry 'grep'
error: duplicated database entry 'libpcap'
error: duplicated database entry 'gdbm'
error: duplicated database entry 'libcap'
error: target not found: linux-aarch64
error: target not found: linux-firmware
error: target not found: linux-firmware-whence
[root@n2MnJaro /]# pacman-key --init
[root@n2MnJaro /]# pacman-key --populate archlinuxarm
==> Appending keys from archlinuxarm.gpg...
==> Updating trust database...
gpg: next trustdb check due at 2023-07-07
[root@n2MnJaro /]# ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime
[root@n2MnJaro /]# date
Sat Jun 24 13:16:23 CST 2023
# edit /etc/locale.gen and
[root@n2MnJaro /]# locale-gen
Generating locales...
 en_US.UTF-8... done
 ja_JP.UTF-8... done
 zh_TW.UTF-8... done
Generation complete.

# correct pasman -Syu , duplicated database entries error
[root@n2MnJaro /]# pacman -Syy
[root@n2MnJaro /]# pacman -Sy --overwrite '*'

# Stil duplicate database entries... skip it 
  1. kernel / 内核

We’ll need to deploy kernel and firmware

$ sudo cp -v release/* ../src/root/home/alexlai/
[sudo] password for alexlai: 
'release/ArchLinuxARM-aarch64-Amlogic-20230624_114605.img' -> '../src/root/home/alexlai/ArchLinuxARM-aarch64-Amlogic-20230624_114605.img'
'release/versions.md' -> '../src/root/home/alexlai/versions.md'
[alexlai@n2MnJaro amlogic-s9xxx-archlinuxarm-images]$ sudo cp -v pkg/* ../src/root/home/alexlai/
'pkg/ampart-1.3-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/ampart-1.3-1-aarch64.pkg.tar'
'pkg/linux-aarch64-flippy-6.1.34-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/linux-aarch64-flippy-6.1.34-1-aarch64.pkg.tar'
'pkg/linux-aarch64-flippy-dtb-amlogic-6.1.34-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/linux-aarch64-flippy-dtb-amlogic-6.1.34-1-aarch64.pkg.tar'
'pkg/linux-aarch64-flippy-headers-6.1.34-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/linux-aarch64-flippy-headers-6.1.34-1-aarch64.pkg.tar'
'pkg/linux-firmware-amlogic-ophub-20230405-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/linux-firmware-amlogic-ophub-20230405-1-aarch64.pkg.tar'
'pkg/uboot-amlogic-ophub-20230202-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/uboot-amlogic-ophub-20230202-1-aarch64.pkg.tar'
'pkg/uboot-legacy-initrd-hooks-0.0.1-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/uboot-legacy-initrd-hooks-0.0.1-1-aarch64.pkg.tar'
'pkg/yaopenvfd-1.0.1-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/yaopenvfd-1.0.1-1-aarch64.pkg.tar'
'pkg/yay-12.0.5-1-aarch64.pkg.tar' -> '../src/root/home/alexlai/yay-12.0.5-1-aarch64.pkg.tar'

arch-chroot

[alexlai@n2MnJaro src]$ sudo arch-chroot root
[root@n2MnJaro /]# cd /home/alexlai/
[root@n2MnJaro alexlai]# ls
ampart-1.3-1-aarch64.pkg.tar                      linux-aarch64-flippy-dtb-amlogic-6.1.34-1-aarch64.pkg.tar  uboot-amlogic-ophub-20230202-1-aarch64.pkg.tar     yaopenvfd-1.0.1-1-aarch64.pkg.tar
ArchLinuxARM-aarch64-Amlogic-20230624_114605.img  linux-aarch64-flippy-headers-6.1.34-1-aarch64.pkg.tar      uboot-legacy-initrd-hooks-0.0.1-1-aarch64.pkg.tar  yay-12.0.5-1-aarch64.pkg.tar
linux-aarch64-flippy-6.1.34-1-aarch64.pkg.tar     linux-firmware-amlogic-ophub-20230405-1-aarch64.pkg.tar    versions.md
[root@n2MnJaro alexlai]# 
pacman -U linux-aarch64-flippy-bin-6.0.7-1-aarch64.pkg.tar.xz linux-aarch64-flippy-bin-dtb-amlogic-6.0.7-1-aarch64.pkg.tar.xz linux-firmware-amlogic-ophub-20220916-1-aarch64.pkg.tar.xz

[root@n2MnJaro alexlai]# ls linux-aarch64-flippy-*
linux-aarch64-flippy-6.1.34-1-aarch64.pkg.tar  linux-aarch64-flippy-dtb-amlogic-6.1.34-1-aarch64.pkg.tar  linux-aarch64-flippy-headers-6.1.34-1-aarch64.pkg.tar
[root@n2MnJaro alexlai]# pacman -U linux-aarch64-flippy-
linux-aarch64-flippy-6.1.34-1-aarch64.pkg.tar              linux-aarch64-flippy-dtb-amlogic-6.1.34-1-aarch64.pkg.tar  linux-aarch64-flippy-headers-6.1.34-1-aarch64.pkg.tar      
[root@n2MnJaro alexlai]# pacman -U linux-aarch64-flippy-*
loading packages...
error: duplicated database entry 'archlinux-keyring'
error: duplicated database entry 'gawk'
error: duplicated database entry 'glib2'
error: duplicated database entry 'gnupg'
error: duplicated database entry 'device-mapper'
error: duplicated database entry 'libelf'
error: duplicated database entry 'dbus'
error: duplicated database entry 'pacman'
error: duplicated database entry 'systemd-sysvcompat'
error: duplicated database entry 'less'
error: duplicated database entry 'filesystem'
error: duplicated database entry 'libgpg-error'
error: duplicated database entry 'coreutils'
error: duplicated database entry 'licenses'
error: duplicated database entry 'mpfr'
error: duplicated database entry 'nettle'
error: duplicated database entry 'sqlite'
error: duplicated database entry 'cryptsetup'
error: duplicated database entry 'libnftnl'
error: duplicated database entry 'curl'
error: duplicated database entry 'kbd'
error: duplicated database entry 'libbpf'
error: duplicated database entry 'iana-etc'
error: duplicated database entry 'xz'
error: duplicated database entry 'libcap-ng'
error: duplicated database entry 'systemd'
error: duplicated database entry 'pam'
error: duplicated database entry 'tpm2-tss'
error: duplicated database entry 'argon2'
error: duplicated database entry 'pciutils'
error: duplicated database entry 'keyutils'
error: duplicated database entry 'util-linux-libs'
error: duplicated database entry 'libxml2'
error: duplicated database entry 'libseccomp'
error: duplicated database entry 'systemd-libs'
error: duplicated database entry 'tzdata'
error: duplicated database entry 'hwdata'
error: duplicated database entry 'iproute2'
error: duplicated database entry 'ca-certificates-mozilla'
error: duplicated database entry 'libassuan'
error: duplicated database entry 'attr'
error: duplicated database entry 'sed'
error: duplicated database entry 'gettext'
error: duplicated database entry 'findutils'
error: duplicated database entry 'libsysprof-capture'
error: duplicated database entry 'gpgme'
error: duplicated database entry 'util-linux'
error: duplicated database entry 'brotli'
error: duplicated database entry 'libldap'
error: duplicated database entry 'zstd'
error: duplicated database entry 'audit'
error: duplicated database entry 'libgcrypt'
error: duplicated database entry 'tar'
error: duplicated database entry 'libnghttp2'
error: duplicated database entry 'linux-api-headers'
error: duplicated database entry 'grep'
error: duplicated database entry 'libpcap'
error: duplicated database entry 'gdbm'
error: duplicated database entry 'libcap'
resolving dependencies...
:: There are 3 providers available for initramfs:
:: Repository core
   1) mkinitcpio
:: Repository extra
   2) booster  3) dracut

Enter a number (default=1): 
looking for conflicting packages...

Packages (7) binutils-2.38-5.1  diffutils-3.10-1  mkinitcpio-36-1  mkinitcpio-busybox-1.35.0-1  linux-aarch64-flippy-6.1.34-1  linux-aarch64-flippy-dtb-amlogic-6.1.34-1  linux-aarch64-flippy-headers-6.1.34-1

Total Download Size:     5.84 MiB
Total Installed Size:  252.55 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 binutils-2.38-5.1-aarch64                                                                                                             5.2 MiB   224 KiB/s 00:24 [###################################################################################################] 100%
 diffutils-3.10-1-aarch64                                                                                                            320.8 KiB  43.5 KiB/s 00:07 [###################################################################################################] 100%
 mkinitcpio-busybox-1.35.0-1-aarch64                                                                                                 246.6 KiB  48.0 KiB/s 00:05 [###################################################################################################] 100%
 mkinitcpio-36-1-any                                                                                                                  50.9 KiB  20.5 KiB/s 00:02 [###################################################################################################] 100%
 Total (4/4)                                                                                                                           5.8 MiB   143 KiB/s 00:42 [###################################################################################################] 100%
(7/7) checking keys in keyring                                                                                                                                   [###################################################################################################] 100%
(5/7) checking package integrity                                                                                                                                 [###################################################################################################] 100%
(5/7) loading package files                                                                                                                                      [###################################################################################################] 100%
(7/7) checking for file conflicts                                                                                                                                [###################################################################################################] 100%
(7/7) checking available disk space                                                                                                                              [###################################################################################################] 100%
:: Processing package changes...
(1/7) installing linux-aarch64-flippy-dtb-amlogic                                                                                                                [###################################################################################################] 100%
(2/7) installing mkinitcpio-busybox                                                                                                                              [###################################################################################################] 100%
(3/7) installing binutils                                                                                                                                        [###################################################################################################] 100%
Optional dependencies for binutils
    debuginfod: for debuginfod server/client functionality
(4/7) installing diffutils                                                                                                                                       [###################################################################################################] 100%
(5/7) installing mkinitcpio                                                                                                                                      [###################################################################################################] 100%
Optional dependencies for mkinitcpio
    xz: Use lzma or xz compression for the initramfs image [installed]
    bzip2: Use bzip2 compression for the initramfs image [installed]
    lzop: Use lzo compression for the initramfs image
    lz4: Use lz4 compression for the initramfs image [installed]
    mkinitcpio-nfs-utils: Support for root filesystem on NFS
(6/7) installing linux-aarch64-flippy                                                                                                                            [###################################################################################################] 100%
Optional dependencies for linux-aarch64-flippy
    uboot-legacy-initrd-hooks: to generate uboot legacy initrd images
    linux-firmware: firmware images needed for some devices
    linux-firmware-amlogic-ophub: complete firmware set for devices with Amlogic SoCs
    wireless-regdb: to set the correct wireless channels of your country
    linux-aarch64-flippy-dtb-allwinner: dtbs for Allwinner SoCs
    linux-aarch64-flippy-dtb-amlogic: dtbs for Amlogic SoCs [installed]
    linux-aarch64-flippy-dtb-rockchip: dtbs for Rockchip SoCs
(7/7) installing linux-aarch64-flippy-headers                                                                                                                    [###################################################################################################] 100%
:: Running post-transaction hooks...
(1/5) Reloading system manager configuration...
  Skipped: Running in chroot.
(2/5) Creating temporary files...
(3/5) Arming ConditionNeedsUpdate...
(4/5) Updating module dependencies...
(5/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-aarch64-flippy.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-aarch64-flippy -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-aarch64-flippy.img
==> Starting build: '6.1.34-1-aarch64-flippy'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: '/boot/initramfs-linux-aarch64-flippy.img'
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-aarch64-flippy.preset: 'fallback'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-aarch64-flippy -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-aarch64-flippy-fallback.img -S autodetect
==> Starting build: '6.1.34-1-aarch64-flippy'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'ums_eneub6250'
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: '/boot/initramfs-linux-aarch64-flippy-fallback.img'
==> Image generation successful

[root@n2MnJaro alexlai]# ls /boot/
dtbs  initramfs-linux-aarch64-flippy-fallback.img  initramfs-linux-aarch64-flippy.img  vmlinuz-linux-aarch64-flippy
[root@n2MnJaro alexlai]# pacman -U uboot-*
loading packages...
error: duplicated database entry 'archlinux-keyring'
error: duplicated database entry 'gawk'
error: duplicated database entry 'glib2'
error: duplicated database entry 'gnupg'
error: duplicated database entry 'device-mapper'
error: duplicated database entry 'libelf'
error: duplicated database entry 'dbus'
error: duplicated database entry 'pacman'
error: duplicated database entry 'systemd-sysvcompat'
error: duplicated database entry 'less'
error: duplicated database entry 'filesystem'
error: duplicated database entry 'libgpg-error'
error: duplicated database entry 'coreutils'
error: duplicated database entry 'licenses'
error: duplicated database entry 'mpfr'
error: duplicated database entry 'nettle'
error: duplicated database entry 'sqlite'
error: duplicated database entry 'cryptsetup'
error: duplicated database entry 'libnftnl'
error: duplicated database entry 'curl'
error: duplicated database entry 'kbd'
error: duplicated database entry 'libbpf'
error: duplicated database entry 'iana-etc'
error: duplicated database entry 'xz'
error: duplicated database entry 'libcap-ng'
error: duplicated database entry 'systemd'
error: duplicated database entry 'pam'
error: duplicated database entry 'tpm2-tss'
error: duplicated database entry 'argon2'
error: duplicated database entry 'pciutils'
error: duplicated database entry 'keyutils'
error: duplicated database entry 'util-linux-libs'
error: duplicated database entry 'libxml2'
error: duplicated database entry 'libseccomp'
error: duplicated database entry 'systemd-libs'
error: duplicated database entry 'tzdata'
error: duplicated database entry 'hwdata'
error: duplicated database entry 'iproute2'
error: duplicated database entry 'ca-certificates-mozilla'
error: duplicated database entry 'libassuan'
error: duplicated database entry 'attr'
error: duplicated database entry 'sed'
error: duplicated database entry 'gettext'
error: duplicated database entry 'findutils'
error: duplicated database entry 'libsysprof-capture'
error: duplicated database entry 'gpgme'
error: duplicated database entry 'util-linux'
error: duplicated database entry 'brotli'
error: duplicated database entry 'libldap'
error: duplicated database entry 'zstd'
error: duplicated database entry 'audit'
error: duplicated database entry 'libgcrypt'
error: duplicated database entry 'tar'
error: duplicated database entry 'libnghttp2'
error: duplicated database entry 'linux-api-headers'
error: duplicated database entry 'grep'
error: duplicated database entry 'libpcap'
error: duplicated database entry 'gdbm'
error: duplicated database entry 'libcap'
resolving dependencies...
looking for conflicting packages...

Packages (3) uboot-tools-2023.04-1  uboot-amlogic-ophub-20230202-1  uboot-legacy-initrd-hooks-0.0.1-1

Total Download Size:    0.17 MiB
Total Installed Size:  15.85 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 uboot-tools-2023.04-1-aarch64                                                                                                       169.6 KiB  16.8 KiB/s 00:10 [###################################################################################################] 100%
(3/3) checking keys in keyring                                                                                                                                   [###################################################################################################] 100%
(2/3) checking package integrity                                                                                                                                 [###################################################################################################] 100%
(2/3) loading package files                                                                                                                                      [###################################################################################################] 100%
(3/3) checking for file conflicts                                                                                                                                [###################################################################################################] 100%
(3/3) checking available disk space                                                                                                                              [###################################################################################################] 100%
:: Processing package changes...
(1/3) installing uboot-amlogic-ophub                                                                                                                             [###################################################################################################] 100%
(2/3) installing uboot-tools                                                                                                                                     [###################################################################################################] 100%
(3/3) installing uboot-legacy-initrd-hooks                                                                                                                       [###################################################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[root@n2MnJaro alexlai]# ls /boot/
dtbs  initramfs-linux-aarch64-flippy-fallback.img  initramfs-linux-aarch64-flippy.img  uboot  vmlinuz-linux-aarch64-flippy
[root@n2MnJaro alexlai]# 


  1. Build
$ uname -a
Linux n2MnJaro 6.3.8-1-MANJARO-ARM #1 SMP PREEMPT Fri Jun 16 16:17:17 UTC 2023 aarch64 GNU/Linux
$ git clone --recursive https://github.com/7Ji/amlogic-s9xxx-archlinuxarm.git
$ cd amlogic-s9xxx-archlinuxarm/
$ git pull
Already up to date.
$ git submodule init
$ git submodule update

All of the build scripts should be run as a user that can use sudo and never as root. They will refuse to work if being run as root or with sudo. You might need to to set the following option in sudoers if you want to keep it in background to cancel the timeout: Defaults passwd_timeout=0

  1. Before the first build, make sure these build dependencies are installed:
sudo pacman -Syu arch-install-scripts \
                 base-devel \
                 dosfstools \
                 git \
                 go \
                 parted \
                 uboot-tools \
                 xz \
                 wget 
  1. ./build.sh

Defaults passwd_timeout=0 set in /etc/sudoers will for the sys to prompt everytime when executing sudo. Defaults passwd_timeout=-1, This sets the passwd_timeout option to -1, indicating that the password will be

$ ./build.sh
,,,,
Disk path is release/ArchLinuxARM-aarch64-Amlogic-20230624_114605.img 
=> Stting loop device
[sudo] password for alexlai
sudo: time out for reading password
sudo: a password is required

$ ls releases/
ArchLinuxARM-aarch64-Amlogic-20230624_114605.img  versions.md
$ ls pkg/
ampart-1.3-1-aarch64.pkg.tar                   linux-aarch64-flippy-dtb-amlogic-6.1.34-1-aarch64.pkg.tar  linux-firmware-amlogic-ophub-20230405-1-aarch64.pkg.tar  uboot-legacy-initrd-hooks-0.0.1-1-aarch64.pkg.tar  yay-12.0.5-1-aarch64.pkg.tar
linux-aarch64-flippy-6.1.34-1-aarch64.pkg.tar  linux-aarch64-flippy-headers-6.1.34-1-aarch64.pkg.tar      uboot-amlogic-ophub-20230202-1-aarch64.pkg.tar           yaopenvfd-1.0.1-1-aarch64.pkg.tar