1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2025-08-01 05:31:02 +02:00

Compare commits

...

150 Commits

Author SHA1 Message Date
21068dce99 fix syntax error 2025-03-28 11:40:40 +01:00
e8e3a82bfe refactory remove all common recipes 2025-03-27 20:24:19 +01:00
eaeb4e9f2b add mc tool 2023-08-20 21:48:37 +02:00
c5895e98cf add system update tools 2023-08-02 19:38:44 +02:00
5004ec3efa add system update tools 2023-08-02 19:03:40 +02:00
2f3f3699b3 add system update tools 2023-08-02 18:35:11 +02:00
d39686df00 add system update tools 2023-08-02 18:28:34 +02:00
c7b653aec0 add system update tools 2023-08-02 18:19:25 +02:00
ef9c29177f add system update tools 2023-08-02 18:17:51 +02:00
28e193073c add system update tools 2023-08-02 18:14:21 +02:00
668434388c add system update tools 2023-08-02 18:13:31 +02:00
631e90c985 add system update tools 2023-08-02 18:07:55 +02:00
c0bc10f434 add system update tools 2023-08-02 17:51:11 +02:00
c6e7fb2290 add base initscripts to initramfs image 2023-08-02 17:15:01 +02:00
6eae0b51c0 add base initscripts to initramfs image 2023-08-02 16:33:43 +02:00
46bb69221a add base initscripts to initramfs image 2023-08-02 16:14:34 +02:00
715588e723 add base initscripts to initramfs image 2023-08-02 15:59:05 +02:00
2b6763d6f3 use sysvinit 2023-08-02 11:03:50 +02:00
b6388526ae use sysvinit 2023-08-02 10:59:28 +02:00
2f344c40e4 use sysvinit 2023-08-02 10:47:38 +02:00
dbc5d431a0 use sysvinit 2023-08-02 10:33:39 +02:00
afbfe3bba0 use sysvinit 2023-08-02 10:17:53 +02:00
e552576431 use sysvinit 2023-08-02 10:13:00 +02:00
8ba74de514 use sysvinit 2023-08-02 10:08:52 +02:00
aad6fb62b4 use sysvinit 2023-08-02 10:02:19 +02:00
9d91552822 use sysvinit 2023-08-02 09:54:53 +02:00
7f5e6e7c32 use sysvinit 2023-08-02 09:51:33 +02:00
7978bdd326 use sysvinit 2023-08-02 09:51:11 +02:00
a11dda3253 use sysvinit 2023-08-02 01:04:31 +02:00
bb1c6beb07 use sysvinit 2023-08-02 00:51:40 +02:00
a23a5394b0 use sysvinit 2023-08-02 00:45:45 +02:00
d6e79e0c32 use sysvinit 2023-08-02 00:45:06 +02:00
a3ece685aa use sysvinit 2023-08-02 00:33:43 +02:00
4eaa3b3aee use sysvinit 2023-08-02 00:29:37 +02:00
98cfc9467c use sysvinit 2023-08-02 00:13:06 +02:00
08d987160b use sysvinit 2023-08-02 00:05:19 +02:00
72d100eb82 use sysvinit 2023-08-01 23:55:15 +02:00
e2d877de04 use sysvinit 2023-08-01 23:53:34 +02:00
5162e55193 use sysvinit 2023-08-01 23:46:26 +02:00
0e2b5af6fc use sysvinit 2023-08-01 23:38:06 +02:00
d9d38937e4 use sysvinit 2023-08-01 23:26:32 +02:00
ab9e261c18 use sysvinit 2023-08-01 23:25:24 +02:00
7660ef9437 use sysvinit 2023-08-01 23:23:18 +02:00
6436a22054 use sysvinit 2023-08-01 23:15:55 +02:00
ca78790be1 use sysvinit 2023-08-01 23:15:40 +02:00
ac4af715b3 use sysvinit 2023-08-01 22:55:15 +02:00
e27a7ba7d7 use sysvinit 2023-08-01 22:41:13 +02:00
5d0af8c898 use sysvinit 2023-08-01 22:30:00 +02:00
79fa7b8135 use sysvinit 2023-08-01 22:03:09 +02:00
de319e1292 use sysvinit 2023-08-01 19:34:18 +02:00
734bb8d960 use sysvinit 2023-08-01 19:10:13 +02:00
5f6c03253f use sysvinit 2023-08-01 18:59:16 +02:00
37a3490424 use sysvinit 2023-08-01 18:28:05 +02:00
692ad53c19 use sysvinit 2023-08-01 18:12:36 +02:00
8a17daee35 use sysvinit 2023-08-01 18:02:30 +02:00
2f92704dfe use busybox init by default 2023-08-01 17:35:15 +02:00
44d73141b5 use busybox init by default 2023-08-01 17:22:17 +02:00
6e6aead168 use busybox init by default 2023-08-01 17:21:44 +02:00
1cc8daad6e use busybox init by default 2023-08-01 17:10:39 +02:00
ee33311fce use busybox init by default 2023-08-01 17:08:42 +02:00
c11a10dac8 use busybox init by default 2023-08-01 17:07:33 +02:00
ece893cfdb use busybox init by default 2023-08-01 16:11:56 +02:00
da241a96dc use busybox init by default 2023-08-01 16:07:59 +02:00
2c10017bbb add missing e2fs tools 2023-08-01 16:01:20 +02:00
d220929d4b remove unused kernel image 2023-08-01 15:33:24 +02:00
985a0bed60 add kernel modules to the initramfs 2023-08-01 15:27:18 +02:00
4c42c6d31d add kernel modules to the initramfs 2023-08-01 15:15:49 +02:00
def53409d3 remove lvm in initramfs 2023-08-01 15:02:58 +02:00
8802d3b491 remove lvm in initramfs 2023-08-01 15:01:27 +02:00
19d0f0e84c add missing packages 2023-08-01 14:46:39 +02:00
f014e70c30 add missing package 2023-08-01 14:40:09 +02:00
13df5da839 add missing recipe 2023-08-01 14:19:39 +02:00
5df11468d2 add support initramfs package 2023-08-01 14:19:18 +02:00
c52ffcea5c add support initramfs package 2023-08-01 14:05:53 +02:00
1b8c99a1c3 add support initramfs package 2023-08-01 13:59:46 +02:00
03b1c8bdfe add support initramfs package 2023-08-01 13:56:10 +02:00
6f5d090244 add support initramfs package 2023-08-01 13:09:45 +02:00
7832f01731 add support initramfs package 2023-08-01 13:08:30 +02:00
14871c09de add support initramfs package 2023-08-01 12:54:52 +02:00
0865a5c13b add initramfs recipe 2023-08-01 12:45:14 +02:00
e15b711ca5 add initramfs recipe 2023-08-01 12:37:00 +02:00
3cfd696935 add initramfs recipe 2023-08-01 12:06:45 +02:00
453785a03d use core-image-tiny-initramfs.bb for initramfs 2023-08-01 11:32:04 +02:00
fe5f1d7fc5 use core-image-tiny-initramfs.bb for initramfs 2023-08-01 11:31:20 +02:00
e26df6c6b1 enable uart for debugging 2023-08-01 10:36:31 +02:00
5fabd9a6d0 enable uart for debugging 2023-08-01 10:23:00 +02:00
036fab90e5 include initramfs image to boot partition 2023-07-31 22:32:47 +02:00
146df0a2ea include initramfs image to boot partition 2023-07-31 20:20:00 +02:00
2f9c00e2b6 include initramfs image to boot partition 2023-07-31 20:13:27 +02:00
c86d1d41ea include initramfs image to boot partition 2023-07-31 20:03:40 +02:00
6f4b4144f3 add initram fs image support 2023-07-31 18:21:17 +02:00
f14533c056 fix: update default envars 2023-07-29 00:41:07 +02:00
1b520e6713 fix: move wayland related default application config to /et/xdg 2023-07-29 00:35:25 +02:00
1cb28e0e01 fix: use correct config file in tofi 2023-07-29 00:20:07 +02:00
4d3dc0ef49 update file 2023-07-28 21:00:06 +02:00
a3563d9588 update file 2023-07-28 20:48:29 +02:00
057ce2194b update file 2023-07-28 20:34:03 +02:00
4a404a98d4 update file 2023-07-28 20:25:12 +02:00
13c10d0520 update release 2023-07-28 20:18:06 +02:00
6d2dbc23c1 remove geany, add leafpad 2023-07-28 20:02:38 +02:00
c2da0d7c6e remove geany, add leafpad 2023-07-28 19:59:18 +02:00
fb7aa9ba76 remove geany, add leafpad 2023-07-28 19:42:26 +02:00
929264eb7c add geany 2023-07-28 19:21:55 +02:00
10bdbba277 add gobject introspection 2023-07-28 15:33:19 +02:00
423bde4d26 update conf 2023-07-28 13:32:11 +02:00
f84ca2b690 add and use wtype 2023-07-27 20:41:44 +02:00
9565699a58 fix lawc conf 2023-07-27 16:41:29 +02:00
f70874bdc2 use default icon 2023-07-27 16:25:36 +02:00
b543ec49de add librsvg for SVG image 2023-07-27 15:01:05 +02:00
ae52626948 add librsvg for SVG image 2023-07-27 14:42:12 +02:00
4feda86a14 add tofi + icons 2023-07-27 13:32:23 +02:00
6b1d9b7dee add tofi + icons 2023-07-27 13:30:59 +02:00
336f9028d1 add tofi + icons 2023-07-27 12:45:47 +02:00
991a5393d4 add tofi + icons 2023-07-27 12:40:46 +02:00
ff4f319acd fix depend bug 2023-07-27 09:25:00 +02:00
d3349df12c add tool to sdk 2023-07-27 09:19:35 +02:00
474d0e6ac5 add tool to sdk 2023-07-27 09:10:01 +02:00
c46a65bba3 fix config error 2023-07-27 00:19:24 +02:00
863ea3fed3 fix config error 2023-07-27 00:17:23 +02:00
35832377c6 fix config error 2023-07-27 00:07:11 +02:00
9e3536aa73 fix recipes errors 2023-07-26 23:54:46 +02:00
49305da8d8 add custom config for wayland compositor and sfwbar 2023-07-26 23:25:42 +02:00
cf058762dd add custom config for wayland compositor and sfwbar 2023-07-26 23:21:06 +02:00
d659e76211 add gtk-layer-shell 2023-07-26 19:43:58 +02:00
2cbedc14c7 add wlopm 2023-07-26 16:27:43 +02:00
567ed192c4 add wlopm 2023-07-26 16:18:27 +02:00
c6c7b457c7 add wlopm 2023-07-26 16:16:33 +02:00
cb1f751458 add wlopm 2023-07-26 16:14:27 +02:00
695e5beb9f add wlopm 2023-07-26 16:10:06 +02:00
8df756a6e7 add wlopm 2023-07-26 15:45:05 +02:00
78a6473a6f add wlopm 2023-07-26 15:42:12 +02:00
07a057d7b3 add swaylock to sudo 2023-07-26 15:30:52 +02:00
a44cf639b6 remo dep on qt 2023-07-26 15:20:21 +02:00
1e68858b43 remove qt support 2023-07-26 15:02:10 +02:00
a07bff36fc customing swayidle 2023-07-26 14:17:13 +02:00
9b46056637 customing swaylock 2023-07-26 14:14:25 +02:00
76de7fee54 add some wayland based utilities 2023-07-26 14:10:54 +02:00
414f09c83a removing pam 2023-07-26 13:16:50 +02:00
9433ea77f0 customing wlroots 2023-07-26 13:12:48 +02:00
bc0bac3ebc add pam to distro feature 2023-07-26 12:52:47 +02:00
d74f0eae3e add labwc and foot from meta-wayland 2023-07-26 12:08:14 +02:00
718db6d18d add wl-roots 2023-07-26 11:51:06 +02:00
ff41d76c6a add wl-roots 2023-07-26 11:50:55 +02:00
b2d24c7d97 add wl-roots 2023-07-26 11:50:02 +02:00
055cc3334c add wl-roots 2023-07-26 11:49:32 +02:00
f5a86b5606 minor fix on labwc recipe 2023-07-26 11:24:58 +02:00
39c0eb80ec minor fix on labwc recipe 2023-07-26 11:24:00 +02:00
fe9a06d65f add labwc_git.bb recipe 2023-07-26 11:16:49 +02:00
d5eb6635fa export envar 2023-07-26 02:53:13 +02:00
af3e4bf92a add liberation-fonts font 2023-07-26 02:38:49 +02:00
30 changed files with 22 additions and 992 deletions

View File

@ -10,21 +10,13 @@ BBFILE_PATTERN_meta-rpi-diya = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-rpi-diya = "11"
LAYERDEPENDS_meta-rpi-diya = "core raspberrypi"
LAYERSERIES_COMPAT_meta-rpi-diya = "mickledore"
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 wayland "
DISTRO_FEATURES:remove = " x11 vulkan "
TOOLCHAIN_TARGET_TASK:append = " libgles3-mesa-dev "
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
MACHINE ?= "raspberrypi0-2w-64"
MACHINE ?= "raspberrypi3-64"
# MACHINE ?= "raspberrypi0-2w-64"
WKS_FILE="rpi.wks.in"
ROOT_HOME = "/root"
#MACHINE = "raspberrypi3-64"
#MACHINE = "raspberrypi2"
@ -36,7 +28,9 @@ RPI_USE_wS_28_DPI_LCD = "1"
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"
@ -66,6 +60,7 @@ 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

View File

@ -2,12 +2,6 @@ hostname = "diya"
do_install:append () {
cat << 'EOF' >> "${D}${sysconfdir}/profile"
# QT related setting
export QT_QPA_PLATFORM=wayland-egl
export XDG_RUNTIME_DIR=/home/$USER/.xdg
export PATH=$PATH:/home/$USER/bin
if [ ! -e "$XDG_RUNTIME_DIR" ]; then
mkdir -p "$XDG_RUNTIME_DIR"
fi
export DISK="mmcblk0"
EOF
}
}

