Skip to content

Commit

Permalink
ahead: sync image
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
RevySR committed Oct 25, 2023
1 parent 4d7ca49 commit 3bb17b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 25 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ name: mkimg-th1520-ci

on:
push:
tags:
- '*'
pull_request:
workflow_dispatch:

env:
xuetie_toolchain: https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1663142514282
toolchain_file_name: Xuantie-900-gcc-linux-5.10.4-glibc-x86_64-V2.6.1-20220906.tar.gz
ARCH: riscv

jobs:
Expand All @@ -19,7 +15,6 @@ jobs:
matrix:
include:
- name: thead-gcc
toolchain_tripe: riscv64-unknown-linux-gnu-
apt_triple: riscv64-linux-gnu # TODO: remove this line

runs-on: ubuntu-22.04
Expand All @@ -42,12 +37,6 @@ jobs:
wget https://mirror.iscas.ac.cn/revyos/revyos-addons/pool/main/r/revyos-keyring/revyos-keyring_2023.06.12_all.deb
sudo apt install ./revyos-keyring_2023.06.12_all.deb
- name: Configure Toolchains
run: |
# Install thead-gcc-toolchain
wget ${xuetie_toolchain}/${toolchain_file_name}
tar -xvf ${toolchain_file_name} -C /opt
- name: Checkout qemu
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -107,4 +96,4 @@ jobs:
path: |
mkimg-th1520/*.ext4
mkimg-th1520/SHA256SUMS
mkimg-th1520/SHA512SUMS
mkimg-th1520/SHA512SUMS
26 changes: 13 additions & 13 deletions mkrootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EFI_MOUNTPOINT=""
BOOT_MOUNTPOINT=""
ROOT_MOUNTPOINT=""

KERNEL="linux-headers-5.10.113-lpi4a linux-image-5.10.113-lpi4a linux-perf-thead"
KERNEL="linux-headers-5.10.113-ahead linux-image-5.10.113-ahead linux-perf-thead"
BASE_TOOLS="binutils file tree sudo bash-completion u-boot-menu initramfs-tools openssh-server network-manager dnsmasq-base libpam-systemd ppp wireless-regdb wpasupplicant libengine-pkcs11-openssl iptables systemd-timesyncd vim usbutils libgles2 parted exfatprogs systemd-sysv mesa-vulkan-drivers"
XFCE_DESKTOP="xorg xfce4 desktop-base lightdm xfce4-terminal tango-icon-theme xfce4-notifyd xfce4-power-manager network-manager-gnome xfce4-goodies pulseaudio pulseaudio-module-bluetooth alsa-utils dbus-user-session rtkit pavucontrol thunar-volman eject gvfs gvfs-backends udisks2 dosfstools e2fsprogs libblockdev-crypto2 ntfs-3g polkitd blueman xarchiver"
GNOME_DESKTOP="gnome-core avahi-daemon desktop-base file-roller gnome-tweaks gstreamer1.0-libav gstreamer1.0-plugins-ugly libgsf-bin libproxy1-plugin-networkmanager network-manager-gnome"
Expand Down Expand Up @@ -77,10 +77,10 @@ make_rootfs()
--include="ca-certificates debian-ports-archive-keyring revyos-keyring thead-gles-addons th1520-boot-firmware locales dosfstools \
$BASE_TOOLS $XFCE_DESKTOP $BENCHMARK_TOOLS $FONTS $INCLUDE_APPS $EXTRA_TOOLS $LIBREOFFICE" \
sid "$CHROOT_TARGET" \
"deb https://mirror.iscas.ac.cn/revyos/revyos-base/ sid main contrib non-free non-free-firmware" \
"deb https://mirror.iscas.ac.cn/revyos/revyos-kernels/ revyos-kernels main" \
"deb https://mirror.iscas.ac.cn/revyos/revyos-gles-21/ revyos-gles-21 main" \
"deb https://mirror.iscas.ac.cn/revyos/revyos-addons/ revyos-addons main" \
"deb https://mirror.iscas.ac.cn/revyos/revyos-gles-21/ revyos-gles-21 main"
"deb https://mirror.iscas.ac.cn/revyos/revyos-kernels/ revyos-kernels main" \
"deb https://mirror.iscas.ac.cn/revyos/revyos-base/ sid main contrib non-free non-free-firmware"

# move /boot contents to other place
mv -v "$CHROOT_TARGET"/boot/* "$CHROOT_TARGET"/mnt/
Expand Down Expand Up @@ -137,12 +137,12 @@ after_mkrootfs()
chroot "$CHROOT_TARGET" sh -c "useradd -m -s /bin/bash -G adm,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,bluetooth debian"
chroot "$CHROOT_TARGET" sh -c "echo 'debian:debian' | chpasswd"

chroot "$CHROOT_TARGET" sh -c "useradd -m -s /bin/bash -G adm,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,bluetooth sipeed"
chroot "$CHROOT_TARGET" sh -c "echo 'sipeed:licheepi' | chpasswd"
#chroot "$CHROOT_TARGET" sh -c "useradd -m -s /bin/bash -G adm,cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,bluetooth sipeed"
#chroot "$CHROOT_TARGET" sh -c "echo 'sipeed:licheepi' | chpasswd"

# Change hostname
chroot "$CHROOT_TARGET" sh -c "echo lpi4a > /etc/hostname"
chroot "$CHROOT_TARGET" sh -c "echo 127.0.1.1 lpi4a >> /etc/hosts"
chroot "$CHROOT_TARGET" sh -c "echo ahead > /etc/hostname"
chroot "$CHROOT_TARGET" sh -c "echo 127.0.1.1 ahead >> /etc/hosts"

# Add timestamp file in /etc
if [ ! -f revyos-release ]; then
Expand All @@ -158,10 +158,10 @@ after_mkrootfs()
cp -rp addons/lib/firmware rootfs/lib/

# Add Bluetooth firmware and service
cp -rp addons/lpi4a-bt/rootfs/usr/local/bin/rtk_hciattach rootfs/usr/local/bin/
cp -rp addons/lpi4a-bt/rootfs/lib/firmware/rtlbt/rtl8723d_config rootfs/lib/firmware/rtlbt/
cp -rp addons/lpi4a-bt/rootfs/lib/firmware/rtlbt/rtl8723d_fw rootfs/lib/firmware/rtlbt/
cp -rp addons/etc/systemd/system/rtk-hciattach.service rootfs/etc/systemd/system/
#cp -rp addons/lpi4a-bt/rootfs/usr/local/bin/rtk_hciattach rootfs/usr/local/bin/
#cp -rp addons/lpi4a-bt/rootfs/lib/firmware/rtlbt/rtl8723d_config rootfs/lib/firmware/rtlbt/
#cp -rp addons/lpi4a-bt/rootfs/lib/firmware/rtlbt/rtl8723d_fw rootfs/lib/firmware/rtlbt/
#cp -rp addons/etc/systemd/system/rtk-hciattach.service rootfs/etc/systemd/system/

# Add firstboot service
cp -rp addons/etc/systemd/system/firstboot.service rootfs/etc/systemd/system/
Expand All @@ -170,7 +170,7 @@ after_mkrootfs()
# Install system services
chroot "$CHROOT_TARGET" sh -c "systemctl enable pvrsrvkm"
chroot "$CHROOT_TARGET" sh -c "systemctl enable firstboot"
chroot "$CHROOT_TARGET" sh -c "systemctl enable rtk-hciattach"
#chroot "$CHROOT_TARGET" sh -c "systemctl enable rtk-hciattach"

# Use iptables-legacy for docker
chroot "$CHROOT_TARGET" sh -c "update-alternatives --set iptables /usr/sbin/iptables-legacy"
Expand Down

0 comments on commit 3bb17b2

Please sign in to comment.