forked from akuster/meta-odroid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add startup script to the generated image to unblank the screen and e…
…xport Gpios
- Loading branch information
Showing
8 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
touch /home/root/test.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
|
||
|
||
|