Message ID | 1511302072-9290-1-git-send-email-giulio.benetti@micronovasrl.com |
---|---|
State | Superseded |
Headers | show |
Series | [v5,1/1] sunxi-mali-driver-mainline: new package | expand |
On Tue, Nov 21, 2017 at 11:07:52PM +0100, Giulio Benetti wrote: > Added kernel allwinner mali driver package. > Used combined with userspace Allwinner openGL blob, > it gives possibility to use 3D openGL SoC acceleration. > > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> > --- > Changes v4 -> v5: > * prevent build twice > > DEVELOPERS | 3 +++ > package/Config.in | 1 + > package/sunxi-mali-driver-mainline/Config.in | 22 ++++++++++++++++++ > .../sunxi-mali-driver-mainline.mk | 26 ++++++++++++++++++++++ > 4 files changed, 52 insertions(+) > create mode 100644 package/sunxi-mali-driver-mainline/Config.in > create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index bb81a19..3fdb28b 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -695,6 +695,9 @@ F: package/ocrad/ > F: package/tesseract-ocr/ > F: package/webp/ > > +N: Giulio Benetti <giulio.benetti@micronovasrl.com> > +F: package/sunxi-mali-driver-mainline/ > + > N: Gregory Dymarek <gregd72002@gmail.com> > F: package/ding-libs/ > F: package/gengetopt/ > diff --git a/package/Config.in b/package/Config.in > index fe5ccc4..8de2227 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -496,6 +496,7 @@ endmenu > source "package/statserial/Config.in" > source "package/stm32flash/Config.in" > source "package/sunxi-cedarx/Config.in" > + source "package/sunxi-mali-driver-mainline/Config.in" > source "package/sunxi-mali/Config.in" > source "package/sysstat/Config.in" > source "package/targetcli-fb/Config.in" > diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in > new file mode 100644 > index 0000000..5b7b2ba > --- /dev/null > +++ b/package/sunxi-mali-driver-mainline/Config.in > @@ -0,0 +1,22 @@ > +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" > + depends on !BR2_LINUX_KERNEL > + > +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE > + bool "sunxi-mali-driver-mainline" > + depends on BR2_LINUX_KERNEL > + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra > + help > + This package builds and installs the Linux kernel driver for > + the Mali GPU on Allwinner platforms, compatible with recent > + Linux kernels (>= 4.4). Note that it should be installed > + together with the corresponding userspace binary blobs to > + provide complete OpenGL functionality. > + > + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the > + following options enabled: > + > + - CONFIG_CMA > + - CONFIG_DMA_CMA > + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more > + > + https://github.com/mripard/sunxi-mali/blob/master/README.md > diff --git a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk > new file mode 100644 > index 0000000..1692646 > --- /dev/null > +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk > @@ -0,0 +1,26 @@ > +################################################################################ > +# > +# sunxi-mali-driver-mainline > +# > +################################################################################ > + > +SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95 > +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) > +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux > + > +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ > + KDIR=$(LINUX_DIR) \ > + CROSS_COMPILE=$(TARGET_CROSS) \ > + INSTALL_MOD_PATH=$(TARGET_DIR) > + > +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS > + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ > + $(SHELL) ./build.sh -r r6p2 -a > +endef This doesn't build anything, this will just apply the patches, you should use -b. Maxime
Hi Maxime, Il 25/11/2017 16:50, Maxime Ripard ha scritto: > On Tue, Nov 21, 2017 at 11:07:52PM +0100, Giulio Benetti wrote: >> Added kernel allwinner mali driver package. >> Used combined with userspace Allwinner openGL blob, >> it gives possibility to use 3D openGL SoC acceleration. >> >> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> >> --- >> Changes v4 -> v5: >> * prevent build twice >> >> DEVELOPERS | 3 +++ >> package/Config.in | 1 + >> package/sunxi-mali-driver-mainline/Config.in | 22 ++++++++++++++++++ >> .../sunxi-mali-driver-mainline.mk | 26 ++++++++++++++++++++++ >> 4 files changed, 52 insertions(+) >> create mode 100644 package/sunxi-mali-driver-mainline/Config.in >> create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >> >> diff --git a/DEVELOPERS b/DEVELOPERS >> index bb81a19..3fdb28b 100644 >> --- a/DEVELOPERS >> +++ b/DEVELOPERS >> @@ -695,6 +695,9 @@ F: package/ocrad/ >> F: package/tesseract-ocr/ >> F: package/webp/ >> >> +N: Giulio Benetti <giulio.benetti@micronovasrl.com> >> +F: package/sunxi-mali-driver-mainline/ >> + >> N: Gregory Dymarek <gregd72002@gmail.com> >> F: package/ding-libs/ >> F: package/gengetopt/ >> diff --git a/package/Config.in b/package/Config.in >> index fe5ccc4..8de2227 100644 >> --- a/package/Config.in >> +++ b/package/Config.in >> @@ -496,6 +496,7 @@ endmenu >> source "package/statserial/Config.in" >> source "package/stm32flash/Config.in" >> source "package/sunxi-cedarx/Config.in" >> + source "package/sunxi-mali-driver-mainline/Config.in" >> source "package/sunxi-mali/Config.in" >> source "package/sysstat/Config.in" >> source "package/targetcli-fb/Config.in" >> diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in >> new file mode 100644 >> index 0000000..5b7b2ba >> --- /dev/null >> +++ b/package/sunxi-mali-driver-mainline/Config.in >> @@ -0,0 +1,22 @@ >> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" >> + depends on !BR2_LINUX_KERNEL >> + >> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE >> + bool "sunxi-mali-driver-mainline" >> + depends on BR2_LINUX_KERNEL >> + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra >> + help >> + This package builds and installs the Linux kernel driver for >> + the Mali GPU on Allwinner platforms, compatible with recent >> + Linux kernels (>= 4.4). Note that it should be installed >> + together with the corresponding userspace binary blobs to >> + provide complete OpenGL functionality. >> + >> + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the >> + following options enabled: >> + >> + - CONFIG_CMA >> + - CONFIG_DMA_CMA >> + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more >> + >> + https://github.com/mripard/sunxi-mali/blob/master/README.md >> diff --git a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >> new file mode 100644 >> index 0000000..1692646 >> --- /dev/null >> +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >> @@ -0,0 +1,26 @@ >> +################################################################################ >> +# >> +# sunxi-mali-driver-mainline >> +# >> +################################################################################ >> + >> +SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95 >> +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) >> +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux >> + >> +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ >> + KDIR=$(LINUX_DIR) \ >> + CROSS_COMPILE=$(TARGET_CROSS) \ >> + INSTALL_MOD_PATH=$(TARGET_DIR) >> + >> +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS >> + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ >> + $(SHELL) ./build.sh -r r6p2 -a >> +endef > > This doesn't build anything, this will just apply the patches, you > should use -b. You're right, I've tried it as a workaround to avoid compiling twice. But it's not here the problem. I've just sent you a PR on github: https://github.com/mripard/sunxi-mali/pull/6 This will fix the problem. On "[PATCH v4 1/1] sunxi-mali-driver-mainline: new package" I did it right: +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ + $(SHELL) ./build.sh -r r6p2 -b +endef + +define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ + $(SHELL) ./build.sh -r r6p2 -i +endef So v5 patch doesn't make sense if you accept my Pull Request on Github. How can I proceed? Do I submit v6 equal to v4 with changes respect v5? Thank you Regards > > Maxime >
Hi Giulio, On 21-11-17 23:07, Giulio Benetti wrote: > Added kernel allwinner mali driver package. > Used combined with userspace Allwinner openGL blob, > it gives possibility to use 3D openGL SoC acceleration. I should have asked before, but: where do those binaries come from? Are they from the mali-sunxi package? Or not yet packaged in Buildroot? [snip] > index fe5ccc4..8de2227 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -496,6 +496,7 @@ endmenu > source "package/statserial/Config.in" > source "package/stm32flash/Config.in" > source "package/sunxi-cedarx/Config.in" > + source "package/sunxi-mali-driver-mainline/Config.in" > source "package/sunxi-mali/Config.in" foo-bar sorts after foo, so swap these two lines. > source "package/sysstat/Config.in" > source "package/targetcli-fb/Config.in" > diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in > new file mode 100644 > index 0000000..5b7b2ba > --- /dev/null > +++ b/package/sunxi-mali-driver-mainline/Config.in > @@ -0,0 +1,22 @@ > +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" > + depends on !BR2_LINUX_KERNEL > + > +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE > + bool "sunxi-mali-driver-mainline" > + depends on BR2_LINUX_KERNEL > + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra > + help > + This package builds and installs the Linux kernel driver for > + the Mali GPU on Allwinner platforms, compatible with recent > + Linux kernels (>= 4.4). Note that it should be installed > + together with the corresponding userspace binary blobs to I guess with 'binary blobs' you mean the OpenGL libraries, which are only provided as binaries? 'binary blobs' to me sounds like something like firmware blobs: is put in your rootfs but doesn't run on the target processor. So I'd rephrase as: ... together with the corresponding userspace OpenGL libraries, which are provided as binaries only. And preferably also explain where you can get those. > + provide complete OpenGL functionality. > + > + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the > + following options enabled: > + > + - CONFIG_CMA > + - CONFIG_DMA_CMA > + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more > + > + https://github.com/mripard/sunxi-mali/blob/master/README.md > diff --git a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk > new file mode 100644 > index 0000000..1692646 > --- /dev/null > +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk > @@ -0,0 +1,26 @@ > +################################################################################ > +# > +# sunxi-mali-driver-mainline > +# > +################################################################################ > + > +SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95 > +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) > +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux > + > +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ > + KDIR=$(LINUX_DIR) \ > + CROSS_COMPILE=$(TARGET_CROSS) \ > + INSTALL_MOD_PATH=$(TARGET_DIR) > + > +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS > + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ > + $(SHELL) ./build.sh -r r6p2 -a Shouldn't the r6p2 be configurable? That can be done in a later patch, though. Regards, Arnout > +endef > + > +define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS > + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ > + $(SHELL) ./build.sh -r r6p2 -i > +endef > + > +$(eval $(generic-package)) >
Hi Arnout, Il 25/11/2017 18:59, Arnout Vandecappelle ha scritto: > Hi Giulio, > > On 21-11-17 23:07, Giulio Benetti wrote: >> Added kernel allwinner mali driver package. >> Used combined with userspace Allwinner openGL blob, >> it gives possibility to use 3D openGL SoC acceleration. > > I should have asked before, but: where do those binaries come from? Are they > from the mali-sunxi package? Or not yet packaged in Buildroot? It will be combined with sunxi-mali-mainline, I've submitted a patch still pending: [PATCH v4 1/1] sunxi-mali-mainline: new package http://buildroot-busybox.2317881.n4.nabble.com/PATCH-v4-1-1-sunxi-mali-mainline-new-package-td180182.html > > > [snip] >> index fe5ccc4..8de2227 100644 >> --- a/package/Config.in >> +++ b/package/Config.in >> @@ -496,6 +496,7 @@ endmenu >> source "package/statserial/Config.in" >> source "package/stm32flash/Config.in" >> source "package/sunxi-cedarx/Config.in" >> + source "package/sunxi-mali-driver-mainline/Config.in" >> source "package/sunxi-mali/Config.in" > > foo-bar sorts after foo, so swap these two lines. Ok, on next patch I will correct it > >> source "package/sysstat/Config.in" >> source "package/targetcli-fb/Config.in" >> diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in >> new file mode 100644 >> index 0000000..5b7b2ba >> --- /dev/null >> +++ b/package/sunxi-mali-driver-mainline/Config.in >> @@ -0,0 +1,22 @@ >> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" >> + depends on !BR2_LINUX_KERNEL >> + >> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE >> + bool "sunxi-mali-driver-mainline" >> + depends on BR2_LINUX_KERNEL >> + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra >> + help >> + This package builds and installs the Linux kernel driver for >> + the Mali GPU on Allwinner platforms, compatible with recent >> + Linux kernels (>= 4.4). Note that it should be installed >> + together with the corresponding userspace binary blobs to > > I guess with 'binary blobs' you mean the OpenGL libraries, which are only > provided as binaries? 'binary blobs' to me sounds like something like firmware > blobs: is put in your rootfs but doesn't run on the target processor. So I'd > rephrase as: ... together with the corresponding userspace OpenGL libraries, > which are provided as binaries only. Ok > > And preferably also explain where you can get those. Ok, I will add github sunxi-mali by mripard > >> + provide complete OpenGL functionality. >> + >> + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the >> + following options enabled: >> + >> + - CONFIG_CMA >> + - CONFIG_DMA_CMA >> + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more >> + >> + https://github.com/mripard/sunxi-mali/blob/master/README.md >> diff --git a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >> new file mode 100644 >> index 0000000..1692646 >> --- /dev/null >> +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >> @@ -0,0 +1,26 @@ >> +################################################################################ >> +# >> +# sunxi-mali-driver-mainline >> +# >> +################################################################################ >> + >> +SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95 >> +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) >> +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux >> + >> +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ >> + KDIR=$(LINUX_DIR) \ >> + CROSS_COMPILE=$(TARGET_CROSS) \ >> + INSTALL_MOD_PATH=$(TARGET_DIR) >> + >> +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS >> + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ >> + $(SHELL) ./build.sh -r r6p2 -a > > Shouldn't the r6p2 be configurable? That can be done in a later patch, though. You're right, but at this time there's only r6p2 available. Anyway I can add it parametric, so it will be ready for any next versions. > > Regards, > Arnout > >> +endef >> + >> +define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS >> + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ >> + $(SHELL) ./build.sh -r r6p2 -i >> +endef >> + >> +$(eval $(generic-package)) >> >
Hello Everybody, I was thinking about doing a unique patchset for: sunxi-mali-driver-mainline and sunxi-mali-mainline They're very connected each other. What do you think? Il 25/11/2017 21:33, Giulio Benetti ha scritto: > Hi Arnout, > > Il 25/11/2017 18:59, Arnout Vandecappelle ha scritto: >> Hi Giulio, >> >> On 21-11-17 23:07, Giulio Benetti wrote: >>> Added kernel allwinner mali driver package. >>> Used combined with userspace Allwinner openGL blob, >>> it gives possibility to use 3D openGL SoC acceleration. >> >> I should have asked before, but: where do those binaries come from? >> Are they >> from the mali-sunxi package? Or not yet packaged in Buildroot? > > It will be combined with sunxi-mali-mainline, > I've submitted a patch still pending: > [PATCH v4 1/1] sunxi-mali-mainline: new package > http://buildroot-busybox.2317881.n4.nabble.com/PATCH-v4-1-1-sunxi-mali-mainline-new-package-td180182.html > > >> >> >> [snip] >>> index fe5ccc4..8de2227 100644 >>> --- a/package/Config.in >>> +++ b/package/Config.in >>> @@ -496,6 +496,7 @@ endmenu >>> source "package/statserial/Config.in" >>> source "package/stm32flash/Config.in" >>> source "package/sunxi-cedarx/Config.in" >>> + source "package/sunxi-mali-driver-mainline/Config.in" >>> source "package/sunxi-mali/Config.in" >> >> foo-bar sorts after foo, so swap these two lines. > > Ok, on next patch I will correct it > >> >>> source "package/sysstat/Config.in" >>> source "package/targetcli-fb/Config.in" >>> diff --git a/package/sunxi-mali-driver-mainline/Config.in >>> b/package/sunxi-mali-driver-mainline/Config.in >>> new file mode 100644 >>> index 0000000..5b7b2ba >>> --- /dev/null >>> +++ b/package/sunxi-mali-driver-mainline/Config.in >>> @@ -0,0 +1,22 @@ >>> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" >>> + depends on !BR2_LINUX_KERNEL >>> + >>> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE >>> + bool "sunxi-mali-driver-mainline" >>> + depends on BR2_LINUX_KERNEL >>> + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra >>> + help >>> + This package builds and installs the Linux kernel driver for >>> + the Mali GPU on Allwinner platforms, compatible with recent >>> + Linux kernels (>= 4.4). Note that it should be installed >>> + together with the corresponding userspace binary blobs to >> >> I guess with 'binary blobs' you mean the OpenGL libraries, which are >> only >> provided as binaries? 'binary blobs' to me sounds like something like >> firmware >> blobs: is put in your rootfs but doesn't run on the target processor. >> So I'd >> rephrase as: ... together with the corresponding userspace OpenGL >> libraries, >> which are provided as binaries only. > > Ok > >> >> And preferably also explain where you can get those. > > Ok, I will add github sunxi-mali by mripard > >> >>> + provide complete OpenGL functionality. >>> + >>> + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with >>> the >>> + following options enabled: >>> + >>> + - CONFIG_CMA >>> + - CONFIG_DMA_CMA >>> + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more >>> + >>> + https://github.com/mripard/sunxi-mali/blob/master/README.md >>> diff --git >>> a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >>> b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >>> new file mode 100644 >>> index 0000000..1692646 >>> --- /dev/null >>> +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >>> @@ -0,0 +1,26 @@ >>> +################################################################################ >>> >>> +# >>> +# sunxi-mali-driver-mainline >>> +# >>> +################################################################################ >>> >>> + >>> +SUNXI_MALI_DRIVER_MAINLINE_VERSION = >>> 5b7b3c0b6e1736676c90928816d271debbb09d95 >>> +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call >>> github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) >>> +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux >>> + >>> +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ >>> + KDIR=$(LINUX_DIR) \ >>> + CROSS_COMPILE=$(TARGET_CROSS) \ >>> + INSTALL_MOD_PATH=$(TARGET_DIR) >>> + >>> +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS >>> + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ >>> + $(SHELL) ./build.sh -r r6p2 -a >> >> Shouldn't the r6p2 be configurable? That can be done in a later >> patch, though. > > You're right, but at this time there's only r6p2 available. > Anyway I can add it parametric, so it will be ready for any next versions. > >> >> Regards, >> Arnout >> >>> +endef >>> + >>> +define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS >>> + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ >>> + $(SHELL) ./build.sh -r r6p2 -i >>> +endef >>> + >>> +$(eval $(generic-package)) >>> >> > >
I've sent a patchset as described below. Those packaged are bound together. In this way there's no problem on applying patches. Hope I did it well. I was not able to keep version for each patch, but as I know it's not possible, because version refer to other patches. Let me know if I have to change something. Kind regards Il 25/11/2017 22:45, Giulio Benetti ha scritto: > Hello Everybody, > > I was thinking about doing a unique patchset for: > sunxi-mali-driver-mainline > and > sunxi-mali-mainline > > They're very connected each other. > What do you think? > > Il 25/11/2017 21:33, Giulio Benetti ha scritto: >> Hi Arnout, >> >> Il 25/11/2017 18:59, Arnout Vandecappelle ha scritto: >>> Hi Giulio, >>> >>> On 21-11-17 23:07, Giulio Benetti wrote: >>>> Added kernel allwinner mali driver package. >>>> Used combined with userspace Allwinner openGL blob, >>>> it gives possibility to use 3D openGL SoC acceleration. >>> >>> I should have asked before, but: where do those binaries come from? >>> Are they >>> from the mali-sunxi package? Or not yet packaged in Buildroot? >> >> It will be combined with sunxi-mali-mainline, >> I've submitted a patch still pending: >> [PATCH v4 1/1] sunxi-mali-mainline: new package >> http://buildroot-busybox.2317881.n4.nabble.com/PATCH-v4-1-1-sunxi-mali-mainline-new-package-td180182.html >> >> >>> >>> >>> [snip] >>>> index fe5ccc4..8de2227 100644 >>>> --- a/package/Config.in >>>> +++ b/package/Config.in >>>> @@ -496,6 +496,7 @@ endmenu >>>> source "package/statserial/Config.in" >>>> source "package/stm32flash/Config.in" >>>> source "package/sunxi-cedarx/Config.in" >>>> + source "package/sunxi-mali-driver-mainline/Config.in" >>>> source "package/sunxi-mali/Config.in" >>> >>> foo-bar sorts after foo, so swap these two lines. >> >> Ok, on next patch I will correct it >> >>> >>>> source "package/sysstat/Config.in" >>>> source "package/targetcli-fb/Config.in" >>>> diff --git a/package/sunxi-mali-driver-mainline/Config.in >>>> b/package/sunxi-mali-driver-mainline/Config.in >>>> new file mode 100644 >>>> index 0000000..5b7b2ba >>>> --- /dev/null >>>> +++ b/package/sunxi-mali-driver-mainline/Config.in >>>> @@ -0,0 +1,22 @@ >>>> +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" >>>> + depends on !BR2_LINUX_KERNEL >>>> + >>>> +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE >>>> + bool "sunxi-mali-driver-mainline" >>>> + depends on BR2_LINUX_KERNEL >>>> + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra >>>> + help >>>> + This package builds and installs the Linux kernel driver for >>>> + the Mali GPU on Allwinner platforms, compatible with recent >>>> + Linux kernels (>= 4.4). Note that it should be installed >>>> + together with the corresponding userspace binary blobs to >>> >>> I guess with 'binary blobs' you mean the OpenGL libraries, which >>> are only >>> provided as binaries? 'binary blobs' to me sounds like something like >>> firmware >>> blobs: is put in your rootfs but doesn't run on the target processor. >>> So I'd >>> rephrase as: ... together with the corresponding userspace OpenGL >>> libraries, >>> which are provided as binaries only. >> >> Ok >> >>> >>> And preferably also explain where you can get those. >> >> Ok, I will add github sunxi-mali by mripard >> >>> >>>> + provide complete OpenGL functionality. >>>> + >>>> + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 >>>> with the >>>> + following options enabled: >>>> + >>>> + - CONFIG_CMA >>>> + - CONFIG_DMA_CMA >>>> + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more >>>> + >>>> + https://github.com/mripard/sunxi-mali/blob/master/README.md >>>> diff --git >>>> a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >>>> b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >>>> new file mode 100644 >>>> index 0000000..1692646 >>>> --- /dev/null >>>> +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk >>>> @@ -0,0 +1,26 @@ >>>> +################################################################################ >>>> >>>> +# >>>> +# sunxi-mali-driver-mainline >>>> +# >>>> +################################################################################ >>>> >>>> + >>>> +SUNXI_MALI_DRIVER_MAINLINE_VERSION = >>>> 5b7b3c0b6e1736676c90928816d271debbb09d95 >>>> +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call >>>> github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) >>>> +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux >>>> + >>>> +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ >>>> + KDIR=$(LINUX_DIR) \ >>>> + CROSS_COMPILE=$(TARGET_CROSS) \ >>>> + INSTALL_MOD_PATH=$(TARGET_DIR) >>>> + >>>> +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS >>>> + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ >>>> + $(SHELL) ./build.sh -r r6p2 -a >>> >>> Shouldn't the r6p2 be configurable? That can be done in a later >>> patch, though. >> >> You're right, but at this time there's only r6p2 available. >> Anyway I can add it parametric, so it will be ready for any next >> versions. >> >>> >>> Regards, >>> Arnout >>> >>>> +endef >>>> + >>>> +define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS >>>> + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ >>>> + $(SHELL) ./build.sh -r r6p2 -i >>>> +endef >>>> + >>>> +$(eval $(generic-package)) >>>> >>> >> >> > >
diff --git a/DEVELOPERS b/DEVELOPERS index bb81a19..3fdb28b 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -695,6 +695,9 @@ F: package/ocrad/ F: package/tesseract-ocr/ F: package/webp/ +N: Giulio Benetti <giulio.benetti@micronovasrl.com> +F: package/sunxi-mali-driver-mainline/ + N: Gregory Dymarek <gregd72002@gmail.com> F: package/ding-libs/ F: package/gengetopt/ diff --git a/package/Config.in b/package/Config.in index fe5ccc4..8de2227 100644 --- a/package/Config.in +++ b/package/Config.in @@ -496,6 +496,7 @@ endmenu source "package/statserial/Config.in" source "package/stm32flash/Config.in" source "package/sunxi-cedarx/Config.in" + source "package/sunxi-mali-driver-mainline/Config.in" source "package/sunxi-mali/Config.in" source "package/sysstat/Config.in" source "package/targetcli-fb/Config.in" diff --git a/package/sunxi-mali-driver-mainline/Config.in b/package/sunxi-mali-driver-mainline/Config.in new file mode 100644 index 0000000..5b7b2ba --- /dev/null +++ b/package/sunxi-mali-driver-mainline/Config.in @@ -0,0 +1,22 @@ +comment "sunxi-mali-driver-mainline needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE + bool "sunxi-mali-driver-mainline" + depends on BR2_LINUX_KERNEL + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + This package builds and installs the Linux kernel driver for + the Mali GPU on Allwinner platforms, compatible with recent + Linux kernels (>= 4.4). Note that it should be installed + together with the corresponding userspace binary blobs to + provide complete OpenGL functionality. + + sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the + following options enabled: + + - CONFIG_CMA + - CONFIG_DMA_CMA + - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more + + https://github.com/mripard/sunxi-mali/blob/master/README.md diff --git a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file mode 100644 index 0000000..1692646 --- /dev/null +++ b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# sunxi-mali-driver-mainline +# +################################################################################ + +SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95 +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION)) +SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux + +SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \ + KDIR=$(LINUX_DIR) \ + CROSS_COMPILE=$(TARGET_CROSS) \ + INSTALL_MOD_PATH=$(TARGET_DIR) + +define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ + $(SHELL) ./build.sh -r r6p2 -a +endef + +define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS + cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \ + $(SHELL) ./build.sh -r r6p2 -i +endef + +$(eval $(generic-package))
Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> --- Changes v4 -> v5: * prevent build twice DEVELOPERS | 3 +++ package/Config.in | 1 + package/sunxi-mali-driver-mainline/Config.in | 22 ++++++++++++++++++ .../sunxi-mali-driver-mainline.mk | 26 ++++++++++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 package/sunxi-mali-driver-mainline/Config.in create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk