158 Commits

Author SHA1 Message Date
474503654e linux-mainline: Added LINUX_VERSION variable
Fixes:

File "/home/retpolanne/Dev/orange-pi-one-plus-image/poky/scripts/lib/devtool/standard.py", line 839, in modify
if (os.path.exists(srcdir) and os.listdir(srcdir)) and (kernelVersion in staging_kerVer and staging_kbranch == kbranch):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'in ' requires string as left operand, not NoneType

While running devtool modify virtual/kernel.


Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
2024-04-25 08:56:01 +02:00
cc1de9f039 linux-mainline: Add "allwinner" prefix only if not available
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-20 13:02:33 +01:00
cd1031613f Revert "misc: Drop allwinner prefix for machines"
This reverts commit 5257bb2738.
2023-11-20 12:53:14 +01:00
e21fd8733d Revert "conf: Move logic for handling dtb in deploy dir to common include"
This reverts commit c867cb74e2.
2023-11-20 12:35:09 +01:00
5257bb2738 misc: Drop allwinner prefix for machines
As we have automatic KERNEL_DEVICETREE prefix handling we don't need to add
allwinner prefix

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-13 10:59:46 +01:00
40c6d52123 xradio: Update to other repo
Update to one which have up-to-date development. Old one is not compilin anymore.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 14:00:53 +01:00
c7782f7180 linux-mainline: Drop 5.10 and 5.4 releases
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 13:41:51 +01:00
3ace4df57b linux-mainline: Bump kernel to 6.5.11
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 13:41:21 +01:00
4895ae7bdf Added compatibility to nanbield
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-11-10 12:02:31 +01:00
75f21bc538 u-boot: boot.cmd: Use allwinner prefix for dtb
To avoid patching u-boot configs for all machines update prefix for all arm machines.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:53 +02:00
af98b13aca conf: Set linux 6.5 as preffered
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:53 +02:00
c867cb74e2 conf: Move logic for handling dtb in deploy dir to common include
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:53 +02:00
ca39c18cb9 linux-mainline: Added handling for 6.5 kernels
Added automatic allwinner prepend for dtb + also patches handling for kernels
< 6.5

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:13:48 +02:00
82965e1bc6 linux-mainline: Add version 6.5.8
Refresh patches with new allwinner prefix.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-10-24 13:12:11 +02:00
6c6ef34b69 Merge pull request #391 from buldo/device-orange-pi-lite
New device Orange PI lite
2023-10-02 07:24:57 +02:00
6cba9f71bb pi lite files 2023-09-30 22:53:27 +03:00
8b4609b9dc Merge pull request #389 from retpolanne/master
add u-boot ethernet support to orange pi one plus (h6)
2023-07-12 13:44:28 +02:00
5dcf6c40d4 add u-boot ethernet support to orange pi one plus (h6)
This patch adds ethernet support to orange pi one plus. The patch has
been submitted to the mailing list and is being added to the bbappend
for u-boot.

Unfortunately, is doesn't keep ethernet on after kernel boot, as the
kernel dts needs to be synced with the u-boot dts.

Submitted patch waiting for approval on the upstream: https://lore.kernel.org/u-boot/30debca8b31ed4d2cbd64850d48b81ac@posteo.net/T/#t
2023-07-12 08:11:36 -03:00
1407c41748 Merge pull request #388 from 3mdeb/lamobo-r1-platform
Added `.conf` file for lamobo-r1 platorm
2023-07-11 14:48:03 +02:00
533a3ac16d machine/lamobo-r1.conf: added conf for lamobo-r1 2023-07-11 14:19:14 +02:00
ea627f0920 Fix booting for orange-pi-one-plus machine
Use proper config for ATF.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-07-04 15:09:36 +02:00
441baea0ef Merge pull request #385 from retpolanne/master
Fixes Upstream-Status lines in a few u-boot patches
2023-07-03 14:37:40 +02:00
cd266517ee Fixes Upstream-Status lines in a few u-boot patches
Fixes #384

Signed-off-by: Anne Macedo <retpolanne@posteo.net>
2023-07-03 09:30:11 -03:00
5914ca8c1c Update README.md 2023-05-31 09:34:32 +02:00
776eafbb2e Merge pull request #381 from jonmason/master
remove deprecated variable and use meta-arm tf-a recipe
2023-05-31 09:33:14 +02:00
4bf7be7650 Merge pull request #383 from ludiazv/opiz2_dts
Add usb support for orange pi zero 2
2023-05-31 07:52:13 +02:00
d1f2121138 Add usb support for orange pi zero 2 2023-05-30 16:09:54 +02:00
7ab8fb6211 atf: convert to use meta-arm trusted-firmware-a recipe
Instead of using and maintaining a unique recipe for trusted-firmware-a
(formerly known as ARM trusted firmware, or ATF), use the recipe located
in meta-arm.  It is well maintained and in use in multiple other layers.

Tested with pine64-plus

Signed-off-by: Jon Mason <jdmason@kudzu.us>
2023-05-24 11:44:53 -04:00
b55c255f22 conf/machine: change deprecated SERIAL_CONSOLE variable
The SERIAL_CONSOLE variable has been deprecated since version 2.6
See
https://git.openembedded.org/openembedded-core/commit/?id=9d053af1fb570b4e3483de4ecd6827e1e0be61b7
Modify to use SERIAL_CONSOLES

Signed-off-by: Jon Mason <jdmason@kudzu.us>
2023-05-24 11:43:37 -04:00
ab649c5d39 Merge pull request #379 from ludiazv/sunxi64_wic_fix
fix wic including the device tree file in IMAGE_BOOT_FILES
2023-05-22 07:50:14 +02:00
3f1bb863a7 fix wic including the device tree file in IMAGE_BOOT_FILES 2023-05-20 16:41:29 +02:00
21d137f559 Remove unused sdcard_image-sunxi.bbclass
We provide wic images for 32 and 64 bit boards thus remove legacy class

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-05-11 13:09:44 +02:00
c67912122c u-boot: Added custom boot.cmd
For bananapi emmc is on mmc2 not mmc1

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-05-11 13:09:44 +02:00
0fe08a24d6 linux-mainline: Added mmc aliases for bananapi-m64
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-05-11 13:09:44 +02:00
7b951191fb atf: Use for all devices not only for H616
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-05-11 13:09:44 +02:00
5723c27da1 Add wic support for sunxi 64 boards
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: ludiazv <ldiaz@atloideas.com>
2023-05-11 13:09:39 +02:00
27aadbc9bf Merge pull request #374 from ehoseini/update-machine-variable
Fix incorrect machine variable
2023-04-18 07:44:34 +02:00
9642c1bf2f The name of the machine variable resulted in an incorrect build. This commit updates the machine name to the correct format and it updates the description. 2023-04-17 21:19:28 +01:00
569d314517 Update README.md 2023-04-04 08:42:23 +02:00
f93ef86045 Merge pull request #372 from ehoseini/adhereYoctoNamingConvention
Adhere naming convention
2023-04-04 08:36:26 +02:00
9357921fe9 adhere naming convention as stated in yocto manual 2023-04-03 23:32:41 +01:00
7540e7cef4 Merge pull request #371 from pblxptr/opiz2-kernel6x-fix
Fix file permissions in patches for Orange Pi Zero 2 with Kernel 6x
2023-04-01 20:44:59 +02:00
28b8144df8 Fix file permissions in patches. 2023-03-31 09:21:42 +02:00
046a1e27ed Merge pull request #369 from pblxptr/opiz2-kernel6x
Introduce support for Orange Pi Zero 2 for Kernel 6.1
2023-03-17 10:54:20 +01:00
8bdb29e399 Add support for uwe5622 wifi driver for Orange Pi Zero 2. 2023-03-16 16:14:34 +01:00
c4c91b604b Add support for Orange Pi Zero 2 for Kernel 6.x 2023-03-16 09:52:18 +01:00
54a4db9b55 Fix ATF warnings caused by the chanages introduced in binutils 2.39. 2023-03-16 09:50:30 +01:00
1a42a71bb1 Merge pull request #364 from linux-sunxi/master-next
Update kernel for master
2023-02-22 09:16:49 +01:00
be26c5dd90 Use 6.x kernel by default
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-02-03 13:41:54 +01:00
f87d85fa2e linux-mainline: Add handling for 6.x kernel
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-02-03 13:41:20 +01:00
6c94abe54d linux-mainline: Bump to latest releases
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-02-03 13:41:16 +01:00
3bab03d8a2 conf: machine: Add "Orange Pi One Plus" support
Signed-off-by: Ilja Byckevich <iljabyckevich@gmail.com>
2023-01-31 08:19:41 +01:00
34ac6458dd xserver-xorg: Added xshmfence dependency
Fixes following:
ERROR: Problem encountered: DRI3 requested, but xshmfence not found

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-01-25 13:35:57 +01:00
b25b74412c mega-gl: Added more dependencies to fix config issue
Fix following:
ERROR: Problem encountered: xlib based GLX requires at least one gallium driver


Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-01-25 13:35:54 +01:00
48acd228c9 sunxi.inc: Drop xf86-video-turbo
It cannot be compiled anymore drop it.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2023-01-25 13:35:49 +01:00
d28a0b02fe Merge pull request #357 from quaresmajose/next
layer: add mickledore compatibility
2023-01-10 08:11:04 +01:00
3276120687 layer: add mickledore compatibility
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
2023-01-09 20:02:14 +00:00
62f2141df1 Merge pull request #355 from matteolel/banana-pi-zero
Banana pi zero and fix to boot stuck
2022-12-12 08:09:26 +01:00
73f3286067 Fix random stucks during boot
With my device, around one boot out of 3 was not able to finish. I found that the mmc
order was not correct in that cases.

Fix: enforcing device order in DTS.
2022-12-09 18:20:43 +01:00
cf0bf9671a Add bananapi-m2-zero machine 2022-12-09 18:18:29 +01:00
290a916e69 Merge pull request #351 from spanceac/patch-1
Use correct arch in sun5i.inc
2022-12-05 09:24:02 +01:00
b0c81db3de Use correct arch in sun5i.inc
Cortex-A8 architecture is ARMv7A.
Before this path fix the following failure was triggered when building for "olinuxino-a13"
machine:

"
[..]/meta-sunxi/conf/machine/include/sun5i.inc:3: Could not include required
file conf/machine/include/arm/armv8a/tune-cortexa8.inc
"
2022-11-29 15:47:38 +02:00
44040b0ea4 Merge pull request #349 from mpromonet/master
sunxi: add cam support to nanopi-neo-air
2022-10-11 07:21:32 +02:00
bb5817fe0e sunxi: add cam support to nanopi-neo-air
Signed-off-by: mpromonet <michel.promonet@free.fr>
2022-10-10 19:29:12 +02:00
b5de5d2be4 Merge pull request #348 from DAMEK86/fix/sunxi-mali-recipe
libgles: sunxi-mali: fix linter warnings
2022-10-03 22:41:35 +02:00
8bcf3b3ad4 libgles: sunxi-mali: fix linter warnings
fix the following linter warnings
- WARNING: sunxi-mali-git-r0 do_unpack: URL: gitsm://github.com/linux-sunxi/sunxi-mali.git uses git protocol which is no longer supported by github.
Please change to ;protocol=https in the url.
- WARNING: sunxi-mali-git-r0 do_unpack: URL: gitsm://github.com/linux-sunxi/sunxi-mali.git does not set any branch parameter.
The future default branch used by tools and repositories is uncertain
and we will therefore soon require this is set in all git urls.
2022-10-03 18:34:43 +02:00
d84706872b Merge pull request #347 from quaresmajose/langdale
layer.conf: add langdale compatibility
2022-09-30 21:13:55 +02:00
7278d3faaf layer.conf: add langdale compatibility
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
2022-09-30 11:19:00 +00:00
8b3211e04c Merge pull request #346 from cpb-/cpb-devel
Fix `LICENSE` field of some recipes to correspond to Poky ones.
2022-09-12 07:25:31 +02:00
90189dae67 Fix LICENSE field of some recipes to correspond to Poky ones. 2022-09-09 14:00:13 +02:00
1b57b51612 Merge pull request #345 from apapillon/master
Fix inherit distutils3 error
2022-09-09 08:23:30 +02:00
a30c7ec984 Fix inherit distutils3 error 2022-09-08 15:09:17 +02:00
f3bbe9f079 u-boot: Fix booting issues for 64bit boards
In kirkstone we use u-boot 2022.01 which added as mandatory usage of scp.
As it's used for power relates stuff and we don't need it atm set to to empty.

Without this fix generated u-boot cannot boot.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-08-24 14:06:15 +02:00
fdce4f8674 conf: Added orange-pi-pc2 config
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 21:23:33 +02:00
20822ad769 linux-mainline: Fix kernel license warning
Fix following:
WARNING: linux-mainline-5.15.35-r0 do_package_qa: QA Issue: Recipe LICENSE includes obsolete licenses GPLv2 [obsolete-license]

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 21:23:20 +02:00
e8d39837e2 conf: machine: Added nanopi r1 support
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 09:27:42 +02:00
3b798310df u-boot: Added patch for adding nanopi r1 machine support
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 09:27:38 +02:00
910bb165a3 conf: Added kirkstone compatible string
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 09:18:12 +02:00
9895874a29 sunxi: Use 5.15 as kernel provider
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 09:18:10 +02:00
7feb76686f linux-mainline: Added 5.15 LTS kernel
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 09:17:57 +02:00
4735c7766f atf-sunxi: Fix warnings
Fix license and protocol for fetching

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-21 09:17:54 +02:00
78c395aab7 sunxi64.inc: Don't set UBOOT_BINARY
It's valid for sunxi uboot only and breaks wic so comment it

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-13 10:35:31 +02:00
b122bfc272 u-boot: Refresh path
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-13 09:31:24 +02:00
752f632e98 atf-sunxi: Fix build issue
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2022-04-13 09:31:07 +02:00
7dcc9a0069 Merge pull request #337 from StealthyCoder/master
conf: machine: add orange-pi-r1
2022-01-27 19:32:46 +01:00
ef5b9a675b conf: machine: add orange-pi-r1
Add the machine configuration for the Orange Pi R1.

Signed-off-by: Eric Bode <eric.bode@foundries.io>
2022-01-20 09:50:05 +01:00
b9a5f19db2 Merge pull request #336 from abrodkin/abrodkin-updates-2022.01
Minor updates
2022-01-04 21:05:51 +01:00
13fe88d754 linux-sunxi_3.4: Switch GitHub protocol from git to https
This mutes bitbake warning:
----------------------------->8------------------------
WARNING: .../meta-sunxi/recipes-kernel/linux/linux-sunxi_3.4.bb:
URL: git://github.com/linux-sunxi/linux-sunxi.git;branch=sunxi-3.4;protocol=git uses git protocol which is no longer supported by github.
Please change to ;protocol=https in the url.
----------------------------->8------------------------

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2022-01-04 20:23:14 +03:00
6ece692e9b sunxi-boards: Bump version
For some reason it was not updated since 2015 and
there seem to be quite some changes in the repo.

Also switch protocol for getting sources from GitHub
from git to https to get rid of the bitbake warning.

Signed-off-by: Alexey Brodkin <alexey.brodkin@gmail.com>
2022-01-04 20:21:07 +03:00
c39a024199 Merge pull request #334 from clementperon/to_merge
Fixes
2022-01-03 18:02:21 +01:00
545d824ccf atf-sunxi: fix new syntax 2022-01-02 21:46:06 +01:00
45a666ac43 classes: sdcard_image-sunxi: fix depends
Signed-off-by: Clément Péron <peron.clem@gmail.com>
2022-01-02 21:20:28 +01:00
a508443f52 recipes: use github https and specify master branch to fix warnings
Signed-off-by: Clément Péron <peron.clem@gmail.com>
2022-01-02 19:47:59 +01:00
0225772064 conf: layer: oe layer is not mandatory
Signed-off-by: Clément Péron <peron.clem@gmail.com>
2022-01-02 19:46:55 +01:00
3a7f7e1199 conf: sunxi.inc: bump linux mainline preferred version to 5.10
Signed-off-by: Clément Péron <peron.clem@gmail.com>
2022-01-02 19:39:34 +01:00
a67a0c58df Merge pull request #331 from mpromonet/master
Fix build for nanopi neo air
2021-12-15 21:10:25 +01:00
8852666a80 Merge branch 'master' into master 2021-12-15 21:07:43 +01:00
e584cd9084 Merge pull request #333 from MatScheifi/honister
Fix SD Image Build for honister
2021-12-15 07:57:54 +01:00
deb667015d cover up build error with kernel headers 2021-12-10 10:59:19 +01:00
503102a841 move ext4 dep 2021-12-10 10:51:18 +01:00
02bf3fcd80 fix sd-card creation - use new syntax 2021-12-10 10:45:50 +01:00
7bc87817a1 this is integrate in kernel mainline since 88c23c05ef (diff-9c6eb3684dca738538e1dcb691cb9dd7684d6d5da0e963b5ba5a7e47b8b95e21) and breaks the build
Signed-off-by: mpromonet <michel.promonet@free.fr>
2021-11-12 15:42:27 +01:00
080eb40635 conf: Set LAYERSERIES_COMPAT to honister only
It's not anymore compatible with old releases due new syntax.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-09-20 10:19:34 +02:00
dcd5790e87 conf: machine: Fix paths for tunes
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-09-20 09:39:40 +02:00
6a1103b726 misc: More fixes for new syntax
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-09-20 09:39:18 +02:00
668bc6824c conf: Added honister layer to LAYERSERIAS_COMPAT
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-09-20 09:27:46 +02:00
fd330bbb55 Merge pull request #328 from dev-0x7C6/master
layer: convert to new override syntax 💥
2021-09-20 09:26:15 +02:00
e66258ad7a layer: convert to new override syntax 💥
OE/Yocto is migration towards new override syntax,
current master (upcomming honister release) will not
tolerate "_" as override operator.

New override syntax will be backported to
dunfell, gatesgarth, hardknott releases.

Signed-off-by: Bartłomiej Burdukiewicz <bartlomiej.burdukiewicz@gmail.com>
2021-08-23 18:47:19 +02:00
3caf03d9fc xradio-firmware: Update to latest master
Old version seems to have random crashes when using softap functionality

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-06-30 11:08:56 +02:00
278bd31312 Merge pull request #322 from linux-sunxi/mbe-bananapi-m64
bananapi m64
2021-05-21 21:16:33 +02:00
edb10c82bd Added support for bananapi-m64 machine
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-05-21 21:14:52 +02:00
c6161f546b Merge pull request #321 from HerrMuellerluedenscheid/bugfix/partition-label
remove boot partition label
2021-05-17 13:28:18 +02:00
c03a8988b8 default to 'boot' as boot partition label
Defaulting to the $MACHINE may lead to failure if the name was
longer than the limit of allowed volume label of fat (11 chars).

Signed-off-by: Marius Kriegerowski <marius.kriegerowski@gmail.com>
2021-05-17 13:10:45 +02:00
fe54f61d61 layer.conf: Added compatibility with hardknott
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-04-30 08:31:53 +02:00
724d154371 Merge pull request #320 from linux-sunxi/mbe-fix-master
u-boot: Drop un-needed patch
2021-04-23 14:25:09 +02:00
59b953f341 u-boot: Drop un-needed patch
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-04-23 14:24:06 +02:00
ac8695fddf Merge pull request #317 from MdeVries86/feature/fix-regulator
Add missing voltage/current regulator category in kernel config for the aarch64 config
2021-04-19 08:43:36 +02:00
efc05f66ef Add missing voltage/current regulator category in kernel config
Without this category enabled, all the regulator drivers will not be compiled resulting in the mmc/sd-card driver failing to set a valid voltage.
2021-04-18 23:04:58 +02:00
dc5c23908e Merge pull request #315 from linux-sunxi/nandra-banana-pi-m2m
Added bananapi-m2m machine
2021-04-17 09:37:16 +02:00
5602fb2ff8 Added bananapi-m2m machine
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-04-13 13:13:20 +02:00
6eb1acdbcb Merge pull request #312 from louisbuchert/master
adding Lichee Pi Zero machine (booted)
2021-04-06 22:32:13 +02:00
5fe0f177ab Merge pull request #314 from linux-sunxi/nandra-fix-opi-zero-boot
Fix orange-pi-zero booting with 2020.01 u-boot
2021-03-31 08:24:23 +02:00
151ac47fda Merge pull request #295 from macpijan/add_wks_file
conf: sunxi.inc: add wks file for arm
2021-03-30 22:16:40 +02:00
f66e6f255f u-boot: Fix orange-pi-zero booting
Without this patch booting ends with Starting kernel ...

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2021-03-30 21:54:45 +02:00
0b64109569 Added Lichee Pi Zero machine (booted) 2021-03-30 19:23:08 +02:00
3dc99ee663 Merge pull request #311 from katyo/master
Added MarsBoard A10 machine config
2021-03-23 07:58:35 +01:00
K
c32ee2b4a0 Added MarsBoard A10 machine config 2021-03-23 11:09:20 +05:00
9e53e57d75 Merge pull request #306 from Kynetics/master
linux-mainline: add lt 5.10.2
2020-12-22 11:57:50 +01:00
de575289a3 linux-mainline: add lt 5.10.2
Add version 5.10.2. According to:
https://www.kernel.org/category/releases.html
version 5.10 is a longterm release.

Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
2020-12-22 10:40:11 +00:00
1e41b97b5b linux-mainline: Fix USb support on cubietruck
See issue #350

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2020-12-22 07:37:46 +01:00
efcbd3a2cf Merge pull request #303 from mfrydrysiak/machine-bananapim2plus
conf: machine: add bananapi-m2plus
2020-11-10 18:07:23 +01:00
2df608df63 conf: machine: add bananapi-m2plus
Add machine configuration for H3 based Banana Pi M2+.

Signed-off-by: Marek Frydrysiak <marek.frydrysiak@gmail.com>
2020-11-10 17:48:01 +01:00
e20eb9ef85 Merge pull request #302 from 3mdeb/uboot-fix-revert
Revert "u-boot: rebase nanopi_neo_air emmc patch"
2020-11-04 22:39:45 +01:00
18f3e4a016 Merge pull request #294 from macpijan/add_nanopi_m1
machine: nanopi-m1: add config
2020-11-04 22:35:49 +01:00
11052ea20e Revert "u-boot: rebase nanopi_neo_air emmc patch"
This reverts commit 58d382d598.

This change was not needed on master. The patch was already correctly
refreshed on the dunfell branch to be compatible with the v2020.01
U-Boot release. It was done in the following commit: d0bbc7334d
2020-11-04 22:16:53 +01:00
0062d5490a Merge pull request #301 from 3mdeb/uboot-fix
u-boot: rebase nanopi_neo_air emmc patch
2020-11-04 22:01:35 +01:00
58d382d598 u-boot: rebase nanopi_neo_air emmc patch
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2020-11-04 21:50:05 +01:00
4937fc91d5 Merge pull request #300 from dev-0x7C6/master
Bunch of tweaks.
2020-10-23 08:16:28 +02:00
370007f1c8 Merge branch 'master' into master 2020-10-23 08:16:19 +02:00
1f85588709 Merge pull request #299 from Kynetics/master
Remove kernel 4.19 and add 5.9 to master
2020-10-23 08:14:33 +02:00
3f6dcb3d08 u-boot: don't override COMPATIBLE_MACHINE. 2020-10-23 00:08:17 +02:00
9396098def layer: added support for upcomming gatesgarth release. 2020-10-22 20:54:26 +02:00
636b3b74d7 u-boot: don't override u-boot configuration when building for other machines. 2020-10-22 19:30:32 +02:00
eaf085f87f conf: added sunxi and sunxi64 machine overrides. 2020-10-22 19:30:01 +02:00
bcc500fb65 linux-mainline: added 5.9.1 kernel. 2020-10-22 19:27:53 +02:00
d6deb87bd1 linux-mainline: update stable to 5.9.1
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
2020-10-20 20:29:30 +00:00
4580f8964d linux-mainline: remove lt 4.19
Remove lt 4.19 as lt 5.4 is available and well tested by now.

Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
2020-10-20 20:27:44 +00:00
251d048d0b xradio: Use updated driver from armbian
Current xradio driver have an issue that with 5.x kernel doesn't work properly.
Bump it to more maintained one which support also 5.x kernel.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2020-10-15 19:50:50 +02:00
cd2ec849a7 Merge pull request #297 from Kynetics/master
linux-mainline: update to lt 5.4.69
2020-10-02 07:39:30 +02:00
e619a01a21 linux-mainline: update to lt 5.4.69
Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
2020-10-01 22:17:57 +02:00
9f622c70b8 conf: sunxi.inc: add wks file for arm
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2020-09-28 21:57:43 +02:00
9773647ff4 machine: nanopi-m1: add config
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2020-09-28 21:57:07 +02:00
2e20344575 xradio: Bump revision to have it compilable with later 5.x kernel
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2020-09-18 10:44:17 +02:00
ec20258eb5 linux-mainline: Added fix for bananapi
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
2020-06-01 08:43:33 +02:00
250b8652f6 Merge pull request #290 from net147/uboot-v2020.04-rebase
u-boot: rebase patch against v2020.04
2020-06-01 07:51:27 +02:00
9828fc2b82 u-boot: rebase patch against v2020.04
Signed-off-by: Jonathan Liu <net147@gmail.com>
2020-05-30 18:58:15 +10:00
5eff0296b5 Merge pull request #169 from Embedlynx/master
Copy a splash.bmp splash screen for u-boot to the SD card VFAT partit…
2020-05-26 07:47:04 +02:00
4b669303a3 Copy a splash.bmp splash screen for u-boot to the SD card VFAT partition if one is found in the deploy dir 2017-03-17 14:40:52 +02:00
91 changed files with 234505 additions and 499 deletions

View File

@ -6,6 +6,7 @@ Official sunxi OpenEmbedded layer for Allwinner-based boards.
This layer depends on the additional layers: This layer depends on the additional layers:
* [meta-openembedded/meta-oe](http://git.openembedded.org/meta-openembedded/tree/meta-oe) * [meta-openembedded/meta-oe](http://git.openembedded.org/meta-openembedded/tree/meta-oe)
* [meta-arm](https://git.yoctoproject.org/meta-arm)
Tested with core-image-base. Tested with core-image-base.
@ -16,6 +17,11 @@ Maintainers:
* Sergey Lapin <slapin@ossfans.org> * Sergey Lapin <slapin@ossfans.org>
* Marek Belisko <marek.belisko@gmail.com> * Marek Belisko <marek.belisko@gmail.com>
Community
===========
You can reach community + ask your question on gitter: https://matrix.to/#/#meta-sunxi:gitter.im
Kernel / U-Boot Version Kernel / U-Boot Version
=========== ===========
Most Allwinner devices and hardware are supported in mainline kernel and U-Boot, so this layer builds mainline by default. Most Allwinner devices and hardware are supported in mainline kernel and U-Boot, so this layer builds mainline by default.

View File

@ -1,124 +0,0 @@
inherit image_types
#
# Create an image that can by written onto a SD card using dd.
# Originally written for rasberrypi adapt for the needs of allwinner sunxi based boards
#
# The disk layout used is:
#
# 0 -> 8*1024 - reserverd
# 8*1024 -> - arm combined spl/u-boot or aarch64 spl
# 40*1024 -> - aarch64 u-boot
# 2048*1024 -> BOOT_SPACE - bootloader and kernel
#
#
# This image depends on the rootfs image
IMAGE_TYPEDEP_sunxi-sdimg = "${SDIMG_ROOTFS_TYPE}"
# Boot partition volume id
BOOTDD_VOLUME_ID ?= "boot"
# Boot partition size [in KiB]
BOOT_SPACE ?= "40960"
# First partition begin at sector 2048 : 2048*1024 = 2097152
IMAGE_ROOTFS_ALIGNMENT = "2048"
# Use an uncompressed ext4 by default as rootfs
SDIMG_ROOTFS_TYPE ?= "ext4"
SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
do_image_sunxi_sdimg[depends] += " \
parted-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
dosfstools-native:do_populate_sysroot \
virtual/kernel:do_deploy \
virtual/bootloader:do_deploy \
"
# SD card image name
SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.sunxi-sdimg"
IMAGE_CMD_sunxi-sdimg () {
# Align partitions
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
# Initialize sdcard image file
dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE})
# Create partition table
parted -s ${SDIMG} mklabel msdos
# Create boot partition and mark it as bootable
parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
parted -s ${SDIMG} set 1 boot on
# Create rootfs partition
parted -s ${SDIMG} unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \+ ${ROOTFS_SIZE})
parted ${SDIMG} print
# Create a vfat image with boot files
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
rm -f ${WORKDIR}/boot.img
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::${KERNEL_IMAGETYPE}
# Copy device tree file
if test -n "${KERNEL_DEVICETREE}"; then
for DTS_FILE in ${KERNEL_DEVICETREE}; do
DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'`
DTS_DIR_NAME=`dirname ${DTS_FILE}`
if [ -e ${DEPLOY_DIR_IMAGE}/"${DTS_BASE_NAME}.dtb" ]; then
if [ ${DTS_FILE} != ${DTS_BASE_NAME}.dtb ]; then
mmd -i ${WORKDIR}/boot.img ::/${DTS_DIR_NAME}
fi
kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`"
kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${KERNEL_IMAGETYPE},g;s,\.dtb$,.bin,g"`"
if [ $kernel_bin = $kernel_bin_for_dtb ]; then
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${DTS_BASE_NAME}.dtb ::/${DTS_FILE}
fi
fi
done
fi
if [ -e "${DEPLOY_DIR_IMAGE}/fex.bin" ]
then
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/fex.bin ::script.bin
fi
if [ -e "${DEPLOY_DIR_IMAGE}/boot.scr" ]
then
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr
fi
# Add stamp file
echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
# Burn Partitions
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
# If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
then
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
else
dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
fi
# write u-boot-spl at the begining of sdcard in one shot
SPL_FILE=$(basename ${SPL_BINARY})
dd if=${DEPLOY_DIR_IMAGE}/${SPL_FILE} of=${SDIMG} bs=1024 seek=8 conv=notrunc
}
# write uboot.itb for arm64 boards
IMAGE_CMD_sunxi-sdimg_append_sun50i () {
if [ -e "${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY}" ]
then
dd if=${DEPLOY_DIR_IMAGE}/${UBOOT_BINARY} of=${SDIMG} bs=1024 seek=40 conv=notrunc
fi
}

View File

@ -4,14 +4,14 @@ BBPATH .= ":${LAYERDIR}"
# We have a recipes directory, add to BBFILES # We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-sunxi" BBFILE_COLLECTIONS += "sunxi"
BBFILE_PATTERN_meta-sunxi := "^${LAYERDIR}/" BBFILE_PATTERN_sunxi := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-sunxi = "10" BBFILE_PRIORITY_sunxi = "10"
# This should only be incremented on significant changes that will # This should only be incremented on significant changes that will
# cause compatibility issues with other layers # cause compatibility issues with other layers
LAYERVERSION_meta-sunxi = "1" LAYERVERSION_sunxi = "1"
LAYERDEPENDS_meta-sunxi = "core openembedded-layer" LAYERDEPENDS_sunxi = "core meta-python meta-arm"
LAYERSERIES_COMPAT_meta-sunxi = "zeus dunfell" LAYERSERIES_COMPAT_sunxi = "honister kirkstone langdale mickledore nanbield"

View File

@ -0,0 +1,10 @@
#@TYPE: Machine
#@NAME: bananapi-m2-zero
#@DESCRIPTION: Machine configuration for the Banana Pi M2 Zero, base on Allwinner H3 CPU
require conf/machine/include/sun8i.inc
require conf/machine/include/hardware/ap6212a.inc
KERNEL_DEVICETREE = "sun8i-h2-plus-bananapi-m2-zero.dtb"
UBOOT_MACHINE = "bananapi_m2_zero_defconfig"

View File

@ -1,5 +1,5 @@
# Include for boards with AMPAK 6212A Wifi / Bluetooth module # Include for boards with AMPAK 6212A Wifi / Bluetooth module
# https://linux-sunxi.org/Wifi#Ampak # https://linux-sunxi.org/Wifi#Ampak
MACHINE_EXTRA_RRECOMMENDS_append = " kernel-module-brcmfmac" MACHINE_EXTRA_RRECOMMENDS:append = " kernel-module-brcmfmac"
MACHINE_EXTRA_RDEPENDS_append = " linux-firmware-bcm43430" MACHINE_EXTRA_RDEPENDS:append = " linux-firmware-bcm43430"

View File

@ -1,5 +1,5 @@
require conf/machine/include/sunxi.inc require conf/machine/include/sunxi.inc
require conf/machine/include/sunxi-mali.inc require conf/machine/include/sunxi-mali.inc
require conf/machine/include/tune-cortexa8.inc require conf/machine/include/arm/armv7a/tune-cortexa8.inc
SOC_FAMILY = "sun4i" SOC_FAMILY = "sun4i"

View File

@ -0,0 +1,8 @@
require conf/machine/include/sunxi64.inc
DEFAULTTUNE ?= "cortexa53-crypto"
require conf/machine/include/arm/armv8a/tune-cortexa53.inc
MACHINEOVERRIDES =. "sun50i:"
SOC_FAMILY = "sun50i-h6"

View File

@ -0,0 +1,8 @@
require conf/machine/include/sunxi64.inc
DEFAULTTUNE ?= "cortexa53-crypto"
require conf/machine/include/arm/armv8a/tune-cortexa53.inc
MACHINEOVERRIDES =. "sun50i:"
SOC_FAMILY = "sun50i-h616"

View File

@ -1,6 +1,6 @@
require conf/machine/include/sunxi64.inc require conf/machine/include/sunxi64.inc
DEFAULTTUNE ?= "cortexa53-crypto" DEFAULTTUNE ?= "cortexa53-crypto"
require conf/machine/include/tune-cortexa53.inc require conf/machine/include/arm/armv8a/tune-cortexa53.inc
SOC_FAMILY = "sun50i" SOC_FAMILY = "sun50i"

View File

@ -1,5 +1,5 @@
require conf/machine/include/sunxi.inc require conf/machine/include/sunxi.inc
require conf/machine/include/sunxi-mali.inc require conf/machine/include/sunxi-mali.inc
require conf/machine/include/tune-cortexa8.inc require conf/machine/include/arm/armv7a/tune-cortexa8.inc
SOC_FAMILY = "sun5i" SOC_FAMILY = "sun5i"

View File

@ -1,5 +1,5 @@
require conf/machine/include/sunxi.inc require conf/machine/include/sunxi.inc
require conf/machine/include/sunxi-mali.inc require conf/machine/include/sunxi-mali.inc
require conf/machine/include/tune-cortexa7.inc require conf/machine/include/arm/armv7a/tune-cortexa7.inc
SOC_FAMILY = "sun7i" SOC_FAMILY = "sun7i"

View File

@ -1,5 +1,5 @@
require conf/machine/include/sunxi.inc require conf/machine/include/sunxi.inc
require conf/machine/include/sunxi-mali.inc require conf/machine/include/sunxi-mali.inc
require conf/machine/include/tune-cortexa7.inc require conf/machine/include/arm/armv7a/tune-cortexa7.inc
SOC_FAMILY = "sun8i" SOC_FAMILY = "sun8i"

View File

@ -4,7 +4,7 @@ PREFERRED_PROVIDER_virtual/libgles1 ?= "sunxi-mali"
PREFERRED_PROVIDER_virtual/libgles2 ?= "sunxi-mali" PREFERRED_PROVIDER_virtual/libgles2 ?= "sunxi-mali"
PREFERRED_PROVIDER_virtual/egl ?= "sunxi-mali" PREFERRED_PROVIDER_virtual/egl ?= "sunxi-mali"
PACKAGECONFIG_remove_pn-xserver-xorg = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glamor', '', d)}" PACKAGECONFIG:remove:pn-xserver-xorg = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glamor', '', d)}"
XSERVER += "sunxi-mali \ XSERVER += "sunxi-mali \
sunxi-mali-dev" sunxi-mali-dev"

View File

@ -1,26 +1,26 @@
SOC_FAMILY ??= "" SOC_FAMILY ??= ""
include conf/machine/include/soc-family.inc include conf/machine/include/soc-family.inc
MACHINEOVERRIDES =. "sunxi:"
# Sub-architecture support # Sub-architecture support
MACHINE_SOCARCH_SUFFIX ?= "" MACHINE_SOCARCH_SUFFIX ?= ""
MACHINE_SOCARCH_SUFFIX_sun4i = "-sun4i" MACHINE_SOCARCH_SUFFIX_sun4i = "-sun4i"
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
XSERVER = "xserver-xorg \ XSERVER = "xserver-xorg \
xf86-video-fbturbo \
xf86-input-evdev \ xf86-input-evdev \
xf86-input-mouse \ xf86-input-mouse \
xf86-input-keyboard" xf86-input-keyboard"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline" PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline"
PREFERRED_VERSION_linux-mainline ?= "5.4.%" PREFERRED_VERSION_linux-mainline ?= "6.5.%"
PREFERRED_PROVIDER_u-boot ?= "u-boot" PREFERRED_PROVIDER_u-boot ?= "u-boot"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
KERNEL_IMAGETYPE ?= "uImage" KERNEL_IMAGETYPE ?= "uImage"
IMAGE_CLASSES += "sdcard_image-sunxi" IMAGE_FSTYPES += "ext3 tar.gz wic.gz wic.bmap"
IMAGE_FSTYPES += "ext3 tar.gz sunxi-sdimg"
MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
@ -30,5 +30,18 @@ UBOOT_ENTRYPOINT ?= "0x40008000"
SPL_BINARY ?= "u-boot-sunxi-with-spl.bin" SPL_BINARY ?= "u-boot-sunxi-with-spl.bin"
SERIAL_CONSOLE ?= "115200 ttyS0" SERIAL_CONSOLES ?= "115200;ttyS0"
MACHINE_FEATURES ?= "alsa apm keyboard rtc serial screen usbgadget usbhost vfat" MACHINE_FEATURES ?= "alsa apm keyboard rtc serial screen usbgadget usbhost vfat"
# Mimic the sdcard_image-sunxi.bbclass
# image-version-info file was also generated and installed to boot partition,
# but it is missing here - can be added somehow (how?) if required
SUNXI_FEX_FILE ?= " "
SUNXI_BOOT_SPACE ?= "40"
IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} boot.scr"
# ship fex file for sunxi kernel, devicetree file for mainline kernel
IMAGE_BOOT_FILES += "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel', 'linux-sunxi', '${SUNXI_FEX_FILE}', '${KERNEL_DEVICETREE}', d)}"
WKS_FILES ?= "sunxi-sdcard-image.wks.in"
WKS_FILE_DEPENDS ?= "virtual/kernel u-boot"
# in case of sunxi kernel, sunxi-board-fex must be built prior wic image assembly
WKS_FILE_DEPENDS += " ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel', 'linux-sunxi', 'sunxi-board-fex', '', d)}"

View File

@ -1,14 +1,15 @@
SOC_FAMILY ??= "" SOC_FAMILY ??= ""
include conf/machine/include/soc-family.inc include conf/machine/include/soc-family.inc
MACHINEOVERRIDES =. "sunxi:sunxi64:"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline" PREFERRED_PROVIDER_virtual/kernel ?= "linux-mainline"
PREFERRED_PROVIDER_u-boot ?= "u-boot" PREFERRED_PROVIDER_u-boot ?= "u-boot"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
KERNEL_IMAGETYPE ?= "Image" KERNEL_IMAGETYPE ?= "Image"
IMAGE_CLASSES += "sdcard_image-sunxi" IMAGE_FSTYPES += "ext4 tar.gz wic.gz wic.bmap"
IMAGE_FSTYPES += "ext4 tar.gz sunxi-sdimg"
MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
@ -17,8 +18,34 @@ UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).partition('+')[2][0:7]}"
UBOOT_ENTRYPOINT ?= "0x40008000" UBOOT_ENTRYPOINT ?= "0x40008000"
UBOOT_LOADADDRESS ?= "0x400080OB00" UBOOT_LOADADDRESS ?= "0x400080OB00"
UBOOT_BINARY ?= "u-boot.itb" #UBOOT_BINARY ?= "u-boot.itb"
SPL_BINARY ?= "spl/sunxi-spl.bin" SPL_BINARY ?= "u-boot-sunxi-with-spl.bin"
SERIAL_CONSOLE ?= "115200 ttyS0" SERIAL_CONSOLES ?= "115200;ttyS0"
MACHINE_FEATURES ?= "alsa apm keyboard rtc serial screen usbgadget usbhost vfat" MACHINE_FEATURES ?= "alsa apm keyboard rtc serial screen usbgadget usbhost vfat"
# arm64 dbts are under <vendor>/dts but is deployed under DEPLOYDIR
do_fix_device_tree_location() {
for kdt in ${KERNEL_DEVICETREE}
do
local dbt_dir=$(dirname ${kdt})
if [ "." != "${dbt_dir}" ] ; then
local dbt=$(basename ${kdt})
local dst=${DEPLOY_DIR_IMAGE}/${dbt_dir}/${dbt}
if [ ! -f ${dst} ] ; then
mkdir -p ${DEPLOY_DIR_IMAGE}/$dbt_dir
ln -s ${DEPLOY_DIR_IMAGE}/${dbt} ${dst}
fi
fi
done
}
addtask do_fix_device_tree_location after do_write_wks_template before do_image_wic
SUNXI_BOOT_SPACE ?= "40"
IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} boot.scr ${KERNEL_DEVICETREE}"
WKS_FILES ?= "sunxi-sdcard-image.wks.in"
WKS_FILE_DEPENDS ?= "virtual/kernel u-boot"

View File

@ -0,0 +1,10 @@
#@TYPE: Machine
#@NAME: Lamobo R1
#@DESCRIPTION: Machine configuration for the lamobo r1, based on allwinner A20 CPU http://bananapi.org/
require conf/machine/include/sun7i.inc
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEVICETREE = "sun7i-a20-lamobo-r1.dtb"
UBOOT_MACHINE = "Lamobo_R1_config"
SUNXI_FEX_FILE = "sys_config/a20/lamobo-r1.fex"

View File

@ -0,0 +1,9 @@
#@TYPE: Machine
#@NAME: licheepi-zero
#@DESCRIPTION: Machine configuration for the licheepi-zero, based on allwinner V3s CPU
require conf/machine/include/sun8i.inc
UBOOT_MACHINE = "LicheePi_Zero_defconfig"
KERNEL_DEVICETREE = "sun8i-v3s-licheepi-zero.dtb"

View File

@ -0,0 +1,10 @@
#@TYPE: Machine
#@NAME: HAOYU Electronics MarsBoard A10
#@DESCRIPTION: Machine configuration for the HAOYU Electronics MarsBoard A10, based on Allwinner A10 CPU
#https://linux-sunxi.org/MarsBoard_A10
require conf/machine/include/sun4i.inc
KERNEL_DEVICETREE = "sun4i-a10-marsboard.dtb"
UBOOT_MACHINE = "Marsboard_A10_config"
SUNXI_FEX_FILE = "sys_config/a10/marsboard_a10.fex"

View File

@ -0,0 +1,8 @@
#@TYPE: Machine
#@NAME: NanoPi M1
#@DESCRIPTION: Machine configuration for the FriendlyARM NanoPi Neo, based on #the Allwinner H3 CPU
require conf/machine/include/sun8i.inc
KERNEL_DEVICETREE = "sun8i-h3-nanopi-m1.dtb"
UBOOT_MACHINE = "nanopi_m1_defconfig"

View File

@ -0,0 +1,8 @@
#@TYPE: Machine
#@NAME: NanoPi R1
#@DESCRIPTION: Machine configuration for the FriendlyARM NanoPi R1, based on #the Allwinner H3 CPU
require conf/machine/include/sun8i.inc
KERNEL_DEVICETREE = "sun8i-h3-nanopi-r1.dtb"
UBOOT_MACHINE = "nanopi_r1_defconfig"

View File

@ -0,0 +1,9 @@
#@TYPE: Machine
#@NAME: orange-pi-lite
#@DESCRIPTION: Machine configuration for the orange-pi-lite, based on Allwinner H3 CPU
require conf/machine/include/sun8i.inc
KERNEL_DEVICETREE = "sun8i-h3-orangepi-lite.dtb"
UBOOT_MACHINE = "orangepi_lite_defconfig"

View File

@ -0,0 +1,9 @@
#@TYPE: Machine
#@NAME: orange-pi-one-plus
#@DESCRIPTION: Machine configuration for the Orange Pi One Plus, based on Allwinner H6 CPU
require conf/machine/include/sun50i-h6.inc
KERNEL_DEVICETREE = "allwinner/sun50i-h6-orangepi-one-plus.dtb"
UBOOT_MACHINE = "orangepi_one_plus_defconfig"

View File

@ -0,0 +1,8 @@
#@TYPE: Machine
#@NAME: orangepi-pc2
#@DESCRIPTION: Machine configuration for the orangepi-pc2, based on Allwinner A64 CPU
require conf/machine/include/sun50i.inc
KERNEL_DEVICETREE = "allwinner/sun50i-h5-orangepi-pc2.dtb"
UBOOT_MACHINE = "orangepi_pc2_defconfig"

View File

@ -1,8 +0,0 @@
#@TYPE: Machine
#@NAME: orange-pi-plus2e
#@DESCRIPTION: Machine configuration for the orange-pi-plus2e, base on allwinner H3 CPU
require conf/machine/include/sun8i.inc
KERNEL_DEVICETREE = "sun8i-h3-orangepi-plus2e.dtb"
UBOOT_MACHINE = "orangepi_plus2e_defconfig"

View File

@ -0,0 +1,9 @@
#@TYPE: Machine
#@NAME: orange-pi-r1
#@DESCRIPTION: Machine configuration for the orange-pi-r1, base on allwinner H2+ CPU
require conf/machine/include/sun8i.inc
KERNEL_DEVICETREE = "sun8i-h2-plus-orangepi-r1.dtb"
UBOOT_MACHINE = "orangepi_r1_defconfig"

View File

@ -1,6 +1,6 @@
#@TYPE: Machine #@TYPE: Machine
#@NAME: orange-pi-one #@NAME: orange-pi-zero
#@DESCRIPTION: Machine configuration for the orange-pi-one, base on allwinner H3 CPU #@DESCRIPTION: Machine configuration for the orange-pi-zero, based on Allwinner H2 CPU
require conf/machine/include/sun8i.inc require conf/machine/include/sun8i.inc

View File

@ -0,0 +1,16 @@
#@TYPE: Machine
#@NAME: orange-pi-zero-2
#@DESCRIPTION: Machine configuration for the orange-pi-zero-2, based on Allwinner H616 CPU
require conf/machine/include/sun50i-h616.inc
KERNEL_DEVICETREE = "allwinner/sun50i-h616-orangepi-zero2.dtb"
UBOOT_MACHINE = "orangepi_zero2_defconfig"
SPL_BINARY = "u-boot-sunxi-with-spl.bin"
# as for now neither graphics nor audio is supported
MACHINE_FEATURES:remove = "alsa x11"
MACHINE_FEATURES:append = "bluetooth wifi"
MACHINE_EXTRA_RRECOMMENDS = "uwe5622-firmware"

View File

@ -1,27 +0,0 @@
DESCRIPTION = "ARM Trusted Firmware Allwinner"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://license.md;md5=829bdeb34c1d9044f393d5a16c068371"
SRC_URI = "git://github.com/apritzel/arm-trusted-firmware;nobranch=1"
SRCREV = "aa75c8da415158a94b82a430b2b40000778e851f"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
COMPATIBLE_MACHINE = "(sun50i)"
PLATFORM_sun50i = "sun50iw1p1"
LDFLAGS[unexport] = "1"
do_compile() {
oe_runmake -C ${S} BUILD_BASE=${B} \
CROSS_COMPILE=${TARGET_PREFIX} \
PLAT=${PLATFORM} \
bl31 \
all
}
do_install() {
install -D -p -m 0644 ${B}/${PLATFORM}/release/bl31.bin ${DEPLOY_DIR_IMAGE}/bl31.bin
}

View File

@ -9,9 +9,9 @@ PR = "r0"
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i)" COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i)"
SRC_URI = "git://github.com/linux-sunxi/sunxi-boards.git;protocol=git" SRC_URI = "git://github.com/linux-sunxi/sunxi-boards.git;protocol=https;branch=master"
# Increase PV with SRCREV change # Increase PV with SRCREV change
SRCREV = "496ef0fbd166cc2395daa76dd3c359357420963d" SRCREV = "af5f938ea14a3614d35ad3d9ab51a5d392117444"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -0,0 +1,7 @@
COMPATIBLE_MACHINE = "(sun50i|sun50i-h616|sun50i-h6)"
TFA_PLATFORM:sun50i = "sun50i_a64"
TFA_PLATFORM:sun50i-h6 = "sun50i_h6"
TFA_PLATFORM:sun50i-h616 = "sun50i_h616"
TFA_BUILD_TARGET = "bl31"

View File

@ -1,9 +1,9 @@
From 6adb2ebdc4022c24497e9ee4dccab41d18e3105d Mon Sep 17 00:00:00 2001 From 6a64d90ca4d976c16a2e102dbad0848e4d29776c Mon Sep 17 00:00:00 2001
From: Florin Sarbu <florin@resin.io> From: Florin Sarbu <florin@resin.io>
Date: Wed, 12 Sep 2018 14:22:49 +0200 Date: Wed, 12 Sep 2018 14:22:49 +0200
Subject: [PATCH] nanopi_neo_air_defconfig: Enable eMMC support Subject: [PATCH] nanopi_neo_air_defconfig: Enable eMMC support
Upstream-status: Pending Upstream-Status: Pending
Signed-off-by: Florin Sarbu <florin@resin.io> Signed-off-by: Florin Sarbu <florin@resin.io>
--- ---
@ -11,11 +11,11 @@ Signed-off-by: Florin Sarbu <florin@resin.io>
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/configs/nanopi_neo_air_defconfig b/configs/nanopi_neo_air_defconfig diff --git a/configs/nanopi_neo_air_defconfig b/configs/nanopi_neo_air_defconfig
index 5ad90ddd16..8b7a4eb45d 100644 index 806d95c1cc..8899cc3a15 100644
--- a/configs/nanopi_neo_air_defconfig --- a/configs/nanopi_neo_air_defconfig
+++ b/configs/nanopi_neo_air_defconfig +++ b/configs/nanopi_neo_air_defconfig
@@ -15,3 +15,4 @@ CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo-air" @@ -9,3 +9,4 @@ CONFIG_DRAM_CLK=408
CONFIG_CONSOLE_MUX=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2

View File

@ -0,0 +1,42 @@
From 767a05572ef5b93c2e157749b1754cbe261ee43d Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Fri, 8 Apr 2022 11:33:53 +0200
Subject: [PATCH] Added nanopi-r1 board support
Patch taken from : https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/add-nanopi-r1-and-duo2.patch
Upstream-Status: Pending
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
diff --git a/configs/nanopi_r1_defconfig b/configs/nanopi_r1_defconfig
new file mode 100644
index 0000000..e028b41
--- /dev/null
+++ b/configs/nanopi_r1_defconfig
@@ -0,0 +1,22 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN8I_H3=y
+CONFIG_DRAM_CLK=408
+CONFIG_DRAM_ZQ=3881979
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MACPWR="PD6"
+# CONFIG_VIDEO_DE2 is not set
+CONFIG_NR_DRAM_BANKS=1
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_CONSOLE_MUX=y
+CONFIG_SYS_CLK_FREQ=480000000
+# CONFIG_CMD_FLASH is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-r1"
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
--
2.7.4

View File

@ -1,67 +0,0 @@
From bb6f500c10cc8f5f31245626899e0732b7b287c5 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Wed, 19 Aug 2020 13:39:49 +0200
Subject: [PATCH] Revert "sunxi: psci: avoid error address-of-packed-member"
This reverts commit 9bd34a69a453d409792e08c00953ce8862145e65.
---
arch/arm/cpu/armv7/sunxi/psci.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c
index 5b68900..2c5d99e 100644
--- a/arch/arm/cpu/armv7/sunxi/psci.c
+++ b/arch/arm/cpu/armv7/sunxi/psci.c
@@ -75,7 +75,7 @@ static void __secure __mdelay(u32 ms)
isb();
}
-static void __secure clamp_release(void __maybe_unused *clamp)
+static void __secure clamp_release(u32 __maybe_unused *clamp)
{
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \
defined(CONFIG_MACH_SUN8I_H3) || \
@@ -90,7 +90,7 @@ static void __secure clamp_release(void __maybe_unused *clamp)
#endif
}
-static void __secure clamp_set(void __maybe_unused *clamp)
+static void __secure clamp_set(u32 __maybe_unused *clamp)
{
#if defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN7I) || \
defined(CONFIG_MACH_SUN8I_H3) || \
@@ -99,28 +99,22 @@ static void __secure clamp_set(void __maybe_unused *clamp)
#endif
}
-static void __secure sunxi_power_switch(void *clamp, void *pwroff_ptr, bool on,
+static void __secure sunxi_power_switch(u32 *clamp, u32 *pwroff, bool on,
int cpu)
{
- u32 pwroff;
-
- memcpy(&pwroff, pwroff_ptr, sizeof(u32));
-
if (on) {
/* Release power clamp */
clamp_release(clamp);
/* Clear power gating */
- clrbits_le32(&pwroff, BIT(cpu));
+ clrbits_le32(pwroff, BIT(cpu));
} else {
/* Set power gating */
- setbits_le32(&pwroff, BIT(cpu));
+ setbits_le32(pwroff, BIT(cpu));
/* Activate power clamp */
clamp_set(clamp);
}
-
- memcpy(pwroff_ptr, &pwroff, sizeof(u32));
}
#ifdef CONFIG_MACH_SUN8I_R40
--
2.7.4

View File

@ -0,0 +1,58 @@
From: Anne Macedo <retpolanne@posteo.net>
Date: Tue, 11 Jul 2023 00:39:58 +0000
Subject: [PATCH] sunxi: H6: Enable Ethernet on Orange Pi One Plus
Enable Ethernet on Orange Pi One Plus by using the correct phy for
Realtek RTL8211E instead of the Generic One. Also use CONFIG_MACPWR to
turn on ethernet on startup.
After this patch is applied, a few issues can be seen:
- there's still a PHY reset timed out error that doesn't seem to cause
any impacts to the overall connection
- sometimes the emac driver times out after reset (yellow LED turns on
and never blinks)
For future patches: for now, CONFIG_MACPWR is the only way to enable
Ethernet on boot. There's already code on the dts for using the 3v3-gmac
regulator. However, it is not probed on boot, so it only starts after a
"regulator status" command is issued.
More details about the troubleshooting on [1].
Upstream-Status: Submitted
[1] https://lore.kernel.org/u-boot/4wsvwgy56e2xfgtvioru2tf2ofkqprlts36qggivxogww6pn5j@4jk63zxhzhag/
Signed-off-by: Anne Macedo <retpolanne@posteo.net>
---
arch/arm/dts/sun50i-h6-orangepi-one-plus.dts | 2 +-
configs/orangepi_one_plus_defconfig | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts b/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts
index 29a081e72a..6427c58f8a 100644
--- a/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts
+++ b/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts
@@ -37,7 +37,7 @@
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
- compatible = "ethernet-phy-ieee802.3-c22";
+ compatible = "ethernet-phy-id001c.c915", "ethernet-phy-ieee802.3-c22" ;
reg = <1>;
};
};
diff --git a/configs/orangepi_one_plus_defconfig b/configs/orangepi_one_plus_defconfig
index aa5f540eb1..a1835492db 100644
--- a/configs/orangepi_one_plus_defconfig
+++ b/configs/orangepi_one_plus_defconfig
@@ -8,3 +8,7 @@ CONFIG_SUNXI_DRAM_H6_LPDDR3=y
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
+CONFIG_SUN8I_EMAC=y
+CONFIG_PHY_REALTEK=y
+CONFIG_PHY_ETHERNET_ID=y
+CONFIG_MACPWR="PD6"

View File

@ -6,6 +6,6 @@ if itest.b *0x28 == 0x02 ; then
rootdev=mmcblk1p2 rootdev=mmcblk1p2
fi fi
setenv bootargs console=${console} console=tty1 root=/dev/${rootdev} rootwait panic=10 ${extra} setenv bootargs console=${console} console=tty1 root=/dev/${rootdev} rootwait panic=10 ${extra}
load mmc 0:1 ${fdt_addr_r} ${fdtfile} || load mmc 0:1 ${fdt_addr_r} boot/${fdtfile} load mmc 0:1 ${fdt_addr_r} ${fdtfile} || load mmc 0:1 ${fdt_addr_r} boot/allwinner/${fdtfile}
load mmc 0:1 ${kernel_addr_r} zImage || load mmc 0:1 ${kernel_addr_r} boot/zImage || load mmc 0:1 ${kernel_addr_r} uImage || load mmc 0:1 ${kernel_addr_r} boot/uImage load mmc 0:1 ${kernel_addr_r} zImage || load mmc 0:1 ${kernel_addr_r} boot/zImage || load mmc 0:1 ${kernel_addr_r} uImage || load mmc 0:1 ${kernel_addr_r} boot/uImage
bootz ${kernel_addr_r} - ${fdt_addr_r} || bootm ${kernel_addr_r} - ${fdt_addr_r} bootz ${kernel_addr_r} - ${fdt_addr_r} || bootm ${kernel_addr_r} - ${fdt_addr_r}

View File

@ -0,0 +1,11 @@
# Default to (primary) SD
rootdev=mmcblk0p2
if itest.b *0x28 == 0x02 ; then
# U-Boot loaded from eMMC or secondary SD so use it for rootfs too
echo "U-boot loaded from eMMC or secondary SD"
rootdev=mmcblk2p2
fi
setenv bootargs console=${console} console=tty1 root=/dev/${rootdev} rootwait panic=10 ${extra}
load mmc 0:1 ${fdt_addr_r} ${fdtfile}
load mmc 0:1 ${kernel_addr_r} Image
booti ${kernel_addr_r} - ${fdt_addr_r}

View File

@ -2,7 +2,7 @@ DESCRIPTION = "U-Boot port for sunxi"
require recipes-bsp/u-boot/u-boot.inc require recipes-bsp/u-boot/u-boot.inc
LICENSE = "GPLv2" LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
# No patches for other machines yet # No patches for other machines yet
@ -19,7 +19,7 @@ UBOOT_MACHINE_olinuxino-a10s = "A10s-OLinuXino-Micro_config"
UBOOT_MACHINE_meleg = "Mele_A1000G_config" UBOOT_MACHINE_meleg = "Mele_A1000G_config"
SRC_URI = " \ SRC_URI = " \
git://github.com/linux-sunxi/u-boot-sunxi.git;protocol=git;branch=sunxi \ git://github.com/linux-sunxi/u-boot-sunxi.git;protocol=https;branch=sunxi \
file://0001-gcc5-fixes.patch \ file://0001-gcc5-fixes.patch \
file://0002-gcc6-fixes.patch \ file://0002-gcc6-fixes.patch \
file://0003-No-gcc-version-specific-includes.patch \ file://0003-No-gcc-version-specific-includes.patch \

View File

@ -1,33 +1,31 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" FILESEXTRAPATHS:prepend:sunxi := "${THISDIR}/files:"
DEPENDS += " bc-native dtc-native swig-native python3-native flex-native bison-native " DEPENDS:append:sunxi = " bc-native dtc-native swig-native python3-native flex-native bison-native "
DEPENDS_append_sun50i = " atf-sunxi " DEPENDS:append:sun50i = " trusted-firmware-a"
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i|sun50i)" COMPATIBLE_MACHINE:sunxi = "(sun4i|sun5i|sun7i|sun8i|sun50i)"
DEFAULT_PREFERENCE_sun4i="1" DEFAULT_PREFERENCE:sun4i = "1"
DEFAULT_PREFERENCE_sun5i="1" DEFAULT_PREFERENCE:sun5i = "1"
DEFAULT_PREFERENCE_sun7i="1" DEFAULT_PREFERENCE:sun7i = "1"
DEFAULT_PREFERENCE_sun8i="1" DEFAULT_PREFERENCE:sun8i = "1"
DEFAULT_PREFERENCE_sun50i="1" DEFAULT_PREFERENCE:sun50i = "1"
SRC_URI += " \ SRC_URI:append:sunxi = " \
file://0001-nanopi_neo_air_defconfig-Enable-eMMC-support.patch \ file://0001-nanopi_neo_air_defconfig-Enable-eMMC-support.patch \
file://boot.cmd \ file://0002-Added-nanopi-r1-board-support.patch \
" file://0003-sunxi-H6-Enable-Ethernet-on-Orange-Pi-One-Plus.patch \
# fix booting issue on orange pi zero file://boot.cmd \
SRC_URI_append_orange-pi-zero = " file://0002-Revert-sunxi-psci-avoid-error-address-of-packed-memb.patch" "
SRC_URI_append_nanopi-neo = " file://0002-Revert-sunxi-psci-avoid-error-address-of-packed-memb.patch" UBOOT_ENV_SUFFIX:sunxi = "scr"
UBOOT_ENV:sunxi = "boot"
UBOOT_ENV_SUFFIX = "scr" EXTRA_OEMAKE:append:sunxi = ' HOSTLDSHARED="${BUILD_CC} -shared ${BUILD_LDFLAGS} ${BUILD_CFLAGS}" '
UBOOT_ENV = "boot" EXTRA_OEMAKE:append:sun50i = " BL31=${DEPLOY_DIR_IMAGE}/bl31.bin SCP=/dev/null"
EXTRA_OEMAKE += ' HOSTLDSHARED="${BUILD_CC} -shared ${BUILD_LDFLAGS} ${BUILD_CFLAGS}" ' do_compile:sun50i[depends] += "trusted-firmware-a:do_deploy"
EXTRA_OEMAKE_append_sun50i = " BL31=${DEPLOY_DIR_IMAGE}/bl31.bin "
do_compile_sun50i[depends] += "atf-sunxi:do_deploy" do_compile:append:sunxi() {
do_compile_append() {
${B}/tools/mkimage -C none -A arm -T script -d ${WORKDIR}/boot.cmd ${WORKDIR}/${UBOOT_ENV_BINARY} ${B}/tools/mkimage -C none -A arm -T script -d ${WORKDIR}/boot.cmd ${WORKDIR}/${UBOOT_ENV_BINARY}
} }

View File

@ -1,7 +1,7 @@
DESCRIPTION = "A module to control Allwinner GPIO,SPI and I2C channels" DESCRIPTION = "A module to control Allwinner GPIO,SPI and I2C channels"
HOMEPAGE = "https://pypi.python.org/pypi/pyA20" HOMEPAGE = "https://pypi.python.org/pypi/pyA20"
SECTION = "devel/python" SECTION = "devel/python"
LICENSE = "GPLv3" LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=4e584373bb0f46ef1e423cb7df37847d" LIC_FILES_CHKSUM = "file://PKG-INFO;md5=4e584373bb0f46ef1e423cb7df37847d"
DEPENDS = "python3" DEPENDS = "python3"
@ -15,7 +15,7 @@ S = "${WORKDIR}/pyA20-${PV}"
inherit distutils3 inherit distutils3
do_compile_prepend() { do_compile:prepend() {
cp ${WORKDIR}/mapping.h ${S}/pyA20/gpio/mapping.h cp ${WORKDIR}/mapping.h ${S}/pyA20/gpio/mapping.h
} }

View File

@ -21,8 +21,8 @@ python __anonymous() {
raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv)) raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv))
} }
SRCREV_pn-${PN} = "d343311efc8db166d8371b28494f0f27b6a58724" SRCREV = "d343311efc8db166d8371b28494f0f27b6a58724"
SRC_URI = "gitsm://github.com/linux-sunxi/sunxi-mali.git \ SRC_URI = "git://github.com/linux-sunxi/sunxi-mali.git;protocol=https;branch=master \
file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch \ file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch \
file://0002-Add-missing-GLchar-definition.patch \ file://0002-Add-missing-GLchar-definition.patch \
file://0003-Fix-sed-to-replace-by-the-correct-var.patch \ file://0003-Fix-sed-to-replace-by-the-correct-var.patch \
@ -92,13 +92,13 @@ do_install() {
# Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN} # Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN}
PACKAGES =+ "${PN}-test" PACKAGES =+ "${PN}-test"
RPROVIDES_${PN} += "libGLESv2.so libEGL.so libGLESv2.so libGLESv1_CM.so libMali.so" RPROVIDES:${PN} += "libGLESv2.so libEGL.so libGLESv2.so libGLESv1_CM.so libMali.so"
RDEPENDS_${PN}-test = "${PN}" RDEPENDS:${PN}-test = "${PN}"
FILES_${PN} += "${libdir}/lib*.so" FILES:${PN} += "${libdir}/lib*.so"
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig/*" FILES:${PN}-dev = "${includedir} ${libdir}/pkgconfig/*"
FILES_${PN}-test = "${bindir}/sunximali-test" FILES:${PN}-test = "${bindir}/sunximali-test"
# These are closed binaries generated elsewhere so don't check ldflags & text relocations # These are closed binaries generated elsewhere so don't check ldflags & text relocations
INSANE_SKIP_${PN} = "dev-so ldflags textrel" INSANE_SKIP:${PN} = "dev-so ldflags textrel"
INSANE_SKIP_${PN}-test = "dev-so ldflags textrel" INSANE_SKIP:${PN}-test = "dev-so ldflags textrel"

View File

@ -1,14 +1,14 @@
DESCRIPTION = "Unified Memory Provider userspace API source code needed for xf86-video-mali compilation" DESCRIPTION = "Unified Memory Provider userspace API source code needed for xf86-video-mali compilation"
LICENSE = "Apache-2" LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=edf7fb6071cae7ec80d537a05ee17198" LIC_FILES_CHKSUM = "file://debian/copyright;md5=edf7fb6071cae7ec80d537a05ee17198"
inherit autotools inherit autotools
PV = "r4p0-00rel0+git${SRCPV}" PV = "r4p0-00rel0+git${SRCPV}"
SRCREV_pn-${PN} = "ec0680628744f30b8fac35e41a7bd8e23e59c39f" SRCREV = "ec0680628744f30b8fac35e41a7bd8e23e59c39f"
SRC_URI = "git://github.com/linux-sunxi/libump.git" SRC_URI = "git://github.com/linux-sunxi/libump.git;protocol=https;branch=master"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -0,0 +1 @@
PACKAGECONFIG:class-target = "opengl x11 gallium"

View File

@ -1,5 +1,5 @@
# Enable lima and panfrost Mesa drivers # Enable lima and panfrost Mesa drivers
PACKAGECONFIG_append_use-mailine-graphics = " lima panfrost" PACKAGECONFIG:append:use-mailine-graphics = " lima panfrost"
# Enable KMS renderonly Mesa support # Enable KMS renderonly Mesa support
# See https://cgit.freedesktop.org/mesa/mesa/commit/?id=2b780fe89300199f2334539aa1678e9b68f0434f # See https://cgit.freedesktop.org/mesa/mesa/commit/?id=2b780fe89300199f2334539aa1678e9b68f0434f
GALLIUMDRIVERS_append_use-mailine-graphics = ",kmsro" GALLIUMDRIVERS:append:use-mailine-graphics = ",kmsro"

View File

@ -1,4 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://tslib.patch" SRC_URI += "file://tslib.patch"

View File

@ -1,6 +1,6 @@
DESCRIPTION = "Library for the DRI2 extension to the X Window System" DESCRIPTION = "Library for the DRI2 extension to the X Window System"
LICENSE = "MIT-X" LICENSE = "MIT-CMU"
LIC_FILES_CHKSUM = "file://COPYING;md5=827da9afab1f727f2a66574629e0f39c" LIC_FILES_CHKSUM = "file://COPYING;md5=827da9afab1f727f2a66574629e0f39c"
DEPENDS = "libdrm libxext libxfixes xorgproto" DEPENDS = "libdrm libxext libxfixes xorgproto"
@ -9,7 +9,7 @@ PE = "1"
PV = "1.0.0+git${SRCPV}" PV = "1.0.0+git${SRCPV}"
SRC_URI = "git://github.com/robclark/libdri2.git;protocol=http;branch=master" SRC_URI = "git://github.com/robclark/libdri2.git;protocol=http;branch=master"
SRCREV_pn-${PN} = "4f1eef3183df2b270c3d5cbef07343ee5127a6a4" SRCREV = "4f1eef3183df2b270c3d5cbef07343ee5127a6a4"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -2,14 +2,14 @@ require recipes-graphics/xorg-driver/xorg-driver-video.inc
DESCRIPTION = "X.Org X server -- A10/A13 display driver" DESCRIPTION = "X.Org X server -- A10/A13 display driver"
LICENSE = "MIT-X" LICENSE = "MIT-CMU"
LIC_FILES_CHKSUM = "file://COPYING;md5=f91dc3ee5ce59eb4b528e67e98a31266" LIC_FILES_CHKSUM = "file://COPYING;md5=f91dc3ee5ce59eb4b528e67e98a31266"
DEPENDS += "sunxi-mali libump xorgproto" DEPENDS += "sunxi-mali libump xorgproto"
PE = "3" PE = "3"
PV = "0.5.1+git${SRCPV}" PV = "0.5.1+git${SRCPV}"
SRCREV_pn-${PN} = "e094e3c8f9004ca3347694bd05b99d136e8621b9" SRCREV = "e094e3c8f9004ca3347694bd05b99d136e8621b9"
SRC_URI = "git://github.com/ssvb/xf86-video-fbturbo.git;protocol=http;branch=master \ SRC_URI = "git://github.com/ssvb/xf86-video-fbturbo.git;protocol=http;branch=master \
file://20-fbturbo.conf" file://20-fbturbo.conf"
@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
CFLAGS += " -I${STAGING_INCDIR}/xorg " CFLAGS += " -I${STAGING_INCDIR}/xorg "
do_install_append() { do_install:append() {
install -d ${D}${datadir}/X11/xorg.conf.d install -d ${D}${datadir}/X11/xorg.conf.d
install -m 0644 ${WORKDIR}/20-fbturbo.conf ${D}${datadir}/X11/xorg.conf.d install -m 0644 ${WORKDIR}/20-fbturbo.conf ${D}${datadir}/X11/xorg.conf.d
} }
FILES_${PN} += "${datadir}/X11/xorg.conf.d/20-fbturbo.conf" FILES:${PN} += "${datadir}/X11/xorg.conf.d/20-fbturbo.conf"

View File

@ -1 +1 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

View File

@ -0,0 +1 @@
DEPENDS += "libxshmfence"

View File

@ -6,7 +6,7 @@
# WARNING: The following commit is required for NVRAM files to be included in # WARNING: The following commit is required for NVRAM files to be included in
# linux-firmware-bcm43430 package: # linux-firmware-bcm43430 package:
# http://git.openembedded.org/openembedded-core/commit/?id=dde0f79f32fa6bab045ef60199903f74c4cc3393 # http://git.openembedded.org/openembedded-core/commit/?id=dde0f79f32fa6bab045ef60199903f74c4cc3393
do_install_append() { do_install:append() {
ln -sf -r ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.xunlong,orangepi-zero-plus2.txt ln -sf -r ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.xunlong,orangepi-zero-plus2.txt
ln -sf -r ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.xunlong,orangepi-zero-plus2-h3.txt ln -sf -r ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.xunlong,orangepi-zero-plus2-h3.txt
ln -sf -r ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.friendlyarm,nanopi-neo-plus2.txt ln -sf -r ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.AP6212.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.friendlyarm,nanopi-neo-plus2.txt

View File

@ -0,0 +1,45 @@
From 5138d597275fd503573fac84018186bd18740644 Mon Sep 17 00:00:00 2001
From: pbiel <pbiel7@gmail.com>
Date: Thu, 30 Mar 2023 22:45:33 +0200
Subject: [PATCH] Fix incldue path for unisocwcn
---
drivers/net/wireless/uwe5622/Makefile | 4 +++-
drivers/net/wireless/uwe5622/unisocwcn/Makefile | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/uwe5622/Makefile b/drivers/net/wireless/uwe5622/Makefile
index 313ea5123..e9a398584 100644
--- a/drivers/net/wireless/uwe5622/Makefile
+++ b/drivers/net/wireless/uwe5622/Makefile
@@ -2,7 +2,9 @@ obj-$(CONFIG_AW_WIFI_DEVICE_UWE5622) += unisocwcn/
obj-$(CONFIG_WLAN_UWE5622) += unisocwifi/
obj-$(CONFIG_TTY_OVERY_SDIO) += tty-sdio/
-UNISOCWCN_DIR := $(shell cd $(src)/unisocwcn/ && /bin/pwd)
+mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
+UNISOCWCN_DIR := $(dir $(mkfile_path))/unisocwcn/
+
UNISOC_BSP_INCLUDE := $(UNISOCWCN_DIR)/include
export UNISOC_BSP_INCLUDE
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/Makefile b/drivers/net/wireless/uwe5622/unisocwcn/Makefile
index f9c595747..1ad490594 100644
--- a/drivers/net/wireless/uwe5622/unisocwcn/Makefile
+++ b/drivers/net/wireless/uwe5622/unisocwcn/Makefile
@@ -129,9 +129,9 @@ ccflags-y += -DCONFIG_WCN_BOOT
ccflags-y += -DCONFIG_WCN_UTILS
#### include path ######
-ccflags-y += -I$(src)/include/
-ccflags-y += -I$(src)/platform/
-ccflags-y += -I$(src)/platform/rf/
+ccflags-y += -I$(srctree)/$(src)/include/
+ccflags-y += -I$(srctree)/$(src)/platform/
+ccflags-y += -I$(srctree)/$(src)/platform/rf/
#### add cflag for Customer ######
### ---------- Hisilicon start ---------- ###
--
2.34.1

View File

@ -0,0 +1,177 @@
From 5f4d2d5fc32dfe41c73cac36ec6747c34e5562a3 Mon Sep 17 00:00:00 2001
From: pbiel <pbiel7@gmail.com>
Date: Wed, 15 Mar 2023 23:04:27 +0100
Subject: [PATCH] wireless: Adapt uwe5622 wifi driver to kernel 6.1
---
drivers/net/wireless/uwe5622/tty-sdio/lpm.c | 2 +-
.../uwe5622/unisocwcn/boot/wcn_integrate_dev.c | 2 +-
.../uwe5622/unisocwcn/platform/wcn_parn_parser.c | 2 +-
.../wireless/uwe5622/unisocwcn/platform/wcn_procfs.c | 2 +-
.../wireless/uwe5622/unisocwcn/usb/wcn_usb_download.c | 2 +-
.../net/wireless/uwe5622/unisocwcn/usb/wcn_usb_test.c | 6 +++---
drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c | 10 +++++-----
drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c | 2 +-
8 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/net/wireless/uwe5622/tty-sdio/lpm.c b/drivers/net/wireless/uwe5622/tty-sdio/lpm.c
index b2d9a8994e5e..35e30651a921 100644
--- a/drivers/net/wireless/uwe5622/tty-sdio/lpm.c
+++ b/drivers/net/wireless/uwe5622/tty-sdio/lpm.c
@@ -70,7 +70,7 @@ static int btwrite_proc_show(struct seq_file *m, void *v)
static int bluesleep_open_proc_btwrite(struct inode *inode, struct file *file)
{
- return single_open(file, btwrite_proc_show, PDE_DATA(inode));
+ return single_open(file, btwrite_proc_show, pde_data(inode));
}
static const struct proc_ops lpm_proc_btwrite_fops = {
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/boot/wcn_integrate_dev.c b/drivers/net/wireless/uwe5622/unisocwcn/boot/wcn_integrate_dev.c
index 3ee6910e7cf7..29a3ec298bc1 100644
--- a/drivers/net/wireless/uwe5622/unisocwcn/boot/wcn_integrate_dev.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/boot/wcn_integrate_dev.c
@@ -562,7 +562,7 @@ static struct wcn_proc_data g_proc_data = {
static int wcn_platform_open(struct inode *inode, struct file *filp)
{
struct platform_proc_file_entry
- *entry = (struct platform_proc_file_entry *)PDE_DATA(inode);
+ *entry = (struct platform_proc_file_entry *)pde_data(inode);
WCN_INFO("entry name:%s\n!", entry->name);
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
index aea7d6d0fe57..bd841f0b32d3 100644
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
@@ -146,7 +146,7 @@ static int prefixcmp(const char *str, const char *prefix)
}
#if KERNEL_VERSION(3, 19, 0) <= LINUX_VERSION_CODE
-static int find_callback(struct dir_context *ctx, const char *name, int namlen,
+static bool find_callback(struct dir_context *ctx, const char *name, int namlen,
loff_t offset, u64 ino, unsigned int d_type)
#else
static int find_callback(void *ctx, const char *name, int namlen,
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_procfs.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_procfs.c
index 2edb7903d80e..9e453365bba8 100644
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_procfs.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_procfs.c
@@ -431,7 +431,7 @@ static const struct proc_ops mdbg_snap_shoot_seq_fops = {
static int mdbg_proc_open(struct inode *inode, struct file *filp)
{
struct mdbg_proc_entry *entry =
- (struct mdbg_proc_entry *)PDE_DATA(inode);
+ (struct mdbg_proc_entry *)pde_data(inode);
filp->private_data = entry;
return 0;
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_download.c b/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_download.c
index 8f228d403909..750bfc0466cb 100644
--- a/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_download.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_download.c
@@ -82,7 +82,7 @@ static int wcn_usb_dopen(struct inode *inode, struct file *file)
{
struct wcn_usb_ddata *data;
- data = (struct wcn_usb_ddata *)PDE_DATA(inode);
+ data = (struct wcn_usb_ddata *)pde_data(inode);
if (!data)
return -EIO;
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_test.c b/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_test.c
index c2cccc658c0d..e7a9f258943e 100644
--- a/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_test.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/usb/wcn_usb_test.c
@@ -61,7 +61,7 @@ static int wcn_usb_channel_open(struct inode *inode, struct file *file)
{
struct channel *channel;
- channel = (struct channel *)PDE_DATA(inode);
+ channel = (struct channel *)pde_data(inode);
if (!channel)
return -EIO;
@@ -467,7 +467,7 @@ static int wcn_usb_chnmg_open(struct inode *inode, struct file *file)
{
struct chnmg *chnmg;
/* get channel_list head */
- chnmg = (struct chnmg *)PDE_DATA(inode);
+ chnmg = (struct chnmg *)pde_data(inode);
file->private_data = chnmg;
return 0;
@@ -916,7 +916,7 @@ static int print_level_open(struct inode *inode, struct file *file)
{
struct chnmg *chnmg;
/* get channel_list head */
- chnmg = (struct chnmg *)PDE_DATA(inode);
+ chnmg = (struct chnmg *)pde_data(inode);
file->private_data = chnmg;
return 0;
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
index daef880ae3c0..2231388da70a 100644
--- a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
@@ -703,7 +703,7 @@ static int sprdwl_add_cipher_key(struct sprdwl_vif *vif, bool pairwise,
}
static int sprdwl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
- u8 key_index, bool pairwise,
+ int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr,
struct key_params *params)
{
@@ -725,7 +725,7 @@ static int sprdwl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
}
static int sprdwl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
- u8 key_index, bool pairwise,
+ int link_id, u8 key_index, bool pairwise,
const u8 *mac_addr)
{
struct sprdwl_vif *vif = netdev_priv(ndev);
@@ -755,7 +755,7 @@ static int sprdwl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
static int sprdwl_cfg80211_set_default_key(struct wiphy *wiphy,
struct net_device *ndev,
- u8 key_index, bool unicast,
+ int link_id, u8 key_index, bool unicast,
bool multicast)
{
struct sprdwl_vif *vif = netdev_priv(ndev);
@@ -984,7 +984,7 @@ static int sprdwl_cfg80211_change_beacon(struct wiphy *wiphy,
return sprdwl_change_beacon(vif, beacon);
}
-static int sprdwl_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
+static int sprdwl_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
{
#ifdef DFS_MASTER
struct sprdwl_vif *vif = netdev_priv(ndev);
@@ -2367,7 +2367,7 @@ void sprdwl_report_connection(struct sprdwl_vif *vif,
conn_info->status == SPRDWL_ROAM_SUCCESS){
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
struct cfg80211_roam_info roam_info = {
- .bss = bss,
+ .links[0].bss = bss,
.req_ie = conn_info->req_ie,
.req_ie_len = conn_info->req_ie_len,
.resp_ie = conn_info->resp_ie,
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c b/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c
index e81619b12e39..1ecbfac5b490 100644
--- a/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cmdevt.c
@@ -3296,7 +3296,7 @@ void sprdwl_event_chan_changed(struct sprdwl_vif *vif, u8 *data, u16 len)
NL80211_CHAN_HT20);
else
wl_err("%s, ch is null!\n", __func__);
- cfg80211_ch_switch_notify(vif->ndev, &chandef);
+ cfg80211_ch_switch_notify(vif->ndev, &chandef, 0);
}
}
--
2.34.1

View File

@ -0,0 +1,35 @@
From 9211a92d07e9a43fce104f87f9d45e890257b699 Mon Sep 17 00:00:00 2001
From: pbiel <pbiel7@gmail.com>
Date: Tue, 7 Mar 2023 20:28:44 +0100
Subject: [PATCH] wireless: fix setting mac address for netdev in uwe5622
unisocwifi driver
---
drivers/net/wireless/uwe5622/unisocwifi/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/main.c b/drivers/net/wireless/uwe5622/unisocwifi/main.c
index 21efdf4e0..566a9a7f3 100644
--- a/drivers/net/wireless/uwe5622/unisocwifi/main.c
+++ b/drivers/net/wireless/uwe5622/unisocwifi/main.c
@@ -1356,6 +1356,7 @@ static struct sprdwl_vif *sprdwl_register_netdev(struct sprdwl_priv *priv,
struct wireless_dev *wdev;
struct sprdwl_vif *vif;
int ret;
+ u8 target_mac_addr[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0))
ndev = alloc_netdev(sizeof(*vif), name, NET_NAME_UNKNOWN, ether_setup);
@@ -1411,7 +1412,8 @@ static struct sprdwl_vif *sprdwl_register_netdev(struct sprdwl_priv *priv,
ndev->features |= NETIF_F_SG;
SET_NETDEV_DEV(ndev, wiphy_dev(priv->wiphy));
- sprdwl_set_mac_addr(vif, addr, ndev->dev_addr);
+ sprdwl_set_mac_addr(vif, addr, target_mac_addr);
+ dev_addr_set(ndev, target_mac_addr);
#ifdef CONFIG_P2P_INTF
if (type == NL80211_IFTYPE_P2P_DEVICE)
--
2.34.1

View File

@ -0,0 +1,60 @@
From 452a691a83df1aab77cec33203cb04a817817a05 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Thu, 5 May 2022 22:55:13 +0300
Subject: [PATCH] drv: nvmem: sunxi_sid: Add sunxi_get_soc_chipid,
sunxi_get_serial
---
drivers/nvmem/sunxi_sid.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index 37a6abb0e..c81fac63d 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -37,6 +37,25 @@ struct sunxi_sid {
u32 value_offset;
};
+static unsigned int sunxi_soc_chipid[4];
+static unsigned int sunxi_serial[4];
+
+int sunxi_get_soc_chipid(unsigned char *chipid)
+{
+ memcpy(chipid, sunxi_soc_chipid, 16);
+
+ return 0;
+}
+EXPORT_SYMBOL(sunxi_get_soc_chipid);
+
+int sunxi_get_serial(unsigned char *serial)
+{
+ memcpy(serial, sunxi_serial, 16);
+
+ return 0;
+}
+EXPORT_SYMBOL(sunxi_get_serial);
+
static int sunxi_sid_read(void *context, unsigned int offset,
void *val, size_t bytes)
{
@@ -167,6 +186,15 @@ static int sunxi_sid_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, nvmem);
+ nvmem_cfg->reg_read(sid, 0, &sunxi_soc_chipid[0], sizeof(int));
+ nvmem_cfg->reg_read(sid, 4, &sunxi_soc_chipid[1], sizeof(int));
+ nvmem_cfg->reg_read(sid, 8, &sunxi_soc_chipid[2], sizeof(int));
+ nvmem_cfg->reg_read(sid, 12, &sunxi_soc_chipid[3], sizeof(int));
+
+ sunxi_serial[0] = sunxi_soc_chipid[3];
+ sunxi_serial[1] = sunxi_soc_chipid[2];
+ sunxi_serial[2] = (sunxi_soc_chipid[1] >> 16) & 0x0ffff;
+
return 0;
}
--
2.35.3

View File

@ -0,0 +1,612 @@
From 418436514e2e64e07e7fd2ef9d77ec4712d1033b Mon Sep 17 00:00:00 2001
From: pbiel <pbiel7@gmail.com>
Date: Fri, 24 Feb 2023 10:38:03 +0100
Subject: [PATCH 2/2] Add sunxi addr driver
---
drivers/misc/Kconfig | 1 +
drivers/misc/Makefile | 1 +
drivers/misc/sunxi-addr/Kconfig | 6 +
drivers/misc/sunxi-addr/Makefile | 5 +
drivers/misc/sunxi-addr/sha256.c | 178 +++++++++++++
drivers/misc/sunxi-addr/sunxi-addr.c | 358 +++++++++++++++++++++++++++
6 files changed, 549 insertions(+)
create mode 100644 drivers/misc/sunxi-addr/Kconfig
create mode 100644 drivers/misc/sunxi-addr/Makefile
create mode 100644 drivers/misc/sunxi-addr/sha256.c
create mode 100644 drivers/misc/sunxi-addr/sunxi-addr.c
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 358ad56f6..c59480dc8 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -514,4 +514,5 @@ source "drivers/misc/habanalabs/Kconfig"
source "drivers/misc/uacce/Kconfig"
source "drivers/misc/pvpanic/Kconfig"
source "drivers/misc/mchp_pci1xxxx/Kconfig"
+source "drivers/misc/sunxi-addr/Kconfig"
endmenu
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index ac9b3e757..487a2bf2d 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -62,3 +62,4 @@ obj-$(CONFIG_HI6421V600_IRQ) += hi6421v600-irq.o
obj-$(CONFIG_OPEN_DICE) += open-dice.o
obj-$(CONFIG_GP_PCI1XXXX) += mchp_pci1xxxx/
obj-$(CONFIG_VCPU_STALL_DETECTOR) += vcpu_stall_detector.o
+obj-$(CONFIG_SUNXI_ADDR_MGT) += sunxi-addr/
\ No newline at end of file
diff --git a/drivers/misc/sunxi-addr/Kconfig b/drivers/misc/sunxi-addr/Kconfig
new file mode 100644
index 000000000..801dd2c02
--- /dev/null
+++ b/drivers/misc/sunxi-addr/Kconfig
@@ -0,0 +1,6 @@
+config SUNXI_ADDR_MGT
+ tristate "Allwinner Network MAC Addess Manager"
+ depends on BT || ETHERNET || WLAN
+ depends on NVMEM_SUNXI_SID
+ help
+ allwinner network mac address management
diff --git a/drivers/misc/sunxi-addr/Makefile b/drivers/misc/sunxi-addr/Makefile
new file mode 100644
index 000000000..f01fd4783
--- /dev/null
+++ b/drivers/misc/sunxi-addr/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for wifi mac addr manager drivers
+#
+sunxi_addr-objs := sunxi-addr.o sha256.o
+obj-$(CONFIG_SUNXI_ADDR_MGT) += sunxi_addr.o
diff --git a/drivers/misc/sunxi-addr/sha256.c b/drivers/misc/sunxi-addr/sha256.c
new file mode 100644
index 000000000..78825810c
--- /dev/null
+++ b/drivers/misc/sunxi-addr/sha256.c
@@ -0,0 +1,178 @@
+/*
+ * Local implement of sha256.
+ *
+ * Copyright (C) 2013 Allwinner.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#include <linux/kernel.h>
+#include <linux/string.h>
+
+/****************************** MACROS ******************************/
+#define ROTRIGHT(a, b) (((a) >> (b)) | ((a) << (32 - (b))))
+#define CH(x, y, z) (((x) & (y)) ^ (~(x) & (z)))
+#define MAJ(x, y, z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
+#define EP0(x) (ROTRIGHT(x, 2) ^ ROTRIGHT(x, 13) ^ ROTRIGHT(x, 22))
+#define EP1(x) (ROTRIGHT(x, 6) ^ ROTRIGHT(x, 11) ^ ROTRIGHT(x, 25))
+#define SIG0(x) (ROTRIGHT(x, 7) ^ ROTRIGHT(x, 18) ^ ((x) >> 3))
+#define SIG1(x) (ROTRIGHT(x, 17) ^ ROTRIGHT(x, 19) ^ ((x) >> 10))
+
+/**************************** VARIABLES *****************************/
+static const uint32_t k[64] = {
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+ 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+ 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+ 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+ 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+ 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+ 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+ 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+ 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+ 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+ 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+};
+
+struct sha256_ctx {
+ uint8_t data[64]; /* current 512-bit chunk of message data, just like a buffer */
+ uint32_t datalen; /* sign the data length of current chunk */
+ uint64_t bitlen; /* the bit length of the total message */
+ uint32_t state[8]; /* store the middle state of hash abstract */
+};
+
+/*********************** FUNCTION DEFINITIONS ***********************/
+static void sha256_transform(struct sha256_ctx *ctx, const uint8_t *data)
+{
+ uint32_t a, b, c, d, e, f, g, h, i, j, t1, t2, m[64];
+
+ /* initialization */
+ for (i = 0, j = 0; i < 16; ++i, j += 4)
+ m[i] = (data[j] << 24) | (data[j + 1] << 16) |
+ (data[j + 2] << 8) | (data[j + 3]);
+ for ( ; i < 64; ++i)
+ m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16];
+
+ a = ctx->state[0];
+ b = ctx->state[1];
+ c = ctx->state[2];
+ d = ctx->state[3];
+ e = ctx->state[4];
+ f = ctx->state[5];
+ g = ctx->state[6];
+ h = ctx->state[7];
+
+ for (i = 0; i < 64; ++i) {
+ t1 = h + EP1(e) + CH(e, f, g) + k[i] + m[i];
+ t2 = EP0(a) + MAJ(a, b, c);
+ h = g;
+ g = f;
+ f = e;
+ e = d + t1;
+ d = c;
+ c = b;
+ b = a;
+ a = t1 + t2;
+ }
+
+ ctx->state[0] += a;
+ ctx->state[1] += b;
+ ctx->state[2] += c;
+ ctx->state[3] += d;
+ ctx->state[4] += e;
+ ctx->state[5] += f;
+ ctx->state[6] += g;
+ ctx->state[7] += h;
+}
+
+static void sha256_init(struct sha256_ctx *ctx)
+{
+ ctx->datalen = 0;
+ ctx->bitlen = 0;
+ ctx->state[0] = 0x6a09e667;
+ ctx->state[1] = 0xbb67ae85;
+ ctx->state[2] = 0x3c6ef372;
+ ctx->state[3] = 0xa54ff53a;
+ ctx->state[4] = 0x510e527f;
+ ctx->state[5] = 0x9b05688c;
+ ctx->state[6] = 0x1f83d9ab;
+ ctx->state[7] = 0x5be0cd19;
+}
+
+static void sha256_update(struct sha256_ctx *ctx, const uint8_t *data, size_t len)
+{
+ uint32_t i;
+
+ for (i = 0; i < len; ++i) {
+ ctx->data[ctx->datalen] = data[i];
+ ctx->datalen++;
+ if (ctx->datalen == 64) {
+ /* 64 byte = 512 bit means the buffer ctx->data has
+ * fully stored one chunk of message,
+ * so do the sha256 hash map for the current chunk.
+ */
+ sha256_transform(ctx, ctx->data);
+ ctx->bitlen += 512;
+ ctx->datalen = 0;
+ }
+ }
+}
+
+static void sha256_final(struct sha256_ctx *ctx, uint8_t *hash)
+{
+ uint32_t i;
+
+ i = ctx->datalen;
+
+ /* Pad whatever data is left in the buffer. */
+ if (ctx->datalen < 56) {
+ ctx->data[i++] = 0x80; /* pad 10000000 = 0x80 */
+ while (i < 56)
+ ctx->data[i++] = 0x00;
+ } else {
+ ctx->data[i++] = 0x80;
+ while (i < 64)
+ ctx->data[i++] = 0x00;
+ sha256_transform(ctx, ctx->data);
+ memset(ctx->data, 0, 56);
+ }
+
+ /* Append to the padding the total message's length in bits and transform. */
+ ctx->bitlen += ctx->datalen * 8;
+ ctx->data[63] = ctx->bitlen;
+ ctx->data[62] = ctx->bitlen >> 8;
+ ctx->data[61] = ctx->bitlen >> 16;
+ ctx->data[60] = ctx->bitlen >> 24;
+ ctx->data[59] = ctx->bitlen >> 32;
+ ctx->data[58] = ctx->bitlen >> 40;
+ ctx->data[57] = ctx->bitlen >> 48;
+ ctx->data[56] = ctx->bitlen >> 56;
+ sha256_transform(ctx, ctx->data);
+
+ /* copying the final state to the output hash(use big endian). */
+ for (i = 0; i < 4; ++i) {
+ hash[i] = (ctx->state[0] >> (24 - i * 8)) & 0x000000ff;
+ hash[i + 4] = (ctx->state[1] >> (24 - i * 8)) & 0x000000ff;
+ hash[i + 8] = (ctx->state[2] >> (24 - i * 8)) & 0x000000ff;
+ hash[i + 12] = (ctx->state[3] >> (24 - i * 8)) & 0x000000ff;
+ hash[i + 16] = (ctx->state[4] >> (24 - i * 8)) & 0x000000ff;
+ hash[i + 20] = (ctx->state[5] >> (24 - i * 8)) & 0x000000ff;
+ hash[i + 24] = (ctx->state[6] >> (24 - i * 8)) & 0x000000ff;
+ hash[i + 28] = (ctx->state[7] >> (24 - i * 8)) & 0x000000ff;
+ }
+}
+
+int hmac_sha256(const uint8_t *plaintext, ssize_t psize, uint8_t *output)
+{
+ struct sha256_ctx ctx;
+
+ sha256_init(&ctx);
+ sha256_update(&ctx, plaintext, psize);
+ sha256_final(&ctx, output);
+ return 0;
+}
diff --git a/drivers/misc/sunxi-addr/sunxi-addr.c b/drivers/misc/sunxi-addr/sunxi-addr.c
new file mode 100644
index 000000000..a812e4e82
--- /dev/null
+++ b/drivers/misc/sunxi-addr/sunxi-addr.c
@@ -0,0 +1,358 @@
+/*
+ * The driver of SUNXI NET MAC ADDR Manager.
+ *
+ * Copyright (C) 2013 Allwinner.
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#define DEBUG
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/miscdevice.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+
+#define ADDR_MGT_DBG(fmt, arg...) printk(KERN_DEBUG "[ADDR_MGT] %s: " fmt "\n",\
+ __func__, ## arg)
+#define ADDR_MGT_ERR(fmt, arg...) printk(KERN_ERR "[ADDR_MGT] %s: " fmt "\n",\
+ __func__, ## arg)
+
+#define MODULE_CUR_VERSION "v1.0.9"
+
+#define MATCH_STR_LEN 20
+#define ADDR_VAL_LEN 6
+#define ADDR_STR_LEN 18
+#define ID_LEN 16
+#define HASH_LEN 32
+
+#define TYPE_ANY 0
+#define TYPE_BURN 1
+#define TYPE_IDGEN 2
+#define TYPE_USER 3
+#define TYPE_RAND 4
+
+#define ADDR_FMT_STR 0
+#define ADDR_FMT_VAL 1
+
+#define IS_TYPE_INVALID(x) ((x < TYPE_ANY) || (x > TYPE_RAND))
+
+#define ADDR_CLASS_ATTR_ADD(name) \
+static ssize_t addr_##name##_show(struct class *class, \
+ struct class_attribute *attr, char *buffer) \
+{ \
+ char addr[ADDR_STR_LEN]; \
+ if (IS_TYPE_INVALID(get_addr_by_name(ADDR_FMT_STR, addr, #name))) \
+ return 0; \
+ return sprintf(buffer, "%.17s\n", addr); \
+} \
+static ssize_t addr_##name##_store(struct class *class, \
+ struct class_attribute *attr, \
+ const char *buffer, size_t count) \
+{ \
+ if (count != ADDR_STR_LEN) { \
+ ADDR_MGT_ERR("Length wrong."); \
+ return -EINVAL; \
+ } \
+ set_addr_by_name(TYPE_USER, ADDR_FMT_STR, buffer, #name); \
+ return count; \
+} \
+static CLASS_ATTR_RW(addr_##name);
+
+struct addr_mgt_info {
+ unsigned int type_def;
+ unsigned int type_cur;
+ unsigned int flag;
+ char *addr;
+ char *name;
+};
+
+static struct addr_mgt_info info[] = {
+ {TYPE_ANY, TYPE_ANY, 1, NULL, "wifi"},
+ {TYPE_ANY, TYPE_ANY, 0, NULL, "bt" },
+ {TYPE_ANY, TYPE_ANY, 1, NULL, "eth" },
+};
+
+extern int hmac_sha256(const uint8_t *plaintext, ssize_t psize, uint8_t *output);
+extern int sunxi_get_soc_chipid(unsigned char *chipid);
+
+static int addr_parse(int fmt, const char *addr, int check)
+{
+ char val_buf[ADDR_VAL_LEN];
+ char cmp_buf[ADDR_VAL_LEN];
+ int ret = ADDR_VAL_LEN;
+
+ if (fmt == ADDR_FMT_STR)
+ ret = sscanf(addr, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
+ &val_buf[0], &val_buf[1], &val_buf[2],
+ &val_buf[3], &val_buf[4], &val_buf[5]);
+ else
+ memcpy(val_buf, addr, ADDR_VAL_LEN);
+
+ if (ret != ADDR_VAL_LEN)
+ return -1;
+
+ if (check && (val_buf[0] & 0x3))
+ return -1;
+
+ memset(cmp_buf, 0x00, ADDR_VAL_LEN);
+ if (memcmp(val_buf, cmp_buf, ADDR_VAL_LEN) == 0)
+ return -1;
+
+ memset(cmp_buf, 0xFF, ADDR_VAL_LEN);
+ if (memcmp(val_buf, cmp_buf, ADDR_VAL_LEN) == 0)
+ return -1;
+
+ return 0;
+}
+
+static struct addr_mgt_info *addr_find_by_name(char *name)
+{
+ int i = 0;
+ for (i = 0; i < ARRAY_SIZE(info); i++) {
+ if (strcmp(info[i].name, name) == 0)
+ return &info[i];
+ }
+ return NULL;
+}
+
+static int get_addr_by_name(int fmt, char *addr, char *name)
+{
+ struct addr_mgt_info *t;
+
+ t = addr_find_by_name(name);
+ if (t == NULL) {
+ ADDR_MGT_ERR("can't find addr named: %s", name);
+ return -1;
+ }
+
+ if (IS_TYPE_INVALID(t->type_cur)) {
+ ADDR_MGT_ERR("addr type invalid");
+ return -1;
+ }
+
+ if (addr_parse(ADDR_FMT_VAL, t->addr, t->flag)) {
+ ADDR_MGT_ERR("addr parse fail(%s)", t->addr);
+ return -1;
+ }
+
+ if (fmt == ADDR_FMT_STR)
+ sprintf(addr, "%02X:%02X:%02X:%02X:%02X:%02X",
+ t->addr[0], t->addr[1], t->addr[2],
+ t->addr[3], t->addr[4], t->addr[5]);
+ else
+ memcpy(addr, t->addr, ADDR_VAL_LEN);
+
+ return t->type_cur;
+}
+
+static int set_addr_by_name(int type, int fmt, const char *addr, char *name)
+{
+ struct addr_mgt_info *t;
+
+ t = addr_find_by_name(name);
+ if (t == NULL) {
+ ADDR_MGT_ERR("can't find addr named: %s", name);
+ return -1;
+ }
+
+ if (addr_parse(fmt, addr, t->flag)) {
+ ADDR_MGT_ERR("addr parse fail(%s)", addr);
+ return -1;
+ }
+
+ t->type_cur = type;
+ if (fmt == ADDR_FMT_STR)
+ sscanf(addr, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
+ &t->addr[0], &t->addr[1], &t->addr[2],
+ &t->addr[3], &t->addr[4], &t->addr[5]);
+ else
+ memcpy(t->addr, addr, ADDR_VAL_LEN);
+
+ return 0;
+}
+
+int get_custom_mac_address(int fmt, char *name, char *addr)
+{
+ return get_addr_by_name(fmt, addr, name);
+}
+EXPORT_SYMBOL_GPL(get_custom_mac_address);
+
+static int addr_factory(struct device_node *np,
+ int idx, int type, char *mac, char *name)
+{
+ int ret, i;
+ char match[MATCH_STR_LEN];
+ const char *p;
+ char id[ID_LEN], hash[HASH_LEN], cmp_buf[ID_LEN];
+ struct timespec64 curtime;
+
+ switch (type) {
+ case TYPE_BURN:
+ sprintf(match, "addr_%s", name);
+ ret = of_property_read_string_index(np, match, 0, &p);
+ if (ret)
+ return -1;
+
+ ret = sscanf(p, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
+ &mac[0], &mac[1], &mac[2],
+ &mac[3], &mac[4], &mac[5]);
+
+ if (ret != ADDR_VAL_LEN)
+ return -1;
+ break;
+ case TYPE_IDGEN:
+ if (idx > HASH_LEN / ADDR_VAL_LEN - 1)
+ return -1;
+ if (sunxi_get_soc_chipid(id))
+ return -1;
+ memset(cmp_buf, 0x00, ID_LEN);
+ if (memcmp(id, cmp_buf, ID_LEN) == 0)
+ return -1;
+ if (hmac_sha256(id, ID_LEN, hash))
+ return -1;
+ memcpy(mac, &hash[idx * ADDR_VAL_LEN], ADDR_VAL_LEN);
+ break;
+ case TYPE_RAND:
+ for (i = 0; i < ADDR_VAL_LEN; i++) {
+ ktime_get_real_ts64(&curtime);
+ mac[i] = (char)curtime.tv_nsec;
+ }
+ break;
+ default:
+ ADDR_MGT_ERR("unsupport type: %d", type);
+ return -1;
+ }
+ return 0;
+}
+
+static int addr_init(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
+ int type, i, j;
+ char match[MATCH_STR_LEN];
+ char addr[ADDR_VAL_LEN];
+ int type_tab[] = {TYPE_BURN, TYPE_IDGEN, TYPE_RAND};
+
+ /* init addr type and value */
+ for (i = 0; i < ARRAY_SIZE(info); i++) {
+ sprintf(match, "type_addr_%s", info[i].name);
+ if (of_property_read_u32(np, match, &type)) {
+ ADDR_MGT_DBG("Failed to get type_def_%s, use default: %d",
+ info[i].name, info[i].type_def);
+ } else {
+ info[i].type_def = type;
+ info[i].type_cur = type;
+ }
+
+ if (IS_TYPE_INVALID(info[i].type_def))
+ return -1;
+ if (info[i].type_def != TYPE_ANY) {
+ if (addr_factory(np, i, info[i].type_def, addr, info[i].name))
+ return -1;
+ } else {
+ for (j = 0; j < ARRAY_SIZE(type_tab); j++) {
+ if (!addr_factory(np, i, type_tab[j], addr, info[i].name)) {
+ info[i].type_cur = type_tab[j];
+ break;
+ }
+ }
+ }
+
+ if (info[i].flag)
+ addr[0] &= 0xFC;
+
+ if (addr_parse(ADDR_FMT_VAL, addr, info[i].flag))
+ return -1;
+ else {
+ info[i].addr = devm_kzalloc(&pdev->dev, ADDR_VAL_LEN, GFP_KERNEL);
+ memcpy(info[i].addr, addr, ADDR_VAL_LEN);
+ }
+ }
+ return 0;
+}
+
+static ssize_t summary_show(struct class *class,
+ struct class_attribute *attr, char *buffer)
+{
+ int i = 0, ret = 0;
+
+ ret += sprintf(&buffer[ret], "name cfg cur address\n");
+ for (i = 0; i < ARRAY_SIZE(info); i++) {
+ ret += sprintf(&buffer[ret],
+ "%4s %d %d %02X:%02X:%02X:%02X:%02X:%02X\n",
+ info[i].name, info[i].type_def, info[i].type_cur,
+ info[i].addr[0], info[i].addr[1], info[i].addr[2],
+ info[i].addr[3], info[i].addr[4], info[i].addr[5]);
+ }
+ return ret;
+}
+static CLASS_ATTR_RO(summary);
+
+ADDR_CLASS_ATTR_ADD(wifi);
+ADDR_CLASS_ATTR_ADD(bt);
+ADDR_CLASS_ATTR_ADD(eth);
+
+static struct attribute *addr_class_attrs[] = {
+ &class_attr_summary.attr,
+ &class_attr_addr_wifi.attr,
+ &class_attr_addr_bt.attr,
+ &class_attr_addr_eth.attr,
+ NULL
+};
+ATTRIBUTE_GROUPS(addr_class);
+
+static struct class addr_class = {
+ .name = "addr_mgt",
+ .owner = THIS_MODULE,
+ .class_groups = addr_class_groups,
+};
+
+static const struct of_device_id addr_mgt_ids[] = {
+ { .compatible = "allwinner,sunxi-addr_mgt" },
+ { /* Sentinel */ }
+};
+
+static int addr_mgt_probe(struct platform_device *pdev)
+{
+ int status;
+
+ ADDR_MGT_DBG("module version: %s", MODULE_CUR_VERSION);
+ status = class_register(&addr_class);
+ if (status < 0) {
+ ADDR_MGT_ERR("class register error, status: %d.", status);
+ return -1;
+ }
+
+ if (addr_init(pdev)) {
+ ADDR_MGT_ERR("failed to init addr.");
+ class_unregister(&addr_class);
+ return -1;
+ }
+ ADDR_MGT_DBG("success.");
+ return 0;
+}
+
+static int addr_mgt_remove(struct platform_device *pdev)
+{
+ class_unregister(&addr_class);
+ return 0;
+}
+
+static struct platform_driver addr_mgt_driver = {
+ .probe = addr_mgt_probe,
+ .remove = addr_mgt_remove,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "sunxi-addr-mgt",
+ .of_match_table = addr_mgt_ids,
+ },
+};
+
+module_platform_driver_probe(addr_mgt_driver, addr_mgt_probe);
+
+MODULE_AUTHOR("Allwinnertech");
+MODULE_DESCRIPTION("Network MAC Addess Manager");
+MODULE_LICENSE("GPL");
--
2.34.1

View File

@ -0,0 +1,32 @@
From 706dc6ed092e4a1b9d84893cb4186fbd354bb1c8 Mon Sep 17 00:00:00 2001
From: pbiel <pbiel7@gmail.com>
Date: Thu, 26 Jan 2023 09:51:22 +0100
Subject: [PATCH] Add addr_mgt device tree node
---
arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index d0b95d43a..15f45a3f9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -591,5 +591,15 @@ sunxi-info {
compatible = "allwinner,sun50i-h616-sys-info";
status = "okay";
};
+
+ addr_mgt {
+ compatible = "allwinner,sunxi-addr_mgt";
+ type_addr_wifi = <0x00>;
+ type_addr_bt = <0x00>;
+ type_addr_eth = <0x00>;
+ status = "okay";
+ linux,phandle = <0x179>;
+ phandle = <0x179>;
+ };
};
};
--
2.34.1

View File

@ -0,0 +1,70 @@
From 899da8366afd97b1ca59b632036dc313777026da Mon Sep 17 00:00:00 2001
From: pbiel <pbiel7@gmail.com>
Date: Fri, 24 Feb 2023 22:14:58 +0100
Subject: [PATCH] Add wifi power regulator
---
.../allwinner/sun50i-h616-orangepi-zero2.dts | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
index 02893f3ac..88234a139 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -49,6 +49,53 @@ reg_vcc5v: vcc5v {
regulator-max-microvolt = <5000000>;
regulator-always-on;
};
+
+ reg_vcc33_wifi: vcc33-wifi {
+ /* Always on 3.3V regulator for WiFi and BT */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc33-wifi";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ vin-supply = <&reg_vcc5v>;
+ };
+
+ reg_vcc_wifi_io: vcc-wifi-io {
+ /* Always on 1.8V/300mA regulator for WiFi and BT IO */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-wifi-io";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ vin-supply = <&reg_vcc33_wifi>;
+ };
+
+ wifi_pwrseq: wifi-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&rtc 1>;
+ clock-names = "osc32k-out";
+ reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
+ post-power-on-delay-ms = <200>;
+ };
+};
+
+&mmc1 {
+ vmmc-supply = <&reg_vcc33_wifi>;
+ vqmmc-supply = <&reg_vcc_wifi_io>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ mmc-ddr-1_8v;
+ status = "okay";
+ uwe-bsp {
+ compatible = "unisoc,uwe_bsp";
+ keep-power-on;
+ data-irq;
+ //adma-tx;
+ adma-rx;
+ //blksz-512;
+ status = "okay";
+ };
};
&emac0 {
--
2.34.1

View File

@ -0,0 +1,184 @@
From ab35c98369d50766eb20920a93a2dca927935481 Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Fri, 19 May 2023 23:01:14 +0200
Subject: [PATCH] Add usb support to h616. This is not needed from kernel 6.2
Signed-off-by: OpenEmbedded <oe.patch@oe>
---
.../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 ++++++++++++++++++
1 file changed, 160 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index 04cdec7e2..a1d872e74 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -504,6 +504,166 @@ mdio0: mdio {
};
};
+ usbotg: usb@5100000 {
+ compatible = "allwinner,sun50i-h616-musb",
+ "allwinner,sun8i-h3-musb";
+ reg = <0x05100000 0x0400>;
+ clocks = <&ccu CLK_BUS_OTG>;
+ resets = <&ccu RST_BUS_OTG>;
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "mc";
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ extcon = <&usbphy 0>;
+ status = "disabled";
+ };
+
+ usbphy: phy@5100400 {
+ compatible = "allwinner,sun50i-h616-usb-phy";
+ reg = <0x05100400 0x24>,
+ <0x05101800 0x14>,
+ <0x05200800 0x14>,
+ <0x05310800 0x14>,
+ <0x05311800 0x14>;
+ reg-names = "phy_ctrl",
+ "pmu0",
+ "pmu1",
+ "pmu2",
+ "pmu3";
+ clocks = <&ccu CLK_USB_PHY0>,
+ <&ccu CLK_USB_PHY1>,
+ <&ccu CLK_USB_PHY2>,
+ <&ccu CLK_USB_PHY3>,
+ <&ccu CLK_BUS_EHCI2>;
+ clock-names = "usb0_phy",
+ "usb1_phy",
+ "usb2_phy",
+ "usb3_phy",
+ "pmu2_clk";
+ resets = <&ccu RST_USB_PHY0>,
+ <&ccu RST_USB_PHY1>,
+ <&ccu RST_USB_PHY2>,
+ <&ccu RST_USB_PHY3>;
+ reset-names = "usb0_reset",
+ "usb1_reset",
+ "usb2_reset",
+ "usb3_reset";
+ status = "disabled";
+ #phy-cells = <1>;
+ };
+
+ ehci0: usb@5101000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05101000 0x100>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI0>,
+ <&ccu CLK_BUS_EHCI0>,
+ <&ccu CLK_USB_OHCI0>;
+ resets = <&ccu RST_BUS_OHCI0>,
+ <&ccu RST_BUS_EHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci0: usb@5101400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05101400 0x100>;
+ interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI0>,
+ <&ccu CLK_USB_OHCI0>;
+ resets = <&ccu RST_BUS_OHCI0>;
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci1: usb@5200000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05200000 0x100>;
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI1>,
+ <&ccu CLK_BUS_EHCI1>,
+ <&ccu CLK_USB_OHCI1>;
+ resets = <&ccu RST_BUS_OHCI1>,
+ <&ccu RST_BUS_EHCI1>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci1: usb@5200400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05200400 0x100>;
+ interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI1>,
+ <&ccu CLK_USB_OHCI1>;
+ resets = <&ccu RST_BUS_OHCI1>;
+ phys = <&usbphy 1>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci2: usb@5310000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05310000 0x100>;
+ interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI2>,
+ <&ccu CLK_BUS_EHCI2>,
+ <&ccu CLK_USB_OHCI2>;
+ resets = <&ccu RST_BUS_OHCI2>,
+ <&ccu RST_BUS_EHCI2>;
+ phys = <&usbphy 2>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci2: usb@5310400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05310400 0x100>;
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI2>,
+ <&ccu CLK_USB_OHCI2>;
+ resets = <&ccu RST_BUS_OHCI2>;
+ phys = <&usbphy 2>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ehci3: usb@5311000 {
+ compatible = "allwinner,sun50i-h616-ehci",
+ "generic-ehci";
+ reg = <0x05311000 0x100>;
+ interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI3>,
+ <&ccu CLK_BUS_EHCI3>,
+ <&ccu CLK_USB_OHCI3>;
+ resets = <&ccu RST_BUS_OHCI3>,
+ <&ccu RST_BUS_EHCI3>;
+ phys = <&usbphy 3>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ ohci3: usb@5311400 {
+ compatible = "allwinner,sun50i-h616-ohci",
+ "generic-ohci";
+ reg = <0x05311400 0x100>;
+ interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_OHCI3>,
+ <&ccu CLK_USB_OHCI3>;
+ resets = <&ccu RST_BUS_OHCI3>;
+ phys = <&usbphy 3>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
rtc: rtc@7000000 {
compatible = "allwinner,sun50i-h616-rtc";
reg = <0x07000000 0x400>;
--
2.40.1

View File

@ -0,0 +1,84 @@
From 038441bbe0f6dab3e701061c514a8d776dbe6523 Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Sat, 20 May 2023 14:07:47 +0200
Subject: [PATCH] DTS orange pi zero2 enable usb
Signed-off-by: OpenEmbedded <oe.patch@oe>
---
.../allwinner/sun50i-h616-orangepi-zero2.dts | 42 +++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
index 88234a139..3b836296b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -50,6 +50,16 @@ reg_vcc5v: vcc5v {
regulator-always-on;
};
+ reg_usb1_vbus: regulator-usb1-vbus {
+ compatible = "regulator-fixed";
+ regulator-name = "usb1-vbus";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&reg_vcc5v>;
+ enable-active-high;
+ gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
+ };
+
reg_vcc33_wifi: vcc33-wifi {
/* Always on 3.3V regulator for WiFi and BT */
compatible = "regulator-fixed";
@@ -79,6 +89,12 @@ wifi_pwrseq: wifi-pwrseq {
};
};
+&ehci1 {
+ status = "okay";
+};
+
+/* USB 2 & 3 are on headers only. */
+
&mmc1 {
vmmc-supply = <&reg_vcc33_wifi>;
vqmmc-supply = <&reg_vcc_wifi_io>;
@@ -123,6 +139,11 @@ &mmc0 {
status = "okay";
};
+
+&ohci1 {
+ status = "okay";
+};
+
&r_rsb {
status = "okay";
@@ -258,3 +279,24 @@ &uart0 {
pinctrl-0 = <&uart0_ph_pins>;
status = "okay";
};
+
+&usbotg {
+ /*
+ * PHY0 pins are connected to a USB-C socket, but a role switch
+ * is not implemented: both CC pins are pulled to GND.
+ * The VBUS pins power the device, so a fixed peripheral mode
+ * is the best choice.
+ * The board can be powered via GPIOs, in this case port0 *can*
+ * act as a host (with a cable/adapter ignoring CC), as VBUS is
+ * then provided by the GPIOs. Any user of this setup would
+ * need to adjust the DT accordingly: dr_mode set to "host",
+ * enabling OHCI0 and EHCI0.
+ */
+ dr_mode = "peripheral";
+ status = "okay";
+};
+
+&usbphy {
+ usb1_vbus-supply = <&reg_usb1_vbus>;
+ status = "okay";
+};
--
2.40.1

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
SECTION = "kernel" SECTION = "kernel"
LICENSE = "GPLv2" LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i|sun50i)" COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i|sun50i)"
@ -7,6 +7,26 @@ inherit kernel
require linux.inc require linux.inc
LINUX_VERSION = "${PV}"
KERNEL_DTB_PREFIX = "0"
python() {
# return version in int form
def kernel_version():
ver = d.getVar('PV', True).split('.')
return int("".join(ver[0])),int("".join(ver[1]))
# kernel 6.5 have updated dts path add 'allwinner' prefix automatically
major, minor = kernel_version()
if major >= 6 and minor >= 5:
dt = d.getVar('KERNEL_DEVICETREE', True)
if not "allwinner" in dt:
dt = "allwinner/{0}".format(dt)
d.setVar('KERNEL_DEVICETREE', dt)
d.setVar('KERNEL_DTB_PREFIX', "1")
}
# Since we're not using git, this doesn't make a difference, but we need to fill # Since we're not using git, this doesn't make a difference, but we need to fill
# in something or kernel-yocto.bbclass will fail. # in something or kernel-yocto.bbclass will fail.
KBRANCH ?= "master" KBRANCH ?= "master"
@ -20,13 +40,34 @@ KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
S = "${WORKDIR}/linux-${PV}" S = "${WORKDIR}/linux-${PV}"
SRC_URI = "https://www.kernel.org/pub/linux/kernel/v5.x/linux-${PV}.tar.xz \ # get release version 5.x or 6.x based on version
file://0003-ARM-dts-nanopi-neo-air-Add-WiFi-eMMC.patch \ KRELEASE = "${@d.getVar('PV', True).split('.')[0]}"
file://0001-dts-orange-pi-zero-Add-wifi-support.patch \
SRC_URI = "https://www.kernel.org/pub/linux/kernel/v${KRELEASE}.x/linux-${PV}.tar.xz \
file://defconfig \ file://defconfig \
" "
SRC_URI_append_use-mailine-graphics = " file://drm.cfg" # append patches for kernels before 6.5 and after based on version
SRC_URI_append_bananapi = " file://axp20x.cfg" SRC_URI += "${@oe.utils.ifelse(d.getVar('KERNEL_DTB_PREFIX') == '1', d.getVar('SOURCES_K65'), d.getVar('SOURCES'))}"
FILES_${KERNEL_PACKAGE_NAME}-base_append = " ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo" SOURCES_K65 = " \
file://6.5/0001-dts-orangepi-zero-Add-wifi-support.patch \
file://6.5/0002-dts-nanopi-neo-air-Add-camera-support.patch \
file://6.5/0003-dts-allwinner-bananapi-m2-zero-Enforce-consistent-MM.patch \
file://6.5/0004-dts-allwinner-bananapi-m64-Consistent-nodes-for-mmc-devices.patch \
"
SOURCES = " \
file://0001-dts-orange-pi-zero-Add-wifi-support.patch \
file://0002-dts-nanopi-neo-air-add-camera.patch \
file://0003-dts-allwinner-bananapi-m2-zreo-Enforce-consistent-MM.patch \
file://0004-dts-allwinner-bananapi-m64-Consistent-nodes-for-mmc-devices.patch \
"
SRC_URI:append:use-mailine-graphics = " file://drm.cfg"
SRC_URI:append:bananapi = " file://axp20x.cfg"
SRC_URI:append:bananapi-m2-zero = " file://axp20x.cfg"
SRC_URI:append:cubietruck = " file://axp20x.cfg"
SRC_URI:append:nanopi-neo-air = " file://cam500b.cfg"
FILES_${KERNEL_PACKAGE_NAME}-base:append = " ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo"

View File

@ -0,0 +1,101 @@
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
index cd3df12b65..33a161692f 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
@@ -77,6 +77,39 @@
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
};
+
+ cam_xclk: cam-xclk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <24000000>;
+ clock-output-names = "cam-xclk";
+ };
+
+ reg_cam_avdd: cam-avdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-avdd";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+ reg_cam_dovdd: cam-dovdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dovdd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+ reg_cam_dvdd: cam-dvdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dvdd";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+
};
&mmc0 {
@@ -141,3 +174,55 @@
/* USB VBUS is always on */
status = "okay";
};
+
+&csi {
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Parallel bus endpoint */
+ csi_from_ov5640: endpoint {
+ remote-endpoint = <&ov5640_to_csi>;
+ bus-width = <8>;
+ data-shift = <2>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <0>; /* Active low */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ clocks = <&cam_xclk>;
+ clock-names = "xclk";
+
+ reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>;
+ powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>;
+ AVDD-supply = <&reg_cam_avdd>;
+ DOVDD-supply = <&reg_cam_dovdd>;
+ DVDD-supply = <&reg_cam_dvdd>;
+
+ port {
+ ov5640_to_csi: endpoint {
+ remote-endpoint = <&csi_from_ov5640>;
+ bus-width = <8>;
+ data-shift = <2>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <0>; /* Active low */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
+ };
+ };
+};
+&i2c2_pins {
+ bias-pull-up;
+};

View File

@ -1,80 +0,0 @@
From 4ca766a768e783ee5198f1935b7f46a5df9b4a35 Mon Sep 17 00:00:00 2001
From: Jelle van der Waa <jelle@vdwaa.nl>
Date: Tue, 23 Jan 2018 15:58:44 -0800
Subject: [PATCH] ARM: dts: nanopi-neo-air: Add WiFi / eMMC
Enable the WiFi (AP6212) chip and eMMC support for the NanoPi NEO Air.
This patch was originally submitted by Jelle van der Waa. Martin Kelly
modified it to compile on the latest kernel, fixed up some review
comments from Maxime Ripard, and re-tested the patch.
The patch has been reworked to add back eMMC support which has been left
out at the last backport.
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-sunxi@googlegroups.com
Cc: devicetree@vger.kernel.org
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Florin Sarbu <florin@resin.io>
---
arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts | 34 +++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
index 03ff6f8..a9331fe 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo-air.dts
@@ -72,6 +72,11 @@
gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
};
};
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+ };
};
&mmc0 {
@@ -84,6 +89,35 @@
status = "okay";
};
+&mmc1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins_a>;
+ vmmc-supply = <&reg_vcc3v3>;
+ vqmmc-supply = <&reg_vcc3v3>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+
+ brcmf: bcrmf@1 {
+ reg = <1>;
+ compatible = "brcm,bcm4329-fmac";
+ interrupt-parent = <&pio>;
+ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
+ interrupt-names = "host-wake";
+ };
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_8bit_pins>;
+ vmmc-supply = <&reg_vcc3v3>;
+ vqmmc-supply = <&reg_vcc3v3>;
+ bus-width = <8>;
+ non-removable;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins_a>;
--
2.11.0

View File

@ -0,0 +1,28 @@
From 9b4baa9b5aab0511c46a1ae95485e1a3ea984352 Mon Sep 17 00:00:00 2001
From: matteolel <matteolel91@hotmail.it>
Date: Fri, 9 Dec 2022 16:38:11 +0000
Subject: [PATCH] dts: allwinner: bananapi-m2-zreo: Enforce consistent MMC
numbering
Enforce MMC number (sometimes the order was wrong and the device does not boot).
---
arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
index 8e8634ff2..37a2ed937 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -20,6 +20,9 @@ / {
aliases {
serial0 = &uart0;
serial1 = &uart1;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
};
chosen {
--
2.25.1

View File

@ -0,0 +1,27 @@
From f487f62babb11d014da7a0b58a0fcdf6d217a812 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Thu, 11 May 2023 11:18:33 +0200
Subject: [PATCH] bananapi-m64: Consistent nodes for mmc devices
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index e6d5bc0f7..39a28aad8 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -16,6 +16,9 @@ aliases {
ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
};
chosen {
--
2.25.1

View File

@ -0,0 +1,100 @@
From a9bad790ae9a9e9befbe8e8938b6baca84ee5138 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Tue, 24 Oct 2023 10:40:52 +0200
Subject: [PATCH] dts: orangepi-zero: Add wifi support
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
.../allwinner/sun8i-h2-plus-orangepi-zero.dts | 46 +++++++++++++++----
1 file changed, 37 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts
index 3706216ff..ca94e313f 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts
@@ -80,13 +80,15 @@ status_led {
};
};
- reg_vcc_wifi: reg_vcc_wifi {
+ vdd_wifi: vdd_wifi {
compatible = "regulator-fixed";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc-wifi";
- enable-active-high;
+ regulator-name = "wifi";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
gpio = <&pio 0 20 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <70000>;
+ enable-active-high;
+
};
reg_vdd_cpux: vdd-cpux-regulator {
@@ -105,10 +107,12 @@ reg_vdd_cpux: vdd-cpux-regulator {
states = <1100000 0>, <1300000 1>;
};
- wifi_pwrseq: wifi_pwrseq {
+ pwrseq_wifi: pwrseq_wifi {
compatible = "mmc-pwrseq-simple";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_rst>;
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>;
- post-power-on-delay-ms = <200>;
+ post-power-on-delay-ms = <50>;
};
};
@@ -139,9 +143,11 @@ &mmc0 {
};
&mmc1 {
- vmmc-supply = <&reg_vcc_wifi>;
- mmc-pwrseq = <&wifi_pwrseq>;
+ vmmc-supply = <&reg_vcc3v3>;
+ vqmmc-supply = <&vdd_wifi>;
+ mmc-pwrseq = <&pwrseq_wifi>;
bus-width = <4>;
+ max-frequency = <16000000>;
non-removable;
status = "okay";
@@ -151,6 +157,13 @@ &mmc1 {
*/
xr819: sdio_wifi@1 {
reg = <1>;
+ compatible = "xradio,xr819";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wifi_wake>;
+ interrupt-parent = <&pio>;
+ interrupts = <6 10 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "host-wake";
+ local-mac-address = [dc 44 6d c0 ff ee];
};
};
@@ -207,3 +220,18 @@ &usbphy {
status = "okay";
usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
};
+
+&pio {
+ wifi_wake: wifi_wake {
+ pins = "PG10";
+ function = "gpio_in";
+ };
+};
+
+&r_pio {
+ wifi_rst: wifi_rst {
+ pins = "PL7";
+ function = "gpio_out";
+ };
+};
+
--
2.25.1

View File

@ -0,0 +1,113 @@
From e0d786f5465d2e2d977696cf0d02c70b78402291 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Tue, 24 Oct 2023 10:42:36 +0200
Subject: [PATCH] dts:nanopi-neo-air: Add camera support
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
.../dts/allwinner/sun8i-h3-nanopi-neo-air.dts | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts
index 9e1a33f94..7a05eff33 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-nanopi-neo-air.dts
@@ -77,6 +77,39 @@ wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
};
+
+ cam_xclk: cam-xclk {
+ #clock-cells = <0>;
+ compatible = "fixed-clock";
+ clock-frequency = <24000000>;
+ clock-output-names = "cam-xclk";
+ };
+
+ reg_cam_avdd: cam-avdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-avdd";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+ reg_cam_dovdd: cam-dovdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dovdd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+ reg_cam_dvdd: cam-dvdd {
+ compatible = "regulator-fixed";
+ regulator-name = "cam-dvdd";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ vin-supply = <&reg_vcc3v3>;
+ };
+
+
};
&mmc0 {
@@ -141,3 +174,55 @@ &usbphy {
/* USB VBUS is always on */
status = "okay";
};
+
+&csi {
+ status = "okay";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* Parallel bus endpoint */
+ csi_from_ov5640: endpoint {
+ remote-endpoint = <&ov5640_to_csi>;
+ bus-width = <8>;
+ data-shift = <2>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <0>; /* Active low */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
+ };
+};
+
+&i2c2 {
+ status = "okay";
+
+ ov5640: camera@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+ clocks = <&cam_xclk>;
+ clock-names = "xclk";
+
+ reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>;
+ powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>;
+ AVDD-supply = <&reg_cam_avdd>;
+ DOVDD-supply = <&reg_cam_dovdd>;
+ DVDD-supply = <&reg_cam_dvdd>;
+
+ port {
+ ov5640_to_csi: endpoint {
+ remote-endpoint = <&csi_from_ov5640>;
+ bus-width = <8>;
+ data-shift = <2>;
+ hsync-active = <1>; /* Active high */
+ vsync-active = <0>; /* Active low */
+ data-active = <1>; /* Active high */
+ pclk-sample = <1>; /* Rising */
+ };
+ };
+ };
+};
+&i2c2_pins {
+ bias-pull-up;
+};
--
2.25.1

View File

@ -0,0 +1,30 @@
From 7d7f32460702e99cab48909bb85ed84b67e65062 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Tue, 24 Oct 2023 10:43:55 +0200
Subject: [PATCH] dts: allwinner: bananapi-m2-zero: Enforce consistent MMC
numbering
Enforce MMC number (sometimes the order was wrong and the device does not boot).
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
index d729b7c70..410a79487 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
+++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-m2-zero.dts
@@ -20,6 +20,9 @@ / {
aliases {
serial0 = &uart0;
serial1 = &uart1;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
};
chosen {
--
2.25.1

View File

@ -0,0 +1,27 @@
From f487f62babb11d014da7a0b58a0fcdf6d217a812 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Thu, 11 May 2023 11:18:33 +0200
Subject: [PATCH] bananapi-m64: Consistent nodes for mmc devices
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index e6d5bc0f7..39a28aad8 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -16,6 +16,9 @@ aliases {
ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
};
chosen {
--
2.25.1

View File

@ -339,6 +339,7 @@ CONFIG_MFD_MAX77620=y
CONFIG_MFD_SPMI_PMIC=y CONFIG_MFD_SPMI_PMIC=y
CONFIG_MFD_RK808=y CONFIG_MFD_RK808=y
CONFIG_MFD_SEC_CORE=y CONFIG_MFD_SEC_CORE=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_AXP20X=y CONFIG_REGULATOR_AXP20X=y
CONFIG_REGULATOR_FAN53555=y CONFIG_REGULATOR_FAN53555=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_FIXED_VOLTAGE=y

View File

@ -0,0 +1,6 @@
CONFIG_MEDIA_PLATFORM_SUPPORT=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_OV5640=m
CONFIG_VIDEO_SUN6I_CSI=m
CONFIG_VIDEO_V4L2=m

View File

@ -2,6 +2,7 @@ CONFIG_DRM=y
CONFIG_DRM_SUN4I=y CONFIG_DRM_SUN4I=y
CONFIG_DRM_SUN8I_DW_HDMI=y CONFIG_DRM_SUN8I_DW_HDMI=y
CONFIG_DRM_SUN8I_MIXER=y CONFIG_DRM_SUN8I_MIXER=y
CONFIG_IOMMU_SUPPORT=y
CONFIG_DRM_LIMA=y CONFIG_DRM_LIMA=y
CONFIG_DRM_PANFROST=y CONFIG_DRM_PANFROST=y
CONFIG_CMA=y CONFIG_CMA=y

View File

@ -1,32 +0,0 @@
SECTION = "kernel"
DESCRIPTION = "Mainline Longterm Linux kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i|sun50i)"
inherit kernel
require linux.inc
# Since we're not using git, this doesn't make a difference, but we need to fill
# in something or kernel-yocto.bbclass will fail.
KBRANCH ?= "master"
# Pull in the devicetree files into the rootfs
RDEPENDS_${KERNEL_PACKAGE_NAME}-base += "kernel-devicetree"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
S = "${WORKDIR}/linux-${PV}"
SRC_URI[md5sum] = "dfb4db3d95bdcd8114281e32eb0be5cd"
SRC_URI[sha256sum] = "d8c5d7844214510e85ceb9f5236f27f63fc03535a143f3aaa0c1677a8f92e631"
SRC_URI = "https://www.kernel.org/pub/linux/kernel/v4.x/linux-${PV}.tar.xz \
file://0003-ARM-dts-nanopi-neo-air-Add-WiFi-eMMC.patch \
file://defconfig \
"
SRC_URI_append_orange-pi-zero += "\
file://0001-dts-orange-pi-zero-Add-wifi-support.patch \
"

View File

@ -0,0 +1,7 @@
require linux-mainline.inc
DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "a63c2bb1beb15f1aea9c63cf80559f5b7ab58afd2da2fa5e7670c515ebe1fe80"

View File

@ -1,6 +0,0 @@
require linux-mainline.inc
DESCRIPTION = "Mainline Longterm Linux kernel"
SRC_URI[md5sum] = "a3820e9aa56af51c0331b7f427e6f71b"
SRC_URI[sha256sum] = "21626132658dc34cb41b7aa7b80ecf83751890a71ac1a63d77aea9d488271a03"

View File

@ -1,6 +0,0 @@
require linux-mainline.inc
DESCRIPTION = "Mainline Stable Linux kernel"
SRC_URI[md5sum] = "3ea50025d8c679a327cf2fc225d81a46"
SRC_URI[sha256sum] = "2bef3edcf44c746383045f4a809b2013e18c52319c827875ed8e89138951cab2"

View File

@ -0,0 +1,23 @@
require linux-mainline.inc
DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "d60cf185693c386e7acd9f3eb3a94ae30ffbfee0a9447a20e83711e0bdf5922b"
SRC_URI:append:orange-pi-zero2 = " \
file://defconfig \
file://0001-drv-wireless-add-uwe5622-wifi-driver.patch \
file://0002-drv-wireless-driver-for-uwe5622-allwinner-bugfix.patch \
file://0003-drv-fix-incldue-path-for-unisocwcn.patch \
file://0004-drv-wireless-adapt-uwe5622-wifi-driver-to-kernel-6.1.patch \
file://0005-drv-fix-setting-mac-address-for-netdev-in-uwe5622.patch \
file://0006-drv-add-dump_reg-and-sunxi-sysinfo-drivers.patch \
file://0007-drv-add-sunxi_get_soc_chipid-and-sunxi_get_serial.patch \
file://0008-drv-add-sunxi-addr-driver.patch \
file://0009-dts-add-addr_mgt-device-tree-node.patch \
file://0010-dts-add-wifi-power-regulator.patch \
file://0011-dts-add-usb-to-h616.patch \
file://0012-dts-orange-pi-zero2.patch \
"

View File

@ -0,0 +1,8 @@
require linux-mainline.inc
DESCRIPTION = "Mainline Longterm Linux kernel"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
SRC_URI[sha256sum] = "2ee24af9282b80923b2da56b70aad7df2e8ee4e3f076452e05ba66be2059b519"

View File

@ -3,15 +3,15 @@ require linux.inc
DESCRIPTION = "Linux kernel for Allwinner a10/a20 processors" DESCRIPTION = "Linux kernel for Allwinner a10/a20 processors"
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i)" COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i)"
RDEPENDS_${PN} += "sunxi-board-fex" RDEPENDS:${PN} += "sunxi-board-fex"
PV = "3.4.104" PV = "3.4.104"
PR = "r1" PR = "r1"
SRCREV_pn-${PN} = "d47d367036be38c5180632ec8a3ad169a4593a88" SRCREV = "d47d367036be38c5180632ec8a3ad169a4593a88"
MACHINE_KERNEL_PR_append = "a" MACHINE_KERNEL_PR:append = "a"
SRC_URI += "git://github.com/linux-sunxi/linux-sunxi.git;branch=sunxi-3.4;protocol=git \ SRC_URI += "git://github.com/linux-sunxi/linux-sunxi.git;branch=sunxi-3.4;protocol=https \
file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \ file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \
file://0002-use-static-inline-in-ARM-ftrace.patch \ file://0002-use-static-inline-in-ARM-ftrace.patch \
file://0003-gcc5-fixes.patch \ file://0003-gcc5-fixes.patch \
@ -26,7 +26,7 @@ S = "${WORKDIR}/git"
#fix QA issue "Files/directories were installed but not shipped: /usr/src/debug" #fix QA issue "Files/directories were installed but not shipped: /usr/src/debug"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1" INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
do_configure_prepend() { do_configure:prepend() {
#fix arch QA issues ("Architecture did not match") #fix arch QA issues ("Architecture did not match")
rm -f ${S}/drivers/net/wireless/rtxx7x/tools/bin2h rm -f ${S}/drivers/net/wireless/rtxx7x/tools/bin2h
rm -f ${S}/modules/wifi/ar6302/AR6K_SDK_ISC.build_3.1_RC.329/host/lib/wac/wac rm -f ${S}/modules/wifi/ar6302/AR6K_SDK_ISC.build_3.1_RC.329/host/lib/wac/wac

View File

@ -39,7 +39,7 @@ do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}binutils:do_populate_sys
do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot" do_kernel_configme[depends] += "virtual/${TARGET_PREFIX}gcc:do_populate_sysroot"
do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot" do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot"
do_configure_prepend() { do_configure:prepend() {
CONF_SED_SCRIPT="" CONF_SED_SCRIPT=""
# #
@ -118,15 +118,9 @@ do_configure_prepend() {
yes '' | oe_runmake -C ${S} O=${B} oldconfig yes '' | oe_runmake -C ${S} O=${B} oldconfig
} }
do_configure_append() { do_configure:append() {
if test -e scripts/Makefile.fwinst ; then if test -e scripts/Makefile.fwinst ; then
sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst
fi fi
} }
do_install_append() {
oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
}
PACKAGES =+ "kernel-headers"
FILES_kernel-headers = "${exec_prefix}/src/linux*"

Binary file not shown.

View File

@ -0,0 +1,177 @@
[Section 1: Version]
Major = 2
Minor = 2
[Section 2: Board Config]
Calib_Bypass = 11758
TxChain_Mask = 2
RxChain_Mask = 2
[Section 3: Board Config TPC]
DPD_LUT_idx = 0x33,0x33,0x0,0x11,0x22,0x33,0x33,0x33
TPC_Goal_Chain0 = 0,0,0,0,0,0,0,0
TPC_Goal_Chain1 = 159,167,162,152,159,167,162,152
[Section 4: TPC-LUT]
Chain0_LUT_0 = 6,0,40,0
Chain0_LUT_1 = 6,1,24,0
Chain0_LUT_2 = 6,2,8,0
Chain0_LUT_3 = 10,2,0,0
Chain0_LUT_4 = 14,2,0,0
Chain0_LUT_5 = 18,2,0,0
Chain0_LUT_6 = 22,2,0,0
Chain0_LUT_7 = 26,2,0,0
Chain1_LUT_0 = 6,0,40,0
Chain1_LUT_1 = 6,1,24,0
Chain1_LUT_2 = 6,2,8,0
Chain1_LUT_3 = 10,2,0,0
Chain1_LUT_4 = 14,2,0,0
Chain1_LUT_5 = 18,2,0,0
Chain1_LUT_6 = 22,2,0,0
Chain1_LUT_7 = 26,2,0,0
[Section 5: Board Config Frequency Compensation]
2G_Channel_Chain0 = 6,6,6,6,7,7,7,7,7,7,7,7,7,7
2G_Channel_Chain1 = 6,6,6,6,7,7,7,7,7,7,7,7,7,7
5G_Channel_Chain0 = 11,11,11,11,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,9,9,9,9,9
5G_Channel_Chain1 = 11,11,11,11,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,9,9,9,9,9
[Section 6: Rate To Power with BW 20M]
11b_Power = 20,20,20,20
11ag_Power = 28,32,36,44,28,32,36,48
11n_Power = 34,38,38,40,40,44,44,48,32,36,36,40,40,44,44,54,48
11ac_Power = 32,36,36,40,40,44,44,48,50,66,32,36,36,40,40,44,44,48,50,66
[Section 7: Power Backoff]
Green_WIFI_offset = 0
HT40_Power_offset = 0
VHT40_Power_offset = 0
VHT80_Power_offset = 0
SAR_Power_offset = 0
Mean_Power_offset = 36
[Section 8: Reg Domain]
reg_domain1 = 0x00000001
reg_domain2 = 0x00000002
[Section 9: Band Edge Power offset (MKK, FCC, ETSI)]
BW20M = 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41
BW40M = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21
BW80M = 6,5,4,3,2,1
[Section 10: TX Scale]
Chain0_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
Chain1_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
Chain0_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17
Chain1_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17
Chain0_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18
Chain1_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18
Chain0_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19
Chain1_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19
Chain0_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20
Chain1_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20
Chain0_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21
Chain1_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21
Chain0_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22
Chain1_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22
Chain0_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23
Chain1_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23
Chain0_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24
Chain1_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24
Chain0_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25
Chain1_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25
Chain0_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26
Chain1_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26
Chain0_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27
Chain1_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27
Chain0_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28
Chain1_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28
Chain0_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29
Chain1_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29
Chain0_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30
Chain1_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30
Chain0_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31
Chain1_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31
Chain0_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32
Chain1_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32
Chain0_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33
Chain1_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33
Chain0_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34
Chain1_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34
Chain0_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35
Chain1_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35
Chain0_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36
Chain1_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36
Chain0_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37
Chain1_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37
Chain0_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38
Chain1_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38
Chain0_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39
Chain1_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39
Chain0_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40
Chain1_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40
Chain0_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41
Chain1_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41
Chain0_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42
Chain1_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42
Chain0_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43
Chain1_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43
Chain0_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44
Chain1_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44
Chain0_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45
Chain1_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45
Chain0_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46
Chain1_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46
Chain0_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47
Chain1_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47
Chain0_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48
Chain1_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48
Chain0_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49
Chain1_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49
Chain0_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50
Chain1_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50
Chain0_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51
Chain1_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51
Chain0_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52
Chain1_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52
Chain0_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53
Chain1_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53
Chain0_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54
Chain1_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54
[Section 11: misc]
DFS_switch = 1
power_save_switch = 2
ex-Fem_and_ex-LNA_param_setup = 3
rssi_report_diff = 4
[Section 12: debug reg]
address = 0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0x10,0x11,0x12,0x13,0x14,0x15,0x16
value = 0x16,0x17,0x18,0x19,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x30,0x31
[Section 13: coex_config]
bt_performance_cfg0 = 0x01010101
bt_performance_cfg1 = 0x01000000
wifi_performance_cfg0 = 0x01050A01
wifi_performance_cfg2 = 0x00000000
strategy_cfg0 = 0x01010100
strategy_cfg1 = 0x03000000
strategy_cfg2 = 0x08020000
compatibility_cfg0 = 0x04040000
compatibility_cfg1 = 0x0
ant_cfg0 = 0x0
ant_cfg1 = 0x0
isolation_cfg0 = 0x0505
isolation_cfg1 = 0x0
reserved_cfg0 = 0x0
reserved_cfg1 = 0x0
reserved_cfg2 = 0x0
reserved_cfg3 = 0x0
reserved_cfg4 = 0x0
reserved_cfg5 = 0x0
reserved_cfg6 = 0x0
reserved_cfg7 = 0x0
[Section 14: rf_tlv_config]
rf_config = 0xAA,0x55,0x00,0xFF,0x8,0xA,0x0,0x5,0x0,0x0,0x0,0x0,0x0,0x0

View File

@ -0,0 +1,22 @@
DESCRIPTION = "UWE5622 Wifi firmware"
LICENSE = "CC0-1.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=0ceb3372c9595f0a8067e55da801e4a1"
S = "${WORKDIR}"
COMPATIBLE_MACHINE = "orange-pi-zero2"
SRC_URI:append = " \
file://wcnmodem.bin \
file://wifi_2355b001_1ant.ini \
"
do_install() {
install -d ${D}${base_libdir}/firmware
install -m 0644 ${S}/wcnmodem.bin ${D}${base_libdir}/firmware/wcnmodem.bin
install -m 0644 ${S}/wifi_2355b001_1ant.ini ${D}${base_libdir}/firmware/wifi_2355b001_1ant.ini
}
FILES:${PN} = "${base_libdir}/*"
PACKAGES = "${PN}"

View File

@ -20,6 +20,6 @@ do_install() {
install -m 0644 ${S}/xr819/fw_xr819.bin ${D}${base_libdir}/firmware/xr819/ install -m 0644 ${S}/xr819/fw_xr819.bin ${D}${base_libdir}/firmware/xr819/
} }
FILES_${PN} = "${base_libdir}/*" FILES:${PN} = "${base_libdir}/*"
PACKAGES = "${PN}" PACKAGES = "${PN}"

View File

@ -1,5 +1,5 @@
SUMMARY = "Xradio WiFi driver for orangepi-zero" SUMMARY = "Xradio WiFi driver for orangepi-zero"
LICENSE = "GPLv2" LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a23a74b3f4caf9616230789d94217acb" LIC_FILES_CHKSUM = "file://LICENSE;md5=a23a74b3f4caf9616230789d94217acb"
inherit module inherit module
@ -7,15 +7,14 @@ inherit module
PV = "0.1" PV = "0.1"
PR = "r0" PR = "r0"
RDEPENDS_${PN} += "xradio-firmware" RDEPENDS:${PN} += "xradio-firmware"
COMPATIBLE_MACHINE = "orange-pi-zero" COMPATIBLE_MACHINE = "orange-pi-zero"
SRCREV = "279868ac96f6db34b65f68c6722830fa0aacb86b" SRCREV = "547521df27d1a80fb5542e93fa13bd09fb2259a2"
SRC_URI = "\ SRC_URI = "\
git://github.com/dbeinder/xradio.git;protocol=https;branch=karabek_rebase \ git://github.com/fifteenhex/xradio.git;protocol=http;branch=master \
file://0001-Enable-out-of-tree-compilation.patch \
" "
S = "${WORKDIR}/git" S = "${WORKDIR}/git"

View File

@ -1,30 +0,0 @@
From 15651d333da5429a1544f0a17d5f02c74f693ad7 Mon Sep 17 00:00:00 2001
From: Marek Belisko <marek.belisko@open-nandra.com>
Date: Thu, 15 Oct 2020 14:45:07 +0200
Subject: [PATCH] Enable out of tree compilation
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 7a0de9a..ee75f0b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-only
# # Standalone Makefile - uncomment for out-of-tree compilation
-# CONFIG_WLAN_VENDOR_XRADIO := m
-# ccflags-y += -DCONFIG_XRADIO_USE_EXTENSIONS
-# ccflags-y += -DCONFIG_XRADIO_WAPI_SUPPORT
+CONFIG_WLAN_VENDOR_XRADIO := m
+ccflags-y += -DCONFIG_XRADIO_USE_EXTENSIONS
+ccflags-y += -DCONFIG_XRADIO_WAPI_SUPPORT
# Kernel part
--
2.7.4

View File

@ -1,6 +1,6 @@
SUMMARY = "CedarX Hardware Encoding GStreamer plug-in" SUMMARY = "CedarX Hardware Encoding GStreamer plug-in"
SECTION = "multimedia" SECTION = "multimedia"
LICENSE = "GPLv2" LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
HOMEPAGE = "http://github.com/ebutera/gst-plugin-cedar" HOMEPAGE = "http://github.com/ebutera/gst-plugin-cedar"
DEPENDS = "gstreamer gst-plugins-base" DEPENDS = "gstreamer gst-plugins-base"
@ -10,14 +10,14 @@ inherit autotools pkgconfig
# 0.10.1 Initial Import # 0.10.1 Initial Import
SRCREV = "908987a74d341be1376895023698667892fe5569" SRCREV = "908987a74d341be1376895023698667892fe5569"
SRC_URI = "git://github.com/ebutera/gst-plugin-cedar.git" SRC_URI = "git://github.com/ebutera/gst-plugin-cedar.git;protocol=https;branch=master"
PV = "0.10.1+git${SRCPV}" PV = "0.10.1+git${SRCPV}"
PR = "r1" PR = "r1"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
FILES_${PN} += "${libdir}/gstreamer-0.10/*.so" FILES:${PN} += "${libdir}/gstreamer-0.10/*.so"
FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" FILES:${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.la" FILES:${PN}-dev += "${libdir}/gstreamer-0.10/*.la"
FILES_${PN}-staticdev += "${libdir}/gstreamer-0.10/*.a" FILES:${PN}-staticdev += "${libdir}/gstreamer-0.10/*.a"

View File

@ -1,13 +1,13 @@
DESCRIPTION = "Tools to help hacking Allwinner A10 and A20" DESCRIPTION = "Tools to help hacking Allwinner A10 and A20"
LICENSE = "GPLv2+" LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=97bd67b5d0309e452b637f76e1c9a23c" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=97bd67b5d0309e452b637f76e1c9a23c"
PR = "r0" PR = "r0"
DEPENDS += "libusb" DEPENDS += "libusb"
SRC_URI = "git://github.com/linux-sunxi/sunxi-tools;protocol=git" SRC_URI = "git://github.com/linux-sunxi/sunxi-tools;protocol=https;branch=master"
SRCREV = "9a3d62aa0c820b3dd42ba3409b2043f4143683cd" SRCREV = "9a3d62aa0c820b3dd42ba3409b2043f4143683cd"
inherit pkgconfig inherit pkgconfig
@ -16,7 +16,7 @@ S = "${WORKDIR}/git"
BBCLASSEXTEND = "native nativesdk" BBCLASSEXTEND = "native nativesdk"
FILES_${PN} = "${bindir}/*" FILES:${PN} = "${bindir}/*"
CFLAGS = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include" CFLAGS = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include"
CFLAGS_class-native = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include" CFLAGS_class-native = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include"

View File

@ -0,0 +1,18 @@
# short-description: Create SD card image with a boot partition
# long-description:
# Create an image that can be written onto a SD card using dd for use
# with Allwinner arm (32-bit) SoC family
#
# The disk layout used is:
# - --------------------------- -------------- --------------
# | | u-boot-sunxi-with-spl.bin | boot | rootfs |
# - --------------------------- -------------- --------------
# ^ ^ ^ ^ ^
# | | | | |
# 0 | 2MiB ${SUNXI_BOOT_SPACE}MiB ${SUNXI_BOOT_SPACE}MiB + rootfs + IMAGE_EXTRA_SPACE
# 8KiB
#
part u-boot --source rawcopy --sourceparams="file=${SPL_BINARY}" --ondisk mmcblk0 --no-table --align 8
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 2048 --fixed-size ${SUNXI_BOOT_SPACE}
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --align 2048