Skip to content

Commit d18b32a

Browse files
committed
not build with esp partition
1 parent 7214163 commit d18b32a

File tree

3 files changed

+18
-29
lines changed

3 files changed

+18
-29
lines changed

create-seperated-image.sh

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,25 @@
11
#!/bin/bash
22
set -ex
33
image_name=$1
4-
efi_start_sector=$(gdisk -l ./${image_name}|grep efi|awk '{print $2}')
5-
efi_end_sector=$(gdisk -l ./${image_name}|grep efi|awk '{print $3}')
64
rootfs_start_sector=$(gdisk -l ./${image_name}|grep rootfs|awk '{print $2}')
75
rootfs_end_sector=$(gdisk -l ./${image_name}|grep rootfs|awk '{print $3}')
8-
rm esp*.img rootfs*.img ||true
9-
dd if=./${image_name} skip=${efi_start_sector} count=$((${efi_end_sector} - ${efi_start_sector})) of=esp.img
6+
rm rootfs*.img ||true
107
dd if=./${image_name} skip=${rootfs_start_sector} count=$((${rootfs_end_sector} - ${rootfs_start_sector})) of=rootfs.img
118
rm ${image_name}
129

1310
old_rootfs_image=rootfs.img
1411
old_rootfs_image_mount_dir=rootfs
1512
old_rootfs_image_uuid=$(blkid -s UUID -o value ${old_rootfs_image})
16-
old_esp_image=esp.img
17-
old_esp_image_mount_dir=esp
18-
old_esp_image_uuid=$(blkid -s UUID -o value ${old_esp_image})
1913
new_rootfs_image=${image_name%*.img}-rootfs.img
2014
new_rootfs_image_mount_dir=rootfs-new
21-
new_esp_image=${image_name%*.img}-esp.img
22-
new_esp_image_mount_dir=esp-new
23-
mkdir -p ${old_rootfs_image_mount_dir} ${old_esp_image_mount_dir} ${new_rootfs_image_mount_dir} ${new_esp_image_mount_dir}
15+
mkdir -p ${old_rootfs_image_mount_dir} ${new_rootfs_image_mount_dir}
2416
truncate --size=8192M ${new_rootfs_image}
25-
truncate --size=200M ${new_esp_image}
26-
mkfs.fat -S 4096 ${new_esp_image}
2717
mkfs.ext4 -F ${new_rootfs_image}
28-
new_esp_image_uuid=$(blkid -s UUID -o value ${new_esp_image})
2918
new_rootfs_image_uuid=$(blkid -s UUID -o value ${new_rootfs_image})
30-
sudo mount ${old_esp_image} ${old_esp_image_mount_dir}
31-
sudo mount ${new_esp_image} ${new_esp_image_mount_dir}
32-
sudo cp -rfp ${old_esp_image_mount_dir}/* ${new_esp_image_mount_dir}/
33-
sudo umount ${new_esp_image_mount_dir}
34-
sudo umount ${old_esp_image_mount_dir}
3519
sudo mount ${old_rootfs_image} ${old_rootfs_image_mount_dir}
3620
sudo mount ${new_rootfs_image} ${new_rootfs_image_mount_dir}
3721
sudo cp -rfp ${old_rootfs_image_mount_dir}/* ${new_rootfs_image_mount_dir}/
3822
sudo sed -i "s|${old_rootfs_image_uuid}|${new_rootfs_image_uuid}|g" ${new_rootfs_image_mount_dir}/etc/fstab
39-
sudo sed -i "s|${old_esp_image_uuid}|${new_esp_image_uuid}|g" ${new_rootfs_image_mount_dir}/etc/fstab
4023
gzip -c ./${new_rootfs_image_mount_dir}/boot/vmlinuz-*-sm8250-arm64 > Image.gz
4124
for panel_type in boe csot
4225
do
@@ -58,7 +41,6 @@ sudo umount ${old_rootfs_image_mount_dir}
5841
e2fsck -p -f ${new_rootfs_image}
5942
resize2fs -M ${new_rootfs_image}
6043
xz -z -T0 ${new_rootfs_image}
61-
xz -z -T0 ${new_esp_image}
6244
xz -z -T0 armbian-kernel-boe.img
6345
xz -z -T0 armbian-kernel-csot.img
64-
rm ${old_rootfs_image} ${old_esp_image} ||true
46+
rm ${old_rootfs_image} ||true

qcom-abl.conf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# SPDX-License-Identifier: GPL-2.0
3+
#
4+
# Copyright (c) 2013-2023 Igor Pecovnik, [email protected]
5+
#
6+
# This file is a part of the Armbian Build Framework
7+
# https://github.com/armbian/build/
8+
#
9+
# Important: LINUXFAMILY and ARCH are defined _before_ including the common family include
10+
declare -g LINUXFAMILY="arm64"
11+
declare -g ARCH="arm64"

xiaomi-elish.conf

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
# aarch64 via UEFI for all UEFI-enabled boards
22
declare -g BOARD_NAME="Xiaomi Elish"
3-
declare -g BOARDFAMILY="uefi-arm64"
4-
declare -g BOARD_MAINTAINER="rpardini"
3+
declare -g BOARD_MAINTAINER="amazingfate"
4+
declare -g BOARDFAMILY="qcom-abl"
55
declare -g KERNEL_TARGET="sm8250"
66
declare -g EXTRAWIFI="no"
77
declare -g MODULES="spi-geni-qcom nt36523_ts"
8-
9-
declare -g BOOT_LOGO=desktop
10-
11-
# This board boots via EFI/Grub, but requires a DTB to be passed, from Grub, to the Kernel.
12-
declare -g BOOT_FDT_FILE="qcom/sm8250-xiaomi-elish-boe.dtb"
13-
enable_extension "grub-with-dtb" # important, puts the whole DTB handling in place.
8+
declare -g BOOTCONFIG="none"
9+
declare -g IMAGE_PARTITION_TABLE="gpt"
1410

1511
function post_family_config_branch_sm8250__pmos_kernel() {
1612
display_alert "Setting up steev's kernel for" "${BOARD}" "warn"

0 commit comments

Comments
 (0)