Skip to content

Commit 414f479

Browse files
Pull req (#1)
* trying out matrix * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update nabu-rootfsKernel_build.sh * Update nabu-rootfsKernel_build.sh * Update nabu-rootfs_build.sh * Delete nabu-rootfs_build.sh * Rename nabu-rootfsKernel_build.sh to nabu-rootfs_build.sh * Create nabu-Kernel_build.sh * Update main.yml * temporaly disabled desktop for debug * Update nabu-rootfs_build.sh * Update main.yml * Update nabu-rootfs_build.sh * Update README.md * Update README.md * Update README.md * Built to test ready for contribute * Update main.yml * Add files via upload * Delete nabu.png * Add files via upload * Delete nabu.png * Add files via upload * Delete nabu.png * Add files via upload * Update README.md * Update README.md * Update README.md grammar
1 parent 7b6d3ff commit 414f479

File tree

6 files changed

+74
-160
lines changed

6 files changed

+74
-160
lines changed

.github/workflows/main.yml

+36-14
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,54 @@ on:
1616
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1717
jobs:
1818
# This workflow contains a single job called "build"
19-
build:
20-
# The type of runner that the job will run on
19+
kernel:
2120
runs-on: ubuntu-latest
22-
21+
strategy:
22+
matrix:
23+
version: [6.4, 6.6, 6.7]
2324
# Steps represent a sequence of tasks that will be executed as part of the job
2425
steps:
2526
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26-
- uses: actions/checkout@v3
27-
27+
- uses: actions/checkout@v4
28+
2829
- name: Install Dependencies
2930
run: sudo apt update && sudo apt install build-essential gcc-aarch64-linux-gnu bc flex bison 7zip kmod bash cpio binutils tar git wget dpkg libssl-dev
3031

31-
- name: Build kernel and rootfs.img
32-
run: sudo sh nabu-rootfsKernel_build.sh
32+
- name: Build kernel
33+
run: sudo sh nabu-Kernel_build.sh ${{ matrix.version }}
3334

34-
- name: Upload rootfs.7z
35+
- name: Upload deb packages
3536
uses: actions/upload-artifact@v4.0.0
3637
with:
3738
# Artifact name
38-
name: rootfs
39-
path: rootfs.7z
40-
compression-level: 0
39+
name: xiaomi-nabu-debs_${{ matrix.version }}
40+
path: ${{ github.workspace }}/*.deb
41+
42+
rootfs:
43+
# The type of runner that the job will run on
44+
runs-on: ubuntu-latest
45+
needs: kernel
46+
strategy:
47+
matrix:
48+
desktop: [ubuntu-desktop, lomiri]
49+
kernel: [6.4, 6.6, 6.7]
50+
# Steps represent a sequence of tasks that will be executed as part of the job
51+
steps:
52+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
53+
- uses: actions/checkout@v4
54+
- uses: actions/download-artifact@v4
55+
with:
56+
pattern: xiaomi-nabu-debs*
57+
- name: Install Dependencies
58+
run: sudo apt update && sudo apt install unzip build-essential gcc-aarch64-linux-gnu bc flex bison 7zip kmod bash cpio binutils tar git wget dpkg libssl-dev
4159

42-
- name: Upload deb packages
60+
- name: Build rootfs
61+
run: sudo sh nabu-rootfs_build.sh ${{ matrix.desktop }} ${{ matrix.kernel }}
62+
63+
- name: Upload rootfs.7z
4364
uses: actions/upload-artifact@v4.0.0
4465
with:
4566
# Artifact name
46-
name: xiaomi-nabu-debs
47-
path: ${{ github.workspace }}/*.deb
67+
name: rootfs_${{ matrix.desktop }}_${{ matrix.kernel }}
68+
path: rootfs.7z
69+
compression-level: 0

README.md

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
1-
# Ubuntu rootfs for Xiaomi Pad 5
2-
This repo contians scripts for automatic building of ubuntu rootfs for Xiaomi Pad 5
1+
<img align="right" src="https://raw.githubusercontent.com/jiganomegsdfdf/ubuntu-xiaomi-nabu/master/ubnt.png" width="425" alt="Ubuntu 23.04 Running On A Xiaomi Pad 5">
2+
3+
# Ubuntu for Xiaomi Pad 5
4+
This repo contians scripts for automatic building of ubuntu rootfs and kernel for Xiaomi Pad 5
5+
6+
# Where do i get needed files?
7+
Actually, just go to the "Actions" tab, find one of latest builds and download file named **rootfs_(Desktop Environment you want)_(Kernel version you want)**
8+
<br>for update download file named **xiaomi-nabu-debs_(Kernel version you want)**
9+
10+
# Update info
11+
- Unpack .zip you downloaded
12+
- Run dpkg -i *-xiaomi-nabu.deb
13+
- P.S. if you are moving to another kernel version make that after installing .deb's
14+
<br>**First method**: just replace your old kernel version with the new kernel version in /boot/grub/grub.cfg
15+
<br>**Second method**: grub-install and grub-mkconfig -o /boot/grub/grub.cfg
316

417
# Install info
5-
- rootfs.img must be flashed to partition named "linux"
18+
- Unpack .zip you downloaded
19+
- Unpack extracted .7z (there you take rootfs.img)
20+
- rootfs.img must be flashed to the partition named "linux"
621
- Partition for efi boot must be named "esp"
7-
- Install grub using grub-install and grub-mkconfig -o /boot/grub/grub.cfg. If done from android make sure that efs partition mounted at /boot/efi, after generating grub.cfg change all of "/dev/block/" to "/dev/"
22+
- Install grub using grub-install and grub-mkconfig -o /boot/grub/grub.cfg. If done from android make sure that efs partition is mounted at /boot/efi, after generating grub.cfg change all of "/dev/block/" to "/dev/"

nabu-Kernel_build.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
git clone https://github.com/map220v/sm8150-mainline.git --branch nabu-$1 --depth 1 linux
2+
cd linux
3+
sed -i 'CONFIG_CMDLINE="quiet splash"' ./arch/arm64/configs/sm8150.config
4+
make -j$(nproc) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig sm8150.config
5+
make -j$(nproc) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
6+
mkdir ../linux-xiaomi-nabu/boot
7+
cp arch/arm64/boot/Image.gz ../linux-xiaomi-nabu/boot/vmlinuz-$2.0-sm8150
8+
cp arch/arm64/boot/dts/qcom/sm8150-xiaomi-nabu.dtb ../linux-xiaomi-nabu/boot/dtb-$2.0-sm8150
9+
rm -rf ../linux-xiaomi-nabu/lib
10+
make -j$(nproc) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=../linux-xiaomi-nabu modules_install
11+
rm ../linux-xiaomi-nabu/lib/modules/**/build
12+
cd ..
13+
rm -rf linux
14+
15+
dpkg-deb --build --root-owner-group linux-xiaomi-nabu
16+
dpkg-deb --build --root-owner-group firmware-xiaomi-nabu
17+
dpkg-deb --build --root-owner-group alsa-xiaomi-nabu

nabu-rootfsKernel_build.sh

-132
This file was deleted.

nabu-rootfs_build.sh

+2-10
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ fi
88

99
VERSION="23.10"
1010

11-
#DEPS dpkg, wget, binfmt support(or arm64 device), 7zip
12-
13-
dpkg-deb --build --root-owner-group linux-xiaomi-nabu
14-
dpkg-deb --build --root-owner-group firmware-xiaomi-nabu
15-
dpkg-deb --build --root-owner-group alsa-xiaomi-nabu
16-
17-
18-
1911
truncate -s 6G rootfs.img
2012
mkfs.ext4 rootfs.img
2113
mkdir rootdir
@@ -56,7 +48,7 @@ chroot rootdir apt update
5648
chroot rootdir apt upgrade -y
5749

5850
#u-boot-tools breaks grub installation
59-
chroot rootdir apt install -y bash-completion sudo ssh nano u-boot-tools- ubuntu-desktop
51+
chroot rootdir apt install -y bash-completion sudo ssh nano u-boot-tools- $1
6052

6153
#chroot rootdir gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts-only-mounted true
6254

@@ -68,7 +60,7 @@ chroot rootdir apt install -y rmtfs protection-domain-mapper tqftpserv
6860
#Remove check for "*-laptop"
6961
sed -i '/ConditionKernelVersion/d' rootdir/lib/systemd/system/pd-mapper.service
7062

71-
cp *-xiaomi-nabu.deb rootdir/tmp/
63+
cp /home/runner/work/ubuntu-xiaomi-nabu/ubuntu-xiaomi-nabu/xiaomi-nabu-debs_$2/*-xiaomi-nabu.deb rootdir/tmp/
7264
chroot rootdir dpkg -i /tmp/linux-xiaomi-nabu.deb
7365
chroot rootdir dpkg -i /tmp/firmware-xiaomi-nabu.deb
7466
chroot rootdir dpkg -i /tmp/alsa-xiaomi-nabu.deb

ubnt.png

340 KB
Loading

0 commit comments

Comments
 (0)