mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2025-07-13 14:14:23 +02:00
Compare commits
275 Commits
sdl_vnc_cl
...
e8e3a82bfe
Author | SHA1 | Date | |
---|---|---|---|
e8e3a82bfe | |||
eaeb4e9f2b | |||
c5895e98cf | |||
5004ec3efa | |||
2f3f3699b3 | |||
d39686df00 | |||
c7b653aec0 | |||
ef9c29177f | |||
28e193073c | |||
668434388c | |||
631e90c985 | |||
c0bc10f434 | |||
c6e7fb2290 | |||
6eae0b51c0 | |||
46bb69221a | |||
715588e723 | |||
2b6763d6f3 | |||
b6388526ae | |||
2f344c40e4 | |||
dbc5d431a0 | |||
afbfe3bba0 | |||
e552576431 | |||
8ba74de514 | |||
aad6fb62b4 | |||
9d91552822 | |||
7f5e6e7c32 | |||
7978bdd326 | |||
a11dda3253 | |||
bb1c6beb07 | |||
a23a5394b0 | |||
d6e79e0c32 | |||
a3ece685aa | |||
4eaa3b3aee | |||
98cfc9467c | |||
08d987160b | |||
72d100eb82 | |||
e2d877de04 | |||
5162e55193 | |||
0e2b5af6fc | |||
d9d38937e4 | |||
ab9e261c18 | |||
7660ef9437 | |||
6436a22054 | |||
ca78790be1 | |||
ac4af715b3 | |||
e27a7ba7d7 | |||
5d0af8c898 | |||
79fa7b8135 | |||
de319e1292 | |||
734bb8d960 | |||
5f6c03253f | |||
37a3490424 | |||
692ad53c19 | |||
8a17daee35 | |||
2f92704dfe | |||
44d73141b5 | |||
6e6aead168 | |||
1cc8daad6e | |||
ee33311fce | |||
c11a10dac8 | |||
ece893cfdb | |||
da241a96dc | |||
2c10017bbb | |||
d220929d4b | |||
985a0bed60 | |||
4c42c6d31d | |||
def53409d3 | |||
8802d3b491 | |||
19d0f0e84c | |||
f014e70c30 | |||
13df5da839 | |||
5df11468d2 | |||
c52ffcea5c | |||
1b8c99a1c3 | |||
03b1c8bdfe | |||
6f5d090244 | |||
7832f01731 | |||
14871c09de | |||
0865a5c13b | |||
e15b711ca5 | |||
3cfd696935 | |||
453785a03d | |||
fe5f1d7fc5 | |||
e26df6c6b1 | |||
5fabd9a6d0 | |||
036fab90e5 | |||
146df0a2ea | |||
2f9c00e2b6 | |||
c86d1d41ea | |||
6f4b4144f3 | |||
f14533c056 | |||
1b520e6713 | |||
1cb28e0e01 | |||
4d3dc0ef49 | |||
a3563d9588 | |||
057ce2194b | |||
4a404a98d4 | |||
13c10d0520 | |||
6d2dbc23c1 | |||
c2da0d7c6e | |||
fb7aa9ba76 | |||
929264eb7c | |||
10bdbba277 | |||
423bde4d26 | |||
f84ca2b690 | |||
9565699a58 | |||
f70874bdc2 | |||
b543ec49de | |||
ae52626948 | |||
4feda86a14 | |||
6b1d9b7dee | |||
336f9028d1 | |||
991a5393d4 | |||
ff4f319acd | |||
d3349df12c | |||
474d0e6ac5 | |||
c46a65bba3 | |||
863ea3fed3 | |||
35832377c6 | |||
9e3536aa73 | |||
49305da8d8 | |||
cf058762dd | |||
d659e76211 | |||
2cbedc14c7 | |||
567ed192c4 | |||
c6c7b457c7 | |||
cb1f751458 | |||
695e5beb9f | |||
8df756a6e7 | |||
78a6473a6f | |||
07a057d7b3 | |||
a44cf639b6 | |||
1e68858b43 | |||
a07bff36fc | |||
9b46056637 | |||
76de7fee54 | |||
414f09c83a | |||
9433ea77f0 | |||
bc0bac3ebc | |||
d74f0eae3e | |||
718db6d18d | |||
ff41d76c6a | |||
b2d24c7d97 | |||
055cc3334c | |||
f5a86b5606 | |||
39c0eb80ec | |||
fe9a06d65f | |||
d5eb6635fa | |||
af3e4bf92a | |||
92c4bb5dbc | |||
8c957f3300 | |||
5881ffbad0 | |||
f31bcaadb9 | |||
0cae78a47c | |||
2477a8e286 | |||
6c58282d66 | |||
167eac6cfb | |||
f2c7db1bb8 | |||
db7c88ce90 | |||
9cb4b8fcf1 | |||
a723571517 | |||
a124d39851 | |||
e3f556fbb4 | |||
425547465b | |||
b2b277e2a3 | |||
7f4d9c82da | |||
6fbcd74269 | |||
14e21ff92d | |||
58c96f6236 | |||
252ddde464 | |||
3e77d3ea67 | |||
3ea7678d7c | |||
694f6be04a | |||
7075658d24 | |||
28aa2b8099 | |||
15004c7868 | |||
b41540e82c | |||
17eff21322 | |||
def162a82a | |||
d9727faf43 | |||
22c519e777 | |||
2ef30f7403 | |||
0c0186bcaa | |||
05bb45256d | |||
86a7359b2a | |||
e07da1a7c0 | |||
994356fdd5 | |||
78ce3ff602 | |||
2f6a61b16d | |||
7022952f23 | |||
6ce7173e4a | |||
f3bacf688b | |||
bcfa7a5e25 | |||
52179245bf | |||
8ba3c635d8 | |||
a7e91fd4d7 | |||
ce7171b9bd | |||
d478023a32 | |||
376b42f3ee | |||
61d37a71f4 | |||
ea291c2a3a | |||
a4cb8479ff | |||
9e75a87fb4 | |||
3ceeeb7cf1 | |||
ef288cd22e | |||
4637985cdd | |||
c516cb6685 | |||
3baa2d265c | |||
a4d1b14a5e | |||
60e28aa4d9 | |||
0544fa9554 | |||
f52cef66ea | |||
32c4bbf756 | |||
65b323fc2a | |||
f22dde3642 | |||
027b99deec | |||
789fa4ff5e | |||
1a0755fed6 | |||
3ed59f46b7 | |||
88905fa585 | |||
a942ba09bc | |||
d59c841650 | |||
94d91ed6ee | |||
edf2889417 | |||
aa92ff2454 | |||
02e083d995 | |||
d8f478b895 | |||
3af35df872 | |||
5c5016f424 | |||
3d6cf9866c | |||
37a70525e5 | |||
68d24bb496 | |||
7aba1f2772 | |||
b358e26252 | |||
5ab57b8e5d | |||
226d43b8cc | |||
709eabfdc6 | |||
4b237be52c | |||
03e95d013c | |||
08ceb934a0 | |||
e92fce0ace | |||
2fa8526295 | |||
d63ce8ee33 | |||
2f8f6f5542 | |||
3d990172a2 | |||
ec4e0e8fce | |||
23b86df861 | |||
787af3e0ad | |||
e1189cfc1d | |||
cd86495b12 | |||
f4b896b3aa | |||
2c1ec2ce97 | |||
e30832feea | |||
7e38bbf202 | |||
b31f541a24 | |||
eb4d22663b | |||
9180aef180 | |||
1642c8f7d4 | |||
fbce2e6d9b | |||
573dfe83b6 | |||
b653af1cf0 | |||
400031aef4 | |||
d4cf9fec7d | |||
171f1c6fa3 | |||
3bbf9490ac | |||
d98a5c440b | |||
62886eba57 | |||
ac3f82a2c1 | |||
61634f0d43 | |||
ff4446c8ae | |||
0ee41d5890 | |||
daefedaef6 | |||
fbd95bb8a3 | |||
fe19194897 | |||
c32682774a |
17
bblayers.conf.example
Normal file
17
bblayers.conf.example
Normal file
@ -0,0 +1,17 @@
|
||||
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
|
||||
# changes incompatibly
|
||||
POKY_BBLAYERS_CONF_VERSION = "2"
|
||||
|
||||
BBPATH = "${TOPDIR}"
|
||||
BBFILES ?= ""
|
||||
|
||||
BBLAYERS ?= " \
|
||||
/home/dany/experiments/poky/meta \
|
||||
/home/dany/experiments/poky/meta-poky \
|
||||
/home/dany/experiments/poky/meta-yocto-bsp \
|
||||
/home/dany/experiments/yocto-layers/meta-raspberrypi \
|
||||
/home/dany/workspace/meta-rpi-diya \
|
||||
/home/dany/experiments/yocto-layers/meta-openembedded/meta-oe \
|
||||
/home/dany/experiments/yocto-layers/meta-openembedded/meta-python \
|
||||
/home/dany/experiments/yocto-layers/meta-openembedded/meta-multimedia \
|
||||
"
|
@ -5,24 +5,18 @@ BBPATH .= ":${LAYERDIR}"
|
||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "meta-rpi-pharo"
|
||||
BBFILE_PATTERN_meta-rpi-pharo = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-rpi-pharo = "11"
|
||||
BBFILE_COLLECTIONS += "meta-rpi-diya"
|
||||
BBFILE_PATTERN_meta-rpi-diya = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-rpi-diya = "11"
|
||||
|
||||
LAYERDEPENDS_meta-rpi-pharo = "core raspberrypi"
|
||||
LAYERSERIES_COMPAT_meta-rpi-pharo = "honister"
|
||||
LAYERDEPENDS_meta-rpi-diya = "core raspberrypi"
|
||||
LAYERSERIES_COMPAT_meta-rpi-diya = "scarthgap"
|
||||
|
||||
PACKAGE_CLASSES = "package_ipk"
|
||||
INHERIT += "rm_work"
|
||||
DISTRO_FEATURES:append := " vc4-gfx "
|
||||
|
||||
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
|
||||
# ssh-server-dropbear
|
||||
DISTRO_FEATURES:append := " vc4-gfx opengl "
|
||||
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
|
||||
MACHINE ?= "raspberrypi4-64"
|
||||
MACHINE ?= "raspberrypi3-64"
|
||||
# MACHINE ?= "raspberrypi0-2w-64"
|
||||
|
||||
WKS_FILE="rpi.wks.in"
|
||||
ROOT_HOME = "/root"
|
||||
|
||||
#MACHINE = "raspberrypi3-64"
|
||||
#MACHINE = "raspberrypi2"
|
||||
@ -31,8 +25,12 @@ ROOT_HOME = "/root"
|
||||
RPI_USE_U_BOOT = "0"
|
||||
RPI_USE_wS_28_DPI_LCD = "1"
|
||||
# enable usb boot in uboot
|
||||
ENABLE_DWC2_PERIPHERAL = "1"
|
||||
ENABLE_DWC2_HOST = "1"
|
||||
ENABLE_USB_U_BOOT = "0"
|
||||
|
||||
ENABLE_UART = "0"
|
||||
|
||||
DISABLE_SPLASH = "1"
|
||||
VIDEO_CAMERA = "1"
|
||||
DISABLE_RPI_BOOT_LOGO = "1"
|
||||
@ -40,23 +38,32 @@ ENABLE_SPI_BUS = "0"
|
||||
ENABLE_I2C = "0"
|
||||
KERNEL_MODULE_AUTOLOAD:rpi += " i2c-dev "
|
||||
|
||||
VC4DTBO = "vc4-kms-v3d,nocomposite,noaudio"
|
||||
VC4DTBO = "vc4-kms-v3d,noaudio"
|
||||
|
||||
KERNEL_DEVICETREE:append = " overlays/vc4-kms-dpi-generic.dtbo "
|
||||
KERNEL_DEVICETREE:append = " overlays/vc4-kms-dpi-generic.dtbo overlays/dpi24.dtbo "
|
||||
|
||||
|
||||
RPI_EXTRA_CONFIG += "${@['','\n\
|
||||
dtoverlay=vc4-kms-dpi-generic,hactive=480,hfp=26,hsync=16,hbp=10 \n\
|
||||
dtoverlay=vc4-kms-dpi-generic \n\
|
||||
dtparam=hactive=480,hfp=26,hsync=16,hbp=10 \n\
|
||||
dtparam=vactive=640,vfp=25,vsync=10,vbp=15 \n\
|
||||
dtparam=clock-frequency=32000000,rgb666-padhi \n\
|
||||
dtparam=clock-frequency=32000000 \n\
|
||||
dtparam=hsync-invert,vsync-invert,pixclk-invert \n\
|
||||
dtparam=rgb666-padhi,rotate=270 \n\
|
||||
dtoverlay=waveshare-28dpi-3b-4b \n\
|
||||
dtoverlay=waveshare-28dpi-3b \n\
|
||||
dtoverlay=waveshare-28dpi-4b \n\
|
||||
display_rotate=1 #1:90;2: 180; 3: 270 \n']['${RPI_USE_wS_28_DPI_LCD}' == '1']}"
|
||||
dtoverlay=waveshare-28dpi-4b \n']['${RPI_USE_wS_28_DPI_LCD}' == '1']}"
|
||||
|
||||
RPI_EXTRA_CONFIG += '\n\
|
||||
start_x=1 # essential \n\
|
||||
dtparam=audio=on \n\
|
||||
gpu_mem=128 # at least, or maybe more if you wish \n\
|
||||
disable_camera_led=1 # optional \n\
|
||||
'
|
||||
# enable ads1115 sensor for battery monitoring \n\
|
||||
dtoverlay=ads1115-i2c-gpio,cha_enable,cha_cfg=4,cha_datarate=7,cha_gain=1 \n\
|
||||
#start_x=1 # essential \n\
|
||||
#gpu_mem=128 # at least, or maybe more if you wish \n\
|
||||
#disable_camera_led=1 # optional \n\
|
||||
include extraconfig.txt \n\
|
||||
'
|
||||
|
||||
# extra kernel CMDLINE_RNDIS option
|
||||
# CMDLINE_RNDIS += " video=DPI-1:480x640,rotate=90 "
|
||||
# accept license for wifi and bluetooth firmware
|
||||
LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch"
|
272
local.conf.example
Normal file
272
local.conf.example
Normal file
@ -0,0 +1,272 @@
|
||||
#
|
||||
# This file is your local configuration file and is where all local user settings
|
||||
# are placed. The comments in this file give some guide to the options a new user
|
||||
# to the system might want to change but pretty much any configuration option can
|
||||
# be set in this file. More adventurous users can look at local.conf.extended
|
||||
# which contains other examples of configuration which can be placed in this file
|
||||
# but new users likely won't need any of them initially.
|
||||
#
|
||||
# Lines starting with the '#' character are commented out and in some cases the
|
||||
# default values are provided as comments to show people example syntax. Enabling
|
||||
# the option is a question of removing the # character and making any change to the
|
||||
# variable as required.
|
||||
|
||||
#
|
||||
# Machine Selection
|
||||
#
|
||||
# You need to select a specific machine to target the build with. There are a selection
|
||||
# of emulated machines available which can boot and run in the QEMU emulator:
|
||||
#
|
||||
#MACHINE ?= "qemuarm"
|
||||
#MACHINE ?= "qemuarm64"
|
||||
#MACHINE ?= "qemumips"
|
||||
#MACHINE ?= "qemumips64"
|
||||
#MACHINE ?= "qemuppc"
|
||||
#MACHINE ?= "qemux86"
|
||||
#MACHINE ?= "qemux86-64"
|
||||
#
|
||||
# There are also the following hardware board target machines included for
|
||||
# demonstration purposes:
|
||||
#
|
||||
#MACHINE ?= "beaglebone-yocto"
|
||||
#MACHINE ?= "genericx86"
|
||||
#MACHINE ?= "genericx86-64"
|
||||
#MACHINE ?= "edgerouter"
|
||||
#
|
||||
# This sets the default machine to be qemux86-64 if no other machine is selected:
|
||||
|
||||
#
|
||||
# Where to place downloads
|
||||
#
|
||||
# During a first build the system will download many different source code tarballs
|
||||
# from various upstream projects. This can take a while, particularly if your network
|
||||
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
|
||||
# can preserve this directory to speed up this part of subsequent builds. This directory
|
||||
# is safe to share between multiple builds on the same machine too.
|
||||
#
|
||||
# The default is a downloads directory under TOPDIR which is the build directory.
|
||||
#
|
||||
#DL_DIR ?= "${TOPDIR}/downloads"
|
||||
|
||||
#
|
||||
# Where to place shared-state files
|
||||
#
|
||||
# BitBake has the capability to accelerate builds based on previously built output.
|
||||
# This is done using "shared state" files which can be thought of as cache objects
|
||||
# and this option determines where those files are placed.
|
||||
#
|
||||
# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
|
||||
# from these files if no changes were made to the configuration. If changes were made
|
||||
# to the configuration, only shared state files where the state was still valid would
|
||||
# be used (done using checksums).
|
||||
#
|
||||
# The default is a sstate-cache directory under TOPDIR.
|
||||
#
|
||||
#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
|
||||
|
||||
#
|
||||
# Where to place the build output
|
||||
#
|
||||
# This option specifies where the bulk of the building work should be done and
|
||||
# where BitBake should place its temporary files and output. Keep in mind that
|
||||
# this includes the extraction and compilation of many applications and the toolchain
|
||||
# which can use Gigabytes of hard disk space.
|
||||
#
|
||||
# The default is a tmp directory under TOPDIR.
|
||||
#
|
||||
#TMPDIR = "${TOPDIR}/tmp"
|
||||
|
||||
#
|
||||
# Default policy config
|
||||
#
|
||||
# The distribution setting controls which policy settings are used as defaults.
|
||||
# The default value is fine for general Yocto project use, at least initially.
|
||||
# Ultimately when creating custom policy, people will likely end up subclassing
|
||||
# these defaults.
|
||||
#
|
||||
DISTRO ?= "poky"
|
||||
# As an example of a subclass there is a "bleeding" edge policy configuration
|
||||
# where many versions are set to the absolute latest code from the upstream
|
||||
# source control systems. This is just mentioned here as an example, its not
|
||||
# useful to most new users.
|
||||
# DISTRO ?= "poky-bleeding"
|
||||
|
||||
#
|
||||
# Package Management configuration
|
||||
#
|
||||
# This variable lists which packaging formats to enable. Multiple package backends
|
||||
# can be enabled at once and the first item listed in the variable will be used
|
||||
# to generate the root filesystems.
|
||||
# Options are:
|
||||
# - 'package_deb' for debian style deb files
|
||||
# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
|
||||
# - 'package_rpm' for rpm style packages
|
||||
# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
|
||||
# We default to rpm:
|
||||
|
||||
#
|
||||
# SDK target architecture
|
||||
#
|
||||
# This variable specifies the architecture to build SDK items for and means
|
||||
# you can build the SDK packages for architectures other than the machine you are
|
||||
# running the build on (i.e. building i686 packages on an x86_64 host).
|
||||
# Supported values are i686, x86_64, aarch64
|
||||
#SDKMACHINE ?= "i686"
|
||||
|
||||
#
|
||||
# Extra image configuration defaults
|
||||
#
|
||||
# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
|
||||
# images. Some of these options are added to certain image types automatically. The
|
||||
# variable can contain the following options:
|
||||
# "dbg-pkgs" - add -dbg packages for all installed packages
|
||||
# (adds symbol information for debugging/profiling)
|
||||
# "src-pkgs" - add -src packages for all installed packages
|
||||
# (adds source code for debugging)
|
||||
# "dev-pkgs" - add -dev packages for all installed packages
|
||||
# (useful if you want to develop against libs in the image)
|
||||
# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
|
||||
# (useful if you want to run the package test suites)
|
||||
# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
|
||||
# "tools-debug" - add debugging tools (gdb, strace)
|
||||
# "eclipse-debug" - add Eclipse remote debugging support
|
||||
# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
|
||||
# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
|
||||
# "debug-tweaks" - make an image suitable for development
|
||||
# e.g. ssh root access has a blank password
|
||||
# There are other application targets that can be used here too, see
|
||||
# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
|
||||
# We default to enabling the debugging tweaks.
|
||||
|
||||
#
|
||||
# Additional image features
|
||||
#
|
||||
# The following is a list of additional classes to use when building images which
|
||||
# enable extra features. Some available options which can be included in this variable
|
||||
# are:
|
||||
# - 'buildstats' collect build statistics
|
||||
USER_CLASSES ?= "buildstats"
|
||||
|
||||
#
|
||||
# Runtime testing of images
|
||||
#
|
||||
# The build system can test booting virtual machine images under qemu (an emulator)
|
||||
# after any root filesystems are created and run tests against those images. It can also
|
||||
# run tests against any SDK that are built. To enable this uncomment these lines.
|
||||
# See classes/test{image,sdk}.bbclass for further details.
|
||||
#IMAGE_CLASSES += "testimage testsdk"
|
||||
#TESTIMAGE_AUTO:qemuall = "1"
|
||||
|
||||
#
|
||||
# Interactive shell configuration
|
||||
#
|
||||
# Under certain circumstances the system may need input from you and to do this it
|
||||
# can launch an interactive shell. It needs to do this since the build is
|
||||
# multithreaded and needs to be able to handle the case where more than one parallel
|
||||
# process may require the user's attention. The default is iterate over the available
|
||||
# terminal types to find one that works.
|
||||
#
|
||||
# Examples of the occasions this may happen are when resolving patches which cannot
|
||||
# be applied, to use the devshell or the kernel menuconfig
|
||||
#
|
||||
# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
|
||||
# Note: currently, Konsole support only works for KDE 3.x due to the way
|
||||
# newer Konsole versions behave
|
||||
#OE_TERMINAL = "auto"
|
||||
# By default disable interactive patch resolution (tasks will just fail instead):
|
||||
PATCHRESOLVE = "noop"
|
||||
|
||||
#
|
||||
# Disk Space Monitoring during the build
|
||||
#
|
||||
# Monitor the disk space during the build. If there is less that 1GB of space or less
|
||||
# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
|
||||
# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard abort
|
||||
# of the build. The reason for this is that running completely out of space can corrupt
|
||||
# files and damages the build in ways which may not be easily recoverable.
|
||||
# It's necessary to monitor /tmp, if there is no space left the build will fail
|
||||
# with very exotic errors.
|
||||
BB_DISKMON_DIRS ??= "\
|
||||
STOPTASKS,${TMPDIR},1G,100K \
|
||||
STOPTASKS,${DL_DIR},1G,100K \
|
||||
STOPTASKS,${SSTATE_DIR},1G,100K \
|
||||
STOPTASKS,/tmp,100M,100K \
|
||||
ABORT,${TMPDIR},100M,1K \
|
||||
ABORT,${DL_DIR},100M,1K \
|
||||
ABORT,${SSTATE_DIR},100M,1K \
|
||||
ABORT,/tmp,10M,1K"
|
||||
|
||||
#
|
||||
# Shared-state files from other locations
|
||||
#
|
||||
# As mentioned above, shared state files are prebuilt cache data objects which can be
|
||||
# used to accelerate build time. This variable can be used to configure the system
|
||||
# to search other mirror locations for these objects before it builds the data itself.
|
||||
#
|
||||
# This can be a filesystem directory, or a remote url such as http or ftp. These
|
||||
# would contain the sstate-cache results from previous builds (possibly from other
|
||||
# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
|
||||
# cache locations to check for the shared objects.
|
||||
# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
|
||||
# at the end as shown in the examples below. This will be substituted with the
|
||||
# correct path within the directory structure.
|
||||
#SSTATE_MIRRORS ?= "\
|
||||
#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
|
||||
#file://.* file:///some/local/dir/sstate/PATH"
|
||||
|
||||
#
|
||||
# Yocto Project SState Mirror
|
||||
#
|
||||
# The Yocto Project has prebuilt artefacts available for its releases, you can enable
|
||||
# use of these by uncommenting the following lines. This will mean the build uses
|
||||
# the network to check for artefacts at the start of builds, which does slow it down
|
||||
# equally, it will also speed up the builds by not having to build things if they are
|
||||
# present in the cache. It assumes you can download something faster than you can build it
|
||||
# which will depend on your network.
|
||||
# Note: For this to work you also need hash-equivalence passthrough to the matching server
|
||||
#
|
||||
#BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687"
|
||||
#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/3.4/PATH;downloadfilename=PATH"
|
||||
|
||||
#
|
||||
# Qemu configuration
|
||||
#
|
||||
# By default native qemu will build with a builtin VNC server where graphical output can be
|
||||
# seen. The line below enables the SDL UI frontend too.
|
||||
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
|
||||
# By default libsdl2-native will be built, if you want to use your host's libSDL instead of
|
||||
# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
|
||||
#ASSUME_PROVIDED += "libsdl2-native"
|
||||
|
||||
# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds
|
||||
# a handy set of menus for controlling the emulator.
|
||||
#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
|
||||
|
||||
#
|
||||
# Hash Equivalence
|
||||
#
|
||||
# Enable support for automatically running a local hash equivalence server and
|
||||
# instruct bitbake to use a hash equivalence aware signature generator. Hash
|
||||
# equivalence improves reuse of sstate by detecting when a given sstate
|
||||
# artifact can be reused as equivalent, even if the current task hash doesn't
|
||||
# match the one that generated the artifact.
|
||||
#
|
||||
# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
|
||||
#
|
||||
#BB_HASHSERVE = "auto"
|
||||
#BB_SIGNATURE_HANDLER = "OEEquivHash"
|
||||
|
||||
#
|
||||
# Memory Resident Bitbake
|
||||
#
|
||||
# Bitbake's server component can stay in memory after the UI for the current command
|
||||
# has completed. This means subsequent commands can run faster since there is no need
|
||||
# for bitbake to reload cache files and so on. Number is in seconds, after which the
|
||||
# server will shut down.
|
||||
#
|
||||
#BB_SERVER_TIMEOUT = "60"
|
||||
|
||||
# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
|
||||
# track the version of this file when it was generated. This can safely be ignored if
|
||||
# this doesn't mean anything to you.
|
||||
CONF_VERSION = "2"
|
103
recipes-bsp/waveshare-2.8-lcd/files/dts/ads1115-i2c-gpio.dts
Normal file
103
recipes-bsp/waveshare-2.8-lcd/files/dts/ads1115-i2c-gpio.dts
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* TI ADS1115 multi-channel ADC overlay
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target = <&i2c_gpio>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ads1115: ads1115@48 {
|
||||
compatible = "ti,ads1115";
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x48>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_a: channel_a {
|
||||
reg = <4>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_b: channel_b {
|
||||
reg = <5>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_c: channel_c {
|
||||
reg = <6>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_d: channel_d {
|
||||
reg = <7>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
addr = <&ads1115>,"reg:0";
|
||||
cha_enable = <0>,"=1";
|
||||
cha_cfg = <&channel_a>,"reg:0";
|
||||
cha_gain = <&channel_a>,"ti,gain:0";
|
||||
cha_datarate = <&channel_a>,"ti,datarate:0";
|
||||
chb_enable = <0>,"=2";
|
||||
chb_cfg = <&channel_b>,"reg:0";
|
||||
chb_gain = <&channel_b>,"ti,gain:0";
|
||||
chb_datarate = <&channel_b>,"ti,datarate:0";
|
||||
chc_enable = <0>,"=3";
|
||||
chc_cfg = <&channel_c>,"reg:0";
|
||||
chc_gain = <&channel_c>,"ti,gain:0";
|
||||
chc_datarate = <&channel_c>,"ti,datarate:0";
|
||||
chd_enable = <0>,"=4";
|
||||
chd_cfg = <&channel_d>,"reg:0";
|
||||
chd_gain = <&channel_d>,"ti,gain:0";
|
||||
chd_datarate = <&channel_d>,"ti,datarate:0";
|
||||
};
|
||||
};
|
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* vc4-kms-waveshare-28dpi-overlay.dts
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/pinctrl/bcm2835.h>
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
fragment@0 {
|
||||
target = <&gpio>;
|
||||
__overlay__ {
|
||||
pwm_pins: pwm_pins {
|
||||
brcm,pins = <18>;
|
||||
brcm,function = <BCM2835_FSEL_ALT5>;
|
||||
brcm,pull = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&pwm>;
|
||||
frag1: __overlay__ {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pwm_pins>;
|
||||
assigned-clock-rates = <100000000>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target-path = "/";
|
||||
__overlay__ {
|
||||
//#gpio-cells = <2>;
|
||||
/* Panel backlight through PWM0_0 on GPIO18 */
|
||||
backlight_lvds: backlight {
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 10000000>;
|
||||
brightness-levels = <0 1000>;
|
||||
num-interpolated-steps = <1000>;
|
||||
default-brightness-level = <1000>;
|
||||
};
|
||||
|
||||
panel: panel {
|
||||
reg = <0>;
|
||||
compatible = "panel-dpi";
|
||||
backlight = <&backlight_lvds>;
|
||||
|
||||
width-mm = <154>;
|
||||
height-mm = <86>;
|
||||
bus-format = <0x1015>;
|
||||
|
||||
timing: panel-timing {
|
||||
clock-frequency = <28000000>;
|
||||
hactive = <480>;
|
||||
hfront-porch = <26>;
|
||||
hsync-len = <16>;
|
||||
hback-porch = <10>;
|
||||
hsync-active = <0>;
|
||||
vactive = <640>;
|
||||
vfront-porch = <25>;
|
||||
vsync-len = <10>;
|
||||
vback-porch = <16>;
|
||||
vsync-active = <0>;
|
||||
|
||||
de-active = <1>;
|
||||
pixelclk-active = <1>;
|
||||
};
|
||||
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&dpi_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&dpi>;
|
||||
dpi_node: __overlay__ {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
|
||||
/* refer to /home/pi/linux/arch/arm/boot/dts/bcm270x.dtsi
|
||||
* for the pin multiplex setting
|
||||
*/
|
||||
pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
|
||||
|
||||
port {
|
||||
dpi_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
BIN
recipes-bsp/waveshare-2.8-lcd/files/vc4-kms-DPI-28inch.dtbo
Normal file
BIN
recipes-bsp/waveshare-2.8-lcd/files/vc4-kms-DPI-28inch.dtbo
Normal file
Binary file not shown.
@ -2,13 +2,25 @@ SUMMARY = "Waveshare 2.8 inch DPI"
|
||||
DESCRIPTION = "support overlay layer for Waveshare 2.8 inch DPI"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
inherit devicetree
|
||||
|
||||
do_deploy () {
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
SRC_URI = " file://dts/ads1115-i2c-gpio.dts "
|
||||
|
||||
S = "${WORKDIR}/dts"
|
||||
DT_FILES = "ads1115-i2c-gpio.dtbo"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi.*"
|
||||
|
||||
do_deploy:append () {
|
||||
install -d ${DEPLOY_DIR_IMAGE}
|
||||
# install -m 0755 ${B}/vc4-kms-waveshare-28dpi.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-waveshare-28dpi.dtbo
|
||||
install -m 0755 ${B}/ads1115-i2c-gpio.dtbo ${DEPLOY_DIR_IMAGE}/ads1115-i2c-gpio.dtbo
|
||||
install -m 0755 ${THISDIR}/files/vc4-kms-DPI-28inch.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-DPI-28inch.dtbo
|
||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b-4b.dtbo
|
||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b.dtbo
|
||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-4b.dtbo
|
||||
# install -m 0755 ${THISDIR}/files/start.mp3 ${DEPLOY_DIR_IMAGE}/start.mp3
|
||||
}
|
||||
|
||||
addtask deploy
|
||||
# addtask deploy
|
@ -1 +1,7 @@
|
||||
hostname = "diya"
|
||||
hostname = "diya"
|
||||
|
||||
do_install:append () {
|
||||
cat << 'EOF' >> "${D}${sysconfdir}/profile"
|
||||
export DISK="mmcblk0"
|
||||
EOF
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
SRC_URI += "file://default"
|
||||
|
||||
do_install:append () {
|
||||
rm -rf ${D}/etc/dropbear
|
||||
install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/dropbear
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
DROPBEAR_EXTRA_ARGS="-w"
|
||||
DROPBEAR_RSAKEY_DIR=/home/diya/etc/dropbear
|
@ -1,32 +0,0 @@
|
||||
#webrtc-audio-processing \
|
||||
pulseaudio \
|
||||
pulseaudio-server \
|
||||
alsa-utils \
|
||||
pulseaudio-module-alsa-card \
|
||||
pulseaudio-module-alsa-source \
|
||||
pulseaudio-module-alsa-sink \
|
||||
pulseaudio-module-cli \
|
||||
pulseaudio-module-echo-cancel \
|
||||
pulseaudio-misc \
|
||||
i2c-tools \
|
||||
#tslib
|
||||
#tslib-tests
|
||||
#tslib-calibrate
|
||||
#tslib-uinput
|
||||
# v4l-utils
|
||||
evtest
|
||||
|
||||
# openvt -v -c 5 -- /usr/bin/weston --tty=/dev/tty5
|
||||
|
||||
mesa \
|
||||
mesa-demos \
|
||||
libgbm \
|
||||
|
||||
|
||||
dtdebug=1
|
||||
dtoverlay=vc4-kms-v3d
|
||||
dtoverlay=vc4-kms-dpi-generic,hactive=480,hfp=26,hsync=16,hbp=10
|
||||
dtparam=vactive=640,vfp=25,vsync=10,vbp=16
|
||||
dtparam=clock-frequency=32000000,rgb666-padhi
|
||||
|
||||
Diyas symbolise goodness and purity, and lighting them denotes dispelling darkness and going into light.
|
@ -1 +0,0 @@
|
||||
core-image-minimal.bbappend
|
@ -1,41 +1,5 @@
|
||||
inherit extrausers
|
||||
|
||||
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/dpi24.dtbo overlays/vc4-kms-dpi-generic.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/vc4-kms-DPI-28inch.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}" "
|
||||
IMAGE_BOOT_FILES:append = " extraconfig.txt "
|
||||
|
||||
|
||||
EXTRA_USERS_PARAMS = "usermod -p BJpK8ADNDLsGg root; \
|
||||
usermod -p 2Pe/4xyFxsokE diya; \
|
||||
usermod -a -G video diya; \
|
||||
usermod -a -G tty diya; \
|
||||
usermod -a -G input diya; \
|
||||
usermod -a -G dialout diya; \
|
||||
usermod -a -G audio diya; \
|
||||
usermod -a -G avahi diya \
|
||||
"
|
||||
IMAGE_BOOT_FILES:append = "fs_resize"
|
||||
# KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/vc4-kms-dpi-generic.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||
|
||||
IMAGE_INSTALL:append = "mpg123 \
|
||||
libcurl \
|
||||
libdrm \
|
||||
libgbm \
|
||||
libgles2 \
|
||||
libegl-mesa \
|
||||
libgl-mesa \
|
||||
libglapi \
|
||||
glew \
|
||||
freetype \
|
||||
freeglut \
|
||||
mesa \
|
||||
libsdl2 \
|
||||
libsdl2-ttf \
|
||||
libsdl2-image \
|
||||
libsdl2-mixer \
|
||||
libsdl2-net \
|
||||
example \
|
||||
htop \
|
||||
waveshare-2.8-lcd \
|
||||
realtekfw \
|
||||
diya-overlay \
|
||||
opensmalltalk-cog-vm \
|
||||
"
|
||||
IMAGE_INSTALL:append = " waveshare-2.8-lcd realtekfw "
|
7
recipes-core/images/core-image-recovery.bbapend
Normal file
7
recipes-core/images/core-image-recovery.bbapend
Normal file
@ -0,0 +1,7 @@
|
||||
image_patch:append () {
|
||||
# create /etc/fstab
|
||||
cat << EOF > ${IMAGE_ROOTFS}/etc/fstab
|
||||
/dev/mmcblk0p1 /boot auto defaults 0 0
|
||||
/dev/mmcblk0p4 /home auto defaults 0 0
|
||||
EOF
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
do_install:append () {
|
||||
rm ${D}/etc/network/interfaces
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
DESCRIPTION = "Auto configuration deployment from media"
|
||||
DEPENDS = ""
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
SRC_URI += "file://confd \
|
||||
file://expandfs.sh \
|
||||
file://80_diya \
|
||||
file://fs_resize"
|
||||
|
||||
|
||||
inherit update-rc.d useradd
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
GROUPADD_PACKAGES = "${PN}"
|
||||
|
||||
USERADD_PARAM:${PN} = "-u 1000 -d /home/diya -r -s /bin/sh diya"
|
||||
|
||||
INITSCRIPT_NAME = "confd"
|
||||
INITSCRIPT_PARAMS = "start 80 S ."
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/${sysconfdir}/init.d/
|
||||
install -m 0755 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd
|
||||
install -d ${D}/usr/bin/
|
||||
install -d ${D}/etc/default/volatiles
|
||||
install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
|
||||
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/bin/expandfs.sh
|
||||
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
l root root 0644 /etc/network/interfaces /home/diya/etc/network/interfaces
|
||||
l root root 0644 /etc/dropbear /home/diya/etc/dropbear
|
@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="Auto deployment configuration from media"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Start $DESC: "
|
||||
if [ -f "/boot/fs_resize" ]; then
|
||||
/usr/bin/expandfs.sh
|
||||
touch /boot/home_partition_should_be_formated
|
||||
rm /boot/fs_resize
|
||||
reboot
|
||||
fi
|
||||
if [ -f "/boot/home_partition_should_be_formated" ]; then
|
||||
echo "Trying to format the home partition"
|
||||
umount /dev/mmcblk0p3
|
||||
yes | mkfs.ext4 /dev/mmcblk0p3
|
||||
mount /dev/mmcblk0p3 /home
|
||||
mkdir -p /home/diya/etc/network
|
||||
mkdir -p /home/diya/etc/dropbear
|
||||
chown -R diya:diya /home/diya
|
||||
rm /boot/home_partition_should_be_formated
|
||||
fi
|
||||
if [ -e "/boot/install" ];then
|
||||
cp -rf /boot/install/* /home/diya
|
||||
rm -rf /boot/install
|
||||
reboot
|
||||
fi
|
||||
# display information
|
||||
# disable wifi power save
|
||||
/usr/sbin/iw wlan0 set power_save off
|
||||
/sbin/ip a
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,31 +0,0 @@
|
||||
#! /bin/sh
|
||||
line=$(
|
||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p3
|
||||
p
|
||||
q
|
||||
EOF
|
||||
)
|
||||
|
||||
echo "Partition: $line"
|
||||
#start_sector=$(echo "$line" | cut -d' ' -f14)
|
||||
start_sector=$(echo "$line" | cut -d' ' -f15)
|
||||
echo "Start sector is: $start_sector"
|
||||
|
||||
if [ -z "$start_sector" ]; then
|
||||
echo "Cannot find the start sector"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Expanding the partition"
|
||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0
|
||||
d
|
||||
3
|
||||
n # new partition
|
||||
p # primary partition
|
||||
3 # partition number 3
|
||||
$start_sector
|
||||
# default - end of disk
|
||||
p # print the in-memory partition table
|
||||
w # write the partition table
|
||||
q # and we're done
|
||||
EOF
|
@ -1 +0,0 @@
|
||||
resize the partition
|
@ -1,73 +0,0 @@
|
||||
From 7117dbf8b8defcf69f7aac3f7daf97ec00e5e73a Mon Sep 17 00:00:00 2001
|
||||
From: Xuan Sang LE <xsang.le@gmail.com>
|
||||
Date: Wed, 15 Dec 2021 02:24:37 +0100
|
||||
Subject: [PATCH] Update configure
|
||||
|
||||
---
|
||||
platforms/unix/config/configure | 53 ---------------------------------
|
||||
1 file changed, 53 deletions(-)
|
||||
|
||||
diff --git a/platforms/unix/config/configure b/platforms/unix/config/configure
|
||||
index f9e8c24aa5..85aacaa5e6 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -13292,59 +13292,6 @@ fi
|
||||
|
||||
|
||||
|
||||
-# Check size assumptions of basic data types
|
||||
-
|
||||
-
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"size of int\"" >&5
|
||||
-$as_echo_n "checking \"size of int\"... " >&6; }
|
||||
- if test "$cross_compiling" = yes; then :
|
||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
-as_fn_error $? "cannot run test program while cross compiling
|
||||
-See \`config.log' for more details" "$LINENO" 5; }
|
||||
-else
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-#include <sys/types.h>
|
||||
- int main(){return(sizeof(int) == 4)?0:1;}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_run "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"okay\"" >&5
|
||||
-$as_echo "\"okay\"" >&6; }
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"bad\"" >&5
|
||||
-$as_echo "\"bad\"" >&6; }
|
||||
- as_fn_error $? "\"one or more basic data types has an incompatible size: giving up\"" "$LINENO" 5
|
||||
-fi
|
||||
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
-fi
|
||||
-
|
||||
-
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"size of double\"" >&5
|
||||
-$as_echo_n "checking \"size of double\"... " >&6; }
|
||||
- if test "$cross_compiling" = yes; then :
|
||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
-as_fn_error $? "cannot run test program while cross compiling
|
||||
-See \`config.log' for more details" "$LINENO" 5; }
|
||||
-else
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-#include <sys/types.h>
|
||||
- int main(){return(sizeof(double) == 8)?0:1;}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_run "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"okay\"" >&5
|
||||
-$as_echo "\"okay\"" >&6; }
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"bad\"" >&5
|
||||
-$as_echo "\"bad\"" >&6; }
|
||||
- as_fn_error $? "\"one or more basic data types has an incompatible size: giving up\"" "$LINENO" 5
|
||||
-fi
|
||||
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
-fi
|
||||
|
||||
|
||||
# The cast to long int works around a bug in the HP C Compiler
|
@ -1,2 +0,0 @@
|
||||
#! /bin/sh
|
||||
LD_LIBRARY_PATH=/opt/squeak /opt/squeak/squeak $@
|
@ -1,52 +0,0 @@
|
||||
DESCRIPTION = "Pharo VM"
|
||||
# DEPENDS = ""
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
#FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
DEPENDS = "libsdl2 mesa freetype"
|
||||
|
||||
# pharo 9.0
|
||||
# SRCREV = "${AUTOREV}"
|
||||
SRCREV = "27d2d9f0c76b5805ff43578272e809aeb665a498"
|
||||
SRC_URI = "git://github.com/OpenSmalltalk/opensmalltalk-vm.git;branch=Cog;"
|
||||
SRC_URI += "file://001-disable-run-test-in-cross-compile.patch"
|
||||
SRC_URI += "file://svm"
|
||||
|
||||
S="${WORKDIR}/git/platforms/unix/config"
|
||||
B="${WORKDIR}/build"
|
||||
inherit autotools
|
||||
|
||||
TARGET_CFLAGS:raspberrypi += " -D__ARM_ARCH_6__ "
|
||||
TARGET_CF_GLAGS += " -DDEBUGVM=0 "
|
||||
|
||||
EXTRA_OECONF:append=" --with-sysroot=${STAGING_DIR_TARGET} \
|
||||
--without-npsqueak"
|
||||
EXTRA_OECONF:raspberrypi:append = " --with-src=src/spur32.cog "
|
||||
EXTRA_OECONF:raspberrypi0-2w-64:append = " --with-src=src/spur64.cog "
|
||||
|
||||
|
||||
INSANE_SKIP += " configure-unsafe "
|
||||
|
||||
do_configure() {
|
||||
cd ${WORKDIR}/git/ && ./scripts/updateSCCSVersions
|
||||
cp ${WORKDIR}/git/building/linux32ARMv6/pharo.cog.spur/plugins.* ${B}/
|
||||
cd ${B}
|
||||
oe_runconf
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
cd ${B}
|
||||
mkdir -p ${B}/output
|
||||
ROOT=${B}/output make -j 4 install-squeak install-plugins
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/opt/squeak
|
||||
install -d ${D}/usr/bin
|
||||
install -m 0755 ${B}/output/usr/lib/squeak/* ${D}/opt/squeak
|
||||
install -m 0755 ${WORKDIR}/svm ${D}/usr/bin
|
||||
}
|
||||
PACKAGES = "${PN} ${PN}-dbg"
|
||||
FILES:${PN} += "/opt/squeak/*"
|
@ -1,19 +0,0 @@
|
||||
--- a/cmake/vmmaker.cmake
|
||||
+++ b/cmake/vmmaker.cmake
|
||||
@@ -62,16 +62,6 @@ if(GENERATE_SOURCES)
|
||||
set(VMMAKER_VM ${VMMAKER_DIR}/vm/PharoConsole.exe)
|
||||
set(VM_URL https://files.pharo.org/vm/pharo-spur64/win/PharoVM-8.6.1-e829a1da-StockReplacement-win64-bin_signed.zip)
|
||||
set(VM_URL_HASH SHA256=d24a2fb5d8d744a4c8ce0bc332051960d6f5d8db9f75754317b5aee8eafb7cb1)
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND (${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64"))
|
||||
- message("Defining Linux AARCH64 VM to download for code generation")
|
||||
- set(VMMAKER_VM ${VMMAKER_DIR}/vm/pharo)
|
||||
- set(VM_URL https://files.pharo.org/vm/pharo-spur64/Linux-aarch64/stable.zip)
|
||||
- set(VM_URL_HASH SHA256=924e5a25f8e2d51773e8571ebefa2404da9561418af2b54af1330357b75ae865)
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l"))
|
||||
- message("Defining Linux ARM 32 VM to download for code generation")
|
||||
- set(VMMAKER_VM ${VMMAKER_DIR}/vm/pharo)
|
||||
- set(VM_URL https://files.pharo.org/vm/pharo-spur32/Linux-armv7l/stable.zip)
|
||||
- set(VM_URL_HASH SHA256=1816e44523e08e7effe3226a3cabc4ea701fb9582c00456ab90936efb5c645c4)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
message("Defining Linux VM x86_64 to download for code generation")
|
||||
set(VMMAKER_VM ${VMMAKER_DIR}/vm/pharo)
|
@ -1,35 +0,0 @@
|
||||
DESCRIPTION = "Pharo VM"
|
||||
# DEPENDS = ""
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
#FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
DEPENDS = "libsdl2 libdrm tslib mesa mesa-demos"
|
||||
|
||||
# pharo 9.0
|
||||
SRCREV = "${AUTOREV}"
|
||||
IMAGE_FILE ?= "latest-64.zip;sha256sum=5fcb782c39663391402d915d29251815be3fa378f1398a41a702387b5fcc8577;"
|
||||
# TODO add checksum form 64 bits images
|
||||
IMAGE_FILE:raspberrypi = "latest-32.zip;sha256sum=660e9fd0c6bd5650574cbbea0773d17a75f05be14ce68a119727dc9200a49a30;"
|
||||
#SRCREV = "961e9c4589540b2cccb924f17bb051bc8c9ae5c1"
|
||||
SRC_URI = "git://github.com/pharo-project/opensmalltalk-vm.git;branch=pharo-9;"
|
||||
SRC_URI += "http://files.pharo.org/image/90/${IMAGE_FILE};"
|
||||
SRC_URI += "file://001-patch-vm-maker.patch"
|
||||
S="${WORKDIR}/git"
|
||||
|
||||
EXTRA_OECMAKE += "-DFEATURE_LIB_GIT2=off -DFEATURE_LIB_CAIRO=off "
|
||||
TARGET_CFLAGS:raspberrypi += "-D__ARM_ARCH_6__"
|
||||
inherit cmake
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/opt/pharo
|
||||
install -d ${D}/opt/pharo/images
|
||||
install -m 0755 ${B}/build/vm/* ${D}/opt/pharo
|
||||
install -m 0755 ${WORKDIR}/*.image ${D}/opt/pharo/images/
|
||||
install -m 0755 ${WORKDIR}/*.changes ${D}/opt/pharo/images/
|
||||
install -m 0755 ${WORKDIR}/*.sources ${D}/opt/pharo/images/
|
||||
}
|
||||
PACKAGES = "${PN} ${PN}-dbg"
|
||||
FILES:${PN} += "/opt/pharo/*"
|
||||
# FILES:${PN} += "/opt/images/*"
|
@ -1,26 +0,0 @@
|
||||
SUMMARY = "bitbake-layers recipe"
|
||||
DESCRIPTION = "Recipe created by bitbake-layers"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
DEPENDS += "libsdl2"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
SRC_URI = "file://sdl_test.cpp file://sdlgl.c file://sdlglshader.c"
|
||||
TARGET_CC_ARCH += "${LDFLAGS}"
|
||||
|
||||
do_compile() {
|
||||
${CXX} ${WORKDIR}/sdl_test.cpp `pkg-config --cflags --libs sdl2` -o ${WORKDIR}/sdl_test
|
||||
${CC} ${WORKDIR}/sdlgl.c `pkg-config --cflags --libs sdl2` -lGL -o ${WORKDIR}/sdlgl
|
||||
${CC} ${WORKDIR}/sdlglshader.c `pkg-config --cflags --libs sdl2` -lGL -o ${WORKDIR}/sdlglshader
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/usr/bin
|
||||
install -m 0755 ${WORKDIR}/sdl_test ${D}/usr/bin
|
||||
install -m 0755 ${WORKDIR}/sdlgl ${D}/usr/bin
|
||||
install -m 0755 ${WORKDIR}/sdlglshader ${D}/usr/bin
|
||||
# for manual copy test applications on target from tmp dir
|
||||
install -m 0755 ${WORKDIR}/sdl_test /tmp
|
||||
install -m 0755 ${WORKDIR}/sdlgl /tmp
|
||||
install -m 0755 ${WORKDIR}/sdlglshader /tmp
|
||||
}
|
@ -1,112 +0,0 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
SDL_Init( 0 );
|
||||
|
||||
std::cout << "Testing video drivers..." << '\n';
|
||||
std::vector< bool > drivers( SDL_GetNumVideoDrivers() );
|
||||
for( int i = 0; i < drivers.size(); ++i )
|
||||
{
|
||||
drivers[ i ] = ( 0 == SDL_VideoInit( SDL_GetVideoDriver( i ) ) );
|
||||
SDL_VideoQuit();
|
||||
}
|
||||
|
||||
std::cout << "SDL_VIDEODRIVER available:";
|
||||
for( int i = 0; i < drivers.size(); ++i )
|
||||
{
|
||||
std::cout << " " << SDL_GetVideoDriver( i );
|
||||
}
|
||||
std::cout << '\n';
|
||||
|
||||
std::cout << "SDL_VIDEODRIVER usable :";
|
||||
for( int i = 0; i < drivers.size(); ++i )
|
||||
{
|
||||
if( !drivers[ i ] ) continue;
|
||||
std::cout << " " << SDL_GetVideoDriver( i );
|
||||
}
|
||||
std::cout << '\n';
|
||||
|
||||
if( SDL_Init( SDL_INIT_EVERYTHING ) < 0 )
|
||||
{
|
||||
std::cerr << "SDL_Init(): " << SDL_GetError() << '\n';
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
std::cout << "SDL_VIDEODRIVER selected : " << SDL_GetCurrentVideoDriver() << '\n';
|
||||
|
||||
SDL_Window* window = SDL_CreateWindow
|
||||
(
|
||||
"SDL2",
|
||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
0,0,
|
||||
SDL_WINDOW_SHOWN
|
||||
);
|
||||
if( nullptr == window )
|
||||
{
|
||||
std::cerr << "SDL_CreateWindow(): " << SDL_GetError() << '\n';
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
std::cout << "SDL_RENDER_DRIVER available:";
|
||||
for( int i = 0; i < SDL_GetNumRenderDrivers(); ++i )
|
||||
{
|
||||
SDL_RendererInfo info;
|
||||
SDL_GetRenderDriverInfo( i, &info );
|
||||
std::cout << " " << info.name;
|
||||
}
|
||||
std::cout << '\n';
|
||||
SDL_SetWindowFullscreen(window,SDL_WINDOW_FULLSCREEN);
|
||||
SDL_Renderer* renderer = SDL_CreateRenderer( window, -1, SDL_RENDERER_ACCELERATED );
|
||||
if( nullptr == renderer )
|
||||
{
|
||||
std::cerr << "SDL_CreateRenderer(): " << SDL_GetError() << '\n';
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
SDL_RendererInfo info;
|
||||
SDL_GetRendererInfo( renderer, &info );
|
||||
std::cout << "SDL_RENDER_DRIVER selected : " << info.name << '\n';
|
||||
SDL_DisplayMode DM;
|
||||
SDL_GetCurrentDisplayMode(0, &DM);
|
||||
printf("Display size %dx%d\n", DM.w, DM.h);
|
||||
bool running = true;
|
||||
while( running )
|
||||
{
|
||||
SDL_Event ev;
|
||||
while( SDL_PollEvent( &ev ) )
|
||||
{
|
||||
switch (ev.type)
|
||||
{
|
||||
case SDL_QUIT:
|
||||
/* code */
|
||||
running = false;
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
if(ev.key.keysym.sym == SDLK_ESCAPE)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
break;
|
||||
case SDL_FINGERDOWN:
|
||||
case SDL_FINGERMOTION:
|
||||
std::cout << "Mouse finger down: x = " << ev.tfinger.x << ", y = " << ev.tfinger.y << std::endl;
|
||||
SDL_WarpMouseInWindow(window, (int)(ev.tfinger.x*DM.w), (int)(ev.tfinger.y*DM.h));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_SetRenderDrawColor( renderer, rand() % 256, rand() % 256, rand() % 256, SDL_ALPHA_OPAQUE );
|
||||
SDL_RenderClear( renderer );
|
||||
SDL_RenderPresent( renderer );
|
||||
SDL_Delay(50);
|
||||
}
|
||||
|
||||
SDL_DestroyRenderer( renderer );
|
||||
SDL_DestroyWindow( window );
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
@ -1,166 +0,0 @@
|
||||
// To compile with gcc: (tested on Ubuntu 14.04 64bit):
|
||||
// g++ sdl2_opengl.cpp -lSDL2 -lGL
|
||||
// To compile with msvc: (tested on Windows 7 64bit)
|
||||
// cl sdl2_opengl.cpp /I C:\sdl2path\include /link C:\path\SDL2.lib C:\path\SDL2main.lib /SUBSYSTEM:CONSOLE /NODEFAULTLIB:libcmtd.lib opengl32.lib
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
typedef int32_t i32;
|
||||
typedef uint32_t u32;
|
||||
typedef int32_t b32;
|
||||
|
||||
#define WinWidth 480
|
||||
#define WinHeight 640
|
||||
|
||||
int main(int ArgCount, char **Args)
|
||||
{
|
||||
|
||||
u32 WindowFlags = SDL_WINDOW_OPENGL;
|
||||
SDL_Window *Window = SDL_CreateWindow("OpenGL Test", 0, 0, 0, 0, WindowFlags);
|
||||
assert(Window);
|
||||
SDL_GLContext Context = SDL_GL_CreateContext(Window);
|
||||
|
||||
static GLfloat v0[] = {-1.0f, -1.0f, 1.0f};
|
||||
static GLfloat v1[] = {1.0f, -1.0f, 1.0f};
|
||||
static GLfloat v2[] = {1.0f, 1.0f, 1.0f};
|
||||
static GLfloat v3[] = {-1.0f, 1.0f, 1.0f};
|
||||
static GLfloat v4[] = {-1.0f, -1.0f, -1.0f};
|
||||
static GLfloat v5[] = {1.0f, -1.0f, -1.0f};
|
||||
static GLfloat v6[] = {1.0f, 1.0f, -1.0f};
|
||||
static GLfloat v7[] = {-1.0f, 1.0f, -1.0f};
|
||||
static GLubyte red[] = {255, 0, 0, 255};
|
||||
static GLubyte green[] = {0, 255, 0, 255};
|
||||
static GLubyte blue[] = {0, 0, 255, 255};
|
||||
static GLubyte white[] = {255, 255, 255, 255};
|
||||
static GLubyte yellow[] = {0, 255, 255, 255};
|
||||
static GLubyte black[] = {0, 0, 0, 255};
|
||||
static GLubyte orange[] = {255, 255, 0, 255};
|
||||
static GLubyte purple[] = {255, 0, 255, 0};
|
||||
SDL_SetWindowFullscreen(Window,SDL_WINDOW_FULLSCREEN);
|
||||
SDL_DisplayMode DM;
|
||||
SDL_GetCurrentDisplayMode(0, &DM);
|
||||
printf("Display size %dx%d\n", DM.w, DM.h);
|
||||
int Running = 1;
|
||||
while (Running)
|
||||
{
|
||||
SDL_Event Event;
|
||||
while (SDL_PollEvent(&Event))
|
||||
{
|
||||
if (Event.type == SDL_KEYDOWN)
|
||||
{
|
||||
switch (Event.key.keysym.sym)
|
||||
{
|
||||
case SDLK_ESCAPE:
|
||||
Running = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (Event.type == SDL_QUIT)
|
||||
{
|
||||
Running = 0;
|
||||
}
|
||||
}
|
||||
|
||||
glViewport(0, 0, DM.w, DM.h);
|
||||
glClearColor(1.f, 0.f, 1.f, 0.f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
/* Send our triangle data to the pipeline. */
|
||||
glBegin(GL_TRIANGLES);
|
||||
|
||||
glColor4ubv(red);
|
||||
glVertex3fv(v0);
|
||||
glColor4ubv(green);
|
||||
glVertex3fv(v1);
|
||||
glColor4ubv(blue);
|
||||
glVertex3fv(v2);
|
||||
|
||||
glColor4ubv(red);
|
||||
glVertex3fv(v0);
|
||||
glColor4ubv(blue);
|
||||
glVertex3fv(v2);
|
||||
glColor4ubv(white);
|
||||
glVertex3fv(v3);
|
||||
|
||||
glColor4ubv(green);
|
||||
glVertex3fv(v1);
|
||||
glColor4ubv(black);
|
||||
glVertex3fv(v5);
|
||||
glColor4ubv(orange);
|
||||
glVertex3fv(v6);
|
||||
|
||||
glColor4ubv(green);
|
||||
glVertex3fv(v1);
|
||||
glColor4ubv(orange);
|
||||
glVertex3fv(v6);
|
||||
glColor4ubv(blue);
|
||||
glVertex3fv(v2);
|
||||
|
||||
glColor4ubv(black);
|
||||
glVertex3fv(v5);
|
||||
glColor4ubv(yellow);
|
||||
glVertex3fv(v4);
|
||||
glColor4ubv(purple);
|
||||
glVertex3fv(v7);
|
||||
|
||||
glColor4ubv(black);
|
||||
glVertex3fv(v5);
|
||||
glColor4ubv(purple);
|
||||
glVertex3fv(v7);
|
||||
glColor4ubv(orange);
|
||||
glVertex3fv(v6);
|
||||
|
||||
glColor4ubv(yellow);
|
||||
glVertex3fv(v4);
|
||||
glColor4ubv(red);
|
||||
glVertex3fv(v0);
|
||||
glColor4ubv(white);
|
||||
glVertex3fv(v3);
|
||||
|
||||
glColor4ubv(yellow);
|
||||
glVertex3fv(v4);
|
||||
glColor4ubv(white);
|
||||
glVertex3fv(v3);
|
||||
glColor4ubv(purple);
|
||||
glVertex3fv(v7);
|
||||
|
||||
glColor4ubv(white);
|
||||
glVertex3fv(v3);
|
||||
glColor4ubv(blue);
|
||||
glVertex3fv(v2);
|
||||
glColor4ubv(orange);
|
||||
glVertex3fv(v6);
|
||||
|
||||
glColor4ubv(white);
|
||||
glVertex3fv(v3);
|
||||
glColor4ubv(orange);
|
||||
glVertex3fv(v6);
|
||||
glColor4ubv(purple);
|
||||
glVertex3fv(v7);
|
||||
|
||||
glColor4ubv(green);
|
||||
glVertex3fv(v1);
|
||||
glColor4ubv(red);
|
||||
glVertex3fv(v0);
|
||||
glColor4ubv(yellow);
|
||||
glVertex3fv(v4);
|
||||
|
||||
glColor4ubv(green);
|
||||
glVertex3fv(v1);
|
||||
glColor4ubv(yellow);
|
||||
glVertex3fv(v4);
|
||||
glColor4ubv(black);
|
||||
glVertex3fv(v5);
|
||||
|
||||
glEnd();
|
||||
|
||||
SDL_GL_SwapWindow(Window);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,209 +0,0 @@
|
||||
// To compile with gcc: (tested on Ubuntu 14.04 64bit):
|
||||
// g++ sdl2_opengl.cpp -lSDL2 -lGL
|
||||
// To compile with msvc: (tested on Windows 7 64bit)
|
||||
// cl sdl2_opengl.cpp /I C:\sdl2path\include /link C:\path\SDL2.lib C:\path\SDL2main.lib /SUBSYSTEM:CONSOLE /NODEFAULTLIB:libcmtd.lib opengl32.lib
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
typedef int32_t i32;
|
||||
typedef uint32_t u32;
|
||||
typedef int32_t b32;
|
||||
|
||||
#define WinWidth 480
|
||||
#define WinHeight 640
|
||||
#define VERTEX_SHADER "\
|
||||
void main() \
|
||||
{ \
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \
|
||||
} \
|
||||
"
|
||||
|
||||
#define FRAG_SHADER "\
|
||||
void main() \
|
||||
{ \
|
||||
gl_FragColor = vec4(1.0,0.0,0.0,1.0); \
|
||||
} \
|
||||
"
|
||||
|
||||
GLuint load_shader(c)
|
||||
{
|
||||
|
||||
// Create the shaders
|
||||
GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER);
|
||||
GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
|
||||
GLint Result = GL_FALSE;
|
||||
int InfoLogLength;
|
||||
char *source;
|
||||
char buff[2048];
|
||||
// Compile Vertex Shader
|
||||
source = VERTEX_SHADER;
|
||||
printf("Compiling vertex shader \n");
|
||||
glShaderSource(VertexShaderID, 1, &source, NULL);
|
||||
glCompileShader(VertexShaderID);
|
||||
|
||||
memset(buff, 0, sizeof(buff));
|
||||
// Check Vertex Shader
|
||||
glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result);
|
||||
glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||
if (InfoLogLength > 0)
|
||||
{
|
||||
glGetShaderInfoLog(VertexShaderID, InfoLogLength, NULL, &buff);
|
||||
printf("%s\n", buff);
|
||||
}
|
||||
|
||||
// Compile Fragment Shader
|
||||
source = FRAG_SHADER;
|
||||
printf("Compiling frag shader \n");
|
||||
glShaderSource(FragmentShaderID, 1, &source, NULL);
|
||||
glCompileShader(FragmentShaderID);
|
||||
|
||||
// Check Fragment Shader
|
||||
memset(buff, 0, sizeof(buff));
|
||||
glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result);
|
||||
glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||
if (InfoLogLength > 0)
|
||||
{
|
||||
glGetShaderInfoLog(FragmentShaderID, InfoLogLength, NULL, buff);
|
||||
printf("%s\n", buff);
|
||||
}
|
||||
|
||||
// Link the program
|
||||
printf("Linking program\n");
|
||||
GLuint ProgramID = glCreateProgram();
|
||||
glAttachShader(ProgramID, VertexShaderID);
|
||||
glAttachShader(ProgramID, FragmentShaderID);
|
||||
glLinkProgram(ProgramID);
|
||||
|
||||
// Check the program
|
||||
memset(buff, 0, sizeof(buff));
|
||||
glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result);
|
||||
glGetProgramiv(ProgramID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||
if (InfoLogLength > 0)
|
||||
{
|
||||
glGetProgramInfoLog(ProgramID, InfoLogLength, NULL, buff);
|
||||
printf("Linking: %s\n", buff);
|
||||
}
|
||||
|
||||
glDetachShader(ProgramID, VertexShaderID);
|
||||
glDetachShader(ProgramID, FragmentShaderID);
|
||||
|
||||
glDeleteShader(VertexShaderID);
|
||||
glDeleteShader(FragmentShaderID);
|
||||
|
||||
return ProgramID;
|
||||
}
|
||||
|
||||
int main(int ArgCount, char **Args)
|
||||
{
|
||||
|
||||
u32 WindowFlags = SDL_WINDOW_OPENGL;
|
||||
|
||||
SDL_Window *Window = SDL_CreateWindow("OpenGL Test", 0, 0, 0, 0, WindowFlags);
|
||||
assert(Window);
|
||||
SDL_GLContext Context = SDL_GL_CreateContext(Window);
|
||||
SDL_SetWindowFullscreen(Window, SDL_WINDOW_FULLSCREEN);
|
||||
SDL_DisplayMode DM;
|
||||
SDL_GetCurrentDisplayMode(0, &DM);
|
||||
printf("Display size %dx%d\n", DM.w, DM.h);
|
||||
int Running = 1;
|
||||
|
||||
// openGL part
|
||||
GLuint VertexArrayID;
|
||||
glGenVertexArrays(1, &VertexArrayID);
|
||||
glBindVertexArray(VertexArrayID);
|
||||
printf("Vertex Array ID %d\n", VertexArrayID);
|
||||
// Create and compile our GLSL program from the shaders
|
||||
GLuint programID = load_shader();
|
||||
GLfloat tmp_buffer[9];
|
||||
static const GLfloat g_vertex_buffer_data[] = {
|
||||
-1.0f,
|
||||
-1.0f,
|
||||
0.0f,
|
||||
1.0f,
|
||||
-1.0f,
|
||||
0.0f,
|
||||
0.0f,
|
||||
1.0f,
|
||||
0.0f,
|
||||
};
|
||||
|
||||
GLuint vertexbuffer;
|
||||
GLint currid = -1;
|
||||
glGenBuffers(1, &vertexbuffer);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
|
||||
glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
|
||||
printf("Buffer ID %d of size: %d\n", vertexbuffer, sizeof(tmp_buffer));
|
||||
// read back buffer data
|
||||
memset(tmp_buffer, 0, sizeof(tmp_buffer));
|
||||
glGetBufferSubData(GL_ARRAY_BUFFER, 0,sizeof(tmp_buffer), tmp_buffer );
|
||||
printf("Read back buffer data: \n");
|
||||
|
||||
for(int i=0; i< 9; i++)
|
||||
{
|
||||
printf("%d: %.2f\n", i, tmp_buffer[i]);
|
||||
}
|
||||
glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &currid);
|
||||
printf("current id: %d\n",currid);
|
||||
while (Running)
|
||||
{
|
||||
SDL_Event Event;
|
||||
while (SDL_PollEvent(&Event))
|
||||
{
|
||||
if (Event.type == SDL_KEYDOWN)
|
||||
{
|
||||
switch (Event.key.keysym.sym)
|
||||
{
|
||||
case SDLK_ESCAPE:
|
||||
Running = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (Event.type == SDL_QUIT)
|
||||
{
|
||||
Running = 0;
|
||||
}
|
||||
}
|
||||
|
||||
glViewport(0, 0, DM.w, DM.h);
|
||||
glClearColor(1.f, 0.f, 1.f, 0.f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
|
||||
// Use our shader
|
||||
glUseProgram(programID);
|
||||
|
||||
// 1rst attribute buffer : vertices
|
||||
glEnableVertexAttribArray(0);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
|
||||
glVertexAttribPointer(
|
||||
0, // attribute 0. No particular reason for 0, but must match the layout in the shader.
|
||||
3, // size
|
||||
GL_FLOAT, // type
|
||||
GL_FALSE, // normalized?
|
||||
0, // stride
|
||||
(void *)0 // array buffer offset
|
||||
);
|
||||
|
||||
// Draw the triangle !
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3); // 3 indices starting at 0 -> 1 triangle
|
||||
|
||||
glDisableVertexAttribArray(0);
|
||||
/* Send our triangle data to the pipeline. */
|
||||
SDL_GL_SwapWindow(Window);
|
||||
}
|
||||
|
||||
|
||||
// Cleanup VBO
|
||||
glDeleteBuffers(1, &vertexbuffer);
|
||||
glDeleteVertexArrays(1, &VertexArrayID);
|
||||
glDeleteProgram(programID);
|
||||
return 0;
|
||||
}
|
5
recipes-kernel/linux/files/diya.cfg
Normal file
5
recipes-kernel/linux/files/diya.cfg
Normal file
@ -0,0 +1,5 @@
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_OVERLAY_FS=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_RD_GZIP=y
|
@ -1 +0,0 @@
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
@ -2,5 +2,5 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
|
||||
# inherit kernel
|
||||
SRC_URI += " \
|
||||
file://goodix.cfg \
|
||||
file://diya.cfg \
|
||||
"
|
@ -1,5 +0,0 @@
|
||||
DEPENS += " mesa libdrm virtual/libgbm alsa virtual/libgles2 "
|
||||
EXTRA_OECONF:append=" --disable-video-x11 \
|
||||
--disable-video-wayland \
|
||||
--enable-video-kmsdrm \
|
||||
--enable-video-opengles"
|
@ -2,7 +2,11 @@
|
||||
# long-description: Creates a partitioned SD card image for use with
|
||||
# Raspberry Pi. Boot files are located in the first vfat partition.
|
||||
|
||||
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 50
|
||||
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --size 150
|
||||
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 32
|
||||
# read only roofs
|
||||
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --size 150 --exclude-path home/ var/etc/
|
||||
# modifiable configurations stored in /var/etc
|
||||
part /var/etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var/etc --ondisk mmcblk0 --fstype=ext4 --label diya --align 1024 --size 32
|
||||
# home partition
|
||||
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk0 --fstype=ext4 --label home --align 1024 --size 16
|
||||
# part /home --ondisk mmcblk0 --fstype=vfat --label music --active --align 1024 --size 16
|
Reference in New Issue
Block a user