distro: oE2403SP3-RVA23: Add OLK receipe
- linux-firmware is a pre-req of initramfs - selinux is disabled by default - sv39 is the only supported configuration
This commit is contained in:
3
receipes/openeuler/24.03-lts-sp3-rva23/bsp/OLK/device.mk
Normal file
3
receipes/openeuler/24.03-lts-sp3-rva23/bsp/OLK/device.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
DEVICE_NAME := OLK
|
||||
|
||||
$(foreach profile_dir,$(filter-out %.mk,$(wildcard $(CURRENT_DIR)*)),$(eval $(call add_device_profile,$(profile_dir))))
|
||||
@@ -0,0 +1,24 @@
|
||||
OUTPUT_FORMAT=partitioned_disk
|
||||
PARTITION_TABLE_TYPE=GUID
|
||||
|
||||
PARTITION_1_OFFSET=1MB
|
||||
PARTITION_1_SIZE=499M
|
||||
PARTITION_1_NAME="boot"
|
||||
PARTITION_1_UUID=
|
||||
PARTITION_1_TYPE=bls_boot
|
||||
PARTITION_1_ATTRS=legacy_boot
|
||||
PARTITION_1_USAGE=MOUNTPOINT
|
||||
PARTITION_1_MOUNTPOINT="/boot"
|
||||
PARTITION_1_FS=vfat
|
||||
PARTITION_1_FS_UUID=
|
||||
|
||||
PARTITION_2_OFFSET=
|
||||
PARTITION_2_SIZE=
|
||||
PARTITION_2_NAME="root"
|
||||
PARTITION_2_UUID=
|
||||
PARTITION_2_TYPE=linux_root_riscv64
|
||||
PARTITION_2_ATTRS=
|
||||
PARTITION_2_USAGE=MOUNTPOINT
|
||||
PARTITION_2_MOUNTPOINT="/"
|
||||
PARTITION_2_FS=ext4
|
||||
PARTITION_2_FS_UUID=
|
||||
@@ -0,0 +1,2 @@
|
||||
dracut
|
||||
linux-firmware
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
cat << EOF | column -t | tee "${ROOTFS_DIR}/etc/fstab"
|
||||
UUID=$($get_fs_uuid_by_mountpoint /) / ext4 errors=remount-ro 0 1
|
||||
UUID=$($get_fs_uuid_by_mountpoint /boot) /boot vfat defaults 0 2
|
||||
EOF
|
||||
@@ -0,0 +1,2 @@
|
||||
gdisk
|
||||
parted
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
mkdir -p "${ROOTFS_DIR}/etc/systemd/system"
|
||||
cp "oerv-firstboot.service" "${ROOTFS_DIR}/etc/systemd/system/oerv-firstboot.service"
|
||||
cp "oerv-firstboot.sh" "${ROOTFS_DIR}/usr/sbin/oerv-firstboot.sh"
|
||||
chmod +x "${ROOTFS_DIR}/usr/sbin/oerv-firstboot.sh"
|
||||
mkdir -p "${ROOTFS_DIR}/etc/systemd/system/multi-user.target.wants"
|
||||
ln -s "/etc/systemd/system/oerv-firstboot.service" "${ROOTFS_DIR}/etc/systemd/system/multi-user.target.wants/oerv-firstboot.service"
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Before=systemd-user-sessions.service
|
||||
ConditionPathExists=/etc/systemd/system/multi-user.target.wants/oerv-firstboot.service
|
||||
Requires=-.mount
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/oerv-firstboot.sh
|
||||
ExecStartPost=/usr/bin/rm /etc/systemd/system/multi-user.target.wants/oerv-firstboot.service
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "$0: Expanding root partition..."
|
||||
ROOT_PART="$(findmnt -no SOURCE /)"
|
||||
ROOT_PARTNUM="$(lsblk -pr -no partn "${ROOT_PART}")"
|
||||
ROOT_DISK="$(lsblk -p -no pkname "${ROOT_PART}")"
|
||||
sgdisk -e "${ROOT_DISK}"
|
||||
echo "Yes" | parted ---pretend-input-tty "${ROOT_DISK}" resizepart "${ROOT_PARTNUM}" 100%
|
||||
partprobe
|
||||
resize2fs "${ROOT_PART}"
|
||||
echo "$0: Done."
|
||||
@@ -0,0 +1,2 @@
|
||||
kernel
|
||||
kernel-headers
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
. "${ROOTFS_DIR}/etc/os-release"
|
||||
|
||||
KERNEL_FILE="$(find ${ROOTFS_DIR}/boot -name "vmlinuz*" -exec basename {} \; | head -n 1)"
|
||||
INITRD_FILE="$(find ${ROOTFS_DIR}/boot -name "initramfs*" -exec basename {} \; | head -n 1)"
|
||||
DTB_DIR="$(find ${ROOTFS_DIR}/boot -name "dtb-*" -exec basename {} \; | head -n 1)"
|
||||
|
||||
mkdir "${ROOTFS_DIR}/boot/extlinux"
|
||||
|
||||
cat << EOF | tee "${ROOTFS_DIR}/boot/extlinux/extlinux.conf"
|
||||
default l0
|
||||
menu title U-Boot menu
|
||||
prompt 2
|
||||
timeout 50
|
||||
|
||||
|
||||
label l0
|
||||
menu label ${PRETTY_NAME} - ${KERNEL_FILE#vmlinuz-}
|
||||
linux /${KERNEL_FILE}
|
||||
initrd /${INITRD_FILE}
|
||||
fdtdir /${DTB_DIR}/
|
||||
append root=UUID=$($get_fs_uuid_by_mountpoint /) rootwait rw earlycon=sbi console=ttyS0,115200n8 selinux=0 no4lvl
|
||||
EOF
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
DTB_DIR="$(find ${ROOTFS_DIR}/boot -name "dtb-*" -exec basename {} \; | head -n 1)"
|
||||
DTB_DIR="${ROOTFS_DIR}/boot/${DTB_DIR}"
|
||||
|
||||
mv "${DTB_DIR}/spacemit/k1-bananapi-f3.dtb" "${DTB_DIR}/spacemit/k1-x_deb1.dtb"
|
||||
mv "${DTB_DIR}/spacemit/k3-com260.dtb" "${DTB_DIR}/spacemit/k3_com260.dtb"
|
||||
mv "${DTB_DIR}/spacemit/k3-pico.dtb" "${DTB_DIR}/spacemit/k3_pico.dtb"
|
||||
@@ -0,0 +1 @@
|
||||
PROFILE_NAME := generic
|
||||
Reference in New Issue
Block a user