Skip to content

Commit

Permalink
Add Rock Pi X
Browse files Browse the repository at this point in the history
Adds support for the Rock Pi X machine
  • Loading branch information
JPEWdev committed Jan 7, 2021
1 parent 986033e commit 8b00d47
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 0 deletions.
Empty file added ci/rockpix/conftest.py
Empty file.
21 changes: 21 additions & 0 deletions ci/rockpix/env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
targets:
main:
resources:
RemotePlace:
name: !template $LG_PLACE
drivers:
PDUDaemonDriver:
delay: 5
USBSDWireDriver: {}
USBStorageDriver:
image: rockpix-diskimage
SerialDriver: {}
ShellDriver:
login_prompt: ' login: '
username: root
prompt: 'root@[a-zA-Z0-9_.-]+:[^ ]+ '
ShellStrategy: {}

images:
rockpix-diskimage: !template $LG_DEPLOY_DIR/rockpix/images/core-image-doom-rock-pi-x.wic.bz2

2 changes: 2 additions & 0 deletions ci/rockpix/test_boot_rockpix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_boot(image, shell_command):
shell_command.run_check("true")
18 changes: 18 additions & 0 deletions meta-rockpix/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2020 Joshua Watt <JPEWhacker@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)

# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "rockpix"
BBFILE_PATTERN_rockpix = "^${LAYERDIR}/"
BBFILE_PRIORITY_rockpix = "10"

# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_rockpix = "1"
LAYERSERIES_COMPAT_rockpix = "gatesgarth"
LAYERDEPENDS_rockpix = "core"
40 changes: 40 additions & 0 deletions meta-rockpix/conf/machine/rock-pi-x.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#@TYPE: Machine
#@NAME: Generic x86_64
#@DESCRIPTION: Machine configuration for generic x86_64 (64-bit) PCs and servers. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware.

DEFAULTTUNE ?= "core2-64"
require conf/machine/include/tune-core2.inc
include conf/machine/include/x86-base.inc
require conf/machine/include/qemuboot-x86.inc

MACHINE_FEATURES += "wifi efi pcbios"

PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
KCONFIG_MODE ?= "alldefconfig"
KBUILD_DEFCONFIG ?= "x86_64_defconfig"

PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
XSERVER ?= "${XSERVER_X86_BASE} \
${XSERVER_X86_EXT} \
${XSERVER_X86_I915} \
${XSERVER_X86_I965} \
${XSERVER_X86_FBDEV} \
${XSERVER_X86_VESA} \
${XSERVER_X86_MODESETTING} \
"

GLIBC_ADDONS = "nptl"

IMAGE_FSTYPES += "wic wic.bmap"
WKS_FILE ?= "rock-pi-x.wks.in"
EFI_PROVIDER ??= "grub-efi"
do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot"
do_image_wic[recrdeptask] += "do_bootimg"

SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS0"

MACHINE_EXTRA_RRECOMMENDS += "kernel-modules linux-firmware"

#For runqemu
QB_SYSTEM_NAME = "qemu-system-x86_64"

12 changes: 12 additions & 0 deletions meta-rockpix/recipes-kernel/linux/linux-yocto/rock-pi-x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CONFIG_X86_INTEL_LPSS=y
CONFIG_SERIAL_8250_16550A_VARIANTS=y
CONFIG_SERIAL_8250_DW=y
CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_PINMUX=y
CONFIG_PINCONF=y
CONFIG_GENERIC_PINCONF=y
CONFIG_PINCTRL_CHERRYVIEW=m
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_FASTPATH_LIMIT=512
CONFIG_GPIO_ACPI=y
CONFIG_GPIOLIB_IRQCHIP=y
5 changes: 5 additions & 0 deletions meta-rockpix/recipes-kernel/linux/linux-yocto_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI_append_rock-pi-x = " file://rock-pi-x.cfg"

COMPATIBLE_MACHINE_append_rock-pi-x = "|rock-pi-x"
6 changes: 6 additions & 0 deletions meta-rockpix/wic/rock-pi-x.wks.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --ondisk sda --label msdos --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
part swap --ondisk sda --size 44 --label swap1 --fstype=swap

bootloader --ptable gpt --timeout=5

18 changes: 18 additions & 0 deletions whisk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ versions:
- name: rockchip
paths:
- "%{WHISK_PROJECT_ROOT}/gatesgarth/meta-rockchip"
- name: rockpix
paths:
- "${WHISK_PROJECT_ROOT}/meta-rockpix"
- name: doom
paths:
- "%{WHISK_PROJECT_ROOT}/meta-doom"
Expand All @@ -51,6 +54,9 @@ versions:
- name: rockchip
paths:
- "%{WHISK_PROJECT_ROOT}/hardknott/meta-rockchip"
- name: rockpix
paths:
- "${WHISK_PROJECT_ROOT}/meta-rockpix"
- name: doom
paths:
- "%{WHISK_PROJECT_ROOT}/meta-doom"
Expand Down Expand Up @@ -157,3 +163,15 @@ products:
conf: |
MACHINE = "qemux86-64"
PACKAGECONFIG_append_pn-qemu-system-native = " gtk+"
rockpix:
description: Rock Pi X
default_version: gatesgarth
layers:
- core
- rockpix
- doom
targets:
- "mc:product-rockpix:core-image-doom"
conf: |
MACHINE = "rock-pi-x"

0 comments on commit 8b00d47

Please sign in to comment.