Skip to content

Commit

Permalink
Add startup script to the generated image to unblank the screen and e…
Browse files Browse the repository at this point in the history
…xport Gpios
  • Loading branch information
mecno committed Apr 20, 2016
1 parent 73b7988 commit f4b6aa7
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 0 deletions.
Empty file modified recipes-bsp/secure-boot/secure-odroid-xu3/bl1.bin.hardkernel
100755 → 100644
Empty file.
Empty file modified recipes-bsp/secure-boot/secure-odroid-xu3/bl2.bin.hardkernel
100755 → 100644
Empty file.
Empty file modified recipes-bsp/secure-boot/secure-odroid-xu3/tzsw.bin.hardkernel
100755 → 100644
Empty file.
Empty file modified recipes-bsp/u-boot-hardkernel/files/sd_fusing.sh
100755 → 100644
Empty file.
5 changes: 5 additions & 0 deletions recipes-startup/files/odroid-c2-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

echo 0 > /sys/class/graphics/fb0/blank
echo 224 > /sys/class/gpio/export
echo 214 > /sys/class/gpio/export
3 changes: 3 additions & 0 deletions recipes-startup/files/odroid-c2-init~
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

touch /home/root/test.c
51 changes: 51 additions & 0 deletions recipes-startup/odroid-c2-init_1.0.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
DESCRIPTON = "Startup script for odroid-c2"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

PR = "r0"

SRC_URI = "file://odroid-c2-init"

S = "${WORKDIR}"

PR = "r0"

RDEPENDS_${PN} = "bash"

do_install() {
#
# Create directories:
# ${D}${sysconfdir}/init.d - will hold the scripts
# ${D}${sysconfdir}/rcS.d - will contain a link to the script that runs at startup
# ${D}${sysconfdir}/rc5.d - will contain a link to the script that runs at runlevel=5
# ${D}${sbindir} - scripts called by the above
#
# ${D} is effectively the root directory of the target system.
# ${D}${sysconfdir} is where system configuration files are to be stored (e.g. /etc).
# ${D}${sbindir} is where executable files are to be stored (e.g. /sbin).
#
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/rcS.d


#
# Install files in to the image
#
# The files fetched via SRC_URI (above) will be in ${WORKDIR}.
#
install -m 0755 ${WORKDIR}/odroid-c2-init ${D}${sysconfdir}/init.d/

#
# Symbolic links can also be installed. e.g.
#
# ln -s support-script-link ${D}${sbindir}/support-script

#
# Create symbolic links from the runlevel directories to the script files.
# Links of the form S... and K... mean the script when be called when
#
ln -sf ../init.d/odroid-c2-init ${D}${sysconfdir}/rcS.d/S90odroid-c2-init
}



51 changes: 51 additions & 0 deletions recipes-startup/odroid-c2-init_1.0.bb~
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
DESCRIPTON = "Startup script for odroid-c2"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

PR = "r0"

SRC_URI = "file://odroid-c2-init"

S = "${WORKDIR}"

PR = "r0"

RDEPENDS_${PN} = "bash"

do_install() {
#
# Create directories:
# ${D}${sysconfdir}/init.d - will hold the scripts
# ${D}${sysconfdir}/rcS.d - will contain a link to the script that runs at startup
# ${D}${sysconfdir}/rc5.d - will contain a link to the script that runs at runlevel=5
# ${D}${sbindir} - scripts called by the above
#
# ${D} is effectively the root directory of the target system.
# ${D}${sysconfdir} is where system configuration files are to be stored (e.g. /etc).
# ${D}${sbindir} is where executable files are to be stored (e.g. /sbin).
#
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/rcS.d
install -d ${D}${sbindir}

#
# Install files in to the image
#
# The files fetched via SRC_URI (above) will be in ${WORKDIR}.
#
install -m 0755 ${WORKDIR}/odroid-c2-init ${D}${sysconfdir}/init.d/

#
# Symbolic links can also be installed. e.g.
#
# ln -s support-script-link ${D}${sbindir}/support-script

#
# Create symbolic links from the runlevel directories to the script files.
# Links of the form S... and K... mean the script when be called when
#
ln -sf ../init.d/odroid-c2-init ${D}${sysconfdir}/rcS.d/S90odroid-c2-init
}



0 comments on commit f4b6aa7

Please sign in to comment.