From 70fbf36c8bca937d23e14761ae3df0d2ed205f7a Mon Sep 17 00:00:00 2001 From: Grzegorz Kowalski Date: Thu, 19 Oct 2023 13:26:07 +0200 Subject: [PATCH] basic configuration for sunxi kernel and bootrom --- conf/layer.conf | 18 ++ conf/machine/include/sun8i.inc | 6 + .../linux-yocto/0001-sun8i-v3s-dts-i2s0.patch | 23 +++ .../linux-yocto/0001-sunxi-spi-nor-xtx.patch | 58 ++++++ .../0002-sun8i-v3s-dts-ehci-ohci.patch | 29 +++ .../linux-yocto/0003-sun8i-codec-analog.patch | 14 ++ recipes-kernel/linux/linux-yocto/sun8i.cfg | 20 ++ recipes-kernel/linux/linux-yocto/sun8i.scc | 14 ++ .../linux/linux-yocto/sunxi-cedrus.cfg | 7 + .../linux/linux-yocto/sunxi-default-6.1.cfg | 177 ++++++++++++++++++ .../linux/linux-yocto/sunxi-generic.cfg | 24 +++ recipes-kernel/linux/linux-yocto/sunxi.scc | 11 ++ .../linux/linux-yocto_6.1%.bbappend | 1 + wic/sunxi.wks | 11 ++ 14 files changed, 413 insertions(+) create mode 100644 conf/layer.conf create mode 100644 conf/machine/include/sun8i.inc create mode 100644 recipes-kernel/linux/linux-yocto/0001-sun8i-v3s-dts-i2s0.patch create mode 100644 recipes-kernel/linux/linux-yocto/0001-sunxi-spi-nor-xtx.patch create mode 100644 recipes-kernel/linux/linux-yocto/0002-sun8i-v3s-dts-ehci-ohci.patch create mode 100644 recipes-kernel/linux/linux-yocto/0003-sun8i-codec-analog.patch create mode 100644 recipes-kernel/linux/linux-yocto/sun8i.cfg create mode 100644 recipes-kernel/linux/linux-yocto/sun8i.scc create mode 100644 recipes-kernel/linux/linux-yocto/sunxi-cedrus.cfg create mode 100644 recipes-kernel/linux/linux-yocto/sunxi-default-6.1.cfg create mode 100644 recipes-kernel/linux/linux-yocto/sunxi-generic.cfg create mode 100644 recipes-kernel/linux/linux-yocto/sunxi.scc create mode 100644 recipes-kernel/linux/linux-yocto_6.1%.bbappend create mode 100644 wic/sunxi.wks diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..f1359e6 --- /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 += "sunxi-bsp" +BBFILE_PATTERN_sunxi-bsp = "^${LAYERDIR}/" +BBFILE_PRIORITY_sunxi-bsp = "6" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_sunxi-bsp = "2" + + +LAYERDEPENDS_sunxi-bsp = "core" +LAYERSERIES_COMPAT_sunxi-bsp = "langdale mickledore" diff --git a/conf/machine/include/sun8i.inc b/conf/machine/include/sun8i.inc new file mode 100644 index 0000000..3c71155 --- /dev/null +++ b/conf/machine/include/sun8i.inc @@ -0,0 +1,6 @@ +# Allwinner sun8i family + +DEFAULTTUNE = "armv7athf-neon-vfpv4" +require conf/machine/include/arm/arch-armv7a.inc + +QB_SYSTEM_NAME = "qemu-system-arm" diff --git a/recipes-kernel/linux/linux-yocto/0001-sun8i-v3s-dts-i2s0.patch b/recipes-kernel/linux/linux-yocto/0001-sun8i-v3s-dts-i2s0.patch new file mode 100644 index 0000000..f926c0f --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0001-sun8i-v3s-dts-i2s0.patch @@ -0,0 +1,23 @@ +diff -purN a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi +--- a/arch/arm/boot/dts/sun8i-v3s.dtsi ++++ b/arch/arm/boot/dts/sun8i-v3s.dtsi +@@ -445,6 +445,19 @@ pwm: pwm@1c21400 { + status = "disabled"; + }; + ++ i2s0: i2s@1c22000 { ++ #sound-dai-cells = <0>; ++ compatible = "allwinner,sun8i-h3-i2s"; ++ reg = <0x01c22000 0x400>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_I2S0>, <&ccu CLK_I2S0>; ++ clock-names = "apb", "mod"; ++ dmas = <&dma 3>, <&dma 3>; ++ resets = <&ccu RST_BUS_I2S0>; /* TODO: Areset/sun8i-v3s-ccu says this isn't available on V3s */ ++ dma-names = "rx", "tx"; ++ status = "disabled"; ++ }; ++ + lradc: lradc@1c22800 { + compatible = "allwinner,sun4i-a10-lradc-keys"; + reg = <0x01c22800 0x400>; diff --git a/recipes-kernel/linux/linux-yocto/0001-sunxi-spi-nor-xtx.patch b/recipes-kernel/linux/linux-yocto/0001-sunxi-spi-nor-xtx.patch new file mode 100644 index 0000000..ffc2529 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0001-sunxi-spi-nor-xtx.patch @@ -0,0 +1,58 @@ +diff -purN a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile +--- a/drivers/mtd/spi-nor/Makefile ++++ b/drivers/mtd/spi-nor/Makefile +@@ -17,6 +17,7 @@ spi-nor-objs += sst.o + spi-nor-objs += winbond.o + spi-nor-objs += xilinx.o + spi-nor-objs += xmc.o ++spi-nor-objs += xtx.o + spi-nor-$(CONFIG_DEBUG_FS) += debugfs.o + obj-$(CONFIG_MTD_SPI_NOR) += spi-nor.o + +diff -purN a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c +--- a/drivers/mtd/spi-nor/core.c ++++ b/drivers/mtd/spi-nor/core.c +@@ -1633,6 +1633,7 @@ static const struct spi_nor_manufacturer *manufacturers[] = { + &spi_nor_winbond, + &spi_nor_xilinx, + &spi_nor_xmc, ++ &spi_nor_xtx, + }; + + static const struct flash_info * +diff -purN a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h +--- a/drivers/mtd/spi-nor/core.h ++++ b/drivers/mtd/spi-nor/core.h +@@ -627,6 +627,7 @@ extern const struct spi_nor_manufacturer spi_nor_sst; + extern const struct spi_nor_manufacturer spi_nor_winbond; + extern const struct spi_nor_manufacturer spi_nor_xilinx; + extern const struct spi_nor_manufacturer spi_nor_xmc; ++extern const struct spi_nor_manufacturer spi_nor_xtx; + + extern const struct attribute_group *spi_nor_sysfs_groups[]; + +diff -purN a/drivers/mtd/spi-nor/xtx.c b/drivers/mtd/spi-nor/xtx.c +--- /dev/null ++++ b/drivers/mtd/spi-nor/xtx.c +@@ -0,0 +1,21 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (C) 2005, Intec Automation Inc. ++ * Copyright (C) 2014, Freescale Semiconductor, Inc. ++ */ ++ ++#include ++ ++#include "core.h" ++ ++static const struct flash_info xtx_parts[] = { ++ /* XTX (Shenzhen Xin Tian Xia Tech) */ ++ { "xt25f32b", INFO(0x0b4016, 0, 64 * 1024, 64, SECT_4K) }, ++ { "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, SECT_4K) }, ++}; ++ ++const struct spi_nor_manufacturer spi_nor_xtx = { ++ .name = "xtx", ++ .parts = xtx_parts, ++ .nparts = ARRAY_SIZE(xtx_parts), ++}; diff --git a/recipes-kernel/linux/linux-yocto/0002-sun8i-v3s-dts-ehci-ohci.patch b/recipes-kernel/linux/linux-yocto/0002-sun8i-v3s-dts-ehci-ohci.patch new file mode 100644 index 0000000..e5c9d43 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0002-sun8i-v3s-dts-ehci-ohci.patch @@ -0,0 +1,29 @@ +diff -purN a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi +--- a/arch/arm/boot/dts/sun8i-v3s.dtsi ++++ b/arch/arm/boot/dts/sun8i-v3s.dtsi +@@ -319,6 +319,25 @@ usbphy: phy@1c19400 { + #phy-cells = <1>; + }; + ++ ehci0: usb@1c1a000 { ++ compatible = "allwinner,sun8i-v3s-ehci", "generic-ehci"; ++ reg = <0x01c1a000 0x100>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>; ++ resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>; ++ status = "disabled"; ++ }; ++ ++ ohci0: usb@1c1a400 { ++ compatible = "allwinner,sun8i-v3s-ohci", "generic-ohci"; ++ reg = <0x01c1a400 0x100>; ++ interrupts = ; ++ clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>, ++ <&ccu CLK_USB_OHCI0>; ++ resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>; ++ status = "disabled"; ++ }; ++ + ccu: clock@1c20000 { + compatible = "allwinner,sun8i-v3s-ccu"; + reg = <0x01c20000 0x400>; diff --git a/recipes-kernel/linux/linux-yocto/0003-sun8i-codec-analog.patch b/recipes-kernel/linux/linux-yocto/0003-sun8i-codec-analog.patch new file mode 100644 index 0000000..98e0788 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0003-sun8i-codec-analog.patch @@ -0,0 +1,14 @@ +diff -purN a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c +--- a/sound/soc/sunxi/sun8i-codec-analog.c ++++ b/sound/soc/sunxi/sun8i-codec-analog.c +@@ -731,6 +731,10 @@ static int sun8i_codec_analog_add_mixer(struct snd_soc_component *cmpnt, + static const struct sun8i_codec_analog_quirks sun8i_v3s_quirks = { + .has_headphone = true, + .has_hmic = true, ++ .has_linein = true, ++ .has_lineout = true, ++ .has_mbias = true, ++ .has_mic2 = true, + }; + + static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt) diff --git a/recipes-kernel/linux/linux-yocto/sun8i.cfg b/recipes-kernel/linux/linux-yocto/sun8i.cfg new file mode 100644 index 0000000..d2322c2 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/sun8i.cfg @@ -0,0 +1,20 @@ +# sun8i specific options + +# Enable most of sun8i features +CONFIG_MACH_SUN8I=y +CONFIG_DWMAC_SUN8I=y +CONFIG_SUN8I_THERMAL=y +CONFIG_DRM_SUN8I_DW_HDMI=y +CONFIG_DRM_SUN8I_MIXER=y +CONFIG_DRM_SUN8I_TCON_TOP=y +CONFIG_SND_SUN8I_CODEC=y +CONFIG_SND_SUN8I_CODEC_ANALOG=y +CONFIG_SND_SUN8I_ADDA_PR_REGMAP=y +CONFIG_CLK_SUNXI_PRCM_SUN8I=y +CONFIG_CRYPTO_DEV_SUN8I_CE=y +CONFIG_CRYPTO_DEV_SUN8I_CE_HASH=y +CONFIG_CRYPTO_DEV_SUN8I_CE_PRNG=y +CONFIG_CRYPTO_DEV_SUN8I_CE_TRNG=y +CONFIG_CRYPTO_DEV_SUN8I_SS=y +CONFIG_CRYPTO_DEV_SUN8I_SS_PRNG=y +CONFIG_CRYPTO_DEV_SUN8I_SS_HASH=y diff --git a/recipes-kernel/linux/linux-yocto/sun8i.scc b/recipes-kernel/linux/linux-yocto/sun8i.scc new file mode 100644 index 0000000..745f6ef --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/sun8i.scc @@ -0,0 +1,14 @@ +define KMACHINE sun8i +define KTYPE standard +define KARCH arm + +include sunxi.scc + +kconf hardware sun8i.cfg + +# sun8i 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-sun8i-v3s-dts-i2s0.patch +patch 0002-sun8i-v3s-dts-ehci-ohci.patch +patch 0003-sun8i-codec-analog.patch diff --git a/recipes-kernel/linux/linux-yocto/sunxi-cedrus.cfg b/recipes-kernel/linux/linux-yocto/sunxi-cedrus.cfg new file mode 100644 index 0000000..f75be06 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/sunxi-cedrus.cfg @@ -0,0 +1,7 @@ +# Sunxi Cedrus HW video encoder/decoder + +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_MEDIA_CONTROLLER_REQUEST_API=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_SUNXI_CEDRUS=y diff --git a/recipes-kernel/linux/linux-yocto/sunxi-default-6.1.cfg b/recipes-kernel/linux/linux-yocto/sunxi-default-6.1.cfg new file mode 100644 index 0000000..bddc82f --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/sunxi-default-6.1.cfg @@ -0,0 +1,177 @@ +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_CGROUPS=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_PERF_EVENTS=y +CONFIG_ARCH_SUNXI=y +CONFIG_SMP=y +CONFIG_NR_CPUS=8 +CONFIG_HIGHMEM=y +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +CONFIG_CPU_FREQ=y +CONFIG_CPUFREQ_DT=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_CMA=y +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_INET_DIAG is not set +# CONFIG_IPV6 is not set +CONFIG_CAN=y +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_BLK_DEV_SD=y +CONFIG_ATA=y +CONFIG_AHCI_SUNXI=y +CONFIG_NETDEVICES=y +CONFIG_SUN4I_EMAC=y +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +CONFIG_STMMAC_ETH=y +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_MICREL_PHY=y +CONFIG_REALTEK_PHY=y +CONFIG_CAN_SUN4I=y +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=y +CONFIG_KEYBOARD_SUN4I_LRADC=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_SUN4I=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AXP20X_PEK=y +CONFIG_SERIO_SUN4I_PS2=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=8 +CONFIG_SERIAL_8250_RUNTIME_UARTS=8 +CONFIG_SERIAL_8250_DW=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_HW_RANDOM is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MV64XXX=y +CONFIG_I2C_SUN6I_P2WI=y +CONFIG_SPI=y +CONFIG_SPI_SUN4I=y +CONFIG_SPI_SUN6I=y +CONFIG_GPIO_SYSFS=y +CONFIG_POWER_SUPPLY=y +CONFIG_CHARGER_AXP20X=y +CONFIG_BATTERY_AXP20X=y +CONFIG_AXP20X_POWER=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_SUN8I_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_SUNXI_WATCHDOG=y +CONFIG_MFD_AC100=y +CONFIG_MFD_AXP20X_I2C=y +CONFIG_MFD_AXP20X_RSB=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_AXP20X=y +CONFIG_REGULATOR_GPIO=y +CONFIG_RC_CORE=y +CONFIG_RC_DEVICES=y +CONFIG_IR_SUNXI=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_PLATFORM_SUPPORT=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_SUN4I_CSI=y +CONFIG_VIDEO_SUN6I_CSI=y +CONFIG_VIDEO_SUN8I_DEINTERLACE=y +CONFIG_VIDEO_SUN8I_ROTATE=y +CONFIG_DRM=y +CONFIG_DRM_SUN4I=y +CONFIG_DRM_SUN4I_HDMI_CEC=y +CONFIG_DRM_SUN8I_DW_HDMI=y +CONFIG_DRM_PANEL_LVDS=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_EDP=y +CONFIG_DRM_SIMPLE_BRIDGE=y +CONFIG_DRM_LIMA=y +CONFIG_FB_SIMPLE=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_SUN4I_CODEC=y +CONFIG_SND_SUN8I_CODEC=y +CONFIG_SND_SUN8I_CODEC_ANALOG=y +CONFIG_SND_SUN4I_I2S=y +CONFIG_SND_SUN4I_SPDIF=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +CONFIG_USB_MUSB_HDRC=y +CONFIG_USB_MUSB_SUNXI=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_GADGET=y +CONFIG_MMC=y +CONFIG_MMC_SUNXI=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_INTF_SYSFS is not set +# CONFIG_RTC_INTF_PROC is not set +CONFIG_RTC_DRV_AC100=y +CONFIG_RTC_DRV_SUNXI=y +CONFIG_DMADEVICES=y +CONFIG_DMA_SUN6I=y +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_SUNXI=y +CONFIG_VIDEO_SUNXI_CEDRUS=y +CONFIG_MAILBOX=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_IIO=y +CONFIG_AXP20X_ADC=y +CONFIG_PWM=y +CONFIG_PWM_SUN4I=y +CONFIG_PHY_SUN4I_USB=y +CONFIG_PHY_SUN9I_USB=y +CONFIG_NVMEM_SUNXI_SID=y +CONFIG_EXT4_FS=y +CONFIG_VFAT_FS=y +CONFIG_TMPFS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_CRYPTO_DEV_SUN4I_SS=y +CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y +CONFIG_CRYPTO_DEV_SUN8I_CE=y +CONFIG_CRYPTO_DEV_SUN8I_SS=y +CONFIG_DMA_CMA=y +CONFIG_PRINTK_TIME=y +CONFIG_DEBUG_FS=y diff --git a/recipes-kernel/linux/linux-yocto/sunxi-generic.cfg b/recipes-kernel/linux/linux-yocto/sunxi-generic.cfg new file mode 100644 index 0000000..3e1e2aa --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/sunxi-generic.cfg @@ -0,0 +1,24 @@ +# Generic options for sunxi chips + +# Enable generic sunxi options +CONFIG_ARCH_SUNXI=y +CONFIG_SUNXI_RSB=y +CONFIG_MTD=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_NAND_SUNXI=y +CONFIG_AHCI_SUNXI=y +CONFIG_DWMAC_SUNXI=y +CONFIG_PINCTRL_SUNXI=y +CONFIG_SUNXI_WATCHDOG=y +CONFIG_IR_SUNXI=y +CONFIG_USB_MUSB_SUNXI=y +CONFIG_MMC_SUNXI=y +CONFIG_RTC_DRV_SUNXI=y +CONFIG_VIDEO_SUNXI=y +CONFIG_CLK_SUNXI=y +CONFIG_CLK_SUNXI_CLOCKS=y +CONFIG_SUNXI_CCU=y +CONFIG_SUNXI_MBUS=y +CONFIG_SUNXI_SRAM=y +CONFIG_RESET_SUNXI=y +CONFIG_NVMEM_SUNXI_SID=y diff --git a/recipes-kernel/linux/linux-yocto/sunxi.scc b/recipes-kernel/linux/linux-yocto/sunxi.scc new file mode 100644 index 0000000..3233192 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/sunxi.scc @@ -0,0 +1,11 @@ +define KMACHINE sunxi +define KTYPE standard +define KARCH arm + +kconf hardware sunxi-default-6.1.cfg +kconf hardware sunxi-generic.cfg + +# Sunxi 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-sunxi-spi-nor-xtx.patch 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..4fc41d0 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_6.1%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" diff --git a/wic/sunxi.wks b/wic/sunxi.wks new file mode 100644 index 0000000..33d7c87 --- /dev/null +++ b/wic/sunxi.wks @@ -0,0 +1,11 @@ +# short-description: Boot image template for sunxi-based devices + +# 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: