From a79388fd88e342d58c782b571fc1ba39f095edab Mon Sep 17 00:00:00 2001 From: Grzegorz Kowalski Date: Thu, 19 Oct 2023 13:32:32 +0200 Subject: [PATCH] basic configuration for Pinecube: kernel, bootloader, wireless driver --- conf/layer.conf | 18 +++++ conf/machine/pinecube.conf | 41 ++++++++++++ recipes-bsp/u-boot/u-boot-script/boot.cmd | 65 +++++++++++++++++++ recipes-bsp/u-boot/u-boot-script_1.0.bb | 37 +++++++++++ recipes-core/images/pinecube-image-default.bb | 12 ++++ .../kernel-module-8189es_git.bb | 21 ++++++ .../0001-pinecube-dts-fix-ir-leds.patch | 18 +++++ .../0002-pinecube-dts-battery.patch | 14 ++++ .../0003-pinecube-dts-flash-xtx.patch | 12 ++++ .../linux-yocto/0004-pinecube-dts-usb.patch | 34 ++++++++++ .../linux-yocto/0005-pinecube-dts-csi.patch | 12 ++++ .../linux-yocto/0006-pinecube-dts-audio.patch | 21 ++++++ .../0006-pinecube-dts-axp209.patch | 19 ++++++ recipes-kernel/linux/linux-yocto/pinecube.cfg | 23 +++++++ recipes-kernel/linux/linux-yocto/pinecube.scc | 27 ++++++++ .../linux/linux-yocto/sochip-s3.cfg | 9 +++ .../linux/linux-yocto_6.1%.bbappend | 10 +++ wic/pinecube.wks | 14 ++++ 18 files changed, 407 insertions(+) create mode 100644 conf/layer.conf create mode 100644 conf/machine/pinecube.conf create mode 100644 recipes-bsp/u-boot/u-boot-script/boot.cmd create mode 100644 recipes-bsp/u-boot/u-boot-script_1.0.bb create mode 100644 recipes-core/images/pinecube-image-default.bb create mode 100644 recipes-kernel/kernel-modules/kernel-module-8189es_git.bb create mode 100644 recipes-kernel/linux/linux-yocto/0001-pinecube-dts-fix-ir-leds.patch create mode 100644 recipes-kernel/linux/linux-yocto/0002-pinecube-dts-battery.patch create mode 100644 recipes-kernel/linux/linux-yocto/0003-pinecube-dts-flash-xtx.patch create mode 100644 recipes-kernel/linux/linux-yocto/0004-pinecube-dts-usb.patch create mode 100644 recipes-kernel/linux/linux-yocto/0005-pinecube-dts-csi.patch create mode 100644 recipes-kernel/linux/linux-yocto/0006-pinecube-dts-audio.patch create mode 100644 recipes-kernel/linux/linux-yocto/0006-pinecube-dts-axp209.patch create mode 100644 recipes-kernel/linux/linux-yocto/pinecube.cfg create mode 100644 recipes-kernel/linux/linux-yocto/pinecube.scc create mode 100644 recipes-kernel/linux/linux-yocto/sochip-s3.cfg create mode 100644 recipes-kernel/linux/linux-yocto_6.1%.bbappend create mode 100644 wic/pinecube.wks diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..3a1d31b --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,18 @@ +# 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 += "pinecube-bsp" +BBFILE_PATTERN_pinecube-bsp = "^${LAYERDIR}/" +BBFILE_PRIORITY_pinecube-bsp = "6" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_pinecube-bsp = "2" + + +LAYERDEPENDS_pinecube-bsp = "core sunxi-bsp" +LAYERSERIES_COMPAT_pinecube-bsp = "langdale mickledore" diff --git a/conf/machine/pinecube.conf b/conf/machine/pinecube.conf new file mode 100644 index 0000000..77cfe41 --- /dev/null +++ b/conf/machine/pinecube.conf @@ -0,0 +1,41 @@ +# Pinecube +# +# Sochip S3 SoC +# ARMv7 Processor rev 5 (v7l) +# Allwinner sun8i Family +# half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm +# +# There apparently is some support for the device in mainline kernel, +# let's see how far can we take it. + + +# Architecture tuning +require conf/machine/include/sun8i.inc +require conf/machine/include/arm/feature-arm-dsp.inc +require conf/machine/include/arm/feature-arm-idiv.inc + +# Available machine features +MACHINE_FEATURES = "ext2 rtc serial usbhost vfat wifi" + +# Kernel and device tree +PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" +PREFERRED_VERSION_virtual/kernel = "6.1%" +KERNEL_DEVICETREE = "sun8i-s3-pinecube.dtb" +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" + +# Serial console +SERIAL_CONSOLES ?= "115200;ttyS0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" + +# Bootloader +EXTRA_IMAGEDEPENDS += "virtual/bootloader" +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" +SPL_BINARY = "u-boot-sunxi-with-spl.bin" +UBOOT_MACHINE = "pinecube_defconfig" + +# wic SD card image +IMAGE_FSTYPES += " wic" +WKS_FILE = "pinecube.wks" +do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot virtual/bootloader:do_deploy" +IMAGE_BOOT_FILES ?= "${SPL_BINARY} boot.scr ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE}" +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-devicetree" diff --git a/recipes-bsp/u-boot/u-boot-script/boot.cmd b/recipes-bsp/u-boot/u-boot-script/boot.cmd new file mode 100644 index 0000000..895cad9 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-script/boot.cmd @@ -0,0 +1,65 @@ +# Pinecube u-boot script +# Adapted from Armbian + +echo "[+] Helium u-boot script for Pinecube" +echo "[+] Congratulations! Boot ROM has found and started the bootloader." + +# Setup +setenv load_addr "0x45000000" +setenv overlay_error "false" + +# Default options +setenv verbosity "7" +setenv console "on" +setenv disp_mem_reserves "off" +setenv docker_optimizations "on" +setenv earlycon "on" + +# Deault rootfs +setenv devnum "0" +setenv rootdev "/dev/mmcblk${devnum}p1" +setenv rootfstype "ext4" + +# Print boot source +itest.b *0x28 == 0x00 && setenv boot_source "Primary SD card" +itest.b *0x28 == 0x02 && setenv boot_source "eMMC/Secondary SD card" +itest.b *0x28 == 0x03 && setenv boot_source "SPI ROM" +echo "[+] Boot source: ${boot_source}" + +# Set up boot device info +if test "${devtype}" = "mmc"; then + part uuid mmc ${devnum}:1 partuuid; + setenv devnum ${mmc_bootdev} + setenv rootdev "/dev/mmcblk${mmc_bootdev}p1" +fi +echo "[+] Boot script loaded from ${devtype}:${devnum}" + +# Load boot configuration +if test -e ${devtype} ${devnum} ${prefix}boot.cfg; then + load ${devtype} ${devnum} ${load_addr} ${prefix}boot.cfg + env import -t ${load_addr} ${filesize} + echo "[+] Loaded boot configuration: ${devtype}:${devnum}:${prefix}boot.cfg" +else + echo "[-] No boot configuration found, running defaults" +fi + +# Apply boot configuration +if test "${console}" = "on"; then setenv consoleargs "console=ttyS0,115200 console=tty1"; fi +if test "${earlyconsole}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi + +setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} ubootsource=${devtype} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}" + +if test "${disp_mem_reserves}" = "off"; then setenv bootargs "${bootargs} sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16"; fi +if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=memory swapaccount=1"; fi + +# Load boot files +echo "[+] Loading kernel image ${devtype}:${devnum}:${prefix}zImage @ ${kernel_addr_r}" +load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}zImage +echo "[+] Loading device tree ${devtype}:${devnum}:${prefix}${fdtfile} @ ${fdt_addr_r}" +load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}${fdtfile} +fdt addr ${fdt_addr_r} +fdt resize 65536 + +echo "[+] Setup finished, booting..." +# We're booting without initramfs +bootz ${kernel_addr_r} - ${fdt_addr_r} diff --git a/recipes-bsp/u-boot/u-boot-script_1.0.bb b/recipes-bsp/u-boot/u-boot-script_1.0.bb new file mode 100644 index 0000000..a29b4d0 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-script_1.0.bb @@ -0,0 +1,37 @@ +SUMMARY = "Boot script for u-boot" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +COMPATIBLE_MACHINE = "pinecube" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = "u-boot-mkimage-native" + +inherit deploy + +SRC_URI += "file://boot.cmd" +FILES:${PN} += "/boot" + +do_mkimage () { + uboot-mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n "${DISTRO}-${MACHINE} u-boot script" \ + -d ${THISDIR}/${PN}/boot.cmd ${B}/boot.scr +} + +addtask mkimage after do_compile before do_install + +do_compile[noexec] = "1" + +do_install () { + install -D -m 644 ${B}/boot.scr ${D}/boot/boot.scr +} + +do_deploy () { + install -D -m 644 ${D}/boot/boot.scr ${DEPLOYDIR}/boot.scr-${MACHINE}-${PV}-${PR} + + cd ${DEPLOYDIR} + rm -f boot.scr + ln -sf boot.scr-${MACHINE}-${PV}-${PR} boot.scr +} + +addtask deploy after do_install before do_build diff --git a/recipes-core/images/pinecube-image-default.bb b/recipes-core/images/pinecube-image-default.bb new file mode 100644 index 0000000..c77c51a --- /dev/null +++ b/recipes-core/images/pinecube-image-default.bb @@ -0,0 +1,12 @@ +SUMMARY = "Base image for Pinecube" +LICENSE = "MIT" + +#MACHINE := "pinecube" +COMPATIBLE_MACHINE = "pinecube" + +IMAGE_INSTALL += " \ + u-boot-script \ + kernel-module-8189es \ +" + +IMAGE_FEATURES += "hwcodecs" diff --git a/recipes-kernel/kernel-modules/kernel-module-8189es_git.bb b/recipes-kernel/kernel-modules/kernel-module-8189es_git.bb new file mode 100644 index 0000000..14b214e --- /dev/null +++ b/recipes-kernel/kernel-modules/kernel-module-8189es_git.bb @@ -0,0 +1,21 @@ +SUMMARY = "Realtek RTL8189ES wireless driver module" +# TODO: The repo doesn't specify a license, however source files suggest GPLv2 +LICENSE = "CLOSED" + +SRC_URI = "git://github.com/jwrdegoede/rtl8189ES_linux.git;protocol=https;branch=master" +SRCREV = "05996691a5f3a61968a83f8b368454fd2c6885ca" + +S = "${WORKDIR}/git" +PV = "git${SRCREV}" + +DEPENDS = "virtual/kernel" + +inherit module + +EXTRA_OEMAKE = "ARCH=${ARCH}" +EXTRA_OEMAKE += "KSRC=${STAGING_KERNEL_BUILDDIR}" + +do_install() { + install -d ${D}/lib/modules/${KERNEL_VERSION} + install -m 0755 ${B}/8189es.ko ${D}/lib/modules/${KERNEL_VERSION}/8192eu.ko +} diff --git a/recipes-kernel/linux/linux-yocto/0001-pinecube-dts-fix-ir-leds.patch b/recipes-kernel/linux/linux-yocto/0001-pinecube-dts-fix-ir-leds.patch new file mode 100644 index 0000000..5a69865 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0001-pinecube-dts-fix-ir-leds.patch @@ -0,0 +1,18 @@ +diff -purN a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts ++++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +@@ -25,12 +25,12 @@ leds { + + led1 { + label = "pine64:ir:led1"; +- gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */ ++ gpios = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */ + }; + + led2 { + label = "pine64:ir:led2"; +- gpios = <&pio 1 12 GPIO_ACTIVE_LOW>; /* PB12 */ ++ gpios = <&pio 1 12 GPIO_ACTIVE_HIGH>; /* PB12 */ + }; + }; + diff --git a/recipes-kernel/linux/linux-yocto/0002-pinecube-dts-battery.patch b/recipes-kernel/linux/linux-yocto/0002-pinecube-dts-battery.patch new file mode 100644 index 0000000..8509674 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0002-pinecube-dts-battery.patch @@ -0,0 +1,14 @@ +diff -purN a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts ++++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +@@ -162,6 +162,10 @@ &ac_power_supply { + status = "okay"; + }; + ++&battery_power_supply { ++ status = "okay"; ++}; ++ + ®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1250000>; diff --git a/recipes-kernel/linux/linux-yocto/0003-pinecube-dts-flash-xtx.patch b/recipes-kernel/linux/linux-yocto/0003-pinecube-dts-flash-xtx.patch new file mode 100644 index 0000000..5d9ad4a --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0003-pinecube-dts-flash-xtx.patch @@ -0,0 +1,12 @@ +diff -purN a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts ++++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +@@ -207,7 +207,7 @@ &spi0 { + flash@0 { + #address-cells = <1>; + #size-cells = <1>; +- compatible = "winbond,w25q128", "jedec,spi-nor"; ++ compatible = "xtx,xt25f128b", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + }; diff --git a/recipes-kernel/linux/linux-yocto/0004-pinecube-dts-usb.patch b/recipes-kernel/linux/linux-yocto/0004-pinecube-dts-usb.patch new file mode 100644 index 0000000..b0f373a --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0004-pinecube-dts-usb.patch @@ -0,0 +1,34 @@ +diff -purN a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts ++++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +@@ -75,6 +75,18 @@ csi1_ep: endpoint { + }; + }; + ++&ehci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ ++&ohci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ + &emac { + phy-handle = <&int_mii_phy>; + phy-mode = "mii"; +@@ -217,11 +229,6 @@ &uart2 { + status = "okay"; + }; + +-&usb_otg { +- dr_mode = "host"; +- status = "okay"; +-}; +- + &usbphy { + usb0_vbus-supply = <®_vcc5v0>; + status = "okay"; diff --git a/recipes-kernel/linux/linux-yocto/0005-pinecube-dts-csi.patch b/recipes-kernel/linux/linux-yocto/0005-pinecube-dts-csi.patch new file mode 100644 index 0000000..d89b0c9 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0005-pinecube-dts-csi.patch @@ -0,0 +1,12 @@ +diff -purN a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts ++++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +@@ -64,6 +64,8 @@ &csi1 { + status = "okay"; + + port { ++ #address-cells = <1>; ++ #size-cells = <0>; + csi1_ep: endpoint { + remote-endpoint = <&ov5640_ep>; + bus-width = <8>; diff --git a/recipes-kernel/linux/linux-yocto/0006-pinecube-dts-audio.patch b/recipes-kernel/linux/linux-yocto/0006-pinecube-dts-audio.patch new file mode 100644 index 0000000..3b7964f --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0006-pinecube-dts-audio.patch @@ -0,0 +1,21 @@ +diff -purN a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts ++++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +@@ -226,3 +226,16 @@ &usbphy { + usb0_vbus-supply = <®_vcc5v0>; + status = "okay"; + }; ++ ++&i2s0 { ++ status = "okay"; ++}; ++ ++&codec { ++ allwinner,pa-gpio = <&pio 6 6 GPIO_ACTIVE_HIGH>; /*PG6*/ ++ allwinner,audio-routing = ++ "Speaker", "LINEOUT", ++ "MIC1", "Mic", ++ "Mic", "MBIAS"; ++ status = "okay"; ++}; ++ diff --git a/recipes-kernel/linux/linux-yocto/0006-pinecube-dts-axp209.patch b/recipes-kernel/linux/linux-yocto/0006-pinecube-dts-axp209.patch new file mode 100644 index 0000000..efd5109 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0006-pinecube-dts-axp209.patch @@ -0,0 +1,19 @@ +diff -purN a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +--- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts ++++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts +@@ -99,9 +99,13 @@ &i2c0 { + status = "okay"; + + axp209: pmic@34 { ++ compatible = "x-powers,axp203", ++ "x-powers,axp209"; + reg = <0x34>; +- interrupt-parent = <&nmi_intc>; +- interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ interrupt-parent = <&gic>; ++ interrupts = ; ++ interrupt-controller; ++ #interrupt-cells = <1>; + }; + }; + diff --git a/recipes-kernel/linux/linux-yocto/pinecube.cfg b/recipes-kernel/linux/linux-yocto/pinecube.cfg new file mode 100644 index 0000000..c8f58f5 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/pinecube.cfg @@ -0,0 +1,23 @@ +# Pinecube-specific configuration + +# AXP209 PMIC +CONFIG_INPUT_AXP20X_PEK=y +CONFIG_PINCTRL_AXP209=y +CONFIG_CHARGER_AXP20X=y +CONFIG_BATTERY_AXP20X=y +CONFIG_AXP20X_POWER=y +CONFIG_MFD_AXP20X=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MFD_AXP20X_RSB=y +CONFIG_REGULATOR_AXP20X=y +CONFIG_AXP20X_ADC=y + +# OV5640 over CSI +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_VIDEO_SUN6I_CSI=y +CONFIG_VIDEO_OV5640=y + +# Wireless - needed for RTL8189ES driver +CONFIG_WIRELESS=y +CONFIG_RFKILL=y +CONFIG_CFG80211=y diff --git a/recipes-kernel/linux/linux-yocto/pinecube.scc b/recipes-kernel/linux/linux-yocto/pinecube.scc new file mode 100644 index 0000000..777b5a4 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/pinecube.scc @@ -0,0 +1,27 @@ +define KMACHINE pinecube +define KTYPE standard +define KARCH arm + +# TODO: find a way to actually include this here instead of in bbappend +#include sun8i.scc + +kconf hardware sunxi-cedrus.cfg +kconf hardware sochip-s3.cfg +kconf hardware pinecube.cfg + +# Pinecube relevant parts of original patchset from Icenowy Zheng, +# microcai and Daniel Fullmer that didn't make it into mainline. +# Adapted for linux-yocto 6.1.25 +patch 0001-pinecube-dts-fix-ir-leds.patch +patch 0002-pinecube-dts-battery.patch +patch 0003-pinecube-dts-flash-xtx.patch +patch 0004-pinecube-dts-usb.patch +patch 0005-pinecube-dts-csi.patch + +# applying axp209 patch freezes kernel on boot +# it seems we can either have power control +# or working kernel, but not both +#patch 0006-pinecube-dts-axp209.patch + +# in case axp209 ever works, this should be 0007 +patch 0006-pinecube-dts-audio.patch diff --git a/recipes-kernel/linux/linux-yocto/sochip-s3.cfg b/recipes-kernel/linux/linux-yocto/sochip-s3.cfg new file mode 100644 index 0000000..4d00ebb --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/sochip-s3.cfg @@ -0,0 +1,9 @@ +# Configuration for Sochip S3 SoC + +# Disable SMP, we have only one CPU +CONFIG_SMP=n +CONFIG_NR_CPUS=n + +# sun8i V3S specific +CONFIG_SUN8I_V3S_CCU=y +CONFIG_PINCTRL_SUN8I_V3S=y diff --git a/recipes-kernel/linux/linux-yocto_6.1%.bbappend b/recipes-kernel/linux/linux-yocto_6.1%.bbappend new file mode 100644 index 0000000..dbd5adf --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_6.1%.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE:pinecube = "pinecube" +# TODO: sun8i.scc should be included by pinecube.scc +# but apparently yocto has a problem with including +# scc files from other layers. +SRC_URI += "file://sun8i.scc;type=kmeta;destsuffix=sun8i" +SRC_URI += "file://pinecube.scc;type=kmeta;destsuffix=pinecube" + +LINUX_VERSION_EXTENSION = "-${DISTRO}-${MACHINE}-1" diff --git a/wic/pinecube.wks b/wic/pinecube.wks new file mode 100644 index 0000000..8450c0f --- /dev/null +++ b/wic/pinecube.wks @@ -0,0 +1,14 @@ +# short-description: Helium SD card image for Pinecube +# base: meta-sunxi-bsp/wic/sunxi.wks + +# Allwinner sunxi boot ROM expects to find a bootloader at 8KB offset +# on the boot device. The bootloader should be the eGON SPL boot image, +# eg. u-boot-sunxi. For u-boot the built image is usually named +# u-boot-sunxi-with-spl.bin. It should be added to machine's +# IMAGE_BOOT_FILES for wic to find it. + +part u-boot --source rawcopy --sourceparams="file=u-boot-sunxi-with-spl.bin" --ondisk mmcblk0 --offset 8 --no-table + +# add your partitions and options below: +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label helium-root --active --align 4 +bootloader --append="console=ttyS0,115200"