Booting yocto system (and many other useful scripts)
This commit is contained in:
parent
3fd35d723a
commit
40ae7a8412
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -13,3 +13,6 @@
|
|||||||
path = image/yocto/meta-rust-bin
|
path = image/yocto/meta-rust-bin
|
||||||
url = https://github.com/rust-embedded/meta-rust-bin.git
|
url = https://github.com/rust-embedded/meta-rust-bin.git
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "image/yocto/meta-intel"]
|
||||||
|
path = image/yocto/meta-intel
|
||||||
|
url = git://git.yoctoproject.org/meta-intel
|
||||||
|
|||||||
@ -5,38 +5,39 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
gawk \
|
|
||||||
wget \
|
|
||||||
git \
|
|
||||||
diffstat \
|
|
||||||
unzip \
|
|
||||||
texinfo \
|
|
||||||
gcc \
|
|
||||||
build-essential \
|
build-essential \
|
||||||
chrpath \
|
chrpath \
|
||||||
socat \
|
|
||||||
cpio \
|
cpio \
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
python3-pexpect \
|
|
||||||
xz-utils \
|
|
||||||
debianutils \
|
debianutils \
|
||||||
|
diffstat \
|
||||||
|
file \
|
||||||
|
gawk \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
|
less \
|
||||||
|
libacl1 \
|
||||||
|
liblz4-tool \
|
||||||
|
locales \
|
||||||
|
ovmf \
|
||||||
|
python3 \
|
||||||
python3-git \
|
python3-git \
|
||||||
python3-jinja2 \
|
python3-jinja2 \
|
||||||
|
python3-pexpect \
|
||||||
|
python3-pip \
|
||||||
python3-subunit \
|
python3-subunit \
|
||||||
zstd \
|
|
||||||
liblz4-tool \
|
|
||||||
file \
|
|
||||||
locales \
|
|
||||||
libacl1 \
|
|
||||||
sudo \
|
|
||||||
vim \
|
|
||||||
less \
|
|
||||||
tree \
|
|
||||||
qemu-system-data \
|
qemu-system-data \
|
||||||
qemu-system-x86 \
|
qemu-system-x86 \
|
||||||
qemu-utils \
|
qemu-utils \
|
||||||
|
socat \
|
||||||
|
sudo \
|
||||||
|
texinfo \
|
||||||
|
tree \
|
||||||
|
unzip \
|
||||||
|
vim \
|
||||||
|
wget \
|
||||||
|
xz-utils \
|
||||||
|
zstd \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Set up locale
|
# Set up locale
|
||||||
|
|||||||
@ -9,6 +9,7 @@ BBLAYERS ?= " \
|
|||||||
/workspace/yocto/poky/meta \
|
/workspace/yocto/poky/meta \
|
||||||
/workspace/yocto/poky/meta-poky \
|
/workspace/yocto/poky/meta-poky \
|
||||||
/workspace/yocto/poky/meta-yocto-bsp \
|
/workspace/yocto/poky/meta-yocto-bsp \
|
||||||
|
/workspace/yocto/meta-intel \
|
||||||
/workspace/yocto/meta-openembedded/meta-oe \
|
/workspace/yocto/meta-openembedded/meta-oe \
|
||||||
/workspace/yocto/meta-openembedded/meta-python \
|
/workspace/yocto/meta-openembedded/meta-python \
|
||||||
/workspace/yocto/meta-openembedded/meta-multimedia \
|
/workspace/yocto/meta-openembedded/meta-multimedia \
|
||||||
|
|||||||
@ -1,46 +1,13 @@
|
|||||||
MACHINE = "genericx86-64"
|
#MACHINE = "genericx86-64"
|
||||||
|
MACHINE = "intel-skylake-64"
|
||||||
DISTRO = "poky"
|
DISTRO = "poky"
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
|
||||||
IMAGE_INSTALL:append = " openssh ssh-keys"
|
|
||||||
EXTRA_IMAGE_FEATURES += "ssh-server-openssh"
|
|
||||||
|
|
||||||
# Image formats for QEMU testing and deployment
|
# Limit resource usage for builds
|
||||||
IMAGE_FSTYPES += "ext4 tar.bz2"
|
|
||||||
|
|
||||||
# Root access configuration
|
|
||||||
EXTRA_IMAGE_FEATURES += "empty-root-password"
|
|
||||||
EXTRA_IMAGE_FEATURES += "allow-empty-password"
|
|
||||||
|
|
||||||
# SSH configuration
|
|
||||||
EXTRA_IMAGE_FEATURES += "ssh-server-openssh"
|
|
||||||
|
|
||||||
# Memory optimization settings
|
|
||||||
BB_NUMBER_THREADS = "2"
|
BB_NUMBER_THREADS = "2"
|
||||||
PARALLEL_MAKE = "-j 2"
|
PARALLEL_MAKE = "-j 2"
|
||||||
|
|
||||||
# Limit memory usage for builds
|
|
||||||
BB_SCHEDULER = "completion"
|
BB_SCHEDULER = "completion"
|
||||||
INHERIT += "rm_work"
|
INHERIT += "rm_work"
|
||||||
|
|
||||||
# Rust support
|
#VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
|
||||||
ENABLE_RUST = "1"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-intel-rt"
|
||||||
|
IMAGE_FSTYPES += "wic.vdi"
|
||||||
# GUI support
|
|
||||||
DISTRO_FEATURES:append = " wayland systemd pam usrmerge"
|
|
||||||
VIRTUAL-RUNTIME_init_manager = "systemd"
|
|
||||||
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
|
|
||||||
VIRTUAL-RUNTIME_initscripts = ""
|
|
||||||
|
|
||||||
# Add GUI packages to image
|
|
||||||
CORE_IMAGE_EXTRA_INSTALL += "gui-app weston liberation-fonts"
|
|
||||||
|
|
||||||
# Needed to enable terminal on tty2
|
|
||||||
EXTRA_IMAGE_FEATURES += "debug-tweaks"
|
|
||||||
|
|
||||||
# WiFi support - Intel Centrino Advanced-N 6235 specific
|
|
||||||
DISTRO_FEATURES += "wifi opengl"
|
|
||||||
IMAGE_INSTALL:append = " wpa-supplicant iw linux-firmware packagegroup-base-wifi pciutils usbutils"
|
|
||||||
IMAGE_INSTALL:append = " linux-firmware-iwlwifi-6000g2b-6"
|
|
||||||
|
|
||||||
# Enable iwlwifi driver in kernel
|
|
||||||
KERNEL_FEATURES:append = " features/iwlwifi/iwlwifi.scc"
|
|
||||||
@ -19,7 +19,7 @@ services:
|
|||||||
bash -c "
|
bash -c "
|
||||||
source /workspace/yocto/poky/oe-init-build-env /workspace/build &&
|
source /workspace/yocto/poky/oe-init-build-env /workspace/build &&
|
||||||
cp /workspace/conf/* /workspace/build/conf/ &&
|
cp /workspace/conf/* /workspace/build/conf/ &&
|
||||||
bitbake fcb-looper-image &&
|
bitbake core-image-rt &&
|
||||||
echo 'Build complete. Image files available in output directory.'
|
echo 'Build complete. Image files available in output directory.'
|
||||||
"
|
"
|
||||||
|
|
||||||
@ -48,5 +48,6 @@ services:
|
|||||||
echo 'VNC will be available on localhost:5901' &&
|
echo 'VNC will be available on localhost:5901' &&
|
||||||
echo 'SSH will be available on localhost:2222' &&
|
echo 'SSH will be available on localhost:2222' &&
|
||||||
echo 'QEMU monitor on localhost:4444' &&
|
echo 'QEMU monitor on localhost:4444' &&
|
||||||
qemu-system-x86_64 -accel kvm -cpu host -m 4096 -smp 4 -kernel /workspace/build/tmp/deploy/images/genericx86-64/bzImage -drive file=/workspace/build/tmp/deploy/images/genericx86-64/fcb-looper-image-genericx86-64.rootfs.ext4,if=virtio,format=raw,cache=writeback -netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22,hostfwd=tcp:127.0.0.1:8080-:8080 -device virtio-net-pci,netdev=net0 -device virtio-vga -vnc 127.0.0.1:1 -monitor telnet:127.0.0.1:4444,server,nowait -serial stdio -append 'root=/dev/vda rw console=ttyS0 console=tty0'
|
cp /usr/share/OVMF/OVMF_VARS.fd /tmp/OVMF_VARS.fd &&
|
||||||
|
qemu-system-x86_64 -accel kvm -cpu host -m 4096 -smp 4 -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd -drive if=pflash,format=raw,file=/tmp/OVMF_VARS.fd -drive file=/workspace/build/tmp/deploy/images/intel-skylake-64/core-image-rt-intel-skylake-64.rootfs.wic,if=virtio,format=raw,cache=writeback -netdev user,id=net0,hostfwd=tcp:127.0.0.1:2222-:22,hostfwd=tcp:127.0.0.1:8080-:8080 -device virtio-net-pci,netdev=net0 -device virtio-vga -vnc 127.0.0.1:1 -monitor telnet:127.0.0.1:4444,server,nowait -serial stdio
|
||||||
"
|
"
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
require conf/distro/poky.conf
|
||||||
|
|
||||||
|
DISTRO = "fcb-looper"
|
||||||
|
DISTRO_NAME = "FCB Looper Distribution"
|
||||||
|
DISTRO_VERSION = "1.0"
|
||||||
|
|
||||||
|
# Use busybox-mdev as device manager
|
||||||
|
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
|
||||||
|
|
||||||
|
## Distro features for GUI, W^Fi, and systemd
|
||||||
|
#DISTRO_FEATURES:append = " wayland systemd pam usrmerge wifi opengl"
|
||||||
|
#DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
|
||||||
|
#
|
||||||
|
## Systemd configuration
|
||||||
|
#VIRTUAL-RUNTIME_init_manager = "systemd"
|
||||||
|
#VIRTUAL-RUNTIME_initscripts = ""
|
||||||
|
#
|
||||||
|
## Default target
|
||||||
|
#SYSTEMD_DEFAULT_TARGET = "graphical.target"
|
||||||
@ -4,12 +4,12 @@ BBPATH .= ":${LAYERDIR}"
|
|||||||
# Layer recipes
|
# Layer recipes
|
||||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
|
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||||
|
|
||||||
BBFILE_COLLECTIONS += "meta-fcb-looper"
|
BBFILE_COLLECTIONS += "fcb-looper-layer"
|
||||||
BBFILE_PATTERN_meta-fcb-looper = "^${LAYERDIR}/"
|
BBFILE_PATTERN_fcb-looper-layer = "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_meta-fcb-looper = "10"
|
BBFILE_PRIORITY_fcb-looper-layer = "10"
|
||||||
|
|
||||||
LAYERVERSION_meta-fcb-looper = "1"
|
LAYERVERSION_fcb-looper-layer = "1"
|
||||||
LAYERSERIES_COMPAT_meta-fcb-looper = "scarthgap"
|
LAYERSERIES_COMPAT_fcb-looper-layer = "scarthgap"
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
LAYERDEPENDS_meta-fcb-looper = "core openembedded-layer rust-bin-layer"
|
LAYERDEPENDS_fcb-looper-layer = "core intel openembedded-layer rust-bin-layer"
|
||||||
@ -1,11 +1,14 @@
|
|||||||
SUMMARY = "FCB1010 Looper System Image"
|
SUMMARY = "FCB1010 Looper System Image"
|
||||||
DESCRIPTION = "Minimal embedded Linux system with GUI for audio looper"
|
DESCRIPTION = "Minimal embedded Linux system with GUI for audio looper"
|
||||||
|
|
||||||
require recipes-core/images/core-image-base.bb
|
require recipes-core/images/core-image-minimal.bb
|
||||||
|
|
||||||
|
# Distro features now configured in fcb-looper distribution
|
||||||
|
|
||||||
|
# gui-app
|
||||||
|
|
||||||
IMAGE_INSTALL += "\
|
IMAGE_INSTALL += "\
|
||||||
packagegroup-core-boot \
|
packagegroup-core-boot \
|
||||||
gui-app \
|
|
||||||
weston \
|
weston \
|
||||||
weston-init \
|
weston-init \
|
||||||
liberation-fonts \
|
liberation-fonts \
|
||||||
@ -13,12 +16,25 @@ IMAGE_INSTALL += "\
|
|||||||
openssh \
|
openssh \
|
||||||
ssh-keys \
|
ssh-keys \
|
||||||
wifi-config \
|
wifi-config \
|
||||||
|
wpa-supplicant \
|
||||||
|
iw \
|
||||||
|
linux-firmware \
|
||||||
|
packagegroup-base-wifi \
|
||||||
|
pciutils \
|
||||||
|
usbutils \
|
||||||
|
linux-firmware-iwlwifi-6000g2b-6 \
|
||||||
|
kbd \
|
||||||
|
file \
|
||||||
|
util-linux \
|
||||||
|
keyboard-config \
|
||||||
${CORE_IMAGE_EXTRA_INSTALL} \
|
${CORE_IMAGE_EXTRA_INSTALL} \
|
||||||
"
|
"
|
||||||
|
|
||||||
# Optimize for embedded use
|
# WiFi kernel features - ensure iwlwifi is built
|
||||||
IMAGE_FEATURES += "read-only-rootfs ssh-server-openssh"
|
KERNEL_FEATURES:append = " cfg/80211.scc features/iwlwifi/iwlwifi.scc"
|
||||||
SYSTEMD_DEFAULT_TARGET = "graphical.target"
|
|
||||||
|
# Image features for development and access - removed read-only for debugging
|
||||||
|
IMAGE_FEATURES += "ssh-server-openssh empty-root-password allow-empty-password debug-tweaks"
|
||||||
|
|
||||||
# Size optimization
|
# Size optimization
|
||||||
IMAGE_ROOTFS_SIZE ?= "1048576"
|
IMAGE_ROOTFS_SIZE ?= "1048576"
|
||||||
@ -29,5 +45,3 @@ IMAGE_FSTYPES += "ext4 tar.bz2 wic"
|
|||||||
|
|
||||||
# Custom WIC file without swap
|
# Custom WIC file without swap
|
||||||
WKS_FILE = "fcb-looper-noswap.wks"
|
WKS_FILE = "fcb-looper-noswap.wks"
|
||||||
|
|
||||||
LICENSE = "MIT"
|
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
# WiFi kernel configuration - built into kernel
|
||||||
|
CONFIG_CFG80211=y
|
||||||
|
CONFIG_MAC80211=y
|
||||||
|
CONFIG_IWLWIFI=y
|
||||||
|
CONFIG_IWLDVM=y
|
||||||
|
CONFIG_IWLMVM=y
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||||
|
|
||||||
|
SRC_URI += "file://wifi.cfg"
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE = "genericx86-64"
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Set Belgian keyboard layout
|
||||||
|
loadkeys be
|
||||||
|
# Make it persistent for systemd
|
||||||
|
localectl set-keymap be
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
SUMMARY = "Belgian Keyboard Layout Configuration"
|
||||||
|
DESCRIPTION = "Sets up Belgian keyboard layout on boot"
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||||
|
|
||||||
|
SRC_URI = "file://keyboard-setup.sh"
|
||||||
|
|
||||||
|
S = "${WORKDIR}"
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
# Install keyboard setup script
|
||||||
|
install -d ${D}${bindir}
|
||||||
|
install -m 0755 ${WORKDIR}/keyboard-setup.sh ${D}${bindir}/
|
||||||
|
|
||||||
|
# Create keyboard setup service
|
||||||
|
install -d ${D}${sysconfdir}/systemd/system
|
||||||
|
cat > ${D}${sysconfdir}/systemd/system/keyboard-setup.service << EOF
|
||||||
|
[Unit]
|
||||||
|
Description=Setup Belgian Keyboard Layout
|
||||||
|
DefaultDependencies=false
|
||||||
|
Before=sysinit.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=${bindir}/keyboard-setup.sh
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sysinit.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Enable service
|
||||||
|
install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
|
||||||
|
ln -sf ${sysconfdir}/systemd/system/keyboard-setup.service ${D}${sysconfdir}/systemd/system/sysinit.target.wants/keyboard-setup.service
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES:${PN} = "${bindir}/keyboard-setup.sh \
|
||||||
|
${sysconfdir}/systemd/system/keyboard-setup.service \
|
||||||
|
${sysconfdir}/systemd/system/sysinit.target.wants/*"
|
||||||
|
|
||||||
|
RDEPENDS:${PN} = "systemd kbd"
|
||||||
@ -3,4 +3,4 @@
|
|||||||
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
|
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
|
||||||
part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
|
part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
|
||||||
|
|
||||||
bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0"
|
bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 systemd.gpt_auto=0"
|
||||||
1
image/yocto/meta-intel
Submodule
1
image/yocto/meta-intel
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 38e75c8c1059e5f37659c140c010eaa203238fd2
|
||||||
Loading…
x
Reference in New Issue
Block a user