View File

@ -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
}

View File

@ -1,2 +0,0 @@
DROPBEAR_EXTRA_ARGS="-w"
DROPBEAR_RSAKEY_DIR=/etc/dropbear

View File

@ -1,40 +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 \
mpg123
libsdl2-mixer \
#tslib
#tslib-tests
#tslib-calibrate
#tslib-uinput
libsdl2 \
libsdl2-ttf \
libsdl2-image \
libsdl2-mixer \
libsdl2-net \
# 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.

View File

@ -1 +0,0 @@
core-image-minimal.bbappend

View File

@ -1,62 +1,5 @@
inherit extrausers
inherit populate_sdk_qt5
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)}"
# usermod -p BJpK8ADNDLsGg root;
EXTRA_USERS_PARAMS = "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; \
usermod -a -G sudo diya \
"
IMAGE_BOOT_FILES:append = "fs_resize"
IMAGE_INSTALL:append = "libcurl \
libdrm \
libgbm \
libgles2 \
libegl-mesa \
libglapi \
libudev \
libinput \
pango \
libxkbcommon \
xkeyboard-config \
seatd \
gdk-pixbuf \
pixman \
cairo \
glib-2.0 \
udev \
glew \
freetype \
fontconfig \
gdk-pixbuf \
mesa \
sudo \
htop \
waveshare-2.8-lcd \
realtekfw \
diya-overlay \
i2c-tools \
bash \
nano \
wpa-supplicant \
evtest \
raspi-gpio \
rsync \
coreutils \
wayland wayland-protocols hwdata \
qtbase \
qtdeclarative \
qtquickcontrols2 \
qtquickcontrols \
qtgraphicaleffects \
qtwayland \
gdbserver \
"
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 "
IMAGE_INSTALL:append = " waveshare-2.8-lcd realtekfw "

View 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
}

View File

@ -1,24 +0,0 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
auto wlan0
iface wlan0 inet dhcp
# wireless_mode managed
# wireless_essid any
# wpa-driver wext
wpa-conf /etc/network/wpa_supplicant.conf
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
# Bluetooth networking
# iface bnep0 inet dhcp

View File

@ -1,7 +0,0 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += " file://itf_diya "
do_install:append () {
rm ${D}/etc/network/interfaces
install -m 0644 ${WORKDIR}/itf_diya ${D}/etc/network/interfaces
}

View File

@ -1,35 +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 30 S ."
do_install() {
install -d ${D}/${sysconfdir}/init.d/
install -d ${DEPLOY_DIR_IMAGE}
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}/
install -d ${D}/var/etc
install -d ${D}/var/etc/upper
install -d ${D}/var/etc/work
}

View File

@ -1,3 +0,0 @@
# d root root 0755 /var/etc/upper none
# d root root 0755 /var/etc/work none
# l root root 0644 /etc/dropbear /var/etc/dropbear

View File

@ -1,45 +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: "
# mount the overlay which is not auto mount by fstab
# this make /etc editable
mount -t overlay -o lowerdir=/etc,upperdir=/var/etc/upper,workdir=/var/etc/work overlay /etc
# for some reason the LCD backlight is turned off
# need to turn it on manually
echo 0 > /sys/class/backlight/backlight/bl_power
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/mmcblk0p4
yes | mkfs.ext4 /dev/mmcblk0p4
mount /dev/mmcblk0p4 /home
mkdir -p /home/diya
chown -R diya:diya /home/diya
rm /boot/home_partition_should_be_formated
fi
if [ -e "/boot/wpa_supplicant.conf" ];then
mv /boot/wpa_supplicant.conf /etc/network/
reboot
fi
# display information
# disable wifi power save
/usr/sbin/iw wlan0 set power_save off
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start}" >&2
exit 1
;;
esac
exit 0

View File

@ -1,31 +0,0 @@
#! /bin/sh
line=$(
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p4
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 # delete partition
4 # number 4
n # new partition
p # primary partition
4 # partition number 4
$start_sector
# default - end of disk
p # print the in-memory partition table
w # write the partition table
q # and we're done
EOF

View File

@ -1 +0,0 @@
resize the partition

View File

@ -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

View File

@ -1,2 +0,0 @@
#! /bin/sh
LD_LIBRARY_PATH=/opt/squeak /opt/squeak/squeak $@

View File

@ -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/*"

View File

@ -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)

View File

@ -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/*"

View File

@ -1,24 +0,0 @@
SUMMARY = "bitbake-layers recipe"
DESCRIPTION = "Recipe created by bitbake-layers"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit pkgconfig
DEPENDS += " libsdl2 mesa virtual/libgles2 virtual/libgl "
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` -lGLESv2 -o ${WORKDIR}/sdlgl
${CC} ${WORKDIR}/sdlglshader.c `pkg-config --cflags --libs sdl2` -lGLESv2 -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
}

View File

@ -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;
}

View File

@ -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 <GLES/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;
}

View File

@ -1,211 +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 <GLES/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;
}

View File

@ -1,9 +0,0 @@
do_install:append() {
# grant all permission to sudo group
sed -i 's/^#\s*\(%sudo\s*ALL=(ALL:ALL)\s*ALL\)/\1/' ${D}/${sysconfdir}/sudoers
# allow sudo group to power off/reboot system without password
cat << EOF >> ${D}/${sysconfdir}/sudoers
## sudo user group is allowed to execute halt and reboot
%sudo ALL=NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/poweroff
EOF
}

View File

@ -1,4 +0,0 @@
DEPENS += " mesa libdrm alsa virtual/libgbm virtual/libgles2 virtual/libgl udev libudev "
PACKAGECONFIG = " kmsdrm opengl gles2 alsa libusb "
# PACKAGECONFIG:remove = "x11 wayland"

View File

@ -1,7 +0,0 @@
# change default weston user to diya
do_install:append() {
if [ -e ${D}/${sysconfdir}/init.d/weston ]; then
sed -i 's#WESTON_USER=weston#WESTON_USER=diya WESTON_GROUP=weston#' ${D}/${sysconfdir}/init.d/weston
fi
}

View File

@ -1,2 +1,5 @@
CONFIG_TOUCHSCREEN_GOODIX=m
CONFIG_OVERLAY_FS=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y

View File

@ -1,2 +0,0 @@
PACKAGECONFIG += " freetype jpeg libpng kms openssl widgets gles2 eglfs udev "
PACKAGECONFIG:remove = " tests tools examples "