[meta-xilinx] [PATCH 14/19 v2] Add consoleblank recipe
Jason Wu
jason.wu.misc at gmail.com
Mon May 2 19:07:58 PDT 2016
On 3/05/2016 1:30 AM, Nathan Rossi wrote:
> On Wed, Apr 27, 2016 at 5:46 PM, Jason Wu <jason.wu.misc at gmail.com> wrote:
>> This recipe installs a init script to disable console blank
>
> Hi Jason,
>
> I had a bit of a look at this DPMS issue, I might have a solution it
> is somewhat hacky but appears to allow for DPMS to function correctly.
>
> https://github.com/nathanrossi/linux/commit/e4264e80116684297e353f6da4156c4ad6f8a03a
>
> It would be nice to avoid this console blank + xorg config setup and
> have DPMS work (albeit with a kernel patch). Would you be able to
> confirm if the above linked patch fixes the DPMS issue with your setup
> too?
ok, i will test out this patch and get back to you with the test result
later.
Since this patch is in the kernel, it will affect others (but it will be
fine if this patch only applies to zybo-linux-bd-zynq7). Did you see the
similar issue with TRD design? I am more interest to know if this issue
is zybo only or not.
best regards,
Jason
>
> Thanks,
> Nathan
>
>>
>> Signed-off-by: Jason Wu <jason.wu.misc at gmail.com>
>> ---
>> v2:
>> use MIT from ${COREBASE}/meta/files/common-licenses
>>
>> ---
>> recipes-graphics/consoleblank/console-blank.bb | 25 +++++++++++++++++++++
>> recipes-graphics/consoleblank/files/console-blank | 27 +++++++++++++++++++++++
>> 2 files changed, 52 insertions(+)
>> create mode 100644 recipes-graphics/consoleblank/console-blank.bb
>> create mode 100644 recipes-graphics/consoleblank/files/console-blank
>>
>> diff --git a/recipes-graphics/consoleblank/console-blank.bb b/recipes-graphics/consoleblank/console-blank.bb
>> new file mode 100644
>> index 0000000..ae7d09a
>> --- /dev/null
>> +++ b/recipes-graphics/consoleblank/console-blank.bb
>> @@ -0,0 +1,25 @@
>> +DESCRIPTION = "Startup script - disable console blank"
>> +SECTION = "base"
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
>> +
>> +PR = "r0"
>> +
>> +FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
>> +SRC_URI = "file://console-blank"
>> +
>> +inherit update-rc.d
>> +
>> +INITSCRIPT_NAME = "console-blank"
>> +INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
>> +#FILES_${PN} = "${sysconfdir}/init.d/console-blank"
>> +
>> +# # # add to build if system machine supports screen
>> +# PACKAGES += ' \
>> +# ${@bb.utils.contains("MACHINE_FEATURES", "screen", "console-blank", "",d)} \
>> +# '
>> +
>> +do_install () {
>> + install -d ${D}/${sysconfdir}/init.d/
>> + install -m 0755 ${WORKDIR}/console-blank ${D}${sysconfdir}/init.d/
>> +}
>> \ No newline at end of file
>> diff --git a/recipes-graphics/consoleblank/files/console-blank b/recipes-graphics/consoleblank/files/console-blank
>> new file mode 100644
>> index 0000000..58c2f33
>> --- /dev/null
>> +++ b/recipes-graphics/consoleblank/files/console-blank
>> @@ -0,0 +1,27 @@
>> +#!/bin/sh
>> +### BEGIN INIT INFO
>> +# Provides: consoleblank.sh
>> +# Required-Start:
>> +# Required-Stop:
>> +# Default-Start: S
>> +# Default-Stop:
>> +# Short-Description: disable console blank
>> +# Description: set consoleblank to 0 on tty1
>> +### END INIT INFO
>> +
>> +cur_cb=$(cat /sys/module/kernel/parameters/consoleblank)
>> +
>> +if [ $cur_cb -ne 0 ]; then
>> + echo "Disable console blank"
>> + for i in {0..9}; do
>> + echo -e '\033[9;0]' > /dev/tty1
>> + cb_chk=$(cat /sys/module/kernel/parameters/consoleblank)
>> + if [ $cb_chk -eq 0 ]; then
>> + exit 0
>> + fi
>> + done
>> +fi
>> +
>> +if [ $cb_chk -ne 0 ]; then
>> + echo "Error: fail to disable console blank"
>> +fi
>> \ No newline at end of file
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> meta-xilinx mailing list
>> meta-xilinx at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-xilinx
More information about the meta-xilinx
mailing list