diff --git a/.gitmodules b/.gitmodules index d500f4695..afd12b3bf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "layers/meta-rust"] path = layers/meta-rust url = https://github.com/meta-rust/meta-rust.git +[submodule "layers/meta-sunxi-contrib"] + path = layers/meta-sunxi-contrib + url = https://github.com/geomatsi/meta-sunxi-contrib.git diff --git a/layers/meta-resin-allwinner/conf/machine/orangepi-plus2e.conf b/layers/meta-resin-allwinner/conf/machine/orangepi-plus2e.conf new file mode 100644 index 000000000..ae7750343 --- /dev/null +++ b/layers/meta-resin-allwinner/conf/machine/orangepi-plus2e.conf @@ -0,0 +1,9 @@ +#@TYPE: Machine +#@NAME: Orange Pi Plus 2e +#@DESCRIPTION: Machine configuration for the Orange Pi Plus2e, based on allwinner H3 CPU http://www.orangepi.org/ + +require conf/machine/include/sun8i.inc + +KERNEL_DEVICETREE = "sun8i-h3-orangepi-plus2e.dtb" +UBOOT_MACHINE = "orangepi_plus2e_defconfig" +PREFERRED_VERSION_linux-mainline = "4.17.3" diff --git a/layers/meta-resin-allwinner/conf/samples/bblayers.conf.sample b/layers/meta-resin-allwinner/conf/samples/bblayers.conf.sample index 2aa6061c7..29d7fb08f 100644 --- a/layers/meta-resin-allwinner/conf/samples/bblayers.conf.sample +++ b/layers/meta-resin-allwinner/conf/samples/bblayers.conf.sample @@ -13,6 +13,7 @@ BBLAYERS ?= " \ ${TOPDIR}/../layers/meta-openembedded/meta-networking \ ${TOPDIR}/../layers/meta-openembedded/meta-python \ ${TOPDIR}/../layers/meta-sunxi \ + ${TOPDIR}/../layers/meta-sunxi-contrib \ ${TOPDIR}/../layers/meta-resin/meta-resin-common \ ${TOPDIR}/../layers/meta-resin/meta-resin-sumo \ ${TOPDIR}/../layers/meta-resin-allwinner \ diff --git a/layers/meta-resin-allwinner/recipes-core/images/resin-image.inc b/layers/meta-resin-allwinner/recipes-core/images/resin-image.inc index aa6fa1eb0..68a3df782 100644 --- a/layers/meta-resin-allwinner/recipes-core/images/resin-image.inc +++ b/layers/meta-resin-allwinner/recipes-core/images/resin-image.inc @@ -1,3 +1,21 @@ +# +# Orange Pi Plus2e +# + +IMAGE_FSTYPES_append_orangepi-plus2e = " resinos-img" + +# Customize resinos-img +RESIN_IMAGE_BOOTLOADER_orangepi-plus2e = "u-boot" +RESIN_BOOT_PARTITION_FILES_orangepi-plus2e = " \ + ${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin:/${KERNEL_IMAGETYPE} \ + uImage-sun8i-h3-orangepi-plus2e.dtb:/dtb/sun8i-h3-orangepi-plus2e.dtb \ + u-boot-sunxi-with-spl.bin: \ +" +IMAGE_CMD_resinos-img_append_orangepi-plus2e () { + # Orange Pi Plus2e needs uboot written at a specific location + dd if=${DEPLOY_DIR_IMAGE}/u-boot-sunxi-with-spl.bin of=${RESIN_RAW_IMG} conv=notrunc seek=8 bs=1024 +} + # # Orange Pi Plus2 # diff --git a/layers/meta-resin-allwinner/recipes-core/packagegroups/packagegroup-resin-connectivity.bbappend b/layers/meta-resin-allwinner/recipes-core/packagegroups/packagegroup-resin-connectivity.bbappend index 7c28e90fc..eb4947865 100644 --- a/layers/meta-resin-allwinner/recipes-core/packagegroups/packagegroup-resin-connectivity.bbappend +++ b/layers/meta-resin-allwinner/recipes-core/packagegroups/packagegroup-resin-connectivity.bbappend @@ -1,5 +1,6 @@ CONNECTIVITY_FIRMWARES_append = " linux-firmware-ap6212 linux-firmware-brcm43362" CONNECTIVITY_MODULES_append_orangepi-plus2 = " rtl8189" +CONNECTIVITY_MODULES_append_orangepi-plus2e = " rtl8189fs-mod" CONNECTIVITY_MODULES_append_orange-pi-zero = " xradio" CONNECTIVITY_FIRMWARES_append_orange-pi-zero = " xradio-firmware" diff --git a/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend b/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend index b897662c0..b6d06a4ec 100644 --- a/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend +++ b/layers/meta-resin-allwinner/recipes-kernel/linux/linux-mainline_%.bbappend @@ -18,6 +18,7 @@ RESIN_CONFIGS[axp_power] ="\ " RESIN_CONFIGS_append_orangepi-plus2 = " wifi" +RESIN_CONFIGS_append_orangepi-plus2e = " wifi" RESIN_CONFIGS_append_orange-pi-zero = " wifi" RESIN_CONFIGS[wifi] ="\ CONFIG_WIRELESS=y \ @@ -27,6 +28,7 @@ RESIN_CONFIGS[wifi] ="\ " RESIN_CONFIGS_append_orangepi-plus2 = " pl2303" +RESIN_CONFIGS_append_orangepi-plus2e = " pl2303" RESIN_CONFIGS_DEPS[pl2303] = "\ CONFIG_USB_SERIAL=m \ " @@ -35,6 +37,7 @@ RESIN_CONFIGS[pl2303] ="\ " RESIN_CONFIGS_append_orangepi-plus2 = " hdmi" +RESIN_CONFIGS_append_orangepi-plus2e = " hdmi" RESIN_CONFIGS_DEPS[hdmi] = "\ CONFIG_SUN8I_DE2_CCU=y \ " diff --git a/layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-flasher.bbappend b/layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-flasher.bbappend index 428cbd8b5..b355d22a5 100644 --- a/layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-flasher.bbappend +++ b/layers/meta-resin-allwinner/recipes-support/resin-init/resin-init-flasher.bbappend @@ -1,4 +1,5 @@ # Flash to internal eMMC - kernel always enumerates emmc as mmcblk2 INTERNAL_DEVICE_KERNEL_nanopi-neo-air = "mmcblk2" +INTERNAL_DEVICE_KERNEL_orangepi-plus2e = "mmcblk2" INTERNAL_DEVICE_KERNEL_orangepi-plus2 = "mmcblk2" diff --git a/orangepi-plus2e.coffee b/orangepi-plus2e.coffee new file mode 100644 index 000000000..b695309e8 --- /dev/null +++ b/orangepi-plus2e.coffee @@ -0,0 +1,51 @@ + +deviceTypesCommon = require '@resin.io/device-types/common' +{ networkOptions, commonImg, instructions } = deviceTypesCommon + +postProvisioningInstructions = [ + instructions.BOARD_SHUTDOWN + instructions.REMOVE_INSTALL_MEDIA + instructions.BOARD_REPOWER +] + +module.exports = + version: 1 + slug: 'orangepi-plus2e' + name: 'Orange Pi Plus2e' + arch: 'armv7hf' + state: 'experimental' + community: true + + stateInstructions: + postProvisioning: postProvisioningInstructions + + instructions: [ + instructions.ETCHER_SD + instructions.EJECT_SD + instructions.FLASHER_WARNING + instructions.CONNECT_AND_BOOT + ].concat(postProvisioningInstructions) + + gettingStartedLink: + windows: 'https://docs.resin.io/orangepi-plus2e/nodejs/getting-started/#adding-your-first-device' + osx: 'https://docs.resin.io/orangepi-plus2e/nodejs/getting-started/#adding-your-first-device' + linux: 'https://docs.resin.io/orangepi-plus2e/nodejs/getting-started/#adding-your-first-device' + supportsBlink: true + + options: [ networkOptions.group ] + + yocto: + machine: 'orangepi-plus2e' + image: 'resin-image-flasher' + fstype: 'resinos-img' + version: 'yocto-sumo' + deployArtifact: 'resin-image-flasher-orangepi-plus2e.resinos-img' + compressed: true + + configuration: + config: + partition: + primary: 1 + path: '/config.json' + + initialization: commonImg.initialization diff --git a/orangepi-plus2e.svg b/orangepi-plus2e.svg new file mode 100644 index 000000000..727bf1ff1 --- /dev/null +++ b/orangepi-plus2e.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +