From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- meta-agl/.gitreview | 5 + meta-agl/README-AGL.md | 34 + meta-agl/README.md | 135 + meta-agl/agl-layers-overview.md | 25 + meta-agl/docs/devguides-book.yml | 15 + meta-agl/docs/profiles.md | 147 + .../classes/agl-basesystem-capability.bbclass | 32 + .../classes/agl-basesystem-common.bbclass | 48 + .../conf/include/agl-basesystem-base.inc | 18 + meta-agl/meta-agl-basesystem/conf/layer.conf | 16 + .../agl-service-ns-backupmanager_1.0.0.bb | 38 + .../agl-service-ns-notificationpersistent_1.0.0.bb | 31 + .../agl-service-ps-communication_1.0.0.bb | 39 + .../agl-service-ss-loggerservice_1.0.0.bb | 51 + .../agl-service-ss-powerservice_1.0.0.bb | 32 + .../agl-service-ss-resourcemanager_1.0.0.bb | 44 + .../agl-service-ss-systemmanager_1.0.0.bb | 47 + .../agl-service-ss-taskmanager_1.0.0.bb | 50 + .../agl-service-vs-positioning_1.0.0.bb | 53 + .../agl-basefiles/agl-basefiles_1.0.0.bb | 61 + .../recipes-core/agl-basefiles/files/LICENSE | 177 + .../agl-basefiles/files/agldd/ev_common.h | 135 + .../recipes-core/agl-basefiles/files/agldd/ev_id.h | 104 + .../agl-basefiles/files/agldd/evk_lib.h | 116 + .../agl-basefiles/files/agldd/moduleid.h | 69 + .../agl-basefiles/files/bin/launch_xml2cfg.sh | 138 + .../agl-basefiles/files/include/agl_thread.h | 1385 +++++ .../files/include/agl_types_obsoluted.h | 132 + .../agl-basefiles/files/include/agl_wakeup_order.h | 27 + .../agl-basefiles/files/include/aglpath.h | 200 + .../agl-basefiles/files/include/sm_launch_conf.h | 1385 +++++ .../agl-basefiles/files/npp/version.txt | 1 + .../recipes-core/agl-basefiles/files/share/agl.mk | 677 +++ .../agl-basefiles/files/share/rpc_rule.mk | 42 + .../files/share/system_launcher_main.xml | 40 + .../recipes-core/agl-systemd/agl-systemd_1.0.0.bb | 84 + .../recipes-core/agl-systemd/files/99-agl.rules | 11 + .../recipes-core/agl-systemd/files/LICENSE | 177 + .../agl-systemd/files/agl-trigger.service | 18 + .../recipes-core/agl-systemd/files/env.txt | 130 + .../agl-systemd/files/launch_sm.service | 22 + .../recipes-core/agl-systemd/files/options.conf | 2 + .../agl-systemd/files/setup_refhw.service | 15 + .../agl-systemd/files/systemd-udev-trigger.service | 22 + .../files/tool_9E_SI/agl_set_capability.sh | 82 + .../agl-systemd/files/tool_9E_SI/launch_sm.sh | 26 + .../agl-systemd/files/tool_9E_SI/set_capability.sh | 82 + .../files/tool_9E_SI/set_cgroup_rt_runtime_us.sh | 33 + .../agl-systemd/files/tool_9E_SI/setup_refhw.sh | 83 + .../files/usr/agl/conf/systemmanager/sm_launch.cfg | 10 + .../agl/conf/systemmanager/sm_launch__CWORD84_.xml | 116 + .../agl-systemd/files/usr/target/agl_cap.lst | 34 + .../agl-systemd/files/usr/target/cap.lst | 24 + .../agl-systemd/files/usr/target/dir.lst | 0 .../agl-systemd/files/usr/target/mntfs.lst | 0 .../recipes-core/elfio/elfio_3.2.bb | 19 + .../kernel-module-evklib-1.0.0/Makefile | 30 + .../kernel-module-evklib-1.0.0/agldd/agldd.h | 94 + .../kernel-module-evklib-1.0.0/agldd/ev_common.h | 135 + .../kernel-module-evklib-1.0.0/agldd/ev_id.h | 104 + .../kernel-module-evklib-1.0.0/agldd/evk_lib.h | 116 + .../kernel-module-evklib-1.0.0/agldd/moduleid.h | 69 + .../kernel-module-evklib-1.0.0/evk_lib.c | 2246 ++++++++ .../kernel-module-evklib_1.0.0.bb | 26 + .../ns-backupmanager/ns-backupmanager_1.0.0.bb | 30 + .../ns-commonlibrary/ns-commonlibrary_1.0.0.bb | 25 + .../ns-frameworkunified_1.0.0.bb | 42 + .../ns-loglibrary/ns-loglibrary_1.0.0.bb | 25 + .../os-eventlibrary/os-eventlibrary_1.0.0.bb | 26 + .../os-posixbasedos001legacylibrary_1.0.0.bb | 22 + .../os-rpclibrary/os-rpclibrary-tool_1.0.0.bb | 37 + .../os-rpclibrary/os-rpclibrary_1.0.0.bb | 32 + .../os-vehicleparameterlibrary_1.0.0.bb | 24 + .../ps-communication/ps-communication_1.0.0.bb | 28 + .../recipes-graphics/ss-config/ss-config_1.0.0.bb | 35 + .../ss-interfaceunified_1.0.0.bb | 43 + .../ss-resourcemanager/ss-resourcemanager_1.0.0.bb | 41 + .../ss-romaccesslibrary_1.0.0.bb | 27 + .../ss-taskmanager/ss-taskmanager_1.0.0.bb | 45 + .../ss-versionlibrary/ss-versionlibrary_1.0.0.bb | 32 + .../vs-positioning/vs-positioning_1.0.0.bb | 35 + .../vs-positioningbaselibrary_1.0.0.bb | 31 + .../packagegroup-agl-basesystem-core.bb | 34 + .../packagegroup-agl-basesystem-graphics.bb | 36 + .../packagegroup-agl-basesystem-service.bb | 29 + .../packagegroups/packagegroup-agl-basesystem.bb | 26 + .../classes/sdcard_image-socfpga.bbclass | 182 + meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc | 43 + .../meta-agl-bsp/conf/include/agl_beaglebone.inc | 45 + meta-agl/meta-agl-bsp/conf/include/agl_cubox-i.inc | 27 + .../meta-agl-bsp/conf/include/agl_cyclone5.inc | 11 + .../meta-agl-bsp/conf/include/agl_dra7xx-evm.inc | 47 + .../conf/include/agl_dragonboard-410c.inc | 3 + .../conf/include/agl_dragonboard-820c.inc | 2 + meta-agl/meta-agl-bsp/conf/include/agl_ebisu.inc | 13 + .../conf/include/agl_h3-salvator-x.inc | 3 + .../meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc | 10 + meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb.inc | 5 + meta-agl/meta-agl-bsp/conf/include/agl_hsdk.inc | 5 + .../conf/include/agl_imx6qdlsabreauto.inc | 21 + .../conf/include/agl_intel-corei7-64.inc | 18 + .../meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc | 10 + meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb.inc | 5 + .../meta-agl-bsp/conf/include/agl_nitrogen6x.inc | 22 + meta-agl/meta-agl-bsp/conf/include/agl_qemuarm.inc | 14 + .../meta-agl-bsp/conf/include/agl_qemuarm64.inc | 17 + .../meta-agl-bsp/conf/include/agl_qemux86-64.inc | 34 + .../meta-agl-bsp/conf/include/agl_raspberrypi3.inc | 42 + .../meta-agl-bsp/conf/include/agl_ulcb-nogfx.inc | 10 + meta-agl/meta-agl-bsp/conf/include/agl_ulcb.inc | 41 + meta-agl/meta-agl-bsp/conf/layer.conf | 26 + meta-agl/meta-agl-bsp/conf/machine/qemuarm.conf | 18 + .../meta-agl-bsp/conf/machine/raspberrypi4.conf | 26 + .../recipes-graphics/mesa/mesa_%.bbappend | 6 + .../recipes-graphics/wayland/libva_%.bbappend | 4 + .../wayland/weston-ini-conf.bbappend | 9 + .../wayland/weston-ini-conf/virtual.cfg | 18 + .../recipes-graphics/wayland/weston_%.bbappend | 3 + .../meta-core/recipes-core/ovmf/ovmf_git.bbappend | 1 + .../recipes-kernel/linux/linux-yocto/hciattach.cfg | 17 + .../recipes-kernel/linux/linux-yocto/most_deps.cfg | 9 + .../recipes-kernel/linux/linux-yocto/qemuarm.cfg | 6 + .../recipes-kernel/linux/linux-yocto/virtio.cfg | 6 + .../recipes-kernel/linux/linux-yocto_%.bbappend | 17 + .../wayland/weston-ini-conf/fbdev.cfg | 3 + .../recipes-graphics/wayland/weston-init.bbappend | 1 + ...n-smack_known_web-label-for-kernel-thread.patch | 49 + .../recipes-kernel/linux/files/cfg80211.cfg | 1 + .../recipes-kernel/linux/files/cgroup.cfg | 24 + .../recipes-kernel/linux/files/fixups.cfg | 8 + .../recipes-kernel/linux/files/namespace.cfg | 6 + .../recipes-kernel/linux/files/tmpfs.cfg | 2 + .../recipes-kernel/linux/files/touchscreen.cfg | 2 + .../recipes-kernel/linux/linux-fslc-imx_%.bbappend | 23 + .../recipes-kernel/linux/linux-fslc_%.bbappend | 25 + .../qt5/qtbase/0014-Add-IMX-GPU-support.patch | 17 + .../recipes-qt/qt5/qtbase_%.bbappend | 5 + .../wayland/weston-ini-conf.bbappend | 3 + .../linux-firmware/linux-firmware_git.bbappend | 0 .../linux/files/extra-graphic-devices.cfg | 54 + .../recipes-kernel/linux/files/fix_branch.scc | 3 + .../meta-intel/recipes-kernel/linux/files/lava.cfg | 3 + .../recipes-kernel/linux/files/net-devices.cfg | 2 + .../recipes-kernel/linux/files/security-tpm.cfg | 3 + .../recipes-kernel/linux/files/startup.nsh | 1 + .../recipes-kernel/linux/files/upsquare.cfg | 4 + .../recipes-kernel/linux/files/usb-devices.cfg | 81 + .../recipes-kernel/linux/linux-intel_%.bbappend | 1 + .../linux/linux-intel_4.19%.bbappend | 28 + .../96boards-tools/96boards-tools_0.12.bb | 32 + .../q6v5-pil/files/qcom-q6v5-pil.service | 12 + .../meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb | 20 + .../linux/linux-linaro-qcomlt_4.14.bbappend | 3 + .../bootfiles/bcm2835-bootfiles.bbappend | 12 + .../recipes-bsp/bootfiles/rpi-config_git.bbappend | 43 + .../u-boot-otascript/u-boot-otascript.bb | 32 + .../u-boot-otascript/u-boot-otascript/boot.scr | 3 + .../u-boot-otascript/u-boot-otascript/uEnv.cma.txt | 21 + .../u-boot-otascript/u-boot-otascript/uEnv.txt | 21 + ...dd-serial-and-revision-to-the-dev-2019.07.patch | 82 + .../recipes-bsp/u-boot/u-boot-common.inc | 15 + .../recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb | 34 + .../recipes-bsp/u-boot/u-boot-tools_2019.07.bb | 67 + .../meta-raspberrypi/recipes-bsp/u-boot/u-boot.inc | 333 ++ .../recipes-bsp/u-boot/u-boot_2019.07.bb | 4 + .../recipes-bsp/u-boot/u-boot_2019.07.bbappend | 10 + ...-check-for-all-linux-host_os-combinations.patch | 42 + ...2-meson.build-make-TLS-GLX-optional-again.patch | 52 + ...0003-Allow-enable-DRI-without-DRI-drivers.patch | 46 + .../recipes-graphics/mesa/libglu_9.0.1.bb | 30 + .../0001-mesa-demos-Add-missing-data-files.patch | 624 +++ ...llow-to-disable-demos-which-require-GLEW-.patch | 377 ++ ...4-Use-DEMOS_DATA_DIR-to-locate-data-files.patch | 234 + .../0007-Install-few-more-test-programs.patch | 43 + ...dd-few-missing-.glsl-.vert-.frag-files-to.patch | 99 + ...glsl-perf-Install-.glsl-.vert-.frag-files.patch | 71 + ...OpenVG-demos-with-single-frame-need-eglSw.patch | 44 + .../0013-only-build-GLX-demos-if-needed.patch | 62 + .../recipes-graphics/mesa/mesa-demos_8.4.0.bb | 59 + .../recipes-graphics/mesa/mesa-gl_19.1.6.bb | 10 + .../recipes-graphics/mesa/mesa.inc | 267 + .../recipes-graphics/mesa/mesa_%.bbappend | 2 + .../recipes-graphics/mesa/mesa_19.1.6.bb | 20 + .../recipes-graphics/userland/userland_%.bbappend | 4 + .../wayland/weston-ini-conf.bbappend | 7 + .../wayland/weston-ini-conf/dsi.cfg | 5 + .../wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg | 7 + .../create-combined-dtb_1.0.0.bb | 47 + ...55-sdio.txt-Follow-raspbian-change-for-bo.patch | 39 + .../linux-firmware-rpidistro_%.bbappend | 10 + .../recipes-kernel/linux/files/rpi-kernel-misc.cfg | 1 + .../linux-raspberrypi/0002-faytech-fix-rpi.patch | 33 + .../linux/linux-raspberrypi/disable_kprobes.cfg | 1 + .../linux-raspberrypi/raspberrypi-hciuart.cfg | 12 + .../linux/linux-raspberrypi/raspberrypi-panel.cfg | 1 + .../linux-raspberrypi/raspberrypi_network.cfg | 5 + .../recipes-kernel/linux/linux-raspberrypi4.inc | 140 + .../linux/linux-raspberrypi_%.bbappend | 40 + .../linux/linux-raspberrypi_4.14%.bbappend | 1 + .../recipes-kernel/linux/linux-raspberrypi_4.19.bb | 16 + .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 2 + .../conf/include/rcar-gen3-adas.inc | 5 + .../meta-rcar-gen3-adas/conf/layer.conf | 73 + .../recipes-bsp/si-tools/files/si-init.service | 10 + .../si-tools/files/si-tools-fm-improvements.patch | 184 + .../recipes-bsp/si-tools/si-init_1.0.bb | 28 + .../recipes-bsp/si-tools/si-tools.bbappend | 8 + .../recipes-bsp/ti-bt/ti-bt/ti-uim.service | 10 + .../recipes-bsp/ti-bt/ti-bt_%.bbappend | 18 + ...enesas-preserve-drm-HDMI-connector-naming.patch | 84 + .../linux/linux-renesas/disable_most.cfg | 9 + .../recipes-kernel/linux/linux-renesas_%.bbappend | 30 + .../gstvspfilter-h3ulcb_r8a7795.conf | 2 + .../gstvspfilter-m3ulcb_r8a7796.conf | 2 + .../gstreamer1.0-plugin-vspfilter_1.0.1.bbappend | 3 + .../recipes-navigation/gpsd/files/gpsd.kingfisher | 4 + .../gpsd/gpsd-kingfisher-conf_1.0.bb | 27 + .../recipes-bsp/alsa-state/alsa-state.bbappend | 1 + .../recipes-bsp/alsa-state/alsa-state/asound.state | 321 ++ .../arm-trusted-firmware_git.bbappend | 5 + .../files/0001-Boot-Normal-World-in-EL2.patch | 28 + .../bootfiles/files/uEnv-ota-h3ulcb.txt | 18 + .../bootfiles/files/uEnv-ota-m3ulcb.txt | 18 + .../recipes-bsp/bootfiles/renesas-ota-bootfiles.bb | 26 + .../virtual-gles-user-module.bb | 7 + .../wayland/weston-ini-conf.bbappend | 11 + .../wayland/weston-ini-conf/ebisu_output.cfg | 4 + .../wayland/weston-ini-conf/kingfisher_output.cfg | 8 + .../recipes-graphics/wayland/weston_%.bbappend | 1 + .../kernel-module-gles/kernel-module-gles.bbappend | 4 + .../kernel-module-mmngr.bbappend | 2 + .../kernel-module-mmngrbuf.bbappend | 2 + .../kernel-module-uvcs-drv.bbappend | 1 + .../kernel-module-vspmif.bbappend | 2 + ...enable-and-add-sound-hardware-abstraction.patch | 125 + .../recipes-kernel/linux/files/namespace_fix.cfg | 4 + .../recipes-kernel/linux/linux-renesas_%.bbappend | 11 + .../linux/linux-renesas_4.14.bbappend | 3 + .../omx-module/omx-user-module.bbappend | 8 + .../meta-rcar-gen3/scripts/setup_mm_packages.sh | 71 + .../wayland/weston-ini-conf.bbappend | 6 + .../recipes-kernel/linux/linux-bbe/cma-256.cfg | 1 + .../recipes-kernel/linux/linux-bbe_%.bbappend | 5 + .../recipes-kernel/linux/linux-arc_%.bbappend | 1 + meta-agl/meta-agl-bsp/meta-ti/.gitkeep | 0 ...0001-Add-soc-performance-monitor-utilites.patch | 3570 +++++++++++++ ...eston-clients-typo-in-simple-dmabuf-egl.c.patch | 29 + ...v-seat-restrict-udev-enumeration-to-card0.patch | 37 + .../0002-Weston-Allow-visual_id-to-be-0.patch | 31 + ...virtual-keyboard-display-issue-for-QT5-ap.patch | 39 + .../0004-Weston-Fix-touch-screen-crash-issue.patch | 36 + .../meta-ti/recipes-arago/weston/weston_%.bbappend | 25 + .../recipes-bsp/alsa-state/alsa-state.bbappend | 1 + .../recipes-bsp/alsa-state/alsa-state/asound.state | 1347 +++++ .../cm3-pm-firmware/amx3-cm3_git.bbappend | 3 + .../ti-sgx-ddk-km/add-AGL-toolchain-config.patch | 12 + .../ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend | 4 + .../meta-ti/recipes-bsp/u-boot/files/uEnv.txt | 1 + .../u-boot/u-boot-ti-staging_%.bbappend | 16 + .../meta-ti/recipes-graphics/gbm/libgbm_%.bbappend | 2 + .../libgles/ti-sgx-ddk-um/pvr.service | 19 + .../libgles/ti-sgx-ddk-um_%.bbappend | 22 + .../recipes-graphics/mesa/mesa-gl_%.bbappend | 7 + .../wayland/weston-ini-conf.bbappend | 7 + .../wayland/weston-ini-conf/unnamed.cfg | 3 + .../linux/files/dcan2_pinmux_enable.patch | 39 + .../linux/linux-ti-staging_%.bbappend | 11 + .../dra7xx-evm-set-default-sink-source.patch | 15 + .../pulseaudio/pulseaudio_%.bbappend | 7 + ...Set-up-environment-for-OSTree-integration.patch | 41 + .../u-boot-ota/0001-fixup-build-with-gcc6.patch | 86 + ...ps-with-built-in-code-to-remove-dependenc.patch | 138 + .../u-boot-ota/0002-fixup-build-with-gcc7.patch | 101 + .../recipes-bsp/u-boot/u-boot-ota_2015.07.bb | 29 + .../0004-Change-Max-Device-Count-To-16.patch | 26 + .../recipes-graphics/opencv/opencv_3.%.bbappend | 5 + .../wayland/wayland-protocols_1.17.bb | 24 + .../recipes-graphics/wayland/weston-ini-conf.bb | 30 + .../wayland/weston-ini-conf.bbappend | 12 + .../wayland/weston-ini-conf/core.cfg | 5 + .../wayland/weston-ini-conf/hdmi-a-1-270.cfg | 6 + .../wayland/weston-ini-conf/hdmi-a-1-90.cfg | 6 + .../wayland/weston-ini-conf/id-agent.cfg | 3 + .../wayland/weston-ini-conf/ivishell.cfg | 3 + .../wayland/weston-ini-conf/shell.cfg | 3 + .../wayland/weston-ini-conf/virtualoutput.cfg | 5 + .../wayland/weston/0001-make-error-portable.patch | 78 + ...ch-Provide-a-default-version-that-doesn-t.patch | 173 + .../recipes-graphics/wayland/weston/weston.desktop | 9 + .../recipes-graphics/wayland/weston/weston.png | Bin 0 -> 2383 bytes .../wayland/weston/xwayland.weston-start | 7 + .../recipes-graphics/wayland/weston_6.0.0.bb | 111 + .../recipes-kernel/linux/kernel-devsrc.bbappend | 6 + ...andle-CGROUP2-in-the-same-way-that-CGROUP.patch | 40 + .../Smack-Privilege-check-on-key-operations.patch | 109 + ...n-smack_known_web-label-for-kernel-thread.patch | 49 + .../recipes-kernel/linux/linux-agl-4.14.inc | 10 + .../recipes-kernel/linux/linux-agl-4.9.inc | 8 + .../recipes-kernel/linux/linux-agl.inc | 94 + .../recipes-kernel/linux/linux-yocto_%.bbappend | 1 + .../recipes-kernel/linux/linux/ath9k_htc.cfg | 4 + .../recipes-kernel/linux/linux/btusb.cfg | 37 + .../recipes-kernel/linux/linux/can-bus.cfg | 41 + .../recipes-kernel/linux/linux/drm.cfg | 2 + .../recipes-kernel/linux/linux/fanotify.cfg | 3 + .../recipes-kernel/linux/linux/hid.cfg | 1 + .../recipes-kernel/linux/linux/i2c-led.cfg | 3 + .../recipes-kernel/linux/linux/iiodevice.cfg | 25 + .../recipes-kernel/linux/linux/joystick.cfg | 9 + .../recipes-kernel/linux/linux/nbd.cfg | 1 + .../recipes-kernel/linux/linux/nfc.cfg | 34 + .../recipes-kernel/linux/linux/procevent.cfg | 2 + .../recipes-kernel/linux/linux/ramdisk.cfg | 2 + .../recipes-kernel/linux/linux/rtc.cfg | 7 + .../recipes-kernel/linux/linux/rtl_sdr.cfg | 4 + .../recipes-kernel/linux/linux/scheddebug.cfg | 1 + .../recipes-kernel/linux/linux/sound.cfg | 7 + .../recipes-kernel/linux/linux/uinput.cfg | 3 + .../recipes-kernel/linux/linux/usb.cfg | 8 + .../recipes-kernel/linux/linux/usbaudio.cfg | 2 + .../recipes-kernel/linux/linux/usbmodem.cfg | 7 + .../recipes-kernel/linux/linux/uvc.cfg | 4 + .../linux/linux/vbox-vmware-sata.cfg | 19 + .../0007-WIP-Initial-LAVA-support.patch | 144 + .../ptest-runner/ptest-runner_2.2.bbappend | 4 + meta-agl/meta-agl-bsp/wic/directdisk.wks.in | 9 + .../meta-agl-bsp/wic/sdimage-bootpart-uuid.wks | 6 + meta-agl/meta-agl-bsp/wic/singlepart-noloader.wks | 5 + .../wic/systemd-intel-corei7-64-bootdisk.wks | 23 + .../meta-agl-bsp/wic/systemd-joule-bootdisk.wks | 12 + .../conf/distro/include/aarch64-tune.inc | 13 + .../conf/distro/include/arc-tune.inc | 3 + .../conf/distro/include/arm-tune.inc | 23 + .../conf/distro/include/x86_64-tune.inc | 55 + meta-agl/meta-agl-distro/conf/distro/poky-agl.conf | 174 + meta-agl/meta-agl-distro/conf/layer.conf | 12 + meta-agl/meta-agl-distro/scripts/oe-depends-dot | 121 + .../meta-agl-profile-cluster-qt5/conf/layer.conf | 12 + .../images/agl-image-cluster-qt5.bb | 9 + .../images/agl-image-cluster-qt5.inc | 7 + .../packagegroup-agl-profile-cluster-qt5.bb | 21 + ...ackagegroup-agl-profile-cluster-qtcompositor.bb | 36 + .../0001-fixed-eglfs_kms-fails-to-build.patch | 45 + ...version-from-EGLNativeDisplayType-to-void.patch | 24 + .../recipes-qt/qt5/qtbase_%.bbappend | 10 + .../recipes-qt/qt5/qtcompositor-conf_1.0.bb | 40 + meta-agl/meta-agl-profile-cluster/conf/layer.conf | 12 + .../recipes-platform/images/agl-image-cluster.bb | 9 + .../recipes-platform/images/agl-image-cluster.inc | 7 + .../packagegroup-agl-profile-cluster.bb | 20 + .../meta-agl-profile-core/classes/cloc.bbclass | 29 + .../conf/include/agl-devel.inc | 17 + .../conf/include/agl-gplv2.inc | 8 + .../conf/include/agl-pulseaudio.inc | 1 + .../conf/include/base-agl.inc | 19 + meta-agl/meta-agl-profile-core/conf/layer.conf | 12 + meta-agl/meta-agl-profile-core/files/group | 92 + meta-agl/meta-agl-profile-core/files/passwd | 62 + .../agl-service-bluetooth-map_git.bb | 18 + .../agl-service-bluetooth-pbap_git.bb | 18 + .../agl-service-bluetooth_git.bb | 18 + .../agl-service-can-low-level_git.bb | 19 + .../agl-service-can-low-level/files/run-ptest | 3 + .../agl-service-data-persistence_git.bb | 17 + .../agl-service-geoclue/agl-service-geoclue_git.bb | 17 + .../agl-service-geofence_git.bb | 18 + .../agl-service-gps/agl-service-gps_git.bb | 18 + .../agl-service-hvac/agl-service-hvac_git.bb | 22 + .../agl-service-hvac/agl-service-hvac_git.bbappend | 5 + .../agl-service-identity-agent_git.bb | 17 + .../agl-service-iiodevices_git.bb | 19 + .../agl-service-mediascanner_git.bb | 18 + .../agl-service-navigation_git.bb | 17 + .../agl-service-network/agl-service-network_git.bb | 25 + .../agl-service-nfc/agl-service-nfc_git.bb | 17 + .../agl-service-platform-info_git.bb | 17 + .../agl-service-signal-composer_git.bb | 19 + .../agl-service-signal-composer/files/run-ptest | 3 + .../agl-service-steering-wheel_0.1.bb | 14 + .../agl-service-telephony_git.bb | 18 + .../agl-service-unicens/agl-service-unicens_git.bb | 19 + .../agl-service-weather/agl-service-weather_git.bb | 18 + .../high-level-viwi-service.bb | 19 + .../agl-login-manager/agl-login-manager_0.1.bb | 19 + .../recipes-config/agl-users/agl-users_0.1.bb | 27 + .../dev-mapping/dev-mapping.conf.default | 6 + .../recipes-config/dev-mapping/dev-mapping_0.1.bb | 18 + .../bluez-alsa/bluez-alsa_git.bb | 43 + .../bluez-alsa/files/bluez-alsa.service | 11 + ...t-notification-status-on-incoming-message.patch | 26 + .../bluez5/bluez5/bluetooth.conf | 39 + .../recipes-connectivity/bluez5/bluez5/tmpdir.conf | 2 + .../recipes-connectivity/bluez5/bluez5_%.bbappend | 19 + .../busybox/busybox_%.bbappend | 2 + .../busybox/files/enable-wget-https.cfg | 3 + .../connman-ncurses/connman-ncurses_git.bb | 27 + .../recipes-connectivity/connman/.appends.core | 0 .../recipes-connectivity/connman/connman.inc | 216 + ...us-issues-which-cause-problems-under-musl.patch | 362 ++ ...vice-stop-systemd-resolved-when-we-use-co.patch | 29 + ...ange-visibility-to-default-for-debug-symb.patch | 35 + ...resolve-musl-does-not-implement-res_ninit.patch | 85 + .../recipes-connectivity/connman/connman/connman | 83 + .../connman/connman/no-version-scripts.patch | 27 + .../connman/connman_%.bbappend | 17 + .../recipes-connectivity/connman/connman_1.36.bb | 16 + .../files/0001-disable-when-booting-over-nfs.patch | 10 + .../recipes-connectivity/connman/files/main.conf | 3 + .../recipes-connectivity/libnfc/libnfc_git.bb | 18 + ...rd-add-multi-user.target-to-neard.service.patch | 25 + ...dbus-property_get_type-method-on-empty-re.patch | 33 + .../recipes-connectivity/neard/neard_0.16.bbappend | 7 + .../recipes-connectivity/neardal/neardal.inc | 22 + ...-fix-segfault-on-help-page-being-displaye.patch | 27 + .../0002-neardal-lib-fix-memory-corruption.patch | 58 + .../recipes-connectivity/neardal/neardal/ncl.patch | 25 + .../recipes-connectivity/neardal/neardal_0.14.bb | 9 + ...llow-duplicate-entries-from-mbpi_lookup_a.patch | 27 + .../recipes-connectivity/ofono/files/ofono.conf | 30 + .../recipes-connectivity/ofono/ofono_%.bbappend | 11 + .../0001-remove-I-usr-include-in-pkg-config.patch | 40 + .../recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb | 32 + .../recipes-core/dbus/.appends.core | 0 .../recipes-core/dbus/dbus/dbus.service | 10 + .../recipes-core/dbus/dbus/dbus.socket | 9 + .../recipes-core/dbus/dbus/dbus_env.conf | 5 + .../dbus/dbus/libdbus-c++/dbus-c++-threading.patch | 45 + .../recipes-core/dbus/dbus_%.bbappend | 28 + .../dbus/libdbus-c++/dbus-c++-threading.patch | 45 + .../recipes-core/dbus/libdbus-c++_0.9.0.bbappend | 2 + .../distro-build-manifest/distro-build-manifest.bb | 164 + .../recipes-core/glibc/.appends.core | 0 .../glibc/glibc/arm/local-arm-futex.diff | 22 + .../recipes-core/glibc/glibc_2.2%.bbappend | 3 + .../recipes-core/psplash/.appends.core | 0 .../recipes-core/psplash/files/psplash-anim | 11 + .../recipes-core/psplash/files/psplash-colors.h | 34 + .../recipes-core/psplash/files/psplash-poky-img.h | 5411 ++++++++++++++++++++ .../psplash/files/psplash-quit.service | 11 + .../psplash/files/psplash-start.service | 12 + .../recipes-core/psplash/psplash_git.bbappend | 27 + .../recipes-core/systemd/.appends.core | 0 .../systemd/systemd/canbus-can.network | 5 + .../recipes-core/systemd/systemd/e2fsck.conf | 3 + .../recipes-core/systemd/systemd/wired.network | 5 + .../recipes-core/systemd/systemd_%.bbappend | 33 + .../cmake-apps-module/cmake-apps-module_git.bb | 20 + .../recipes-devtools/cmake/cmake_%.bbappend | 9 + .../cmake/files/environment.d-cmake-agl.sh | 1 + .../recipes-devtools/gdb/.appends.core | 0 .../recipes-devtools/gdb/gdb_%.bbappend | 1 + .../libafb-helpers/libafb-helpers_git.bb | 8 + .../libafb-helpers/libafb-helpers_git.inc | 14 + .../libappcontroller/libappcontroller_git.bb | 19 + .../low-level-can-generator_git.bb | 17 + .../nativesdk-packagegroup-sdk-host.bbappend | 3 + .../packagegroups/packagegroup-agl-core-devel.bb | 28 + .../recipes-devtools/qemu/qemu_%.bbappend | 1 + .../run-agl-postinsts/run-agl-postinsts | 48 + .../run-agl-postinsts/run-agl-postinsts.service | 17 + .../run-agl-postinsts/run-agl-postinsts_1.0.bb | 46 + .../run-postinsts/run-postinsts/ldconfig-wait.conf | 2 + .../run-postinsts/run-postinsts_%.bbappend | 14 + .../recipes-extended/gperf/.appends.core | 0 .../recipes-extended/gperf/gperf_%.bbappend | 1 + ...0001-most-aim-network-backport-Kernel-API.patch | 43 + .../0002-src-most-add-auto-conf-feature.patch | 472 ++ ...003-core-remove-kernel-log-for-MBO-status.patch | 26 + .../files/0004-most-video-set-device_caps.patch | 25 + ...-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch | 25 + .../files/0006-dim2-fix-startup-sequence.patch | 186 + .../most/files/0007-dim2-use-device-tree.patch | 378 ++ ...im2-read-clock-speed-from-the-device-tree.patch | 92 + ...use-device-for-coherent-memory-allocation.patch | 47 + .../most/files/0010-backport-usb-setup-timer.patch | 35 + ...1-handle-snd_pcm_lib_mmap_vmalloc-removal.patch | 18 + .../recipes-kernel/most/most.bb | 14 + .../recipes-kernel/most/most.bbappend | 31 + ...gure-option-to-disable-build-of-man-pages.patch | 40 + .../recipes-multimedia/libmp4v2/libmp4v2_git.bb | 18 + .../lightmediascanner/.appends.meta-efl | 0 ...ine-comparison_fn_t-for-non-glibc-systems.patch | 33 + ...m-G_BUS_TYPE_SESSION-to-G_BUS_TYPE_SYSTEM.patch | 49 + .../files/dbus-lightmediascanner.conf | 12 + .../id3-plugin-support-out-of-tree-build.patch | 11 + .../files/lightmediascanner.service | 12 + .../files/plugin-ogg-fix-chucksize-issue.patch | 53 + .../lightmediascanner/lightmediascanner_%.bbappend | 42 + .../lightmediascanner/lightmediascanner_0.5.1.bb | 63 + .../pulseaudio/agl-audio-plugin_0.1.bb | 28 + ...01-install-files-for-a-module-development.patch | 70 + ...ume-ramp-additions-to-the-low-level-infra.patch | 564 ++ ...-ramp-adding-volume-ramping-to-sink-input.patch | 189 + ...put-Code-cleanup-regarding-volume-ramping.patch | 62 + ...volume-Add-support-for-volume-ramp-factor.patch | 299 ++ ...nput-Remove-pa_sink_input_set_volume_ramp.patch | 63 + .../pulseaudio-12.2/enable-ofono-hfp-backend.patch | 11 + .../pulseaudio/pulseaudio_%.bbappend | 29 + .../pulseaudio/pulseaudio_12.2.bbappend | 15 + .../files/org.freedesktop.GeoClue2.Client.conf | 8 + .../recipes-navigation/geoclue/geoclue_%.bbappend | 11 + .../recipes-navigation/gpsd/gpsd_%.bbappend | 16 + .../recipes-platform/images/agl-image-boot.bb | 9 + .../recipes-platform/images/agl-image-boot.inc | 10 + .../images/agl-image-ivi-crosssdk.bb | 2 + .../images/agl-image-minimal-crosssdk.bb | 35 + .../images/agl-image-minimal-qa.bb | 12 + .../recipes-platform/images/agl-image-minimal.bb | 9 + .../recipes-platform/images/agl-image-minimal.inc | 10 + .../packagegroups/packagegroup-agl-core-boot.bb | 52 + .../packagegroup-agl-core-connectivity.bb | 23 + .../packagegroup-agl-core-navigation.bb | 17 + .../packagegroup-agl-core-os-commonlibs.bb | 14 + .../packagegroup-agl-core-security.bb | 14 + .../packagegroup-agl-core-services.bb | 33 + .../packagegroups/packagegroup-agl-image-boot.bb | 18 + .../packagegroup-agl-image-minimal.bb | 27 + .../0001-replace-krb5-config-with-pkg-config.patch | 44 + .../recipes-support/curl/curl_%.bbappend | 5 + .../recipes-support/curl/curl_7.66.0.bb | 80 + .../libmicrohttpd/libmicrohttpd_0.9.63.bb | 28 + .../recipes-support/libsoup/libsoup-2.4_%.bbappend | 1 + .../recipes-support/nghttp2/nghttp2_1.39.1.bb | 15 + .../recipes-support/opencv/opencv_3.%.bbappend | 1 + .../recipes-support/udisks/files/automount.service | 9 + .../recipes-support/udisks/files/automount.sh | 93 + .../udisks/files/org.freedesktop.UDisks.conf | 32 + .../recipes-support/udisks/files/udisks.service | 11 + .../recipes-support/udisks/udisks_1.0.5.bbappend | 28 + .../recipes-test/afb-test/afb-test_git.bb | 25 + .../recipes-test/afb-test/files/run-ptest | 3 + .../recipes-test/aiostress/aiostress_0.22.bb | 24 + .../blobsallad/blobsallad/0001-Makefile.patch | 53 + .../blobsallad/blobsallad/0002-auto.patch | 95 + .../blobsallad/blobsallad/0003-printcleanup.patch | 11 + .../blobsallad/blobsallad/0004-bs_main.c.patch | 15 + .../blobsallad/blobsallad_2006-11-14-23-57.bb | 36 + .../recipes-test/dung/dung_3.4.25-m2.bb | 18 + .../recipes-test/ebizzy/ebizzy_0.3.bb | 20 + .../recipes-test/ffsb/ffsb_6.0-rc2.bb | 14 + .../recipes-test/fontconfig/fontconfig_%.bbappend | 17 + .../files/0001-Makefile-dont-build-gfx-demos.patch | 32 + ...mos-Makefile-Do-not-hardcode-libtool-path.patch | 30 + .../recipes-test/freetype/freetype_2.9.1.bbappend | 35 + .../files/0001-fix_missing_header_sys_stat.patch | 11 + .../recipes-test/fsfuzzer/fsfuzzer_0.7.bb | 18 + .../recipes-test/glmark2/glmark2_%.bbappend | 2 + .../recipes-test/himeno/himeno_2.0.bb | 27 + .../interbench/files/interbench.c.patch | 68 + .../recipes-test/interbench/interbench_0.31.bb | 31 + .../recipes-test/ipv6connect/ipv6connect.bb | 24 + .../recipes-test/linpack/linpack.bb | 23 + .../recipes-test/linus-stress/linus-stress.bb | 23 + .../packagegroups/packagegroup-agl-test.bb | 57 + .../recipes-test/trinity/trinity_git.bb | 42 + .../conf/layer.conf | 12 + .../openivi-html5/openivi-html5.service | 16 + .../openivi-html5/openivi-html5/openivi-html5.sh | 50 + .../openivi-html5/openivi-html5_git.bb | 43 + .../images/agl-demo-platform-html5-crosssdk.bb | 55 + .../images/agl-demo-platform-html5.bb | 10 + .../images/agl-demo-platform-html5.inc | 2 + .../packagegroup-agl-demo-platform-html5.bb | 26 + .../meta-agl-profile-graphical-qt5/conf/layer.conf | 12 + .../packagegroups/packagegroup-agl-appfw-native.bb | 17 + .../packagegroups/packagegroup-agl-appfw-qt5.bb | 16 + .../libafb-helpers-qt/libafb-helpers-qt_git.bb | 11 + .../images/agl-image-graphical-qt5-crosssdk.bb | 55 + .../images/agl-image-graphical-qt5.bb | 10 + .../images/agl-image-graphical-qt5.inc | 7 + .../packagegroup-agl-appfw-native-qt5.bb | 29 + .../packagegroup-agl-demo-qt-examples.bb | 26 + .../packagegroup-agl-profile-graphical-qt5.bb | 23 + .../packagegroup-qt5-toolchain-target.bbappend | 23 + .../qlibhomescreen/qlibhomescreen_git.bb | 13 + .../qlibwindowmanager/qlibwindowmanager_git.bb | 14 + .../qml-execscript-plugin_1.0.bb | 25 + .../recipes-qt/qt5/qtbase-native_git.bbappend | 3 + ...-to-make-introspect-for-every-findMetaObj.patch | 30 + .../recipes-qt/qt5/qtbase_%.bbappend | 12 + ...age-support-with-the-data-URL-scheme-for-.patch | 80 + .../recipes-qt/qt5/qtmultimedia_%.bbappend | 7 + .../recipes-qt/qt5/qtsystems_%.bbappend | 3 + ...update-3rd-party-ivi-application-protocol.patch | 56 + ...dow-add-support-for-IVI-Surface-ID-proper.patch | 34 + ...est-file-according-to-smack-3-domain-mode.patch | 33 + ...Add-xdg-shell-protocol-file-version-1.4.0.patch | 468 ++ ...dd-minimize-feature-to-QWindow-using-wayl.patch | 1029 ++++ ...pgrade-to-support-current-version-weston-.patch | 772 +++ ...-IVI-Shell-protocol-file-version-patch-v6.patch | 128 + .../0021-Implement-initial-IVI-Shell-support.patch | 539 ++ .../qt5/qtwayland/0099_qtwayland_no_evdev.patch | 14 + ...018-packaging-enable-xdg-shell-at-runtime.patch | 31 + .../recipes-qt/qt5/qtwayland_%.bbappend | 27 + .../recipes-qt/qt5/qtwebkit_%.bbappend | 1 + .../recipes-qt/qtaglextras/qtaglextras_git.bb | 28 + .../classes/agl-graphical.bbclass | 7 + .../meta-agl-profile-graphical/conf/layer.conf | 12 + .../agl-service-homescreen_git.bb | 14 + .../agl-service-mediaplayer_git.bb | 18 + .../agl-service-radio/agl-service-radio_git.bb | 19 + .../agl-service-taskmanager.bb | 19 + .../agl-service-windowmanager_git.bb | 33 + .../files/weston-ready.conf | 4 + .../agl-desktop-config/agl-desktop-config_0.1.bb | 21 + .../agl-desktop-config/files/user-weston-term.path | 8 + .../files/user-weston-term.service | 12 + .../recipes-graphics/hmi-debug/files/hmi-debug | 8 + .../recipes-graphics/hmi-debug/hmi-debug_git.bb | 19 + .../libhomescreen/org.agl.statusbar.conf | 16 + .../libhomescreen/libhomescreen_git.bb | 26 + .../libwindowmanager/libwindowmanager_git.bb | 15 + .../recipes-graphics/runxdg/runxdg_git.bb | 16 + .../wayland/Readme.weston-ini-conf | 34 + .../wayland/waltham-transmitter_git.bb | 34 + .../recipes-graphics/wayland/waltham_git.bb | 16 + .../0001-Added-ivi-id-agent-to-CMake.patch | 22 + ...0002-add-LayerManagerControl-error-status.patch | 21 + .../0002-ivi-id-agent-added-ivi-id-agent.patch | 530 ++ .../0003-ivi-controller-load-id-agent-module.patch | 67 + ...4-ivi-ilmcontrol-added-focus-notification.patch | 29 + ...disable-EGLWLMockNavigation-example-build.patch | 22 + .../wandboard_fix_build.patch | 13 + .../wayland/wayland-ivi-extension_git.bb | 35 + .../0001-Change-socket-mode-add-rw-for-group.patch | 29 + ...ver-Fix-fake-Address-already-in-use-error.patch | 35 + .../recipes-graphics/wayland/wayland_%.bbappend | 6 + .../recipes-graphics/wayland/weston-init.bbappend | 81 + .../wayland/weston-init/weston.service.add | 11 + .../wayland/weston-init/weston_tmpfiles.conf | 6 + .../wayland/weston-ready/weston-ready | 56 + .../wayland/weston-ready/weston-ready.service | 10 + .../recipes-graphics/wayland/weston-ready_1.0.bb | 21 + ...llow-regular-users-to-launch-Weston_2.0.0.patch | 39 + ...-rework-goto-labels-to-avoid-memory-leaks.patch | 57 + ...mpositor-add-output-type-to-weston_output.patch | 202 + .../weston/0002-ivi-shell-removed-assert.patch | 11 + ...tor-drm-introduce-drm_get_dmafd_from_view.patch | 111 + ...-ivi-shell-introduction-of-IVI_INVALID_ID.patch | 20 + ...face-added-interface-to-change-surface-id.patch | 73 + ...yout-introcuded-configure_desktop_changed.patch | 74 + ...t-introcuded-surface_create_and_configure.patch | 117 + ...inked-libweston-desktop-and-added-structs.patch | 74 + ...ayout-use-libweston-desktop-api-for-views.patch | 30 + ...dded-libweston-desktop-api_implementation.patch | 166 + ...ivi-shell-remove-surface_destroy_listener.patch | 24 + ...l-create-weston-desktop-in_wet_shell_init.patch | 30 + ...r-register-for-desktop_surface_configured.patch | 133 + ...simple-egl-remove-ivi-application-support.patch | 165 + ...simple-shm-remove-ivi-application-support.patch | 107 + ...dow-client-remove-ivi-application-support.patch | 130 + ...mpositor-add-output-type-to-weston_output.patch | 254 + ...tor-drm-introduce-drm_get_dmafd_from_view.patch | 109 + ...-get-stride-from-drm_get_dma_fd_from_view.patch | 59 + .../wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch | 47 + .../recipes-graphics/wayland/weston_%.bbappend | 4 + .../recipes-graphics/wayland/weston_5.0.0.bbappend | 27 + .../recipes-graphics/wayland/weston_6.0.0.bbappend | 10 + .../0001-install-wayland.h.patch | 33 + .../gstreamer1.0-plugins-bad_1.14.%.bbappend | 2 + .../gstreamer1.0-plugins-good_%.bbappend | 2 + .../recipes-platform/images/agl-image-weston.bb | 9 + .../recipes-platform/images/agl-image-weston.inc | 7 + .../packagegroup-agl-graphical-multimedia.bb | 16 + .../packagegroup-agl-graphical-multimedia.bbappend | 5 + .../packagegroup-agl-graphical-services.bb | 15 + .../packagegroup-agl-graphical-weston.bb | 21 + .../packagegroup-agl-profile-graphical.bb | 23 + meta-agl/meta-agl-profile-hud/conf/layer.conf | 12 + .../meta-agl-profile-telematics/conf/layer.conf | 12 + .../images/agl-image-telematics.bb | 9 + .../images/agl-image-telematics.inc | 5 + .../packagegroup-agl-profile-telematics.bb | 25 + meta-agl/meta-agl.md | 142 + meta-agl/meta-agl/conf/layer.conf | 12 + meta-agl/meta-app-framework/classes/aglwgt.bbclass | 109 + .../conf/include/agl-appfw-smack.inc | 18 + meta-agl/meta-app-framework/conf/layer.conf | 12 + .../af-binder/af-binder-devtools-native_git.bb | 8 + .../recipes-core/af-binder/af-binder_git.bb | 117 + .../recipes-core/af-binder/af-binder_git.inc | 22 + .../af-binder/nativesdk-af-binder-devtools_git.bb | 8 + .../af-main/Hack-to-allow-the-debugging.patch | 29 + .../recipes-core/af-main/af-main_git.bb | 127 + .../recipes-core/af-main/af-main_git.inc | 25 + .../recipes-core/af-main/nativesdk-af-main_git.bb | 27 + .../af-platform-setup/af-platform-setup_1.0.bb | 16 + .../af-platform-setup/files/udev-shared.conf | 4 + .../recipes-core/base-files/base-files_%.bbappend | 32 + .../nss-localuser/nss-localuser_0.1.bb | 37 + .../nativesdk-packagegroup-sdk-host.bbappend | 2 + .../packagegroup-agl-app-framework-examples.bb | 14 + .../packagegroup-agl-app-framework.bb | 20 + .../security-manager/0001-Adapt-rules-to-AGL.patch | 50 + .../0001-Fix-Cmake-conf-for-gcc6-build.patch | 40 + .../security-manager/0001-Fix-gcc6-build.patch | 38 + ...uires-include-functional-for-std-function.patch | 51 + .../Removing-tizen-platform-config.patch | 196 + .../init-security-manager-db.service | 15 + .../security-manager/init-security-manager-db.sh | 6 + .../security-manager/security-manager_%.bbappend | 25 + .../recipes-core/shadow/shadow_%.bbappend | 6 + .../systemd-sync/systemd-agl-sync_1.0.bb | 39 + .../run-agl-postinsts_1.0.bbappend | 1 + .../recipes-kernel/linux/linux-%.bbappend | 3 + .../recipes-kernel/linux/linux/audit.cfg | 2 + .../packagegroup-agl-core-security.bbappend | 9 + .../packagegroup-agl-image-boot.bbappend | 3 + .../packagegroup-agl-image-minimal.bbappend | 3 + .../security-manager/security-manager_git.bbappend | 2 + .../recipes-security/xmlsec1/xmlsec1_1.%.bbappend | 4 + .../libcap/removing-capability-enforcement.patch | 87 + .../recipes-support/libcap/libcap_%.bbappend | 3 + .../recipes-support/libzip/libzip_1.1.1.bb | 32 + meta-agl/meta-netboot/README | 65 + meta-agl/meta-netboot/README.renesas-gen3 | 90 + meta-agl/meta-netboot/classes/netboot.bbclass | 22 + meta-agl/meta-netboot/conf/include/agl-netboot.inc | 5 + meta-agl/meta-netboot/conf/layer.conf | 15 + .../recipes-core/busybox/busybox_%.bbappend | 6 + .../recipes-core/busybox/files/enable_nbd.cfg | 1 + .../recipes-core/images/initramfs-netboot-image.bb | 23 + .../recipes-core/initramfs-netboot/files/init.sh | 166 + .../initramfs-netboot/initramfs-netboot_1.0.bb | 21 + .../recipes-support/nbd/nbd_%.bbappend | 6 + meta-agl/meta-security/COPYING.MIT | 17 + meta-agl/meta-security/README.md | 31 + meta-agl/meta-security/conf/layer.conf | 14 + .../recipes-connectivity/bluez5/bluez5_%.bbappend | 55 + .../bluez5/files/bluetooth.service.conf | 2 + .../connman/connman_%.bbappend | 34 + .../connman/files/connman.service.conf | 4 + .../recipes-core/base-files/base-files_%.bbappend | 79 + .../recipes-core/coreutils/coreutils_%.bbappend | 7 + ...on-of-Cynara-asynchronous-security-checks.patch | 2232 ++++++++ ...sage-dispatching-when-send-rule-result-is.patch | 949 ++++ ...ailability-of-policy-results-for-broadcas.patch | 1082 ++++ ...d-own-rule-result-unavailability-handling.patch | 1493 ++++++ ...m-Cynara-runtime-policy-checks-by-default.patch | 175 + .../dbus-cynara/0006-Fix-gcc-8-warnings.patch | 134 + .../0007-Fix-SIGSEGV-on-disconnections.patch | 109 + .../recipes-core/dbus-cynara/dbus_1.12.10.bbappend | 15 + .../packagegroup-security-framework.bb | 23 + .../files/55-udev-smack-default.rules | 27 + .../files/systemd-journald.service.conf | 16 + .../files/systemd-tmpfiles-setup.service.conf | 2 + .../smack-system-setup/files/tmp.mount.conf | 12 + .../smack-system-setup/smack-system-setup_1.bb | 28 + .../systemd/0001-Switch-Smack-label-earlier.patch | 52 + .../recipes-core/systemd/systemd_239.bbappend | 40 + .../recipes-core/util-linux/util-linux_%.bbappend | 8 + .../recipes-kernel/linux/linux-%.bbappend | 17 + .../recipes-kernel/linux/linux/audit.cfg | 2 + .../linux/linux/smack-default-lsm.cfg | 2 + .../recipes-kernel/linux/linux/smack.cfg | 8 + .../audit/add-system-call-table-for-ARM.patch | 46 + .../audit/audit/audit-for-cross-compiling.patch | 2938 +++++++++++ .../audit/audit/audit-python-configure.patch | 27 + .../audit/audit/audit-python.patch | 31 + .../audit/audit/audit-volatile.conf | 1 + .../recipes-security/audit/audit/auditd | 153 + .../recipes-security/audit/audit/auditd.service | 20 + .../audit/audit/disable-ldap.patch | 59 + .../audit/audit/fix-swig-host-contamination.patch | 48 + .../recipes-security/audit/audit_2.3.2.bb | 102 + .../cynara/cynara/0001-Add-fallthrough-tags.patch | 57 + .../0001-fix-fallthrough-in-cmdlineparser.patch | 35 + ...uires-include-functional-for-std-function.patch | 36 + ...void-warning-when-compiling-without-smack.patch | 43 + .../cynara/cynara/0004-Fix-mode-of-sockets.patch | 42 + .../cynara/cynara/0005-Allow-to-tune-sockets.patch | 237 + ...0006-Install-socket-activation-by-default.patch | 78 + .../cynara-db-migration-abort-on-errors.patch | 29 + .../recipes-security/cynara/cynara/run-ptest | 4 + .../recipes-security/cynara/cynara_0.14.10.bb | 157 + .../keyutils/keyutils-arm-remove-m32-m64.patch | 19 + .../keyutils/keyutils_fix_library_install.patch | 30 + .../keyutils/keyutils_fix_x86-64_cflags.patch | 13 + .../keyutils/keyutils_fix_x86_cflags.patch | 13 + .../recipes-security/keyutils/keyutils_1.5.8.bb | 44 + .../security-manager/security-manager.inc | 94 + .../0001-Avoid-casting-from-const-T-to-void.patch | 127 + ...Fix-gcc8-warning-error-Werror-catch-value.patch | 32 + ...0001-Smack-rules-create-two-new-functions.patch | 116 + ...all-implement-multiple-set-of-smack-rules.patch | 34 + .../Removing-tizen-platform-config.patch | 196 + .../c-11-replace-depracated-auto_ptr.patch | 32 + .../security-manager/include-linux-xattr.patch | 24 + .../libcap-without-pkgconfig.patch | 32 + .../removes-dependency-to-libslp-db-utils.patch | 78 + ...nager-policy-reload-do-not-depend-on-GNU-.patch | 35 + ...ocket-manager-removes-tizen-specific-call.patch | 47 + .../systemd-stop-using-compat-libs.patch | 47 + .../security-manager/security-manager_git.bb | 38 + .../recipes-security/smacknet/files/smacknet | 184 + .../smacknet/files/smacknet.service | 11 + .../recipes-security/smacknet/smacknet.bb | 29 + .../recipes-security/xmlsec1/xmlsec1_%.bbappend | 3 + meta-agl/scripts/.aglsetup_genconfig.bash | 581 +++ meta-agl/scripts/README-mkefi-agl.md | 18 + meta-agl/scripts/aglsetup.sh | 60 + meta-agl/scripts/distro-manifest-generator.sh | 310 ++ meta-agl/scripts/envsetup.sh | 83 + meta-agl/scripts/ias_image_app | 191 + meta-agl/scripts/mkabl-agl.sh | 507 ++ meta-agl/scripts/mkefi-agl.sh | 531 ++ meta-agl/templates/base/00_local.conf.agl.inc | 11 + meta-agl/templates/base/01_setup_EULAfunc.sh | 88 + meta-agl/templates/base/01_setup_pkg_revision.sh | 68 + meta-agl/templates/base/99_local.conf.inc | 19 + meta-agl/templates/base/99_setup_EULAconf.sh | 14 + meta-agl/templates/base/bblayers.conf.sample | 67 + meta-agl/templates/base/conf-notes.txt | 17 + meta-agl/templates/base/local.conf.sample | 237 + .../README_feature_agl-all-features.md | 16 + .../feature/agl-all-features/included.dep | 1 + .../feature/agl-appfw-smack/50_local.conf.inc | 0 .../README_feature_agl-appfw-smack.md | 9 + .../feature/agl-archiver/.50_FEATURE.md.swp | Bin 0 -> 12288 bytes .../feature/agl-archiver/50_local.conf.inc | 2 + .../agl-archiver/README_feature_agl-archiver.md | 9 + .../feature/agl-basesystem/50_bblayers.conf.inc | 3 + .../feature/agl-basesystem/50_local.conf.inc | 2 + .../README_feature_agl-basesystem.md | 3 + .../feature/agl-buildstats/50_local.conf.inc | 2 + .../README_feature_agl-buildstats.md | 9 + .../README_feature_agl-ci-change-features-nogfx.md | 19 + .../agl-ci-change-features-nogfx/included.dep | 1 + .../README_feature_agl-ci-change-features.md | 20 + .../feature/agl-ci-change-features/included.dep | 1 + ...EADME_feature_agl-ci-snapshot-features-nogfx.md | 20 + .../agl-ci-snapshot-features-nogfx/included.dep | 1 + .../README_feature_agl-ci-snapshot-features.md | 21 + .../feature/agl-ci-snapshot-features/included.dep | 1 + .../templates/feature/agl-ci/99_local.conf.inc | 1 + .../feature/agl-ci/README_feature_agl-ci.md | 9 + .../templates/feature/agl-devel/50_local.conf.inc | 2 + .../feature/agl-devel/README_feature_agl-devel.md | 42 + .../templates/feature/agl-egvirt/50_local.conf.inc | 9 + .../agl-egvirt/README_feature_agl-egvirt.md | 9 + .../feature/agl-fossdriver/50_bblayers.conf.inc | 1 + .../feature/agl-fossdriver/50_local.conf.inc | 1 + .../README_feature_agl-fossdriver.md | 13 + .../feature/agl-gplv2/50_bblayers.conf.inc | 1 + .../templates/feature/agl-gplv2/50_local.conf.inc | 2 + .../feature/agl-gplv2/README_feature_agl-gplv2.md | 9 + .../feature/agl-hmi-framework/50_local.conf.inc | 4 + .../README_feature_agl-hmi-framework.md | 9 + .../feature/agl-netboot/50_bblayers.conf.inc | 1 + .../feature/agl-netboot/50_local.conf.inc | 2 + .../agl-netboot/README_feature_agl-netboot.md | 9 + .../agl-profile-cluster-qt5/50_bblayers.conf.inc | 3 + .../README_feature_agl-profile-cluster-qt5.md | 15 + .../feature/agl-profile-cluster-qt5/included.dep | 1 + .../agl-profile-cluster/50_bblayers.conf.inc | 3 + .../README_feature_agl-profile-cluster.md | 15 + .../feature/agl-profile-cluster/included.dep | 1 + .../50_bblayers.conf.inc | 3 + .../README_feature_agl-profile-graphical-html5.md | 15 + .../agl-profile-graphical-html5/included.dep | 1 + .../agl-profile-graphical-qt5/50_bblayers.conf.inc | 9 + .../README_feature_agl-profile-graphical-qt5.md | 15 + .../feature/agl-profile-graphical-qt5/included.dep | 1 + .../agl-profile-graphical/50_bblayers.conf.inc | 3 + .../README_feature_agl-profile-graphical.md | 9 + .../feature/agl-profile-hud/50_bblayers.conf.inc | 3 + .../README_feature_agl-profile-hud.md | 9 + .../agl-profile-telematics/50_bblayers.conf.inc | 3 + .../README_feature_agl-profile-telematics.md | 9 + .../templates/feature/agl-ptest/90_local.conf.inc | 9 + .../feature/agl-ptest/README_feature_agl-ptest.md | 9 + .../feature/agl-sota/50_bblayers.conf.inc | 7 + .../templates/feature/agl-sota/50_local.conf.inc | 4 + .../feature/agl-sota/README_feature_agl-sota.md | 9 + .../feature/ns-backupmanager/50_bblayers.conf.inc | 3 + .../feature/ns-backupmanager/50_local.conf.inc | 9 + .../README_feature_ns-backupmanager.md | 3 + .../feature/ns-commonlibrary/50_bblayers.conf.inc | 3 + .../feature/ns-commonlibrary/50_local.conf.inc | 9 + .../README_feature_ns-commonlibrary.md | 3 + .../ns-frameworkunified/50_bblayers.conf.inc | 3 + .../feature/ns-frameworkunified/50_local.conf.inc | 9 + .../README_feature_ns-frameworkunified.md | 3 + .../feature/ns-loglibrary/50_bblayers.conf.inc | 3 + .../feature/ns-loglibrary/50_local.conf.inc | 9 + .../ns-loglibrary/README_feature_ns-loglibrary.md | 3 + .../ns-notificationpersistent/50_bblayers.conf.inc | 3 + .../ns-notificationpersistent/50_local.conf.inc | 9 + .../README_feature_ns-notificationpersistent.md | 3 + .../feature/os-eventlibrary/50_bblayers.conf.inc | 3 + .../feature/os-eventlibrary/50_local.conf.inc | 9 + .../README_feature_os-eventlibrary.md | 3 + .../50_bblayers.conf.inc | 3 + .../50_local.conf.inc | 9 + ...ADME_feature_os-posixbasedos001legacylibrary.md | 3 + .../feature/os-rpclibrary/50_bblayers.conf.inc | 3 + .../feature/os-rpclibrary/50_local.conf.inc | 9 + .../os-rpclibrary/README_feature_os-rpclibrary.md | 3 + .../50_bblayers.conf.inc | 3 + .../os-vehicleparameterlibrary/50_local.conf.inc | 9 + .../README_feature_os-vehicleparameterlibrary.md | 3 + .../feature/ps-communication/50_bblayers.conf.inc | 3 + .../feature/ps-communication/50_local.conf.inc | 9 + .../README_feature_ps-communication.md | 3 + .../feature/ss-config/50_bblayers.conf.inc | 3 + .../templates/feature/ss-config/50_local.conf.inc | 9 + .../feature/ss-config/README_feature_ss-config.md | 3 + .../ss-interfaceunified/50_bblayers.conf.inc | 3 + .../feature/ss-interfaceunified/50_local.conf.inc | 9 + .../README_feature_ss-interfaceunified.md | 3 + .../feature/ss-loggerservice/50_bblayers.conf.inc | 3 + .../feature/ss-loggerservice/50_local.conf.inc | 9 + .../README_feature_ss-loggerservice.md | 3 + .../feature/ss-powerservice/50_bblayers.conf.inc | 3 + .../feature/ss-powerservice/50_local.conf.inc | 9 + .../README_feature_ss-powerservice.md | 3 + .../ss-resourcemanager/50_bblayers.conf.inc | 3 + .../feature/ss-resourcemanager/50_local.conf.inc | 9 + .../README_feature_ss-resourcemanager.md | 3 + .../ss-romaccesslibrary/50_bblayers.conf.inc | 3 + .../feature/ss-romaccesslibrary/50_local.conf.inc | 9 + .../README_feature_ss-romaccesslibrary.md | 3 + .../feature/ss-systemmanager/50_bblayers.conf.inc | 3 + .../feature/ss-systemmanager/50_local.conf.inc | 9 + .../README_feature_ss-systemmanager.md | 3 + .../feature/ss-taskmanager/50_bblayers.conf.inc | 3 + .../feature/ss-taskmanager/50_local.conf.inc | 9 + .../README_feature_ss-taskmanager.md | 3 + .../feature/ss-versionlibrary/50_bblayers.conf.inc | 3 + .../feature/ss-versionlibrary/50_local.conf.inc | 9 + .../README_feature_ss-versionlibrary.md | 3 + .../feature/vs-positioning/50_bblayers.conf.inc | 3 + .../feature/vs-positioning/50_local.conf.inc | 9 + .../README_feature_vs-positioning.md | 3 + .../vs-positioningbaselibrary/50_bblayers.conf.inc | 3 + .../vs-positioningbaselibrary/50_local.conf.inc | 9 + .../README_feature_vs-positioningbaselibrary.md | 3 + .../templates/machine/bbe/50_bblayers.conf.inc | 5 + meta-agl/templates/machine/bbe/50_local.conf.inc | 2 + .../templates/machine/bbe/README_machine_bbe.md | 9 + .../machine/beaglebone/50_bblayers.conf.inc | 1 + .../templates/machine/beaglebone/50_local.conf.inc | 3 + .../beaglebone/README_machine_beaglebone.md | 9 + .../templates/machine/cubox-i/40_bblayers.conf.inc | 6 + .../templates/machine/cubox-i/50_local.conf.inc | 4 + meta-agl/templates/machine/cubox-i/50_setup.sh | 2 + .../machine/cubox-i/README_machine_cubox-i.md | 9 + .../machine/cyclone5/50_bblayers.conf.inc | 1 + .../templates/machine/cyclone5/50_local.conf.inc | 3 + .../machine/cyclone5/README_machine_cyclone5.md | 9 + .../machine/dra7xx-evm/50_bblayers.conf.inc | 1 + .../templates/machine/dra7xx-evm/50_local.conf.inc | 3 + .../dra7xx-evm/README_machine_dra7xx-evm.md | 9 + .../machine/dragonboard-410c/50_bblayers.conf.inc | 2 + .../machine/dragonboard-410c/50_local.conf.inc | 3 + .../README_machine_dragonboard-410c.md | 9 + .../machine/dragonboard-820c/50_bblayers.conf.inc | 1 + .../machine/dragonboard-820c/50_local.conf.inc | 3 + .../README_machine_dragonboard-820c.md | 9 + .../templates/machine/ebisu/50_bblayers.conf.inc | 3 + meta-agl/templates/machine/ebisu/50_local.conf.inc | 6 + meta-agl/templates/machine/ebisu/50_setup.sh | 42 + .../machine/ebisu/README_machine_ebisu.md | 44 + .../machine/h3-salvator-x/50_bblayers.conf.inc | 3 + .../machine/h3-salvator-x/50_local.conf.inc | 4 + .../templates/machine/h3-salvator-x/50_setup.sh | 10 + .../h3-salvator-x/README_machine_h3-salvator-x.md | 9 + .../machine/h3ulcb-nogfx/50_bblayers.conf.inc | 4 + .../machine/h3ulcb-nogfx/50_local.conf.inc | 7 + .../h3ulcb-nogfx/README_machine_h3ulcb-nogfx.md | 9 + .../templates/machine/h3ulcb/50_bblayers.conf.inc | 4 + .../templates/machine/h3ulcb/50_local.conf.inc | 7 + meta-agl/templates/machine/h3ulcb/50_setup.sh | 10 + .../machine/h3ulcb/README_machine_h3ulcb.md | 9 + .../templates/machine/hsdk/40_bblayers.conf.inc | 2 + meta-agl/templates/machine/hsdk/50_local.conf.inc | 2 + .../templates/machine/hsdk/README_machine_hsdk.md | 9 + .../machine/imx6qdlsabreauto/40_bblayers.conf.inc | 5 + .../machine/imx6qdlsabreauto/50_local.conf.inc | 4 + .../templates/machine/imx6qdlsabreauto/50_setup.sh | 2 + .../README_machine_imx6qdlsabreauto.md | 9 + .../machine/intel-corei7-64/50_bblayers.conf.inc | 1 + .../machine/intel-corei7-64/50_local.conf.inc | 3 + .../README_machine_intel-corei7-64.md | 9 + .../machine/m3ulcb-nogfx/50_bblayers.conf.inc | 4 + .../machine/m3ulcb-nogfx/50_local.conf.inc | 6 + .../m3ulcb-nogfx/README_machine_m3ulcb-nogfx.md | 9 + .../templates/machine/m3ulcb/50_bblayers.conf.inc | 4 + .../templates/machine/m3ulcb/50_local.conf.inc | 6 + meta-agl/templates/machine/m3ulcb/50_setup.sh | 10 + .../machine/m3ulcb/README_machine_m3ulcb.md | 9 + .../machine/nitrogen6x/40_bblayers.conf.inc | 6 + .../templates/machine/nitrogen6x/50_local.conf.inc | 3 + meta-agl/templates/machine/nitrogen6x/50_setup.sh | 2 + .../nitrogen6x/README_machine_nitrogen6x.md | 9 + .../templates/machine/qemuarm/50_local.conf.inc | 3 + .../machine/qemuarm/README_machine_qemuarm.md | 9 + .../templates/machine/qemuarm64/50_local.conf.inc | 3 + .../machine/qemuarm64/README_machine_qemuarm64.md | 9 + .../templates/machine/qemux86-64/50_local.conf.inc | 3 + .../qemux86-64/README_machine_qemux86-64.md | 9 + .../machine/raspberrypi3/50_bblayers.conf.inc | 1 + .../machine/raspberrypi3/50_local.conf.inc | 7 + .../raspberrypi3/README_machine_raspberrypi3.md | 9 + .../machine/raspberrypi4/50_bblayers.conf.inc | 1 + .../machine/raspberrypi4/50_local.conf.inc | 8 + 1006 files changed, 61229 insertions(+) create mode 100644 meta-agl/.gitreview create mode 100644 meta-agl/README-AGL.md create mode 100644 meta-agl/README.md create mode 100755 meta-agl/agl-layers-overview.md create mode 100644 meta-agl/docs/devguides-book.yml create mode 100644 meta-agl/docs/profiles.md create mode 100644 meta-agl/meta-agl-basesystem/classes/agl-basesystem-capability.bbclass create mode 100644 meta-agl/meta-agl-basesystem/classes/agl-basesystem-common.bbclass create mode 100644 meta-agl/meta-agl-basesystem/conf/include/agl-basesystem-base.inc create mode 100644 meta-agl/meta-agl-basesystem/conf/layer.conf create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-backupmanager/agl-service-ns-backupmanager_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-notificationpersistent/agl-service-ns-notificationpersistent_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ps-communication/agl-service-ps-communication_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-loggerservice/agl-service-ss-loggerservice_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-powerservice/agl-service-ss-powerservice_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-resourcemanager/agl-service-ss-resourcemanager_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-systemmanager/agl-service-ss-systemmanager_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-taskmanager/agl-service-ss-taskmanager_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-apis/agl-service-vs-positioning/agl-service-vs-positioning_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/agl-basefiles_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/LICENSE create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_common.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_id.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/evk_lib.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/moduleid.h create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/bin/launch_xml2cfg.sh create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_thread.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_types_obsoluted.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_wakeup_order.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/aglpath.h create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/sm_launch_conf.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/npp/version.txt create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/agl.mk create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/rpc_rule.mk create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/system_launcher_main.xml create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/agl-systemd_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/99-agl.rules create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/LICENSE create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/agl-trigger.service create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/env.txt create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/launch_sm.service create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/options.conf create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/setup_refhw.service create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/systemd-udev-trigger.service create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/agl_set_capability.sh create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/launch_sm.sh create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_capability.sh create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_cgroup_rt_runtime_us.sh create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/setup_refhw.sh create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch.cfg create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch__CWORD84_.xml create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/agl_cap.lst create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/cap.lst create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/dir.lst create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/mntfs.lst create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/elfio/elfio_3.2.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/Makefile create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/agldd.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_common.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_id.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/evk_lib.h create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/moduleid.h create mode 100755 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/evk_lib.c create mode 100644 meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ns-backupmanager/ns-backupmanager_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ns-commonlibrary/ns-commonlibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ns-frameworkunified/ns-frameworkunified_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ns-loglibrary/ns-loglibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/os-eventlibrary/os-eventlibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/os-posixbasedos001legacylibrary/os-posixbasedos001legacylibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary-tool_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/os-vehicleparameterlibrary/os-vehicleparameterlibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ps-communication/ps-communication_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ss-config/ss-config_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ss-interfaceunified/ss-interfaceunified_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ss-resourcemanager/ss-resourcemanager_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ss-romaccesslibrary/ss-romaccesslibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ss-taskmanager/ss-taskmanager_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/ss-versionlibrary/ss-versionlibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioning/vs-positioning_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioningbaselibrary/vs-positioningbaselibrary_1.0.0.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-core.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-graphics.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-service.bb create mode 100644 meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem.bb create mode 100644 meta-agl/meta-agl-bsp/classes/sdcard_image-socfpga.bbclass create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_cubox-i.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_cyclone5.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-820c.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_ebisu.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_hsdk.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_nitrogen6x.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_qemuarm.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_qemuarm64.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_ulcb-nogfx.inc create mode 100644 meta-agl/meta-agl-bsp/conf/include/agl_ulcb.inc create mode 100644 meta-agl/meta-agl-bsp/conf/layer.conf create mode 100644 meta-agl/meta-agl-bsp/conf/machine/qemuarm.conf create mode 100644 meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf create mode 100644 meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/libva_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-core/recipes-core/ovmf/ovmf_git.bbappend create mode 100755 meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-ini-conf/fbdev.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-init.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cfg80211.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cgroup.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/namespace.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/tmpfs.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/touchscreen.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch create mode 100644 meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux-firmware/linux-firmware_git.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/fix_branch.scc create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/security-tpm.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/startup.nsh create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.12.bb create mode 100644 meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/files/qcom-q6v5-pil.service create mode 100644 meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb create mode 100644 meta-agl/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-common.inc create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-tools_2019.07.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot.inc create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/libglu_9.0.1.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos_8.4.0.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_19.1.6.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa.inc create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_19.1.6.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro/0001-brcmfmac43455-sdio.txt-Follow-raspbian-change-for-bo.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/rpi-kernel-misc.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-faytech-fix-rpi.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-hciuart.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi_network.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi4.inc create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-init.service create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/files/gpsd.kingfisher create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-kingfisher-conf_1.0.bb create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-Boot-Normal-World-in-EL2.patch create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/renesas-ota-bootfiles.bb create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/ebisu_output.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/kingfisher_output.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/namespace_fix.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh create mode 100644 meta-agl/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/cma-256.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-synopsys/recipes-kernel/linux/linux-arc_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/.gitkeep create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-Add-soc-performance-monitor-utilites.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state/asound.state create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend create mode 100755 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/files/uEnv.txt create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um/pvr.service create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf/unnamed.cfg create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio/dra7xx-evm-set-default-sink-source.patch create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv_3.%.bbappend create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/wayland-protocols_1.17.bb create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bb create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/id-agent.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/shell.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.desktop create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.png create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/xwayland.weston-start create mode 100644 meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.9/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/can-bus.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/i2c-led.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/joystick.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nfc.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/procevent.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtc.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/scheddebug.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/sound.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usb.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbaudio.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbmodem.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uvc.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend create mode 100644 meta-agl/meta-agl-bsp/wic/directdisk.wks.in create mode 100644 meta-agl/meta-agl-bsp/wic/sdimage-bootpart-uuid.wks create mode 100644 meta-agl/meta-agl-bsp/wic/singlepart-noloader.wks create mode 100644 meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks create mode 100644 meta-agl/meta-agl-bsp/wic/systemd-joule-bootdisk.wks create mode 100644 meta-agl/meta-agl-distro/conf/distro/include/aarch64-tune.inc create mode 100644 meta-agl/meta-agl-distro/conf/distro/include/arc-tune.inc create mode 100644 meta-agl/meta-agl-distro/conf/distro/include/arm-tune.inc create mode 100644 meta-agl/meta-agl-distro/conf/distro/include/x86_64-tune.inc create mode 100644 meta-agl/meta-agl-distro/conf/distro/poky-agl.conf create mode 100644 meta-agl/meta-agl-distro/conf/layer.conf create mode 100755 meta-agl/meta-agl-distro/scripts/oe-depends-dot create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.bb create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.inc create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qt5.bb create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qtcompositor.bb create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0001-fixed-eglfs_kms-fails-to-build.patch create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0002-fixed-invalid-conversion-from-EGLNativeDisplayType-to-void.patch create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtbase_%.bbappend create mode 100644 meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtcompositor-conf_1.0.bb create mode 100644 meta-agl/meta-agl-profile-cluster/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.bb create mode 100644 meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.inc create mode 100644 meta-agl/meta-agl-profile-cluster/recipes-platform/packagegroups/packagegroup-agl-profile-cluster.bb create mode 100644 meta-agl/meta-agl-profile-core/classes/cloc.bbclass create mode 100644 meta-agl/meta-agl-profile-core/conf/include/agl-devel.inc create mode 100644 meta-agl/meta-agl-profile-core/conf/include/agl-gplv2.inc create mode 100644 meta-agl/meta-agl-profile-core/conf/include/agl-pulseaudio.inc create mode 100644 meta-agl/meta-agl-profile-core/conf/include/base-agl.inc create mode 100644 meta-agl/meta-agl-profile-core/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-core/files/group create mode 100644 meta-agl/meta-agl-profile-core/files/passwd create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-map/agl-service-bluetooth-map_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-pbap/agl-service-bluetooth-pbap_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth/agl-service-bluetooth_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/files/run-ptest create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-data-persistence/agl-service-data-persistence_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geoclue/agl-service-geoclue_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geofence/agl-service-geofence_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-gps/agl-service-gps_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-identity-agent/agl-service-identity-agent_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-iiodevices/agl-service-iiodevices_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-mediascanner/agl-service-mediascanner_git.bb create mode 100755 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-navigation/agl-service-navigation_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-network/agl-service-network_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-nfc/agl-service-nfc_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-platform-info/agl-service-platform-info_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/agl-service-signal-composer_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/files/run-ptest create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-steering-wheel/agl-service-steering-wheel_0.1.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-telephony/agl-service-telephony_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-unicens/agl-service-unicens_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/agl-service-weather/agl-service-weather_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-apis/high-level-viwi-service/high-level-viwi-service.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-config/agl-login-manager/agl-login-manager_0.1.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-config/agl-users/agl-users_0.1.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default create mode 100644 meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/files/bluez-alsa.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/0001-obex-report-notification-status-on-incoming-message.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/bluetooth.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/busybox_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/files/enable-wget-https.cfg create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/.appends.core create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman.inc create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/connman create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_1.36.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/main.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/libnfc/libnfc_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neard/neard_0.16.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal.inc create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/ncl.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal_0.14.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/ofono.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/ofono_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/.appends.core create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.socket create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus_env.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/libdbus-c++/dbus-c++-threading.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++/dbus-c++-threading.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++_0.9.0.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/distro-build-manifest/distro-build-manifest.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/glibc/.appends.core create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc/arm/local-arm-futex.diff create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc_2.2%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/psplash/.appends.core create mode 100755 meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-anim create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-colors.h create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-poky-img.h create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-quit.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-start.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/psplash/psplash_git.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/systemd/.appends.core create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/canbus-can.network create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/e2fsck.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/wired.network create mode 100644 meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/cmake-apps-module/cmake-apps-module_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/gdb/.appends.core create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/gdb/gdb_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.inc create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/libappcontroller/libappcontroller_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/low-level-can-generator/low-level-can-generator_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/nativesdk-packagegroup-sdk-host.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/qemu/qemu_%.bbappend create mode 100755 meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-extended/gperf/.appends.core create mode 100644 meta-agl/meta-agl-profile-core/recipes-extended/gperf/gperf_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0002-src-most-add-auto-conf-feature.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0003-core-remove-kernel-log-for-MBO-status.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0004-most-video-set-device_caps.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0006-dim2-fix-startup-sequence.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0007-dim2-use-device-tree.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0008-dim2-read-clock-speed-from-the-device-tree.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0009-dim2-use-device-for-coherent-memory-allocation.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/files/0001-add-a-configure-option-to-disable-build-of-man-pages.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/libmp4v2_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/.appends.meta-efl create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0001-Define-comparison_fn_t-for-non-glibc-systems.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0002-switch-from-G_BUS_TYPE_SESSION-to-G_BUS_TYPE_SYSTEM.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/dbus-lightmediascanner.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/id3-plugin-support-out-of-tree-build.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/lightmediascanner.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/plugin-ogg-fix-chucksize-issue.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_0.5.1.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/agl-audio-plugin_0.1.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/files/org.freedesktop.GeoClue2.Client.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/geoclue_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-navigation/gpsd/gpsd_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.inc create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-ivi-crosssdk.bb create mode 100755 meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-crosssdk.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-qa.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.inc create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-navigation.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-services.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/curl/curl_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/curl/curl_7.66.0.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/libmicrohttpd/libmicrohttpd_0.9.63.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/libsoup/libsoup-2.4_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/nghttp2/nghttp2_1.39.1.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.sh create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/udisks/files/org.freedesktop.UDisks.conf create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/udisks/files/udisks.service create mode 100644 meta-agl/meta-agl-profile-core/recipes-support/udisks/udisks_1.0.5.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/afb-test/afb-test_git.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/afb-test/files/run-ptest create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/aiostress/aiostress_0.22.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0001-Makefile.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0002-auto.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0003-printcleanup.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0004-bs_main.c.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad_2006-11-14-23-57.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/dung/dung_3.4.25-m2.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/ebizzy/ebizzy_0.3.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/ffsb/ffsb_6.0-rc2.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/fontconfig/fontconfig_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/files/0001-fix_missing_header_sys_stat.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/fsfuzzer_0.7.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/glmark2/glmark2_%.bbappend create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/himeno/himeno_2.0.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/interbench/interbench_0.31.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/ipv6connect/ipv6connect.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/linpack/linpack.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/linus-stress/linus-stress.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/packagegroups/packagegroup-agl-test.bb create mode 100644 meta-agl/meta-agl-profile-core/recipes-test/trinity/trinity_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical-html5/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service create mode 100644 meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh create mode 100644 meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5_git.bb create mode 100755 meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb create mode 100644 meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.bb create mode 100644 meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.inc create mode 100644 meta-agl/meta-agl-profile-graphical-html5/recipes-platform/packagegroups/packagegroup-agl-demo-platform-html5.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-native.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-qt5.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-devtools/libafb-helpers-qt/libafb-helpers-qt_git.bb create mode 100755 meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.inc create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-appfw-native-qt5.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-demo-qt-examples.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-graphical-qt5.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-qt5-toolchain-target.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibhomescreen/qlibhomescreen_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibwindowmanager/qlibwindowmanager_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qml-execscript-plugin/qml-execscript-plugin_1.0.bb create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase-native_git.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase/0001-Force-qdbus-to-make-introspect-for-every-findMetaObj.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia/0001-metadata-image-support-with-the-data-URL-scheme-for-.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtsystems_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0001-protocol-update-3rd-party-ivi-application-protocol.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0002-qwaylandwindow-add-support-for-IVI-Surface-ID-proper.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0010-Added-manifest-file-according-to-smack-3-domain-mode.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0016-xdg-shell-Add-xdg-shell-protocol-file-version-1.4.0.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0017-xdg-shell-Add-minimize-feature-to-QWindow-using-wayl.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0019-xdg-shell-upgrade-to-support-current-version-weston-.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0020-Add-IVI-Shell-protocol-file-version-patch-v6.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0021-Implement-initial-IVI-Shell-support.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/UNUSED_NEEDS_CHECK_YOCTO_0018-packaging-enable-xdg-shell-at-runtime.patch create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwebkit_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qtaglextras/qtaglextras_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/classes/agl-graphical.bbclass create mode 100644 meta-agl/meta-agl-profile-graphical/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-homescreen/agl-service-homescreen_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-mediaplayer/agl-service-mediaplayer_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-radio/agl-service-radio_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-taskmanager/agl-service-taskmanager.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/files/weston-ready.conf create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.path create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.service create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/files/hmi-debug create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/hmi-debug_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen/org.agl.statusbar.conf create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/libwindowmanager/libwindowmanager_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/runxdg/runxdg_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/Readme.weston-ini-conf create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-add-LayerManagerControl-error-status.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0005-disable-EGLWLMockNavigation-example-build.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.service.add create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston_tmpfiles.conf create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready.service create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready_1.0.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-removed-assert.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-layout-interface-added-interface-to-change-surface-id.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-ivi-layout-introcuded-configure_desktop_changed.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0007-ivi-shell-linked-libweston-desktop-and-added-structs.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0008-ivi-layout-use-libweston-desktop-api-for-views.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0010-ivi-shell-remove-surface_destroy_listener.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0014-simple-shm-remove-ivi-application-support.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0015-window-client-remove-ivi-application-support.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-compositor-add-output-type-to-weston_output.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-compositor-drm-introduce-drm_get_dmafd_from_view.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0018-compositor-drm-get-stride-from-drm_get_dma_fd_from_view.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_5.0.0.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad/0001-install-wayland.h.patch create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_1.14.%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-good/gstreamer1.0-plugins-good_%.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.inc create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bbappend create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-services.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb create mode 100644 meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb create mode 100644 meta-agl/meta-agl-profile-hud/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-telematics/conf/layer.conf create mode 100644 meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.bb create mode 100644 meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.inc create mode 100644 meta-agl/meta-agl-profile-telematics/recipes-platform/packagegroups/packagegroup-agl-profile-telematics.bb create mode 100755 meta-agl/meta-agl.md create mode 100644 meta-agl/meta-agl/conf/layer.conf create mode 100644 meta-agl/meta-app-framework/classes/aglwgt.bbclass create mode 100644 meta-agl/meta-app-framework/conf/include/agl-appfw-smack.inc create mode 100644 meta-agl/meta-app-framework/conf/layer.conf create mode 100644 meta-agl/meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_git.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/af-binder/af-binder_git.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/af-binder/af-binder_git.inc create mode 100644 meta-agl/meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_git.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/af-main/af-main/Hack-to-allow-the-debugging.patch create mode 100644 meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.inc create mode 100644 meta-agl/meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/af-platform-setup/af-platform-setup_1.0.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/af-platform-setup/files/udev-shared.conf create mode 100644 meta-agl/meta-app-framework/recipes-core/base-files/base-files_%.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-core/nss-localuser/nss-localuser_0.1.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework-examples.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Adapt-rules-to-AGL.patch create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-Cmake-conf-for-gcc6-build.patch create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-gcc6-build.patch create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-gcc-7-requires-include-functional-for-std-function.patch create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/Removing-tizen-platform-config.patch create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.service create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.sh create mode 100644 meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-core/shadow/shadow_%.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-core/systemd-sync/systemd-agl-sync_1.0.bb create mode 100644 meta-agl/meta-app-framework/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-kernel/linux/linux-%.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-kernel/linux/linux/audit.cfg create mode 100644 meta-agl/meta-app-framework/recipes-platform/packagegroups/packagegroup-agl-core-security.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-platform/packagegroups/packagegroup-agl-image-boot.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-security/security-manager/security-manager_git.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-security/xmlsec1/xmlsec1_1.%.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-support/libcap/libcap/removing-capability-enforcement.patch create mode 100644 meta-agl/meta-app-framework/recipes-support/libcap/libcap_%.bbappend create mode 100644 meta-agl/meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb create mode 100644 meta-agl/meta-netboot/README create mode 100644 meta-agl/meta-netboot/README.renesas-gen3 create mode 100644 meta-agl/meta-netboot/classes/netboot.bbclass create mode 100644 meta-agl/meta-netboot/conf/include/agl-netboot.inc create mode 100644 meta-agl/meta-netboot/conf/layer.conf create mode 100644 meta-agl/meta-netboot/recipes-core/busybox/busybox_%.bbappend create mode 100644 meta-agl/meta-netboot/recipes-core/busybox/files/enable_nbd.cfg create mode 100644 meta-agl/meta-netboot/recipes-core/images/initramfs-netboot-image.bb create mode 100644 meta-agl/meta-netboot/recipes-core/initramfs-netboot/files/init.sh create mode 100644 meta-agl/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb create mode 100644 meta-agl/meta-netboot/recipes-support/nbd/nbd_%.bbappend create mode 100644 meta-agl/meta-security/COPYING.MIT create mode 100644 meta-agl/meta-security/README.md create mode 100644 meta-agl/meta-security/conf/layer.conf create mode 100644 meta-agl/meta-security/recipes-connectivity/bluez5/bluez5_%.bbappend create mode 100644 meta-agl/meta-security/recipes-connectivity/bluez5/files/bluetooth.service.conf create mode 100644 meta-agl/meta-security/recipes-connectivity/connman/connman_%.bbappend create mode 100644 meta-agl/meta-security/recipes-connectivity/connman/files/connman.service.conf create mode 100644 meta-agl/meta-security/recipes-core/base-files/base-files_%.bbappend create mode 100644 meta-agl/meta-security/recipes-core/coreutils/coreutils_%.bbappend create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0006-Fix-gcc-8-warnings.patch create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0007-Fix-SIGSEGV-on-disconnections.patch create mode 100644 meta-agl/meta-security/recipes-core/dbus-cynara/dbus_1.12.10.bbappend create mode 100644 meta-agl/meta-security/recipes-core/packagegroups/packagegroup-security-framework.bb create mode 100644 meta-agl/meta-security/recipes-core/smack-system-setup/files/55-udev-smack-default.rules create mode 100644 meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-journald.service.conf create mode 100644 meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-tmpfiles-setup.service.conf create mode 100644 meta-agl/meta-security/recipes-core/smack-system-setup/files/tmp.mount.conf create mode 100644 meta-agl/meta-security/recipes-core/smack-system-setup/smack-system-setup_1.bb create mode 100644 meta-agl/meta-security/recipes-core/systemd/systemd/0001-Switch-Smack-label-earlier.patch create mode 100644 meta-agl/meta-security/recipes-core/systemd/systemd_239.bbappend create mode 100644 meta-agl/meta-security/recipes-core/util-linux/util-linux_%.bbappend create mode 100644 meta-agl/meta-security/recipes-kernel/linux/linux-%.bbappend create mode 100644 meta-agl/meta-security/recipes-kernel/linux/linux/audit.cfg create mode 100644 meta-agl/meta-security/recipes-kernel/linux/linux/smack-default-lsm.cfg create mode 100644 meta-agl/meta-security/recipes-kernel/linux/linux/smack.cfg create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/add-system-call-table-for-ARM.patch create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/audit-for-cross-compiling.patch create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/audit-python-configure.patch create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/audit-python.patch create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/audit-volatile.conf create mode 100755 meta-agl/meta-security/recipes-security/audit/audit/auditd create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/auditd.service create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/disable-ldap.patch create mode 100644 meta-agl/meta-security/recipes-security/audit/audit/fix-swig-host-contamination.patch create mode 100644 meta-agl/meta-security/recipes-security/audit/audit_2.3.2.bb create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch create mode 100755 meta-agl/meta-security/recipes-security/cynara/cynara/run-ptest create mode 100644 meta-agl/meta-security/recipes-security/cynara/cynara_0.14.10.bb create mode 100644 meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils-arm-remove-m32-m64.patch create mode 100644 meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_library_install.patch create mode 100644 meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86-64_cflags.patch create mode 100644 meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86_cflags.patch create mode 100644 meta-agl/meta-security/recipes-security/keyutils/keyutils_1.5.8.bb create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager.inc create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Avoid-casting-from-const-T-to-void.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Smack-rules-create-two-new-functions.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/0002-app-install-implement-multiple-set-of-smack-rules.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/Removing-tizen-platform-config.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/c-11-replace-depracated-auto_ptr.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/include-linux-xattr.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/libcap-without-pkgconfig.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/removes-dependency-to-libslp-db-utils.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/security-manager-policy-reload-do-not-depend-on-GNU-.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/socket-manager-removes-tizen-specific-call.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager/systemd-stop-using-compat-libs.patch create mode 100644 meta-agl/meta-security/recipes-security/security-manager/security-manager_git.bb create mode 100644 meta-agl/meta-security/recipes-security/smacknet/files/smacknet create mode 100644 meta-agl/meta-security/recipes-security/smacknet/files/smacknet.service create mode 100644 meta-agl/meta-security/recipes-security/smacknet/smacknet.bb create mode 100644 meta-agl/meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend create mode 100755 meta-agl/scripts/.aglsetup_genconfig.bash create mode 100644 meta-agl/scripts/README-mkefi-agl.md create mode 100644 meta-agl/scripts/aglsetup.sh create mode 100755 meta-agl/scripts/distro-manifest-generator.sh create mode 100644 meta-agl/scripts/envsetup.sh create mode 100755 meta-agl/scripts/ias_image_app create mode 100755 meta-agl/scripts/mkabl-agl.sh create mode 100755 meta-agl/scripts/mkefi-agl.sh create mode 100644 meta-agl/templates/base/00_local.conf.agl.inc create mode 100644 meta-agl/templates/base/01_setup_EULAfunc.sh create mode 100644 meta-agl/templates/base/01_setup_pkg_revision.sh create mode 100644 meta-agl/templates/base/99_local.conf.inc create mode 100644 meta-agl/templates/base/99_setup_EULAconf.sh create mode 100644 meta-agl/templates/base/bblayers.conf.sample create mode 100644 meta-agl/templates/base/conf-notes.txt create mode 100644 meta-agl/templates/base/local.conf.sample create mode 100644 meta-agl/templates/feature/agl-all-features/README_feature_agl-all-features.md create mode 100644 meta-agl/templates/feature/agl-all-features/included.dep create mode 100644 meta-agl/templates/feature/agl-appfw-smack/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-appfw-smack/README_feature_agl-appfw-smack.md create mode 100644 meta-agl/templates/feature/agl-archiver/.50_FEATURE.md.swp create mode 100644 meta-agl/templates/feature/agl-archiver/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-archiver/README_feature_agl-archiver.md create mode 100644 meta-agl/templates/feature/agl-basesystem/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-basesystem/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-basesystem/README_feature_agl-basesystem.md create mode 100644 meta-agl/templates/feature/agl-buildstats/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-buildstats/README_feature_agl-buildstats.md create mode 100644 meta-agl/templates/feature/agl-ci-change-features-nogfx/README_feature_agl-ci-change-features-nogfx.md create mode 100644 meta-agl/templates/feature/agl-ci-change-features-nogfx/included.dep create mode 100644 meta-agl/templates/feature/agl-ci-change-features/README_feature_agl-ci-change-features.md create mode 100644 meta-agl/templates/feature/agl-ci-change-features/included.dep create mode 100644 meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/README_feature_agl-ci-snapshot-features-nogfx.md create mode 100644 meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/included.dep create mode 100644 meta-agl/templates/feature/agl-ci-snapshot-features/README_feature_agl-ci-snapshot-features.md create mode 100644 meta-agl/templates/feature/agl-ci-snapshot-features/included.dep create mode 100644 meta-agl/templates/feature/agl-ci/99_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-ci/README_feature_agl-ci.md create mode 100644 meta-agl/templates/feature/agl-devel/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-devel/README_feature_agl-devel.md create mode 100644 meta-agl/templates/feature/agl-egvirt/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-egvirt/README_feature_agl-egvirt.md create mode 100644 meta-agl/templates/feature/agl-fossdriver/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-fossdriver/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-fossdriver/README_feature_agl-fossdriver.md create mode 100644 meta-agl/templates/feature/agl-gplv2/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-gplv2/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-gplv2/README_feature_agl-gplv2.md create mode 100644 meta-agl/templates/feature/agl-hmi-framework/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-hmi-framework/README_feature_agl-hmi-framework.md create mode 100644 meta-agl/templates/feature/agl-netboot/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-netboot/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-netboot/README_feature_agl-netboot.md create mode 100644 meta-agl/templates/feature/agl-profile-cluster-qt5/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-profile-cluster-qt5/README_feature_agl-profile-cluster-qt5.md create mode 100644 meta-agl/templates/feature/agl-profile-cluster-qt5/included.dep create mode 100644 meta-agl/templates/feature/agl-profile-cluster/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-profile-cluster/README_feature_agl-profile-cluster.md create mode 100644 meta-agl/templates/feature/agl-profile-cluster/included.dep create mode 100644 meta-agl/templates/feature/agl-profile-graphical-html5/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-profile-graphical-html5/README_feature_agl-profile-graphical-html5.md create mode 100644 meta-agl/templates/feature/agl-profile-graphical-html5/included.dep create mode 100644 meta-agl/templates/feature/agl-profile-graphical-qt5/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-profile-graphical-qt5/README_feature_agl-profile-graphical-qt5.md create mode 100644 meta-agl/templates/feature/agl-profile-graphical-qt5/included.dep create mode 100644 meta-agl/templates/feature/agl-profile-graphical/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-profile-graphical/README_feature_agl-profile-graphical.md create mode 100644 meta-agl/templates/feature/agl-profile-hud/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-profile-hud/README_feature_agl-profile-hud.md create mode 100644 meta-agl/templates/feature/agl-profile-telematics/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-profile-telematics/README_feature_agl-profile-telematics.md create mode 100644 meta-agl/templates/feature/agl-ptest/90_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-ptest/README_feature_agl-ptest.md create mode 100644 meta-agl/templates/feature/agl-sota/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/agl-sota/50_local.conf.inc create mode 100644 meta-agl/templates/feature/agl-sota/README_feature_agl-sota.md create mode 100644 meta-agl/templates/feature/ns-backupmanager/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ns-backupmanager/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ns-backupmanager/README_feature_ns-backupmanager.md create mode 100644 meta-agl/templates/feature/ns-commonlibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ns-commonlibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ns-commonlibrary/README_feature_ns-commonlibrary.md create mode 100644 meta-agl/templates/feature/ns-frameworkunified/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ns-frameworkunified/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ns-frameworkunified/README_feature_ns-frameworkunified.md create mode 100644 meta-agl/templates/feature/ns-loglibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ns-loglibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ns-loglibrary/README_feature_ns-loglibrary.md create mode 100644 meta-agl/templates/feature/ns-notificationpersistent/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ns-notificationpersistent/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ns-notificationpersistent/README_feature_ns-notificationpersistent.md create mode 100644 meta-agl/templates/feature/os-eventlibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/os-eventlibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/os-eventlibrary/README_feature_os-eventlibrary.md create mode 100644 meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/os-posixbasedos001legacylibrary/README_feature_os-posixbasedos001legacylibrary.md create mode 100644 meta-agl/templates/feature/os-rpclibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/os-rpclibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/os-rpclibrary/README_feature_os-rpclibrary.md create mode 100644 meta-agl/templates/feature/os-vehicleparameterlibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/os-vehicleparameterlibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/os-vehicleparameterlibrary/README_feature_os-vehicleparameterlibrary.md create mode 100644 meta-agl/templates/feature/ps-communication/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ps-communication/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ps-communication/README_feature_ps-communication.md create mode 100644 meta-agl/templates/feature/ss-config/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-config/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-config/README_feature_ss-config.md create mode 100644 meta-agl/templates/feature/ss-interfaceunified/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-interfaceunified/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-interfaceunified/README_feature_ss-interfaceunified.md create mode 100644 meta-agl/templates/feature/ss-loggerservice/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-loggerservice/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-loggerservice/README_feature_ss-loggerservice.md create mode 100644 meta-agl/templates/feature/ss-powerservice/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-powerservice/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-powerservice/README_feature_ss-powerservice.md create mode 100644 meta-agl/templates/feature/ss-resourcemanager/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-resourcemanager/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-resourcemanager/README_feature_ss-resourcemanager.md create mode 100644 meta-agl/templates/feature/ss-romaccesslibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-romaccesslibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-romaccesslibrary/README_feature_ss-romaccesslibrary.md create mode 100644 meta-agl/templates/feature/ss-systemmanager/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-systemmanager/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-systemmanager/README_feature_ss-systemmanager.md create mode 100644 meta-agl/templates/feature/ss-taskmanager/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-taskmanager/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-taskmanager/README_feature_ss-taskmanager.md create mode 100644 meta-agl/templates/feature/ss-versionlibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/ss-versionlibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/ss-versionlibrary/README_feature_ss-versionlibrary.md create mode 100644 meta-agl/templates/feature/vs-positioning/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/vs-positioning/50_local.conf.inc create mode 100644 meta-agl/templates/feature/vs-positioning/README_feature_vs-positioning.md create mode 100644 meta-agl/templates/feature/vs-positioningbaselibrary/50_bblayers.conf.inc create mode 100644 meta-agl/templates/feature/vs-positioningbaselibrary/50_local.conf.inc create mode 100644 meta-agl/templates/feature/vs-positioningbaselibrary/README_feature_vs-positioningbaselibrary.md create mode 100644 meta-agl/templates/machine/bbe/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/bbe/50_local.conf.inc create mode 100644 meta-agl/templates/machine/bbe/README_machine_bbe.md create mode 100644 meta-agl/templates/machine/beaglebone/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/beaglebone/50_local.conf.inc create mode 100644 meta-agl/templates/machine/beaglebone/README_machine_beaglebone.md create mode 100644 meta-agl/templates/machine/cubox-i/40_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/cubox-i/50_local.conf.inc create mode 100644 meta-agl/templates/machine/cubox-i/50_setup.sh create mode 100644 meta-agl/templates/machine/cubox-i/README_machine_cubox-i.md create mode 100644 meta-agl/templates/machine/cyclone5/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/cyclone5/50_local.conf.inc create mode 100644 meta-agl/templates/machine/cyclone5/README_machine_cyclone5.md create mode 100644 meta-agl/templates/machine/dra7xx-evm/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/dra7xx-evm/50_local.conf.inc create mode 100644 meta-agl/templates/machine/dra7xx-evm/README_machine_dra7xx-evm.md create mode 100644 meta-agl/templates/machine/dragonboard-410c/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/dragonboard-410c/50_local.conf.inc create mode 100644 meta-agl/templates/machine/dragonboard-410c/README_machine_dragonboard-410c.md create mode 100644 meta-agl/templates/machine/dragonboard-820c/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/dragonboard-820c/50_local.conf.inc create mode 100644 meta-agl/templates/machine/dragonboard-820c/README_machine_dragonboard-820c.md create mode 100644 meta-agl/templates/machine/ebisu/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/ebisu/50_local.conf.inc create mode 100644 meta-agl/templates/machine/ebisu/50_setup.sh create mode 100644 meta-agl/templates/machine/ebisu/README_machine_ebisu.md create mode 100644 meta-agl/templates/machine/h3-salvator-x/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/h3-salvator-x/50_local.conf.inc create mode 100644 meta-agl/templates/machine/h3-salvator-x/50_setup.sh create mode 100644 meta-agl/templates/machine/h3-salvator-x/README_machine_h3-salvator-x.md create mode 100644 meta-agl/templates/machine/h3ulcb-nogfx/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/h3ulcb-nogfx/50_local.conf.inc create mode 100644 meta-agl/templates/machine/h3ulcb-nogfx/README_machine_h3ulcb-nogfx.md create mode 100644 meta-agl/templates/machine/h3ulcb/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/h3ulcb/50_local.conf.inc create mode 100644 meta-agl/templates/machine/h3ulcb/50_setup.sh create mode 100644 meta-agl/templates/machine/h3ulcb/README_machine_h3ulcb.md create mode 100644 meta-agl/templates/machine/hsdk/40_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/hsdk/50_local.conf.inc create mode 100644 meta-agl/templates/machine/hsdk/README_machine_hsdk.md create mode 100644 meta-agl/templates/machine/imx6qdlsabreauto/40_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/imx6qdlsabreauto/50_local.conf.inc create mode 100644 meta-agl/templates/machine/imx6qdlsabreauto/50_setup.sh create mode 100644 meta-agl/templates/machine/imx6qdlsabreauto/README_machine_imx6qdlsabreauto.md create mode 100644 meta-agl/templates/machine/intel-corei7-64/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/intel-corei7-64/50_local.conf.inc create mode 100644 meta-agl/templates/machine/intel-corei7-64/README_machine_intel-corei7-64.md create mode 100644 meta-agl/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/m3ulcb-nogfx/50_local.conf.inc create mode 100644 meta-agl/templates/machine/m3ulcb-nogfx/README_machine_m3ulcb-nogfx.md create mode 100644 meta-agl/templates/machine/m3ulcb/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/m3ulcb/50_local.conf.inc create mode 100644 meta-agl/templates/machine/m3ulcb/50_setup.sh create mode 100644 meta-agl/templates/machine/m3ulcb/README_machine_m3ulcb.md create mode 100644 meta-agl/templates/machine/nitrogen6x/40_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/nitrogen6x/50_local.conf.inc create mode 100644 meta-agl/templates/machine/nitrogen6x/50_setup.sh create mode 100644 meta-agl/templates/machine/nitrogen6x/README_machine_nitrogen6x.md create mode 100644 meta-agl/templates/machine/qemuarm/50_local.conf.inc create mode 100644 meta-agl/templates/machine/qemuarm/README_machine_qemuarm.md create mode 100644 meta-agl/templates/machine/qemuarm64/50_local.conf.inc create mode 100644 meta-agl/templates/machine/qemuarm64/README_machine_qemuarm64.md create mode 100644 meta-agl/templates/machine/qemux86-64/50_local.conf.inc create mode 100644 meta-agl/templates/machine/qemux86-64/README_machine_qemux86-64.md create mode 100644 meta-agl/templates/machine/raspberrypi3/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/raspberrypi3/50_local.conf.inc create mode 100644 meta-agl/templates/machine/raspberrypi3/README_machine_raspberrypi3.md create mode 100644 meta-agl/templates/machine/raspberrypi4/50_bblayers.conf.inc create mode 100644 meta-agl/templates/machine/raspberrypi4/50_local.conf.inc (limited to 'meta-agl') diff --git a/meta-agl/.gitreview b/meta-agl/.gitreview new file mode 100644 index 00000000..560b71ac --- /dev/null +++ b/meta-agl/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.automotivelinux.org +port=29418 +project=AGL/meta-agl +defaultbranch=halibut diff --git a/meta-agl/README-AGL.md b/meta-agl/README-AGL.md new file mode 100644 index 00000000..92a2c46a --- /dev/null +++ b/meta-agl/README-AGL.md @@ -0,0 +1,34 @@ +Overview +======== + +The +[AGL Project](https://www.automotivelinux.org/) is an automotive-specific +development environment that provides a Linux distribution +[AGL UCB](https://www.automotivelinux.org/software/unified-code-base). + +AGL uses layers designed to be compatible with the +[Yocto Project](https://www.yoctoproject.org) and the +[OpenEmbedded Project (OE)](https://www.openembedded.org/wiki/Main_Page). + +This section provides information about the layers used by the AGL Project: + +* **`meta-agl`**: Minimal set of software needed to create an AGL distribution + used to boot a system. + AGL profiles are built on top of this minimal set of software. + +* **`meta-agl-demo`**: Provides a reference or demo platform and applications + for the AGL Distribution. + The reference UI is part of the `meta-agl-demo` layer. + +* **`meta-agl-devel`**: Contains components under development or being tested. + This layer also contains software packages that OEMs need but do not exist + in AGL. + + +**WRITER NOTES:** The content for this section is the `README-AGL.md` + file that is in the `meta-agl` layer, which is a Gerrit layer. + You can clone the layer using this command: + + ``` + $ git clone https://gerrit.automotivelinux.org/gerrit/AGL/meta-agl + diff --git a/meta-agl/README.md b/meta-agl/README.md new file mode 100644 index 00000000..9967f084 --- /dev/null +++ b/meta-agl/README.md @@ -0,0 +1,135 @@ +# 'meta-agl' layer + +See README-AGL.md for general information about Automotive Grade Linux. + +## meta-agl, the core layer for Automotive Grade Linux Distribution + +AGL is creating an automotive specific Linux distribution that unifies +the software that has been written in a number of places already, +such as GENIVI and Tizen IVI. + +The layer 'meta-agl' provides a minimal set of software +to boot system of AGL Distribution. 'meta-agl' is the minimal +core which is used build AGL profiles on top of it. + +Especially there is no reference UI included which is part of 'meta-agl-demo'. + +Additional components like the security framework are part of 'meta-agl-extra'. + +The AGL community appreciates feedback, ideas, suggestion, bugs and +documentation just as much as code. Please join the irc conversation +at the #automotive channel on irc.freenode.net and our mailing list. + +For infomation for subscribing to the mailing list + [automotive-discussions](http://lists.linuxfoundation.org/mailman/listinfo/automotive-discussions) +For information about AGL Distribution, see the + [AGL Distribution](https://wiki.automotivelinux.org/agl-distro) +For information abount Getting started with AGL + [here](https://wiki.automotivelinux.org/start/getting-started) +For information about contributing to the AGL Distro + [here](https://wiki.automotivelinux.org/agl-distro/contributing) + +## Quick start guide + +See README-AGL.md + +## 'meta-agl' Layer Dependencies + +* poky + > URI: git://git.yoctoproject.org/poky + > branch : jethro + > tested revision: 40376446904ae3529be41737fed9a0b650ed167d + +* meta-openembedded + > URI: git://git.openembedded.org/meta-openembedded + > layer : meta-openembedded + > branch : jethro + > tested revision: 8ab04afbffb4bc5184cfe0655049de6f44269990 + +Specifically out of meta-openembedded these sub-layers are used: + +* meta-openembedded/meta-oe +* meta-openembedded/meta-multimedia +* meta-openembedded/meta-networking +* meta-openembedded/meta-python + +## Layers + +There are 5 layers in top-level `meta-agl`. + +* `meta-agl/meta-ivi-common`\ + `meta-ivi-common` is a layer which contains common packages to AGL + Distribution and other platforms for In-Vehicle Infotainment system. +* `meta-agl/meta-agl`\ + `meta-agl` is a layer which contains AGL common and middleware packages. +* `meta-agl/meta-agl-bsp`\ + `meta-agl-bsp` is a layer which contains required packages to boot AGL + distribution on an emulated machine(QEMU). +* `meta-agl/meta-netboot`\ + `meta-netboot` contains the netboot initrd support recipes. This is needed + in case of booting over the network as NFS does not support the securitylabels. + +## Packagegroups + +AGL package group design: + +* packagegroup-agl-image-minimal + + packagegroup-agl-core-automotive.bb + packagegroup-agl-core-connectivity.bb + packagegroup-agl-core-graphics.bb + packagegroup-agl-core-kernel.bb + packagegroup-agl-core-multimedia.bb + packagegroup-agl-core-navi-lbs.bb + packagegroup-agl-core-os-commonlibs.bb + packagegroup-agl-core-security.bb + packagegroup-agl-core-speech-services.bb + +These are for making image ``agl-image-minimal`` which is small image just +capable of allowing a device to boot. + +Subsystem should maintain packagegroup-agl-core-[subsystem].bb which should +hold sufficient packages to build ``agl-image-minimal``. + +* packagegroup-agl-image-ivi + + packagegroup-agl-ivi-automotive.bb + packagegroup-agl-ivi-connectivity.bb + packagegroup-agl-ivi-graphics.bb + packagegroup-agl-ivi-kernel.bb + packagegroup-agl-ivi-multimedia.bb + packagegroup-agl-ivi-navi-lbs.bb + packagegroup-agl-ivi-os-commonlibs.bb + packagegroup-agl-ivi-security.bb + packagegroup-agl-ivi-speech-services.bb + +These are for making image ``agl-image-ivi`` which is baseline for the profiles +of AGL distro. 'Baseline' means Service Layer and Operating System Layer defined +in AGL Spec v1.0. + +* packagegroup-agl-test.bb + +Additional tools used in QA tests (for agl-image*-qa). + +* packagegroup-ivi-common* + + packagegroup-ivi-common-core-automotive.bb + packagegroup-ivi-common-core.bb + packagegroup-ivi-common-core-connectivity.bb + packagegroup-ivi-common-core-graphics.bb + packagegroup-ivi-common-core-kernel.bb + packagegroup-ivi-common-core-multimedia.bb + packagegroup-ivi-common-core-navi-lbs.bb + packagegroup-ivi-common-core-os-commonlibs.bb + packagegroup-ivi-common-core-security.bb + packagegroup-ivi-common-core-speech-services.bb + packagegroup-ivi-common-test.bb + +These are for picking up some packages from upstreams like GENIVI/Tizen/Others. +The layer of ``meta-ivi-common`` has no image to build, all packagegroups are +aggregated to ``packagegroup-ivi-common-core' and it is included by images, +``agl-image-ivi.bb`` and ``agl-demo-platform.bb``. + +## Supported Machines + +See [docs.automotivelinux.org](http://docs.automotivelinux.org) diff --git a/meta-agl/agl-layers-overview.md b/meta-agl/agl-layers-overview.md new file mode 100755 index 00000000..409eae52 --- /dev/null +++ b/meta-agl/agl-layers-overview.md @@ -0,0 +1,25 @@ +Overview +======== + +The +[AGL Project](https://www.automotivelinux.org/) is an automotive-specific +development environment that provides a Linux distribution +[(AGL UCB](https://www.automotivelinux.org/software/unified-code-base)). + +AGL uses layers designed to be compatible with the +[Yocto Project](https://www.yoctoproject.org) and the +[OpenEmbedded Project (OE)](https://www.openembedded.org/wiki/Main_Page). + +This section provides information about the layers used by the AGL Project: + +* **`meta-agl`**: Minimal set of software needed to create an AGL distribution + used to boot a system. + AGL profiles are built on top of this minimal set of software. + +* **`meta-agl-demo`**: Provides a reference or demo platform and applications + for the AGL Distribution. + The reference UI is part of the `meta-agl-demo` layer. + +* **`meta-agl-devel`**: Contains components under development or being tested. + This layer also contains software packages that OEMs need but do not exist + in AGL. diff --git a/meta-agl/docs/devguides-book.yml b/meta-agl/docs/devguides-book.yml new file mode 100644 index 00000000..34a99cb1 --- /dev/null +++ b/meta-agl/docs/devguides-book.yml @@ -0,0 +1,15 @@ +type: books +books: +- + id: meta-agl + title: AGL Layers + description: Meta AGL documentation + keywords: + author: "AGL" + version: master + chapters: + - url: ../agl-layers-overview.md + name: Overview + - url: ../meta-agl.md + destination: meta-agl.md + name: meta-agl diff --git a/meta-agl/docs/profiles.md b/meta-agl/docs/profiles.md new file mode 100644 index 00000000..287b8190 --- /dev/null +++ b/meta-agl/docs/profiles.md @@ -0,0 +1,147 @@ +# AGL Profiles + +The AGL Profiles cover the different use-cases that the AGL platform serves.\ +This ranges from minimal systems without display, telematic systems, HUD, IVI, ADAS and more.\ +Common to all of them is the use of the AGL APIs (agl-service-*). + +All systems have the 'core' profile in common.\ +This small set of libraries and binaries is the essential set including the AGL APIs that every AGL system needs.\ +All other profiles reuse the 'core' profile. + +The other profiles and their dependencies are currently: + +* agl-profile-core + * agl-profile-telematics + * agl-profile-hud + * agl-profile-graphical + * agl-profile-graphical-html5 + * agl-profile-graphical-qt5 + * agl-demo-platform + +## agl-profile-core + +This profile contains the following images: + +* agl-image-boot + * agl-image-minimal + * agl-image-minimal-crosssdk + +### agl-image-boot + +This image is only meant to boot the target device and provide network, package-management and a shell.\ +All other functionality needs to be installed at runtime through 'dnf' using the provided package feeds and package-groups (e.g. dnf install profile-graphical-qt5) + +### agl-image-minimal + +This is the smallest image that includes all (non-graphical) AGL APIs. + +### agl-image-minimal-crosssdk + +This is the SDK for systems without display including the AGL APIs. + +## agl-profile-telematics + +N.N. + +## agl-profile-hud + +N.N. + +## agl-profile-graphical + +This profile contains a basic graphical system with wayland/weston.\ +It is used as a base for the more targeted profiles: + +* agl-profile-graphical-html5 +* agl-profile-graphical-qt5 + +Part of this layer are the following images: + +* agl-image-weston + +### agl-image-weston + +Pure wayland + weston image but with all AGL service APIs. + +## agl-profile-graphical-html5 + +This profile contains all components to build a html5 / web-based system and should be used as a base layer for further projects.\ +All AGL APIs are included. + +## agl-profile-graphical-qt5 + +This profile is used as base for all projects that build on qt5 like the agl-demo-platform.\ +Part of this layer are the ffollowing images: + +* agl-image-graphical-qt5 +* agl-image-graphical-qt5-crosssdk\ + (THIS IS THE SDK TARGET WE AIM TO USE FOR AGL-DEMO-PLATFORM IN THE END) + +All AGL APIs are included. + +### agl-image-graphical-qt5 + +Image with wayland/weston and the qt5 packages installed. + +### agl-image-graphical-qt5-crosssdk + +SDK based on agl-image-graphical-qt5 suitable for development under qt5. + +## agl-demo-platform + +This layer builds on-top of agl-profile-graphical-qt5 and builds the full AGL demonstrator image.\ +It hosts these images: + +* agl-demo-platform +* agl-demo-platform-crosssdk +* agl-demo-platform-qa + +TLDR: + +```tree +meta-agl/meta-agl-profile-core/recipes-platform +|-- images +| |-- agl-image-boot.bb +| |-- agl-image-boot.inc +| |-- agl-image-minimal-crosssdk.bb +| |-- agl-image-minimal-qa.bb +| |-- agl-image-minimal.bb +| `-- agl-image-minimal.inc +`-- packagegroups + |-- packagegroup-agl-core-boot.bb + |-- packagegroup-agl-core-connectivity.bb + |-- packagegroup-agl-core-multimedia.bb + |-- packagegroup-agl-core-navigation.bb + |-- packagegroup-agl-core-os-commonlibs.bb + |-- packagegroup-agl-core-security.bb + |-- packagegroup-agl-core-services.bb + |-- packagegroup-agl-image-boot.bb + `-- packagegroup-agl-image-minimal.bb + + meta-agl/meta-agl-profile-graphical/recipes-platform +|-- images +| |-- agl-image-weston.bb +| `-- agl-image-weston.inc +`-- packagegroups + |-- packagegroup-agl-graphical-services.bb + `-- packagegroup-agl-image-weston.bb + + meta-agl/meta-agl-profile-graphical-html5/recipes-platform +|-- images +| |-- agl-demo-platform-html5-crosssdk.bb +| |-- agl-demo-platform-html5.bb +| `-- agl-demo-platform-html5.inc +`-- packagegroups + `-- packagegroup-agl-demo-platform-html5.bb + + meta-agl/meta-agl-profile-graphical-qt5/recipes-platform +|-- images +| |-- agl-image-graphical-qt5-crosssdk.bb +| |-- agl-image-graphical-qt5.bb +| `-- agl-image-graphical-qt5.inc +`-- packagegroups + |-- packagegroup-agl-appfw-native-qt5.bb + |-- packagegroup-agl-demo-qt-examples.bb + |-- packagegroup-agl-profile-graphical-qt5.bb + `-- packagegroup-qt5-toolchain-target.bbappend +``` diff --git a/meta-agl/meta-agl-basesystem/classes/agl-basesystem-capability.bbclass b/meta-agl/meta-agl-basesystem/classes/agl-basesystem-capability.bbclass new file mode 100644 index 00000000..3170cc9c --- /dev/null +++ b/meta-agl/meta-agl-basesystem/classes/agl-basesystem-capability.bbclass @@ -0,0 +1,32 @@ +pkg_postinst_ontarget_${PN}_append () { +df / --exclude-type=nfs > /dev/null +IS_EMMC_BOOT=$? + +if [ $IS_EMMC_BOOT -eq 0 ]; then + CAPVARS="${CAPABILITY}" + IFS=" " + for cap in $CAPVARS; do + capability=`echo $cap | cut -f 1 -d ":"` + file=`echo $cap | cut -f 2 -d ":"` + setcap $capability $D$file + done +else + CAPVARS="${CAPABILITY}" + IFS=" " + for cap in $CAPVARS; do + capability=`echo $cap | cut -f 1 -d ":"` + file=`echo $cap | cut -f 2 -d ":"` + TCAP_NAME="/tmp/${file##*/}" + if [ ! -L ${file} ]; then + cp -a ${file} ${TCAP_NAME} + mv ${file} ${file}.org + ln -fs ${TCAP_NAME} ${file} + else + cp -a ${file}.org ${TCAP_NAME} + fi + setcap ${capability} ${TCAP_NAME} + done +fi +} +#RDEPENDS_${PN} += "libcap-bin" +PACKAGE_WRITE_DEPS = "libcap-native" diff --git a/meta-agl/meta-agl-basesystem/classes/agl-basesystem-common.bbclass b/meta-agl/meta-agl-basesystem/classes/agl-basesystem-common.bbclass new file mode 100644 index 00000000..cde65275 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/classes/agl-basesystem-common.bbclass @@ -0,0 +1,48 @@ +FILES_${PN}-staticdev = "" + +INHIBIT_SYSROOT_STRIP = "1" +INSANE_SKIP_${PN} = "ldflags" +INSANE_SKIP_${PN}-dev = "dev-elf" +BUILD_OPTIMIZATION = "-Os -pipe" + +SOLIBS = ".so" +SECTION = "libs" + +PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" + +DEPENDS = " packagegroup-agl-basesystem-core openssl" +RDEPENDS_${PN} += " agl-basefiles " +BBCLASSEXTEND = "nativesdk" + +do_compile[depends] += "agl-basefiles:do_populate_sysroot" +do_compile[depends] += "agl-basefiles-native:do_populate_sysroot" + +EXTRA_OEMAKE = "'CXX=${CXX} ${CODINGRULES_CPP_21MM}' 'CC=${CC} ${CODINGRULES_C_21MM}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'DESTDIR=${D}' 'SDKTARGETSYSROOT=${STAGING_DIR_HOST}' 'OECORE_NATIVE_SYSROOT=${STAGING_DIR_NATIVE}' 'MACHINE=${MACHINE}'" + +EXTRA_OEMAKE_append_salvator-x += " ARCH=arm64" +EXTRA_OEMAKE_append_m3ulcb += " ARCH=arm64" +EXTRA_OEMAKE_append_qemux86-64 += " ARCH=x86" +EXTRA_OEMAKE_append_qemuarm64 += " ARCH=arm64" + +do_compile (){ + cd ${S}/${MAKE_DIR} + oe_runmake +} + +do_install (){ + cd ${S}/${MAKE_DIR} + oe_runmake DESTDIR=${D} install +} + + +sysroot_stage_all_append(){ + sysroot_stage_dir ${D}/usr/agl ${SYSROOT_DESTDIR}/usr/agl + sysroot_stage_dir ${D}/usr/agl/conf/systemmanager ${SYSROOT_DESTDIR}/usr/agl/conf/systemmanager + sysroot_stage_dir ${D}/usr/agl/conf/backup_manager ${SYSROOT_DESTDIR}/usr/agl/conf/backup_manager + sysroot_stage_dir ${D}/nv/npp ${SYSROOT_DESTDIR}/nv/npp + sysroot_stage_dir ${D}/etc/udev/rules.d ${SYSROOT_DESTDIR}/etc/udev/rules.d + sysroot_stage_dir ${D}/etc ${SYSROOT_DESTDIR}/etc + sysroot_stage_dir ${D}/etc/ppp ${SYSROOT_DESTDIR}/etc/ppp +} + + diff --git a/meta-agl/meta-agl-basesystem/conf/include/agl-basesystem-base.inc b/meta-agl/meta-agl-basesystem/conf/include/agl-basesystem-base.inc new file mode 100644 index 00000000..b8f14408 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/conf/include/agl-basesystem-base.inc @@ -0,0 +1,18 @@ +# AGL specific package configuration +# +# Add systemd configuration +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +#VIRTUAL-RUNTIME_init_manager = "systemd" + +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary-tool" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +# for agl-basefiles recipe +IMAGE_INSTALL_append += "\ + packagegroup-agl-basesystem \ +" + diff --git a/meta-agl/meta-agl-basesystem/conf/layer.conf b/meta-agl/meta-agl-basesystem/conf/layer.conf new file mode 100644 index 00000000..d983f9fa --- /dev/null +++ b/meta-agl/meta-agl-basesystem/conf/layer.conf @@ -0,0 +1,16 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbclass \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "agl-basesystem" +BBFILE_PATTERN_agl-basesystem = "^${LAYERDIR}/" +BBFILE_PRIORITY_agl-basesystem = "70" + +# for agl-basefiles recipe +HOSTTOOLS += "xpath" + +LAYERSERIES_COMPAT_agl-basesystem = "thud" diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-backupmanager/agl-service-ns-backupmanager_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-backupmanager/agl-service-ns-backupmanager_1.0.0.bb new file mode 100644 index 00000000..b9cea80f --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-backupmanager/agl-service-ns-backupmanager_1.0.0.bb @@ -0,0 +1,38 @@ +SUMMARY = "agl-service-ns-backupmanager for AGL software" +DESCRIPTION = "agl-service-ns-backupmanager to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common agl-basesystem-capability + +CAPABILITY = "cap_dac_override+ep:/usr/agl/bin/NS_BackupMgr" + +FILES_${PN} += " \ + /usr/agl/conf/backup_manager/* \ + /usr/agl/bin/* \ +" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ns-backupmanager" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + libxml2-native \ + ns-frameworkunified \ + ns-backupmanager \ + ss-interfaceunified \ + ss-romaccesslibrary \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ + ns-backupmanager \ + ss-interfaceunified \ + ss-romaccesslibrary \ +" +EXTRA_MAKEFILE = " -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR = "backup_manager" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-notificationpersistent/agl-service-ns-notificationpersistent_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-notificationpersistent/agl-service-ns-notificationpersistent_1.0.0.bb new file mode 100644 index 00000000..360f6972 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ns-notificationpersistent/agl-service-ns-notificationpersistent_1.0.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "agl-service-ns-notificationpersistent for AGL software" +DESCRIPTION = "agl-service-ns-notificationpersistent to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " /usr/agl/bin/* " +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ns-notificationpersistent" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + libtar \ + ns-frameworkunified \ + os-posixbasedos001legacylibrary \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ + os-posixbasedos001legacylibrary \ +" + +EXTRA_MAKEFILE = " -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="notification_persistent_service" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ps-communication/agl-service-ps-communication_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ps-communication/agl-service-ps-communication_1.0.0.bb new file mode 100644 index 00000000..d147ceb9 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ps-communication/agl-service-ps-communication_1.0.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "agl-service-ps-communication for AGL software" +DESCRIPTION = "agl-service-ps-communication to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common agl-basesystem-capability + +CAPABILITY = "cap_dac_override+ep:/usr/agl/bin/communication" + +FILES_${PN} += " /usr/agl/bin/* " + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ps-communication" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ns-frameworkunified \ + ps-communication \ + os-posixbasedos001legacylibrary \ + ss-interfaceunified \ + ss-romaccesslibrary \ + os-vehicleparameterlibrary \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ + ps-communication \ + os-posixbasedos001legacylibrary \ + ss-interfaceunified \ + ss-romaccesslibrary \ + os-vehicleparameterlibrary \ +" + +EXTRA_MAKEFILE = " -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="communication" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-loggerservice/agl-service-ss-loggerservice_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-loggerservice/agl-service-ss-loggerservice_1.0.0.bb new file mode 100644 index 00000000..5012ebf0 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-loggerservice/agl-service-ss-loggerservice_1.0.0.bb @@ -0,0 +1,51 @@ +SUMMARY = "agl-service-ss-loggerservice for AGL software" +DESCRIPTION = "agl-service-ss-loggerservice to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common agl-basesystem-capability + +CAPABILITY = "cap_dac_override+ep:/usr/agl/bin/SS_LoggerService" + +FILES_${PN} += " \ + /usr/agl/bin/* \ + /usr/agl/conf/* \ + /usr/agl/conf/syslogd/* \ + /usr/agl/share/logrotate/* \ +" +FILES_${PN}-staticdev += " /usr/agl/lib/*.a " + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-loggerservice" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " libtar \ + ss-config \ + ss-interfaceunified \ + ss-romaccesslibrary \ + ss-resourcemanager \ + ns-commonlibrary \ + ns-frameworkunified \ + ns-backupmanager \ + os-vehicleparameterlibrary \ + os-posixbasedos001legacylibrary \ + logrotate \ +" +RDEPENDS_${PN} += " \ + ss-config \ + ss-interfaceunified \ + ss-romaccesslibrary \ + ss-resourcemanager \ + ns-commonlibrary \ + ns-frameworkunified \ + ns-backupmanager \ + os-vehicleparameterlibrary \ + os-posixbasedos001legacylibrary \ +" +EXTRA_MAKEFILE = " -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="logger_service" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-powerservice/agl-service-ss-powerservice_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-powerservice/agl-service-ss-powerservice_1.0.0.bb new file mode 100644 index 00000000..a63ad92f --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-powerservice/agl-service-ss-powerservice_1.0.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "agl-service-ss-powerservice for AGL software" +DESCRIPTION = "agl-service-ss-powerserice to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " /usr/agl/bin/* " + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-powerservice" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ss-interfaceunified \ + ss-romaccesslibrary \ + ns-frameworkunified \ + os-posixbasedos001legacylibrary \ +" +RDEPENDS_${PN} += " \ + ss-interfaceunified \ + ss-romaccesslibrary \ + ns-frameworkunified \ + os-posixbasedos001legacylibrary \ +" + +EXTRA_MAKEFILE=" -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="power_service" + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-resourcemanager/agl-service-ss-resourcemanager_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-resourcemanager/agl-service-ss-resourcemanager_1.0.0.bb new file mode 100644 index 00000000..148231f1 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-resourcemanager/agl-service-ss-resourcemanager_1.0.0.bb @@ -0,0 +1,44 @@ +SUMMARY = "agl-service-agl-service-ss-resourcemanager for AGL software" +DESCRIPTION = "agl-service-agl-service-ss-resourcemanager to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common agl-basesystem-capability + +CAPABILITY = "cap_setuid+ep:/usr/agl/bin/resm" + +FILES_${PN} += " /usr/agl/bin/* " +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-resourcemanager" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + os-rpclibrary-tool-native \ + ss-interfaceunified \ + ss-resourcemanager \ + ns-commonlibrary \ + ns-frameworkunified \ + os-vehicleparameterlibrary \ + os-rpclibrary \ + os-eventlibrary \ +" +RDEPENDS_${PN} += " \ + ss-interfaceunified \ + ss-resourcemanager \ + ns-commonlibrary \ + ns-frameworkunified \ + os-vehicleparameterlibrary \ + os-rpclibrary \ + os-eventlibrary \ +" +EXTRA_MAKEFILE=" -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE} -j 1 'CXX=${CXX} -Wl,--warn-unresolved-symbols' 'CC=${CC} -Wl,--warn-unresolved-symbols' " +MAKE_DIR ="resource_manager" + +do_compile_prepend() { + cd ${S}/${MAKE_DIR} + oe_runmake -f Makefile.client +} + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-systemmanager/agl-service-ss-systemmanager_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-systemmanager/agl-service-ss-systemmanager_1.0.0.bb new file mode 100644 index 00000000..397c349b --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-systemmanager/agl-service-ss-systemmanager_1.0.0.bb @@ -0,0 +1,47 @@ +SUMMARY = "agl-service-ss-systemmanager for AGL software" +DESCRIPTION = "agl-service-ss-systemmanager to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common agl-basesystem-capability + +CAPABILITY = "cap_sys_nice,cap_setuid,cap_setgid,cap_sys_resource+ep:/usr/agl/bin/SS_SystemManager" + +FILES_${PN} += " /usr/agl/bin/* " + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-systemmanager" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + agl-service-ss-resourcemanager \ + agl-service-ss-loggerservice \ + agl-service-ps-communication \ + ss-config \ + ss-interfaceunified \ + ns-commonlibrary \ + ns-frameworkunified \ + os-vehicleparameterlibrary \ + os-posixbasedos001legacylibrary \ + os-rpclibrary \ +" +RDEPENDS_${PN} += " \ + agl-service-ss-resourcemanager \ + agl-service-ss-loggerservice \ + agl-service-ps-communication \ + ss-config \ + ss-interfaceunified \ + ns-commonlibrary \ + ns-frameworkunified \ + os-vehicleparameterlibrary \ + os-posixbasedos001legacylibrary \ + os-rpclibrary \ +" + +EXTRA_MAKEFILE = " -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="system_manager" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-taskmanager/agl-service-ss-taskmanager_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-taskmanager/agl-service-ss-taskmanager_1.0.0.bb new file mode 100644 index 00000000..683cda2d --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-ss-taskmanager/agl-service-ss-taskmanager_1.0.0.bb @@ -0,0 +1,50 @@ +SUMMARY = "agl-service-ss-taskmanager for AGL software" +DESCRIPTION = "agl-service-ss-taskmanager to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common agl-basesystem-capability + +CAPABILITY = "cap_sys_nice,cap_setuid,cap_setgid=ep:/usr/agl/bin/tskmgr" + +FILES_${PN} += " \ + /usr/agl/bin/* \ +" +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-taskmanager" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +# Common Dependencies +DEPENDS += " \ + os-rpclibrary-tool-native \ + ss-interfaceunified \ + ss-resourcemanager \ + ss-romaccesslibrary \ + ss-taskmanager \ + ns-frameworkunified \ + ns-commonlibrary \ + os-rpclibrary \ + os-vehicleparameterlibrary \ + libxml2-native \ +" +RDEPENDS_${PN} += " \ + ss-interfaceunified \ + ss-resourcemanager \ + ss-romaccesslibrary \ + ss-taskmanager \ + ns-frameworkunified \ + ns-commonlibrary \ + os-rpclibrary \ + os-vehicleparameterlibrary \ +" +EXTRA_MAKEFILE=" -f Makefile.server" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE} -j 1 'CXX=${CXX} -Wl,--warn-unresolved-symbols' 'CC=${CC} -Wl,--warn-unresolved-symbols'" +MAKE_DIR ="task_manager" + +do_compile_prepend() { + cd ${S}/${MAKE_DIR} + oe_runmake -f Makefile.client +} + diff --git a/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-vs-positioning/agl-service-vs-positioning_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-vs-positioning/agl-service-vs-positioning_1.0.0.bb new file mode 100644 index 00000000..e9a0c795 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-apis/agl-service-vs-positioning/agl-service-vs-positioning_1.0.0.bb @@ -0,0 +1,53 @@ +SUMMARY = "agl-service-vs-positioning for AGL software" +DESCRIPTION = "agl-service-vs-positioning to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common agl-basesystem-capability + +CAPABILITY = "cap_dac_override+ep:/usr/agl/bin/Positioning" + +FILES_${PN} += " \ + /usr/agl/bin/* \ +" +FILES_${PN}-staticdev += " \ + /usr/agl/lib/*.a \ +" +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/vs-positioning" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +# Common Dependencies +DEPENDS += " \ + ss-config \ + ss-interfaceunified \ + ss-versionlibrary \ + ns-frameworkunified \ + ns-commonlibrary \ + ns-backupmanager \ + os-vehicleparameterlibrary \ + os-eventlibrary \ + ps-communication \ + vs-positioningbaselibrary \ + vs-positioning \ +" +RDEPENDS_${PN} += " \ + ss-config \ + ss-interfaceunified \ + ss-versionlibrary \ + ns-frameworkunified \ + ns-commonlibrary \ + ns-backupmanager \ + os-vehicleparameterlibrary \ + os-eventlibrary \ + ps-communication \ + vs-positioningbaselibrary \ + vs-positioning \ +" +EXTRA_MAKEFILE=" -f Makefile.server" +EXTRA_OEMAKE += " ${EXTRA_MAKEFILE} -j 1 'CXX=${CXX} -Wl,--warn-unresolved-symbols' 'CC=${CC} -Wl,--warn-unresolved-symbols' " +MAKE_DIR ="positioning" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/agl-basefiles_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/agl-basefiles_1.0.0.bb new file mode 100644 index 00000000..bbe6f008 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/agl-basefiles_1.0.0.bb @@ -0,0 +1,61 @@ +SUMMARY = "base-files for AGL software" +DESCRIPTION = "install base-files to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://LICENSE \ + file://bin \ + file://share \ + file://npp \ + file://include \ + file://agldd \ +" + +FILES_${PN} += " \ + /bin/* \ + /agldd/* \ + /include/* \ + /npp/* \ + /share/* \ + /usr/agl/conf/backup_manager/* \ + /usr/agl/conf/systemmanager/* \ + /nv/npp/* \ +" +#ALLOW_EMPTY_${PN} = "1" + +FILES_${PN}-dev += " \ + /usr/agl/share/* \ + /usr/agl/include/* \ + /usr/agl/include/agldd/* \ + /usr/include/linux/* \ +" +S = "${WORKDIR}" + +#RDEPENDS_${PN} += " libcap-bin sudo" +#RDEPENDS_${PN}-dbg += " sysklogd strace" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_package_qa[noexec] = "1" +do_install[depends] += "virtual/kernel:do_shared_workdir" + +do_install() { + install -C -d ${D}/nv/npp/ + install -C -d ${D}/usr/agl/share/ + install -C -d ${D}/usr/agl/include/agldd/ + install -C -d ${D}/usr/include/linux/ + install -m 644 ${WORKDIR}/agldd/* ${D}/usr/agl/include/agldd/ + install -m 644 ${WORKDIR}/include/* ${D}/usr/agl/include/ + install -m 644 ${WORKDIR}/share/* ${D}/usr/agl/share/ + install -m 644 ${WORKDIR}/npp/* ${D}/nv/npp/ + install -m 775 ${WORKDIR}/bin/launch_xml2cfg.sh ${D}/usr/agl/share/ + install -D -m 0644 ${TMPDIR}/work-shared/${MACHINE}/kernel-build-artifacts/include/generated/autoconf.h ${D}/usr/include/linux/ +} + +sysroot_stage_all_append(){ + sysroot_stage_dir ${D}/usr/agl ${SYSROOT_DESTDIR}${base_prefix}/usr/agl +} + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/LICENSE b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/LICENSE new file mode 100644 index 00000000..f433b1a5 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_common.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_common.h new file mode 100644 index 00000000..1a68fead --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_common.h @@ -0,0 +1,135 @@ +/** + * @file ev_common.h + * @brief Event library -- User kernel common data structure + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _ev_common_h_ +#define _ev_common_h_ + +#include + +/** @addtogroup EV + * @{ */ +/** @brief Maximum number of bytes for message event */ +#define EV_MAX_MESSAGE_LENGTH 2048 + +/** @brief -Maximum number of flag queue that can be created within a thread */ +#define EV_MAX_IDS_IN_THREAD 24 + +/** @brief -Muximum number of threads that can be registered to the EV in a process */ +#define EV_MAX_THREADS_IN_PROCESS 16 + +/** @brief -Maximum number of flag queue that can be creat within a process + */ +#define EV_MAX_IDS_IN_PROCESS \ + (EV_MAX_IDS_IN_THREAD * EV_MAX_THREADS_IN_PROCESS) + +/** @brief Return values for even library function + * + * @see EV_ERR + */ +enum ev_err +{ + EV_OK = 0, /**< Normal completion */ + EV_ERR_Exist, /**< The specified flag message queue does exist */ + EV_ERR_Invalid_ID, /**< The specified flag message queue does not exist */ + EV_ERR_Busy, /**< Message queue full failed to send */ + EV_ERR_Interrupted, /**< Waiting function was interrupted by an interrupt */ + EV_ERR_Thread_Over, /**< Exceeding the number of threads in the process */ + EV_ERR_Invalid_Thread, /**< Invalid thread ID */ + EV_ERR_Fatal, /**< Fatal error */ +}; +/** @brief Return values type for even library function + * + * @see ev_err + */ +typedef INT32 EV_ERR; + +/** @brief Event type + * + * Use in the type of EV_Event structs + * @see ev_type + */ +typedef UINT32 EV_Type; + +/** @brief Bit value representing the type of event */ +enum ev_type { + EV_EVENT_None = 0x00000000, + + /** Flag event: Judged by EV_EVENT_IS_FLAG() */ + EV_EVENT_Flag = 0x0001, +#define EV_EVENT_IS_FLAG(tp) (((tp) & EV_EVENT_Flag) != 0) + + /** Message event: Judged by EV_EVENT_IS_MESSAGE() */ + EV_EVENT_Message = 0x0002, +#define EV_EVENT_IS_MESSAGE(tp) (((tp) & EV_EVENT_Message) != 0) + + /** 64bit flag event: Judged by EV_EVENT_IS_FLAG64() */ + EV_EVENT_Flag64 = 0x0003, +#define EV_EVENT_IS_FLAG64(tp) (((tp) & EV_EVENT_Flag64) != 0) + +}; + +/** @brief Flag event structure */ +typedef struct { + EV_ID flagID;/**< Flag ID */ + UINT32 bits;/**< Bit pattern */ +} EV_Flag; + +/** @brief 64bit flag event structure */ +typedef struct { + EV_ID flagID;/**< Flag ID */ + UINT64 bits;/**< Bit pattern */ +} EV_Flag64; + +/** @brief Message event structure */ +typedef struct { + EV_ID queueID;/**< queue ID */ + UINT32 senderInfo;/**< Source information */ + UINT32 length;/**< Number of bytes in the message */ + UINT32 dummy;/** dummy for pading */ + UINT8 message[EV_MAX_MESSAGE_LENGTH];/**< Message */ +} EV_Message; + +/** @brief Event structure */ +typedef struct { + EV_Type type; /**< Event type */ + union { + EV_Flag flag; /**< Flag event structure */ + EV_Flag64 flag64; /**< Flag event structure */ + EV_Message message; /**< Message event structure */ + } u; /**< Union of structures per event type */ +} EV_Event; + +/** @brief Message event queue type + * + * Specify the action to be taken when the queue overflows (more events are received when the queue is full). + */ +enum ev_message_queue_type { + EV_MESSAGE_QUEUE_TYPE_BUSY,/**< Return a BUSY to the source */ + EV_MESSAGE_QUEUE_TYPE_FIFO,/**< Delete the oldest event */ + EV_MESSAGE_QUEUE_TYPE_REPLACE,/**< Replace the most recent event */ +}; + +/** @brief Messge event queue type + * + * @see ev_message_queue_type + */ +typedef UINT8 EV_Message_Queue_Type; + +/** @} */ + +#endif /* !_ev_common_h_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_id.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_id.h new file mode 100644 index 00000000..2026ef79 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/ev_id.h @@ -0,0 +1,104 @@ +/** + * @file ev_id.h + * @brief Event library(kernel) -- Defining flag queue ID + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _ev_id_h_ +#define _ev_id_h_ + +/** @addtogroup EV_ID_spec + * @{ */ + +/** @brief Flag ID and queue ID types used when sending and receiving events + * + * Assign a 32-bit value as follows + * + * - Most significant 8 bits: Reserved + * - Next 16 bits: Modue ID + * - Lower 8 bits: Define in module + * + * Where module is the modules that creates the queue. + * The modules define ID according to the above assignments using EV_Flag_ID_Base and EV_Queue_ID_Base macros. + * @see EV_Flag_ID_Base + * @see EV_Queue_ID_Base + */ +typedef UINT32 EV_ID; + +#define EV_ID_BIT 0x80000000UL +#define EV_FLAG64_BIT 0x40000000UL +#define EV_FLAG_BIT 0x20000000UL +#define EV_QUEUE_BIT 0x10000000UL +#define EV_AUTO_ID_BIT 0x08000000UL +#define EV_RESERVED_BIT 0xff000000UL +#define EV_INVALID_ID EV_ID_BIT +#define EV_NO_ID EV_INVALID_ID + +#define EV_ID_IS_FLAG(queueID) \ + (((queueID) & (EV_ID_BIT|EV_FLAG_BIT)) == (EV_ID_BIT|EV_FLAG_BIT)) +#define EV_ID_IS_FLAG64(queueID) \ + (((queueID) & (EV_ID_BIT|EV_FLAG64_BIT)) == (EV_ID_BIT|EV_FLAG64_BIT)) +#define EV_ID_IS_QUEUE(queueID) \ + (((queueID) & (EV_ID_BIT|EV_QUEUE_BIT)) == (EV_ID_BIT|EV_QUEUE_BIT)) +#define EV_ID_IS_AUTO_ID(queueID) \ + (((queueID) & (EV_ID_BIT|EV_AUTO_ID_BIT)) == (EV_ID_BIT|EV_AUTO_ID_BIT)) +#define EV_ID_IS_VALID(queueID) \ + (EV_ID_IS_FLAG(queueID) || EV_ID_IS_FLAG64(queueID) || EV_ID_IS_QUEUE(queueID)) + +/** @brief Macros for defining flag ID + * + * Define the module ID as an argument as follows. + * - #define XXX_Module_ID 1 + * - #define XXX_Flag_ID_Base EV_Flag_ID_Base(XXX_Module_ID) + * - + * - #define XXX_Flag_foo (XXX_Flag_ID_Base + 1) + * - #define XXX_Flag_bar (XXX_Flag_ID_Base + 2) + * + * The module ID is 16 bits and 0 to 65535 can be specified. + * In addition, 0 to 255 added to Base can be defined as ID. + */ +#define EV_Flag_ID_Base(mod) (EV_ID_BIT|EV_FLAG_BIT|((mod)<<8)) + +/** @brief Macros for defining 64 bits flag ID + * + * Define the module ID as an argument as follows. + * - #define XXX_Module_ID 1 + * - #define XXX_Flag64_ID_Base EV_Flag64_ID_Base(XXX_Module_ID) + * - + * - #define XXX_Flag64_foo (XXX_Flag64_ID_Base + 1) + * - #define XXX_Flag64_bar (XXX_Flag64_ID_Base + 2) + * + * The module ID is 16 bits and 0 to 65535 can be specified. + * In addition, 0 to 255 added to Base can be defined as ID. + */ +#define EV_Flag64_ID_Base(mod) (EV_ID_BIT|EV_FLAG64_BIT|((mod)<<8)) + +/** @brief Macros for defining mesage queue ID + * + * Define the module ID as an argument as follows. + * - #define XXX_Module_ID 1 + * - #define XXX_Queue_ID_Base EV_Queue_ID_Base(XXX_Module_ID) + * - + * - #define XXX_Queue_foo (XXX_Queue_ID_Base + 1) + * - #define XXX_Queue_bar (XXX_Queue_ID_Base + 2) + * + * The module ID is 16 bits and 0 to 65535 can be specified. + * In addition, 0 to 255 added to Base can be defined as ID. + */ +#define EV_Queue_ID_Base(mod) (EV_ID_BIT|EV_QUEUE_BIT|((mod)<<8)) + +/** @} */ + +#endif /* ! _ev_id_h_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/evk_lib.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/evk_lib.h new file mode 100644 index 00000000..378df13d --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/evk_lib.h @@ -0,0 +1,116 @@ +/** + * @file evk_lib.h + * @brief Event library -- API specifications for kernel modules + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _evk_lib_h_ +#define _evk_lib_h_ + +#include +#include +#include + +/* API definition */ + +/** @addtogroup EV + * @{ */ +#ifdef __KERNEL__ +/* Flag message queue create/delete */ +EV_ERR EVK_create_flag(EV_ID flagID); +EV_ERR EVK_create_flag64(EV_ID flagID); +EV_ERR EVK_create_queue(EV_ID queueID, + UINT8 length, + UINT16 max_bytes, + EV_Message_Queue_Type type); + +EV_ERR EVK_create_flag_auto_id(/* OUT */EV_ID *flagID); +EV_ERR EVK_create_flag64_auto_id(/* OUT */EV_ID *flagID); +EV_ERR EVK_create_queue_auto_id(/* OUT */EV_ID *queueID, + UINT8 length, + UINT16 max_bytes, + EV_Message_Queue_Type type); + +EV_ERR EVK_destroy_flag(EV_ID flagID); +EV_ERR EVK_destroy_queue(EV_ID queueID); + +/* Send events */ +EV_ERR EVK_set_flag(EV_ID flagID, UINT32 bits); +EV_ERR EVK_set_flag64(EV_ID flagID, UINT64 bits); +EV_ERR EVK_send_message(EV_ID queueID, UINT16 bytes, const void *message, + UINT32 senderInfo); + +/* Get event(with search conditions) */ +EV_ERR EVK_get_flag(EV_ID flagID, /* OUT */EV_Flag *flag); +EV_ERR EVK_wait_flag(EV_ID flagID, /* OUT */EV_Flag *flag);/* block */ +EV_ERR EVK_peek_flag(EV_ID flagID, /* OUT */EV_Flag *flag); +EV_ERR EVK_get_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag); +EV_ERR EVK_wait_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag);/* block */ +EV_ERR EVK_peek_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag); + +EV_ERR EVK_get_message(EV_ID queueID, /* OUT */EV_Message *message); +EV_ERR EVK_wait_message(EV_ID queueID, /* OUT */EV_Message *message);/* block */ +EV_ERR EVK_peek_message(EV_ID queueID, /* OUT */EV_Message *message); + +EV_ERR EVK_find_message_by_sender(EV_ID queueID, UINT32 senderInfo, + /* OUT */EV_Message *message); +EV_ERR EVK_find_message_by_content(EV_ID queueID, UINT16 length, + const void *compare_bytes, + /* OUT */EV_Message *message); +#endif + +/** @} */ + +/** @addtogroup EVK_in + * @{ */ +#define EVK_NAME "evk" +#define EVK_DEV_NAME "/dev/agl/"EVK_NAME +#define EVK_DEV_MAJOR 1033 +#define EVK_IOC_MAGIC 0xE7 + +#define EVK_IOC_CREATE_FLAG _IO(EVK_IOC_MAGIC, 0x00) +#define EVK_IOC_CREATE_FLAG64 _IO(EVK_IOC_MAGIC, 0x01) +#define EVK_IOC_CREATE_MESSAGE_QUEUE _IO(EVK_IOC_MAGIC, 0x02) +#define EVK_IOC_ALLOC_FLAG_ID _IO(EVK_IOC_MAGIC, 0x03) +#define EVK_IOC_ALLOC_FLAG64_ID _IO(EVK_IOC_MAGIC, 0x04) +#define EVK_IOC_ALLOC_QUEUE_ID _IO(EVK_IOC_MAGIC, 0x05) +#define EVK_IOC_DESTROY_QUEUE _IO(EVK_IOC_MAGIC, 0x06) +#define EVK_IOC_STORE_FLAG _IO(EVK_IOC_MAGIC, 0x07) +#define EVK_IOC_STORE_FLAG64 _IO(EVK_IOC_MAGIC, 0x08) +#define EVK_IOC_STORE_MESSAGE _IO(EVK_IOC_MAGIC, 0x09) +#define EVK_IOC_SET_POLL _IO(EVK_IOC_MAGIC, 0x0a) +#define EVK_IOC_GET_EVENT _IO(EVK_IOC_MAGIC, 0x0b) +#define EVK_IOC_PEEK_EVENT _IO(EVK_IOC_MAGIC, 0x0c) +#define EVK_IOC_WAIT_EVENT _IO(EVK_IOC_MAGIC, 0x0d) +#define EVK_IOC_GET_NEXT_EVENT _IO(EVK_IOC_MAGIC, 0x0e) +#define EVK_IOC_PEEK_NEXT_EVENT _IO(EVK_IOC_MAGIC, 0x0f) +#define EVK_IOC_DEBUG_LIST _IO(EVK_IOC_MAGIC, 0x10) + +typedef struct { + EV_ID queueID;/**< Queue ID */ + UINT32 max_bytes;/**< Maximum number of bytes for an event */ + UINT8 length;/**< Queue length */ + EV_Message_Queue_Type type;/**< Type */ +} EVK_Message_Queue_Request; + +typedef struct { + INT32 num; /**< Number of queue ID of search */ + EV_ID ids[EV_MAX_IDS_IN_PROCESS]; /**< Queue ID of search */ + EV_Event ev; /**< [OUT] First event that occured */ +} EVK_Next_Event_Query; + +/** @} */ + +#endif /* !_evk_lib_h */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/moduleid.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/moduleid.h new file mode 100644 index 00000000..b18c1a1e --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/agldd/moduleid.h @@ -0,0 +1,69 @@ +/* + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#ifndef _AGLDD_MODULEID_H_ +#define _AGLDD_MODULEID_H_ + +/* + * Define module ID to be used by programs in moduleid_id.h . + * Define in the format of "#define XXX_MID ID number" (XXX is the module name). + * + * MID allocation policy shall be as follows. + * - UI Application : 0xxxh + * - Application Service : 1xxxh to 2xxxh + * + HMI : 10xxh + * + AV : 12xxh + * + Radio : 14xxh + * + Connectivity : 16xxh + * + Navigation/Location: 18xxh + * + Vehicle : 1Axxh + * + Communication : 1Cxxh + * + BasePF : 1Exxh + * + System : 20xxh + * + Other : 22xxh + * - Common Service : 3xxxh + * - Extension Service : 4xxxh + * - System/Device Driver : 5xxxh + */ + +/* UI Application : 0xxxh */ + +/* Application Service : 1xxxh to 2xxxh */ +#define MODEMANAGER_MID 0x1000 +#define ACTIVITYMANAGER_MID 0x1001 + +/* Common Service : 3xxxh */ +#define IPMANAGER_MID 0x3000 +#define DEVICEMANAGER_MID 0x3001 +#define MSGBRK_MID 0x3002 +#define TIMERENTRYDRV_MID 0x3003 +#define SOUNDAGENT_MID 0x3004 +#define CAN_MID 0x3006 +#define _CWORD83__MID 0x3007 +#define SENSOR_MID 0x3008 +#define GPS_MID 0x3009 +#define RESMGR_MID 0x300A +#define GRAPHICS_MID 0x300B + +/* Extension Service : 4xxxh */ + +/* System/Device Driver : 5xxxh */ +#define EV_MID 0x5001 +#define RPC_MID 0x5002 +#define EVK_MID 0x5801 + +#endif /* !_AGLDD_MODULEID_H_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/bin/launch_xml2cfg.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/bin/launch_xml2cfg.sh new file mode 100755 index 00000000..dfa1fa99 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/bin/launch_xml2cfg.sh @@ -0,0 +1,138 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#Since xpath is slow, use sed as much as possible. + +infile=$1 +main_file=system_launcher_main.xml +body_file=system_launcher_body.xml + + +#check xmllint is exist +if ! which xmllint > /dev/null ; then + echo "It need xmllint. Please install it." + exit 1; +fi + +#check xpath is exist +if ! which xpath > /dev/null ; then + echo "It need xpath Please install it." + exit 1; +fi + +#arg check +if ! [[ "$infile" =~ .+\.xml ]] ;then + echo "$infile is not *.xml" + exit 1 +elif ! [ -e $infile ];then + echo "$infile not found" + exit 1 +fi + +cp -f `dirname $0`/$main_file `dirname $1` +cp -f $infile $body_file + +#check xml vaild +if ! xmllint --noout --valid $main_file ;then + echo "XML is Invalid. " + exit 1; +fi + +#Format into xpath and read into memory +xmem=`xpath -q -e /system_launcher $main_file` + +echo "# This file is created from $infile." +echo "# created date : `LANG=en date`" +echo "[ModulesLaunchConfig]" + +#GROUP LOOP +group_num=`echo $xmem | xpath -e /system_launcher/group 2>&1 | grep Found | cut -d ' ' -f2` + +l_idx=1 +cur_group=1 +until [ $cur_group -gt $group_num ]; +do + #LAUNCH LOOP + group_text=`echo $xmem | xpath -q -e /system_launcher/group[$cur_group]` #ALL XML text for group + group_attr=`echo $group_text | sed 's/\(]\+>\)\(.*\)/\1/g'` + + g_name=`echo $group_attr | sed 's/\(.* name="\)\([^"]*\)\(.*\)/\2/g'` + g_wait_time=`echo $group_attr | sed 's/\(.* wait_time="\)\([^"]*\)\(.*\)/\2/g'` + g_trigger=`echo $group_attr | sed 's/\(.* trigger="\)\([^"]*\)\(.*\)/\2/g'` + +# echo $g_name $g_wait_time $g_trigger + l_launch_num=`echo $xmem | xpath -e /system_launcher/group[$cur_group]/launch 2>&1 | grep Found | cut -d ' ' -f2` + + cur_launch=1; + until [ $cur_launch -gt $l_launch_num ]; do + launch_text=`echo $xmem | xpath -q -e /system_launcher/group[$cur_group]/launch[$cur_launch]` + + l_attr="Launch${l_idx}=$g_name|$cur_group|$g_wait_time|$g_trigger" + l_attr+="|"`echo $launch_text | sed 's/\(.* name="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* path="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* priority="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* critical="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* retry_cnt="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* arguments="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* logging_mask="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* restart="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* is_start_required="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* shutdown_critical="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* shutdown_wait_time="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* fast_shutdown_wait_time="\)\([^"]*\)\(.*\)/\2/g'` + l_attr+="|"`echo $launch_text | sed 's/\(.* user_name="\)\([^"]*\)\(.*\)/\2/g'` + if echo "$launch_text" | grep -sq 'is_agl_unit=' ; then + l_attr+="|"`echo $launch_text | sed 's/\(.* is_agl_unit="\)\([^"]*\)\(.*\)/\2/g'` + else + l_attr+="|" + fi + if echo "$launch_text" | grep -sq 'disable_agl_resethistory=' ; then + l_attr+="|"`echo $launch_text | sed 's/\(.* disable_agl_resethistory="\)\([^"]*\)\(.*\)/\2/g'` + else + l_attr+="|" + fi + if echo "$launch_text" | grep -sq 'disable_nonagl_resethistory=' ; then + l_attr+="|"`echo $launch_text | sed 's/\(.* disable_nonagl_resethistory="\)\([^"]*\)\(.*\)/\2/g'` + else + l_attr+="|" + fi + if echo "$launch_text" | grep -sq 'env_cond=' ; then + l_attr+="|"`echo $launch_text | sed 's/\(.* env_cond="\)\([^"]*\)\(.*\)/\2/g'` + else + l_attr+="|" + fi + + if echo "$launch_text" | grep -sq 'cpu_assign=' ; then + l_attr+="|"`echo $launch_text | sed 's/\(.* cpu_assign="\)\([^"]*\)\(.*\)/\2/g'` + else + l_attr+="|0x0" + fi + + echo $l_attr + + cur_launch=$(($cur_launch+1)) + l_idx=$(($l_idx+1)) + done + + cur_group=$(($cur_group+1)) +done + + +rm $body_file +rm $main_file + + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_thread.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_thread.h new file mode 100644 index 00000000..4f10c162 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_thread.h @@ -0,0 +1,1385 @@ +/* + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __AGL_THREAD_H__ +#define __AGL_THREAD_H__ + +//MACRO +#define PR_TSS_S "0" +#define PR_TSS 0 + +/* + Main thread name. It need to be same as service name in sm_launch.xml or tskm_launch.xml + Max name length is 15 + #define MN_XXXXX "MainName" + + Thread name + Max name length is 15 + #define TN_XXXXX "ThreadName" + + Thread priority 0:TSS 1-99:FIFO + #define PR_XXXXX_S "(0-99)" //for xml + #define PR_XXXXX 0-99 //for program +*/ + +#define MN_SS_SYSMANAGER "SS_SysManager" +#define PR_SS_SYSMANAGER_S "20" +#define PR_SS_SYSMANAGER (20) + + #define TN_SMHEARTBEAT "SM.Heartbeat" + #define PR_SMHEARTBEAT_S "20" + #define PR_SMHEARTBEAT (20) + + #define TN_SMPROCLAUNCH "SM.ProcLaunch" + #define PR_SMPROCLAUNCH_S "20" + #define PR_SMPROCLAUNCH (20) + + #define TN_SMLOWMEMMON "SM.LowMemMon" + #define PR_SMLOWMEMMON_S "20" + #define PR_SMLOWMEMMON (20) + + #define TN_LOGGERRTIME "LoggerRtime" + #define PR_LOGGERRTIME_S PR_TSS_S + #define PR_LOGGERRTIME PR_TSS + + +//======= exec from system manager ============= +#define MN_NS_SHAREDMEM "NS_SharedMem" +#define PR_NS_SHAREDMEM_S "25" +#define PR_NS_SHAREDMEM (25) + + +#define MN_NS_NPPSERVICE "NS_NPPService" +#define PR_NS_NPPSERVICE_S "25" +#define PR_NS_NPPSERVICE (25) + + #define TN_NS_NPPREADWKR "NS_NPPReadWkr" + #define PR_NS_NPPREADWKR_S "25" + #define PR_NS_NPPREADWKR (25) + + #define TN_NS_NPPWRITEWKR "NS_NPPWriteWkr" + #define PR_NS_NPPWRITEWKR_S "25" + #define PR_NS_NPPWRITEWKR (25) + + #define TN_NS_NPPIPWKR "NS_NPPIPWkr" + #define PR_NS_NPPIPWKR_S "25" + #define PR_NS_NPPIPWKR (25) + +#define MN_NS_BACKUPMGR "NS_BackupMgr" +#define PR_NS_BACKUPMGR_S "25" +#define PR_NS_BACKUPMGR (25) + + #define TN_NS_BKUPNAND "NS_BkupNAND" + #define PR_NS_BKUPNAND_S "25" + #define PR_NS_BKUPNAND (25) + + #define TN_NS_BKUPDELAY "NS_BkupDelay" + #define PR_NS_BKUPDELAY_S "25" + #define PR_NS_BKUPDELAY (25) + +#define MN_SS_DEVDETECTSRV "SS_DevDetectSrv" +#define PR_SS_DEVDETECTSRV_S "20" +#define PR_SS_DEVDETECTSRV (20) + + #define TN_SS_DETECT_USB "SS_Detect_USB" + #define PR_SS_DETECT_USB_S "20" + #define PR_SS_DETECT_USB (20) + + #define TN_SS_DETECT_SD "SS_Detect_SD" + #define PR_SS_DETECT_SD_S "20" + #define PR_SS_DETECT_SD (20) + + #define TN_SS_MONITOR_OVC "SS_Monitor_OVC" + #define PR_SS_MONITOR_OVC_S "20" + #define PR_SS_MONITOR_OVC (20) + +#define MN_SS_LOGGERSRV "SS_LoggerSrv" +#define PR_SS_LOGGERSRV_S PR_TSS_S +#define PR_SS_LOGGERSRV PR_TSS + + #define TN_PDGLOGQUER "pdg.LogQueR" + #define PR_PDGLOGQUER_S PR_TSS_S + #define PR_PDGLOGQUER PR_TSS + + #define TN_PDGTRANSQUER "pdg.TransQueR" + #define PR_PDGTRANSQUER_S PR_TSS_S + #define PR_PDGTRANSQUER PR_TSS + + #define TN_PDGEVNTLOGQUE "pdg.EvntLogQue" + #define PR_PDGEVNTLOGQUE_S PR_TSS_S + #define PR_PDGEVNTLOGQUE PR_TSS + + #define TN_SSLOGGERSTRAGE "SSLoggerStrage" + #define PR_SSLOGGERSTRAGE_S PR_TSS_S + #define PR_SSLOGGERSTRAGE PR_TSS + + #define TN_PFDRECTHREAD "PFDRECThread" + #define PR_PFDRECTHREAD_S PR_TSS_S + #define PR_PFDRECTHREAD PR_TSS + +#define MN_PS_LOGGERSHADOW "PS_LoggerShadow" + #define PR_PSLOGGERSHADOW_S PR_TSS_S + #define PR_PSLOGGERSHADOW PR_TSS + +#define MN_UDEVD "udevd" +#define PR_UDEVD_S "1" +#define PR_UDEVD (1) + +#define MN_COMMUNICATION "Communication" +#define PR_COMMUNICATION_S "30" +#define PR_COMMUNICATION (30) + + #define TN_DEV_SYSCOM_TMR "DEV_SYSCOM_TMR" + #define PR_DEV_SYSCOM_TMR_S "30" + #define PR_DEV_SYSCOM_TMR (30) + + #define TN_DEV_SYSCOM_RCV "DEV_SYSCOM_RCV" + #define PR_DEV_SYSCOM_RCV_S "30" + #define PR_DEV_SYSCOM_RCV (30) + + #define TN_DEV_SYSCOM_MAIN "DEV_SYSCOM_MAIN" + #define PR_DEV_SYSCOM_MAIN_S "30" + #define PR_DEV_SYSCOM_MAIN (30) + + #define TN_TGWCOM "TGWCOM" + #define PR_TGWCOM_S "30" + #define PR_TGWCOM (30) + + #define TN__CWORD83_ "_CWORD83_" + #define PR__CWORD83__S "30" + #define PR__CWORD83_ (30) + + #define TN_CAN_COM_PROT "CAN_COM_PROT" + #define PR_CAN_COM_PROT_S "30" + #define PR_CAN_COM_PROT (30) + +#define MN_PS_PSMSHADOW "PS_PSMShadow" +#define PR_PS_PSMSHADOW_S "30" +#define PR_PS_PSMSHADOW (30) + +#define MN_COMMSH4A "CommSH4A" +#define PR_COMMSH4A_S "30" +#define PR_COMMSH4A (30) + + #define TN_DEV_SH4A_SND "DEV_SH4ACOM_SND" + #define PR_DEV_SH4A_SND_S "30" + #define PR_DEV_SH4A_SND (30) + + #define TN_DEV_SH4A_RCV "DEV_SH4ACOM_RCV" + #define PR_DEV_SH4A_RCV_S "30" + #define PR_DEV_SH4A_RCV (30) + + #define TN_DEV_SH4A_MON "DEV_SH4ACOM_MON" + #define PR_DEV_SH4A_MON_S "30" + #define PR_DEV_SH4A_MON (30) + +#define MN_PS_COMMUSB "PS_CommUSB" +#define PR_PS_COMMUSB_S "30" +#define PR_PS_COMMUSB (30) + + #define TN_COMMUSB_RCV "COMMUSB_RCV" + #define PR_COMMUSB_RCV_S "30" + #define PR_COMMUSB_RCV (30) + + #define TN_COMMUSB_DIAG "COMMUSB_DIAG" + #define PR_COMMUSB_DIAG_S "30" + #define PR_COMMUSB_DIAG (30) + +#define MN_PS_CANGW_M "CANGW_M" +#define PR_PS_CANGW_M_S PR_TSS_S +#define PR_PS_CANGW_M PR_TSS + + #define TN_CANGW_M_RCV "CANGW_M_RCV" + #define PR_CANGW_M_RCV_S PR_TSS_S + #define PR_CANGW_M_RCV PR_TSS + + #define TN_CANGW_M_DIAG "CANGW_M_DIAG" + #define PR_CANGW_M_DIAG_S PR_TSS_S + #define PR_CANGW_M_DIAG PR_TSS + +#define MN_PS_CANGW_S "CANGW_S" +#define PR_PS_CANGW_S_S PR_TSS_S +#define PR_PS_CANGW_S PR_TSS + + #define TN_CANGW_S_SND "CANGW_S_SND" + #define PR_CANGW_S_SND_S PR_TSS_S + #define PR_CANGW_S_SND PR_TSS + + #define TN_CANGW_S_DIAG "CANGW_S_DIAG" + #define PR_CANGW_S_DIAG_S PR_TSS_S + #define PR_CANGW_S_DIAG PR_TSS + +#define MN_LANSERVER "LanServer" +#define PR_LANSERVER_S "20" +#define PR_LANSERVER (20) + +#define MN_PS_CDR "ps_cdr" +#define PR_PS_CDR_S PR_TSS_S +#define PR_PS_CDR PR_TSS + + #define TN_PS_CDR_NBD "ps_cdr_nbd" + #define PR_PS_CDR_NBD_S PR_TSS_S + #define PR_PS_CDR_NBD PR_TSS + + #define TN_PS_CDR_DOIT "ps_cdr_doit" + #define PR_PS_CDR_DOIT_S PR_TSS_S + #define PR_PS_CDR_DOIT PR_TSS + + #define TN_PS_CDR_READ "ps_cdr_read" + #define PR_PS_CDR_READ_S PR_TSS_S + #define PR_PS_CDR_READ PR_TSS + +#define MN_POSITIONING "Positioning" +#define PR_POSITIONING_S PR_TSS_S +#define PR_POSITIONING PR_TSS + + #define TN_POSITIONING_GPS_MAIN "POS_Main" + #define PR_POSITIONING_GPS_MAIN_S PR_TSS_S + #define PR_POSITIONING_GPS_MAIN PR_TSS + + #define TN_POSITIONING_GPS_RECV "POS_Gps_Recv" + #define PR_POSITIONING_GPS_RECV_S PR_TSS_S + #define PR_POSITIONING_GPS_RECV PR_TSS + + #define TN_POSITIONING_GPS "POS_Gps" + #define PR_POSITIONING_GPS_S PR_TSS_S + #define PR_POSITIONING_GPS PR_TSS + + #define TN_POSITIONING_SENS "POS_Sens" + #define PR_POSITIONING_SENS_S PR_TSS_S + #define PR_POSITIONING_SENS PR_TSS + + #define TN_POSITIONING_GPS_ROLOVR "POS_Gps_Rolovr" + #define PR_POSITIONING_GPS_ROLOVR_S PR_TSS_S + #define PR_POSITIONING_GPS_ROLOVR PR_TSS + +#define MN_CLOCK "clock" +#define PR_CLOCK_S "20" +#define PR_CLOCK (20) + + #define TN_CLOCK_MNG "ClockMng" + #define PR_CLOCK_MNG_S "20" + #define PR_CLOCK_MNG (20) + +#define MN_VEHICLE "vehicle" +#define PR_VEHICLE_S "20" +#define PR_VEHICLE (20) + + #define TN_VEHICLE_SENS "VehicleSens" + #define PR_VEHICLE_SENS_S "20" + #define PR_VEHICLE_SENS (20) + + #define TN_LINE_SENS_DRV "LineSensDrv" + #define PR_LINE_SENS_DRV_S "20" + #define PR_LINE_SENS_DRV (20) + +#define MN_SS_POWERSERVICE "SS_PowerService" +#define PR_SS_POWERSERVICE_S "30" +#define PR_SS_POWERSERVICE (30) + +#define MN_SS_TASKMANAGER "SS_TaskManager" +#define PR_SS_TASKMANAGER_S "20" +#define PR_SS_TASKMANAGER (20) + + #define TN_SS_TSKMTIMER "SS_TskmTimer" + #define PR_SS_TSKMTIMER_S "20" + #define PR_SS_TSKMTIMER (20) + +#define MN_SOUND "Sound" +#define PR_SOUND_S "45" +#define PR_SOUND (45) + + #define TN_VG_SNDSRCMGR "VG_SNDSRCMGR" + #define PR_VG_SNDSRCMGR_S "40" + #define PR_VG_SNDSRCMGR (40) + + #define TN_SND_INPUTCTRL "SND_INPUTCTRL" + #define PR_SND_INPUTCTRL_S "40" + #define PR_SND_INPUTCTRL (40) + + #define TN_SND_DEVCTRL "SND_DEVCTRL" + #define PR_SND_DEVCTRL_S "40" + #define PR_SND_DEVCTRL (40) + + #define TN_SND_VCETRFCTRL "SND_VCETRFCTRL" + #define PR_SND_VCETRFCTRL_S "45" + #define PR_SND_VCETRFCTRL (45) + + #define TN_SND_VCETRFWRT1 "SND_VCETRFWRT1" + #define PR_SND_VCETRFWRT1_S "45" + #define PR_SND_VCETRFWRT1 (45) + + #define TN_SND_VCETRFWRT2 "SND_VCETRFWRT2" + #define PR_SND_VCETRFWRT2_S "45" + #define PR_SND_VCETRFWRT2 (45) + + #define TN_VG_SNDCTRL_BSCF "VG_SNDCTRL_BSCF" + #define PR_VG_SNDCTRL_BSCF_S "25" + #define PR_VG_SNDCTRL_BSCF (25) + + #define TN_VG_SNDCTRL_BSCR "VG_SNDCTRL_BSCR" + #define PR_VG_SNDCTRL_BSCR_S "25" + #define PR_VG_SNDCTRL_BSCR (25) + + #define TN_VG_SNDCTRL_ITRT "VG_SNDCTRL_ITRT" + #define PR_VG_SNDCTRL_ITRT_S "25" + #define PR_VG_SNDCTRL_ITRT (25) + + #define TN_CVRS_OPRT_OUT_1 "CVRS_OPRT_OUT_1" + #define PR_CVRS_OPRT_OUT_1_S "45" + #define PR_CVRS_OPRT_OUT_1 (45) + + #define TN_CVRS_OPRT_OUT_2 "CVRS_OPRT_OUT_2" + #define PR_CVRS_OPRT_OUT_2_S "45" + #define PR_CVRS_OPRT_OUT_2 (45) + + #define TN_CVRS_OPRT_OUT_3 "CVRS_OPRT_OUT_3" + #define PR_CVRS_OPRT_OUT_3_S "45" + #define PR_CVRS_OPRT_OUT_3 (45) + + #define TN_CVRS_OPRT_OUT_4 "CVRS_OPRT_OUT_4" + #define PR_CVRS_OPRT_OUT_4_S "45" + #define PR_CVRS_OPRT_OUT_4 (45) + + #define TN_CVRS_OPRT_IN_1 "CVRS_OPRT_IN_1" + #define PR_CVRS_OPRT_IN_1_S "45" + #define PR_CVRS_OPRT_IN_1 (45) + + #define TN_CVRS_OPRT_IN_2 "CVRS_OPRT_IN_2" + #define PR_CVRS_OPRT_IN_2_S "45" + #define PR_CVRS_OPRT_IN_2 (45) + + #define TN_CVRS_OPRT_IN_3 "CVRS_OPRT_IN_3" + #define PR_CVRS_OPRT_IN_3_S "45" + #define PR_CVRS_OPRT_IN_3 (45) + + #define TN_CVRS_OPRT_IN_4 "CVRS_OPRT_IN_4" + #define PR_CVRS_OPRT_IN_4_S "45" + #define PR_CVRS_OPRT_IN_4 (45) + + #define TN_CVRS_OPRT_IN_5 "CVRS_OPRT_IN_5" + #define PR_CVRS_OPRT_IN_5_S "45" + #define PR_CVRS_OPRT_IN_5 (45) + + #define TN_CVRS_OPRT_IN_6 "CVRS_OPRT_IN_6" + #define PR_CVRS_OPRT_IN_6_S "45" + #define PR_CVRS_OPRT_IN_6 (45) + + #define TN_CVRS_OPRT_IN_7 "CVRS_OPRT_IN_7" + #define PR_CVRS_OPRT_IN_7_S "45" + #define PR_CVRS_OPRT_IN_7 (45) + + #define TN_CVRS_OPRT_IN_8 "CVRS_OPRT_IN_8" + #define PR_CVRS_OPRT_IN_8_S "45" + #define PR_CVRS_OPRT_IN_8 (45) + + #define TN_CVRS_OPRT_BS_I "CVRS_OPRT_BS_I" + #define PR_CVRS_OPRT_BS_I_S "45" + #define PR_CVRS_OPRT_BS_I (45) + + #define TN_VR_NVR_RECO "VR_NVR_RECO" + #define PR_VR_NVR_RECO_S "20" + #define PR_VR_NVR_RECO (20) + + #define TN_SND_ECNR "SND_ECNR" + #define PR_SND_ECNR_S "40" + #define PR_SND_ECNR (40) + + #define TN_SNDAGENT_000 "SNDAGENT_000" + #define PR_SNDAGENT_000_S "45" + #define PR_SNDAGENT_000 (45) + + #define TN_SNDAGENT_001 "SNDAGENT_001" + #define PR_SNDAGENT_001_S "45" + #define PR_SNDAGENT_001 (45) + + #define TN_SNDAGENT_002 "SNDAGENT_002" + #define PR_SNDAGENT_002_S "45" + #define PR_SNDAGENT_002 (45) + + #define TN_SNDAGENT_003 "SNDAGENT_003" + #define PR_SNDAGENT_003_S "45" + #define PR_SNDAGENT_003 (45) + + #define TN_SNDAGENT_004 "SNDAGENT_004" + #define PR_SNDAGENT_004_S "45" + #define PR_SNDAGENT_004 (45) + + #define TN_SNDAGENT_005 "SNDAGENT_005" + #define PR_SNDAGENT_005_S "45" + #define PR_SNDAGENT_005 (45) + + #define TN_SNDAGENT_006 "SNDAGENT_006" + #define PR_SNDAGENT_006_S "45" + #define PR_SNDAGENT_006 (45) + + #define TN_SNDAGENT_007 "SNDAGENT_007" + #define PR_SNDAGENT_007_S "45" + #define PR_SNDAGENT_007 (45) + + #define TN_SNDAGENT_008 "SNDAGENT_008" + #define PR_SNDAGENT_008_S "45" + #define PR_SNDAGENT_008 (45) + + #define TN_SNDAGENT_009 "SNDAGENT_009" + #define PR_SNDAGENT_009_S "45" + #define PR_SNDAGENT_009 (45) + + #define TN_SNDAGENT_010 "SNDAGENT_010" + #define PR_SNDAGENT_010_S "45" + #define PR_SNDAGENT_010 (45) + + #define TN_SNDAGENT_011 "SNDAGENT_011" + #define PR_SNDAGENT_011_S "45" + #define PR_SNDAGENT_011 (45) + + #define TN_SNDAGENT_012 "SNDAGENT_012" + #define PR_SNDAGENT_012_S "45" + #define PR_SNDAGENT_012 (45) + + #define TN_SNDAGENT_013 "SNDAGENT_013" + #define PR_SNDAGENT_013_S "45" + #define PR_SNDAGENT_013 (45) + + #define TN_SNDAGENT_014 "SNDAGENT_014" + #define PR_SNDAGENT_014_S "45" + #define PR_SNDAGENT_014 (45) + + #define TN_SNDAGENT_015 "SNDAGENT_015" + #define PR_SNDAGENT_015_S "45" + #define PR_SNDAGENT_015 (45) + + #define TN_SNDAGENT_016 "SNDAGENT_016" + #define PR_SNDAGENT_016_S "45" + #define PR_SNDAGENT_016 (45) + + #define TN_SNDAGENT_017 "SNDAGENT_017" + #define PR_SNDAGENT_017_S "45" + #define PR_SNDAGENT_017 (45) + + #define TN_SNDAGENT_018 "SNDAGENT_018" + #define PR_SNDAGENT_018_S "45" + #define PR_SNDAGENT_018 (45) + + #define TN_SNDAGENT_019 "SNDAGENT_019" + #define PR_SNDAGENT_019_S "45" + #define PR_SNDAGENT_019 (45) + + #define TN_SNDAGENT_020 "SNDAGENT_020" + #define PR_SNDAGENT_020_S "45" + #define PR_SNDAGENT_020 (45) + + #define TN_SNDAGENT_021 "SNDAGENT_021" + #define PR_SNDAGENT_021_S "45" + #define PR_SNDAGENT_021 (45) + + #define TN_SNDAGENT_022 "SNDAGENT_022" + #define PR_SNDAGENT_022_S "45" + #define PR_SNDAGENT_022 (45) + + #define TN_SNDAGENT_023 "SNDAGENT_023" + #define PR_SNDAGENT_023_S "45" + #define PR_SNDAGENT_023 (45) + + #define TN_SNDAGENT_024 "SNDAGENT_024" + #define PR_SNDAGENT_024_S "45" + #define PR_SNDAGENT_024 (45) + + #define TN_SNDAGENT_025 "SNDAGENT_025" + #define PR_SNDAGENT_025_S "45" + #define PR_SNDAGENT_025 (45) + +#define MN_SS_RESOURCEMGR "SS_ResourceMgr" +#define PR_SS_RESOURCEMGR_S "49" +#define PR_SS_RESOURCEMGR (49) + + #define TN_RESOURCEHWDT "ResourceHWDT" + #define PR_RESOURCEHWDT_S "1" + #define PR_RESOURCEHWDT (1) + +#define MN_AS_AUDIOMANAGER "AS_AudioManager" +#define PR_AS_AUDIOMANAGER_S PR_TSS_S +#define PR_AS_AUDIOMANAGER PR_TSS + + #define TN_AS_SOUNDBEEP "AS_SoundBeep" + #define PR_AS_SOUNDBEEP_S PR_TSS_S + #define PR_AS_SOUNDBEEP PR_TSS + +#define MN_GRAPHICS "Graphics" +#define PR_GRAPHICS_S "4" +#define PR_GRAPHICS (4) + + #define TN_GR_MAIN_CTRL "Graphics_main" + #define PR_GR_MAIN_CTRL_S PR_TSS_S + #define PR_GR_MAIN_CTRL PR_TSS + + #define TN_GR_SEQ_CTRL "Graphics_seq" + #define PR_GR_SEQ_CTRL_S PR_TSS_S + #define PR_GR_SEQ_CTRL PR_TSS + + #define TN_GR_DEV_RCV_CTRL "Graphics_rcv" + #define PR_GR_DEV_RCV_CTRL_S PR_TSS_S + #define PR_GR_DEV_RCV_CTRL PR_TSS + + #define TN_GR_VCAP1_CTRL "Graphics_cap1" + #define PR_GR_VCAP1_CTRL_S "4" + #define PR_GR_VCAP1_CTRL (4) + + #define TN_GR_VCAP2_CTRL "Graphics_cap2" + #define PR_GR_VCAP2_CTRL_S "4" + #define PR_GR_VCAP2_CTRL (4) + +#define MN_VUPSERVICE "vupservice" +#define PR_VUPSERVICE_S PR_TSS_S +#define PR_VUPSERVICE PR_TSS + +#define MN_SS_UPDATESERVICE "UpdateService" +#define PR_SS_UPDATESERVICE_S PR_TSS_S +#define PR_SS_UPDATESERVICE PR_TSS + + #define TN_UPSERVICE_VERI "t_update_veri" + #define PR_UPSERVICE_VERI_S PR_TSS_S + #define PR_UPSERVICE_VERI PR_TSS + +#define MN_NW_MICSERVICE "NW_MicService" +#define PR_NW_MICSERVICE_S PR_TSS_S +#define PR_NW_MICSERVICE PR_TSS + +#define MN_NS_LOCKMGR "LockMgr" +#define PR_NS_LOCKMGR_S PR_TSS_S +#define PR_NS_LOCKMGR PR_TSS + +#define MN_PS_SWITCHHANDLER "SwitchHandler" +#define PR_PS_SWITCHHANDLER_S "30" +#define PR_PS_SWITCHHANDLER (30) + +#define MN_SS_WINSYS "SS_WinSys" +#define PR_SS_WINSYS_S "5" +#define PR_SS_WINSYS 5 + +#define MN_MODEMANAGER "modemanager" +#define PR_MODEMANAGER_S PR_TSS_S +#define PR_MODEMANAGER PR_TSS + +#define MN_BTSTACKMAIN "btstackmain" +#define PR_BTSTACKMAIN_S PR_TSS_S +#define PR_BTSTACKMAIN PR_TSS + +#define MN_MEDIASERVICE "MediaService" +#define PR_MEDIASERVICE_S PR_TSS_S +#define PR_MEDIASERVICE PR_TSS + +// REPRO START +#define MN_REPROSERVICE "ReproService" +#define PR_REPROSERVICE_S PR_TSS_S +#define PR_REPROSERVICE PR_TSS + + #define TN_REPROSEQUENCER "RPRS_Sequencer" + #define PR_REPROSEQUENCER_S PR_TSS_S + #define PR_REPROSEQUENCER PR_TSS + + #define TN_REPROCTRL "RPRS_Control" + #define PR_REPROCTRL_S PR_TSS_S + #define PR_REPROCTRL PR_TSS + + #define TN_REPROCENTERCOMM "RPRS_CenterComm" + #define PR_REPROCENTERCOMM_S PR_TSS_S + #define PR_REPROCENTERCOMM PR_TSS + + #define TN_REPROUNITCOMM "RPRS_UnitComm" + #define PR_REPROUNITCOMM_S PR_TSS_S + #define PR_REPROUNITCOMM PR_TSS + + #define TN_REPROWEBDAVMGR "RPRS_WebDAVMgr" + #define PR_REPROWEBDAVMGR_S PR_TSS_S + #define PR_REPROWEBDAVMGR PR_TSS + +#define MN_REPROAENDTEST "Repro_Testpro_Sender" +#define PR_REPROAENDTEST_S PR_TSS_S +#define PR_REPROAENDTEST PR_TSS + + #define TN_REPROAENDTESTTN "Repro_TestproT" + #define PR_REPROAENDTESTTN_S PR_TSS_S + #define PR_REPROAENDTESTTN PR_TSS + +#define MN_REPROBACKVUP "BackVupCtrl" +#define PR_REPROBACKVUP_S PR_TSS_S +#define PR_REPROBACKVUP PR_TSS + +#define MN_REPRODEVELOP "DevReproService" +#define PR_REPRODEVELOP_S PR_TSS_S +#define PR_REPRODEVELOP PR_TSS +// REPRO END + + #define TN_MED_MMCOM_PLAY "mmcom_play" + #define PR_MED_MMCOM_PLAY_S PR_TSS_S + #define PR_MED_MMCOM_PLAY PR_TSS + + #define TN_MED_MMCOM_MEDIA "mmcom_media" + #define PR_MED_MMCOM_MEDIA_S PR_TSS_S + #define PR_MED_MMCOM_MEDIA PR_TSS + + #define TN_MED_MMCOM_DB "mmcom_db" + #define PR_MED_MMCOM_DB_S PR_TSS_S + #define PR_MED_MMCOM_DB PR_TSS + + #define TN_MED_MMCOM_LIST "mmcom_list" + #define PR_MED_MMCOM_LIST_S PR_TSS_S + #define PR_MED_MMCOM_LIST PR_TSS + + #define TN_MED_MMCOM_DBUSB "mmcom_dbusb" + #define PR_MED_MMCOM_DBUSB_S PR_TSS_S + #define PR_MED_MMCOM_DBUSB PR_TSS + + #define TN_MED_MMCOM_DBSD "mmcom_dbsd" + #define PR_MED_MMCOM_DBSD_S PR_TSS_S + #define PR_MED_MMCOM_DBSD PR_TSS + + #define TN_MED_MMCOM_DBCD "mmcom_dbcd" + #define PR_MED_MMCOM_DBCD_S PR_TSS_S + #define PR_MED_MMCOM_DBCD PR_TSS + + #define TN_MED_MMCOM_PLAYRCV "mmcom_playrcv" + #define PR_MED_MMCOM_PLAYRCV_S PR_TSS_S + #define PR_MED_MMCOM_PLAYRCV PR_TSS + + #define TN_MED_RIPCOM_MNG "MngRipComm" + #define PR_MED_RIPCOM_MNG_S PR_TSS_S + #define PR_MED_RIPCOM_MNG PR_TSS + + #define TN_MED_RIPCOM_EXE01 "ExeRipComm01" + #define PR_MED_RIPCOM_EXE01_S PR_TSS_S + #define PR_MED_RIPCOM_EXE01 PR_TSS + + #define TN_MED_RIPCOM_EXE02 "ExeRipComm02" + #define PR_MED_RIPCOM_EXE02_S PR_TSS_S + #define PR_MED_RIPCOM_EXE02 PR_TSS + + #define TN_MED_DISCCOM_MAIN "disccom_main" + #define PR_MED_DISCCOM_MAIN_S PR_TSS_S + #define PR_MED_DISCCOM_MAIN PR_TSS + + #define TN_MED_DISCCOM_DB "disccom_db" + #define PR_MED_DISCCOM_DB_S PR_TSS_S + #define PR_MED_DISCCOM_DB PR_TSS + +#define MN_PLAYBACKSERVICE "PlaybackService" +#define PR_PLAYBACKSERVICE_S PR_TSS_S +#define PR_PLAYBACKSERVICE PR_TSS + + #define TN_PLAYSRV_AUDIO "playsrv_audio" + #define PR_PLAYSRV_AUDIO_S PR_TSS_S + #define PR_PLAYSRV_AUDIO PR_TSS + + #define TN_PLAYSRV_RIP "playsrv_rip" + #define PR_PLAYSRV_RIP_S PR_TSS_S + #define PR_PLAYSRV_RIP PR_TSS + + #define TN_PLAYSRV_PLAY "playsrv_play" + #define PR_PLAYSRV_PLAY_S PR_TSS_S + #define PR_PLAYSRV_PLAY PR_TSS + + #define TN_PLAYSRV_DISC "playsrv_disc" + #define PR_PLAYSRV_DISC_S PR_TSS_S + #define PR_PLAYSRV_DISC PR_TSS + + #define TN_PLAYSRV_ARTWORK "playsrv_artwork" + #define PR_PLAYSRV_ARTWORK_S PR_TSS_S + #define PR_PLAYSRV_ARTWORK PR_TSS + +#define MN_DISCSERVICE "DiscService" +#define PR_DISCSERVICE_S PR_TSS_S +#define PR_DISCSERVICE PR_TSS + +#define MN_RADIOSERVICE "RadioService" +#define PR_RADIOSERVICE_S PR_TSS_S +#define PR_RADIOSERVICE PR_TSS + +#define MN_RADIOHDARBITER "RadioHDArbiter" +#define PR_RADIOHDARBITER_S "20" +#define PR_RADIOHDARBITER (20) + +#define MN_HRDS_MANAGER "hrds_manager" +#define PR_HRDS_MANAGER_S PR_TSS_S +#define PR_HRDS_MANAGER PR_TSS + + #define TN_HRDS_HDMNG "hrds_hdmng" + #define PR_HRDS_HDMNG_S PR_TSS_S + #define PR_HRDS_HDMNG PR_TSS + + #define TN_HRDS_HDDEC "hrds_hddec" + #define PR_HRDS_HDDEC_S PR_TSS_S + #define PR_HRDS_HDDEC PR_TSS + + #define TN_HRDS_WEBMNG "hrds_webmng" + #define PR_HRDS_WEBMNG_S PR_TSS_S + #define PR_HRDS_WEBMNG PR_TSS + + #define TN_HRDS_WEBCOM "hrds_webcom" + #define PR_HRDS_WEBCOM_S PR_TSS_S + #define PR_HRDS_WEBCOM PR_TSS + +#define MN_BT_CONNECTIONSERVICE "BT_CnctSrv" +#define PR_BT_CONNECTIONSERVICE_S PR_TSS_S +#define PR_BT_CONNECTIONSERVICE PR_TSS + +#define MN_BT_PHONESERVICE "BT_PhoneSrv" +#define PR_BT_PHONESERVICE_S PR_TSS_S +#define PR_BT_PHONESERVICE PR_TSS + +#define MN_BT_PHONEBOOKSERVICE "BT_PbkSrv" +#define PR_BT_PHONEBOOKSERVICE_S PR_TSS_S +#define PR_BT_PHONEBOOKSERVICE PR_TSS + +#define MN_BT_MESSAGINGSERVICE "BT_MsgSrv" +#define PR_BT_MESSAGINGSERVICE_S PR_TSS_S +#define PR_BT_MESSAGINGSERVICE PR_TSS + +#define MN_BT_BLLSERVICE "TEL_BLLSrv" +#define PR_BT_BLLSERVICE_S PR_TSS_S +#define PR_BT_BLLSERVICE PR_TSS + +#define MN_BT_DCMPHONESERVICE "DCM_PhoneSrv" +#define PR_BT_DCMPHONESERVICE_S PR_TSS_S +#define PR_BT_DCMPHONESERVICE PR_TSS + + #define TN_BT_CONSRV_HFPMULTIQ1 "HFPMultiQ1" + #define PR_TN_BT_CONSRV_HFPMULTIQ1_S PR_TSS_S + #define PR_TN_BT_CONSRV_HFPMULTIQ1 PR_TSS + + #define TN_BT_CONSRV_HFPMULTIQ2 "HFPMultiQ2" + #define PR_TN_BT_CONSRV_HFPMULTIQ2_S PR_TSS_S + #define PR_TN_BT_CONSRV_HFPMULTIQ2 PR_TSS + + #define TN_BT_PBKSRV_DATABASE "BTPB_Database" + #define PR_TN_BT_PBKSRV_DATABASE_S PR_TSS_S + #define PR_TN_BT_PBKSRV_DATABASE PR_TSS + + #define TN_BT_PBKSRV_LOCALPBINST "LocalPBINST" + #define PR_TN_BT_PBKSRV_LOCALPBINST_S PR_TSS_S + #define PR_TN_BT_PBKSRV_LOCALPBINST PR_TSS + + #define TN_BT_PBKSRV_RESOLVENAME "ResolveName" + #define PR_TN_BT_PBKSRV_RESOLVENAME_S PR_TSS_S + #define PR_TN_BT_PBKSRV_RESOLVENAME PR_TSS + + #define TN_BT_PBKSRV_PBAPMULTIQ1 "PBAPMultiQ1" + #define PR_TN_BT_PBKSRV_PBAPMULTIQ1_S PR_TSS_S + #define PR_TN_BT_PBKSRV_PBAPMULTIQ1 PR_TSS + + #define TN_BT_PBKSRV_OPPMULTI "OPPMulti" + #define PR_TN_BT_PBKSRV_OPPMULTI_S PR_TSS_S + #define PR_TN_BT_PBKSRV_OPPMULTI PR_TSS + + #define TN_BT_PBKSRV_VCARDPARSER "VCardParser" + #define PR_TN_BT_PBKSRV_VCARDPARSER_S PR_TSS_S + #define PR_TN_BT_PBKSRV_VCARDPARSER PR_TSS + + #define TN_BT_MSGSRV_MSGCNTRLTHREAD0 "MsgCntrlThread0" + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD0_S PR_TSS_S + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD0 PR_TSS + + #define TN_BT_MSGSRV_MSGCNTRLTHREAD1 "MsgCntrlThread1" + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD1_S PR_TSS_S + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD1 PR_TSS + + #define TN_BT_MSGSRV_MAPMULTI "MapMulti" + #define PR_TN_BT_MSGSRV_MAPMULTI_S PR_TSS_S + #define PR_TN_BT_MSGSRV_MAPMULTI PR_TSS + +#define MN_DTVSERVICE "DtvService" +#define PR_DTVSERVICE_S PR_TSS_S +#define PR_DTVSERVICE PR_TSS + + #define TN_DTVTNC_TX "dtvtnc_tx" + #define PR_DTVTNC_TX_S PR_TSS_S + #define PR_DTVTNC_TX PR_TSS + + #define TN_DTVTNC_RCV "dtvtnc_rcv" + #define PR_DTVTNC_RCV_S PR_TSS_S + #define PR_DTVTNC_RCV PR_TSS + + #define TN_DTVTNC_TIMER "dtvtnc_timer" + #define PR_DTVTNC_TIMER_S PR_TSS_S + #define PR_DTVTNC_TIMER PR_TSS + + #define TN_DTVTNC_CTL "dtvtnc_ctl" + #define PR_DTVTNC_CTL_S PR_TSS_S + #define PR_DTVTNC_CTL PR_TSS + +#define MN_DTVVUPSERVICE "DtvVupService" +#define PR_DTVVUPSERVICE_S PR_TSS_S +#define PR_DTVVUPSERVICE PR_TSS + +#define MN_SETTINGSERVICE "SettingService" +#define PR_SETTINGSERVICE_S PR_TSS_S +#define PR_SETTINGSERVICE PR_TSS + +#define MN_INFOSETTINGSRV "InfoSettingSrv" +#define PR_INFOSETTINGSRV_S PR_TSS_S +#define PR_INFOSETTINGSRV PR_TSS + + #define TN_INFS_UIC "infs_uic" + #define PR_INFS_UIC_S PR_TSS_S + #define PR_INFS_UIC PR_TSS + +#define MN_DELPERSONALSRV "DelPersonalSrv" +#define PR_DELPERSONALSRV_S PR_TSS_S +#define PR_DELPERSONALSRV PR_TSS + +#define MN_MENUSERVICE "MenuService" +#define PR_MENUSERVICE_S PR_TSS_S +#define PR_MENUSERVICE PR_TSS + +#define MN_NAVIPROXY "NaviProxy" +#define PR_NAVIPROXY_S PR_TSS_S +#define PR_NAVIPROXY PR_TSS + +#define MN_AWBPROXY "AwbProxy" +#define PR_AWBPROXY_S PR_TSS_S +#define PR_AWBPROXY PR_TSS + +#define MN_TFFPROXY "TFFProxy" +#define PR_TFFPROXY_S PR_TSS_S +#define PR_TFFPROXY PR_TSS + +#define MN_TFFPROXYSLAVE "TFFProxySlave" +#define PR_TFFPROXYSLAVE_S PR_TSS_S +#define PR_TFFPROXYSLAVE PR_TSS + +#define MN_AWNPRIMARY "AwnPrimary" +#define PR_AWNPRIMARY_S PR_TSS_S +#define PR_AWNPRIMARY PR_TSS + +#define MN_AWBPRIMARY "AwbPrimary" +#define PR_AWBPRIMARY_S PR_TSS_S +#define PR_AWBPRIMARY PR_TSS + +#define MN_AWMPRIMARY "AwmPrimary" +#define PR_AWMPRIMARY_S PR_TSS_S +#define PR_AWMPRIMARY PR_TSS + +#define MN_AWTPRIMARY "AwtPrimary" +#define PR_AWTPRIMARY_S PR_TSS_S +#define PR_AWTPRIMARY PR_TSS + +#define MN_MISINKSERVICE "MisinkService" +#define PR_MISINKSERVICE_S PR_TSS_S +#define PR_MISINKSERVICE PR_TSS + +#define MN_TEXTCONVERTER "TextConverter" +#define PR_TEXTCONVERTER_S PR_TSS_S +#define PR_TEXTCONVERTER PR_TSS + +#define MN_HANDWRITING "HandWriting" +#define PR_HANDWRITING_S PR_TSS_S +#define PR_HANDWRITING PR_TSS + +#define MN_EXTUNITAUTH_D "EXTUNITAUTH_D" +#define PR_EXTUNITAUTH_D_S "29" +#define PR_EXTUNITAUTH_D 29 + + #define TN_VPSVC__CWORD84_ "VPSVC_D" + #define PR_VPSVC__CWORD84__S PR_TSS_S + #define PR_VPSVC__CWORD84_ PR_TSS + +#define MN_PROXYSERVICE "ProxyService" +#define PR_PROXYSERVICE_S PR_TSS_S +#define PR_PROXYSERVICE PR_TSS + +#define MN_FUELSERVICE "VS_FUCSrv" +#define PR_FUELSERVICE_S PR_TSS_S +#define PR_FUELSERVICE PR_TSS + +#define MN_ENERGYSERVICE "VS_ENMSrv" +#define PR_ENERGYSERVICE_S PR_TSS_S +#define PR_ENERGYSERVICE PR_TSS + +#define MN_CUSTOMIZESERVICE "VS_VSDSrv" +#define PR_CUSTOMIZESERVICE_S PR_TSS_S +#define PR_CUSTOMIZESERVICE PR_TSS + +#define MN_DMSSERVICE "VS_DMSSrv" +#define PR_DMSSERVICE_S PR_TSS_S +#define PR_DMSSERVICE PR_TSS + +#define MN_AIRCONSERVICE "VS_ACNSrv" +#define PR_AIRCONSERVICE_S PR_TSS_S +#define PR_AIRCONSERVICE PR_TSS + +#define MN_SEATSERVICE "VS_NMSSrv" +#define PR_SEATSERVICE_S PR_TSS_S +#define PR_SEATSERVICE PR_TSS + +#define MN_CAMERASERVICE "VS_CMRSrv" +#define PR_CAMERASERVICE_S PR_TSS_S +#define PR_CAMERASERVICE PR_TSS + + #define TN_CAMERAQUICKRVC "QuickRVCThread" + #define PR_CAMERAQUICKRVC_S PR_TSS_S + #define PR_CAMERAQUICKRVC PR_TSS + +#define MN_METSERVICE "VS_METSrv" +#define PR_METSERVICE_S PR_TSS_S +#define PR_METSERVICE PR_TSS + +#define MN_TMCSERVICE "VS_TMCSrv" +#define PR_TMCSERVICE_S PR_TSS_S +#define PR_TMCSERVICE PR_TSS + +#define MN_DASSERVICE "VS_DASSrv" +#define PR_DASSERVICE_S PR_TSS_S +#define PR_DASSERVICE PR_TSS + +#define MN_EXTUNITAUTH_M "EXTUNITAUTH_M" +#define PR_EXTUNITAUTH_M_S "29" +#define PR_EXTUNITAUTH_M 29 + +#define MN_DUMMYREAD "DummyRead" +#define PR_DUMMYREAD_S PR_TSS_S +#define PR_DUMMYREAD PR_TSS + +#define MN_SSTSERVICE "storage_access" +#define PR_SSTSERVICE_S PR_TSS_S +#define PR_SSTSERVICE PR_TSS + +#define MN_CCSAUDITD "ccs-auditd" +#define PR_CCSAUDITD_S PR_TSS_S +#define PR_CCSAUDITD PR_TSS + +//exec from task manager +#define MN_ACTIVITYMANAGER "ActivityManager" +#define PR_ACTIVITYMANAGER_S PR_TSS_S +#define PR_ACTIVITYMANAGER PR_TSS + +#define MN_RESIDENT_SVC "RESIDENT_SVC" +#define PR_RESIDENT_SVC_S PR_TSS_S +#define PR_RESIDENT_SVC PR_TSS + +#define MN_TRANSIENT_SVC "TRANSIENT_SVC" +#define PR_TRANSIENT_SVC_S PR_TSS_S +#define PR_TRANSIENT_SVC PR_TSS + +#define MN_WLANSERVICE "wlan_ctrl_0700" +#define PR_WLANSERVICE_S PR_TSS_S +#define PR_WLANSERVICE PR_TSS + +#define MN_WLANEVTTHR "WlanEvtThr" +#define PR_WLANEVTTHR_S PR_TSS_S +#define PR_WLANEVTTHR PR_TSS + +#define MN_WLANMIDDLESERVICE "WlanMiddle" +#define PR_WLANMIDDLESERVICE_S PR_TSS_S +#define PR_WLANMIDDLESERVICE PR_TSS + + #define TN_WLANMIDDLESERVICE0 "WM_MsgCtrlTh0" + #define PR_WLANMIDDLESERVICE0_S PR_TSS_S + #define PR_WLANMIDDLESERVICE0 PR_TSS + + #define TN_WLANMIDDLESERVICE1 "WM_MsgCtrlTh1" + #define PR_WLANMIDDLESERVICE1_S PR_TSS_S + #define PR_WLANMIDDLESERVICE1 PR_TSS + + #define TN_WLANMIDDLESERVICE2 "WM_MsgCtrlTh2" + #define PR_WLANMIDDLESERVICE2_S PR_TSS_S + #define PR_WLANMIDDLESERVICE2 PR_TSS + +#define MN_WLANSERVICE2 "wlan_ctrl_0701" +#define PR_WLANSERVICE2_S PR_TSS_S +#define PR_WLANSERVICE2 PR_TSS + +#define MN_WLANEVTTHR2 "WlanEvtThr2" +#define PR_WLANEVTTHR2_S PR_TSS_S +#define PR_WLANEVTTHR2 PR_TSS + +//exec from task manager, Test for vup +#define MN_PS__CWORD52_VUP "_CWORD52_vup" +#define PR_PS__CWORD52_VUP_S PR_TSS_S +#define PR_PS__CWORD52_VUP PR_TSS + +#define MN_PS_SYSVUP "sysvup" +#define PR_PS_SYSVUP_S PR_TSS_S +#define PR_PS_SYSVUP PR_TSS + +#define MN_SS_ROOTFSVUP "rootfsvup" +#define PR_SS_ROOTFSVUP_S PR_TSS_S +#define PR_SS_ROOTFSVUP PR_TSS + +#define MN_SS_VUPPROGUI "vupprogressui" +#define PR_SS_VUPPROGUI_S PR_TSS_S +#define PR_SS_VUPPROGUI PR_TSS + +#define MN_SS_NORVUP "norvup" +#define PR_SS_NORVUP_S PR_TSS_S +#define PR_SS_NORVUP PR_TSS + +// OUTER_UPDATE START +#define MN_XMVUPSERVICE "radio_xm_update" +#define PR_XMVUPSERVICE_S PR_TSS_S +#define PR_XMVUPSERVICE PR_TSS +// OUTER_UPDATE END + +#define MN_BTPHONESRV "BT_PhoneSrv" +#define PR_BTPHONESRV_S PR_TSS_S +#define PR_BTPHONESRV PR_TSS + +#define MN_BTPBKSRV "BT_PbkSrv" +#define PR_BTPBKSRV_S PR_TSS_S +#define PR_BTPBKSRV PR_TSS + +#define MN_BTMSGSRV "BT_MsgSrv" +#define PR_BTMSGSRV_S PR_TSS_S +#define PR_BTMSGSRV PR_TSS + +// NON-resident, exec from task manager, Repro update +#define MN_PS_SYSUPDATE "sysupdate" +#define PR_PS_SYSUPDATE_S PR_TSS_S +#define PR_PS_SYSUPDATE PR_TSS + +#define MN_SS_NANDUPDATE "nandupdate" +#define PR_SS_NANDUPDATE_S PR_TSS_S +#define PR_SS_NANDUPDATE PR_TSS + + #define TN_NANDUPDATE_CLD "t_nandcld" + #define PR_NANDUPDATE_CLD_S PR_TSS_S + #define PR_NANDUPDATE_CLD PR_TSS + +#define MN_BTPHONESRV "BT_PhoneSrv" +#define PR_BTPHONESRV_S PR_TSS_S +#define PR_BTPHONESRV PR_TSS + +#define MN_BTPBKSRV "BT_PbkSrv" +#define PR_BTPBKSRV_S PR_TSS_S +#define PR_BTPBKSRV PR_TSS + +#define MN_BTMSGSRV "BT_MsgSrv" +#define PR_BTMSGSRV_S PR_TSS_S +#define PR_BTMSGSRV PR_TSS + +//exec from diag +#define MN_DIAGSERVICE "DiagService" +#define PR_DIAGSERVICE_S PR_TSS_S +#define PR_DIAGSERVICE PR_TSS + +#define MN_DIAGWORKERTSK "diagworker_tsk" +#define PR_DIAGWORKERTSK_S PR_TSS_S +#define PR_DIAGWORKERTSK PR_TSS + +#define MN_DIAGTSK "diag_tsk" +#define PR_DIAGTSK_S PR_TSS_S +#define PR_DIAGTSK PR_TSS + +#define MN_DIAGMCTSK "diagmc_tsk" +#define PR_DIAGMCTSK_S PR_TSS_S +#define PR_DIAGMCTSK PR_TSS + +#define MN_DIAGUTCOL "diagutCol_tsk" +#define PR_DIAGUTCOL_S PR_TSS_S +#define PR_DIAGUTCOL PR_TSS + +#define MN_DIAGUTUPD "diagutUpd_tsk" +#define PR_DIAGUTUPD_S PR_TSS_S +#define PR_DIAGUTUPD PR_TSS + +//exec from Connectivity for _CWORD57_ +#define MN__CWORD57_UTILSERVICE "_CWORD57_UtilService" +#define PR__CWORD57_UTILSERVICE_S PR_TSS_S +#define PR__CWORD57_UTILSERVICE PR_TSS + + #define TN_CON_IPUT_DETECT "iputsrv_detect" + #define PR_CON_IPUT_DETECT_S PR_TSS_S + #define PR_CON_IPUT_DETECT PR_TSS + + #define TN_CON_IPUT_AUTH "iputsrv_auth" + #define PR_CON_IPUT_AUTH_S PR_TSS_S + #define PR_CON_IPUT_AUTH PR_TSS + + #define TN_CON_IPUT_SERIAL "iputsrv_serial" + #define PR_CON_IPUT_SERIAL_S PR_TSS_S + #define PR_CON_IPUT_SERIAL PR_TSS + + #define TN_CON_IPUT_USB_1 "iputsrv_usb1" + #define PR_CON_IPUT_USB_1_S PR_TSS_S + #define PR_CON_IPUT_USB_1 PR_TSS + + #define TN_CON_IPUT_USB_2 "iputsrv_usb2" + #define PR_CON_IPUT_USB_2_S PR_TSS_S + #define PR_CON_IPUT_USB_2 PR_TSS + + #define TN_CON_IPUT_SPP "iputsrv_spp" + #define PR_CON_IPUT_SPP_S PR_TSS_S + #define PR_CON_IPUT_SPP PR_TSS + +#define MN__CWORD57_DTSERVICE "_CWORD57_DTService" +#define PR__CWORD57_DTSERVICE_S PR_TSS_S +#define PR__CWORD57_DTSERVICE PR_TSS + + #define TN_CON_IPDT_SERIAL "ipdtsrv_serial" + #define PR_CON_IPDT_SERIAL_S PR_TSS_S + #define PR_CON_IPDT_SERIAL PR_TSS + + #define TN_CON_IPDT_USB_1 "ipdtsrv_usb1" + #define PR_CON_IPDT_USB_1_S PR_TSS_S + #define PR_CON_IPDT_USB_1 PR_TSS + + #define TN_CON_IPDT_USB_2 "ipdtsrv_usb2" + #define PR_CON_IPDT_USB_2_S PR_TSS_S + #define PR_CON_IPDT_USB_2 PR_TSS + + #define TN_CON_IPDT_SPP "ipdtsrv_spp" + #define PR_CON_IPDT_SPP_S PR_TSS_S + #define PR_CON_IPDT_SPP PR_TSS + +#define MN_WEBDAVMGR "webdavmgr" +#define PR_WEBDAVMGR_S PR_TSS_S +#define PR_WEBDAVMGR PR_TSS + +#define MN_DISPLAYSERVICE "DisplayService" +#define PR_DISPLAYSERVICE_S PR_TSS_S +#define PR_DISPLAYSERVICE PR_TSS + +#define MN_ENFORMSERVICE "EnformService" +#define PR_ENFORMSERVICE_S PR_TSS_S +#define PR_ENFORMSERVICE PR_TSS + +#define MN_CONNUTIL "ConnUtil" +#define PR_CONNUTIL_S PR_TSS_S +#define PR_CONNUTIL PR_TSS + +#define MN_CONNUTILSLAVE "ConnUtilSlave" +#define PR_CONNUTILSLAVE_S PR_TSS_S +#define PR_CONNUTILSLAVE PR_TSS + +#define MN_CONNMGR "ConnMgr" +#define PR_CONNMGR_S PR_TSS_S +#define PR_CONNMGR PR_TSS + +#define MN_SERVICEFLAGMGR "ServiceFlagMgr" +#define PR_SERVICEFLAGMGR_S PR_TSS_S +#define PR_SERVICEFLAGMGR PR_TSS + +//exec from VR +#define MN_VRMANAGER "vrmanager" +#define PR_VRMANAGER_S PR_TSS_S +#define PR_VRMANAGER PR_TSS + + #define TN_VR_WORKER "VrWorkerThread" + #define PR_VR_WORKER_S PR_TSS_S + #define PR_VR_WORKER PR_TSS + + #define TN_VBT_PROPDISPATCH "PropDispatchThread" + #define PR_VBT_PROPDISPATCH_S PR_TSS_S + #define PR_VBT_PROPDISPATCH PR_TSS + + #define TN_VBT_PROPRESPONSE "PropResponseThread" + #define PR_VBT_PROPRESPONSE_S PR_TSS_S + #define PR_VBT_PROPRESPONSE PR_TSS + + #define TN_VBT_PROPAUDIOPLAY "PropAudioPlayThread" + #define PR_VBT_PROPAUDIOPLAY_S PR_TSS_S + #define PR_VBT_PROPAUDIOPLAY PR_TSS + + #define TN_VBT_PROPAUDIORECORD "PropAudioRecordThread" + #define PR_VBT_PROPAUDIORECORD_S PR_TSS_S + #define PR_VBT_PROPAUDIORECORD PR_TSS + + #define TN_VBT_MAINTHREADPRIO "MainThreadPriority" + #define PR_VBT_MAINTHREADPRIO_S PR_TSS_S + #define PR_VBT_MAINTHREADPRIO PR_TSS + + #define TN_VBT_ASRMANAGERGRAMMAR "AsrManagerGrammarGenerationThread" + #define PR_VBT_ASRMANAGERGRAMMAR_S PR_TSS_S + #define PR_VBT_ASRMANAGERGRAMMAR PR_TSS + + #define TN_VBT_ASRVOCONRECO "AsrVoconRecoProcessThread" + #define PR_VBT_ASRVOCONRECO_S PR_TSS_S + #define PR_VBT_ASRVOCONRECO PR_TSS + + #define TN_VBT_BROADCASTREAD "BroadCastReadThread" + #define PR_VBT_BROADCASTREAD_S PR_TSS_S + #define PR_VBT_BROADCASTREAD PR_TSS + + #define TN_VBT_FILEAGGREGATOR "FileAggregatorDecompressThread" + #define PR_VBT_FILEAGGREGATOR_S PR_TSS_S + #define PR_VBT_FILEAGGREGATOR PR_TSS + + #define TN_VBT_HTTPCURLREQUEST "HttpCurlRequestThread" + #define PR_VBT_HTTPCURLREQUEST_S PR_TSS_S + #define PR_VBT_HTTPCURLREQUEST PR_TSS + + #define TN_VBT_HTTPDRIVERREQUEST "HttpDriverRequestThread" + #define PR_VBT_HTTPDRIVERREQUEST_S PR_TSS_S + #define PR_VBT_HTTPDRIVERREQUEST PR_TSS + + #define TN_VBT_HTTPREQUESTSESSION "HttpRequestSessionStateThread" + #define PR_VBT_HTTPREQUESTSESSION_S PR_TSS_S + #define PR_VBT_HTTPREQUESTSESSION PR_TSS + + #define TN_VBT_PLAYMGRSTOPASYNC "PlayMgrStopAsyncStreamThread" + #define PR_VBT_PLAYMGRSTOPASYNC_S PR_TSS_S + #define PR_VBT_PLAYMGRSTOPASYNC PR_TSS + + #define TN_VBT_RESOURCEMGRQUEUE "ResourceMgrQueueHandlerThread" + #define PR_VBT_RESOURCEMGRQUEUE_S PR_TSS_S + #define PR_VBT_RESOURCEMGRQUEUE PR_TSS + + #define TN_VBT_SMURFDRIVERTIMEOUT "SmurfDriverTimeoutThread" + #define PR_VBT_SMURFDRIVERTIMEOUT_S PR_TSS_S + #define PR_VBT_SMURFDRIVERTIMEOUT PR_TSS + + #define TN_NVR_NVRMAIN "NvrMainThread" + #define PR_NVR_NVRMAIN_S PR_TSS_S + #define PR_NVR_NVRMAIN PR_TSS + + #define TN_NVR_NVRRECO "NvrRecoThread" + #define PR_NVR_NVRRECO_S PR_TSS_S + #define PR_NVR_NVRRECO PR_TSS + + #define TN_NVR_NVRDICT "NvrDictThread" + #define PR_NVR_NVRDICT_S PR_TSS_S + #define PR_NVR_NVRDICT PR_TSS + + #define TN_NVR_NVRENC "NvrEncThread" + #define PR_NVR_NVRENC_S PR_TSS_S + #define PR_NVR_NVRENC PR_TSS + +//exec from VehicleInfo +#define MN_VEHICLEINFOSERVICE "VehicleInfoSrv" +#define PR_VEHICLEINFOSERVICE_S PR_TSS_S +#define PR_VEHICLEINFOSERVICE PR_TSS + +//exec from _CWORD58_ +#define MN__CWORD58_SERVICE "_CWORD58_Service" +#define PR__CWORD58_SERVICE_S PR_TSS_S +#define PR__CWORD58_SERVICE PR_TSS + +#define MN__CWORD8_SRV "_CWORD8_Srv" +#define PR__CWORD8_SRV_S PR_TSS_S +#define PR__CWORD8_SRV PR_TSS + +#define MN_SPCSERVICE "SPCService" +#define PR_SPCSERVICE_S PR_TSS_S +#define PR_SPCSERVICE PR_TSS + +#define MN_LOCALSERVERPROXY "LSP" +#define PR_LOCALSERVERPROXY_S PR_TSS_S +#define PR_LOCALSERVERPROXY PR_TSS + +#define MN_EOMSERVICE "eOMService" +#define PR_EOMSERVICE_S PR_TSS_S +#define PR_EOMSERVICE PR_TSS + +//exec from _CWORD89_ +#define MN__CWORD89_SERVICE "_CWORD89_Service" +#define PR__CWORD89_SERVICE_S PR_TSS_S +#define PR__CWORD89_SERVICE PR_TSS + +//exec from NetworkManager +#define MN_NETWORKMANAGER "NetworkManager" +#define PR_NETWORKMANAGER_S PR_TSS_S +#define PR_NETWORKMANAGER PR_TSS + + #define TN_NWM_TH_CMDRCV "NWM_Th_CmdRcv" + #define PR_NWM_TH_CMDRCV_S PR_TSS_S + #define PR_NWM_TH_CMDRCV PR_TSS + + #define TN_NWM_TH_PROCMGR "NWM_Th_ProcMgr" + #define PR_NWM_TH_PROCMGR_S PR_TSS_S + #define PR_NWM_TH_PROCMGR PR_TSS + + #define TN_NWM_TH_CMDPROC "NWM_Th_CmdProc" + #define PR_NWM_TH_CMDPROC_S PR_TSS_S + #define PR_NWM_TH_CMDPROC PR_TSS + + #define TN_NWM_TH_DNSMGR "NWM_Th_DnsMgr" + #define PR_NWM_TH_DNSMGR_S PR_TSS_S + #define PR_NWM_TH_DNSMGR PR_TSS + + #define TN_NWM_TH_DHCPD "NWM_Th_Dhcpd" + #define PR_NWM_TH_DHCPD_S PR_TSS_S + #define PR_NWM_TH_DHCPD PR_TSS + +// DCM Service +#define MN_DCMSERVICE "DCMService" +#define PR_DCMSERVICE_S PR_TSS_S +#define PR_DCMSERVICE PR_TSS + + #define TN_DCM_TH_CMDRCV "DCM_Th_CmdRcv" + #define PR_DCM_TH_CMDRCV_S PR_TSS_S + #define PR_DCM_TH_CMDRCV PR_TSS + + #define TN_DCM_TH_MSGRCV "DCM_Th_MsgRcv" + #define PR_DCM_TH_MSGRCV_S PR_TSS_S + #define PR_DCM_TH_MSGRCV PR_TSS + + #define TN_DCM_TH_TIMER "DCM_Th_Timer" + #define PR_DCM_TH_TIMER_S PR_TSS_S + #define PR_DCM_TH_TIMER PR_TSS + +// HELP Service +#define MN_HELPSERVICE "HELPService" +#define PR_HELPSERVICE_S PR_TSS_S +#define PR_HELPSERVICE PR_TSS + +//exec from RemoteService +#define MN_REMOTESERVICE "RemoteService" +#define PR_REMOTESERVICE_S PR_TSS_S +#define PR_REMOTESERVICE PR_TSS + + #define TN_RS_TH_CANCTRL "RS_Th_CANCtrl" + #define PR_RS_TH_CANCTRL_S PR_TSS_S + #define PR_RS_TH_CANCTRL PR_TSS + + #define TN_RS_TH_DISPCTRL "RS_Th_DispCtrl" + #define PR_RS_TH_DISPCTRL_S PR_TSS_S + #define PR_RS_TH_DISPCTRL PR_TSS + + #define TN_RS_TH_PARTSCTRL "RS_Th_PartsCtrl" + #define PR_RS_TH_PARTSCTRL_S PR_TSS_S + #define PR_RS_TH_PARTSCTRL PR_TSS + + #define TN_RS_TH_HTTPPROC "RS_Th_HttpProc" + #define PR_RS_TH_HTTPPROC_S PR_TSS_S + #define PR_RS_TH_HTTPPROC PR_TSS + +//exec from VR +#define MN_CONTENTSMGR "contentsmgr" +#define PR_CONTENTSMGR_S PR_TSS_S +#define PR_CONTENTSMGR PR_TSS + + #define TN_CDB_CONTENDB "contendbThread" + #define PR_CDB_CONTENDB_S PR_TSS_S + #define PR_CDB_CONTENDB PR_TSS + +/* COMARB Service */ +#define MN_NW_COMARB "ComArbService" +#define PR_NW_COMARB_S PR_TSS_S +#define PR_NW_COMARB PR_TSS + +/* ASND_FRthread */ +#define MN_ASND_FRTH "ASND_FRthread" +#define PR_ASND_FRTH_S PR_SND_VCETRFCTRL_S +#define PR_ASND_FRTH PR_SND_VCETRFCTRL + +/* MLINK Service */ +#define MN_MLINKSERVICE "MlinkService" +#define PR_MLINKSERVICE_S PR_TSS_S +#define PR_MLINKSERVICE PR_TSS + +#define MN__CWORD74_SERVICE "_CWORD74_Service" +#define PR__CWORD74_SERVICE_S PR_TSS_S +#define PR__CWORD74_SERVICE PR_TSS +#endif //__AGL_THREAD_H__ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_types_obsoluted.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_types_obsoluted.h new file mode 100644 index 00000000..0e427241 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_types_obsoluted.h @@ -0,0 +1,132 @@ +/* + * @copyright Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _AGL_TYPES_OBSOLUTED_H_ +#define _AGL_TYPES_OBSOLUTED_H_ + +#include +#include +#include +#include +#include +#include + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include + +typedef u_int64_t _Uint64t; +typedef int64_t _Int64t; +typedef u_int32_t _Uint32t; +typedef int32_t _Int32t; +typedef u_int16_t _Uint16t; +typedef int16_t _Int16t; +typedef u_int8_t _Uint8t; +typedef int8_t _Int8t; + +typedef _Int8t _int8; +typedef _Uint8t _uint8; +typedef _Int16t _int16; +typedef _Uint16t _uint16; +typedef _Int32t _int32; +typedef _Uint32t _uint32; +typedef _Int64t _int64; +typedef _Uint64t _uint64; + + +#ifdef AGL_PosixBasedOS001LEGACY_USED +#define AGL_PROTECTION_NO_CACHE 0x00000800 +#define AGL_MAP_NON_INIT 0x00004000 +#define AGL_MAP_PHYSICAL 0x00010000 +#define AGL_NON_FD (-1) +#define AGL_MAP_DEV_FAILED ((unsigned long)MAP_FAILED) +#endif /*AGL_PosixBasedOS001LEGACY_USED*/ + +#define EOK 0 + +#ifdef AGL_PosixBasedOS001LEGACY_USED +#define agl_io_in32(_x) *(volatile unsigned long *)(_x) +#define agl_io_out32(_x, _y) {*(volatile unsigned long *)((void*)(_x)) = (_y);} +#endif /*AGL_PosixBasedOS001LEGACY_USED*/ + + + +#define __AGLDD_TYPEDEF_I64 +typedef int64_t i64; /* 8-byte signed integer */ + +#define __AGLDD_TYPEDEF_U64 +typedef uint64_t u64; /* 8-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_U32 +typedef uint32_t u32; /* 4-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_U16 +typedef uint16_t u16; /* 2-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_I16 +typedef int16_t i16; /* 2-byte signed integer */ + +#define __AGLDD_TYPEDEF_U8 +typedef uint8_t u8; /* 1-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_I8 +typedef int8_t i8; /* 1-byte signed integer */ + +#define __AGLDD_TYPEDEF_INT8 +typedef int8_t INT8; + +#define __AGLDD_TYPEDEF_INT16 +typedef int16_t INT16; + +#define __AGLDD_TYPEDEF_INT32 +typedef int32_t INT32; + +#define __AGLDD_TYPEDEF_INT64 +typedef int64_t INT64; + +#define __AGLDD_TYPEDEF_UINT8 +typedef uint8_t UINT8; + +#define __AGLDD_TYPEDEF_UINT16 +typedef uint16_t UINT16; + +#define __AGLDD_TYPEDEF_UINT32 +typedef uint32_t UINT32; + +#define __AGLDD_TYPEDEF_UINT64 +typedef uint64_t UINT64; + +#ifndef __KERNEL__ +#if !defined __WIN_TYPEDEF_BOOL +#define __AGLDD_TYPEDEF_BOOL +typedef uint32_t BOOL; +#endif +#endif + +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + +// AGL ASSERT MACRO +#define AGL_ASSERT_NOT_TESTED() \ +do {fprintf(stderr, "[%s][%s][%s:%d]AGL_ASSERT_NOT_TESTED.\n", \ + program_invocation_short_name, __func__, __FILE__, __LINE__);} while(0) + +#endif /* _AGL_TYPES_OBSOLUTED_H_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_wakeup_order.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_wakeup_order.h new file mode 100644 index 00000000..006f1bc4 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/agl_wakeup_order.h @@ -0,0 +1,27 @@ +/* + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _AGL_WAKEUP_ORDER_H_ +#define _AGL_WAKEUP_ORDER_H_ + +//This header define Wakeup Order Name +//The max string length is 31 + +#define WON_DEFAULT "DEFAULT" + +#endif + + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/aglpath.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/aglpath.h new file mode 100644 index 00000000..e278fbf9 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/aglpath.h @@ -0,0 +1,200 @@ +/* + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * common path + */ + +/* This definitions are matched as following document. + * eMMC Partition Specification V1.28 + */ + +#ifndef _AGL_PATH_H_ +#define _AGL_PATH_H_ + +/* Common path */ + +#define PF_ROOT "/" +#define PF_NV PF_ROOT"nv/" +#define PF_VAR PF_ROOT"var/" +#define PF_TMP PF_ROOT"tmp/" +#define PF_USR PF_ROOT"usr/" +#define PF_MNT PF_ROOT"mnt/" +#define PF_RAMD PF_ROOT"ramd/" +#define PF_ENVPARAM PF_ROOT"env_param/" +#define PF_NVSYSTEM PF_ROOT"nv_system/" + +#define PF_SHM PF_TMP"shm/" +#define PF_SHARE PF_USR"share/" +#define PF_P_SHARE PF_USR"agl/share/" + +#define PF_SYS_BS PF_NVSYSTEM"sys_bs/" + +#define PF_SYS_BACKUP PF_NV"backup/" +#define PF_SYS_NPP PF_NV"npp/" + +#define PF_NV_REPRO PF_NV"repro/" +#define PF_NV_LOG PF_NV"log/" +#define PF_NV_VUI PF_NV"vui/" +#define PF_NV_NAVI PF_NV"navi/" +#define PF_NV_TFF PF_NV"tff/" +#define PF_NV_FULLBROWSER PF_NV"fullbrowser/" +#define PF_NV__CWORD8_ PF_NV"_CWORD8_/" +#define PF_NV_MANUAL PF_NV"manual/" +#define PF_NV_LOG2 PF_NV"log2/" +#define PF_NV_PTDATA PF_NV"ptdata/" + +#define PF_NV_NORACCESS PF_NV_PTDATA"noraccess/" +#define PF_NV_SEC PF_NV_PTDATA"sec/" +#define PF_NVPT_GRAPHICS PF_NV_PTDATA"graphics/" +#define PF_NVPT_HMI PF_NV_PTDATA"hmi/" +#define PF_NVPT_VEHICLE PF_NV_PTDATA"vehicle/" +#define PF_NVPT_CONNECTIVITY PF_NV_PTDATA"connectivity/" +#define PF_NVPT_WLAN PF_NV_PTDATA"wlan/" +#define PF_NVPT_SI PF_NV_PTDATA"si/" + +#define PF_NVLOG_AGLLOG PF_NV_LOG"agllog/" +#define PF_NVLOG_WORK PF_NV_LOG"work/" +#define PF_NVLOG_AWLOG PF_NV_LOG2"awlog/" +#define PF_NVLOG_CORE PF_NV_LOG2"core/" + + +/* Component domain */ + +#define DOM_GRAPHICS "graphics" +#define DOM_SOUND "sound" +#define DOM_NS_STORAGE "ns_storage" +#define DOM_NS_IMAGESTORAGE "ns_imagestorage" +#define DOM_BS "bs" +#define DOM__CWORD24_ "_CWORD24_" +#define DOM_HMI "hmi" +#define DOM_WLAN "wlan" +#define DOM_BT "bt" +#define DOM_CINEMO "cinemo" +#define DOM_MEDIASRV "mediasrv" +#define DOM_CONTENTMGR "contentmgr" +#define DOM_USBAUDIO "usbaudio" +#define DOM_CDDVD "cddvd" +#define DOM_AV "av" +#define DOM_DATASRV "datasrv" +#define DOM_RADIO "radio" +#define DOM_BTOOTH "Bluetooth" +#define DOM__CWORD57_ "_CWORD57_" +#define DOM_REMOTESERVICE "remoteservice" +#define DOM_CONNECTIVITY "connectivity" +#define DOM_NAVIGATION "navigation" +#define DOM_VEHICLE "vehicle" +#define DOM_ROMACCESS "romaccess" +#define DOM_AUDIOMGR "audiomgr" +#define DOM_BACKUP "backup" +#define DOM_NPP "npp" + +#define DOM_DCMSERVICE "dcmservice" +#define DOM_NETWORKMANAGER "NetworkManager" + +/* Others */ +#define DOM_AGLLOG "agllog" +#define DOM_AWLOG "awlog" +#define DOM_WORK "work" +#define DOM_CORE "core" + +#define DOM_NORACCESS "noraccess" +#define DOM_SEC "sec" +#define DOM_DIAG "diag" + + +/* For WebDAV */ + +#define PF_EXP_INTR PF_NV"export/Internal/" +#define PF_EXPINT_AUDIO PF_EXP_INTR"Audio/" +#define PF_EXPINT_DATASERV PF_EXP_INTR"DataService/" +#define PF_EXPINT_SCREENCAP PF_EXP_INTR"ScreenCapture/" +#define PF_EXPINT_REPRO PF_EXP_INTR"Repro/" +#define PF_EXPINT_VEHICLEINFO PF_EXP_INTR"VehicleInfoDraw/" +#define PF_EXPINT_VEHICLEPARA PF_EXP_INTR"VehicleParameter/" +#define PF_EXPINT_VR PF_EXP_INTR"VR/" +#define PF_EXPINT_NAVI PF_EXP_INTR"Navi/" +#define PF_EXPINT_TFF PF_EXP_INTR"TFF/" +#define PF_EXPINT_OSS PF_EXP_INTR"OSS/" +#define PF_EXPINT_SMARTPHONE PF_EXP_INTR"Smartphone/" + +/* For RAMD */ +#define PF_RAMD_LOG PF_RAMD"log/" +#define PF_RAMD_BKUP PF_RAMD"bkup/" + +#define PF_RAMD_AWLOG PF_RAMD_LOG"awlog/" +#define PF_RAMD_AGLLOG PF_RAMD_LOG"agllog/" + +#define PF_RAMD_COMMUNICATION PF_RAMD_AGLLOG"communication/" +#define PF_RAMD_RADIO PF_RAMD_AGLLOG"radio/" +#define PF_RAMD_CONNECTIVITY PF_RAMD_AGLLOG"connectivity/" +#define PF_RAMD_DIAG PF_RAMD_AGLLOG"diag/" +#define PF_RAMD_SYSLOG PF_RAMD_AGLLOG"syslog/" +#define PF_RAMD_APPFW PF_RAMD_AGLLOG"appfw/" + + + +/* For Loopback */ +#define PF_MNTLOOP PF_ROOT"mnt_loop/" + +#define PF_MNTLOOP_AW0 PF_MNTLOOP"loopaw0/" +#define PF_MNTLOOP_AW1 PF_MNTLOOP"loopaw1/" +#define PF_MNTLOOP_AW2 PF_MNTLOOP"loopaw2/" +#define PF_MNTLOOP_AW3 PF_MNTLOOP"loopaw3/" +#define PF_MNTLOOP_AW4 PF_MNTLOOP"loopaw4/" +#define PF_MNTLOOP_AW5 PF_MNTLOOP"loopaw5/" +#define PF_MNTLOOP_AW6 PF_MNTLOOP"loopaw6/" +#define PF_MNTLOOP_AW7 PF_MNTLOOP"loopaw7/" +#define PF_MNTLOOP_AW8 PF_MNTLOOP"loopaw8/" +#define PF_MNTLOOP_AW9 PF_MNTLOOP"loopaw9/" +#define PF_MNTLOOP_AW10 PF_MNTLOOP"loopaw10/" +#define PF_MNTLOOP_AW11 PF_MNTLOOP"loopaw11/" +#define PF_MNTLOOP_AW12 PF_MNTLOOP"loopaw12/" +#define PF_MNTLOOP_AW13 PF_MNTLOOP"loopaw13/" +#define PF_MNTLOOP_AW14 PF_MNTLOOP"loopaw14/" +#define PF_MNTLOOP_AW15 PF_MNTLOOP"loopaw15/" +#define PF_MNTLOOP_AW16 PF_MNTLOOP"loopaw16/" +#define PF_MNTLOOP_AW17 PF_MNTLOOP"loopaw17/" +#define PF_MNTLOOP_AW18 PF_MNTLOOP"loopaw18/" +#define PF_MNTLOOP_AW19 PF_MNTLOOP"loopaw19/" +#define PF_MNTLOOP_AW20 PF_MNTLOOP"loopaw20/" + +/* For Tmpfs mount */ +#define PF_MNTTMPFS PF_ROOT"mnt_tmpfs/" +#define PF_MNTTMPFS_AW0 PF_MNTTMPFS"tmpfsaw0/" + + +/* DONT USE FOLLOWING DEFINITION !! */ +/* These will be deleted in the future */ + +#define PF_NV_P3 PF_NV"p3/" +#define PF_NV_P4 PF_NV"p4/" +#define PF_NV_P5 PF_NV"p5/" +#define PF_NV_P6 PF_NV"p6/" + +#define PF_NPP PF_NV_P3"npp/" +#define PF_BS PF_NV_P3"bs/" + +#define DOM__CWORD8_ "_CWORD8_" +#define DOM_BLUETOOTH "bluetooth" +#define DOM_VR "vr" +#define DOM_ENTUNE "entune" + +#define PF_RAMD_GRAPHICS PF_RAMD_BKUP"graphics/" + +#define PF_EXPINT_TRAFFIC PF_EXP_INTR"Traffic/" + +#endif/* _AGL_PATH_H_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/sm_launch_conf.h b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/sm_launch_conf.h new file mode 100755 index 00000000..d444eb0f --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/include/sm_launch_conf.h @@ -0,0 +1,1385 @@ +/* + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __AGL_THREAD_H__ +#define __AGL_THREAD_H__ + +//MACRO +#define PR_TSS_S "0" +#define PR_TSS 0 + +/* + Main thread name. It need to be same as service name in sm_launch.xml or tskm_launch.xml + Max name length is 15 + #define MN_XXXXX "MainName" + + Thread name + Max name length is 15 + #define TN_XXXXX "ThreadName" + + Thread priority 0:TSS 1-99:FIFO + #define PR_XXXXX_S "(0-99)" //for xml + #define PR_XXXXX 0-99 //for program +*/ + +#define MN_SS_SYSMANAGER "SS_SysManager" +#define PR_SS_SYSMANAGER_S "0" +#define PR_SS_SYSMANAGER (0) + + #define TN_SMHEARTBEAT "SM.Heartbeat" + #define PR_SMHEARTBEAT_S "0" + #define PR_SMHEARTBEAT (0) + + #define TN_SMPROCLAUNCH "SM.ProcLaunch" + #define PR_SMPROCLAUNCH_S "0" + #define PR_SMPROCLAUNCH (0) + + #define TN_SMLOWMEMMON "SM.LowMemMon" + #define PR_SMLOWMEMMON_S "0" + #define PR_SMLOWMEMMON (0) + + #define TN_LOGGERRTIME "LoggerRtime" + #define PR_LOGGERRTIME_S PR_TSS_S + #define PR_LOGGERRTIME PR_TSS + + +//======= exec from system manager ============= +#define MN_NS_SHAREDMEM "NS_SharedMem" +#define PR_NS_SHAREDMEM_S "0" +#define PR_NS_SHAREDMEM (0) + + +#define MN_NS_NPPSERVICE "NS_NPPService" +#define PR_NS_NPPSERVICE_S "0" +#define PR_NS_NPPSERVICE (0) + + #define TN_NS_NPPREADWKR "NS_NPPReadWkr" + #define PR_NS_NPPREADWKR_S "0" + #define PR_NS_NPPREADWKR (0) + + #define TN_NS_NPPWRITEWKR "NS_NPPWriteWkr" + #define PR_NS_NPPWRITEWKR_S "0" + #define PR_NS_NPPWRITEWKR (0) + + #define TN_NS_NPPIPWKR "NS_NPPIPWkr" + #define PR_NS_NPPIPWKR_S "0" + #define PR_NS_NPPIPWKR (0) + +#define MN_NS_BACKUPMGR "NS_BackupMgr" +#define PR_NS_BACKUPMGR_S "0" +#define PR_NS_BACKUPMGR (0) + + #define TN_NS_BKUPNAND "NS_BkupNAND" + #define PR_NS_BKUPNAND_S "0" + #define PR_NS_BKUPNAND (0) + + #define TN_NS_BKUPDELAY "NS_BkupDelay" + #define PR_NS_BKUPDELAY_S "0" + #define PR_NS_BKUPDELAY (0) + +#define MN_SS_DEVDETECTSRV "SS_DevDetectSrv" +#define PR_SS_DEVDETECTSRV_S "0" +#define PR_SS_DEVDETECTSRV (0) + + #define TN_SS_DETECT_USB "SS_Detect_USB" + #define PR_SS_DETECT_USB_S "0" + #define PR_SS_DETECT_USB (0) + + #define TN_SS_DETECT_SD "SS_Detect_SD" + #define PR_SS_DETECT_SD_S "0" + #define PR_SS_DETECT_SD (0) + + #define TN_SS_MONITOR_OVC "SS_Monitor_OVC" + #define PR_SS_MONITOR_OVC_S "0" + #define PR_SS_MONITOR_OVC (0) + +#define MN_SS_LOGGERSRV "SS_LoggerSrv" +#define PR_SS_LOGGERSRV_S PR_TSS_S +#define PR_SS_LOGGERSRV PR_TSS + + #define TN_PDGLOGQUER "pdg.LogQueR" + #define PR_PDGLOGQUER_S PR_TSS_S + #define PR_PDGLOGQUER PR_TSS + + #define TN_PDGTRANSQUER "pdg.TransQueR" + #define PR_PDGTRANSQUER_S PR_TSS_S + #define PR_PDGTRANSQUER PR_TSS + + #define TN_PDGEVNTLOGQUE "pdg.EvntLogQue" + #define PR_PDGEVNTLOGQUE_S PR_TSS_S + #define PR_PDGEVNTLOGQUE PR_TSS + + #define TN_SSLOGGERSTRAGE "SSLoggerStrage" + #define PR_SSLOGGERSTRAGE_S PR_TSS_S + #define PR_SSLOGGERSTRAGE PR_TSS + + #define TN_PFDRECTHREAD "PFDRECThread" + #define PR_PFDRECTHREAD_S PR_TSS_S + #define PR_PFDRECTHREAD PR_TSS + +#define MN_PS_LOGGERSHADOW "PS_LoggerShadow" + #define PR_PSLOGGERSHADOW_S PR_TSS_S + #define PR_PSLOGGERSHADOW PR_TSS + +#define MN_UDEVD "udevd" +#define PR_UDEVD_S "1" +#define PR_UDEVD (1) + +#define MN_COMMUNICATION "Communication" +#define PR_COMMUNICATION_S "0" +#define PR_COMMUNICATION (0) + + #define TN_DEV_SYSCOM_TMR "DEV_SYSCOM_TMR" + #define PR_DEV_SYSCOM_TMR_S "0" + #define PR_DEV_SYSCOM_TMR (0) + + #define TN_DEV_SYSCOM_RCV "DEV_SYSCOM_RCV" + #define PR_DEV_SYSCOM_RCV_S "0" + #define PR_DEV_SYSCOM_RCV (0) + + #define TN_DEV_SYSCOM_MAIN "DEV_SYSCOM_MAIN" + #define PR_DEV_SYSCOM_MAIN_S "0" + #define PR_DEV_SYSCOM_MAIN (0) + + #define TN_TGWCOM "TGWCOM" + #define PR_TGWCOM_S "0" + #define PR_TGWCOM (0) + + #define TN__CWORD83_ "_CWORD83_" + #define PR__CWORD83__S "0" + #define PR__CWORD83_ (0) + + #define TN_CAN_COM_PROT "CAN_COM_PROT" + #define PR_CAN_COM_PROT_S "0" + #define PR_CAN_COM_PROT (0) + +#define MN_PS_PSMSHADOW "PS_PSMShadow" +#define PR_PS_PSMSHADOW_S "0" +#define PR_PS_PSMSHADOW (0) + +#define MN_COMMSH4A "CommSH4A" +#define PR_COMMSH4A_S "0" +#define PR_COMMSH4A (0) + + #define TN_DEV_SH4A_SND "DEV_SH4ACOM_SND" + #define PR_DEV_SH4A_SND_S "0" + #define PR_DEV_SH4A_SND (0) + + #define TN_DEV_SH4A_RCV "DEV_SH4ACOM_RCV" + #define PR_DEV_SH4A_RCV_S "0" + #define PR_DEV_SH4A_RCV (0) + + #define TN_DEV_SH4A_MON "DEV_SH4ACOM_MON" + #define PR_DEV_SH4A_MON_S "0" + #define PR_DEV_SH4A_MON (0) + +#define MN_PS_COMMUSB "PS_CommUSB" +#define PR_PS_COMMUSB_S "0" +#define PR_PS_COMMUSB (0) + + #define TN_COMMUSB_RCV "COMMUSB_RCV" + #define PR_COMMUSB_RCV_S "0" + #define PR_COMMUSB_RCV (0) + + #define TN_COMMUSB_DIAG "COMMUSB_DIAG" + #define PR_COMMUSB_DIAG_S "0" + #define PR_COMMUSB_DIAG (0) + +#define MN_PS_CANGW_M "CANGW_M" +#define PR_PS_CANGW_M_S PR_TSS_S +#define PR_PS_CANGW_M PR_TSS + + #define TN_CANGW_M_RCV "CANGW_M_RCV" + #define PR_CANGW_M_RCV_S PR_TSS_S + #define PR_CANGW_M_RCV PR_TSS + + #define TN_CANGW_M_DIAG "CANGW_M_DIAG" + #define PR_CANGW_M_DIAG_S PR_TSS_S + #define PR_CANGW_M_DIAG PR_TSS + +#define MN_PS_CANGW_S "CANGW_S" +#define PR_PS_CANGW_S_S PR_TSS_S +#define PR_PS_CANGW_S PR_TSS + + #define TN_CANGW_S_SND "CANGW_S_SND" + #define PR_CANGW_S_SND_S PR_TSS_S + #define PR_CANGW_S_SND PR_TSS + + #define TN_CANGW_S_DIAG "CANGW_S_DIAG" + #define PR_CANGW_S_DIAG_S PR_TSS_S + #define PR_CANGW_S_DIAG PR_TSS + +#define MN_LANSERVER "LanServer" +#define PR_LANSERVER_S "0" +#define PR_LANSERVER (0) + +#define MN_PS_CDR "ps_cdr" +#define PR_PS_CDR_S PR_TSS_S +#define PR_PS_CDR PR_TSS + + #define TN_PS_CDR_NBD "ps_cdr_nbd" + #define PR_PS_CDR_NBD_S PR_TSS_S + #define PR_PS_CDR_NBD PR_TSS + + #define TN_PS_CDR_DOIT "ps_cdr_doit" + #define PR_PS_CDR_DOIT_S PR_TSS_S + #define PR_PS_CDR_DOIT PR_TSS + + #define TN_PS_CDR_READ "ps_cdr_read" + #define PR_PS_CDR_READ_S PR_TSS_S + #define PR_PS_CDR_READ PR_TSS + +#define MN_POSITIONING "Positioning" +#define PR_POSITIONING_S PR_TSS_S +#define PR_POSITIONING PR_TSS + + #define TN_POSITIONING_GPS_MAIN "POS_Main" + #define PR_POSITIONING_GPS_MAIN_S PR_TSS_S + #define PR_POSITIONING_GPS_MAIN PR_TSS + + #define TN_POSITIONING_GPS_RECV "POS_Gps_Recv" + #define PR_POSITIONING_GPS_RECV_S PR_TSS_S + #define PR_POSITIONING_GPS_RECV PR_TSS + + #define TN_POSITIONING_GPS "POS_Gps" + #define PR_POSITIONING_GPS_S PR_TSS_S + #define PR_POSITIONING_GPS PR_TSS + + #define TN_POSITIONING_SENS "POS_Sens" + #define PR_POSITIONING_SENS_S PR_TSS_S + #define PR_POSITIONING_SENS PR_TSS + + #define TN_POSITIONING_GPS_ROLOVR "POS_Gps_Rolovr" + #define PR_POSITIONING_GPS_ROLOVR_S PR_TSS_S + #define PR_POSITIONING_GPS_ROLOVR PR_TSS + +#define MN_CLOCK "clock" +#define PR_CLOCK_S "0" +#define PR_CLOCK (0) + + #define TN_CLOCK_MNG "ClockMng" + #define PR_CLOCK_MNG_S "0" + #define PR_CLOCK_MNG (0) + +#define MN_VEHICLE "vehicle" +#define PR_VEHICLE_S "0" +#define PR_VEHICLE (0) + + #define TN_VEHICLE_SENS "VehicleSens" + #define PR_VEHICLE_SENS_S "0" + #define PR_VEHICLE_SENS (0) + + #define TN_LINE_SENS_DRV "LineSensDrv" + #define PR_LINE_SENS_DRV_S "0" + #define PR_LINE_SENS_DRV (0) + +#define MN_SS_POWERSERVICE "SS_PowerService" +#define PR_SS_POWERSERVICE_S "0" +#define PR_SS_POWERSERVICE (0) + +#define MN_SS_TASKMANAGER "SS_TaskManager" +#define PR_SS_TASKMANAGER_S "0" +#define PR_SS_TASKMANAGER (0) + + #define TN_SS_TSKMTIMER "SS_TskmTimer" + #define PR_SS_TSKMTIMER_S "0" + #define PR_SS_TSKMTIMER (0) + +#define MN_SOUND "Sound" +#define PR_SOUND_S "0" +#define PR_SOUND (0) + + #define TN_VG_SNDSRCMGR "VG_SNDSRCMGR" + #define PR_VG_SNDSRCMGR_S "0" + #define PR_VG_SNDSRCMGR (0) + + #define TN_SND_INPUTCTRL "SND_INPUTCTRL" + #define PR_SND_INPUTCTRL_S "0" + #define PR_SND_INPUTCTRL (0) + + #define TN_SND_DEVCTRL "SND_DEVCTRL" + #define PR_SND_DEVCTRL_S "0" + #define PR_SND_DEVCTRL (0) + + #define TN_SND_VCETRFCTRL "SND_VCETRFCTRL" + #define PR_SND_VCETRFCTRL_S "0" + #define PR_SND_VCETRFCTRL (0) + + #define TN_SND_VCETRFWRT1 "SND_VCETRFWRT1" + #define PR_SND_VCETRFWRT1_S "0" + #define PR_SND_VCETRFWRT1 (0) + + #define TN_SND_VCETRFWRT2 "SND_VCETRFWRT2" + #define PR_SND_VCETRFWRT2_S "0" + #define PR_SND_VCETRFWRT2 (0) + + #define TN_VG_SNDCTRL_BSCF "VG_SNDCTRL_BSCF" + #define PR_VG_SNDCTRL_BSCF_S "0" + #define PR_VG_SNDCTRL_BSCF (0) + + #define TN_VG_SNDCTRL_BSCR "VG_SNDCTRL_BSCR" + #define PR_VG_SNDCTRL_BSCR_S "0" + #define PR_VG_SNDCTRL_BSCR (0) + + #define TN_VG_SNDCTRL_ITRT "VG_SNDCTRL_ITRT" + #define PR_VG_SNDCTRL_ITRT_S "0" + #define PR_VG_SNDCTRL_ITRT (0) + + #define TN_CVRS_OPRT_OUT_1 "CVRS_OPRT_OUT_1" + #define PR_CVRS_OPRT_OUT_1_S "0" + #define PR_CVRS_OPRT_OUT_1 (0) + + #define TN_CVRS_OPRT_OUT_2 "CVRS_OPRT_OUT_2" + #define PR_CVRS_OPRT_OUT_2_S "0" + #define PR_CVRS_OPRT_OUT_2 (0) + + #define TN_CVRS_OPRT_OUT_3 "CVRS_OPRT_OUT_3" + #define PR_CVRS_OPRT_OUT_3_S "0" + #define PR_CVRS_OPRT_OUT_3 (0) + + #define TN_CVRS_OPRT_OUT_4 "CVRS_OPRT_OUT_4" + #define PR_CVRS_OPRT_OUT_4_S "0" + #define PR_CVRS_OPRT_OUT_4 (0) + + #define TN_CVRS_OPRT_IN_1 "CVRS_OPRT_IN_1" + #define PR_CVRS_OPRT_IN_1_S "0" + #define PR_CVRS_OPRT_IN_1 (0) + + #define TN_CVRS_OPRT_IN_2 "CVRS_OPRT_IN_2" + #define PR_CVRS_OPRT_IN_2_S "0" + #define PR_CVRS_OPRT_IN_2 (0) + + #define TN_CVRS_OPRT_IN_3 "CVRS_OPRT_IN_3" + #define PR_CVRS_OPRT_IN_3_S "0" + #define PR_CVRS_OPRT_IN_3 (0) + + #define TN_CVRS_OPRT_IN_4 "CVRS_OPRT_IN_4" + #define PR_CVRS_OPRT_IN_4_S "0" + #define PR_CVRS_OPRT_IN_4 (0) + + #define TN_CVRS_OPRT_IN_5 "CVRS_OPRT_IN_5" + #define PR_CVRS_OPRT_IN_5_S "0" + #define PR_CVRS_OPRT_IN_5 (0) + + #define TN_CVRS_OPRT_IN_6 "CVRS_OPRT_IN_6" + #define PR_CVRS_OPRT_IN_6_S "0" + #define PR_CVRS_OPRT_IN_6 (0) + + #define TN_CVRS_OPRT_IN_7 "CVRS_OPRT_IN_7" + #define PR_CVRS_OPRT_IN_7_S "0" + #define PR_CVRS_OPRT_IN_7 (0) + + #define TN_CVRS_OPRT_IN_8 "CVRS_OPRT_IN_8" + #define PR_CVRS_OPRT_IN_8_S "0" + #define PR_CVRS_OPRT_IN_8 (0) + + #define TN_CVRS_OPRT_BS_I "CVRS_OPRT_BS_I" + #define PR_CVRS_OPRT_BS_I_S "0" + #define PR_CVRS_OPRT_BS_I (0) + + #define TN_VR_NVR_RECO "VR_NVR_RECO" + #define PR_VR_NVR_RECO_S "0" + #define PR_VR_NVR_RECO (0) + + #define TN_SND_ECNR "SND_ECNR" + #define PR_SND_ECNR_S "0" + #define PR_SND_ECNR (0) + + #define TN_SNDAGENT_000 "SNDAGENT_000" + #define PR_SNDAGENT_000_S "0" + #define PR_SNDAGENT_000 (0) + + #define TN_SNDAGENT_001 "SNDAGENT_001" + #define PR_SNDAGENT_001_S "0" + #define PR_SNDAGENT_001 (0) + + #define TN_SNDAGENT_002 "SNDAGENT_002" + #define PR_SNDAGENT_002_S "0" + #define PR_SNDAGENT_002 (0) + + #define TN_SNDAGENT_003 "SNDAGENT_003" + #define PR_SNDAGENT_003_S "0" + #define PR_SNDAGENT_003 (0) + + #define TN_SNDAGENT_004 "SNDAGENT_004" + #define PR_SNDAGENT_004_S "0" + #define PR_SNDAGENT_004 (0) + + #define TN_SNDAGENT_005 "SNDAGENT_005" + #define PR_SNDAGENT_005_S "0" + #define PR_SNDAGENT_005 (0) + + #define TN_SNDAGENT_006 "SNDAGENT_006" + #define PR_SNDAGENT_006_S "0" + #define PR_SNDAGENT_006 (0) + + #define TN_SNDAGENT_007 "SNDAGENT_007" + #define PR_SNDAGENT_007_S "0" + #define PR_SNDAGENT_007 (0) + + #define TN_SNDAGENT_008 "SNDAGENT_008" + #define PR_SNDAGENT_008_S "0" + #define PR_SNDAGENT_008 (0) + + #define TN_SNDAGENT_009 "SNDAGENT_009" + #define PR_SNDAGENT_009_S "0" + #define PR_SNDAGENT_009 (0) + + #define TN_SNDAGENT_010 "SNDAGENT_010" + #define PR_SNDAGENT_010_S "0" + #define PR_SNDAGENT_010 (0) + + #define TN_SNDAGENT_011 "SNDAGENT_011" + #define PR_SNDAGENT_011_S "0" + #define PR_SNDAGENT_011 (0) + + #define TN_SNDAGENT_012 "SNDAGENT_012" + #define PR_SNDAGENT_012_S "0" + #define PR_SNDAGENT_012 (0) + + #define TN_SNDAGENT_013 "SNDAGENT_013" + #define PR_SNDAGENT_013_S "0" + #define PR_SNDAGENT_013 (0) + + #define TN_SNDAGENT_014 "SNDAGENT_014" + #define PR_SNDAGENT_014_S "0" + #define PR_SNDAGENT_014 (0) + + #define TN_SNDAGENT_015 "SNDAGENT_015" + #define PR_SNDAGENT_015_S "0" + #define PR_SNDAGENT_015 (0) + + #define TN_SNDAGENT_016 "SNDAGENT_016" + #define PR_SNDAGENT_016_S "0" + #define PR_SNDAGENT_016 (0) + + #define TN_SNDAGENT_017 "SNDAGENT_017" + #define PR_SNDAGENT_017_S "0" + #define PR_SNDAGENT_017 (0) + + #define TN_SNDAGENT_018 "SNDAGENT_018" + #define PR_SNDAGENT_018_S "0" + #define PR_SNDAGENT_018 (0) + + #define TN_SNDAGENT_019 "SNDAGENT_019" + #define PR_SNDAGENT_019_S "0" + #define PR_SNDAGENT_019 (0) + + #define TN_SNDAGENT_020 "SNDAGENT_020" + #define PR_SNDAGENT_020_S "0" + #define PR_SNDAGENT_020 (0) + + #define TN_SNDAGENT_021 "SNDAGENT_021" + #define PR_SNDAGENT_021_S "0" + #define PR_SNDAGENT_021 (0) + + #define TN_SNDAGENT_022 "SNDAGENT_022" + #define PR_SNDAGENT_022_S "0" + #define PR_SNDAGENT_022 (0) + + #define TN_SNDAGENT_023 "SNDAGENT_023" + #define PR_SNDAGENT_023_S "0" + #define PR_SNDAGENT_023 (0) + + #define TN_SNDAGENT_024 "SNDAGENT_024" + #define PR_SNDAGENT_024_S "0" + #define PR_SNDAGENT_024 (0) + + #define TN_SNDAGENT_025 "SNDAGENT_025" + #define PR_SNDAGENT_025_S "0" + #define PR_SNDAGENT_025 (0) + +#define MN_SS_RESOURCEMGR "SS_ResourceMgr" +#define PR_SS_RESOURCEMGR_S "0" +#define PR_SS_RESOURCEMGR (0) + + #define TN_RESOURCEHWDT "ResourceHWDT" + #define PR_RESOURCEHWDT_S "0" + #define PR_RESOURCEHWDT (0) + +#define MN_AS_AUDIOMANAGER "AS_AudioManager" +#define PR_AS_AUDIOMANAGER_S PR_TSS_S +#define PR_AS_AUDIOMANAGER PR_TSS + + #define TN_AS_SOUNDBEEP "AS_SoundBeep" + #define PR_AS_SOUNDBEEP_S PR_TSS_S + #define PR_AS_SOUNDBEEP PR_TSS + +#define MN_GRAPHICS "Graphics" +#define PR_GRAPHICS_S "0" +#define PR_GRAPHICS (0) + + #define TN_GR_MAIN_CTRL "Graphics_main" + #define PR_GR_MAIN_CTRL_S PR_TSS_S + #define PR_GR_MAIN_CTRL PR_TSS + + #define TN_GR_SEQ_CTRL "Graphics_seq" + #define PR_GR_SEQ_CTRL_S PR_TSS_S + #define PR_GR_SEQ_CTRL PR_TSS + + #define TN_GR_DEV_RCV_CTRL "Graphics_rcv" + #define PR_GR_DEV_RCV_CTRL_S PR_TSS_S + #define PR_GR_DEV_RCV_CTRL PR_TSS + + #define TN_GR_VCAP1_CTRL "Graphics_cap1" + #define PR_GR_VCAP1_CTRL_S "0" + #define PR_GR_VCAP1_CTRL (0) + + #define TN_GR_VCAP2_CTRL "Graphics_cap2" + #define PR_GR_VCAP2_CTRL_S "0" + #define PR_GR_VCAP2_CTRL (0) + +#define MN_VUPSERVICE "vupservice" +#define PR_VUPSERVICE_S PR_TSS_S +#define PR_VUPSERVICE PR_TSS + +#define MN_SS_UPDATESERVICE "UpdateService" +#define PR_SS_UPDATESERVICE_S PR_TSS_S +#define PR_SS_UPDATESERVICE PR_TSS + + #define TN_UPSERVICE_VERI "t_update_veri" + #define PR_UPSERVICE_VERI_S PR_TSS_S + #define PR_UPSERVICE_VERI PR_TSS + +#define MN_NW_MICSERVICE "NW_MicService" +#define PR_NW_MICSERVICE_S PR_TSS_S +#define PR_NW_MICSERVICE PR_TSS + +#define MN_NS_LOCKMGR "LockMgr" +#define PR_NS_LOCKMGR_S PR_TSS_S +#define PR_NS_LOCKMGR PR_TSS + +#define MN_PS_SWITCHHANDLER "SwitchHandler" +#define PR_PS_SWITCHHANDLER_S "0" +#define PR_PS_SWITCHHANDLER (0) + +#define MN_SS_WINSYS "SS_WinSys" +#define PR_SS_WINSYS_S "0" +#define PR_SS_WINSYS 0 + +#define MN_MODEMANAGER "modemanager" +#define PR_MODEMANAGER_S PR_TSS_S +#define PR_MODEMANAGER PR_TSS + +#define MN_BTSTACKMAIN "btstackmain" +#define PR_BTSTACKMAIN_S PR_TSS_S +#define PR_BTSTACKMAIN PR_TSS + +#define MN_MEDIASERVICE "MediaService" +#define PR_MEDIASERVICE_S PR_TSS_S +#define PR_MEDIASERVICE PR_TSS + +// REPRO START +#define MN_REPROSERVICE "ReproService" +#define PR_REPROSERVICE_S PR_TSS_S +#define PR_REPROSERVICE PR_TSS + + #define TN_REPROSEQUENCER "RPRS_Sequencer" + #define PR_REPROSEQUENCER_S PR_TSS_S + #define PR_REPROSEQUENCER PR_TSS + + #define TN_REPROCTRL "RPRS_Control" + #define PR_REPROCTRL_S PR_TSS_S + #define PR_REPROCTRL PR_TSS + + #define TN_REPROCENTERCOMM "RPRS_CenterComm" + #define PR_REPROCENTERCOMM_S PR_TSS_S + #define PR_REPROCENTERCOMM PR_TSS + + #define TN_REPROUNITCOMM "RPRS_UnitComm" + #define PR_REPROUNITCOMM_S PR_TSS_S + #define PR_REPROUNITCOMM PR_TSS + + #define TN_REPROWEBDAVMGR "RPRS_WebDAVMgr" + #define PR_REPROWEBDAVMGR_S PR_TSS_S + #define PR_REPROWEBDAVMGR PR_TSS + +#define MN_REPROAENDTEST "Repro_Testpro_Sender" +#define PR_REPROAENDTEST_S PR_TSS_S +#define PR_REPROAENDTEST PR_TSS + + #define TN_REPROAENDTESTTN "Repro_TestproT" + #define PR_REPROAENDTESTTN_S PR_TSS_S + #define PR_REPROAENDTESTTN PR_TSS + +#define MN_REPROBACKVUP "BackVupCtrl" +#define PR_REPROBACKVUP_S PR_TSS_S +#define PR_REPROBACKVUP PR_TSS + +#define MN_REPRODEVELOP "DevReproService" +#define PR_REPRODEVELOP_S PR_TSS_S +#define PR_REPRODEVELOP PR_TSS +// REPRO END + + #define TN_MED_MMCOM_PLAY "mmcom_play" + #define PR_MED_MMCOM_PLAY_S PR_TSS_S + #define PR_MED_MMCOM_PLAY PR_TSS + + #define TN_MED_MMCOM_MEDIA "mmcom_media" + #define PR_MED_MMCOM_MEDIA_S PR_TSS_S + #define PR_MED_MMCOM_MEDIA PR_TSS + + #define TN_MED_MMCOM_DB "mmcom_db" + #define PR_MED_MMCOM_DB_S PR_TSS_S + #define PR_MED_MMCOM_DB PR_TSS + + #define TN_MED_MMCOM_LIST "mmcom_list" + #define PR_MED_MMCOM_LIST_S PR_TSS_S + #define PR_MED_MMCOM_LIST PR_TSS + + #define TN_MED_MMCOM_DBUSB "mmcom_dbusb" + #define PR_MED_MMCOM_DBUSB_S PR_TSS_S + #define PR_MED_MMCOM_DBUSB PR_TSS + + #define TN_MED_MMCOM_DBSD "mmcom_dbsd" + #define PR_MED_MMCOM_DBSD_S PR_TSS_S + #define PR_MED_MMCOM_DBSD PR_TSS + + #define TN_MED_MMCOM_DBCD "mmcom_dbcd" + #define PR_MED_MMCOM_DBCD_S PR_TSS_S + #define PR_MED_MMCOM_DBCD PR_TSS + + #define TN_MED_MMCOM_PLAYRCV "mmcom_playrcv" + #define PR_MED_MMCOM_PLAYRCV_S PR_TSS_S + #define PR_MED_MMCOM_PLAYRCV PR_TSS + + #define TN_MED_RIPCOM_MNG "MngRipComm" + #define PR_MED_RIPCOM_MNG_S PR_TSS_S + #define PR_MED_RIPCOM_MNG PR_TSS + + #define TN_MED_RIPCOM_EXE01 "ExeRipComm01" + #define PR_MED_RIPCOM_EXE01_S PR_TSS_S + #define PR_MED_RIPCOM_EXE01 PR_TSS + + #define TN_MED_RIPCOM_EXE02 "ExeRipComm02" + #define PR_MED_RIPCOM_EXE02_S PR_TSS_S + #define PR_MED_RIPCOM_EXE02 PR_TSS + + #define TN_MED_DISCCOM_MAIN "disccom_main" + #define PR_MED_DISCCOM_MAIN_S PR_TSS_S + #define PR_MED_DISCCOM_MAIN PR_TSS + + #define TN_MED_DISCCOM_DB "disccom_db" + #define PR_MED_DISCCOM_DB_S PR_TSS_S + #define PR_MED_DISCCOM_DB PR_TSS + +#define MN_PLAYBACKSERVICE "PlaybackService" +#define PR_PLAYBACKSERVICE_S PR_TSS_S +#define PR_PLAYBACKSERVICE PR_TSS + + #define TN_PLAYSRV_AUDIO "playsrv_audio" + #define PR_PLAYSRV_AUDIO_S PR_TSS_S + #define PR_PLAYSRV_AUDIO PR_TSS + + #define TN_PLAYSRV_RIP "playsrv_rip" + #define PR_PLAYSRV_RIP_S PR_TSS_S + #define PR_PLAYSRV_RIP PR_TSS + + #define TN_PLAYSRV_PLAY "playsrv_play" + #define PR_PLAYSRV_PLAY_S PR_TSS_S + #define PR_PLAYSRV_PLAY PR_TSS + + #define TN_PLAYSRV_DISC "playsrv_disc" + #define PR_PLAYSRV_DISC_S PR_TSS_S + #define PR_PLAYSRV_DISC PR_TSS + + #define TN_PLAYSRV_ARTWORK "playsrv_artwork" + #define PR_PLAYSRV_ARTWORK_S PR_TSS_S + #define PR_PLAYSRV_ARTWORK PR_TSS + +#define MN_DISCSERVICE "DiscService" +#define PR_DISCSERVICE_S PR_TSS_S +#define PR_DISCSERVICE PR_TSS + +#define MN_RADIOSERVICE "RadioService" +#define PR_RADIOSERVICE_S PR_TSS_S +#define PR_RADIOSERVICE PR_TSS + +#define MN_RADIOHDARBITER "RadioHDArbiter" +#define PR_RADIOHDARBITER_S "0" +#define PR_RADIOHDARBITER (0) + +#define MN_HRDS_MANAGER "hrds_manager" +#define PR_HRDS_MANAGER_S PR_TSS_S +#define PR_HRDS_MANAGER PR_TSS + + #define TN_HRDS_HDMNG "hrds_hdmng" + #define PR_HRDS_HDMNG_S PR_TSS_S + #define PR_HRDS_HDMNG PR_TSS + + #define TN_HRDS_HDDEC "hrds_hddec" + #define PR_HRDS_HDDEC_S PR_TSS_S + #define PR_HRDS_HDDEC PR_TSS + + #define TN_HRDS_WEBMNG "hrds_webmng" + #define PR_HRDS_WEBMNG_S PR_TSS_S + #define PR_HRDS_WEBMNG PR_TSS + + #define TN_HRDS_WEBCOM "hrds_webcom" + #define PR_HRDS_WEBCOM_S PR_TSS_S + #define PR_HRDS_WEBCOM PR_TSS + +#define MN_BT_CONNECTIONSERVICE "BT_CnctSrv" +#define PR_BT_CONNECTIONSERVICE_S PR_TSS_S +#define PR_BT_CONNECTIONSERVICE PR_TSS + +#define MN_BT_PHONESERVICE "BT_PhoneSrv" +#define PR_BT_PHONESERVICE_S PR_TSS_S +#define PR_BT_PHONESERVICE PR_TSS + +#define MN_BT_PHONEBOOKSERVICE "BT_PbkSrv" +#define PR_BT_PHONEBOOKSERVICE_S PR_TSS_S +#define PR_BT_PHONEBOOKSERVICE PR_TSS + +#define MN_BT_MESSAGINGSERVICE "BT_MsgSrv" +#define PR_BT_MESSAGINGSERVICE_S PR_TSS_S +#define PR_BT_MESSAGINGSERVICE PR_TSS + +#define MN_BT_BLLSERVICE "TEL_BLLSrv" +#define PR_BT_BLLSERVICE_S PR_TSS_S +#define PR_BT_BLLSERVICE PR_TSS + +#define MN_BT_DCMPHONESERVICE "DCM_PhoneSrv" +#define PR_BT_DCMPHONESERVICE_S PR_TSS_S +#define PR_BT_DCMPHONESERVICE PR_TSS + + #define TN_BT_CONSRV_HFPMULTIQ1 "HFPMultiQ1" + #define PR_TN_BT_CONSRV_HFPMULTIQ1_S PR_TSS_S + #define PR_TN_BT_CONSRV_HFPMULTIQ1 PR_TSS + + #define TN_BT_CONSRV_HFPMULTIQ2 "HFPMultiQ2" + #define PR_TN_BT_CONSRV_HFPMULTIQ2_S PR_TSS_S + #define PR_TN_BT_CONSRV_HFPMULTIQ2 PR_TSS + + #define TN_BT_PBKSRV_DATABASE "BTPB_Database" + #define PR_TN_BT_PBKSRV_DATABASE_S PR_TSS_S + #define PR_TN_BT_PBKSRV_DATABASE PR_TSS + + #define TN_BT_PBKSRV_LOCALPBINST "LocalPBINST" + #define PR_TN_BT_PBKSRV_LOCALPBINST_S PR_TSS_S + #define PR_TN_BT_PBKSRV_LOCALPBINST PR_TSS + + #define TN_BT_PBKSRV_RESOLVENAME "ResolveName" + #define PR_TN_BT_PBKSRV_RESOLVENAME_S PR_TSS_S + #define PR_TN_BT_PBKSRV_RESOLVENAME PR_TSS + + #define TN_BT_PBKSRV_PBAPMULTIQ1 "PBAPMultiQ1" + #define PR_TN_BT_PBKSRV_PBAPMULTIQ1_S PR_TSS_S + #define PR_TN_BT_PBKSRV_PBAPMULTIQ1 PR_TSS + + #define TN_BT_PBKSRV_OPPMULTI "OPPMulti" + #define PR_TN_BT_PBKSRV_OPPMULTI_S PR_TSS_S + #define PR_TN_BT_PBKSRV_OPPMULTI PR_TSS + + #define TN_BT_PBKSRV_VCARDPARSER "VCardParser" + #define PR_TN_BT_PBKSRV_VCARDPARSER_S PR_TSS_S + #define PR_TN_BT_PBKSRV_VCARDPARSER PR_TSS + + #define TN_BT_MSGSRV_MSGCNTRLTHREAD0 "MsgCntrlThread0" + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD0_S PR_TSS_S + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD0 PR_TSS + + #define TN_BT_MSGSRV_MSGCNTRLTHREAD1 "MsgCntrlThread1" + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD1_S PR_TSS_S + #define PR_TN_BT_MSGSRV_MSGCNTRLTHREAD1 PR_TSS + + #define TN_BT_MSGSRV_MAPMULTI "MapMulti" + #define PR_TN_BT_MSGSRV_MAPMULTI_S PR_TSS_S + #define PR_TN_BT_MSGSRV_MAPMULTI PR_TSS + +#define MN_DTVSERVICE "DtvService" +#define PR_DTVSERVICE_S PR_TSS_S +#define PR_DTVSERVICE PR_TSS + + #define TN_DTVTNC_TX "dtvtnc_tx" + #define PR_DTVTNC_TX_S PR_TSS_S + #define PR_DTVTNC_TX PR_TSS + + #define TN_DTVTNC_RCV "dtvtnc_rcv" + #define PR_DTVTNC_RCV_S PR_TSS_S + #define PR_DTVTNC_RCV PR_TSS + + #define TN_DTVTNC_TIMER "dtvtnc_timer" + #define PR_DTVTNC_TIMER_S PR_TSS_S + #define PR_DTVTNC_TIMER PR_TSS + + #define TN_DTVTNC_CTL "dtvtnc_ctl" + #define PR_DTVTNC_CTL_S PR_TSS_S + #define PR_DTVTNC_CTL PR_TSS + +#define MN_DTVVUPSERVICE "DtvVupService" +#define PR_DTVVUPSERVICE_S PR_TSS_S +#define PR_DTVVUPSERVICE PR_TSS + +#define MN_SETTINGSERVICE "SettingService" +#define PR_SETTINGSERVICE_S PR_TSS_S +#define PR_SETTINGSERVICE PR_TSS + +#define MN_INFOSETTINGSRV "InfoSettingSrv" +#define PR_INFOSETTINGSRV_S PR_TSS_S +#define PR_INFOSETTINGSRV PR_TSS + + #define TN_INFS_UIC "infs_uic" + #define PR_INFS_UIC_S PR_TSS_S + #define PR_INFS_UIC PR_TSS + +#define MN_DELPERSONALSRV "DelPersonalSrv" +#define PR_DELPERSONALSRV_S PR_TSS_S +#define PR_DELPERSONALSRV PR_TSS + +#define MN_MENUSERVICE "MenuService" +#define PR_MENUSERVICE_S PR_TSS_S +#define PR_MENUSERVICE PR_TSS + +#define MN_NAVIPROXY "NaviProxy" +#define PR_NAVIPROXY_S PR_TSS_S +#define PR_NAVIPROXY PR_TSS + +#define MN_AWBPROXY "AwbProxy" +#define PR_AWBPROXY_S PR_TSS_S +#define PR_AWBPROXY PR_TSS + +#define MN_TFFPROXY "TFFProxy" +#define PR_TFFPROXY_S PR_TSS_S +#define PR_TFFPROXY PR_TSS + +#define MN_TFFPROXYSLAVE "TFFProxySlave" +#define PR_TFFPROXYSLAVE_S PR_TSS_S +#define PR_TFFPROXYSLAVE PR_TSS + +#define MN_AWNPRIMARY "AwnPrimary" +#define PR_AWNPRIMARY_S PR_TSS_S +#define PR_AWNPRIMARY PR_TSS + +#define MN_AWBPRIMARY "AwbPrimary" +#define PR_AWBPRIMARY_S PR_TSS_S +#define PR_AWBPRIMARY PR_TSS + +#define MN_AWMPRIMARY "AwmPrimary" +#define PR_AWMPRIMARY_S PR_TSS_S +#define PR_AWMPRIMARY PR_TSS + +#define MN_AWTPRIMARY "AwtPrimary" +#define PR_AWTPRIMARY_S PR_TSS_S +#define PR_AWTPRIMARY PR_TSS + +#define MN_MISINKSERVICE "MisinkService" +#define PR_MISINKSERVICE_S PR_TSS_S +#define PR_MISINKSERVICE PR_TSS + +#define MN_TEXTCONVERTER "TextConverter" +#define PR_TEXTCONVERTER_S PR_TSS_S +#define PR_TEXTCONVERTER PR_TSS + +#define MN_HANDWRITING "HandWriting" +#define PR_HANDWRITING_S PR_TSS_S +#define PR_HANDWRITING PR_TSS + +#define MN_EXTUNITAUTH_D "EXTUNITAUTH_D" +#define PR_EXTUNITAUTH_D_S "0" +#define PR_EXTUNITAUTH_D 0 + + #define TN_VPSVC__CWORD84_ "VPSVC_D" + #define PR_VPSVC__CWORD84__S PR_TSS_S + #define PR_VPSVC__CWORD84_ PR_TSS + +#define MN_PROXYSERVICE "ProxyService" +#define PR_PROXYSERVICE_S PR_TSS_S +#define PR_PROXYSERVICE PR_TSS + +#define MN_FUELSERVICE "VS_FUCSrv" +#define PR_FUELSERVICE_S PR_TSS_S +#define PR_FUELSERVICE PR_TSS + +#define MN_ENERGYSERVICE "VS_ENMSrv" +#define PR_ENERGYSERVICE_S PR_TSS_S +#define PR_ENERGYSERVICE PR_TSS + +#define MN_CUSTOMIZESERVICE "VS_VSDSrv" +#define PR_CUSTOMIZESERVICE_S PR_TSS_S +#define PR_CUSTOMIZESERVICE PR_TSS + +#define MN_DMSSERVICE "VS_DMSSrv" +#define PR_DMSSERVICE_S PR_TSS_S +#define PR_DMSSERVICE PR_TSS + +#define MN_AIRCONSERVICE "VS_ACNSrv" +#define PR_AIRCONSERVICE_S PR_TSS_S +#define PR_AIRCONSERVICE PR_TSS + +#define MN_SEATSERVICE "VS_NMSSrv" +#define PR_SEATSERVICE_S PR_TSS_S +#define PR_SEATSERVICE PR_TSS + +#define MN_CAMERASERVICE "VS_CMRSrv" +#define PR_CAMERASERVICE_S PR_TSS_S +#define PR_CAMERASERVICE PR_TSS + + #define TN_CAMERAQUICKRVC "QuickRVCThread" + #define PR_CAMERAQUICKRVC_S PR_TSS_S + #define PR_CAMERAQUICKRVC PR_TSS + +#define MN_METSERVICE "VS_METSrv" +#define PR_METSERVICE_S PR_TSS_S +#define PR_METSERVICE PR_TSS + +#define MN_TMCSERVICE "VS_TMCSrv" +#define PR_TMCSERVICE_S PR_TSS_S +#define PR_TMCSERVICE PR_TSS + +#define MN_DASSERVICE "VS_DASSrv" +#define PR_DASSERVICE_S PR_TSS_S +#define PR_DASSERVICE PR_TSS + +#define MN_EXTUNITAUTH_M "EXTUNITAUTH_M" +#define PR_EXTUNITAUTH_M_S "0" +#define PR_EXTUNITAUTH_M 0 + +#define MN_DUMMYREAD "DummyRead" +#define PR_DUMMYREAD_S PR_TSS_S +#define PR_DUMMYREAD PR_TSS + +#define MN_SSTSERVICE "storage_access" +#define PR_SSTSERVICE_S PR_TSS_S +#define PR_SSTSERVICE PR_TSS + +#define MN_CCSAUDITD "ccs-auditd" +#define PR_CCSAUDITD_S PR_TSS_S +#define PR_CCSAUDITD PR_TSS + +//exec from task manager +#define MN_ACTIVITYMANAGER "ActivityManager" +#define PR_ACTIVITYMANAGER_S PR_TSS_S +#define PR_ACTIVITYMANAGER PR_TSS + +#define MN_RESIDENT_SVC "RESIDENT_SVC" +#define PR_RESIDENT_SVC_S PR_TSS_S +#define PR_RESIDENT_SVC PR_TSS + +#define MN_TRANSIENT_SVC "TRANSIENT_SVC" +#define PR_TRANSIENT_SVC_S PR_TSS_S +#define PR_TRANSIENT_SVC PR_TSS + +#define MN_WLANSERVICE "wlan_ctrl_0700" +#define PR_WLANSERVICE_S PR_TSS_S +#define PR_WLANSERVICE PR_TSS + +#define MN_WLANEVTTHR "WlanEvtThr" +#define PR_WLANEVTTHR_S PR_TSS_S +#define PR_WLANEVTTHR PR_TSS + +#define MN_WLANMIDDLESERVICE "WlanMiddle" +#define PR_WLANMIDDLESERVICE_S PR_TSS_S +#define PR_WLANMIDDLESERVICE PR_TSS + + #define TN_WLANMIDDLESERVICE0 "WM_MsgCtrlTh0" + #define PR_WLANMIDDLESERVICE0_S PR_TSS_S + #define PR_WLANMIDDLESERVICE0 PR_TSS + + #define TN_WLANMIDDLESERVICE1 "WM_MsgCtrlTh1" + #define PR_WLANMIDDLESERVICE1_S PR_TSS_S + #define PR_WLANMIDDLESERVICE1 PR_TSS + + #define TN_WLANMIDDLESERVICE2 "WM_MsgCtrlTh2" + #define PR_WLANMIDDLESERVICE2_S PR_TSS_S + #define PR_WLANMIDDLESERVICE2 PR_TSS + +#define MN_WLANSERVICE2 "wlan_ctrl_0701" +#define PR_WLANSERVICE2_S PR_TSS_S +#define PR_WLANSERVICE2 PR_TSS + +#define MN_WLANEVTTHR2 "WlanEvtThr2" +#define PR_WLANEVTTHR2_S PR_TSS_S +#define PR_WLANEVTTHR2 PR_TSS + +//exec from task manager, Test for vup +#define MN_PS__CWORD52_VUP "_CWORD52_vup" +#define PR_PS__CWORD52_VUP_S PR_TSS_S +#define PR_PS__CWORD52_VUP PR_TSS + +#define MN_PS_SYSVUP "sysvup" +#define PR_PS_SYSVUP_S PR_TSS_S +#define PR_PS_SYSVUP PR_TSS + +#define MN_SS_ROOTFSVUP "rootfsvup" +#define PR_SS_ROOTFSVUP_S PR_TSS_S +#define PR_SS_ROOTFSVUP PR_TSS + +#define MN_SS_VUPPROGUI "vupprogressui" +#define PR_SS_VUPPROGUI_S PR_TSS_S +#define PR_SS_VUPPROGUI PR_TSS + +#define MN_SS_NORVUP "norvup" +#define PR_SS_NORVUP_S PR_TSS_S +#define PR_SS_NORVUP PR_TSS + +// OUTER_UPDATE START +#define MN_XMVUPSERVICE "radio_xm_update" +#define PR_XMVUPSERVICE_S PR_TSS_S +#define PR_XMVUPSERVICE PR_TSS +// OUTER_UPDATE END + +#define MN_BTPHONESRV "BT_PhoneSrv" +#define PR_BTPHONESRV_S PR_TSS_S +#define PR_BTPHONESRV PR_TSS + +#define MN_BTPBKSRV "BT_PbkSrv" +#define PR_BTPBKSRV_S PR_TSS_S +#define PR_BTPBKSRV PR_TSS + +#define MN_BTMSGSRV "BT_MsgSrv" +#define PR_BTMSGSRV_S PR_TSS_S +#define PR_BTMSGSRV PR_TSS + +// NON-resident, exec from task manager, Repro update +#define MN_PS_SYSUPDATE "sysupdate" +#define PR_PS_SYSUPDATE_S PR_TSS_S +#define PR_PS_SYSUPDATE PR_TSS + +#define MN_SS_NANDUPDATE "nandupdate" +#define PR_SS_NANDUPDATE_S PR_TSS_S +#define PR_SS_NANDUPDATE PR_TSS + + #define TN_NANDUPDATE_CLD "t_nandcld" + #define PR_NANDUPDATE_CLD_S PR_TSS_S + #define PR_NANDUPDATE_CLD PR_TSS + +#define MN_BTPHONESRV "BT_PhoneSrv" +#define PR_BTPHONESRV_S PR_TSS_S +#define PR_BTPHONESRV PR_TSS + +#define MN_BTPBKSRV "BT_PbkSrv" +#define PR_BTPBKSRV_S PR_TSS_S +#define PR_BTPBKSRV PR_TSS + +#define MN_BTMSGSRV "BT_MsgSrv" +#define PR_BTMSGSRV_S PR_TSS_S +#define PR_BTMSGSRV PR_TSS + +//exec from diag +#define MN_DIAGSERVICE "DiagService" +#define PR_DIAGSERVICE_S PR_TSS_S +#define PR_DIAGSERVICE PR_TSS + +#define MN_DIAGWORKERTSK "diagworker_tsk" +#define PR_DIAGWORKERTSK_S PR_TSS_S +#define PR_DIAGWORKERTSK PR_TSS + +#define MN_DIAGTSK "diag_tsk" +#define PR_DIAGTSK_S PR_TSS_S +#define PR_DIAGTSK PR_TSS + +#define MN_DIAGMCTSK "diagmc_tsk" +#define PR_DIAGMCTSK_S PR_TSS_S +#define PR_DIAGMCTSK PR_TSS + +#define MN_DIAGUTCOL "diagutCol_tsk" +#define PR_DIAGUTCOL_S PR_TSS_S +#define PR_DIAGUTCOL PR_TSS + +#define MN_DIAGUTUPD "diagutUpd_tsk" +#define PR_DIAGUTUPD_S PR_TSS_S +#define PR_DIAGUTUPD PR_TSS + +//exec from Connectivity for _CWORD57_ +#define MN__CWORD57_UTILSERVICE "_CWORD57_UtilService" +#define PR__CWORD57_UTILSERVICE_S PR_TSS_S +#define PR__CWORD57_UTILSERVICE PR_TSS + + #define TN_CON_IPUT_DETECT "iputsrv_detect" + #define PR_CON_IPUT_DETECT_S PR_TSS_S + #define PR_CON_IPUT_DETECT PR_TSS + + #define TN_CON_IPUT_AUTH "iputsrv_auth" + #define PR_CON_IPUT_AUTH_S PR_TSS_S + #define PR_CON_IPUT_AUTH PR_TSS + + #define TN_CON_IPUT_SERIAL "iputsrv_serial" + #define PR_CON_IPUT_SERIAL_S PR_TSS_S + #define PR_CON_IPUT_SERIAL PR_TSS + + #define TN_CON_IPUT_USB_1 "iputsrv_usb1" + #define PR_CON_IPUT_USB_1_S PR_TSS_S + #define PR_CON_IPUT_USB_1 PR_TSS + + #define TN_CON_IPUT_USB_2 "iputsrv_usb2" + #define PR_CON_IPUT_USB_2_S PR_TSS_S + #define PR_CON_IPUT_USB_2 PR_TSS + + #define TN_CON_IPUT_SPP "iputsrv_spp" + #define PR_CON_IPUT_SPP_S PR_TSS_S + #define PR_CON_IPUT_SPP PR_TSS + +#define MN__CWORD57_DTSERVICE "_CWORD57_DTService" +#define PR__CWORD57_DTSERVICE_S PR_TSS_S +#define PR__CWORD57_DTSERVICE PR_TSS + + #define TN_CON_IPDT_SERIAL "ipdtsrv_serial" + #define PR_CON_IPDT_SERIAL_S PR_TSS_S + #define PR_CON_IPDT_SERIAL PR_TSS + + #define TN_CON_IPDT_USB_1 "ipdtsrv_usb1" + #define PR_CON_IPDT_USB_1_S PR_TSS_S + #define PR_CON_IPDT_USB_1 PR_TSS + + #define TN_CON_IPDT_USB_2 "ipdtsrv_usb2" + #define PR_CON_IPDT_USB_2_S PR_TSS_S + #define PR_CON_IPDT_USB_2 PR_TSS + + #define TN_CON_IPDT_SPP "ipdtsrv_spp" + #define PR_CON_IPDT_SPP_S PR_TSS_S + #define PR_CON_IPDT_SPP PR_TSS + +#define MN_WEBDAVMGR "webdavmgr" +#define PR_WEBDAVMGR_S PR_TSS_S +#define PR_WEBDAVMGR PR_TSS + +#define MN_DISPLAYSERVICE "DisplayService" +#define PR_DISPLAYSERVICE_S PR_TSS_S +#define PR_DISPLAYSERVICE PR_TSS + +#define MN_ENFORMSERVICE "EnformService" +#define PR_ENFORMSERVICE_S PR_TSS_S +#define PR_ENFORMSERVICE PR_TSS + +#define MN_CONNUTIL "ConnUtil" +#define PR_CONNUTIL_S PR_TSS_S +#define PR_CONNUTIL PR_TSS + +#define MN_CONNUTILSLAVE "ConnUtilSlave" +#define PR_CONNUTILSLAVE_S PR_TSS_S +#define PR_CONNUTILSLAVE PR_TSS + +#define MN_CONNMGR "ConnMgr" +#define PR_CONNMGR_S PR_TSS_S +#define PR_CONNMGR PR_TSS + +#define MN_SERVICEFLAGMGR "ServiceFlagMgr" +#define PR_SERVICEFLAGMGR_S PR_TSS_S +#define PR_SERVICEFLAGMGR PR_TSS + +//exec from VR +#define MN_VRMANAGER "vrmanager" +#define PR_VRMANAGER_S PR_TSS_S +#define PR_VRMANAGER PR_TSS + + #define TN_VR_WORKER "VrWorkerThread" + #define PR_VR_WORKER_S PR_TSS_S + #define PR_VR_WORKER PR_TSS + + #define TN_VBT_PROPDISPATCH "PropDispatchThread" + #define PR_VBT_PROPDISPATCH_S PR_TSS_S + #define PR_VBT_PROPDISPATCH PR_TSS + + #define TN_VBT_PROPRESPONSE "PropResponseThread" + #define PR_VBT_PROPRESPONSE_S PR_TSS_S + #define PR_VBT_PROPRESPONSE PR_TSS + + #define TN_VBT_PROPAUDIOPLAY "PropAudioPlayThread" + #define PR_VBT_PROPAUDIOPLAY_S PR_TSS_S + #define PR_VBT_PROPAUDIOPLAY PR_TSS + + #define TN_VBT_PROPAUDIORECORD "PropAudioRecordThread" + #define PR_VBT_PROPAUDIORECORD_S PR_TSS_S + #define PR_VBT_PROPAUDIORECORD PR_TSS + + #define TN_VBT_MAINTHREADPRIO "MainThreadPriority" + #define PR_VBT_MAINTHREADPRIO_S PR_TSS_S + #define PR_VBT_MAINTHREADPRIO PR_TSS + + #define TN_VBT_ASRMANAGERGRAMMAR "AsrManagerGrammarGenerationThread" + #define PR_VBT_ASRMANAGERGRAMMAR_S PR_TSS_S + #define PR_VBT_ASRMANAGERGRAMMAR PR_TSS + + #define TN_VBT_ASRVOCONRECO "AsrVoconRecoProcessThread" + #define PR_VBT_ASRVOCONRECO_S PR_TSS_S + #define PR_VBT_ASRVOCONRECO PR_TSS + + #define TN_VBT_BROADCASTREAD "BroadCastReadThread" + #define PR_VBT_BROADCASTREAD_S PR_TSS_S + #define PR_VBT_BROADCASTREAD PR_TSS + + #define TN_VBT_FILEAGGREGATOR "FileAggregatorDecompressThread" + #define PR_VBT_FILEAGGREGATOR_S PR_TSS_S + #define PR_VBT_FILEAGGREGATOR PR_TSS + + #define TN_VBT_HTTPCURLREQUEST "HttpCurlRequestThread" + #define PR_VBT_HTTPCURLREQUEST_S PR_TSS_S + #define PR_VBT_HTTPCURLREQUEST PR_TSS + + #define TN_VBT_HTTPDRIVERREQUEST "HttpDriverRequestThread" + #define PR_VBT_HTTPDRIVERREQUEST_S PR_TSS_S + #define PR_VBT_HTTPDRIVERREQUEST PR_TSS + + #define TN_VBT_HTTPREQUESTSESSION "HttpRequestSessionStateThread" + #define PR_VBT_HTTPREQUESTSESSION_S PR_TSS_S + #define PR_VBT_HTTPREQUESTSESSION PR_TSS + + #define TN_VBT_PLAYMGRSTOPASYNC "PlayMgrStopAsyncStreamThread" + #define PR_VBT_PLAYMGRSTOPASYNC_S PR_TSS_S + #define PR_VBT_PLAYMGRSTOPASYNC PR_TSS + + #define TN_VBT_RESOURCEMGRQUEUE "ResourceMgrQueueHandlerThread" + #define PR_VBT_RESOURCEMGRQUEUE_S PR_TSS_S + #define PR_VBT_RESOURCEMGRQUEUE PR_TSS + + #define TN_VBT_SMURFDRIVERTIMEOUT "SmurfDriverTimeoutThread" + #define PR_VBT_SMURFDRIVERTIMEOUT_S PR_TSS_S + #define PR_VBT_SMURFDRIVERTIMEOUT PR_TSS + + #define TN_NVR_NVRMAIN "NvrMainThread" + #define PR_NVR_NVRMAIN_S PR_TSS_S + #define PR_NVR_NVRMAIN PR_TSS + + #define TN_NVR_NVRRECO "NvrRecoThread" + #define PR_NVR_NVRRECO_S PR_TSS_S + #define PR_NVR_NVRRECO PR_TSS + + #define TN_NVR_NVRDICT "NvrDictThread" + #define PR_NVR_NVRDICT_S PR_TSS_S + #define PR_NVR_NVRDICT PR_TSS + + #define TN_NVR_NVRENC "NvrEncThread" + #define PR_NVR_NVRENC_S PR_TSS_S + #define PR_NVR_NVRENC PR_TSS + +//exec from VehicleInfo +#define MN_VEHICLEINFOSERVICE "VehicleInfoSrv" +#define PR_VEHICLEINFOSERVICE_S PR_TSS_S +#define PR_VEHICLEINFOSERVICE PR_TSS + +//exec from _CWORD58_ +#define MN__CWORD58_SERVICE "_CWORD58_Service" +#define PR__CWORD58_SERVICE_S PR_TSS_S +#define PR__CWORD58_SERVICE PR_TSS + +#define MN__CWORD8_SRV "_CWORD8_Srv" +#define PR__CWORD8_SRV_S PR_TSS_S +#define PR__CWORD8_SRV PR_TSS + +#define MN_SPCSERVICE "SPCService" +#define PR_SPCSERVICE_S PR_TSS_S +#define PR_SPCSERVICE PR_TSS + +#define MN_LOCALSERVERPROXY "LSP" +#define PR_LOCALSERVERPROXY_S PR_TSS_S +#define PR_LOCALSERVERPROXY PR_TSS + +#define MN_EOMSERVICE "eOMService" +#define PR_EOMSERVICE_S PR_TSS_S +#define PR_EOMSERVICE PR_TSS + +//exec from _CWORD89_ +#define MN__CWORD89_SERVICE "_CWORD89_Service" +#define PR__CWORD89_SERVICE_S PR_TSS_S +#define PR__CWORD89_SERVICE PR_TSS + +//exec from NetworkManager +#define MN_NETWORKMANAGER "NetworkManager" +#define PR_NETWORKMANAGER_S PR_TSS_S +#define PR_NETWORKMANAGER PR_TSS + + #define TN_NWM_TH_CMDRCV "NWM_Th_CmdRcv" + #define PR_NWM_TH_CMDRCV_S PR_TSS_S + #define PR_NWM_TH_CMDRCV PR_TSS + + #define TN_NWM_TH_PROCMGR "NWM_Th_ProcMgr" + #define PR_NWM_TH_PROCMGR_S PR_TSS_S + #define PR_NWM_TH_PROCMGR PR_TSS + + #define TN_NWM_TH_CMDPROC "NWM_Th_CmdProc" + #define PR_NWM_TH_CMDPROC_S PR_TSS_S + #define PR_NWM_TH_CMDPROC PR_TSS + + #define TN_NWM_TH_DNSMGR "NWM_Th_DnsMgr" + #define PR_NWM_TH_DNSMGR_S PR_TSS_S + #define PR_NWM_TH_DNSMGR PR_TSS + + #define TN_NWM_TH_DHCPD "NWM_Th_Dhcpd" + #define PR_NWM_TH_DHCPD_S PR_TSS_S + #define PR_NWM_TH_DHCPD PR_TSS + +// DCM Service +#define MN_DCMSERVICE "DCMService" +#define PR_DCMSERVICE_S PR_TSS_S +#define PR_DCMSERVICE PR_TSS + + #define TN_DCM_TH_CMDRCV "DCM_Th_CmdRcv" + #define PR_DCM_TH_CMDRCV_S PR_TSS_S + #define PR_DCM_TH_CMDRCV PR_TSS + + #define TN_DCM_TH_MSGRCV "DCM_Th_MsgRcv" + #define PR_DCM_TH_MSGRCV_S PR_TSS_S + #define PR_DCM_TH_MSGRCV PR_TSS + + #define TN_DCM_TH_TIMER "DCM_Th_Timer" + #define PR_DCM_TH_TIMER_S PR_TSS_S + #define PR_DCM_TH_TIMER PR_TSS + +// HELP Service +#define MN_HELPSERVICE "HELPService" +#define PR_HELPSERVICE_S PR_TSS_S +#define PR_HELPSERVICE PR_TSS + +//exec from RemoteService +#define MN_REMOTESERVICE "RemoteService" +#define PR_REMOTESERVICE_S PR_TSS_S +#define PR_REMOTESERVICE PR_TSS + + #define TN_RS_TH_CANCTRL "RS_Th_CANCtrl" + #define PR_RS_TH_CANCTRL_S PR_TSS_S + #define PR_RS_TH_CANCTRL PR_TSS + + #define TN_RS_TH_DISPCTRL "RS_Th_DispCtrl" + #define PR_RS_TH_DISPCTRL_S PR_TSS_S + #define PR_RS_TH_DISPCTRL PR_TSS + + #define TN_RS_TH_PARTSCTRL "RS_Th_PartsCtrl" + #define PR_RS_TH_PARTSCTRL_S PR_TSS_S + #define PR_RS_TH_PARTSCTRL PR_TSS + + #define TN_RS_TH_HTTPPROC "RS_Th_HttpProc" + #define PR_RS_TH_HTTPPROC_S PR_TSS_S + #define PR_RS_TH_HTTPPROC PR_TSS + +//exec from VR +#define MN_CONTENTSMGR "contentsmgr" +#define PR_CONTENTSMGR_S PR_TSS_S +#define PR_CONTENTSMGR PR_TSS + + #define TN_CDB_CONTENDB "contendbThread" + #define PR_CDB_CONTENDB_S PR_TSS_S + #define PR_CDB_CONTENDB PR_TSS + +/* COMARB Service */ +#define MN_NW_COMARB "ComArbService" +#define PR_NW_COMARB_S PR_TSS_S +#define PR_NW_COMARB PR_TSS + +/* ASND_FRthread */ +#define MN_ASND_FRTH "ASND_FRthread" +#define PR_ASND_FRTH_S PR_SND_VCETRFCTRL_S +#define PR_ASND_FRTH PR_SND_VCETRFCTRL + +/* MLINK Service */ +#define MN_MLINKSERVICE "MlinkService" +#define PR_MLINKSERVICE_S PR_TSS_S +#define PR_MLINKSERVICE PR_TSS + +#define MN__CWORD74_SERVICE "_CWORD74_Service" +#define PR__CWORD74_SERVICE_S PR_TSS_S +#define PR__CWORD74_SERVICE PR_TSS +#endif //__AGL_THREAD_H__ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/npp/version.txt b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/npp/version.txt new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/npp/version.txt @@ -0,0 +1 @@ +1 diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/agl.mk b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/agl.mk new file mode 100644 index 00000000..495614dc --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/agl.mk @@ -0,0 +1,677 @@ +# +# @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################# +# +# MAKE VARIABLES +# +# (mandatory) +# MAKETOP : pprosrc/root directory +# +# (optional) +# COMPONENT_NAME : component name +# INST_HEADERS : headers to install +# INST_LIBS : libraries to install +# INST_SHLIBS : shared libraries to install +# NOINST_LIBS : libraries for local use +# INST_PROGS : programs to install +# INST_CONFBIN : conf_bin to install +# RPC_API : RPC API definitions (without suffix) +# IPC_API : IPC API definitions (without suffix) +# xxx_SRCS : source files of program xxx (*.{c,S,cc}) +# libxxx_SRCS : source files of library libxxx (*.{c,S,cc}) +# xxx_PCOS : pre-compiled object files of program xxx (*.{o,os,a}) +# libxxx_PCOS : pre-compiled object files of library libxxx (*.{o,os,a}) +# SUBDIRS : sub directories +# CLEAN_FILES : extra files to clean +# CLEAN_DIRS : extra directoies to clean +# UNINST_FILES : extra files to uninstall +# CPPFLAGS : preprocess options (-I, -D, ...) +# CFLAGS : C source compile options +# CXXFLAGS : C++ source compile options +# ASFLAGS : assembler source assemble options +# LDFLAGS : link options (-L, ...) +# LDLIBS : libraries to link (-lxxx) +# ALL : targets to make +# (default: install-header install-lib install-prog install-data) +# xxx_SONAME : dummy library SONAME +# +# MAKE TARGETS +# +# all, test : for target in $(ALL); do $(MAKE) $$target; done +# install-prog : install program +# install-lib : install-shlib and intall-arlib +# install-shlib : install shared libraries +# install-arlib : install static libraries +# install-test-mock-lib : install mock libraries +# install-test-mock-shlib : install shared mock libraries +# install-test-mock-arlib : install static mock libraries +# clean, clean-test : clean temporary files +# clean-all, clean-all-test : clean temporary files and installed files +# clean-self, clean-self-test : non-recursive clean +################################################################################# + + +ifneq ($(ADD_EXT),) + AEXT=.$(ADD_EXT) +endif + + +ifneq ($(strip $(filter $(MAKECMDGOALS),\ + lint \ + )),) +endif + +ifneq ($(strip $(filter $(MAKECMDGOALS),\ + )),) +endif + + +################################################################################# +SYSROOT ?= $(SDKTARGETSYSROOT) +DESTDIR ?= $(SDKTARGETSYSROOT) + +WARN_FLAGS ?= -Wall +DEBUG_FLAGS ?= -g + +AUTO_INCLUDE := -include $(SYSROOT)/usr/agl/include/agl_types_obsoluted.h +AGLCFLAGS := $(CFLAGS) $(COMPONENT_CFLAGS) +AGLCXXFLAGS := $(CXXFLAGS) $(COMPONENT_CXXFLAGS) +AGLCPPFLAGS := $(CPPFLAGS) $(COMPONENT_CPPFLAGS) +AGLASFLAGS := $(ASFLAGS) +AGLLDFLAGS := $(LDFLAGS) $(COMPONENT_LDFLAGS) +AGLLDLIBS := $(LDLIBS) $(COMPONENT_LDLIBS) +AGLARFLAGS := $(ARFLAGS) +AGLPICFLAGS := -fPIC + +AGLCFLAGS += $(WARN_FLAGS) $(DEBUG_FLAGS) $(AUTO_INCLUDE) +AGLCXXFLAGS += $(WARN_FLAGS) $(DEBUG_FLAGS) $(AUTO_INCLUDE) +AGLASFLAGS += $(WARN_FLAGS) $(ARCH_FLAGS) + + +ifdef LINK_CXX +LINK := $(CXX) +else +LINK := $(CC) +endif + +ifdef LINK_SHLIB_CXX +LINK_SHLIB := $(CXX) +else +LINK_SHLIB := $(CC) +endif + +ifdef DUMMY_SHLIB +AGLLDFLAGS += -L. +endif + +######### add gcov option ############ + + + +define LINK_DUMMY +if [ "$1" != "$3" ]; then \ + echo "dummy lib ($1) created" ; \ + $(LINK_SHLIB) -shared $(PIC_FLAGS) -Wl,-soname=$2 -o $1 -xc /dev/null ; \ +else \ + echo "error: dummy lib must not have the same name as $3" ; \ + exit 1 ; \ +fi ; +endef + +define INST_DUMMY + @$(foreach lib,$(DUMMY_SHLIB),$(if $(lib),$(call LINK_DUMMY,$(lib),$(if $($(lib)_SONAME),$($(lib)_SONAME),$(lib)),$1))) +endef + +define CLEAN_DUMMY + @$(foreach lib,$(DUMMY_SHLIB),$(if $(lib),rm -f $(lib))) +endef + +define INSTALL_EXT +@if [ "$(AEXT)" != "" ];then \ + if echo "$(ADD_EXT)" | grep -q '^[A-Za-z]' ;then \ + echo "$< -> $<$(AEXT)" ;\ + mv $< $<$(AEXT) ;\ + install -c -m 0755 $<$(AEXT) $@$(AEXT) ;\ + if [ -f "$*.map" ];then \ + mv $*.map $*.map$(AEXT) ;\ + fi ;\ + else \ + echo "ADD_EXT : ERROR $(ADD_EXT)" ;\ + exit 1 ;\ + fi ;\ +fi +endef + + +define INSTALL_SCRIPT +install -d -m 0755 $(@D) +install -c -m 0755 $< $@ +endef + +define INSTALL_PIXMAP +install -d -m 0755 $(@D) +install -c -m 0644 $< $@ +endef + +define INSTALL_UCODE +install -d -m 0755 $(@D) +install -c -m 0644 $< $@ +endef + +define INSTALL_DATAINITOBJ +if [ -n "$<" ]; then\ + install -d -m 0755 $(@D);\ + install -c -m 0644 $< $@;\ +fi; +endef + +define INSTALL_OBJ +install -d -m 0755 $(@D) +install -c -m 0644 $< $@ +endef + +define INSTALL_CONFBIN +if [ -n "$<" ]; then\ + install -d -m 0755 $(@D);\ + install -c -m 0644 $< $@;\ +fi; +endef + +################################################################################# + + +## for libc ## +AGLCPPFLAGS += -D_GNU_SOURCE + +## for libPosixBased001Legacy +AGLCPPFLAGS += -DAGL_PosixBasedOS001LEGACY_USED -DAGL_STUB -DLINUX + +## for agl header## +AGLCPPFLAGS += -I$(SYSROOT)/usr/agl/include + +## for agl library## +AGLLDFLAGS += -L$(SYSROOT)/usr/agl/lib + +ifneq ($(INST_SHLIBS),libagl_stub) +AGLLDLIBS += -Wl,-Bdynamic -lpthread +endif + + +########################################## + +COMPONENT_NAME ?= $(error COMPONENT_NAME is not defined) +AGL_TOPDIR ?= $(DESTDIR)/usr/agl +AGL_INCDIR := $(AGL_TOPDIR)/include +AGL_LIBDIR := $(AGL_TOPDIR)/lib +AGL_BINDIR := $(AGL_TOPDIR)/bin +AGL_PIXMAPDIR := $(AGL_TOPDIR)/pixmaps +AGL_UCODEDIR := $(AGL_TOPDIR)/data/ucode + +################################################################################# + +HEADER_INSTALL_DIR := $(AGL_INCDIR)/$(COMPONENT_NAME) +LIB_INSTALL_DIR := $(AGL_LIBDIR) +PROG_INSTALL_DIR := $(AGL_BINDIR) +PIXMAP_INSTALL_DIR := $(AGL_PIXMAPDIR)/$(COMPONENT_NAME) +UCODE_INSTALL_DIR := $(AGL_UCODEDIR) +DATAINITOBJ_INSTALL_DIR := $(AGL_DATAINITOBJDIR) +CONFBIN_INSTALL_DIR := $(AGL_CONFBINDIR) + +################################################################################# + +DEL_OBJS = $(filter %.o,$($(1)_SRCS:%.c=%.o) $($(1)_SRCS:%.cc=%.o) \ + $($(1)_SRCS:%.cpp=%.o) \ + $($(1)_SRCS:%.S=%.o)) +OBJS = $(DEL_OBJS) $($(1)_PCOS) +DEL_SOBJS = $(filter %.os,$($(1)_SRCS:%.c=%.os) $($(1)_SRCS:%.cc=%.os) \ + $($(1)_SRCS:%.cpp=%.os) \ + $($(1)_SRCS:%.S=%.os)) +DEL_GCDA = $(filter %.gcda,$($(1)_SRCS:%.c=%.gcda) $($(1)_SRCS:%.cc=%.gcda) \ + $($(1)_SRCS:%.cpp=%.gcda) \ + $($(1)_SRCS:%.S=%.gcda)) +DEL_GCNO = $(filter %.gcno,$($(1)_SRCS:%.c=%.gcno) $($(1)_SRCS:%.cc=%.gcno) \ + $($(1)_SRCS:%.cpp=%.gcno) \ + $($(1)_SRCS:%.S=%.gcno)) +DEL_GCOV = $(filter %.gcov,$($(1)_SRCS:%.c=%.gcov) $($(1)_SRCS:%.cc=%.gcov) \ + $($(1)_SRCS:%.cpp=%.gcov) \ + $($(1)_SRCS:%.S=%.gcov)) + +DEL_INFO = $(filter %.info, \ + $(dirname $($(1)_SRCS:%.c=%.tmp))lcov.info \ + $(dirname $($(1)_SRCS:%.cc=%.tmp))lcov.info \ + $(dirname $($(1)_SRCS:%.cpp=%.tmp))lcov.info \ + $(dirname $($(1)_SRCS:%.S=%.tmp))lcov.info) + +SOBJS = $(DEL_SOBJS) $($(1)_PCOS) +DEPS = $(join $(dir $(DEL_OBJS)),$(patsubst %.o,.%.d,$(notdir $(DEL_OBJS)))) + +INST_TEST_MOCK_LIBS := +INST_TEST_MOCK_SHLIBS := +INST_ITV2_TESTPROGS := +INST_TESTPROGS := + +CLEAN_OBJS := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(INST_TEST_MOCK_LIBS) $(INST_TEST_MOCK_SHLIBS) $(NOINST_LIBS) $(INST_PROGS) $(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(call DEL_OBJS,$(lib))) +CLEAN_SOBJS := $(foreach lib,$(INST_SHLIBS) $(INST_TEST_MOCK_SHLIBS),$(call DEL_SOBJS,$(lib))) + +CLEAN_GCDA := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(NOINST_LIBS) $(INST_PROGS) $(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(call DEL_GCDA,$(lib))) +CLEAN_GCNO := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(NOINST_LIBS) $(INST_PROGS) $(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(call DEL_GCNO,$(lib))) +CLEAN_GCOV := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(NOINST_LIBS) $(INST_PROGS) $(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(call DEL_GCOV,$(lib))) +CLEAN_CFG := $(INST_UT_SMCONF:%=%.cfg) $(INST_IT_SMCONF:%=%.cfg) + +CLEAN_INFO := $(sort $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(INST_TEST_MOCK_LIBS) $(INST_TEST_MOCK_SHLIBS) $(NOINST_LIBS) $(INST_PROGS) $(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(call DEL_INFO,$(lib)))) + +LIB_DEPS := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(INST_TEST_MOCK_LIBS) $(INST_TEST_MOCK_SHLIBS) $(NOINST_LIBS),$(call DEPS,$(lib))) +PROG_DEPS := $(foreach prog,$(INST_PROGS),$(call DEPS,$(prog))) +TESTPROGS_DEPS := +PROG_RULES := $(foreach prog,$(INST_PROGS),$(if $(prog),.$(prog).out.rule)) +TESTPROG_RULES := + +LIB_RULES := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(NOINST_LIBS) $(INST_TEST_MOCK_LIBS),$(if $($(lib)_SRCS),.$(lib).a.rule)) +SHLIB_RULES := $(foreach lib,$(INST_SHLIBS) $(INST_TEST_MOCK_SHLIBS),$(if $(lib),.$(lib).so.rule)) +ARLIB_RULES := $(foreach lib,$(INST_LIBS) $(NOINST_LIBS),$(if $($(lib)_SRCS),.$(lib).a.rule)) + +PROG_MAPS := $(foreach prog,$(INST_PROGS),$(if $(prog),$(prog).map)) +TESTPROG_MAPS := $(foreach prog,$(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(if $(prog),$(prog).map)) +LIB_MAPS := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(NOINST_LIBS) $(INST_TEST_MOCK_LIBS) $(INST_TEST_MOCK_SHLIBS),$(if $(lib),$(lib).map)) +PROG_LIBDEPS := $(foreach prog,$(INST_PROGS),$(if $(prog),.$(prog).out.libdep)) +TESTPROG_LIBDEPS := $(foreach prog,$(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(if $(prog),.$(prog).out.libdep)) + +BUILD_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +include $(BUILD_MK_DIR)/rpc_rule.mk + +IPC_API_RULES := $(IPC_API:%=.%.ipc.rule) +ipc_api := $(shell echo $(IPC_API) | tr A-Z a-z) +CLEAN_IPC_API_SRCS := $(ipc_api:%=%_client.h) $(ipc_api:%=%_client.c) $(ipc_api:%=%_server.h) $(ipc_api:%=%_server.c) +IPC_API_DEPS := $(ipc_api:%=%_client.d) $(ipc_api:%=%_server.d) + +CLEAN_PROGS := $(foreach prog,$(INST_PROGS),$(if $(prog),$(prog).out)) +CLEAN_TESTPROGS := $(foreach prog,$(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(if $(prog),$(prog).out)) + +ifneq ($(AEXT),) +CLEAN_PROGS += $(foreach prog,$(INST_PROGS),$(if $(prog),$(prog).out$(AEXT))) +CLEAN_TESTPROGS += $(foreach prog,$(INST_ITV2_TESTPROGS) $(INST_TESTPROGS),$(if $(prog),$(prog).out$(AEXT))) +endif +CLEAN_LIBS := $(foreach lib,$(INST_LIBS) $(INST_SHLIBS) $(INST_TEST_MOCK_LIBS) $(INST_TEST_MOCK_SHLIBS) $(NOINST_LIBS),$(if $($(lib)_SRCS),$(lib).a)) +CLEAN_SHLIBS := $(foreach lib,$(INST_SHLIBS) $(INST_TEST_MOCK_SHLIBS),$(if $(lib),$(lib).so)) +ifneq ($(AEXT),) +CLEAN_SHLIBS += $(foreach lib,$(INST_SHLIBS) $(INST_TEST_MOCK_SHLIBS),$(if $(lib),$(lib).so$(AEXT))) +endif +ifneq ($(DUMMY_SHLIB),) +CLEAN_SHLIBS += $(DUMMY_SHLIB) +endif + +CLEAN_FILES += $(CLEAN_OBJS) $(CLEAN_SOBJS) +CLEAN_FILES += $(PROG_DEPS) $(LIB_DEPS) $(TESTPROG_DEPS) +CLEAN_FILES += $(PROG_MAPS) $(PROG_LIBDEPS) $(TESTPROG_MAPS) $(TESTPROG_LIBDEPS) +CLEAN_FILES += $(PROG_RULES) $(LIB_RULES) $(SHLIB_RULES) $(AR_RULES) $(TESTPROG_RULES) +CLEAN_FILES += $(CLEAN_PROGS) $(CLEAN_LIBS) $(CLEAN_SHLIBS) $(LIB_MAPS) $(CLEAN_TESTPROGS) +CLEAN_FILES += $(RPC_API_RULES) $(CLEAN_API_SRCS) $(RPC_API_DEPS) +CLEAN_FILES += $(IPC_API_RULES) $(CLEAN_IPC_API_SRCS) $(IPC_API_DEPS) +CLEAN_FILES += $(INST_DATAINITOBJ) +CLEAN_FILES += $(CLEAN_INFO) +CLEAN_FILES += $(CLEAN_GCNO) $(CLEAN_GCDA) $(CLEAN_GCOV) +CLEAN_FILES += $(CLEAN_CFG) +ifneq ($(AEXT),) +CLEAN_FILES += $(foreach lib,$(INST_SHLIBS) $(INST_PROGS),$(if $(lib),$(lib).map$(AEXT))) +endif + + +################################################################################# + +RPATH := /usr/lib:/lib:/usr/agl/lib + +################################################################################# +SUBDIRS := $(filter-out mock,$(SUBDIRS)) + +.PHONY: all all-subdirs install test $(SUBDIRS:%=all-%) $(SUBDIRS:%=install--%) +.PHONY: install-test $(SUBDIRS:%=install-test-%) +.PHONY: build-lib +.PHONY: build-prog $(SUBDIRS:%=build-prog-%) +.PHONY: build-shlib $(SUBDIRS:%=build-shlib-%) +.PHONY: build-arlib $(SUBDIRS:%=build-arlib-%) +.PHONY: build-cfg +.PHONY: install-header $(SUBDIRS:%=install-header-%) +.PHONY: install-lib +.PHONY: install-shlib $(SUBDIRS:%=install-shlib-%) +.PHONY: install-arlib $(SUBDIRS:%=install-arlib-%) +.PHONY: install-prog $(SUBDIRS:%=install-prog-%) +.PHONY: install-data $(SUBDIRS:%=install-data-%) +.PHONY: install-cfg $(SUBDIRS:%=install-cfg-%) +.PHONY: install-preload +.PHONY: clean-all +.PHONY: clean-self +.PHONY: clean-sub $(SUBDIRS:%=clean-%) +.PHONY: clean-all-sub $(SUBDIRS:%=clean-all-%) +.PHONY: clean-self-sub +.PHONY: lint lint-exec + + +REF_ROOT_DIR=/home/ref_root/ +TEST_SERVER_DIR=/home/agl_sysroot/ +REFHW_SERVER=192.168.1.2 + +PHONY: all + +lint: + @set -e;\ + $(MAKE) lint-exec + + +#all: build-lib build-prog build-test-mock-lib build-cfg all-subdirs +all: build-lib build-prog build-cfg all-subdirs + +all-subdirs: + @set -e;\ + for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) all); done + + +#lint-exec: $(INST_HEADERS) $($(INST_SHLIBS)_SRCS) $($(INST_LIBS)_SRCS) $($(INST_PROGS)_SRCS) +# -cpplint.py $^ > cpplint_result.txt 2>&1 + +lint-exec: + $(eval LINTFILES := $(shell find . -name "*.c*" -o -name "*.h*")) + -cpplint.py --extensions=hpp,cpp,c,cc,h $(LINTFILES) > cpplint_result.txt 2>&1 + + +#install: install-header install-lib install-prog install-data install-test-mock-header install-test-mock-lib install-test-casename $(SUBDIRS:%=install--%) +install: install-header install-lib install-prog install-data $(SUBDIRS:%=install--%) + + +build-lib: build-shlib build-arlib + +build-shlib: $(INST_SHLIBS:%=%.so) + +build-arlib: $(INST_LIBS:%=%.a) $(NOINST_LIBS:%=%.a) + +TOPDIR=$(abspath ./) +generate-header-list: install-header-local + echo $(COMPONENT_NAME) > $(addsuffix .list, $(abspath ./)) + ls -1 $(TOPDIR)/tmp_head/usr/agl/include/$(COMPONENT_NAME)/ >> $(addsuffix .list, $(abspath ./)) + rm -rf ./tmp_head + + +build-prog: $(INST_PROGS:%=%.out) + + +install-lib: install-arlib install-shlib + +install-arlib: build-arlib +ifneq ($(strip $(INST_LIBS)),) + install -m 0755 -d $(LIB_INSTALL_DIR) + install -m 0644 $(INST_LIBS).a $(LIB_INSTALL_DIR) +endif + +install-shlib: build-shlib +ifneq ($(strip $(INST_SHLIBS)),) + install -m 0755 -d $(LIB_INSTALL_DIR) + install -m 0644 $(INST_SHLIBS).so $(LIB_INSTALL_DIR) +endif + +install-prog: build-prog +ifneq ($(strip $(INST_PROGS)),) + install -m 0755 -d $(PROG_INSTALL_DIR) + $(foreach prog, $(INST_PROGS), install -m 0755 $(prog).out $(PROG_INSTALL_DIR)/$(prog);) +endif + + +install-header-r: install-header $(SUBDIRS:%=install-header-r-%) + + +install-header-local: + $(MAKE) DESTDIR=`pwd`/tmp_head install-header-r + + +install-header: $(INST_HEADERS:%=install-%) + + +$(INST_HEADERS:%=install-%): install-%: % +ifneq ($(strip $(INST_HEADERS)),) + install -m 0755 -d $(HEADER_INSTALL_DIR) + install -m 0644 $< $(HEADER_INSTALL_DIR) +endif + + +HOST_LAUNCH_XML2CFG = $(SYSROOT)/usr/agl/share/launch_xml2cfg.sh +CONF_H = $(SYSROOT)/usr/agl/include/sm_launch_conf.h + +%.cfg: %.xml + set -e; \ + cpp -P -include $(CONF_H) $< > $<.tmp ; \ + cd $(dir $<.tmp); \ + $(HOST_LAUNCH_XML2CFG) $(notdir $<.tmp) > $@ ; \ + rm -f $<.tmp ; + + +install-data: $(INST_PIXMAPS:%=$(PIXMAP_INSTALL_DIR)/%) $(INST_UCODE:%=$(UCODE_INSTALL_DIR)/%) $(INST_DATAINITOBJ:%=$(DATAINITOBJ_INSTALL_DIR)/%) $(OBJ_COPY_LIST:%=$(OBJ_COPY_INSTALL_DIR)/%) $(INST_CONFBIN:%=$(CONFBIN_INSTALL_DIR)/%) + + +clean: $(SUBDIRS:%=clean--%) + rm -f $(CLEAN_FILES) + rm -rf $(CLEAN_DIRS) + +clean-all: $(SUBDIRS:%=clean-all--%) + rm -f $(CLEAN_FILES) $(UNINST_FILES) + rm -rf $(CLEAN_DIRS) + +clean-self: clean + +################################################################################# + +%.o: %.c + $(CC) -MD -MT $(@:%.o=%.os) -MT $@ -MF $(@D)/.$(@F:%.o=%.d) -MP $(AGLCPPFLAGS) $(AGLCFLAGS) -c -o $@ $< +ifeq ($(SAFLAG),on) + $(SATOOL) $(AGLCPPFLAGS) $(AGLCFLAGS) -c $< +endif + +%.o: %.cc + $(CXX) -MD -MT $(@:%.o=%.os) -MT $@ -MF $(@D)/.$(@F:%.o=%.d) -MP $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c -o $@ $< +ifeq ($(SAFLAG),on) + $(SATOOL) $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c $< +endif + +%.o: %.cpp + $(CXX) -MD -MT $(@:%.o=%.os) -MT $@ -MF $(@D)/.$(@F:%.o=%.d) -MP $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c -o $@ $< +ifeq ($(SAFLAG),on) + $(SATOOL) $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c $< +endif + +%.o: %.S + $(CC) -MD -MT $(@:%.o=%.os) -MT $@ -MF $(@D)/.$(@F:%.o=%.d) -MP $(AGLCPPFLAGS) $(AGLASFLAGS) -c -o $@ $< + +%.os: %.c + $(CC) -MD -MT $(@:%.os=%.o) -MT $@ -MF $(@D)/.$(@F:%.os=%.d) -MP $(AGLPICFLAGS) $(AGLCPPFLAGS) $(AGLCFLAGS) -c -o $@ $< +ifeq ($(SAFLAG),on) + $(SATOOL) $(AGLPICFLAGS) $(AGLCPPFLAGS) $(AGLCFLAGS) -c $< +endif + +%.os: %.cc + $(CXX) -MD -MT $(@:%.os=%.o) -MT $@ -MF $(@D)/.$(@F:%.os=%.d) -MP $(AGLPICFLAGS) $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c -o $@ $< +ifeq ($(SAFLAG),on) + $(SATOOL) $(AGLPICFLAGS) $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c $< +endif + +%.os: %.cpp + $(CXX) -MD -MT $(@:%.os=%.o) -MT $@ -MF $(@D)/.$(@F:%.os=%.d) -MP $(AGLPICFLAGS) $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c -o $@ $< +ifeq ($(SAFLAG),on) + $(SATOOL) $(AGLPICFLAGS) $(AGLCPPFLAGS) $(AGLCXXFLAGS) -c $< +endif + +%.os: %.S + $(CC) -MD -MT $(@:%.os=%.o) -MT $@ -MF $(@D)/.$(@F:%.os=%.d) -MP $(AGLPICFLAGS) $(AGLCPPFLAGS) $(AGLASFLAGS) -c -o $@ $< + +.%.out.rule: + @echo '$*.out: $$(call OBJS,$*)' > $@ + @echo ' @rm -f $$(@:%=.%.libdep)' >> $@ + @echo ' $$(LINK) $$(AGLLDFLAGS) -Wl,-rpath=$$(RPATH) -Wl,-rpath-link=$$(RPATHLINK),-Map=$$(@:%.out=%.map) $$(call OBJS,$*) $($(*F)_LDLIBS) $$(AGLLDLIBS) -o $$@' >> $@ + @echo ' @awk '\''$$$$1=="LOAD" && $$$$2~/\.a$$$$/{print("$$@:", $$$$2);print($$$$2 ":")}'\'' $$(@:%.out=%.map) > $$(@:%=.%.libdep)' >> $@ + +.%.a.rule: + @echo '$*.a: $$(call OBJS,$*)' > $@ + @echo ' $$(AR) $$(AGLARFLAGS) $$@ $$?' >> $@ + +.%.so.rule: + @echo '$*.so: $$(call SOBJS,$*)' > $@ + @echo ' $$(call INST_DUMMY,$*.so)' >> $@ + @test -f $*.ver && echo ' $$(LINK_SHLIB) -shared $$(AGLLDFLAGS) $($(*F)_LDFLAGS) $$(AGLLDLIBS) -Wl,-rpath=$$(RPATH) -Wl,-soname=$*.so,-Map=$$(@:%.so=%.map),--version-script,$*.ver $$^ -o $$@' >> $@ || echo ' $$(LINK_SHLIB) -shared $$(AGLLDFLAGS) $($(*F)_LDFLAGS) $$(AGLLDLIBS) -Wl,-rpath=$$(RPATH) -Wl,-soname=$*.so,-Map=$$(@:%.so=%.map) $$^ -o $$@' >> $@ + @echo ' $$(call CLEAN_DUMMY)' >> $@ + +.%.ipc.rule: + @echo 'ipc_name:=$(shell echo $* | tr A-Z a-z)' > $@ + @echo '$$(ipc_name)_client.h $$(ipc_name)_client.c $$(ipc_name)_server.h $$(ipc_name)_server.c: $*.api $$(IPC_MKSTUB)' >> $@ + @echo ' $$(IPC_MKSTUB) $$(AGLCPPFLAGS) $$(IPC_MKSTUB_FLAGS) $$<' >> $@ + @echo >> $@ + @echo '$*.api:' >> $@ + @echo >> $@ + +################################################################################ + +# +# If you write a pattern of smbols that the library may export, +# it checks for unmatched symbols at installation time. +# +# (example) +# libfoo_SYMBOL_PATTERN = ^(foo|FOO)_ +# libbar_SYMBOL_PATTERN = ^(bar|Bar) +# + +$(LIB_INSTALL_DIR)/%.so: %.so + $(INSTALL_SHLIB) + $(INSTALL_EXT) + @test -z '$($*_SYMBOL_PATTERN)' || $(NM) -f posix -o $< \ + | awk 'NF>=3 && $$3~/[ABCDGRST]/ && $$2!~/^(_DYNAMIC|_GLOBAL_OFFSET_TABLE_|_edata|_end|__)/ && $$2!~/$($*_SYMBOL_PATTERN)/ \ + {print $$1, "WARNING: A symbol ", $$2, " that does not match the registered pattern $($*_SYMBOL_PATTERN) is included." > "/dev/stderr"}' + +$(LIB_INSTALL_DIR)/%.a: %.a + $(INSTALL_LIB) + @test -z '$($*_SYMBOL_PATTERN)' || $(NM) -f posix -o $< \ + | awk 'NF>=3 && $$3~/[ABCDGRST]/ && $$2!~/$($*_SYMBOL_PATTERN)/ \ + {print $$1, "WARNING: A symbol ", $$2, " that does not match the registered pattern $($*_SYMBOL_PATTERN) is included." > "/dev/stderr"}' +################################################################################# + +ifneq ($(strip $(SUBDIRS)),) +$(SUBDIRS:%=all-%): + @set -e; \ + dir=`pwd`; \ + subdir=$(@:all-%=%); \ + echo "leve:$(MAKELEVEL) dir:`basename $$dir` SUBDIR:$$subdir ==START==" ; \ + $(MAKE) -C $(@:all-%=%) all; \ + echo "leve:$(MAKELEVEL) dir:`basename $$dir` SUBDIR:$$subdir ==END=="; + +$(SUBDIRS:%=install--%): + @set -e; \ + dir=`pwd`; \ + subdir=$(@:install--%=%); \ + echo "leve:$(MAKELEVEL) dir:`basename $$dir` SUBDIR:$$subdir ==START==" ; \ + $(MAKE) -C $(@:install--%=%) install; \ + echo "leve:$(MAKELEVEL) dir:`basename $$dir` SUBDIR:$$subdir ==END=="; + +$(SUBDIRS:%=install-header-r-%): + @set -e; \ + dir=`pwd`; \ + subdir=$(@:install-header-r-%=%); \ + echo "leve:$(MAKELEVEL) dir:`basename $$dir` SUBDIR:$$subdir ==START==" ; \ + $(MAKE) -C $(@:install-header-r-%=%) install-header-r; \ + echo "leve:$(MAKELEVEL) dir:`basename $$dir` SUBDIR:$$subdir ==END=="; + + +$(SUBDIRS:%=clean--%): + @$(MAKE) -C $(@:clean--%=%) clean + +$(SUBDIRS:%=clean-all--%): + @echo "$@ ==Start==" + @$(MAKE) -C $(@:clean-all--%=%) clean-all + @echo "$@ ==End==" + +endif + + +################################################################################# + +ifeq ($(MAKECMDGOALS),all) +-include $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + +ifeq ($(MAKECMDGOALS),) +-include $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + +ifeq ($(MAKECMDGOALS),install) +-include $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif +ifeq ($(MAKECMDGOALS),install-test) +-include $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif +ifeq ($(MAKECMDGOALS),install-test-exec) +-include $(PROG_RULES) $(TESTPROG_RULES) $(PROG_DEPS) $(TESTPROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + +ifeq ($(MAKECMDGOALS),test) +-include $(TESTPROG_RULES) $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + +ifeq ($(MAKECMDGOALS),run-ct-local) +-include $(TESTPROG_RULES) $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + +ifeq ($(MAKECMDGOALS),run-itv2-local) +-include $(TESTPROG_RULES) $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + +ifeq ($(MAKECMDGOALS),run-ut-local) +-include $(TESTPROG_RULES) $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + +ifeq ($(MAKECMDGOALS),run-it-local) +-include $(TESTPROG_RULES) $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + + + +ifeq ($(MAKECMDGOALS),test-exec) +-include $(TESTPROG_RULES) $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) $(ARLIB_RULES) +endif + + +ifeq ($(MAKECMDGOALS),build-prog) +-include $(PROG_RULES) $(PROG_DEPS) $(PROG_LIBDEPS) +endif + +ifeq ($(MAKECMDGOALS),build-testdriver) +-include $(PROG_RULES) $(TESTPROG_RULES) $(TESTPROG_DEPS) $(TESTPROG_LIBDEPS) +endif + +ifeq ($(MAKECMDGOALS),build-lib) +-include $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) +endif + +ifeq ($(MAKECMDGOALS),build-arlib) +-include $(SHLIB_RULES) $(LIB_RULES) $(LIB_DEPS) +endif + +ifeq ($(MAKECMDGOALS),build-shlib) +-include $(SHLIB_RULES) $(LIB_DEPS) +endif + +ifeq ($(MAKECMDGOALS),build-arlib) +-include $(ARLIB_RULES) $(LIB_DEPS) +endif + +ifeq ($(strip $(filter clean%,$(MAKECMDGOALS))),) +ifneq ($(IPC_API_RULES),) +-include $(IPC_API_RULES) $(IPC_API_DEPS) +endif +endif + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/rpc_rule.mk b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/rpc_rule.mk new file mode 100644 index 00000000..f5db71db --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/rpc_rule.mk @@ -0,0 +1,42 @@ +# +# @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# rpc rule makefile +# + +#rpc_apidef directory path must be added +RPC_APIDEF := $(OECORE_NATIVE_SYSROOT)/usr/bin/rpc_apidef + +RPC_API_RULES := $(RPC_API:%=.%.api.rule) +rpc_api := $(shell echo $(RPC_API) | tr A-Z a-z) +CLEAN_API_SRCS := $(rpc_api:%=%_api.h) $(rpc_api:%=%_api_stub.c) $(rpc_api:%=%_srvr.h) $(rpc_api:%=%_srvr_stub.c) +RPC_API_DEPS := $(rpc_api:%=%_api_stub.d) $(rpc_api:%=%_srvr_stub.d) + +.%.api.rule: + @echo 'rpc_name:=$(shell echo $* | tr A-Z a-z)' > $@ + @echo '$$(rpc_name)_api.h $$(rpc_name)_api_stub.c $$(rpc_name)_srvr.h $$(rpc_name)_srvr_stub.c: $*.api $$(RPC_APIDEF)' >> $@ + @echo ' $$(RPC_APIDEF) $$(CPPFLAGS) $$(RPC_APIDEF_FLAGS) $$<' >> $@ + @echo >> $@ + @echo '$*.api:' >> $@ + @echo >> $@ + +ifeq ($(strip $(filter clean%,$(MAKECMDGOALS))),) +ifneq ($(RPC_API_RULES),) +-include $(RPC_API_RULES) $(RPC_API_DEPS) +endif +endif + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/system_launcher_main.xml b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/system_launcher_main.xml new file mode 100644 index 00000000..ac34d29b --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-basefiles/files/share/system_launcher_main.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + +]> + + + &system_launcher_body; + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/agl-systemd_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/agl-systemd_1.0.0.bb new file mode 100644 index 00000000..c10c348c --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/agl-systemd_1.0.0.bb @@ -0,0 +1,84 @@ +SUMMARY = "Systemd related file for launching sample application" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit systemd +S = "${WORKDIR}" +ALLOW_EMPTY_${PN} = "1" +BB_VERBOSE_LOGS = "1" + +SRC_URI += " \ + file://LICENSE \ + file://env.txt \ + file://setup_refhw.service \ + file://launch_sm.service \ + file://systemd-udev-trigger.service \ + file://99-agl.rules \ + file://agl-trigger.service \ + file://options.conf \ + file://tool_9E_SI \ + file://usr \ +" +FILES_${PN} += "\ + /tool_9E_SI/* \ + /usr/target/* \ + /usr/agl/* \ + /nv/* \ + /ramd/bkup \ + /etc/systemd/system/tmp.mount.d \ +" +SYSTEMD_SERVICE_${PN} = " \ + setup_refhw.service \ + launch_sm.service \ + agl-trigger.service \ +" +DEPENDS += " \ + libxml2-native \ + agl-basefiles-native \ +" +RDEPENDS_${PN} += " \ + procps \ + agl-basefiles \ + bash \ +" +do_compile[depends] += "agl-basefiles:do_populate_sysroot" +do_compile() { + cd ${WORKDIR}/usr/agl/conf/systemmanager + cpp -P -include ${STAGING_DIR_HOST}/usr/agl/include/sm_launch_conf.h ./sm_launch__CWORD84_.xml ./sm_launch.tmp.xml + ${STAGING_DIR_HOST}/usr/agl/share/launch_xml2cfg.sh ./sm_launch.tmp.xml > ./sm_launch.cfg +} +do_install() { + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/setup_refhw.service ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/agl-trigger.service ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/launch_sm.service ${D}/${systemd_unitdir}/system + install -d ${D}/etc/systemd/system + install -m 644 ${WORKDIR}/systemd-udev-trigger.service ${D}/etc/systemd/system + install -d ${D}/tool_9E_SI + install -m 644 ${WORKDIR}/*.txt ${D}/tool_9E_SI + install -m 755 ${WORKDIR}/tool_9E_SI/*.sh ${D}/tool_9E_SI + install -d ${D}/usr/target + install -m 644 ${WORKDIR}/usr/target/*.lst ${D}/usr/target + install -d ${D}/etc/systemd/system + install -d -m 775 ${D}/usr/agl/conf/systemmanager + install -m 644 ${WORKDIR}/usr/agl/conf/systemmanager/sm_launch.cfg ${D}/usr/agl/conf/systemmanager + install -d ${D}/lib/udev/rules.d + install -m 644 ${WORKDIR}/99-agl.rules ${D}/lib/udev/rules.d + install -d -m 777 ${D}/nv/export + install -d -m 777 ${D}/nv/backup + install -d -m 777 ${D}/nv/log/frameworkunifiedlog + install -d -m 777 ${D}/ramd/bkup + install -d ${D}/etc/systemd/system/tmp.mount.d + install -m 644 ${WORKDIR}/options.conf ${D}/etc/systemd/system/tmp.mount.d +} + +sysroot_stage_all_append(){ + sysroot_stage_dir ${D}/tool_9E_SI ${SYSROOT_DESTDIR}/tool_9E_SI + sysroot_stage_dir ${D}/usr/target ${SYSROOT_DESTDIR}/usr/target + sysroot_stage_dir ${D}/usr/agl ${SYSROOT_DESTDIR}/usr/agl + sysroot_stage_dir ${D}/usr/agl/conf/systemmanager ${SYSROOT_DESTDIR}/usr/agl/conf/systemmanager + sysroot_stage_dir ${D}/usr/agl/conf/backup_manager ${SYSROOT_DESTDIR}/usr/agl/conf/backup_manager + sysroot_stage_dir ${D}/nv/npp ${SYSROOT_DESTDIR}/nv/npp + sysroot_stage_dir ${D}/usr/agl/share ${SYSROOT_DESTDIR}/usr/agl/share + sysroot_stage_dir ${D}/etc/systemd/system/tmp.mount.d ${SYSROOT_DESTDIR}/etc/systemd/system/tmp.mount.d +} diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/99-agl.rules b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/99-agl.rules new file mode 100644 index 00000000..dd4e2456 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/99-agl.rules @@ -0,0 +1,11 @@ +#modify sound related device permissions + +SUBSYSTEM=="sound",MODE="0666" + +#modify dri related device permissions + +SUBSYSTEM=="drm",MODE="0777" + +#modify agl/evk related device permissions + +SUBSYSTEM=="evk",KERNEL=="agl/evk",MODE="0666" diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/LICENSE b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/LICENSE new file mode 100644 index 00000000..f433b1a5 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/agl-trigger.service b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/agl-trigger.service new file mode 100644 index 00000000..8cb752f0 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/agl-trigger.service @@ -0,0 +1,18 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +#After=weston.service + +[Service] +Type=oneshot +#RemainAfterExit=yes +EnvironmentFile=/tool_9E_SI/env.txt +ExecStart=/tool_9E_SI/agl_set_capability.sh + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/env.txt b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/env.txt new file mode 100644 index 00000000..48b83df4 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/env.txt @@ -0,0 +1,130 @@ +VEHICLEPARAMETERLIBRARY_AREA="AREA1" +XDG_RUNTIME_DIR="/run/user/0" +AGL_NFS="y" +VEHICLEPARAMETERLIBRARY_BRAND="BRAND1" +LIBTHAI_DICTDIR="/usr/share/libthai" +TERM="xterm" +INIT_UID="1000" +INIT_GID="1000" +AGL_RWDATA_PATH="/nv" +LD_LIBRARY_PATH="/lib:/usr/lib:/usr/agl/lib:/usr/debug/lib" +ARB_OPT="FORCE_REBOOT" +PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/agl/bin:/usr/debug/bin:/usr/debug/sbin:/usr/debug/usr/bin:/usr/debug/usr/sbin" +PWD="/dev/mqueue" +OLDPWD="/dev/mqueue" +SHLVL="1" +ALSA_CONFIG_PATH="/usr/share/alsa/alsa.conf" +GPF_LOGFLAG="0x00000003" +GPF_LOGLEVEL_DEBUG="0x00000000" +_CWORD84__IPADDR="192.168.128.129" +AGL_ON_SHELL="y" +AGL_DEVDIAG_FLAG="ON" +_="/usr/bin/printenv" +UDEV_CONFIG_FILE="/etc/udev/udev.conf" +VP_VEHICLEPARAMETERLIBRARY_version="AAAAAAAAA0001" +VP_VEHICLEPARAMETERLIBRARY_maker_ID="00000-00000" +VP_VEHICLEPARAMETERLIBRARY_area="AREA1" +VP_VEHICLEPARAMETERLIBRARY_grade="GRADE1" +VP_VEHICLEPARAMETERLIBRARY_model_ID="XXXXXXXX-XXXX" +VP_VEHICLEPARAMETERLIBRARY_dest_c_code="" +VP_VEHICLEPARAMETERLIBRARY_DAB_tuner_num="0" +VP_VEHICLEPARAMETERLIBRARY_AMP_type="built_in_AMP" +VP_VEHICLEPARAMETERLIBRARY_DISPLAY="InternalDisplay" +VP_VEHICLEPARAMETERLIBRARY_DECK="CD_DECK" +VP_VEHICLEPARAMETERLIBRARY_default_mode="home" +VP_VEHICLEPARAMETERLIBRARY_VOICE_RECOGNITION_TUTORIAL="available" +VP_VEHICLEPARAMETERLIBRARY_SEARCH="unavailable" +VP_VEHICLEPARAMETERLIBRARY_CONTACT="unavailable" +VP_VEHICLEPARAMETERLIBRARY_JPTrafficInfo_show="unavailable" +VP_VEHICLEPARAMETERLIBRARY_INFOMATION_MANAGEMENT="available" +VP_VEHICLEPARAMETERLIBRARY_WIFI_STA_ENABLE="False" +VP_VEHICLEPARAMETERLIBRARY_WIFI_AP_ENABLE="True" +VP_VEHICLEPARAMETERLIBRARY_WIFI_DIRECT_ENABLE="False" +VP_VEHICLEPARAMETERLIBRARY_HAS_GPS="y" +VP_VEHICLEPARAMETERLIBRARY__CWORD6_="n" +VP_VEHICLEPARAMETERLIBRARY_PHASE="3" +VP_VEHICLEPARAMETERLIBRARY__CWORD6_="unavailable" +VP_VEHICLEPARAMETERLIBRARY_CONNECTION_SERVER="TRY" +VP__CWORD31__version="XXXXXXXXX0001" +VP__CWORD31__class_type_of_LAN="CAN_08_10PF" +VP__CWORD31__reverse="direct" +VP__CWORD31__PKB="direct" +VP__CWORD31__ADIM__CWORD62_="direct_ADIM" +VP__CWORD31__telematics_function="CAN_judge" +VP__CWORD31__opening_picture="_CWORD31_" +VP__CWORD31__theme_color="pure_white" +VP__CWORD31__AC_onscreen="available" +VP__CWORD31__AC_screen_operation="available" +VP__CWORD31__AC_screen_home="available" +VP__CWORD31__AC_switch_front_temp="available" +VP__CWORD31__AC_temp_disp_outside="available" +VP__CWORD31__AC_temp_disp_setting="available" +VP__CWORD31__AC_switch_concierge="available" +VP__CWORD31__AC_switch_S_flow="available" +VP__CWORD31___CWORD11_="available" +VP__CWORD31___CWORD11__home="available" +VP__CWORD31___CWORD11__drive_wheel="FF" +VP__CWORD31___CWORD11__drive_type="2WD" +VP__CWORD31___CWORD11__battery_position="rear_tire" +VP__CWORD31___CWORD11__battery_direction="lateral" +VP__CWORD31___CWORD11__motor_position="Ahead" +VP__CWORD31___CWORD9__trip="available" +VP__CWORD31___CWORD9__trip="available" +VP__CWORD31___CWORD9__home_trip="available" +VP__CWORD31___CWORD9__fuel="available" +VP__CWORD31___CWORD9__home_fuel="available" +VP__CWORD31__FC_eco_safety_point_service="unavailable" +VP__CWORD31__FC_scale_GAS="5" +VP__CWORD31__FC_scale_HV="5" +VP__CWORD31__FC_energy_mark="30wh" +VP__CWORD31___CWORD9__type="type1" +VP__CWORD31__FC_SIGNAL="unavailable" +VP__CWORD31__display_setting_screen="unavailable" +VP__CWORD31__VR_HVAC_control="unavailable" +VP__CWORD31__clock_type="unavailable" +VP__CWORD31__start_up_BGM="unavailable" +VP__CWORD31__start_up_BGM_type="OFF" +VP__CWORD31__DTV_antenna_FL="unavailable" +VP__CWORD31__DTV_antenna_FR="unavailable" +VP__CWORD31__DTV_antenna_RL="unavailable" +VP__CWORD31__DTV_antenna_RR="unavailable" +VP__CWORD31__DTV_ANTENNA="unavailable" +VP__CWORD31__HF_voice_quality_type="0000" +VP__CWORD31__tune_knob_push="available" +VP__CWORD31__screen_switch_seek="unavailable" +VP__CWORD31__DAB_antenna="unavailable" +VP__CWORD31__hard_switch_beep="no_beep" +VP__CWORD31__screen_switch_beep="beep" +VP__CWORD31__steering_switch_type="2line_crosswise" +VP__CWORD31__steering_switch_tel="1buttom" +VP__CWORD31__class_circuit_mode="unavailable" +VP__CWORD31___CWORD67__warning="unavailable" +VP__CWORD31___CWORD67__accelerator="unavailable" +VP__CWORD31__panel_microcomputer="available" +VP__CWORD31__class_watch_at_brake_hold="unavailable" +VP__CWORD31__GPS_antenna="available" +VP__CWORD31__vehicle_signal_ILL="available" +VP__CWORD31__switch_trigger="unavailable" +VP__CWORD31__sensitivity_level="unavailable" +VP__CWORD31__invalidity_term="500" +VP__CWORD31__thumbnail_type="unavailable" +VP__CWORD31__BT_device_name="CAR MULTIMEDIA" +VP__CWORD31__eco_drive_max_volume="no_restriction" +VP__CWORD31__EOM_function="unavailable" +VP__CWORD31__Microphone_Type="_CWORD71__array" +VP__CWORD31__Microphone_Location="ohc" +VP__CWORD31__Wide_band_FM="unavailable" +VP__CWORD31__display_type="one_screen_8" +VP__CWORD31__clock_display="not_need" +VP__CWORD31__destination="[]" +VP__CWORD31__class_operation="touch" +VP__CWORD31__opening_interval="1" +VP__CWORD31__DES_function="unavailable" +VP__CWORD31__beep_sound_keys="" +VP_VEHICLEPARAMETERLIBRARY_SER_serial="00000000000" +VP_VEHICLEPARAMETERLIBRARY_SER_HELPNET_ID="000000000000000000000" +VP_VEHICLEPARAMETERLIBRARY_SER_map_update_ID="0000000000000000" +VP_VEHICLEPARAMETERLIBRARY_SER_ship_date="00000000" +VP_VEHICLEPARAMETERLIBRARY_SER_FACTORY_ID="0000000000000000000" +BT_ADDR="" +BT_DIAL="" diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/launch_sm.service b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/launch_sm.service new file mode 100644 index 00000000..8edc914e --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/launch_sm.service @@ -0,0 +1,22 @@ +[Unit] +Description=launch_sm +After=setup_refhw.service agl-trigger.service + +[Service] +PermissionsStartOnly=yes +EnvironmentFile=/tool_9E_SI/env.txt +ExecStartPre=/tool_9E_SI/set_cgroup_rt_runtime_us.sh 950000 +ExecStart=/tool_9E_SI/launch_sm.sh +Type=oneshot +User=root +StandardOutput=inherit +StandardError=inherit +RemainAfterExit=yes +LimitAS=infinity +LimitRSS=infinity +LimitCORE=infinity +LimitNOFILE=65536 +LimitMSGQUEUE=infinity + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/options.conf b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/options.conf new file mode 100644 index 00000000..05c48d97 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/options.conf @@ -0,0 +1,2 @@ +[Mount] +Options=rw,nodev diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/setup_refhw.service b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/setup_refhw.service new file mode 100644 index 00000000..10875b28 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/setup_refhw.service @@ -0,0 +1,15 @@ +[Unit] +Description=Initialize Reference Hardware Settings +After=weston.service + +[Service] +EnvironmentFile=/tool_9E_SI/env.txt +ExecStart=/tool_9E_SI/setup_refhw.sh +Type=oneshot +#StandardInput=tty +#TTYPath=/dev/tty1 +#TTYReset=yes +#TTYVHangup=yes + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/systemd-udev-trigger.service b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/systemd-udev-trigger.service new file mode 100644 index 00000000..07a3f30e --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/systemd-udev-trigger.service @@ -0,0 +1,22 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=udev Coldplug all Devices +Documentation=man:udev(7) man:systemd-udevd.service(8) +DefaultDependencies=no +Wants=systemd-udevd.service +After=systemd-udevd-kernel.socket systemd-udevd-control.socket systemd-hwdb-update.service +Before=sysinit.target +ConditionPathIsReadWrite=/sys + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=/tool_9E_SI/env.txt +ExecStartPre=/tool_9E_SI/set_capability.sh +ExecStart=/bin/udevadm trigger --type=subsystems --action=add ; /bin/udevadm trigger --type=devices --action=add diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/agl_set_capability.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/agl_set_capability.sh new file mode 100755 index 00000000..ac827d04 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/agl_set_capability.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ROMFILESTOP=/ +CAP_LST=${ROMFILESTOP}/usr/target/agl_cap.lst +echo `cat ${CAP_LST}` +#----------------------------------------------------------------------- +# Capability + +df / --exclude-type=nfs > /dev/null +IS_EMMC_BOOT=$? + +#*********************from init_nfs_cap.sh************************** + +echo "init_nfs-cap.sh: Start" + +VERBOSE=y +SKIPWARN=n +#----------------------------------------------------------------------- +# Set Capability for NFS or Set DummyLink for ROM +#CAP_LST="/usr/debug/share/target/cap.lst" +CAP_LST="/usr/target/agl_cap.lst" + +if [ $IS_EMMC_BOOT -ne 0 ]; then +if [ -f "${CAP_LST}" ];then + echo "*** set capability for NFS environment ***" + CAPPATH=/tmp/ + cd / + for PREAD in `cat ${CAP_LST}` + do + IFS_ORG=${IFS} ; IFS='|' ; PARAM=(${PREAD}) ; IFS=${IFS_ORG} + CAP_NAME=${PARAM[0]} ; FMODE=${PARAM[1]} ; FUID_GID=${PARAM[2]} + FCAP=${PARAM[3]} ; FKEEPORGPATH=${PARAM[4]} + if [ ! -f "${CAP_NAME}" -a ! -f "${CAP_NAME}.org" ];then + if [ "${SKIPWARN}" = "n" ];then + echo "set capability: ${CAP_NAME}: No such file or directory" 1>&2 + fi + continue + fi + TCAP_NAME="/tmp/${CAP_NAME##*/}" + # Set Capability for NFS + if [ ! -L "${CAP_NAME}" ]; then + cp -a ${CAP_NAME} ${TCAP_NAME} + if [ "${FKEEPORGPATH}" = "y" ];then + mv ${CAP_NAME} ${CAP_NAME}.org + ln -fs ${TCAP_NAME} ${CAP_NAME} + fi + else + cp -a ${CAP_NAME}.org ${TCAP_NAME} + fi + if [ -n "${FUID_GID}" ];then + chown ${FUID_GID} ${TCAP_NAME} + fi + if [ -n "${FMODE}" ];then + chmod ${FMODE} ${TCAP_NAME} + fi + if [ -n "${FCAP}" ];then + setcap ${FCAP} ${TCAP_NAME} + #if [ "${VERBOSE}" = "y" ];then + # getcap ${TCAP_NAME} + #fi + fi + done + cd - > /dev/null +else + unset CAPPATH +fi +fi diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/launch_sm.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/launch_sm.sh new file mode 100755 index 00000000..ed1e8d12 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/launch_sm.sh @@ -0,0 +1,26 @@ +#!/bin/bash -x +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# launch SS_SystemManager +export APPS_CONFIG_FILENAME=sm_launch.cfg +export SM_CONFIG_DATA_FILENAME=gpf_ss_sm_config_data.cfg +export XDG_RUNTIME_DIR=/run/user/0 +cd /usr/agl/bin/ +rm -rf /nv/romaccess +rm /dev/shm/lockfile + +/usr/agl/bin/SS_SystemManager & diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_capability.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_capability.sh new file mode 100755 index 00000000..aa9b78de --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_capability.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ROMFILESTOP=/ +CAP_LST=${ROMFILESTOP}/usr/target/cap.lst +echo `cat ${CAP_LST}` +#----------------------------------------------------------------------- +# Capability + +df / --exclude-type=nfs > /dev/null +IS_EMMC_BOOT=$? + +#*********************from init_nfs_cap.sh************************** + +echo "init_nfs-cap.sh: Start" + +VERBOSE=y +SKIPWARN=n +#----------------------------------------------------------------------- +# Set Capability for NFS or Set DummyLink for ROM +#CAP_LST="/usr/debug/share/target/cap.lst" +CAP_LST="/usr/target/cap.lst" + +if [ $IS_EMMC_BOOT -ne 0 ]; then +if [ -f "${CAP_LST}" ];then + echo "*** set capability for NFS environment ***" + CAPPATH=/tmp/ + cd / + for PREAD in `cat ${CAP_LST}` + do + IFS_ORG=${IFS} ; IFS='|' ; PARAM=(${PREAD}) ; IFS=${IFS_ORG} + CAP_NAME=${PARAM[0]} ; FMODE=${PARAM[1]} ; FUID_GID=${PARAM[2]} + FCAP=${PARAM[3]} ; FKEEPORGPATH=${PARAM[4]} + if [ ! -f "${CAP_NAME}" -a ! -f "${CAP_NAME}.org" ];then + if [ "${SKIPWARN}" = "n" ];then + echo "set capability: ${CAP_NAME}: No such file or directory" 1>&2 + fi + continue + fi + TCAP_NAME="/tmp/${CAP_NAME##*/}" + # Set Capability for NFS + if [ ! -L "${CAP_NAME}" ]; then + cp -a ${CAP_NAME} ${TCAP_NAME} + if [ "${FKEEPORGPATH}" = "y" ];then + mv ${CAP_NAME} ${CAP_NAME}.org + ln -fs ${TCAP_NAME} ${CAP_NAME} + fi + else + cp -a ${CAP_NAME}.org ${TCAP_NAME} + fi + if [ -n "${FUID_GID}" ];then + chown ${FUID_GID} ${TCAP_NAME} + fi + if [ -n "${FMODE}" ];then + chmod ${FMODE} ${TCAP_NAME} + fi + if [ -n "${FCAP}" ];then + setcap ${FCAP} ${TCAP_NAME} + if [ "${VERBOSE}" = "y" ];then + getcap ${TCAP_NAME} + fi + fi + done + cd - > /dev/null +else + unset CAPPATH +fi +fi diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_cgroup_rt_runtime_us.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_cgroup_rt_runtime_us.sh new file mode 100755 index 00000000..41536f2c --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/set_cgroup_rt_runtime_us.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +desired_rt_runtime_us=$1 +mygroup=${2:-$(awk -F: '$2 == "cpu,cpuacct" {print $3}' /proc/self/cgroup)} + +[[ $desired_rt_runtime_us -gt 0 ]] || exit +[[ $mygroup ]] || exit +[[ $mygroup = / ]] && exit + +echo "${0##*/}: setting cpu.rt_runtime_us for $mygroup" >&2 + +cgpath= +IFS=/ read -ra cgroups <<< "${mygroup:1}" +for cg in "${cgroups[@]}"; do + cgpath="${cgpath}/${cg}" + echo "${0##*/}: $desired_rt_runtime_us -> /sys/fs/cgroup/cpu,cpuacct${cgpath}" >&2 + echo "$desired_rt_runtime_us" > /sys/fs/cgroup/cpu,cpuacct${cgpath}/cpu.rt_runtime_us +done diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/setup_refhw.sh b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/setup_refhw.sh new file mode 100755 index 00000000..1f9501cb --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/tool_9E_SI/setup_refhw.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# +# @copyright Copyright (c) 2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#to expand msg_max +sysctl -w fs.mqueue.msg_max=512 + +# device detection +echo -n "TARGET_BOARD=" > /tmp/udev_device.env +cat /proc/device-tree/model | cut -d " " -f 2 >> /tmp/udev_device.env +echo >> /tmp/udev_device.env +echo "UID=$INIT_UID" >> /tmp/udev_device.env +echo "GID=$INIT_GID" >> /tmp/udev_device.env +echo "BRAND=$VEHICLEPARAMETERLIBRARY_BRAND" >> /tmp/udev_device.env +echo "AREA=$VEHICLEPARAMETERLIBRARY_AREA" >> /tmp/udev_device.env + +# Start: Workaround for release ############################################### +## Sprint 29 To make WebService can update contents. +#chown -R agl:agl /usr/agl/data/electronicom +## For btservice initial data. +#chown -R agl:agl /nv/backup/D_BK_CA_BT_MANAGEMENT +## Sprint 29 PFDRECThread +mkdir -p /ramd/log/frameworkunifiedlog/diag +#chmod 777 /ramd/log/frameworkunifiedlog/diag +touch /dev/mmcblk0p9 +chmod 660 /dev/mmcblk0p9 +## Sprint 29 communication +#chmod -R 777 /home/root/.app_can_d +# TODO:for bluetooth_service +#chmod 777 /usr/agl/share + +if ! `df / --exclude-type=nfs > /dev/null`; then +cp /sbin/insmod.kmod /tmp/insmod.kmod +ln -s -f /tmp/insmod.kmod /sbin/insmod +setcap cap_sys_module+ep /tmp/insmod.kmod +fi + +## Sprint 32 Positioning +#chmod 777 /dev/ttySC3 +#chmod -R 777 /home/root/.app_gps_cmd_d + +## Sprint 37 BUG17P-9 clock +ln -f -s /tmp/bs/clock/localtime /etc/localtime + +# END: Workaround for release ################################################# + +# permission setting +# wait for weston is properly launched +#until [ -e /run/user/0/wayland-0 ] +#do +# usleep 50000 +#done +#chmod 777 /run/user/0/wayland-0 + +mkdir /tmp/shm + +chmod 777 /tmp/shm +chmod 666 /dev/mqueue/IccSnd +#chmod 777 /dev/mqueue/* +#chmod 777 /dev/mqueue/NS_NPPService +#chmod 777 /run/user/0 + +rm -rf /nv/romaccess +rm /dev/shm/lockfile + + + + +export PATH=`echo -n ${PATH} | sed 's|/tmp:||'` + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch.cfg b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch.cfg new file mode 100644 index 00000000..50a18c9a --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch.cfg @@ -0,0 +1,10 @@ +# This file is created from ./sm_launch.tmp.xml. +[ModulesLaunchConfig] +Launch1=CoreModules|1|0|False|NS_NPPService|/usr/agl/bin/NS_NPPService|0|True|0|-a SS_SysManager -r output=0x2|NULL|NULL|False|True|20|1000||||||0x0 +Launch2=CoreModules|1|0|False|NS_BackupMgr|/usr/agl/bin/NS_BackupMgr|0|True|0|-l console|NULL|NULL|True|True|15|1000||||||0x0 +Launch3=SS_Logger|2|0|False|SS_LoggerSrv|/usr/agl/bin/SS_LoggerService|0|True|0|-l console -p thrd=pdg.LogQueReader:30,thrd=pdg.TransmitQueReader:30,thrd=pdg.DumpQueReader:11,thrd=pdg.PerformanceQueReader:11,thrd=pdg.LogQueWriter:30,thrd=pdg.TransmitQueWriter:30,thrd=pdg.EvntLogQue:8,thrd=pdg.UdpQueWriter:10|NULL|NULL|True|True|10|1000||||||0x0 +Launch4=ShadowModules|3|0|False|Communication|/usr/agl/bin/communication|0|True|0|-l console|NULL|NULL|True|False|20|1000||||||0x0 +Launch5=VehicleModules|4|0|False|Positioning|/usr/agl/bin/Positioning|0|True|0|NULL|NULL|NULL|True|False|0|1000||||||0x0 +Launch6=SystemModules|5|0|False|SS_PowerService|/usr/agl/bin/SS_PowerService|0|True|0|-l console|NULL|NULL|True|False|0|1000||||||0x0 +Launch7=SystemModules|5|0|False|SS_TaskManager|/usr/agl/bin/tskmgr|0|True|0|-l console|NULL|NULL|True|True|0|1000||||||0x0 +Launch8=SystemModules|5|0|False|SS_ResourceMgr|/usr/agl/bin/resm|0|True|0|-l console|NULL|NULL|True|False|0|1000||||||0x0 diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch__CWORD84_.xml b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch__CWORD84_.xml new file mode 100755 index 00000000..8dd14bb7 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/agl/conf/systemmanager/sm_launch__CWORD84_.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/agl_cap.lst b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/agl_cap.lst new file mode 100644 index 00000000..89ea0961 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/agl_cap.lst @@ -0,0 +1,34 @@ +/usr/agl/bin/SS_SystemManager|||cap_sys_nice,cap_setuid,cap_setgid,cap_sys_resource+ep|y +/usr/agl/bin/tskmgr|||cap_sys_nice,cap_setuid,cap_setgid=ep|y +/usr/agl/bin/SS_DeviceDetectionService|||cap_setuid,cap_setgid,cap_sys_resource,cap_dac_override,cap_sys_admin+ep|y +/usr/agl/bin/communication|||cap_dac_override+ep|y +/usr/agl/bin/AS_AudioManager|||cap_sys_nice+ep|y +/usr/agl/bin/acmsrv|||cap_dac_override,cap_sys_admin,cap_sys_nice,cap_sys_resource,cap_chown,cap_fowner,cap_setgid,cap_setuid,cap_kill+ep|y +/usr/agl/bin/PS_SwitchHandler|||cap_sys_admin,cap_dac_override+ep|y +/usr/agl/bin/LockManager|||cap_kill+ep|y +/usr/agl/bin/nandupdate|||cap_dac_override+ep|y +/usr/agl/bin/wlan_controller|||cap_net_raw,cap_net_admin+ep|y +/usr/agl/bin/DummyRead|||cap_dac_read_search+ep|y +/usr/agl/bin/clock|||cap_sys_time+ep|y +/usr/agl/bin/Mounter|||cap_sys_admin,cap_dac_override+ep|y +/usr/agl/bin/MounterEx|||cap_sys_admin,cap_fowner,cap_dac_override,cap_chown+ep|y +/usr/agl/bin/DevReproService|||cap_chown,cap_fowner,cap_dac_override+ep|y +/usr/agl/bin/PS_CDR|||cap_sys_admin+ep|y +/usr/agl/bin/webdavmgr|||cap_net_admin,cap_net_raw+ep|y +/usr/agl/bin/DiagService|||cap_sys_rawio,cap_dac_override+ep|y +/usr/agl/bin/resm|||cap_setuid+ep|y +/usr/agl/bin/SS_LoggerService|||cap_dac_override+ep|y +/usr/agl/bin/NetworkManager|||cap_setuid,cap_setgid,cap_sys_admin,cap_chown,cap_kill,cap_net_raw,cap_net_admin,cap_net_bind_service+ep|y +/usr/agl/bin/RadioService|||cap_sys_nice+ep|y +/usr/agl/bin/ASND_VProxy|||cap_sys_nice+ep|y +/usr/agl/bin/misink|||cap_sys_nice+ep|y +/usr/agl/bin/mlink|||cap_sys_nice+ep|y +/usr/agl/bin/media_service|||cap_dac_override,cap_sys_nice+ep|y +/usr/agl/bin/_CWORD74__service|||cap_dac_override+ep|y +/usr/agl/bin/PlaybackService|||cap_sys_nice+ep|y +/usr/agl/bin/Positioning|||cap_dac_override+ep|y +/usr/agl/bin/vehicle|||cap_dac_override+ep|y +/usr/agl/bin/bluetooth_srv|||cap_dac_override,cap_sys_nice+ep|y +/usr/agl/bin/btd_srv|||cap_dac_override,cap_sys_nice+ep|y +/usr/agl/bin/NS_BackupMgr|||cap_dac_override+ep|y +/usr/agl/bin/Sound|||cap_dac_override+ep|y diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/cap.lst b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/cap.lst new file mode 100644 index 00000000..c27de10c --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/cap.lst @@ -0,0 +1,24 @@ +/bin/udevadm|||cap_dac_override+ep|y +/sbin/ifconfig|||cap_net_admin+ep|y +/usr/libexec/firmware|||cap_sys_rawio,cap_dac_override+ep|y +/usr/bin/fusedav|||cap_sys_admin+ep|y +/sbin/dhclient|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_chown,cap_kill,cap_sys_admin+ep|y +/sbin/dhcpd|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_chown,cap_kill,cap_sys_admin+ep|y +/usr/debug/bin/busybox|||cap_sys_module,cap_net_raw+ep|y +/sbin/insmod|||cap_sys_module+ep|y +/sbin/rmmod|||cap_sys_module+ep|y +/usr/sbin/xtables-multi|||cap_net_raw,cap_net_admin+ep|y +/usr/bin/fusermount|||cap_sys_admin+ep|y +/usr/bin/simple-mtpfs|||cap_sys_admin+ep|y +/sbin/slattach|||cap_net_admin+ep|y +/sbin/mkfs.ext4|||cap_dac_override+ep|y +/sbin/losetup|||cap_dac_override+ep|y +/usr/bin/aplay|||cap_sys_nice+ep|y +/usr/bin/modetest|||cap_sys_admin+ep|y +/sbin/fsck.ext4|||cap_dac_override+ep|y +/usr/sbin/tune2fs|||cap_dac_override+ep|y +/usr/bin/syslogd|||cap_dac_override+ep|y +/usr/bin/dnsmasq|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_chown,cap_kill,cap_setgid,cap_setuid,cap_sys_admin+ep|y +/usr/sbin/pppd|||cap_setuid,cap_sys_admin,cap_chown,cap_fowner,cap_kill,cap_net_admin,cap_dac_override+ep|y +/sbin/ip|||cap_net_bind_service,cap_net_admin,cap_net_raw+ep|y +/usr/bin/arping|||cap_net_bind_service,cap_net_admin,cap_net_raw,cap_setuid+ep|y diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/dir.lst b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/dir.lst new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/mntfs.lst b/meta-agl/meta-agl-basesystem/recipes-core/agl-systemd/files/usr/target/mntfs.lst new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-basesystem/recipes-core/elfio/elfio_3.2.bb b/meta-agl/meta-agl-basesystem/recipes-core/elfio/elfio_3.2.bb new file mode 100644 index 00000000..9d32de73 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/elfio/elfio_3.2.bb @@ -0,0 +1,19 @@ +SUMMARY = "elfio for SystemManager" +DESCRIPTION = "install elfio to build SystemManager" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=4f932e9ddd12264ae5e569aae5f08ed3" + +SRC_URI = "https://excellmedia.dl.sourceforge.net/project/elfio/ELFIO-sources/ELFIO-${PV}/${PN}-${PV}.tar.gz" +SRC_URI[md5sum] = "e1ddfc8d316fa6d03a04d8d1d6827663" + +FILES_${PN}-dev = "/usr/include/elfio/*" +ALLOW_EMPTY_${PN} = "1" + +do_patch[noexec] = "1" +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}/usr/include/elfio/ + cp ${WORKDIR}/${PN}-${PV}/elfio/* ${D}/usr/include/elfio/ +} diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/Makefile b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/Makefile new file mode 100644 index 00000000..2c37667b --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/Makefile @@ -0,0 +1,30 @@ +# @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Makefile for linux/drivers/agl +# +CFILES = evk_lib.c + +obj-m := evk_lib.o +evklib-objs := $(CFILES:.c=.o) + +U_INCLUDE += -I$(PWD) +U_INCLUDE += -I$(KERNEL_SRC)/include +ccflags-y += $(U_INCLUDE) + +all: + make -C $(KERNEL_SRC) M=$(PWD) modules +clean: + make -C $(KERNEL_SRC) M=$(PWD) clean + diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/agldd.h b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/agldd.h new file mode 100644 index 00000000..112dbaea --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/agldd.h @@ -0,0 +1,94 @@ +/* + * adcpf common header + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _AGLDD_H_ +#define _AGLDD_H_ +#ifdef __KERNEL__ +#include +#else +#include +#if !defined(__cplusplus) +#include +#endif /* !defined(__cplusplus) */ +#endif /* __KERNEL__ */ + +#ifndef __KERNEL__ +#define __LINUX_ARM_ARCH__ 7 +#define BITS_PER_LONG 32 + +#define __AGLDD_TYPEDEF_I64 +typedef long long i64; /* 8-byte signed integer */ + +#define __AGLDD_TYPEDEF_U64 +typedef unsigned long long u64; /* 8-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_U32 +typedef unsigned long u32; /* 4-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_U16 +typedef unsigned short u16; /* 2-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_I16 +typedef short i16; /* 2-byte signed integer */ + +#define __AGLDD_TYPEDEF_U8 +typedef unsigned char u8; /* 1-byte unsigned integer */ + +#define __AGLDD_TYPEDEF_I8 +typedef char i8; /* 1-byte signed integer */ +#endif + +#define __AGLDD_TYPEDEF_INT8 +typedef signed char INT8; + +#define __AGLDD_TYPEDEF_INT16 +typedef signed short INT16; + +#define __AGLDD_TYPEDEF_INT32 +typedef signed int INT32; + +#define __AGLDD_TYPEDEF_INT64 +typedef signed long long INT64; + +#define __AGLDD_TYPEDEF_UINT8 +typedef unsigned char UINT8; + +#define __AGLDD_TYPEDEF_UINT16 +typedef unsigned short UINT16; + +#define __AGLDD_TYPEDEF_UINT32 +typedef unsigned int UINT32; + +#define __AGLDD_TYPEDEF_UINT64 +typedef unsigned long long UINT64; + +#ifndef __KERNEL__ +#if !defined __WIN_TYPEDEF_BOOL +#define __AGLDD_TYPEDEF_BOOL +typedef UINT32 BOOL; +#endif +#endif + +#ifndef TRUE +#define TRUE true +#endif +#ifndef FALSE +#define FALSE false +#endif + +#endif/* _AGLDD_H_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_common.h b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_common.h new file mode 100644 index 00000000..0cc1183c --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_common.h @@ -0,0 +1,135 @@ +/** + * @file ev_common.h + * @brief Event library -- User kernel common data structure + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _ev_common_h_ +#define _ev_common_h_ + +#include + +/** @addtogroup EV + * @{ */ +/** @brief Maximum number of bytes for message event */ +#define EV_MAX_MESSAGE_LENGTH 2048 + +/** @brief -Maximum number of flag queue that can be created within a thread */ +#define EV_MAX_IDS_IN_THREAD 24 + +/** @brief -Muximum number of threads that can be registered to the EV in a process */ +#define EV_MAX_THREADS_IN_PROCESS 16 + +/** @brief -Maximum number of flag queue that can be creat within a process + */ +#define EV_MAX_IDS_IN_PROCESS \ + (EV_MAX_IDS_IN_THREAD * EV_MAX_THREADS_IN_PROCESS) + +/** @brief Return values for even library function + * + * @see EV_ERR + */ +enum ev_err +{ + EV_OK = 0, /**< Normal completion */ + EV_ERR_Exist, /**< The specified flag message queue does exist */ + EV_ERR_Invalid_ID, /**< The specified flag message queue does not exist */ + EV_ERR_Busy, /**< Message queue full failed to send */ + EV_ERR_Interrupted, /**< Waiting function was interrupted by an interrupt */ + EV_ERR_Thread_Over, /**< Exceeding the number of threads in the process */ + EV_ERR_Invalid_Thread, /**< Invalid thread ID */ + EV_ERR_Fatal, /**< Fatal error */ +}; +/** @brief Return values type for even library function + * + * @see ev_err + */ +typedef INT32 EV_ERR; + +/** @brief Event type + * + * Use in the type of EV_Event structs + * @see ev_type + */ +typedef UINT32 EV_Type; + +/** @brief Bit value representing the type of event */ +enum ev_type { + EV_EVENT_None = 0x00000000, + + /** Flag event: Judged by EV_EVENT_IS_FLAG() */ + EV_EVENT_Flag = 0x0001, +#define EV_EVENT_IS_FLAG(tp) (((tp) & EV_EVENT_Flag) != 0) + + /** Message event: Judged by EV_EVENT_IS_MESSAGE() */ + EV_EVENT_Message = 0x0002, +#define EV_EVENT_IS_MESSAGE(tp) (((tp) & EV_EVENT_Message) != 0) + + /** 64bit flag event: Judged by EV_EVENT_IS_FLAG64() */ + EV_EVENT_Flag64 = 0x0003, +#define EV_EVENT_IS_FLAG64(tp) (((tp) & EV_EVENT_Flag64) != 0) + +}; + +/** @brief Flag event structure */ +typedef struct { + EV_ID flagID;/**< Flag ID */ + UINT32 bits;/**< Bit pattern */ +} EV_Flag; + +/** @brief 64bit flag event structure */ +typedef struct { + EV_ID flagID;/**< Flag ID */ + UINT64 bits;/**< Bit pattern */ +} EV_Flag64; + +/** @brief Message event structure */ +typedef struct { + EV_ID queueID;/**< queue ID */ + UINT32 senderInfo;/**< Source information */ + UINT32 length;/**< Number of bytes in the message */ + UINT32 dummy;/** dummy for pading */ + UINT8 message[EV_MAX_MESSAGE_LENGTH];/**< Message */ +} EV_Message; + +/** @brief Event structure */ +typedef struct { + EV_Type type; /**< Event type */ + union { + EV_Flag flag; /**< Flag event structure */ + EV_Flag64 flag64; /**< Flag event structure */ + EV_Message message; /**< Message event structure */ + } u; /**< Union of structures per eventtype */ +} EV_Event; + +/** @brief Message event queue type + * + * Specify the action to be taken when the queue overflows (more events are received when the queue is full). + */ +enum ev_message_queue_type { + EV_MESSAGE_QUEUE_TYPE_BUSY,/**< Return a BUSY to the source */ + EV_MESSAGE_QUEUE_TYPE_FIFO,/**< Delete the oldest event */ + EV_MESSAGE_QUEUE_TYPE_REPLACE,/**< Replace the most recent event */ +}; + +/** @brief Messge event queue type + * + * @see ev_message_queue_type + */ +typedef UINT8 EV_Message_Queue_Type; + +/** @} */ + +#endif /* !_ev_common_h_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_id.h b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_id.h new file mode 100644 index 00000000..2026ef79 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/ev_id.h @@ -0,0 +1,104 @@ +/** + * @file ev_id.h + * @brief Event library(kernel) -- Defining flag queue ID + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _ev_id_h_ +#define _ev_id_h_ + +/** @addtogroup EV_ID_spec + * @{ */ + +/** @brief Flag ID and queue ID types used when sending and receiving events + * + * Assign a 32-bit value as follows + * + * - Most significant 8 bits: Reserved + * - Next 16 bits: Modue ID + * - Lower 8 bits: Define in module + * + * Where module is the modules that creates the queue. + * The modules define ID according to the above assignments using EV_Flag_ID_Base and EV_Queue_ID_Base macros. + * @see EV_Flag_ID_Base + * @see EV_Queue_ID_Base + */ +typedef UINT32 EV_ID; + +#define EV_ID_BIT 0x80000000UL +#define EV_FLAG64_BIT 0x40000000UL +#define EV_FLAG_BIT 0x20000000UL +#define EV_QUEUE_BIT 0x10000000UL +#define EV_AUTO_ID_BIT 0x08000000UL +#define EV_RESERVED_BIT 0xff000000UL +#define EV_INVALID_ID EV_ID_BIT +#define EV_NO_ID EV_INVALID_ID + +#define EV_ID_IS_FLAG(queueID) \ + (((queueID) & (EV_ID_BIT|EV_FLAG_BIT)) == (EV_ID_BIT|EV_FLAG_BIT)) +#define EV_ID_IS_FLAG64(queueID) \ + (((queueID) & (EV_ID_BIT|EV_FLAG64_BIT)) == (EV_ID_BIT|EV_FLAG64_BIT)) +#define EV_ID_IS_QUEUE(queueID) \ + (((queueID) & (EV_ID_BIT|EV_QUEUE_BIT)) == (EV_ID_BIT|EV_QUEUE_BIT)) +#define EV_ID_IS_AUTO_ID(queueID) \ + (((queueID) & (EV_ID_BIT|EV_AUTO_ID_BIT)) == (EV_ID_BIT|EV_AUTO_ID_BIT)) +#define EV_ID_IS_VALID(queueID) \ + (EV_ID_IS_FLAG(queueID) || EV_ID_IS_FLAG64(queueID) || EV_ID_IS_QUEUE(queueID)) + +/** @brief Macros for defining flag ID + * + * Define the module ID as an argument as follows. + * - #define XXX_Module_ID 1 + * - #define XXX_Flag_ID_Base EV_Flag_ID_Base(XXX_Module_ID) + * - + * - #define XXX_Flag_foo (XXX_Flag_ID_Base + 1) + * - #define XXX_Flag_bar (XXX_Flag_ID_Base + 2) + * + * The module ID is 16 bits and 0 to 65535 can be specified. + * In addition, 0 to 255 added to Base can be defined as ID. + */ +#define EV_Flag_ID_Base(mod) (EV_ID_BIT|EV_FLAG_BIT|((mod)<<8)) + +/** @brief Macros for defining 64 bits flag ID + * + * Define the module ID as an argument as follows. + * - #define XXX_Module_ID 1 + * - #define XXX_Flag64_ID_Base EV_Flag64_ID_Base(XXX_Module_ID) + * - + * - #define XXX_Flag64_foo (XXX_Flag64_ID_Base + 1) + * - #define XXX_Flag64_bar (XXX_Flag64_ID_Base + 2) + * + * The module ID is 16 bits and 0 to 65535 can be specified. + * In addition, 0 to 255 added to Base can be defined as ID. + */ +#define EV_Flag64_ID_Base(mod) (EV_ID_BIT|EV_FLAG64_BIT|((mod)<<8)) + +/** @brief Macros for defining mesage queue ID + * + * Define the module ID as an argument as follows. + * - #define XXX_Module_ID 1 + * - #define XXX_Queue_ID_Base EV_Queue_ID_Base(XXX_Module_ID) + * - + * - #define XXX_Queue_foo (XXX_Queue_ID_Base + 1) + * - #define XXX_Queue_bar (XXX_Queue_ID_Base + 2) + * + * The module ID is 16 bits and 0 to 65535 can be specified. + * In addition, 0 to 255 added to Base can be defined as ID. + */ +#define EV_Queue_ID_Base(mod) (EV_ID_BIT|EV_QUEUE_BIT|((mod)<<8)) + +/** @} */ + +#endif /* ! _ev_id_h_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/evk_lib.h b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/evk_lib.h new file mode 100644 index 00000000..416fb0f2 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/evk_lib.h @@ -0,0 +1,116 @@ +/** + * @file evk_lib.h + * @brief Event library -- API specifications for kernel modules + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _evk_lib_h_ +#define _evk_lib_h_ + +#include +#include +#include + +/* API definition */ + +/** @addtogroup EV + * @{ */ +#ifdef __KERNEL__ +/* Flag message queue create/delete */ +EV_ERR EVK_create_flag(EV_ID flagID); +EV_ERR EVK_create_flag64(EV_ID flagID); +EV_ERR EVK_create_queue(EV_ID queueID, + UINT8 length, + UINT16 max_bytes, + EV_Message_Queue_Type type); + +EV_ERR EVK_create_flag_auto_id(/* OUT */EV_ID *flagID); +EV_ERR EVK_create_flag64_auto_id(/* OUT */EV_ID *flagID); +EV_ERR EVK_create_queue_auto_id(/* OUT */EV_ID *queueID, + UINT8 length, + UINT16 max_bytes, + EV_Message_Queue_Type type); + +EV_ERR EVK_destroy_flag(EV_ID flagID); +EV_ERR EVK_destroy_queue(EV_ID queueID); + +/* Send events */ +EV_ERR EVK_set_flag(EV_ID flagID, UINT32 bits); +EV_ERR EVK_set_flag64(EV_ID flagID, UINT64 bits); +EV_ERR EVK_send_message(EV_ID queueID, UINT16 bytes, const void *message, + UINT32 senderInfo); + +/* Get event(with search conditions) */ +EV_ERR EVK_get_flag(EV_ID flagID, /* OUT */EV_Flag *flag); +EV_ERR EVK_wait_flag(EV_ID flagID, /* OUT */EV_Flag *flag);/* block */ +EV_ERR EVK_peek_flag(EV_ID flagID, /* OUT */EV_Flag *flag); +EV_ERR EVK_get_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag); +EV_ERR EVK_wait_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag);/* block */ +EV_ERR EVK_peek_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag); + +EV_ERR EVK_get_message(EV_ID queueID, /* OUT */EV_Message *message); +EV_ERR EVK_wait_message(EV_ID queueID, /* OUT */EV_Message *message);/* block */ +EV_ERR EVK_peek_message(EV_ID queueID, /* OUT */EV_Message *message); + +EV_ERR EVK_find_message_by_sender(EV_ID queueID, UINT32 senderInfo, + /* OUT */EV_Message *message); +EV_ERR EVK_find_message_by_content(EV_ID queueID, UINT16 length, + const void *compare_bytes, + /* OUT */EV_Message *message); +#endif + +/** @} */ + +/** @addtogroup EVK_in + * @{ */ +#define EVK_NAME "evk" +#define EVK_DEV_NAME "/dev/agl/"EVK_NAME +#define EVK_DEV_MAJOR (1033 % 256) +#define EVK_IOC_MAGIC 0xE7 + +#define EVK_IOC_CREATE_FLAG _IO(EVK_IOC_MAGIC, 0x00) +#define EVK_IOC_CREATE_FLAG64 _IO(EVK_IOC_MAGIC, 0x01) +#define EVK_IOC_CREATE_MESSAGE_QUEUE _IO(EVK_IOC_MAGIC, 0x02) +#define EVK_IOC_ALLOC_FLAG_ID _IO(EVK_IOC_MAGIC, 0x03) +#define EVK_IOC_ALLOC_FLAG64_ID _IO(EVK_IOC_MAGIC, 0x04) +#define EVK_IOC_ALLOC_QUEUE_ID _IO(EVK_IOC_MAGIC, 0x05) +#define EVK_IOC_DESTROY_QUEUE _IO(EVK_IOC_MAGIC, 0x06) +#define EVK_IOC_STORE_FLAG _IO(EVK_IOC_MAGIC, 0x07) +#define EVK_IOC_STORE_FLAG64 _IO(EVK_IOC_MAGIC, 0x08) +#define EVK_IOC_STORE_MESSAGE _IO(EVK_IOC_MAGIC, 0x09) +#define EVK_IOC_SET_POLL _IO(EVK_IOC_MAGIC, 0x0a) +#define EVK_IOC_GET_EVENT _IO(EVK_IOC_MAGIC, 0x0b) +#define EVK_IOC_PEEK_EVENT _IO(EVK_IOC_MAGIC, 0x0c) +#define EVK_IOC_WAIT_EVENT _IO(EVK_IOC_MAGIC, 0x0d) +#define EVK_IOC_GET_NEXT_EVENT _IO(EVK_IOC_MAGIC, 0x0e) +#define EVK_IOC_PEEK_NEXT_EVENT _IO(EVK_IOC_MAGIC, 0x0f) +#define EVK_IOC_DEBUG_LIST _IO(EVK_IOC_MAGIC, 0x10) + +typedef struct { + EV_ID queueID;/**< Queue ID */ + UINT32 max_bytes;/**< Maximum number of bytes for an event */ + UINT8 length;/**< Queue length */ + EV_Message_Queue_Type type;/**< Type */ +} EVK_Message_Queue_Request; + +typedef struct { + INT32 num; /**< Number of queue ID of search */ + EV_ID ids[EV_MAX_IDS_IN_PROCESS]; /**< Queue ID of search */ + EV_Event ev; /**< [OUT] First event that occured */ +} EVK_Next_Event_Query; + +/** @} */ + +#endif /* !_evk_lib_h */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/moduleid.h b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/moduleid.h new file mode 100644 index 00000000..b18c1a1e --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/agldd/moduleid.h @@ -0,0 +1,69 @@ +/* + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#ifndef _AGLDD_MODULEID_H_ +#define _AGLDD_MODULEID_H_ + +/* + * Define module ID to be used by programs in moduleid_id.h . + * Define in the format of "#define XXX_MID ID number" (XXX is the module name). + * + * MID allocation policy shall be as follows. + * - UI Application : 0xxxh + * - Application Service : 1xxxh to 2xxxh + * + HMI : 10xxh + * + AV : 12xxh + * + Radio : 14xxh + * + Connectivity : 16xxh + * + Navigation/Location: 18xxh + * + Vehicle : 1Axxh + * + Communication : 1Cxxh + * + BasePF : 1Exxh + * + System : 20xxh + * + Other : 22xxh + * - Common Service : 3xxxh + * - Extension Service : 4xxxh + * - System/Device Driver : 5xxxh + */ + +/* UI Application : 0xxxh */ + +/* Application Service : 1xxxh to 2xxxh */ +#define MODEMANAGER_MID 0x1000 +#define ACTIVITYMANAGER_MID 0x1001 + +/* Common Service : 3xxxh */ +#define IPMANAGER_MID 0x3000 +#define DEVICEMANAGER_MID 0x3001 +#define MSGBRK_MID 0x3002 +#define TIMERENTRYDRV_MID 0x3003 +#define SOUNDAGENT_MID 0x3004 +#define CAN_MID 0x3006 +#define _CWORD83__MID 0x3007 +#define SENSOR_MID 0x3008 +#define GPS_MID 0x3009 +#define RESMGR_MID 0x300A +#define GRAPHICS_MID 0x300B + +/* Extension Service : 4xxxh */ + +/* System/Device Driver : 5xxxh */ +#define EV_MID 0x5001 +#define RPC_MID 0x5002 +#define EVK_MID 0x5801 + +#endif /* !_AGLDD_MODULEID_H_ */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/evk_lib.c b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/evk_lib.c new file mode 100755 index 00000000..d5c1718e --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib-1.0.0/evk_lib.c @@ -0,0 +1,2246 @@ +/* + * drivers/agl/evk_lib.c + * + * Event library (kernel space part) + * + * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License published + * by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#ifndef STANDARD_INT_DEFINITIONS +#define STANDARD_INT_DEFINITIONS +typedef __u8 UINT8; +typedef __u16 UINT16; +typedef __u32 UINT32; +typedef __u64 UINT64; +typedef __s8 INT8; +typedef __s16 INT16; +typedef __s32 INT32; +typedef __s64 INT64; +#endif /* !STANDARD_INT_DEFINITIONS */ + +#define ENABLE_PROC_FS 1 + +#include + +/** @addtogroup EV_in */ +/** @{ */ +/** In Linux2.4, list_for_each_entry is not provided, so it is prepared by self (in 2.6) + */ +#ifdef list_for_each_entry +#define __LINUX_26_OR_HIGHER +#endif + +#ifndef __LINUX_26_OR_HIGHER /* linux v2.4 */ + +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + prefetch(pos->member.next); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member), \ + prefetch(pos->member.next)) + +#define list_for_each_entry_safe(pos, n, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + +#else /* linux v2.6 */ + +#include + +#endif /* linux v2.6 */ + +#define EVK_assert(cond, mesg) \ + if (!(cond)) { \ + printk(KERN_ALERT "[EVK]ASSERT(pid:%d): " #cond " at %s:%d; " \ + #mesg "\n", current->pid, __FILE__, __LINE__); \ + do {} while(1); \ + } + +#define EVK_BUG(mesg) \ + printk(KERN_ALERT "[EVK]BUG: " mesg); \ + do {} while(1); + +#if 0 +#define EVK_info0(s) printk(KERN_ALERT "[EVK]INFO: " s) +#define EVK_info1(s, t) printk(KERN_ALERT "[EVK]INFO: " s, t) +#else +#define EVK_info0(s) +#define EVK_info1(s, t) +#endif + +static int devmajor = EVK_DEV_MAJOR; +static int devminor = 0; +static int nrdevs = 1; +static struct cdev cdev; +static struct class *pClass; + +DEFINE_SEMAPHORE(evk_mtx); +static int down_pid; +static int down_line; +#define EVK_mutex_lock() { \ + down(&evk_mtx); \ + down_pid = current->pid; \ + down_line = __LINE__; \ +} +#define EVK_mutex_unlock() (up(&evk_mtx)) + +#ifdef EVK_USE_KMALLOC +#define evk_malloc(s) kmalloc((s), GFP_KERNEL) +#define evk_free kfree +#else // use vmalloc (this is the default) +#define evk_malloc(s) vmalloc((s)) +#define evk_free vfree +#endif + +enum { + evk_mem_user = 0, + evk_mem_kernel, +}; + +enum { + evk_enum_flag, + evk_enum_flag64, + evk_enum_queue, +}; + +#define GET_USER_OR_KERNEL(to, from) \ +({ \ + int err; \ + if (mem == evk_mem_user) { \ + err = __get_user((to), &(from)); \ + } else { \ + (to) = (from); \ + err = 0; \ + } \ + err; \ +}) + +#define PUT_USER_OR_KERNEL(value, to) \ +({ \ + int err; \ + if (mem == evk_mem_user) { \ + err = __put_user((value), &(to)); \ + } else { \ + (to) = (value); \ + err = 0; \ + } \ + err; \ +}) + + +/** @brief Common part of the flag structure and message queue structure */ +#define EVK_COMMON_QUEUE_ELEMS \ + struct list_head list; /**< List structure */ \ + wait_queue_head_t wq_head; /**< Wait_queue of a process waiting for a queue */\ + EV_ID queueID; /**< Flag ID/Queue ID */ \ + UINT32 seq_num; /**< Order of event arrival */ \ + pid_t read_pid; /**< Read process ID */ \ + pid_t pid; /**< Owning process ID */ + +/** @brief Common part of the flag structure and message queue structure */ +struct common_queue { + EVK_COMMON_QUEUE_ELEMS +}; + +/** @brief Flag structure */ +struct flag { + EVK_COMMON_QUEUE_ELEMS + UINT32 value;/**< Flags value */ +}; +#define EVK_PFLAG(queue) ((struct flag*)queue) + +/** @brief 64-bit flag structure */ +struct flag64 { + EVK_COMMON_QUEUE_ELEMS + UINT64 value;/**< Flags value */ +}; +#define EVK_PFLAG64(queue) ((struct flag64*)queue) + +/** @brief Message queue structure */ +struct message_queue { + EVK_COMMON_QUEUE_ELEMS + UINT8 type;/**< Type */ + UINT8 length;/**< Queue length */ + UINT8 num;/**< Number of messages stored */ + UINT8 readptr;/**< Next read position(0~length-1) */ + UINT32 max_bytes;/**< -Maximum bytes per message */ + UINT8 *message;/**< Message storage area (ring buffer) */ +}; +#define EVK_PQUEUE(queue) ((struct message_queue*)queue) + +/** @brief Number of bytes to allocate per message + * + * This function allocates an area to store the number of bytes actually stored, the time of occurrence, + * and the senderInfo, in addition to the number of bytes specified by max_bytes. + */ +#define EVK_message_block_size(max_bytes) (sizeof(UINT32) * 3 + (max_bytes)) + +#define HASH_KEY 15 + +/** @brief Maximum number of flags used by all systems */ +#define EVK_MAX_FLAGS 48 +/** @brief Maximum number of 64-bit flags used by all systems */ +#define EVK_MAX_FLAG64S 4 +/** @brief Maximum number of message event queues used by all systems */ +/* M1SP BM3547 MESSAGE_QUEUES 128->144 */ +/* M9AT BM2066 MESSAGE_QUEUES 144->218 */ +#define EVK_MAX_MESSAGE_QUEUES 224 + +/** @brief Allocate flag structure statically */ +static struct flag _flag_pool[EVK_MAX_FLAGS]; +/** @brief Statically allocates a 64-bit flag structure */ +static struct flag64 _flag64_pool[EVK_MAX_FLAG64S]; +/** @brief Beginning of the list of unused flags */ +static LIST_HEAD(flag_pool); +/** @brief Beginning of the list of unused 64-bit flags */ +static LIST_HEAD(flag64_pool); + +/** @brief Allocate message queue structure statically */ +static struct message_queue _message_queue_pool[EVK_MAX_MESSAGE_QUEUES]; +/** @brief Top of the list of unused message queues */ +static LIST_HEAD(message_queue_pool); + +/** @brief List of Flags/Message Queues in Use + * + * Connects the usage flag/message queue to a list for each hash value obtained from the ID. + * The hash value is the remainder of the ID divided by HASH_KEY. + */ +static struct list_head queue_entry[HASH_KEY]; + +/** @brief Sequence number to use during automatic ID assignment */ +static EV_ID sequence_id = 0; + +/** @brief Number to be assigned in order of occurrence of the event */ +static UINT32 sequence_number = 0; + +unsigned int +evk_get_queue_entry(struct list_head **entries) +{ + if (entries) { + *entries = queue_entry; + return HASH_KEY; + } + return 0; +} + +static __inline__ int +calc_hash(UINT32 val) +{ + return val % HASH_KEY; +} + +static __inline__ +struct flag * +alloc_flag(void) +{ + struct flag *queue; + //EVK_assert(!list_empty(&flag_pool), "flag pool empty"); + if (list_empty(&flag_pool)) { + printk("%s ERROR: flag pool empty\n", __func__); + return NULL; + } + queue = (struct flag *)flag_pool.next; + list_del_init(&(queue->list)); + return queue; +} + +static __inline__ +struct flag64 * +alloc_flag64(void) +{ + struct flag64 *queue; + //EVK_assert(!list_empty(&flag64_pool), "flag64 pool empty"); + if (list_empty(&flag64_pool)) { + printk("%s ERROR: flag64 pool empty\n", __func__); + return NULL; + } + queue = (struct flag64 *)flag64_pool.next; + list_del_init(&(queue->list)); + return queue; +} + +static __inline__ void +free_flag(struct flag *queue) +{ + list_add((struct list_head *)queue, &flag_pool); +} + +static __inline__ void +free_flag64(struct flag64 *queue) +{ + list_add((struct list_head *)queue, &flag64_pool); +} + +static __inline__ +struct message_queue * +alloc_message_queue(void) +{ + struct message_queue *queue; + //EVK_assert(!list_empty(&message_queue_pool), "message queue pool empty"); + if (list_empty(&message_queue_pool)) { + printk("%s ERROR: message queue pool empty\n", __func__); + return NULL; + } + queue = (struct message_queue *)message_queue_pool.next; + list_del_init(&(queue->list)); + queue->message = NULL; + return queue; +} + +static __inline__ void +free_message_queue(struct message_queue *queue) +{ + if (queue->message != NULL) { + evk_free(queue->message); + queue->message = NULL; + } + list_add((struct list_head *)queue, &message_queue_pool); +} + +static __inline__ +struct common_queue * +find_queue_entry(EV_ID queueID) +{ + struct list_head *list; + struct common_queue *queue; + int hash = calc_hash(queueID); + list = &(queue_entry[hash]); + list_for_each_entry(queue, list, list) { /* pgr0060 */ /* pgr0039 */ + if (queue->queueID == queueID) { + return queue; + } + } + return NULL; +} + +static __inline__ void +attach_queue_entry(struct common_queue *queue, EV_ID queueID) +{ + int hash = calc_hash(queueID); + list_add_tail((struct list_head *)queue, &(queue_entry[hash])); +} + +static __inline__ void +detach_queue_entry(struct common_queue *queue) +{ + list_del_init((struct list_head *)queue); +} + +static __inline__ void +init_common_queue(struct common_queue *queue, EV_ID queueID) +{ + queue->queueID = queueID; + queue->pid = current->pid; + queue->read_pid = 0; + init_waitqueue_head(&(queue->wq_head)); +} + +static __inline__ void +evk_init_flag(struct flag *queue, EV_ID queueID) +{ + init_common_queue((struct common_queue *)queue, queueID); + queue->value = 0; +} + +static __inline__ void +evk_init_flag64(struct flag64 *queue, EV_ID queueID) +{ + init_common_queue((struct common_queue *)queue, queueID); + queue->value = 0; +} + +static __inline__ int +evk_init_message_queue(struct message_queue *queue, EV_ID queueID, + UINT8 length, UINT32 max_bytes, UINT8 type) +{ + init_common_queue((struct common_queue *)queue, queueID); + queue->type = type; + queue->length = length; + queue->max_bytes = max_bytes; + queue->num = 0; + queue->readptr = 0; + EVK_assert(queue->message == NULL, "message buffer was not freed"); + queue->message = evk_malloc(length * EVK_message_block_size(max_bytes)); + EVK_assert(queue->message != NULL, "can't alloc message buffer"); + return 0; +} + +static void +__list_queues(void) +{ + struct list_head *list; + struct common_queue *queue; + int i; + for(i = 0 ; i < HASH_KEY ; i++) { + list = &(queue_entry[i]); + if (!list_empty(list)) { + printk(KERN_ALERT "%d->", i); + list_for_each_entry(queue, list, list) { /* pgr0060 */ /* pgr0039 */ + printk("%x[%x] ", queue->queueID, queue->seq_num); + } + printk("\n"); + } + } +} + +static int +evk_destroy_queue(EV_ID queueID) +{ + struct common_queue *queue; + int err = 0; + EVK_info1("flag destroy %x\n", queueID); + + EVK_mutex_lock(); /*************************************/ + queue = find_queue_entry(queueID); + if (queue == NULL) { + err = -ENOENT; + goto finish; + } + + detach_queue_entry(queue); + + /* wake up processes before destruction */ + wake_up_interruptible(&(queue->wq_head)); + + init_common_queue(queue, EV_INVALID_ID); + + if (EV_ID_IS_FLAG(queueID)) { + free_flag((struct flag *)queue); + } else if (EV_ID_IS_FLAG64(queueID)) { + free_flag64((struct flag64 *)queue); + } else if (EV_ID_IS_QUEUE(queueID)) { + free_message_queue((struct message_queue *)queue); + } + //__list_queues(); + finish: + EVK_mutex_unlock(); /*************************************/ + return err; +} + +static int +evk_open(struct inode *inode, struct file *file) +{ + // Recording of current and measures not to be read or deleted from others are required. */ + file->private_data = (void *)EV_INVALID_ID; + return 0; +} + +static int +evk_close(struct inode *inode, struct file *file) +{ + if (EV_ID_IS_VALID((EV_ID)file->private_data)) { + evk_destroy_queue((EV_ID)file->private_data); + } + file->private_data = (void *)EV_INVALID_ID; + return 0; +} + +static int +evk_create_flag(EV_ID queueID) +{ + struct flag *queue; + int err = 0; + EVK_info1("flag create %x\n", queueID); + + EVK_mutex_lock(); /*************************************/ + + queue = (struct flag *)find_queue_entry(queueID); + if (queue != NULL) { + err = -EEXIST; + goto finish; + } + + queue = alloc_flag(); + if (queue == NULL) { + err = -ENOMEM; + goto finish; + } + + evk_init_flag(queue, queueID); + attach_queue_entry((struct common_queue *)queue, queueID); + + //__list_queues(); + finish: + EVK_mutex_unlock(); /***********************************/ + return err; +} + +static int +evk_create_flag64(EV_ID queueID) +{ + struct flag64 *queue; + int err = 0; + EVK_info1("flag64 create %x\n", queueID); + + EVK_mutex_lock(); /*************************************/ + + queue = (struct flag64 *)find_queue_entry(queueID); + if (queue != NULL) { + err = -EEXIST; + goto finish; + } + + queue = alloc_flag64(); + if (queue == NULL) { + err = -ENOMEM; + goto finish; + } + + evk_init_flag64(queue, queueID); + attach_queue_entry((struct common_queue *)queue, queueID); + + //__list_queues(); + finish: + EVK_mutex_unlock(); /***********************************/ + return err; +} + +static int +evk_create_message_queue(EV_ID queueID, UINT8 length, + UINT32 max_bytes, EV_Message_Queue_Type type) +{ + struct message_queue *queue; + int err; + EVK_info1("message create %x\n", queueID); + + err = 0; + + EVK_mutex_lock(); /*************************************/ + + queue = (struct message_queue *)find_queue_entry(queueID); + if (queue != NULL) { + err = -EEXIST; + goto finish; + } + + queue = alloc_message_queue(); + if (queue == NULL) { + err = -ENOMEM; + goto finish; + } + + err = evk_init_message_queue(queue, queueID, length, max_bytes, type); + if (err == 0) { + attach_queue_entry((struct common_queue *)queue, queueID); + } else { + free_message_queue(queue); + } + + //__list_queues(); + finish: + EVK_mutex_unlock(); /***********************************/ + return err; +} + +static EV_ID +get_seq_id(void) +{ + EV_ID ret; + sequence_id++; + if ((sequence_id & EV_RESERVED_BIT) != 0) {/* round to 1 */ + sequence_id = 1; + EVK_info0("auto ID rounded\n"); + } + ret = sequence_id; + return ret; +} + +static int +evk_alloc_flagID(EV_ID *queueID) +{ + EV_ID seq_id; + + EVK_mutex_lock(); /*************************************/ + do { + seq_id = get_seq_id(); + seq_id |= (EV_ID_BIT | EV_FLAG_BIT | EV_AUTO_ID_BIT); + } while(find_queue_entry(seq_id) != NULL); + EVK_mutex_unlock(); /*************************************/ + + *queueID = seq_id; + return 0; +} + +static int +evk_alloc_flag64ID(EV_ID *queueID) +{ + EV_ID seq_id; + + EVK_mutex_lock(); /*************************************/ + do { + seq_id = get_seq_id(); + seq_id |= (EV_ID_BIT | EV_FLAG64_BIT | EV_AUTO_ID_BIT); + } while(find_queue_entry(seq_id) != NULL); + EVK_mutex_unlock(); /*************************************/ + + *queueID = seq_id; + return 0; +} + +static int +evk_alloc_queueID(EV_ID *queueID) +{ + EV_ID seq_id; + + EVK_mutex_lock(); /*************************************/ + do { + seq_id = get_seq_id(); + seq_id |= (EV_ID_BIT | EV_QUEUE_BIT | EV_AUTO_ID_BIT); + } while(find_queue_entry(seq_id) != NULL); + EVK_mutex_unlock(); /*************************************/ + + *queueID = seq_id; + return 0; +} + +static int +evk_store_flag(EV_Flag *ev, int mem) +{ + struct flag *queue; + int ret = 0; + EV_ID flagID; + UINT32 bits; + + if (GET_USER_OR_KERNEL(flagID, ev->flagID)) /* pgr0039 */ + return -EFAULT; + if (GET_USER_OR_KERNEL(bits, ev->bits)) /* pgr0039 */ + return -EFAULT; + + EVK_mutex_lock(); /*************************************/ + + queue = (struct flag *)find_queue_entry(flagID); /* pgr0000 */ + if (queue == NULL) { + EVK_info1("set_flag: No such ID %x\n", flagID); + ret = -ENOENT; + goto finish; + } + + if (queue->value == 0) { + queue->seq_num = sequence_number++; + } + queue->value |= bits; /* pgr0000 */ + + wake_up_interruptible(&(queue->wq_head)); + + finish: + EVK_mutex_unlock(); /***********************************/ + return ret; +} + +static int +evk_store_flag64(EV_Flag64 *ev, int mem) +{ + struct flag64 *queue; + int ret = 0; + EV_ID flagID; + UINT64 bits = 0; + + if (GET_USER_OR_KERNEL(flagID, ev->flagID)) /* pgr0039 */ + return -EFAULT; + //GET_USER_OR_KERNEL(bits, ev->bits); /* pgr0039 */ + if (mem == evk_mem_user) { + if (copy_from_user(&bits, &(ev->bits), sizeof(bits))) + return -EFAULT; + } else { + bits = ev->bits; + } + + EVK_mutex_lock(); /*************************************/ + + queue = (struct flag64 *)find_queue_entry(flagID); /* pgr0000 */ + if (queue == NULL) { + EVK_info1("set_flag64: No such ID %x\n", flagID); + ret = -ENOENT; + goto finish; + } + + if (queue->value == 0) { + queue->seq_num = sequence_number++; + } + queue->value |= bits; /* pgr0000 */ + + wake_up_interruptible(&(queue->wq_head)); + + finish: + EVK_mutex_unlock(); /***********************************/ + return ret; +} + +static int +evk_store_message(EV_Message *ev, int mem) +{ + struct message_queue *queue; + UINT8 *ptr; + UINT8 writeptr; + int ret = 0; + EV_ID queueID; + UINT32 length, senderInfo, seq; + + if (GET_USER_OR_KERNEL(queueID, ev->queueID)) /* pgr0039 */ + return -EFAULT; + if (GET_USER_OR_KERNEL(length, ev->length)) /* pgr0039 */ + return -EFAULT; + if (GET_USER_OR_KERNEL(senderInfo, ev->senderInfo)) /* pgr0039 */ + return -EFAULT; + + EVK_mutex_lock(); /*************************************/ + + queue = (struct message_queue *)find_queue_entry(queueID); /* pgr0000 */ + if (queue == NULL) { + EVK_info1("store_message: No such queueID %x\n", queueID); + ret = -ENOENT; + goto finish; + } + + if (length > queue->max_bytes) { /* pgr0000 */ + EVK_info0("store_message: message is too long for the queue"); + ret = -EINVAL; + goto finish; + } + + if (queue->num == queue->length) { + + switch(queue->type) { + case EV_MESSAGE_QUEUE_TYPE_BUSY: + EVK_info1("store_message: queue %x BUSY\n", queueID); + ret = -EBUSY; + goto finish; + break; + + case EV_MESSAGE_QUEUE_TYPE_FIFO: + queue->readptr++; + queue->readptr %= queue->length; + queue->num--; + break; + + case EV_MESSAGE_QUEUE_TYPE_REPLACE: + queue->num--; + break; + + default: + EVK_BUG("internal error in store_message\n"); + ret = -EINVAL; + goto finish; + break; + } + } + + writeptr = (queue->readptr + queue->num) % queue->length; + ptr = queue->message + writeptr * EVK_message_block_size(queue->max_bytes); + + memcpy(ptr, &length, sizeof(length)); + ptr += sizeof(length); + memcpy(ptr, &senderInfo, sizeof(senderInfo)); + ptr += sizeof(senderInfo); + seq = sequence_number++; + memcpy(ptr, &seq, sizeof(seq)); + ptr += sizeof(seq); + + if (queue->num == 0) { + queue->seq_num = seq; + } + queue->num++; + + if (mem == evk_mem_user) { + if (copy_from_user(ptr, ev->message, length)) { + ret = -EFAULT; + goto finish; + } + } else { + memcpy(ptr, ev->message, length); + } + + wake_up_interruptible(&(queue->wq_head)); + + finish: + EVK_mutex_unlock(); /***********************************/ + + return ret; +} + +static int +evk_set_poll(struct file *filp, EV_ID queueID) +{ + struct common_queue *queue; + int err = 0; + + EVK_mutex_lock(); /*************************************/ + + queue = find_queue_entry(queueID); + if (queue == NULL) { + EVK_info1("set_poll: ID %x not found.\n", queueID); + err = -ENOENT; + goto finish; + } + + filp->private_data = (void *)queueID; + + finish: + EVK_mutex_unlock(); /*************************************/ + return err; +} + +static int +evk_get_flag_event(EV_Event *ev, int peek_only, int wait, int mem) +{ + struct flag *queue, *queue2; + int err = 0; + int found = 0; + EV_ID flagID; + + if (GET_USER_OR_KERNEL(flagID, ev->u.flag.flagID)) /* pgr0039 */ + return -EFAULT; + + retry: + + queue = (struct flag *)find_queue_entry(flagID); /* pgr0000 */ + if (queue == NULL) { + EVK_info1("get_flag: No such flag %x\n", flagID); + err = -ENOENT; + goto finish; + } + + if (queue->value != 0) { + UINT32 bits; + + if (GET_USER_OR_KERNEL(bits, ev->u.flag.bits)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + + if (bits == 0 || ((bits & queue->value) != 0)) { /* pgr0000 */ + + if (PUT_USER_OR_KERNEL(EV_EVENT_Flag, ev->type)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + if (PUT_USER_OR_KERNEL(queue->value, ev->u.flag.bits)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + found = 1; + + queue->read_pid = current->pid; + if (peek_only) { + ; + } else { + queue->value = 0; + } + } + } + finish: + + if (queue != NULL && wait != 0 && found == 0) { + int wait_ret; + EVK_mutex_unlock(); /*************************************/ + + wait_ret + = wait_event_interruptible(queue->wq_head, + ((queue2 = (struct flag *)find_queue_entry(flagID)) == NULL + || queue2->value != 0)); + + EVK_mutex_lock(); /*************************************/ + + if (wait_ret != 0) { + EVK_info1("Interrupted while waiting for flag %x\n", flagID); + err = -EINTR; + } else if (queue2 == NULL) { /* pgr0039 */ + EVK_info1("flag %x was destroyed while waiting for it\n", flagID); + err = -ENOENT; + } else { + goto retry; + } + } + return err; +} + +static int +evk_get_flag64_event(EV_Event *ev, int peek_only, int wait, int mem) +{ + struct flag64 *queue, *queue2; + int err = 0; + int found = 0; + EV_ID flagID; + + if (GET_USER_OR_KERNEL(flagID, ev->u.flag64.flagID)) /* pgr0039 */ + return -EFAULT; + + retry: + + queue = (struct flag64 *)find_queue_entry(flagID); /* pgr0000 */ + if (queue == NULL) { + EVK_info1("get_flag64: No such flag %x\n", flagID); + err = -ENOENT; + goto finish; + } + + if (queue->value != 0) { + UINT64 bits = 0; + + //GET_USER_OR_KERNEL(bits, ev->u.flag64.bits); /* pgr0039 */ + if (mem == evk_mem_user) { + if (copy_from_user(&bits, &(ev->u.flag64.bits), sizeof(bits))) { + err = -EFAULT; + goto finish; + } + } else { + bits = ev->u.flag64.bits; + } + + if (bits == 0 || ((bits & queue->value) != 0)) { /* pgr0000 */ + + if (PUT_USER_OR_KERNEL(EV_EVENT_Flag64, ev->type)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + if (PUT_USER_OR_KERNEL(queue->value, ev->u.flag64.bits)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + found = 1; + + queue->read_pid = current->pid; + if (peek_only) { + ; + } else { + queue->value = 0; + } + } + } + finish: + + if (queue != NULL && wait != 0 && found == 0) { + int wait_ret; + EVK_mutex_unlock(); /*************************************/ + + wait_ret + = wait_event_interruptible(queue->wq_head, + ((queue2 = (struct flag64 *)find_queue_entry(flagID)) == NULL + || queue2->value != 0)); + + EVK_mutex_lock(); /*************************************/ + + if (wait_ret != 0) { + EVK_info1("Interrupted while waiting for flag %x\n", flagID); + err = -EINTR; + } else if (queue2 == NULL) { /* pgr0039 */ + EVK_info1("flag %x was destroyed while waiting for it\n", flagID); + err = -ENOENT; + } else { + goto retry; + } + } + return err; +} + +static __inline__ void +remove_message_event(struct message_queue *queue, UINT8 removeptr) +{ + UINT8 *ptr; + int i, from, to; + UINT8 *pFrom, *pTo; + UINT32 size; + int offset; + + queue->num--; + offset = (int)removeptr - (int)(queue->readptr); + + if (offset == 0) {/* To remove the head of the queue, advance the queue by one readptr only */ + queue->readptr++; + queue->readptr %= queue->length; + + if (queue->num > 0) { + /* Reset the occurrence time of the first message in the queue to the occurrence time of the queue. */ + ptr = (queue->message + + queue->readptr * EVK_message_block_size(queue->max_bytes)); + ptr += sizeof(UINT32) * 2; + memcpy(&(queue->seq_num), ptr, sizeof(UINT32)); + } + return; + } + if (offset < 0) { + offset += queue->length; + } + if (offset == queue->num) {/* Do nothing to delete the end of the queue */ + return; + } + + /* To delete a message in the middle of the queue, pack the following messages. */ + to = removeptr; + size = EVK_message_block_size(queue->max_bytes); + + for(i = 0 ; i < queue->num - offset ; i++, to++) { + to %= queue->length; + from = (to + 1) % queue->length; + pFrom = queue->message + from * size; + pTo = queue->message + to * size; + memcpy(pTo, pFrom, size); + } +} + +static int +evk_get_message_event(EV_Event *ev, int peek_only, int wait, int mem) +{ + struct message_queue *queue, *queue2; + int err = 0; + EV_ID queueID; + UINT8 num; + UINT8 readptr; + UINT8 i, *ptr; + int matched = 0; + + if (GET_USER_OR_KERNEL(queueID, ev->u.message.queueID)) /* pgr0039 */ + return -EFAULT; + + retry: + queue = (struct message_queue *)find_queue_entry(queueID); /* pgr0000 */ + if (queue == NULL) { + EVK_info1("get_message: No such queue %x\n", queueID); + err = -ENOENT; + goto finish; + } + + num = queue->num; + readptr = queue->readptr; + for(i = 0 ; i < num ; i++, readptr = (readptr + 1) % queue->length) { + UINT32 size, senderInfo, seq; + UINT32 length, q_senderInfo; + + ptr = (queue->message + + readptr * EVK_message_block_size(queue->max_bytes)); + + memcpy(&size, ptr, sizeof(size)); + ptr += sizeof(size); + memcpy(&senderInfo, ptr, sizeof(senderInfo)); + ptr += sizeof(senderInfo); + memcpy(&seq, ptr, sizeof(seq)); + ptr += sizeof(seq); + + if (GET_USER_OR_KERNEL(length, ev->u.message.length)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + if (GET_USER_OR_KERNEL(q_senderInfo, ev->u.message.senderInfo)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + + if (q_senderInfo == 0 && length == 0) { /* pgr0000 */ + matched = 1; + } else if (q_senderInfo != 0 && q_senderInfo == senderInfo) { + matched = 1; + } else if (length > 0 && size >= length) { /* pgr0000 */ + + if (mem == evk_mem_user) { + void *compbytes; + compbytes = evk_malloc(length); + if (compbytes != NULL) { + if (copy_from_user(compbytes, &(ev->u.message.message), length)) { + err = -EFAULT; + evk_free(compbytes); + goto finish; + } + if (memcmp(ptr, compbytes, length) == 0) { + matched = 1; + } + evk_free(compbytes); + } + } else { + if (memcmp(ptr, ev->u.message.message, length) == 0) { + matched = 1; + } + } + } + + if (matched) { + + if (PUT_USER_OR_KERNEL(EV_EVENT_Message, ev->type)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + if (PUT_USER_OR_KERNEL(size, ev->u.message.length)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + if (PUT_USER_OR_KERNEL(senderInfo, ev->u.message.senderInfo)) { /* pgr0039 */ + err = -EFAULT; + goto finish; + } + if (mem == evk_mem_user) { + if (copy_to_user(ev->u.message.message, ptr, size)) { + err = -EFAULT; + goto finish; + } + } else { + memcpy(ev->u.message.message, ptr, size); + } + + queue->read_pid = current->pid; + if (peek_only) { + ; + } else { + remove_message_event(queue, readptr); + } + goto finish; + } + } + + finish: + + if (queue != NULL && wait != 0 && matched == 0) { + int wait_ret; + EVK_mutex_unlock(); /*************************************/ + wait_ret + = wait_event_interruptible(queue->wq_head, + ((queue2 = (struct message_queue *)find_queue_entry(queueID))==NULL + || queue2->num > 0)); + + EVK_mutex_lock(); /*************************************/ + + if (wait_ret != 0) { + EVK_info1("Interrupted while waiting for queue %x\n", queueID); + err = -EINTR; + } else if (queue2 == NULL) { /* pgr0039 */ + EVK_info1("queue %x was destroyed while waiting for it\n", queueID); + err = -ENOENT; + } else { + goto retry; + } + } + + return err; +} + +static int +evk_get_event(EV_Event *ev, int peek_only, int wait, int mem) +{ + EV_Type type; + int ret = -EINVAL; + + if (GET_USER_OR_KERNEL(type, ev->type)) /* pgr0039 */ + return -EFAULT; + if (PUT_USER_OR_KERNEL(EV_EVENT_None, ev->type)) /* pgr0039 */ + return -EFAULT; + + switch(type) { /* pgr0000 */ + case EV_EVENT_Flag: + EVK_mutex_lock(); /*************************************/ + ret = evk_get_flag_event(ev, peek_only, wait, mem); + EVK_mutex_unlock(); /*************************************/ + break; + + case EV_EVENT_Flag64: + EVK_mutex_lock(); /*************************************/ + ret = evk_get_flag64_event(ev, peek_only, wait, mem); + EVK_mutex_unlock(); /*************************************/ + break; + + case EV_EVENT_Message: + EVK_mutex_lock(); /*************************************/ + ret = evk_get_message_event(ev, peek_only, wait, mem); + EVK_mutex_unlock(); /*************************************/ + break; + + default: + break; + } + return ret; +} + +static int +evk_get_next_event(EVK_Next_Event_Query *query /* user */, int peek_only) +{ + EV_ID *ids; + int i, num, ret, first, found; + struct common_queue *queue; + UINT32 seq_oldest = 0; + + ids = (EV_ID *)kmalloc( (sizeof(EV_ID)*EV_MAX_IDS_IN_PROCESS), GFP_KERNEL ); + if( ids == NULL ){ + return -ENOMEM; + } + + if (__get_user(num, &(query->num))) { /* pgr0039 */ + ret = -EFAULT; + goto finish0; + } + if (copy_from_user(&ids[0], query->ids, num * sizeof(EV_ID))) { /* pgr0039 */ + ret = -EFAULT; + goto finish0; + } + if (__put_user(EV_EVENT_None, &(query->ev.type))) { /* pgr0039 */ + ret = -EFAULT; + goto finish0; + } + + ret = 0; + first = 1; + found = -1; + + EVK_mutex_lock(); /*************************************/ + + for(i = 0 ; i < num /* pgr0039 */ ; i++) { + queue = find_queue_entry(ids[i]); + if (queue != NULL) {/* Have the specified queue ID */ + if ((EV_ID_IS_FLAG(ids[i]) + && ((struct flag *)queue)->value != 0) + || (EV_ID_IS_FLAG64(ids[i]) + && ((struct flag64 *)queue)->value != 0) + || (EV_ID_IS_QUEUE(ids[i]) + && ((struct message_queue *)queue)->num > 0)) {/*There are events.*/ + /* Compare with time_before macros for round 0 */ + if (first || time_before((unsigned long)queue->seq_num, /* pgr0006 */ /* pgr0039 */ + (unsigned long)seq_oldest)) { + first = 0; + seq_oldest = queue->seq_num; + found = i; + } + } + } + } + + if (found >= 0) { + if (EV_ID_IS_FLAG(ids[found])) { + if (__put_user(ids[found], &(query->ev.u.flag.flagID))) { /* pgr0039 */ + ret = -EFAULT; + goto finish1; + } + ret = evk_get_flag_event(&(query->ev), peek_only, 0, evk_mem_user); + } else if (EV_ID_IS_FLAG64(ids[found])) { + if (__put_user(ids[found], &(query->ev.u.flag64.flagID))) { /* pgr0039 */ + ret = -EFAULT; + goto finish1; + } + ret = evk_get_flag64_event(&(query->ev), peek_only, 0, evk_mem_user); + } else if (EV_ID_IS_QUEUE(ids[found])) { + if (__put_user(ids[found], &(query->ev.u.message.queueID))) { /* pgr0039 */ + ret = -EFAULT; + goto finish1; + } + ret = evk_get_message_event(&(query->ev), peek_only, 0, evk_mem_user); + } + } + + finish1: + EVK_mutex_unlock(); /*************************************/ + finish0: + kfree(ids); + return ret; +} + +static long +evk_ioctl(struct file *filp, unsigned int cmd, + unsigned long arg) +{ + EVK_Message_Queue_Request mesq; + int peek_only, wait; + EV_ID queueID; + int ret = -EINVAL; + + //lock_kernel(); + + switch(cmd) { + case EVK_IOC_CREATE_FLAG: + queueID = (EV_ID)arg; + ret = evk_create_flag(queueID); + break; + + case EVK_IOC_CREATE_FLAG64: + queueID = (EV_ID)arg; + ret = evk_create_flag64(queueID); + break; + + case EVK_IOC_CREATE_MESSAGE_QUEUE: + if (access_ok(VERIFY_READ, arg, sizeof(mesq))) { /* pgr0039 */ + if (copy_from_user(&mesq, (EV_Flag *)arg, sizeof(mesq))) { + ret = -EFAULT; + break; + } + + ret = evk_create_message_queue(mesq.queueID, mesq.length, + mesq.max_bytes, mesq.type); + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_ALLOC_FLAG_ID: + if (access_ok(VERIFY_WRITE, arg, sizeof(queueID))) { /* pgr0039 */ + evk_alloc_flagID(&queueID); + if (put_user(queueID, (EV_ID *)arg)) { /* pgr0039 */ + ret = -EFAULT; + break; + } + ret = 0; + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_ALLOC_FLAG64_ID: + if (access_ok(VERIFY_WRITE, arg, sizeof(queueID))) { /* pgr0039 */ + evk_alloc_flag64ID(&queueID); + if (put_user(queueID, (EV_ID *)arg)) { /* pgr0039 */ + ret = -EFAULT; + break; + } + ret = 0; + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_ALLOC_QUEUE_ID: + if (access_ok(VERIFY_WRITE, arg, sizeof(queueID))) { /* pgr0039 */ + evk_alloc_queueID(&queueID); + if (put_user(queueID, (EV_ID *)arg)) { /* pgr0039 */ + ret = -EFAULT; + break; + } + ret = 0; + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_DESTROY_QUEUE: + queueID = (EV_ID)arg; + ret = evk_destroy_queue(queueID); + break; + + case EVK_IOC_STORE_FLAG: + if (access_ok(VERIFY_READ, arg, sizeof(EV_Flag))) { /* pgr0039 */ + ret = evk_store_flag((EV_Flag *)arg, evk_mem_user); + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_STORE_FLAG64: + if (access_ok(VERIFY_READ, arg, sizeof(EV_Flag64))) { /* pgr0039 */ + ret = evk_store_flag64((EV_Flag64 *)arg, evk_mem_user); + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_STORE_MESSAGE: + if (access_ok(VERIFY_READ, arg, sizeof(EV_Message))) { /* pgr0039 */ + ret = evk_store_message((EV_Message *)arg, evk_mem_user); + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_SET_POLL: + queueID = (EV_ID)arg; + ret = evk_set_poll(filp, queueID); + break; + + case EVK_IOC_PEEK_EVENT: + peek_only = 1; + wait = 0; + goto get_event; + break; + + case EVK_IOC_WAIT_EVENT: + peek_only = 0; + wait = 1; + goto get_event; + break; + + case EVK_IOC_GET_EVENT: + peek_only = 0; + wait = 0; + get_event: + if (access_ok(VERIFY_WRITE, arg, sizeof(EV_Event))) { /* pgr0039 */ + ret = evk_get_event((EV_Event *)arg, peek_only, wait, evk_mem_user); + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_PEEK_NEXT_EVENT: + peek_only = 1; + goto get_next; + break; + + case EVK_IOC_GET_NEXT_EVENT: + peek_only = 0; + get_next: + if (access_ok(VERIFY_WRITE, arg, sizeof(EVK_Next_Event_Query))) { /* pgr0039 */ + ret = evk_get_next_event((EVK_Next_Event_Query *)arg, peek_only); + } else { + ret = -EFAULT; + } + break; + + case EVK_IOC_DEBUG_LIST: + __list_queues(); + //__list_message(); + ret = 0; + break; + + default: + ret = -EINVAL; + break; + } + + //unlock_kernel(); + return ret; +} + +static unsigned int +evk_poll(struct file *filp, poll_table *wait) +{ + unsigned int ret = 0; + struct common_queue *queue; + + EV_ID queueID = (EV_ID)(filp->private_data); + // Returns errors without stopping at assert if queueID is invalid + // (Troubleshooting for Continuous Printing) + if (!EV_ID_IS_VALID(queueID)) { + printk("evk_poll ERROR: invalid queueID=%x\n", queueID); + return POLLERR|POLLHUP; + } + //EVK_assert(EV_ID_IS_VALID(queueID), "poll: flag/queueID not set"); + + EVK_mutex_lock();/*****************************************/ + + queue = find_queue_entry(queueID); + if (queue == NULL) { + EVK_info1("poll: No such flag/queueID %x\n", queueID); + ret = POLLERR|POLLHUP; + goto finish; + } + + poll_wait(filp, &(queue->wq_head), wait); + + if (EV_ID_IS_FLAG(queueID)) { + if (((struct flag *)queue)->value != 0) { + ret = POLLIN; + } + } else if (EV_ID_IS_FLAG64(queueID)) { + if (((struct flag64 *)queue)->value != 0) { + ret = POLLIN; + } + } else { + if (((struct message_queue *)queue)->num > 0) { + ret = POLLIN; + } + } + + finish: + EVK_mutex_unlock(); /***************************************/ + + return ret; +} + +/** List of system call corresponding function registrations */ +static struct file_operations evk_fops = { + .open = evk_open, + .release = evk_close, + .unlocked_ioctl = evk_ioctl, + .poll = evk_poll, +}; + +#ifdef ENABLE_PROC_FS +static int +evk_procFS_show(struct seq_file *m, int mode) +{ + int i, num; + struct list_head *list, *entries; + struct common_queue *queue; + + seq_printf(m, "[ev library status "); + + switch(mode) { + case evk_enum_flag: + seq_printf(m, "(flag)]\n"); + seq_printf(m, "PID moduleID flagID[hash] value\n"); + break; + case evk_enum_flag64: + seq_printf(m, "(flag64)]\n"); + seq_printf(m, "PID moduleID flagID[hash] value\n"); + break; + case evk_enum_queue: + seq_printf(m, "(queue)]\n"); + seq_printf(m, "PID moduleID queueID[hash] maxbytes remain type\n"); + break; + } + + EVK_mutex_lock(); + + num = evk_get_queue_entry(&entries); + + for (i = 0 ; i < num ; i++) { + list = &(entries[i]); + if (!list_empty(list)) { + list_for_each_entry(queue, list, list) { + if ((mode == evk_enum_flag && (!EV_ID_IS_FLAG(queue->queueID))) + || (mode == evk_enum_flag64 && (!EV_ID_IS_FLAG64(queue->queueID))) + || (mode == evk_enum_queue && (!EV_ID_IS_QUEUE(queue->queueID)))) + { + continue; + } + + seq_printf(m, "%08d ", queue->pid); + seq_printf(m, "%05d(%04x) ", ((queue->queueID & 0x00ffff00) >> 8), ((queue->queueID & 0x00ffff00) >> 8)); + seq_printf(m, "0x%08x[%2d] ", queue->queueID, calc_hash(queue->queueID)); + + switch(mode) { + case evk_enum_flag: + seq_printf(m, "0x%x", EVK_PFLAG(queue)->value); + break; + + case evk_enum_flag64: + seq_printf(m, "0x%llx", EVK_PFLAG64(queue)->value); + break; + + case evk_enum_queue: + seq_printf(m, "%04d %02d ", EVK_PQUEUE(queue)->max_bytes, EVK_PQUEUE(queue)->length); + seq_printf(m, "%02d ", EVK_PQUEUE(queue)->num); + seq_printf(m, "%d ", EVK_PQUEUE(queue)->type); + break; + } + seq_printf(m, "\n"); + } + } + } + + EVK_mutex_unlock(); + return 0; +} + +static int +evk_procFS_flag_show(struct seq_file *m, void *v) +{ + return evk_procFS_show(m, evk_enum_flag); +} + +static int +evk_procFS_flag64_show(struct seq_file *m, void *v) +{ + return evk_procFS_show(m, evk_enum_flag64); +} + +static int +evk_procFS_queue_show(struct seq_file *m, void *v) +{ + return evk_procFS_show(m, evk_enum_queue); +} + +static int +evk_procFS_flag_open(struct inode *inode, struct file *file) +{ + return single_open(file, evk_procFS_flag_show, NULL); +} + +static int +evk_procFS_flag64_open(struct inode *inode, struct file *file) +{ + return single_open(file, evk_procFS_flag64_show, NULL); +} + +static int +evk_procFS_queue_open(struct inode *inode, struct file *file) +{ + return single_open(file, evk_procFS_queue_show, NULL); +} + +static struct file_operations evk_proc_flag_fops = { + .owner = THIS_MODULE, + .open = evk_procFS_flag_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static struct file_operations evk_proc_flag64_fops = { + .owner = THIS_MODULE, + .open = evk_procFS_flag64_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static struct file_operations evk_proc_queue_fops = { + .owner = THIS_MODULE, + .open = evk_procFS_queue_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; +#endif /*ENABLE_PROC_FS*/ + +__init int +EVK_init(void) +{ + int err; +#ifdef CONFIG_PROC_FS +#ifdef ENABLE_PROC_FS + struct proc_dir_entry *ret; +#endif /* ENABLE_PROC_FS */ +#endif /* CONFIG_PROC_FS */ + int i; + dev_t dev; + + dev = MKDEV(devmajor, devminor); + err = register_chrdev_region(dev, nrdevs, EVK_NAME); + if (err) { + EVK_info1("register_chrdev_region error %d\n", -err); + return -EBUSY; + } + + cdev_init(&cdev, &evk_fops); + cdev.owner = THIS_MODULE; + cdev.ops = &evk_fops; + + err = cdev_add(&cdev, dev, 1); + if (err) { + EVK_info1("cdev_add error %d\n", -err); + return -EBUSY; + } + + /* Initialization */ + for(i = 0 ; i < EVK_MAX_FLAGS ; i++) { + list_add_tail((struct list_head *)&(_flag_pool[i]), + &flag_pool); + } + for(i = 0 ; i < EVK_MAX_FLAG64S ; i++) { + list_add_tail((struct list_head *)&(_flag64_pool[i]), + &flag64_pool); + } + for(i = 0 ; i < EVK_MAX_MESSAGE_QUEUES ; i++) { + list_add_tail((struct list_head *)&(_message_queue_pool[i]), + &message_queue_pool); + } + for(i = 0 ; i < HASH_KEY ; i++) { + INIT_LIST_HEAD(&(queue_entry[i])); + } + +#ifdef CONFIG_PROC_FS +#ifdef ENABLE_PROC_FS + ret = proc_create("driver/ev_flag", 0, NULL, &evk_proc_flag_fops); + if( ret == NULL ) { + EVK_info1("Unable to initialize /proc entry %d\n", -err); + return -EBUSY; + } + + ret = proc_create("driver/ev_flag64", 0, NULL, &evk_proc_flag64_fops); + if( ret == NULL ) { + EVK_info1("Unable to initialize /proc entry %d\n", -err); + return -EBUSY; + } + + ret = proc_create("driver/ev_queue", 0, NULL, &evk_proc_queue_fops); + if( ret == NULL ) { + EVK_info1("Unable to initialize /proc entry %d\n", -err); + return -EBUSY; + } +#endif /* ENABLE_PROC_FS */ +#endif /* CONFIG_PROC_FS */ + + pClass = class_create(THIS_MODULE, EVK_NAME); + device_create(pClass, NULL, dev, NULL, "agl/"EVK_NAME); + + return 0; +} + +void +//#ifndef CONFIG_COMBINE_MODULES +//__exit +//#endif +EVK_exit(void) +{ + dev_t dev = MKDEV(devmajor, devminor); + device_destroy(pClass, dev); + class_destroy(pClass); + + cdev_del(&cdev); + + unregister_chrdev_region(dev, nrdevs); + + remove_proc_entry( "driver/ev_flag", 0 ); + remove_proc_entry( "driver/ev_flag64", 0 ); + remove_proc_entry( "driver/ev_queue", 0 ); +} + +/** @} */ +/** @addtogroup EV + * @{ */ +static EV_ERR +EVK_create_flag_in(EV_ID flagID) +{ + int ret = evk_create_flag(flagID); + + if (ret == -EEXIST) { + return EV_ERR_Exist; + } else if (ret < 0) { + return EV_ERR_Fatal; + } else { + return EV_OK; + } +} + +static EV_ERR +EVK_create_flag64_in(EV_ID flagID) +{ + int ret = evk_create_flag64(flagID); + + if (ret == -EEXIST) { + return EV_ERR_Exist; + } else if (ret < 0) { + return EV_ERR_Fatal; + } else { + return EV_OK; + } +} + +/** @see EV_create_flag */ +EV_ERR +EVK_create_flag(EV_ID flagID) +{ + if (!EV_ID_IS_FLAG(flagID) || EV_ID_IS_AUTO_ID(flagID)) { + return EV_ERR_Invalid_ID; + } + return EVK_create_flag_in(flagID); +} + +/** @see EV_create_flag64 */ +EV_ERR +EVK_create_flag64(EV_ID flagID) +{ + if (!EV_ID_IS_FLAG64(flagID) || EV_ID_IS_AUTO_ID(flagID)) { + return EV_ERR_Invalid_ID; + } + return EVK_create_flag64_in(flagID); +} + +static EV_ERR +EVK_create_queue_in(EV_ID queueID, UINT8 length, UINT16 max_bytes, + EV_Message_Queue_Type type) +{ + int ret = evk_create_message_queue(queueID, length, max_bytes, type); + + if (ret == -EEXIST) { + return EV_ERR_Exist; + } else if (ret < 0) { + return EV_ERR_Fatal; + } else { + return EV_OK; + } +} + +/** @see EV_create_queue */ +EV_ERR +EVK_create_queue(EV_ID queueID, UINT8 length, UINT16 max_bytes, + EV_Message_Queue_Type type) +{ + if (!EV_ID_IS_QUEUE(queueID) || EV_ID_IS_AUTO_ID(queueID)) { + return EV_ERR_Invalid_ID; + } + return EVK_create_queue_in(queueID, length, max_bytes, type); +} + +/** @see EV_create_flag_auto_id */ +EV_ERR +EVK_create_flag_auto_id(/* OUT */EV_ID *flagID) +{ + EV_ERR err; + EVK_assert(flagID != NULL, "NULL pointer was specified"); + + if (evk_alloc_flagID(flagID) < 0) { + return EV_ERR_Fatal; + } + + err = EVK_create_flag_in(*flagID); + if (err != EV_OK) { + *flagID = EV_NO_ID; + } + return err; +} + +/** @see EV_create_flag64_auto_id */ +EV_ERR +EVK_create_flag64_auto_id(/* OUT */EV_ID *flagID) +{ + EV_ERR err; + EVK_assert(flagID != NULL, "NULL pointer was specified"); + + if (evk_alloc_flag64ID(flagID) < 0) { + return EV_ERR_Fatal; + } + + err = EVK_create_flag64_in(*flagID); + if (err != EV_OK) { + *flagID = EV_NO_ID; + } + return err; +} + +/** @see EV_create_queue_auto_id */ +EV_ERR +EVK_create_queue_auto_id(/* OUT */EV_ID *queueID, UINT8 length, + UINT16 max_bytes, EV_Message_Queue_Type type) +{ + EV_ERR err; + EVK_assert(queueID != NULL, "NULL pointer was specified"); + + if (evk_alloc_queueID(queueID) < 0) { + return EV_ERR_Fatal; + } + + err = EVK_create_queue_in(*queueID, length, max_bytes, type); + if (err != EV_OK) { + *queueID = EV_NO_ID; + } + return err; +} + +/** @see EV_destroy_flag */ +EV_ERR +EVK_destroy_flag(EV_ID flagID) +{ + int err; + err = evk_destroy_queue(flagID); + + if (err == -ENOENT) { + return EV_ERR_Invalid_ID; + } else if (err < 0) { + return EV_ERR_Fatal; + } else { + return EV_OK; + } +} + +/** @see EV_destroy_queue */ +EV_ERR +EVK_destroy_queue(EV_ID queueID) +{ + return EVK_destroy_flag(queueID); +} + +/* Sending the event */ +/** @see EV_set_flag */ +EV_ERR +EVK_set_flag(EV_ID flagID, UINT32 bits) +{ + EV_Flag flag; + int ret; + + if (!EV_ID_IS_FLAG(flagID)) { + return EV_ERR_Invalid_ID; + } + flag.flagID = flagID; + flag.bits = bits; + + ret = evk_store_flag(&flag, evk_mem_kernel); + if (ret == -ENOENT) { + return EV_ERR_Invalid_ID; + } else if (ret < 0) { + return EV_ERR_Fatal; + } else { + return EV_OK; + } +} + +/** @see EV_set_flag64 */ +EV_ERR +EVK_set_flag64(EV_ID flagID, UINT64 bits) +{ + EV_Flag64 flag; + int ret; + + if (!EV_ID_IS_FLAG64(flagID)) { + return EV_ERR_Invalid_ID; + } + flag.flagID = flagID; + flag.bits = bits; + + ret = evk_store_flag64(&flag, evk_mem_kernel); + if (ret == -ENOENT) { + return EV_ERR_Invalid_ID; + } else if (ret < 0) { + return EV_ERR_Fatal; + } else { + return EV_OK; + } +} + +/** @see EV_send_message */ +EV_ERR +EVK_send_message(EV_ID queueID, UINT16 bytes, const void *message, + UINT32 senderInfo) +{ + EV_Message *msg = NULL; + EV_ERR ev_ret; + int ret; + + msg = evk_malloc( sizeof( EV_Message ) ); + if( msg == NULL ) + { + ev_ret = EV_ERR_Fatal; + goto L_END; + } + + if (!EV_ID_IS_QUEUE(queueID)) { + ev_ret = EV_ERR_Invalid_ID; + goto L_END; + } + EVK_assert(message != NULL, "NULL pointer was specified"); + EVK_assert(bytes <= EV_MAX_MESSAGE_LENGTH, "send_message: message too long"); + + msg->queueID = queueID; + msg->senderInfo = senderInfo; + msg->length = bytes; + memcpy(msg->message, message, bytes); + + ret = evk_store_message(msg, evk_mem_kernel); + if (ret == -ENOENT) { + ev_ret = EV_ERR_Invalid_ID; + } else if (ret == -EBUSY) { + ev_ret = EV_ERR_Busy; + } else if (ret < 0) { + ev_ret = EV_ERR_Fatal; + } else { + ev_ret = EV_OK; + } + +L_END: + if( msg != NULL ) + { + evk_free( msg ); + } + return ev_ret; +} + +/* Event acquisition(Order of arrival time) */ +//EV_ERR EV_get_next_event(/* OUT */EV_Event *ev); + +static EV_ERR +EVK_get_flag_in(EV_ID flagID, EV_Flag *flag, int peek_only, int wait) +{ + EV_Event *ev = NULL; + EV_ERR ev_ret; + int ret; + + ev = evk_malloc( sizeof( EV_Event ) ); + if( ev == NULL ) + { + ev_ret = EV_ERR_Fatal; + goto L_END; + } + + EVK_assert(flag != NULL, "get_flag: NULL pointer was specified"); + flag->flagID = EV_NO_ID; + flag->bits = 0; + + if (!EV_ID_IS_FLAG(flagID)) { + ev_ret = EV_ERR_Invalid_ID; + goto L_END; + } + + ev->type = EV_EVENT_Flag; + ev->u.flag.flagID = flagID; + ev->u.flag.bits = 0; + + ret = evk_get_event(ev, peek_only, wait, evk_mem_kernel); + + if (ret < 0) { + if (ret == -ENOENT) { + ev_ret = EV_ERR_Invalid_ID; + } else if (ret == -EINTR) { + ev_ret = EV_ERR_Interrupted; + } else { + ev_ret = EV_ERR_Fatal; + } + goto L_END; + } + + if (ev->type == EV_EVENT_Flag) { + flag->flagID = ev->u.flag.flagID; + flag->bits = ev->u.flag.bits; + } + ev_ret = EV_OK; + +L_END: + if( ev != NULL ) + { + evk_free( ev ); + } + return ev_ret; +} + +static EV_ERR +EVK_get_flag64_in(EV_ID flagID, EV_Flag64 *flag, int peek_only, int wait) +{ + EV_Event *ev = NULL; + EV_ERR ev_ret; + int ret; + + ev = evk_malloc( sizeof( EV_Event ) ); + if( ev == NULL ) + { + ev_ret = EV_ERR_Fatal; + goto L_END; + } + + EVK_assert(flag != NULL, "get_flag64: NULL pointer was specified"); + flag->flagID = EV_NO_ID; + flag->bits = 0; + + if (!EV_ID_IS_FLAG64(flagID)) { + ev_ret = EV_ERR_Invalid_ID; + goto L_END; + } + + ev->type = EV_EVENT_Flag64; + ev->u.flag64.flagID = flagID; + ev->u.flag64.bits = 0; + + ret = evk_get_event(ev, peek_only, wait, evk_mem_kernel); + + if (ret < 0) { + if (ret == -ENOENT) { + ev_ret = EV_ERR_Invalid_ID; + } else if (ret == -EINTR) { + ev_ret = EV_ERR_Interrupted; + } else { + ev_ret = EV_ERR_Fatal; + } + goto L_END; + } + + if (ev->type == EV_EVENT_Flag64) { + flag->flagID = ev->u.flag64.flagID; + flag->bits = ev->u.flag64.bits; + } + ev_ret = EV_OK; + +L_END: + if( ev != NULL ) + { + evk_free( ev ); + } + return ev_ret; +} + +/* Event acquisition(With Search Criteria) */ +/** @see EV_get_flag */ +EV_ERR +EVK_get_flag(EV_ID flagID, /* OUT */EV_Flag *flag) +{ + return EVK_get_flag_in(flagID, flag, 0, 0); +} + +/** @see EV_get_flag64 */ +EV_ERR +EVK_get_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag) +{ + return EVK_get_flag64_in(flagID, flag, 0, 0); +} + +/** @see EV_wait_flag */ +EV_ERR +EVK_wait_flag(EV_ID flagID, /* OUT */EV_Flag *flag)/* block */ +{ + return EVK_get_flag_in(flagID, flag, 0, 1); +} + +/** @see EV_wait_flag64 */ +EV_ERR +EVK_wait_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag)/* block */ +{ + return EVK_get_flag64_in(flagID, flag, 0, 1); +} + +/** @see EV_peek_flag */ +EV_ERR +EVK_peek_flag(EV_ID flagID, /* OUT */EV_Flag *flag) +{ + return EVK_get_flag_in(flagID, flag, 1, 0); +} + +/** @see EV_peek_flag64 */ +EV_ERR +EVK_peek_flag64(EV_ID flagID, /* OUT */EV_Flag64 *flag) +{ + return EVK_get_flag64_in(flagID, flag, 1, 0); +} + +static EV_ERR +EVK_get_message_in(EV_ID queueID, EV_Message *message, UINT32 senderInfo, + UINT32 length, const void *compare_bytes, + int peek_only, int wait) +{ + EV_Event *ev = NULL; + EV_ERR ev_ret; + int ret; + + ev = evk_malloc( sizeof( EV_Event ) ); + if( ev == NULL ) + { + ev_ret = EV_ERR_Fatal; + goto L_END; + } + + EVK_assert(message != NULL, "get_message: NULL pointer was specified"); + if (!EV_ID_IS_QUEUE(queueID)) { + ev_ret = EV_ERR_Invalid_ID; + goto L_END; + } + message->queueID = EV_NO_ID; + message->senderInfo = 0; + message->length = 0; + + ev->type = EV_EVENT_Message; + ev->u.message.queueID = queueID; + ev->u.message.senderInfo = senderInfo; + if (compare_bytes != NULL) { + ev->u.message.length = length; + memcpy(ev->u.message.message, compare_bytes, length); + } else { + ev->u.message.length = 0; + } + + ret = evk_get_event(ev, peek_only, wait, evk_mem_kernel); + + if (ret < 0) { + if (ret == -ENOENT) { + ev_ret = EV_ERR_Invalid_ID; + } else if (ret == -EINTR) { + ev_ret = EV_ERR_Interrupted; + } else { + ev_ret = EV_ERR_Fatal; + } + goto L_END; + } + + if (ev->type == EV_EVENT_Message) { + message->queueID = ev->u.message.queueID; + message->senderInfo = ev->u.message.senderInfo; + message->length = ev->u.message.length; + memcpy(message->message, ev->u.message.message, ev->u.message.length); + } + ev_ret = EV_OK; + +L_END: + if( ev != NULL ) + { + evk_free( ev ); + } + return ev_ret; +} + +/** @see EV_get_message */ +EV_ERR +EVK_get_message(EV_ID queueID, /* OUT */EV_Message *message) +{ + return EVK_get_message_in(queueID, message, 0, 0, NULL, 0, 0); +} + +/** @see EV_wait_message */ +EV_ERR +EVK_wait_message(EV_ID queueID, /* OUT */EV_Message *message)/* block */ +{ + return EVK_get_message_in(queueID, message, 0, 0, NULL, 0, 1); +} + +/** @see EV_peek_message */ +EV_ERR +EVK_peek_message(EV_ID queueID, /* OUT */EV_Message *message) +{ + return EVK_get_message_in(queueID, message, 0, 0, NULL, 1, 0); +} + +/** @see EV_find_message_by_sender */ +EV_ERR +EVK_find_message_by_sender(EV_ID queueID, UINT32 senderInfo, + /* OUT */EV_Message *message) +{ + // Not mounted + return EV_ERR_Fatal; +} + +/** @see EV_find_message_by_content */ +EV_ERR +EVK_find_message_by_content(EV_ID queueID, UINT16 length, + const void *compare_bytes, + /* OUT */EV_Message *message) +{ + // Not mounted + return EV_ERR_Fatal; +} +/** @} */ + +EXPORT_SYMBOL(evk_get_queue_entry); +EXPORT_SYMBOL(EVK_init); +EXPORT_SYMBOL(EVK_exit); + +EXPORT_SYMBOL(EVK_create_flag); +EXPORT_SYMBOL(EVK_create_flag64); +EXPORT_SYMBOL(EVK_create_queue); +EXPORT_SYMBOL(EVK_create_flag_auto_id); +EXPORT_SYMBOL(EVK_create_flag64_auto_id); +EXPORT_SYMBOL(EVK_create_queue_auto_id); +EXPORT_SYMBOL(EVK_destroy_flag); +EXPORT_SYMBOL(EVK_destroy_queue); +EXPORT_SYMBOL(EVK_set_flag); +EXPORT_SYMBOL(EVK_set_flag64); +EXPORT_SYMBOL(EVK_send_message); +EXPORT_SYMBOL(EVK_get_flag); +EXPORT_SYMBOL(EVK_wait_flag); +EXPORT_SYMBOL(EVK_peek_flag); +EXPORT_SYMBOL(EVK_get_flag64); +EXPORT_SYMBOL(EVK_wait_flag64); +EXPORT_SYMBOL(EVK_peek_flag64); +EXPORT_SYMBOL(EVK_get_message); +EXPORT_SYMBOL(EVK_wait_message); +EXPORT_SYMBOL(EVK_peek_message); + +#ifndef CONFIG_COMBINE_MODULES +//MODULE_LICENSE("proprietary"); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("EVent library for Kernel"); +//MODULE_SUPPORTED_DEVICE(name); +//MODULE_PARM(var,type) +//MODULE_PARM_DESC(var,desc) +module_init(EVK_init); +module_exit(EVK_exit); +#endif /* !CONFIG_COMBINE_MODULES */ diff --git a/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib_1.0.0.bb new file mode 100644 index 00000000..52700df4 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-core/kernel-module-evklib/kernel-module-evklib_1.0.0.bb @@ -0,0 +1,26 @@ +# +# "kernel module for libev" recipe +# + +SUMMARY = "libev kernel module for AGL software" +DESCRIPTION = "libev kernel module build AGL software" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +inherit module + +FILES_${PN} = "/lib/modules/${KERNEL_VERSION}/evk_lib.ko" + +KERNEL_MODULE_AUTOLOAD += "evk_lib" + +SRC_URI += " \ + file://evk_lib.c \ + file://Makefile \ + file://agldd \ +" +S = "${WORKDIR}" + +do_install (){ + install -d ${D}/lib/modules/${KERNEL_VERSION}/ + install -m 644 evk_lib.ko ${D}/lib/modules/${KERNEL_VERSION}/ +} diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ns-backupmanager/ns-backupmanager_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-backupmanager/ns-backupmanager_1.0.0.bb new file mode 100644 index 00000000..97356da7 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-backupmanager/ns-backupmanager_1.0.0.bb @@ -0,0 +1,30 @@ +SUMMARY = "ns-backupmanager for AGL software" +DESCRIPTION = "ns-backupmanager to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/conf/backup_manager/* \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ns-backupmanager" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + libxml2-native \ + ns-frameworkunified \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ +" +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="backup_manager" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ns-commonlibrary/ns-commonlibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-commonlibrary/ns-commonlibrary_1.0.0.bb new file mode 100644 index 00000000..3d7da9b8 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-commonlibrary/ns-commonlibrary_1.0.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "ns-commonlibrary for AGL software" +DESCRIPTION = "ns-commonlibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ns-commonlibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " " + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="common_library" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ns-frameworkunified/ns-frameworkunified_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-frameworkunified/ns-frameworkunified_1.0.0.bb new file mode 100644 index 00000000..104a98a0 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-frameworkunified/ns-frameworkunified_1.0.0.bb @@ -0,0 +1,42 @@ +SUMMARY = "ns-frameworkunified for AGL software" +DESCRIPTION = "ns-frameworkunified to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ + /usr/agl/conf/ns_logger/* \ +" +FILES_${PN}-staticdev += " \ + /usr/agl/lib/*.a \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ns-frameworkunified" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +# Common Dependencies +DEPENDS += " \ + os-vehicleparameterlibrary \ + os-posixbasedos001legacylibrary \ + ns-loglibrary \ + ns-commonlibrary \ + libxml2 \ + boost \ +" +RDEPENDS_${PN} += " \ + os-vehicleparameterlibrary \ + os-posixbasedos001legacylibrary \ + ns-loglibrary \ + ns-commonlibrary \ +" +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE} -j 1" +MAKE_DIR ="framework_unified" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ns-loglibrary/ns-loglibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-loglibrary/ns-loglibrary_1.0.0.bb new file mode 100644 index 00000000..0990bd00 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ns-loglibrary/ns-loglibrary_1.0.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "ns-loglibrary for AGL software" +DESCRIPTION = "ns-loglibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ns-loglibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " " + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="log_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/os-eventlibrary/os-eventlibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/os-eventlibrary/os-eventlibrary_1.0.0.bb new file mode 100644 index 00000000..40a084a1 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/os-eventlibrary/os-eventlibrary_1.0.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "os-eventlibrary for AGL software" +DESCRIPTION = "os-eventlibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " /usr/agl/lib/* " +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/os-eventlibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " " + +RDEPENDS_${PN} += " \ + kernel-module-evklib \ +" + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="event_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/os-posixbasedos001legacylibrary/os-posixbasedos001legacylibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/os-posixbasedos001legacylibrary/os-posixbasedos001legacylibrary_1.0.0.bb new file mode 100644 index 00000000..29e57dd5 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/os-posixbasedos001legacylibrary/os-posixbasedos001legacylibrary_1.0.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "os-posixbasedos001legacylibrary for AGL software" +DESCRIPTION = "os-posixbasedos001legacylibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " /usr/agl/lib/* " +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/os-posixbasedos001legacylibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " " + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="posix_based_os001_legacy_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary-tool_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary-tool_1.0.0.bb new file mode 100644 index 00000000..72e59811 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary-tool_1.0.0.bb @@ -0,0 +1,37 @@ +SUMMARY = "librpc tools for AGL software" +DESCRIPTION = "install librpc tool" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/os-rpclibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + + +#inherit native nativesdk +BBCLASSEXTEND = "native nativesdk" + +PV = "1.0.0+gitr${SRCPV}" + +INSANE_SKIP_${PN} = "compile-host-path" +INSANE_SKIP_${PN} = "ldflags" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "'CXX=${CXX}' 'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'LDFLAGS=${LDFLAGS} ${LDLIBS}' 'CFLAGS=${CFLAGS}' 'SDKTARGETSYSROOT=${STAGING_DIR_NATIVE}'" +EXTRA_OEMAKE += " -j 1" +DEPENDS += " agl-basefiles-native bison-native " +MAKE_DIR = "rpc_library" +do_compile (){ + cd ${MAKE_DIR}/tool + oe_runmake +} + +do_install (){ + install -D -m 755 rpc_library/tool/rpc_apidef ${D}${base_prefix}/usr/bin/rpc_apidef +} +FILES_${PN} += "${base_prefix}/usr/bin/rpc_apidef" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary_1.0.0.bb new file mode 100644 index 00000000..ac329f33 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/os-rpclibrary/os-rpclibrary_1.0.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "os-rpclibrary for AGL software" +DESCRIPTION = "os-rpclibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/os-rpclibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +#Added here because they are native recipes, although they are AGLs +DEPENDS += " \ + ns-commonlibrary \ + ns-loglibrary \ + bison-native \ +" +RDEPENDS_${PN} += " \ + ns-commonlibrary \ + ns-loglibrary \ +" +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="rpc_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/os-vehicleparameterlibrary/os-vehicleparameterlibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/os-vehicleparameterlibrary/os-vehicleparameterlibrary_1.0.0.bb new file mode 100644 index 00000000..c171ea3f --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/os-vehicleparameterlibrary/os-vehicleparameterlibrary_1.0.0.bb @@ -0,0 +1,24 @@ +SUMMARY = "os-vehicleparameterlibrary for AGL software" +DESCRIPTION = "os-vehicleparameterlibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/os-vehicleparameterlibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " " + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="vehicle_parameter_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ps-communication/ps-communication_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ps-communication/ps-communication_1.0.0.bb new file mode 100644 index 00000000..53b81c77 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ps-communication/ps-communication_1.0.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "ps-communication for AGL software" +DESCRIPTION = "ps-communication to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ps-communication" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ns-frameworkunified \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ +" + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="communication" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ss-config/ss-config_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-config/ss-config_1.0.0.bb new file mode 100644 index 00000000..6d21db22 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-config/ss-config_1.0.0.bb @@ -0,0 +1,35 @@ +SUMMARY = "ss-config for AGL software" +DESCRIPTION = "ss-config to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-config" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ss-interfaceunified \ + ss-romaccesslibrary \ + ss-versionlibrary \ + ns-frameworkunified \ + ps-communication \ +" +RDEPENDS_${PN} += " \ + ss-interfaceunified \ + ss-romaccesslibrary \ + ns-frameworkunified \ + ps-communication \ + ss-versionlibrary \ +" +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="config" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ss-interfaceunified/ss-interfaceunified_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-interfaceunified/ss-interfaceunified_1.0.0.bb new file mode 100644 index 00000000..28544e1d --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-interfaceunified/ss-interfaceunified_1.0.0.bb @@ -0,0 +1,43 @@ +SUMMARY = "ss-interfaceunified for AGL software" +DESCRIPTION = "ss-interfaceunified to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common +FILES_${PN} += " \ + /usr/agl/lib/* \ + /usr/agl/share \ + /usr/agl/conf \ + /usr/agl/share/systemmanager \ + /usr/agl/share/systemmanager/scfg \ + /usr/agl/share/systemmanager/scfg/* \ + /usr/agl/conf/systemmanager \ + /usr/agl/conf/systemmanager/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-interfaceunified" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ss-romaccesslibrary \ + ns-commonlibrary \ + ns-frameworkunified \ + elfio \ +" +RDEPENDS_${PN} += " \ + elfio \ + ns-commonlibrary \ + ns-frameworkunified \ + ss-romaccesslibrary \ +" + +#EXTRA_OEMAKE = "'CXX=${CXX} -I../../rom_access_library/library/include/' 'CC=${CC} -I../../rom_access_library/library/include/' 'RANLIB=${RANLIB}' 'AR=${AR}' 'DESTDIR=${D}' 'SDKTARGETSYSROOT=${STAGING_DIR_HOST}' 'OECORE_NATIVE_SYSROOT=${STAGING_DIR_NATIVE}'" + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="interface_unified" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ss-resourcemanager/ss-resourcemanager_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-resourcemanager/ss-resourcemanager_1.0.0.bb new file mode 100644 index 00000000..073acf71 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-resourcemanager/ss-resourcemanager_1.0.0.bb @@ -0,0 +1,41 @@ +SUMMARY = "ss-resourcemanager for AGL software" +DESCRIPTION = "ss-resourcemanager to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-resourcemanager" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +# Common Dependencies +DEPENDS += " \ + os-rpclibrary-tool-native \ + ss-interfaceunified \ + ns-frameworkunified \ + ns-commonlibrary \ + os-vehicleparameterlibrary \ + os-rpclibrary \ + os-eventlibrary \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ + ss-interfaceunified \ + ns-commonlibrary \ + ns-frameworkunified \ + os-vehicleparameterlibrary \ + os-rpclibrary \ + os-eventlibrary \ +" + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE} -j 1 'CXX=${CXX} -Wl,--warn-unresolved-symbols' 'CC=${CC} -Wl,--warn-unresolved-symbols'" +MAKE_DIR ="resource_manager" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ss-romaccesslibrary/ss-romaccesslibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-romaccesslibrary/ss-romaccesslibrary_1.0.0.bb new file mode 100644 index 00000000..e6c6ec86 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-romaccesslibrary/ss-romaccesslibrary_1.0.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "ss-romaccesslibrary for AGL software" +DESCRIPTION = "ss-romaccesslibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-romaccesslibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ns-frameworkunified \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ +" +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="rom_access_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ss-taskmanager/ss-taskmanager_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-taskmanager/ss-taskmanager_1.0.0.bb new file mode 100644 index 00000000..55f19523 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-taskmanager/ss-taskmanager_1.0.0.bb @@ -0,0 +1,45 @@ +SUMMARY = "ss-taskmanager for AGL software" +DESCRIPTION = "ss-taskmanager to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ + /usr/agl/conf/tm_launch/* \ + /usr/agl/conf/thread/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-taskmanager" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +# Common Dependencies +DEPENDS += " \ + os-rpclibrary-tool-native \ + ss-interfaceunified \ + ss-romaccesslibrary \ + ss-resourcemanager \ + ns-frameworkunified \ + ns-commonlibrary \ + os-rpclibrary \ + os-vehicleparameterlibrary \ + libxml2-native \ +" +RDEPENDS_${PN} += " \ + ss-interfaceunified \ + ns-frameworkunified \ + ns-commonlibrary \ + ss-romaccesslibrary \ + os-rpclibrary \ + ss-resourcemanager \ + os-vehicleparameterlibrary \ +" +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE} -j 1 'CXX=${CXX} -Wl,--warn-unresolved-symbols' 'CC=${CC} -Wl,--warn-unresolved-symbols'" +MAKE_DIR ="task_manager" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/ss-versionlibrary/ss-versionlibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-versionlibrary/ss-versionlibrary_1.0.0.bb new file mode 100644 index 00000000..87b920ef --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/ss-versionlibrary/ss-versionlibrary_1.0.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "ss-versionlibrary for AGL software" +DESCRIPTION = "ss-versionlibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/ss-versionlibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ns-frameworkunified \ + ss-interfaceunified \ + ss-romaccesslibrary \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ + ss-interfaceunified \ + ss-romaccesslibrary \ +" +EXTRA_MAKEFILE = " -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="version_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioning/vs-positioning_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioning/vs-positioning_1.0.0.bb new file mode 100644 index 00000000..acccd9ac --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioning/vs-positioning_1.0.0.bb @@ -0,0 +1,35 @@ +SUMMARY = "vs-positioning for AGL software" +DESCRIPTION = "vs-positioning to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common + +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + +FILES_${PN}-staticdev = "/usr/agl/lib/*.a" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/vs-positioning" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ns-frameworkunified \ + os-vehicleparameterlibrary \ + vs-positioningbaselibrary \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ + os-vehicleparameterlibrary \ + vs-positioningbaselibrary \ +" +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE} -j 1 'CXX=${CXX} -Wl,--warn-unresolved-symbols' 'CC=${CC} -Wl,--warn-unresolved-symbols'" +MAKE_DIR ="positioning" + + diff --git a/meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioningbaselibrary/vs-positioningbaselibrary_1.0.0.bb b/meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioningbaselibrary/vs-positioningbaselibrary_1.0.0.bb new file mode 100644 index 00000000..a1f1a98e --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-graphics/vs-positioningbaselibrary/vs-positioningbaselibrary_1.0.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "vs-positioningbaselibrary for AGL software" +DESCRIPTION = "vs-positioningbaselibrary to build AGL software" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${MAKE_DIR}/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +inherit agl-basesystem-common +FILES_${PN} += " \ + /usr/agl/lib/* \ +" +FILES_${PN}-dev += "/usr/agl/include/*" + + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/toyota.git;protocol=https;branch=sandbox/ToshikazuOhiwa/vs-positioningbaselibrary" +SRCREV = "${AUTOREV}" + +PV = "1.0.0+gitr${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " \ + ns-frameworkunified \ + os-eventlibrary \ +" +RDEPENDS_${PN} += " \ + ns-frameworkunified \ + os-eventlibrary \ +" + +EXTRA_MAKEFILE=" -f Makefile.client" +EXTRA_OEMAKE += "${EXTRA_MAKEFILE}" +MAKE_DIR ="positioning_base_library" + diff --git a/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-core.bb b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-core.bb new file mode 100644 index 00000000..6c97a113 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-core.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "AGL Core Package Groups" +LICENSE = "CLOSED" +PR = "r1" + + +DEPENDS += " \ + agl-basefiles \ + agl-systemd \ + " + +# +# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH +# +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-basesystem-core \ + " + +RDEPENDS_packagegroup-agl-basesystem-core = "\ + agl-basefiles \ + sudo \ + agl-systemd \ + " + +RDEPENDS_packagegroup-agl-basesystem-core-dbg = "\ + sysklogd \ + strace \ + uftrace \ + sysstat \ + valgrind \ + " diff --git a/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-graphics.bb b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-graphics.bb new file mode 100644 index 00000000..33affc03 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-graphics.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "Native Service Package Groups" +LICENSE = "CLOSED" +PR = "r1" + +DEPENDS_qemux86-64 = "agl-basefiles" +DEPENDS_qemuarm64 = "agl-basefiles" + +# +# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-basesystem-graphics \ + " +RDEPENDS_${PN} += " \ + ns-commonlibrary \ + ns-loglibrary \ + ns-frameworkunified \ + ns-backupmanager \ + os-eventlibrary \ + os-posixbasedos001legacylibrary \ + os-vehicleparameterlibrary \ + os-rpclibrary \ + ps-communication \ + ss-versionlibrary \ + ss-romaccesslibrary \ + ss-config \ + ss-interfaceunified \ + ss-resourcemanager \ + ss-taskmanager \ + vs-positioning \ + vs-positioningbaselibrary \ +" + diff --git a/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-service.bb b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-service.bb new file mode 100644 index 00000000..724dd83a --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem-service.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Native Service Package Groups" +LICENSE = "CLOSED" +PR = "r1" + +DEPENDS_qemux86-64 = "agl-basefiles" +DEPENDS_qemuarm64 = "agl-basefiles" + +# +# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH +# +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-basesystem-service \ + " +RDEPENDS_${PN} += " \ + agl-service-ns-backupmanager \ + agl-service-ns-notificationpersistent \ + agl-service-ps-communication \ + agl-service-ss-loggerservice \ + agl-service-ss-powerservice \ + agl-service-ss-resourcemanager \ + agl-service-ss-taskmanager \ + agl-service-vs-positioning \ + agl-service-ss-systemmanager \ + " + diff --git a/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem.bb b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem.bb new file mode 100644 index 00000000..896eb670 --- /dev/null +++ b/meta-agl/meta-agl-basesystem/recipes-platform/packagegroups/packagegroup-agl-basesystem.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "BaseSystem Package Groups" +LICENSE = "CLOSED" +PR = "r1" + +DEPENDS = " " + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-basesystem \ + " +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-image-minimal \ + " + +RDEPENDS_${PN} += "\ + packagegroup-agl-basesystem-core \ + packagegroup-agl-basesystem-graphics \ + packagegroup-agl-basesystem-service \ + " + + diff --git a/meta-agl/meta-agl-bsp/classes/sdcard_image-socfpga.bbclass b/meta-agl/meta-agl-bsp/classes/sdcard_image-socfpga.bbclass new file mode 100644 index 00000000..2967063e --- /dev/null +++ b/meta-agl/meta-agl-bsp/classes/sdcard_image-socfpga.bbclass @@ -0,0 +1,182 @@ +inherit image_types + +# Create an sdcard image suitable for the atlas board +# This is copied from the raspberrypi and freescale sdcard classes + +# Disk layout +# 0 -> 8*1024 - reserverd +# 8*1024 -> 32*1024 - +# 32*1024 -> 1024*1024 - +# 1024*1024 -> BOOT_SPACE - bootloader and kernel in Part 3 +# BOOT_SPACE*1024 -> FAT_SPACE + + + +# This image depends on the rootfs image +IMAGE_TYPEDEP_socfpga-sdimg = "${SDIMG_ROOTFS_TYPE}" + +# Boot partition volume id +BOOTDD_VOLUME_ID ?= "${MACHINE}" + +# Boot partition size [in KiB] -> size 2M for A10 +BOOT_SPACE ?= "2048" + +# Fat partition size +FAT_SPACE ?= "102400" + +# uBoot ENV offset +SDIMG_UBOOT_ENV_OFFSET ?= "512" +ENV_BASE_NAME ??= "${UBOOT_CONFIG}" + +# Boot partition begin at sector 1024 +# This is required as for c5/a5 mainline uboot hard codes the location +# of the uboot image in the sdcard to 0xa00 sector +IMAGE_ROOTFS_ALIGNMENT = "1024" + +# ROOTFS_SIZE_MOD ?= "524288" +ROOTFS_SIZE_MOD ?= "16384" + +# Use an uncompressed ext3 by default as rootfs +SDIMG_ROOTFS_TYPE = "ext3" +SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}" + + +do_image_socfpga_sdimg[depends] += " \ + coreutils-native:do_populate_sysroot \ + parted-native:do_populate_sysroot \ + mtools-native:do_populate_sysroot \ + dosfstools-native:do_populate_sysroot \ + virtual/kernel:do_deploy \ + virtual/bootloader:do_deploy \ + " + +rootfs[depends] += "virtual/kernel:do_deploy" + +# SD card image name +SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.socfpga-sdimg" + +IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}" + +# After uboot v2016.05 the boot partition number was changed from 3 to 1 so as a +# result we need 2 different functions for creating the boot partitions just to +# change the partition creation order + +SOCFPGA_SDIMG_PARTITION_COMMAND ?= "generate_sdcard_partitions" + +generate_sdcard_partitions () { + + # Create partition table + parted -s ${SDIMG} mklabel msdos + # P1: Fat partition + parted -s ${SDIMG} unit KiB mkpart primary fat32 $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED}) + # set fat partition as bootable for distroboot + parted -s ${SDIMG} set 1 boot on + # P2: Linux FS partition + parted -s ${SDIMG} unit KiB mkpart primary $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED}) $(expr ${IMAGE_ROOTFS_ALIGNMENT} \+ ${BOOT_SPACE_ALIGNED} \+ ${FAT_SPACE_ALIGNED} \+ ${ROOTFS_SIZE_ALIGNED}) + # P3: A2 partition for bootloader + parted -s ${SDIMG} unit KiB mkpart primary ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) + + # set part 3 to type a2 for spl / uboot image + # 446 to partition table, 16 bytes per entry, 4 byte offset to partition type + echo -ne "\xa2" | dd of=${SDIMG} bs=1 count=1 seek=$(expr 446 + 16 + 16 + 4) conv=notrunc && sync && sync + + # Create a vfat image with boot files + FAT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') + rm -f ${WORKDIR}/fat.img + mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/fat.img $FAT_BLOCKS + +} + +IMAGE_CMD_socfpga-sdimg () { + + # Align partitions + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) + FAT_SPACE_ALIGNED=$(expr ${FAT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) + FAT_SPACE_ALIGNED=$(expr ${FAT_SPACE_ALIGNED} - ${FAT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) + + ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} \+ ${ROOTFS_SIZE_MOD}) + ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} \- ${ROOTFS_SIZE_ALIGNED} \% ${ROOTFS_SIZE_MOD}) + + SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${FAT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT}) + + # Initialize sdcard image file + dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE}) && sync && sync + + # Create partition table + ${SOCFPGA_SDIMG_PARTITION_COMMAND} + + # Copy kernel image + mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::/${KERNEL_IMAGETYPE} + + # Copy boot scripts + if [ -e "${DEPLOY_DIR_IMAGE}/${MACHINE}.scr" ] + then + mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${MACHINE}.scr ::/u-boot.scr + fi + + # Copy device tree file + if test -n "${KERNEL_DEVICETREE}"; then + for DTS_FILE in ${KERNEL_DEVICETREE}; do + DTS_BASE_NAME=`basename ${DTS_FILE} | awk -F "." '{print $1}'` + if [ -e "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb" ]; then + kernel_bin="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin`" + kernel_bin_for_dtb="`readlink ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb | sed "s,$DTS_BASE_NAME,${MACHINE},g;s,\.dtb$,.bin,g"`" + if [ $kernel_bin = $kernel_bin_for_dtb ]; then + mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTS_BASE_NAME}.dtb ::/${DTS_BASE_NAME}.dtb + fi + fi + done + fi + + # copy extlinux stuff + if [ "${UBOOT_EXTLINUX}" = "1" ] + then + if [ -e "${DEPLOY_DIR_IMAGE}/extlinux.conf" ] + then + rm -Rf ${WORKDIR}/extlinux + mkdir ${WORKDIR}/extlinux + cp ${DEPLOY_DIR_IMAGE}/extlinux.conf ${WORKDIR}/extlinux/ + mcopy -i ${WORKDIR}/fat.img -s ${WORKDIR}/extlinux ::/ + fi + + fi + + # copy any files listed as extra files + if test -n "${SOCFPGA_SDIMG_EXTRA_FILES}"; then + for EXTRA_FILE in ${SOCFPGA_SDIMG_EXTRA_FILES}; do + if [ -e "${DEPLOY_DIR_IMAGE}/${EXTRA_FILE}" ]; then + mcopy -i ${WORKDIR}/fat.img -s ${DEPLOY_DIR_IMAGE}/${EXTRA_FILE} ::/${EXTRA_FILE} + fi + done + fi + + # Add stamp file + echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/fat.img -v ${WORKDIR}//image-version-info :: + + # Burn Partitions + dd if=${WORKDIR}/fat.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat + if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" + then + xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + 1024 \* ${FAT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + else + dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + 1024 \* ${FAT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + fi + + if [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG}" ] + then + dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY}-${UBOOT_CONFIG} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + elif [ -e "${DEPLOY_DIR_IMAGE}/${SPL_BINARY}" ] + then + dd if=${DEPLOY_DIR_IMAGE}/${SPL_BINARY} of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync + else + bbfatal "${SPL_BINARY} does not exist." + fi + + if [ -e "${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin" ]; then + dd if=${DEPLOY_DIR_IMAGE}/u-boot-env-${ENV_BASE_NAME}.bin of=${SDIMG} conv=notrunc bs=1 seek=${SDIMG_UBOOT_ENV_OFFSET} && sync && sync + fi + +} diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc b/meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc new file mode 100644 index 00000000..4f4dc986 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc @@ -0,0 +1,43 @@ +# This config is for the Sancloud BBE, adapted from the config provider for the +# standard Beaglebone + +AGL_DEFAULT_IMAGE_FSTYPES = "tar.xz wic.xz wic.bmap" + +CORE_IMAGE_EXTRA_INSTALL += "packagegroup-machine-base" + +#------------------------------------------------- +## Graphics section ## +#------------------------------------------------- +PACKAGES_GFX = "omapdrm-pvr" +IMAGE_INSTALL_append = " ${PACKAGES_GFX}" + + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " sgx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +DEPENDS_remove = "virtual/libgl" + +# Preferred providers +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um" +PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um" +PREFERRED_PROVIDER_virtual/mesa = "mesa-gl" +PREFERRED_PROVIDER_libgbm = "libgbm" + +#Preferred versions +PREFERRED_VERSION_libgbm = "10.0.0" + +#------------------------------------------------- +## Multimedia section ## +#------------------------------------------------- + +# DEFAULTTUNE for cortex-a8 +DISTRO_FEATURES_append = " agl-medium-arm-compiler" + +SECURITY_CFLAGS_pn-mozjs = "" +SECURITY_LDFLAGS_pn-mozjs = "" +SECURITY_CFLAGS_pn-gpm = "" +SECURITY_LDFLAGS_pn-gpm = "" +SECURITY_CFLAGS_pn-libatasmart = "" +SECURITY_LDFLAGS_pn-libatasmart = "" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc b/meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc new file mode 100644 index 00000000..988b3d53 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc @@ -0,0 +1,45 @@ +# This config is for the beaglebone (inspired from the vayu config). + +#------------------------------------------------- +## Graphics section ## +#------------------------------------------------- +PACKAGES_GFX = "omapdrm-pvr" +IMAGE_INSTALL_append = " ${PACKAGES_GFX}" + + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " sgx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +DEPENDS_remove = "virtual/libgl" + +# Preferred providers +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um" +PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um" +PREFERRED_PROVIDER_virtual/mesa = "mesa-gl" +PREFERRED_PROVIDER_libgbm = "libgbm" + +#Preferred versions +PREFERRED_VERSION_libgbm = "10.0.0" + +#------------------------------------------------- +## Multimedia section ## +#------------------------------------------------- + +PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_VERSION_virtual/kernel = "4.9" + +# DEFAULTTUNE for cortex-a8 +DISTRO_FEATURES_append = " agl-medium-arm-compiler" + +SECURITY_CFLAGS_pn-mozjs = "" +SECURITY_LDFLAGS_pn-mozjs = "" +SECURITY_CFLAGS_pn-gpm = "" +SECURITY_LDFLAGS_pn-gpm = "" +SECURITY_CFLAGS_pn-libatasmart = "" +SECURITY_LDFLAGS_pn-libatasmart = "" + +WKS_FILE = "sdimage-bootpart-uuid.wks" + +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_cubox-i.inc b/meta-agl/meta-agl-bsp/conf/include/agl_cubox-i.inc new file mode 100644 index 00000000..b43ef47c --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_cubox-i.inc @@ -0,0 +1,27 @@ +DISTRO_FEATURES_append = " agl-medium-arm-compiler" + +# This disables the Freescale/NXP Vivante GPU driver and enables +# etnaviv support. +MACHINEOVERRIDES .= ":use-mainline-bsp" + +# Disable meta-freescale package architecure mangling, as it causes +# issues with AGL's explicit setting of DEFAULTTUNE. +INHERIT_remove = "fsl-dynamic-packagearch" +MACHINE_SOCARCH = "${TUNE_PKGARCH}" + +# Include devicetrees for SOM 1.5 and Hummingboard 2 hardware +KERNEL_DEVICETREE_append = " \ + imx6dl-hummingboard-som-v15.dtb imx6q-hummingboard-som-v15.dtb \ + imx6dl-hummingboard2.dtb imx6q-hummingboard2.dtb \ + imx6dl-hummingboard2-som-v15.dtb imx6q-hummingboard2-som-v15.dtb \ +" + +# Disable the meta-freescale weston-init bbappend as it conflicts +# with AGL's. +BBMASK = "meta-freescale/recipes-graphics/wayland/weston-init" + +# Set CMA size large enough to work with AGL +UBOOT_EXTLINUX_KERNEL_ARGS_append = " cma=512M" + +# Generate WIC image also +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_cyclone5.inc b/meta-agl/meta-agl-bsp/conf/include/agl_cyclone5.inc new file mode 100644 index 00000000..1eaf0ae6 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_cyclone5.inc @@ -0,0 +1,11 @@ +OSTREE_BOOTLOADER ?= "u-boot" + +# DEFAULTTUNE for cortex-a9 +DISTRO_FEATURES_append = " agl-medium-arm-compiler" + + +# Add the custom rpi-sdimg output format +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz" + +# Use the AGL default ext4.xz to generate the rpi-sdimg +SDIMG_ROOTFS_TYPE = "ext4.xz" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc b/meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc new file mode 100644 index 00000000..54524a81 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc @@ -0,0 +1,47 @@ + +#------------------------------------------------- +## Graphics section ## +#------------------------------------------------- +PACKAGES_GFX_${MACHINE} = "omapdrm-pvr" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " sgx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +DEPENDS_remove = "virtual/libgl" + +# Preferred providers +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um" +PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um" +PREFERRED_PROVIDER_virtual/mesa = "mesa-gl" +PREFERRED_PROVIDER_libgbm = "libgbm" + +#Preferred versions +PREFERRED_VERSION_libgbm = "10.0.0" + +#------------------------------------------------- +## Multimedia section ## +#------------------------------------------------- + +PACKAGES_MULTIMEDIA = " \ + ipumm-fw \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-misc' , '', d)} \ +" + +PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" +PREFERRED_VERSION_virtual/kernel = "4.9" + +# Distribution-specific runtime components +IMAGE_INSTALL_append = " \ + ${PACKAGES_GFX} \ + ${PACKAGES_MULTIMEDIA} \ + cmem \ +" + +# Include WIC support based on beaglebone +do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" +WKS_FILE = "sdimage-bootpart-uuid.wks" +IMAGE_BOOT_FILES = "MLO u-boot.img uEnv.txt" + +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc b/meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc new file mode 100644 index 00000000..f6626536 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc @@ -0,0 +1,3 @@ +# Install 96boards-tools for resizing partition +# Add systemd unit file for the qcom_q6v5_pil kernel module +IMAGE_INSTALL_append = " 96boards-tools q6v5-pil" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-820c.inc b/meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-820c.inc new file mode 100644 index 00000000..f74d703f --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-820c.inc @@ -0,0 +1,2 @@ +# Install 96boards-tools for resizing partition +IMAGE_INSTALL_append = " 96boards-tools" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_ebisu.inc b/meta-agl/meta-agl-bsp/conf/include/agl_ebisu.inc new file mode 100644 index 00000000..f7a73723 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_ebisu.inc @@ -0,0 +1,13 @@ +require conf/include/agl_ulcb.inc +SOC_FAMILY = "r8a77990" +BOARD_NAME = "ebisu" + +DTB_SUFFIX = "r8a77990-ebisu" + +DISTRO_FEATURES_remove = " use_eva_pkg" + +# Configuration for USB 3.0 +MACHINE_FEATURES_append = " usb3" + +IMAGE_INSTALL_append = " gstreamer1.0-omx gstreamer1.0-plugin-vspfilter" +IMAGE_INSTALL_append = " kernel-module-mmngr kernel-module-mmngrbuf kernel-module-uvcs-drv kernel-module-vspmif" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc b/meta-agl/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc new file mode 100644 index 00000000..74036111 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc @@ -0,0 +1,3 @@ +# The H3-based (as opposed to the M3-based version) salvator-x needs a different +# MACHINE but otherwise uses the same config as the H3. +require conf/include/agl_h3ulcb.inc diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc b/meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc new file mode 100644 index 00000000..cee2acc3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc @@ -0,0 +1,10 @@ +require conf/include/agl_ulcb-nogfx.inc +SOC_FAMILY = "r8a7795" +BOARD_NAME = "h3ulcb" + +DTB_SUFFIX = "r8a7795-h3ulcb" + +# Mask graphic Pkgs +BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK += "kernel-module-uvcs-drv|omx-user-module" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb.inc b/meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb.inc new file mode 100644 index 00000000..00c2a70a --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb.inc @@ -0,0 +1,5 @@ +require conf/include/agl_ulcb.inc +SOC_FAMILY = "r8a7795" +BOARD_NAME = "h3ulcb" + +DTB_SUFFIX = "r8a7795-h3ulcb" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_hsdk.inc b/meta-agl/meta-agl-bsp/conf/include/agl_hsdk.inc new file mode 100644 index 00000000..5967f237 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_hsdk.inc @@ -0,0 +1,5 @@ +KERNEL_IMAGETYPE = "uImage" +WKS_FILE = "sdimage-hsdk.wks" +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz" +IMAGE_BOOT_FILES = "uImage uboot.env" +IMAGE_INSTALL_append = " kernel-modules" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc b/meta-agl/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc new file mode 100644 index 00000000..b5691778 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc @@ -0,0 +1,21 @@ +DISTRO_FEATURES_append = " agl-medium-arm-compiler" + +# This disables the Freescale/NXP Vivante GPU driver and enables +# etnaviv support. +MACHINEOVERRIDES .= ":use-mainline-bsp" + +# Disable meta-freescale package architecure mangling, as it causes +# issues with AGL's explicit setting of DEFAULTTUNE. +INHERIT_remove = "fsl-dynamic-packagearch" +MACHINE_SOCARCH = "${TUNE_PKGARCH}" + +# Disable the meta-freescale weston-init bbappend as it conflicts +# with AGL's. +BBMASK = "meta-freescale/recipes-graphics/wayland/weston-init" + +# Set CMA size large enough to work with AGL +UBOOT_EXTLINUX_KERNEL_ARGS_append = " cma=512M" + +# Generate WIC image also +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" +AGL_DEFAULT_INITRAMFS_FSTYPES := "" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc b/meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc new file mode 100644 index 00000000..39ed6688 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc @@ -0,0 +1,18 @@ +# Enable Libvaapi for HW accelerated video support +# +IMAGE_INSTALL_append = " \ + libva \ + intel-vaapi-driver \ + gstreamer1.0-vaapi" + +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" +INITRD_LIVE = "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.ext4.gz" + +# Modify this file under meta-agl-bsp/meta-intel/wic to change the +# kernel command line, including to change the screen resolution. +WKS_FILE = "systemd-intel-corei7-64-bootdisk.wks" + +PREFERRED_VERSION_linux-intel ?= "4.19%" +PREFERRED_VERSION_linux-intel-rt ?= "4.19%" + +SERIAL_CONSOLES_remove = "115200;ttyS2" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc b/meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc new file mode 100644 index 00000000..a5789c32 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc @@ -0,0 +1,10 @@ +require conf/include/agl_ulcb-nogfx.inc +SOC_FAMILY = "r8a7796" +BOARD_NAME = "m3ulcb" + +DTB_SUFFIX = "r8a7796-m3ulcb" + +# Mask graphic Pkgs +BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK += "kernel-module-uvcs-drv|omx-user-module" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb.inc b/meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb.inc new file mode 100644 index 00000000..7a1d6add --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb.inc @@ -0,0 +1,5 @@ +require conf/include/agl_ulcb.inc +SOC_FAMILY = "r8a7796" +BOARD_NAME = "m3ulcb" + +DTB_SUFFIX = "r8a7796-m3ulcb" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_nitrogen6x.inc b/meta-agl/meta-agl-bsp/conf/include/agl_nitrogen6x.inc new file mode 100644 index 00000000..5864354b --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_nitrogen6x.inc @@ -0,0 +1,22 @@ +DISTRO_FEATURES_append = " agl-medium-arm-compiler" + +# This disables the Freescale/NXP Vivante GPU driver and enables +# etnaviv support. +MACHINEOVERRIDES .= ":use-mainline-bsp" + +# Disable meta-freescale package architecure mangling, as it causes +# issues with AGL's explicit setting of DEFAULTTUNE. +INHERIT_remove = "fsl-dynamic-packagearch" +MACHINE_SOCARCH = "${TUNE_PKGARCH}" + +# Disable the meta-freescale weston-init bbappend as it conflicts +# with AGL's. +BBMASK = "meta-freescale/recipes-graphics/wayland/weston-init" + +# Set CMA size large enough to work with AGL +UBOOT_EXTLINUX_KERNEL_ARGS_append = " cma=512M" + +# Generate WIC image also +#WKS_FILE = "imx-uboot.wks" +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" +AGL_DEFAULT_INITRAMFS_FSTYPES := "" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_qemuarm.inc b/meta-agl/meta-agl-bsp/conf/include/agl_qemuarm.inc new file mode 100644 index 00000000..739eb8dd --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_qemuarm.inc @@ -0,0 +1,14 @@ +# Configuration for serial console +#QB_KERNEL_CMDLINE_APPEND_append = " console=ttyAMA0,115200n8" +# +# All boot message will be off +QB_KERNEL_CMDLINE_APPEND_append = " quiet" + +# Build updatable image. Only takes effect when sota.bbclass is inherited +#DISTRO_FEATURES_append = " sota" + +# Root device +ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" + +# Use our own wks file +WKS_FILE="directdisk.wks.in" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_qemuarm64.inc b/meta-agl/meta-agl-bsp/conf/include/agl_qemuarm64.inc new file mode 100644 index 00000000..ca2cc947 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_qemuarm64.inc @@ -0,0 +1,17 @@ +# Configuration for serial console +#QB_KERNEL_CMDLINE_APPEND_append = " console=ttyAMA0,115200n8" + +# All boot message will be off +QB_KERNEL_CMDLINE_APPEND_append = " quiet" + +# Build updatable image. Only takes effect when sota.bbclass is inherited +DISTRO_FEATURES_append = " sota" + +# Root device +ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" + +# Over-ride setting in oe-core's qemuarm64.conf +QB_MEM_qemuarm64 = "-m 2048" + +# Use our own wks file +WKS_FILE="directdisk.wks.in" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc b/meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc new file mode 100644 index 00000000..a72f7b0f --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc @@ -0,0 +1,34 @@ +# Configurations to run on VirtualBox/VMWare +# +# To get wide screen than default, there are a selection of resolutions +# available: +# +#UVESA_MODE = "1024x768-32" +UVESA_MODE = "1280x1024-32" +#UVESA_MODE = "1600x1200-32" +# +# To avoid corrupt boot screen by systemd message, you can use serial +# console separated from VGA console or disable all boot messages by +# kernel command line. +# +# Configuration for serial console +QB_KERNEL_CMDLINE_APPEND_append = " console=ttyS0,115200n8" +# +# All boot message will be off +QB_KERNEL_CMDLINE_APPEND_append = " quiet" + +# Build updatable image. Only takes effect when sota.bbclass is inherited +DISTRO_FEATURES_append = " sota" + +# Image support +AGL_EXTRA_IMAGE_FSTYPES = "ext4 wic.vmdk" +IMAGE_BOOT_FILES_sota = "u-boot-qemux86-64.rom" + +# Root device +ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" + +# Force the virtio video device as 'vmware' doesn't always work +QB_OPT_APPEND_append = " -vga virtio" + +# Use our own wks file +WKS_FILE="directdisk.wks.in" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc b/meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc new file mode 100644 index 00000000..cc307485 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc @@ -0,0 +1,42 @@ +# Maximum memory allowed to be assigned +GPU_MEM = "128" + +ENABLE_CMA = "1" +# Add CMA to the kernel arguments for SOTA +OSTREE_KERNEL_ARGS_sota_append = " cma=256M" +CMA_LWM = "16" +CMA_HWM = "32" + +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# The correct config for a Raspberry Pi 3 in 32bit mode +UBOOT_MACHINE = "rpi_3_32b_config" + +KERNEL_IMAGETYPE = "uImage" + +MACHINE_FEATURES += "vc4graphics" + +# For libomxil +#LICENSE_FLAGS_WHITELIST = "commercial" + +IMAGE_INSTALL_append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux-firmware-rpidistro-bcm43455 create-combined-dtb " + +# Psplash causes crash on first boot on RPi +IMAGE_FEATURES_remove = "splash" + +# Build updatable image. Only takes effect when sota.bbclass is inherited +DISTRO_FEATURES_append = " sota" + +# Create WIC images to write to SD cards. +WKS_FILE = "sdimage-raspberrypi.wks" +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" +IMAGE_BOOT_FILES = "bcm2835-bootfiles/* \ + ${@make_dtb_boot_files(d)} \ + ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', \ + '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ + '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ + " +do_image_wic[depends] += " \ + bcm2835-bootfiles:do_deploy \ + ${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', 'u-boot:do_deploy', '',d)} \ + " diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_ulcb-nogfx.inc b/meta-agl/meta-agl-bsp/conf/include/agl_ulcb-nogfx.inc new file mode 100644 index 00000000..8d97996f --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_ulcb-nogfx.inc @@ -0,0 +1,10 @@ +DISTRO_FEATURES_append = " sota" + +OSTREE_KERNEL = "Image" +IMAGE_BOOT_FILES_sota = "renesas-ota-bootfiles/* Image-${DTB_SUFFIX}.dtb" +OSTREE_BOOTLOADER ?= "u-boot" + +WKS_FILE = "singlepart-noloader.wks" +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" + +RENESAS_DATADIR = "/usr" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_ulcb.inc b/meta-agl/meta-agl-bsp/conf/include/agl_ulcb.inc new file mode 100644 index 00000000..d71a6941 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/include/agl_ulcb.inc @@ -0,0 +1,41 @@ +require conf/include/agl_ulcb-nogfx.inc + +# Enable AGL virtualization features +MACHINE_FEATURES_append = " agl-egvirt" + +# for Wayland/Weston weston-laucher +DISTRO_FEATURES_append = " pam" + +# Enable Gfx Pkgs +MACHINE_FEATURES_append = " gsx" +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" + +# for Wayland/Weston +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "virtual-gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "virtual-gles-user-module" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "mesa" +PREFERRED_PROVIDER_libgbm = "libgbm" +PREFERRED_RPROVIDER_libgbm-dev = "libgbm" + +PREFERRED_RPROVIDER_libomxil = "omx-user-module" + +# Add for gstreamer plugins ugly +LICENSE_FLAGS_WHITELIST = "commercial" + +MACHINE_FEATURES_append = " multimedia" + +DISTRO_FEATURES_append = " use_eva_pkg" + +#DISTRO_FEATURES_append = " h265dec_lib mpeg2dec_lib" +DISTRO_FEATURES_append = " h264dec_lib h264enc_lib aaclcdec_lib aaclcdec_mdw" + +IMAGE_INSTALL_append_rcar-gen3 = " \ + kernel-devicetree \ + kernel-module-pvrsrvkm \ + kernel-module-vsp2 \ + kernel-module-vspm \ + kernel-module-vspm-if \ + omx-user-module \ +" diff --git a/meta-agl/meta-agl-bsp/conf/layer.conf b/meta-agl/meta-agl-bsp/conf/layer.conf new file mode 100644 index 00000000..35bf8112 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/layer.conf @@ -0,0 +1,26 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# Let us add layer-specific bbappends which are only applied when that +# layer is included in our configuration - +# e.g. only add layers if a bsp is present. +# This is based on the BBFILE_COLLECTIONS name of the layer. +# We use either the BBFILE_COLLECTIONS name of the layer directly (meta-ti) +BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" +BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bb' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" +# or we prepend it with meta- (e.g. rpi, fsl*) +BBFILES += "${@' '.join('${LAYERDIR}/meta-%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" +BBFILES += "${@' '.join('${LAYERDIR}/meta-%s/recipes*/*/*.bb' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" + +# Add shared recipes among BSPs +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglbsp" +BBFILE_PATTERN_aglbsp = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglbsp = "60" + +LAYERSERIES_COMPAT_aglbsp = "thud" diff --git a/meta-agl/meta-agl-bsp/conf/machine/qemuarm.conf b/meta-agl/meta-agl-bsp/conf/machine/qemuarm.conf new file mode 100644 index 00000000..8d41d692 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/machine/qemuarm.conf @@ -0,0 +1,18 @@ +#@TYPE: Machine +#@NAME: armv7a +#@DESCRIPTION: generic ARM 32bit + +require conf/machine/include/qemu.inc +require conf/machine/include/arm/arch-armv7ve.inc + +KERNEL_IMAGETYPE = "zImage" + +SERIAL_CONSOLES ?= "38400;ttyAMA0 38400;hvc0" + +# For runqemu +QB_SYSTEM_NAME = "qemu-system-arm" +QB_MACHINE = "-machine virt" + +# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy +QB_OPT_APPEND = "-show-cursor -usb -device virtio-rng-pci" +PREFERRED_VERSION_linux-yocto ??= "4.18%" diff --git a/meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf b/meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf new file mode 100644 index 00000000..2f759286 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf @@ -0,0 +1,26 @@ +#@TYPE: Machine +#@NAME: RaspberryPi 4 Development Board (32bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 32 bit mode + +DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" +require conf/machine/include/tune-cortexa7.inc +include conf/machine/include/rpi-base.inc + +MACHINE_EXTRA_RRECOMMENDS += "\ + linux-firmware-rpidistro-bcm43455 \ + bluez-firmware-rpidistro-bcm4345c0-hcd \ + pi-bluetooth \ +" + +# 'l' stands for LPAE +SDIMG_KERNELIMAGE ?= "kernel7l.img" +UBOOT_MACHINE = "rpi_4_32b_config" +SERIAL_CONSOLES ?= "115200;ttyS0" + +MACHINE_FEATURES_append = " vc4graphics" +VC4DTBO ?= "vc4-fkms-v3d" + +RPI_KERNEL_DEVICETREE_OVERLAYS_remove_raspberrypi4 = "overlays/lirc-rpi.dtbo" +RPI_KERNEL_DEVICETREE_OVERLAYS_append_raspberrypi4 = " overlays/mcp2515-can0.dtbo overlays/vc4-fkms-v3d.dtbo" +RPI_KERNEL_DEVICETREE_remove_raspberrypi4 = "bcm2708-rpi-0-w.dtb" +RPI_KERNEL_DEVICETREE_append_raspberrypi4 = " bcm2708-rpi-zero-w.dtb bcm2711-rpi-4-b.dtb" diff --git a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 00000000..49e52770 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1,6 @@ +# The gallium-llvm is recommended as software 3D graphics renderer +GALLIUM_LLVM = "gallium-llvm" +PACKAGECONFIG_append_qemux86 = " gallium ${GALLIUM_LLVM}" +PACKAGECONFIG_append_qemux86-64 = " gallium ${GALLIUM_LLVM}" + +DRIDRIVERS_append_intel-corei7-64 = ",i965" diff --git a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/libva_%.bbappend b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/libva_%.bbappend new file mode 100644 index 00000000..eda8de38 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/libva_%.bbappend @@ -0,0 +1,4 @@ +# This patch correct a bug in libva1_1.7.0.bb 1.8 inmeta-intel (no clue when it will be fixed) +# libva.bb calls for an x11 runtime dependency even if wayland is selected +# +RDEPENDS_${PN}-egl_remove = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "${PN}-x11", d)}" diff --git a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..8fa08bc3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# OVERRIDES save us some c'n'p below ... +OVERRIDES_prepend_qemux86 = "virtualmachine:" +OVERRIDES_prepend_qemux86-64 = "virtualmachine:" + +# Switch to the Virtual section that we have when a valid DRM device is found +SRC_URI_remove_virtualmachine = "file://hdmi-a-1-270.cfg" +SRC_URI_append_virtualmachine = " file://virtual.cfg" diff --git a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg new file mode 100644 index 00000000..25a8fae9 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg @@ -0,0 +1,18 @@ +[output] +name=Virtual-1 +transform=270 +mode=1920x1080 +#mode=1600x1200 +#mode=1680x1050 +#mode=1400x1050 +#mode=1600x900 +#mode=1280x1024 +#mode=1440x900 +#mode=1280x960 +#mode=1360x768 +#mode=1280x800 +#mode=1280x768 +#mode=1280x720 +#mode=800x600 +#mode=848x480 +#mode=640x480 diff --git a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston_%.bbappend b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 00000000..9aaea5f6 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,3 @@ +RDEPENDS_${PN}_append_qemux86 = " mesa-megadriver" +RDEPENDS_${PN}_append_qemux86-64 = " mesa-megadriver" +RDEPENDS_${PN}_append_intel-corei7-64 = " mesa-megadriver" diff --git a/meta-agl/meta-agl-bsp/meta-core/recipes-core/ovmf/ovmf_git.bbappend b/meta-agl/meta-agl-bsp/meta-core/recipes-core/ovmf/ovmf_git.bbappend new file mode 100644 index 00000000..28584729 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-core/recipes-core/ovmf/ovmf_git.bbappend @@ -0,0 +1 @@ +PARALLEL_MAKE = "" diff --git a/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg new file mode 100755 index 00000000..c9c4fe2e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg @@ -0,0 +1,17 @@ +# +# Bluetooth device drivers +# +CONFIG_BT_INTEL=m +CONFIG_BT_BCM=m +CONFIG_BT_RTL=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTUSB_BCM=y +CONFIG_BT_HCIBTUSB_RTL=y +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y + +# +# USB port drivers +# +CONFIG_USB_SERIAL_CP210X=y diff --git a/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg new file mode 100644 index 00000000..15ddbd21 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg @@ -0,0 +1,9 @@ +CONFIG_I2C=y +CONFIG_USB=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_DEV=m +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEO_V4L2=m diff --git a/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg new file mode 100644 index 00000000..e71c714d --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg @@ -0,0 +1,6 @@ +# Necessary configs for using the virt qemu machine +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_VIRT=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_PCI_HOST_GENERIC=y +CONFIG_RTC_DRV_PL031=y diff --git a/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg new file mode 100644 index 00000000..d042d7d6 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg @@ -0,0 +1,6 @@ +# qemu need a virtio storage for rootfs +CONFIG_BLK_MQ_VIRTIO=y +CONFIG_VIRTIO=y +CONFIG_VIRTIO_BLK=y +# qemuarm need virtionet +CONFIG_VIRTIO_NET=y diff --git a/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 00000000..e97b8f9d --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend @@ -0,0 +1,17 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" + +# Extra configuration options for the QEMU kernel +SRC_URI += "file://hciattach.cfg \ + file://virtio.cfg \ + " + +# Enable some things on qemuarm64 so MOST drivers will build and load. +SRC_URI_append_qemuarm64 = " file://most_deps.cfg" + +# Configuration for using the virt machine (and not versatilepb) +SRC_URI_append_qemuarm = " file://qemuarm.cfg" + +# Build a generic v7 kernel instead of the arm926j one that upstream +# qemuarm defaults to. +KBUILD_DEFCONFIG_qemuarm = "multi_v7_defconfig" +KCONFIG_MODE = "--alldefconfig" diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-ini-conf/fbdev.cfg b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-ini-conf/fbdev.cfg new file mode 100644 index 00000000..b1a1f3cc --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-ini-conf/fbdev.cfg @@ -0,0 +1,3 @@ +[output] +name=fbdev +transform=270 diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-init.bbappend b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 00000000..2e1c950e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1 @@ +WESTONARGS_append_imxgpu3d = " --use-gl" diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch new file mode 100644 index 00000000..1b17bc73 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch @@ -0,0 +1,49 @@ +From c8bbb0f916de54610513e376070aea531af19dd6 Mon Sep 17 00:00:00 2001 +From: jooseong lee +Date: Thu, 3 Nov 2016 10:55:43 +0100 +Subject: [PATCH 4/4] Smack: Assign smack_known_web label for kernel thread's +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Assign smack_known_web label for kernel thread's socket in the sk_alloc_security hook + +Creating struct sock by sk_alloc function in various kernel subsystems +like bluetooth dosen't call smack_socket_post_create(). In such case, +received sock label is the floor('_') label and makes access deny. + +Refers-to: https://review.tizen.org/gerrit/#/c/80717/4 + +Change-Id: I2e5c9359bfede84a988fd4d4d74cdb9dfdfc52d8 +Signed-off-by: jooseong lee +Signed-off-by: José Bollo +--- + security/smack/smack_lsm.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c +index e45f0a3..a3f3ccc 100644 +--- a/security/smack/smack_lsm.c ++++ b/security/smack/smack_lsm.c +@@ -2107,8 +2107,16 @@ static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) + if (ssp == NULL) + return -ENOMEM; + +- ssp->smk_in = skp; +- ssp->smk_out = skp; ++ /* ++ * Sockets created by kernel threads receive web label. ++ */ ++ if (unlikely(current->flags & PF_KTHREAD)) { ++ ssp->smk_in = &smack_known_web; ++ ssp->smk_out = &smack_known_web; ++ } else { ++ ssp->smk_in = skp; ++ ssp->smk_out = skp; ++ } + ssp->smk_packet = NULL; + + sk->sk_security = ssp; +-- +2.7.4 + diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cfg80211.cfg b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cfg80211.cfg new file mode 100644 index 00000000..3550a7bf --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cfg80211.cfg @@ -0,0 +1 @@ +CONFIG_CFG80211=y diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cgroup.cfg b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cgroup.cfg new file mode 100644 index 00000000..14984ccd --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/cgroup.cfg @@ -0,0 +1,24 @@ +CONFIG_BPF=y +CONFIG_BPF_SYSCALL=y +CONFIG_CGROUPS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +CONFIG_MEMCG_SWAP_ENABLED=y +CONFIG_MEMCG_KMEM=y +CONFIG_CGROUP_DEBUG=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +# CONFIG_CGROUP_HUGETLB is not set +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_SCHED=y +CONFIG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_CGROUP_WRITEBACK=y +# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set +CONFIG_NET_CLS_CGROUP=y +CONFIG_CGROUP_NET_PRIO=y +CONFIG_CGROUP_NET_CLASSID=y + diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg new file mode 100644 index 00000000..d6b3a30f --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg @@ -0,0 +1,8 @@ +# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_FW_LOADER_USER_HELPER is not set diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/namespace.cfg b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/namespace.cfg new file mode 100644 index 00000000..6254019c --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/namespace.cfg @@ -0,0 +1,6 @@ +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/tmpfs.cfg b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/tmpfs.cfg new file mode 100644 index 00000000..8385bb18 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/tmpfs.cfg @@ -0,0 +1,2 @@ +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/touchscreen.cfg b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/touchscreen.cfg new file mode 100644 index 00000000..fbd0e322 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/touchscreen.cfg @@ -0,0 +1,2 @@ +CONFIG_HID_MULTITOUCH=y + diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend new file mode 100644 index 00000000..54159823 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend @@ -0,0 +1,23 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +require recipes-kernel/linux/linux-agl.inc + +# Make sure these are enabled so that AGL configurations work +SRC_URI_append = " file://tmpfs.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/tmpfs.cfg" +SRC_URI_append = " file://namespace.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/namespace.cfg" +SRC_URI_append = " file://cgroup.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg" + +#------------------------------------------------------------------------- +# smack patches for handling bluetooth + +SRC_URI_append_with-lsm-smack = "\ + file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \ +" + +# Support for CFG80211 subsystem +SRC_URI_append = " file://cfg80211.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cfg80211.cfg" + diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend new file mode 100644 index 00000000..640f9cfe --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend @@ -0,0 +1,25 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +require recipes-kernel/linux/linux-agl.inc + +# Make sure these are enabled so that AGL configurations work +SRC_URI_append = " file://tmpfs.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/tmpfs.cfg" +SRC_URI_append = " file://namespace.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/namespace.cfg" +SRC_URI_append = " file://cgroup.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg" + +# Support for CFG80211 subsystem +SRC_URI_append = " file://cfg80211.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cfg80211.cfg" + +# Turn off a couple of things enabled by default by Freescale +# (lock debugging and userspace firmware loader fallback) +SRC_URI_append = " file://fixups.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fixups.cfg" + +do_install_append_cubox-i() { + # Add symlink to work with default Hummingboard 2 u-boot configuration + ln -sf imx6q-hummingboard2.dtb ${D}/boot/imx6q-hummingboard2-emmc.dtb +} diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch new file mode 100644 index 00000000..8489b6f3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase/0014-Add-IMX-GPU-support.patch @@ -0,0 +1,17 @@ +Index: git/mkspecs/linux-oe-g++/qmake.conf +=================================================================== +--- git.orig/mkspecs/linux-oe-g++/qmake.conf 2016-12-14 16:51:48.468955533 -0600 ++++ git/mkspecs/linux-oe-g++/qmake.conf 2016-12-14 17:03:17.000000000 -0600 +@@ -39,5 +39,12 @@ isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG + + include(../oe-device-extra.pri) + ++QMAKE_CFLAGS += -DLINUX=1 -DEGL_API_FB=1 ++QMAKE_CXXFLAGS += -DLINUX=1 -DEGL_API_FB=1 ++ ++QMAKE_LIBS_EGL += -lEGL ++QMAKE_LIBS_OPENGL_ES2 += -lEGL -lGLESv2 ++QMAKE_LIBS_OPENVG += -lEGL -lOpenVG ++ + load(device_config) + load(qt_config) diff --git a/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase_%.bbappend b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase_%.bbappend new file mode 100644 index 00000000..c4afc30e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-freescale-layer/recipes-qt/qt5/qtbase_%.bbappend @@ -0,0 +1,5 @@ + +# Fixing Qt5.8 build breaks by overriding original patches with ours +# This will be fixed in the latest meta-freescale upstream +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-intel/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..00767197 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,3 @@ +# Select a different rotation for our default panel. +SRC_URI_remove = "file://hdmi-a-1-270.cfg" +SRC_URI += "file://hdmi-a-1-90.cfg" diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux-firmware/linux-firmware_git.bbappend new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg new file mode 100644 index 00000000..125406ea --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg @@ -0,0 +1,54 @@ +CONFIG_MWIFIEX_PCIE=m +CONFIG_MWIFIEX_USB=m +CONFIG_RSI_91X=m +CONFIG_RSI_DEBUGFS=y +CONFIG_RSI_SDIO=m +CONFIG_RSI_USB=m +CONFIG_DRM_RADEON=m +CONFIG_DRM_RADEON_USERPTR=y +# CONFIG_DRM_RADEON_UMS is not set +CONFIG_DRM_NOUVEAU=m +CONFIG_NOUVEAU_DEBUG=5 +CONFIG_NOUVEAU_DEBUG_DEFAULT=3 +CONFIG_DRM_NOUVEAU_BACKLIGHT=y +CONFIG_DRM_VGEM=m +CONFIG_DRM_VMWGFX=m +CONFIG_DRM_VMWGFX_FBCON=y +CONFIG_DRM_GMA500=m +CONFIG_DRM_GMA600=y +CONFIG_DRM_GMA3600=y +CONFIG_DRM_UDL=m +CONFIG_FB_DEFERRED_IO=y +CONFIG_FB_BACKLIGHT=y +# CONFIG_LEDS_DELL_NETBOOKS is not set +CONFIG_IRQ_BYPASS_MANAGER=m +# CONFIG_ACER_WMI is not set +# CONFIG_ALIENWARE_WMI is not set +# CONFIG_DELL_WMI is not set +# CONFIG_DELL_WMI_AIO is not set +# CONFIG_HP_WMI is not set +# CONFIG_ASUS_WMI is not set +CONFIG_ACPI_WMI=m +# CONFIG_MSI_WMI is not set +# CONFIG_ACPI_TOSHIBA is not set +# CONFIG_TOSHIBA_WMI is not set +CONFIG_MXM_WMI=m +CONFIG_SCHED_INFO=y +CONFIG_HAVE_KVM_IRQCHIP=y +CONFIG_HAVE_KVM_IRQFD=y +CONFIG_HAVE_KVM_IRQ_ROUTING=y +CONFIG_HAVE_KVM_EVENTFD=y +CONFIG_KVM_APIC_ARCHITECTURE=y +CONFIG_KVM_MMIO=y +CONFIG_KVM_ASYNC_PF=y +CONFIG_HAVE_KVM_MSI=y +CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y +CONFIG_KVM_VFIO=y +CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y +CONFIG_KVM_COMPAT=y +CONFIG_HAVE_KVM_IRQ_BYPASS=y +CONFIG_KVM=m +CONFIG_KVM_INTEL=m +# CONFIG_KVM_AMD is not set +# CONFIG_KVM_MMU_AUDIT is not set +CONFIG_CRC7=m diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/fix_branch.scc b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/fix_branch.scc new file mode 100644 index 00000000..d94108d9 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/fix_branch.scc @@ -0,0 +1,3 @@ + +branch bxt-rebase +mark patching start diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg new file mode 100644 index 00000000..4dcf4036 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg @@ -0,0 +1,3 @@ +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_NBD=y +CONFIG_BLK_DEV_INITRD=y diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg new file mode 100644 index 00000000..ab88cedc --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg @@ -0,0 +1,2 @@ +CONFIG_IGB=y +CONFIG_R8169=y diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/security-tpm.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/security-tpm.cfg new file mode 100644 index 00000000..b66b1b9b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/security-tpm.cfg @@ -0,0 +1,3 @@ +CONFIG_TCG_TPM=y +CONFIG_TCG_TIS=y +CONFIG_TCG_CRB=y diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/startup.nsh b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/startup.nsh new file mode 100644 index 00000000..33746243 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/startup.nsh @@ -0,0 +1 @@ +fs0:EFI\BOOT\BOOTx64.EFI diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg new file mode 100644 index 00000000..7be178bf --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg @@ -0,0 +1,4 @@ +CONFIG_MFD_CORE=y +CONFIG_MFD_INTEL_LPSS=y +CONFIG_MFD_INTEL_LPSS_ACPI=y +CONFIG_MFD_INTEL_LPSS_PCI=y diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg new file mode 100644 index 00000000..b65e55b0 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg @@ -0,0 +1,81 @@ +CONFIG_BT_QCA=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIUART_QCA=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211_WEXT_EXPORT=y +CONFIG_LIB80211=m +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_VHOST_NET=m +CONFIG_VHOST_RING=m +CONFIG_VHOST=m +CONFIG_MICROCHIP_PHY=m +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=m +CONFIG_USB_NET_SR9800=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_HSO=m +CONFIG_USB_IPHETH=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8180=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +CONFIG_MWL8K=m +# CONFIG_B43_BUSES_BCMA_AND_SSB is not set +# CONFIG_B43_BUSES_BCMA is not set +# CONFIG_B43_BUSES_SSB is not set +CONFIG_BRCMFMAC_PROTO_MSGBUF=y +CONFIG_BRCMFMAC_PCIE=y +CONFIG_IPW2100=m +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2100_DEBUG=y +CONFIG_IPW2200=m +CONFIG_IPW2200_MONITOR=y +CONFIG_IPW2200_RADIOTAP=y +CONFIG_IPW2200_PROMISCUOUS=y +CONFIG_IPW2200_QOS=y +CONFIG_IPW2200_DEBUG=y +CONFIG_LIBIPW=m +CONFIG_LIBIPW_DEBUG=y +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_SPI=m +# CONFIG_LIBERTAS_DEBUG is not set +# CONFIG_LIBERTAS_MESH is not set +CONFIG_RTL8XXXU=m +CONFIG_RTL8XXXU_UNTESTED=y +CONFIG_WL_TI=y +CONFIG_WL1251=m +# CONFIG_WL1251_SPI is not set +# CONFIG_WL1251_SDIO is not set +CONFIG_WL12XX=m +CONFIG_WL18XX=m +CONFIG_WLCORE=m +CONFIG_WLCORE_SPI=m +CONFIG_WLCORE_SDIO=m +CONFIG_WILINK_PLATFORM_DATA=y +CONFIG_ZD1211RW=m +CONFIG_ZD1211RW_DEBUG=y +CONFIG_MWIFIEX=m +# CONFIG_MWIFIEX_SDIO is not set diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_%.bbappend b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_%.bbappend new file mode 100644 index 00000000..88ac94b1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_%.bbappend @@ -0,0 +1 @@ +require recipes-kernel/linux/linux-agl.inc diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend new file mode 100644 index 00000000..9827b3e7 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend @@ -0,0 +1,28 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +# adding most supported USB Bluetooth, Wifi, and Ethernet devices +SRC_URI_append = " file://usb-devices.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/usb-devices.cfg" + +# adding support for other graphic cards to work on more PC HW +SRC_URI_append = " file://extra-graphic-devices.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/extra-graphic-devices.cfg" + +# adding internal network in kernel for network boot +SRC_URI_append = " file://net-devices.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/net-devices.cfg" + +# adding specific driver needed by the upsquare board +SRC_URI_append = " file://upsquare.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/upsquare.cfg" + +# adding CONFIG needed by LAVA and NBD +SRC_URI_append = " file://lava.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/lava.cfg" + +# Ensure we have a startup.nsh file +SRC_URI_append = " file://startup.nsh" + +do_deploy_append() { + install -m 0755 ${WORKDIR}/startup.nsh ${DEPLOYDIR}/ +} diff --git a/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.12.bb b/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.12.bb new file mode 100644 index 00000000..446770f8 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.12.bb @@ -0,0 +1,32 @@ +SUMMARY = "Useful bits an pieces to make 96Boards more standard across the board" +HOMEPAGE = "https://github.com/96boards/96boards-tools" +SECTION = "devel" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRCREV = "ed0f0dbec02c1869a0c4fa0140b4aa5338c9d010" +SRC_URI = "git://github.com/96boards/96boards-tools;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit systemd allarch update-rc.d + +do_install () { + install -d ${D}${sysconfdir}/udev/rules.d + install -m 0755 ${S}/*.rules ${D}${sysconfdir}/udev/rules.d/ + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${S}/resize-disk ${D}${sysconfdir}/init.d/ + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/resize-helper.service ${D}${systemd_unitdir}/system + + install -d ${D}${sbindir} + install -m 0755 ${S}/resize-helper ${D}${sbindir} +} + +INITSCRIPT_NAME = "resize-disk" +INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." + +SYSTEMD_SERVICE_${PN} = "resize-helper.service" +RDEPENDS_${PN} += "e2fsprogs-resize2fs gptfdisk parted util-linux udev" diff --git a/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/files/qcom-q6v5-pil.service b/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/files/qcom-q6v5-pil.service new file mode 100644 index 00000000..3d9cd24b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/files/qcom-q6v5-pil.service @@ -0,0 +1,12 @@ +[Unit] +Description=Qualcomm Hexagon PIL setup +After=rmtfs.service +Requires=rmtfs.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/sbin/modprobe -q qcom_q6v5_pil + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb b/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb new file mode 100644 index 00000000..19f0760a --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb @@ -0,0 +1,20 @@ +inherit systemd + +SUMMARY = "Systemd unit file for the delay loading Hexagon PIL kernel module" +SECTION = "misc" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI += "file://qcom-q6v5-pil.service" + +do_install() { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/qcom-q6v5-pil.service ${D}${systemd_unitdir}/system + + # Blacklist qcom_q6v5_pil to prevent modules autoload + # qcom-q6v5-pil.service will do the work after rmtfs done. + install -d ${D}/${sysconfdir}/modprobe.d + echo "blacklist qcom_q6v5_pil" > ${D}/${sysconfdir}/modprobe.d/qcom_q6v5_pil.conf +} + +SYSTEMD_SERVICE_${PN} = "qcom-q6v5-pil.service" diff --git a/meta-agl/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend b/meta-agl/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend new file mode 100644 index 00000000..0b2b99d4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +require recipes-kernel/linux/linux-agl.inc diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend new file mode 100644 index 00000000..009c448b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend @@ -0,0 +1,12 @@ +RDEPENDS_${PN}_append_sota += " u-boot-otascript" + +RPIFW_DATE_raspberrypi4 = "20190709" +SRCREV_raspberrypi4 = "356f5c2880a3c7e8774025aa6fc934a617553e7b" +RPIFW_SRC_URI_raspberrypi4 = "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz" +RPIFW_S_raspberrypi_4 = "${WORKDIR}/firmware-${SRCREV}" + +SRC_URI_raspberrypi4 = "${RPIFW_SRC_URI}" +SRC_URI[md5sum] = "${@ '5962784e7963f0116cd1519e47749b25' if d.getVar('MACHINE_ARCH') == 'raspberrypi4' else '5ccdb5447cbdd3ee0158a514f7b76cb9'}" +SRC_URI[sha256sum] = "${@ '6e07d98e4229ba7a1970a4c475fc6b8631823d200d3b8734a508e7ff5ea4c120' if d.getVar('MACHINE_ARCH') == 'raspberrypi4' else '9a34ccc4a51695a33206cc6c8534f615ba5a30fcbce5fa3add400ecc6b80ad8a'}" + +PV_raspberrypi4 = "${RPIFW_DATE}" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend new file mode 100644 index 00000000..5c74cae7 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend @@ -0,0 +1,43 @@ +DISABLE_OVERSCAN = "1" + +do_deploy_append_raspberrypi4() { + # ENABLE CAN + if [ "${ENABLE_CAN}" = "1" ]; then + echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + + # Handle setup with armstub file + if [ -n "${ARMSTUB}" ]; then + echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + case "${ARMSTUB}" in + *-gic.bin) + echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + ;; + esac + fi +} + +do_deploy_append() { + if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_LWM}" ]; then + sed -i '/#cma_lwm/ c\cma_lwm=${CMA_LWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + + if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_HWM}" ]; then + sed -i '/#cma_hwm/ c\cma_hwm=${CMA_HWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + + echo "avoid_warnings=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtoverlay=vc4-kms-v3d-overlay,cma-256" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtoverlay=rpi-ft5406-overlay" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt +} + +do_deploy_append_sota() { + echo "device_tree_address=0x0c800000" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt +} + +ENABLE_UART_raspberrypi3 = "1" +ENABLE_UART_raspberrypi4 = "1" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb new file mode 100644 index 00000000..ccaefc71 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "Boot script for launching OTA-enabled images on raspberrypi" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +DEPENDS = "u-boot-mkimage-native" + +COMPATIBLE_MACHINE = "raspberrypi" + +SRC_URI = "file://boot.scr \ + file://uEnv.txt \ + file://uEnv.cma.txt \ + " + +S = "${WORKDIR}" + +inherit deploy + +do_deploy() { + install -d ${DEPLOYDIR}/bcm2835-bootfiles + + mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Ostree boot script" -d ${S}/boot.scr ${DEPLOYDIR}/bcm2835-bootfiles/boot.scr + if [ "${ENABLE_CMA}" = "1" ]; then + install -m 0755 ${S}/uEnv.cma.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt + else + install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt + fi +} + +addtask deploy before do_package after do_install +do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr new file mode 100644 index 00000000..dc13f85b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr @@ -0,0 +1,3 @@ +fatload mmc 0:1 $loadaddr /uEnv.txt +env import -t $loadaddr $filesize +run bootcmd diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt new file mode 100644 index 00000000..062bddb9 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt @@ -0,0 +1,21 @@ +bootcmd_resetvars=setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2 +bootcmd_otenv=run bootcmd_resetvars; load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize +bootcmd_rollbackenv=setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2} + +bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=1 coherent_pool=6M smsc95xx.turbo_mode=N" + +bootcmd_getroot=setexpr ostree_root gsub "^.*ostree=([^ ]*).*$" "\\\\1" "${bootargs}"; + +bootcmd_fitconf=run bootcmd_getroot; if test -e mmc 0:2 "${ostree_root}/usr/lib/fit_conf"; then load mmc 0:2 $loadaddr "${ostree_root}/usr/lib/fit_conf"; env import -t $loadaddr $filesize; fi + +bootcmd_load=load mmc 0:2 $ramdisk_addr_r "/boot"$kernel_image +bootcmd_run=bootm "${ramdisk_addr_r}${fit_conf}" + +bootcmd_create_envfile=if test ! -e mmc 0:1 uboot.env; then saveenv; fi; + +bootlimit=3 + +bootcmd=if test "${rollback}" = "1"; then run altbootcmd; else run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; if ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi + +bootcmd_set_rollback=if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi +altbootcmd=run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_set_rollback; if test -n "${kernel_image2}"; then run bootcmd_rollbackenv; fi; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; reset diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt new file mode 100644 index 00000000..436fe95f --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt @@ -0,0 +1,21 @@ +bootcmd_resetvars=setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2 +bootcmd_otenv=run bootcmd_resetvars; load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize +bootcmd_rollbackenv=setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2} + +bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=1" + +bootcmd_getroot=setexpr ostree_root gsub "^.*ostree=([^ ]*).*$" "\\\\1" "${bootargs}"; + +bootcmd_fitconf=run bootcmd_getroot; if test -e mmc 0:2 "${ostree_root}/usr/lib/fit_conf"; then load mmc 0:2 $loadaddr "${ostree_root}/usr/lib/fit_conf"; env import -t $loadaddr $filesize; fi + +bootcmd_load=load mmc 0:2 $ramdisk_addr_r "/boot"$kernel_image +bootcmd_run=bootm "${ramdisk_addr_r}${fit_conf}" + +bootcmd_create_envfile=if test ! -e mmc 0:1 uboot.env; then saveenv; fi; + +bootlimit=3 + +bootcmd=if test "${rollback}" = "1"; then run altbootcmd; else run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; if ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi + +bootcmd_set_rollback=if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi +altbootcmd=run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_set_rollback; if test -n "${kernel_image2}"; then run bootcmd_rollbackenv; fi; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; reset diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch new file mode 100644 index 00000000..964cdb7a --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch @@ -0,0 +1,82 @@ +From 86cc911aaa958fedf2ea9cb04b4af17f5357815d Mon Sep 17 00:00:00 2001 +From: Anton Gerasimov +Date: Fri, 1 Feb 2019 14:39:48 +0100 +Subject: [PATCH] board: raspberrypi: add serial and revision to the device + tree + +Raspberry Pi bootloader adds this node to fdt, but if u-boot script +doesn't reuse the tree provided by it, this information is lost. + +Revision and serial are displayed in /proc/cpuinfo after boot. + +Signed-off-by: Anton Gerasimov +--- + board/raspberrypi/rpi/rpi.c | 31 +++++++++++++++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 35f5939552..114178397e 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -241,6 +241,8 @@ static uint32_t rev_scheme; + static uint32_t rev_type; + static const struct rpi_model *model; + ++uint64_t serial; ++ + #ifdef CONFIG_ARM64 + static struct mm_region bcm2837_mem_map[] = { + { +@@ -384,8 +386,8 @@ static void set_serial_number(void) + return; + } + +- snprintf(serial_string, sizeof(serial_string), "%016llx", +- msg->get_board_serial.body.resp.serial); ++ serial = msg->get_board_serial.body.resp.serial; ++ snprintf(serial_string, sizeof(serial_string), "%016llx", serial); + env_set("serial#", serial_string); + } + +@@ -478,6 +480,29 @@ void *board_fdt_blob_setup(void) + return (void *)fw_dtb_pointer; + } + ++static int ft_add_revision_info(void *blob) { ++ int off; ++ int ret; ++ ++ off = fdt_subnode_offset(blob, 0, "system"); ++ ++ if (off < 0) { ++ off = fdt_add_subnode(blob, 0, "system"); ++ if (off < 0) ++ return -1; ++ } ++ ++ ret = fdt_setprop_u64(blob, off, "linux,serial", serial); ++ if (ret < 0) ++ return -1; ++ ++ ret = fdt_setprop_u32(blob, off, "linux,revision", revision); ++ if (ret < 0) ++ return -1; ++ ++ return 0; ++} ++ + int ft_board_setup(void *blob, bd_t *bd) + { + /* +@@ -487,6 +512,8 @@ int ft_board_setup(void *blob, bd_t *bd) + */ + lcd_dt_simplefb_add_node(blob); + ++ ft_add_revision_info(blob); ++ + #ifdef CONFIG_EFI_LOADER + /* Reserve the spin table */ + efi_add_memory_map(0, 1, EFI_RESERVED_MEMORY_TYPE, 0); +-- +2.17.1 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-common.inc b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-common.inc new file mode 100644 index 00000000..ad043dbc --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-common.inc @@ -0,0 +1,15 @@ +HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome" +SECTION = "bootloaders" +DEPENDS += "flex-native bison-native" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e" +PE = "1" + +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "e5aee22e4be75e75a854ab64503fc80598bc2004" + +SRC_URI = "git://git.denx.de/u-boot.git" + +S = "${WORKDIR}/git" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb new file mode 100644 index 00000000..b5ce5684 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bb @@ -0,0 +1,34 @@ +require u-boot-common.inc + +SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities" +DEPENDS += "mtd-utils" + +INSANE_SKIP_${PN} = "already-stripped" +EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1' +EXTRA_OEMAKE_class-cross = 'HOSTCC="${CC} ${CFLAGS} ${LDFLAGS}" V=1' + +inherit uboot-config + +do_compile () { + oe_runmake ${UBOOT_MACHINE} + oe_runmake envtools +} + +do_install () { + install -d ${D}${base_sbindir} + install -d ${D}${sysconfdir} + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv + install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config +} + +do_install_class-cross () { + install -d ${D}${bindir_cross} + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv + install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv +} + +SYSROOT_DIRS_append_class-cross = " ${bindir_cross}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" +BBCLASSEXTEND = "cross" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-tools_2019.07.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-tools_2019.07.bb new file mode 100644 index 00000000..bede984e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-tools_2019.07.bb @@ -0,0 +1,67 @@ +require u-boot-common.inc + +SUMMARY = "U-Boot bootloader tools" +DEPENDS += "openssl" + +PROVIDES = "${MLPREFIX}u-boot-mkimage ${MLPREFIX}u-boot-mkenvimage" +PROVIDES_class-native = "u-boot-mkimage-native u-boot-mkenvimage-native" + +PACKAGES += "${PN}-mkimage ${PN}-mkenvimage" + +# Required for backward compatibility with "u-boot-mkimage-xxx.bb" +RPROVIDES_${PN}-mkimage = "u-boot-mkimage" +RREPLACES_${PN}-mkimage = "u-boot-mkimage" +RCONFLICTS_${PN}-mkimage = "u-boot-mkimage" + +EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' +EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' +EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' + +SED_CONFIG_EFI = '-e "s/CONFIG_EFI_LOADER=.*/# CONFIG_EFI_LOADER is not set/"' +SED_CONFIG_EFI_x86 = '' +SED_CONFIG_EFI_x86-64 = '' +SED_CONFIG_EFI_arm = '' +SED_CONFIG_EFI_armeb = '' +SED_CONFIG_EFI_aarch64 = '' + +do_compile () { + oe_runmake sandbox_defconfig + + # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and + # generating it requires bin2header tool, which for target build + # is built with target tools and thus cannot be executed on host. + sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} .config + + oe_runmake cross_tools NO_SDL=1 +} + +do_install () { + install -d ${D}${bindir} + + # mkimage + install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage + ln -sf uboot-mkimage ${D}${bindir}/mkimage + + # mkenvimage + install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage + ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage + + # dumpimage + install -m 0755 tools/dumpimage ${D}${bindir}/uboot-dumpimage + ln -sf uboot-dumpimage ${D}${bindir}/dumpimage + + # fit_check_sign + install -m 0755 tools/fit_check_sign ${D}${bindir}/uboot-fit_check_sign + ln -sf uboot-fit_check_sign ${D}${bindir}/fit_check_sign +} + +ALLOW_EMPTY_${PN} = "1" +FILES_${PN} = "" +FILES_${PN}-mkimage = "${bindir}/uboot-mkimage ${bindir}/mkimage ${bindir}/uboot-dumpimage ${bindir}/dumpimage ${bindir}/uboot-fit_check_sign ${bindir}/fit_check_sign" +FILES_${PN}-mkenvimage = "${bindir}/uboot-mkenvimage ${bindir}/mkenvimage" + +RDEPENDS_${PN}-mkimage += "dtc" +RDEPENDS_${PN} += "${PN}-mkimage ${PN}-mkenvimage" +RDEPENDS_${PN}_class-native = "" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot.inc b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot.inc new file mode 100644 index 00000000..9a754fd0 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot.inc @@ -0,0 +1,333 @@ +SUMMARY = "Universal Boot Loader for embedded devices" +PROVIDES = "virtual/bootloader" + +B = "${WORKDIR}/build" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS += "kern-tools-native" + +inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 + +DEPENDS += "swig-native python-native" + +EXTRA_OEMAKE = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" V=1' +EXTRA_OEMAKE += 'HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}"' +EXTRA_OEMAKE += 'PYTHON2=nativepython STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}' + +PACKAGECONFIG ??= "openssl" +# u-boot will compile its own tools during the build, with specific +# configurations (aka when CONFIG_FIT_SIGNATURE is enabled) openssl is needed as +# a host build dependency. +PACKAGECONFIG[openssl] = ",,openssl-native" + +# Allow setting an additional version string that will be picked up by the +# u-boot build system and appended to the u-boot version. If the .scmversion +# file already exists it will not be overwritten. +UBOOT_LOCALVERSION ?= "" + +# Some versions of u-boot use .bin and others use .img. By default use .bin +# but enable individual recipes to change this value. +UBOOT_SUFFIX ??= "bin" +UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_SUFFIX}" +UBOOT_MAKE_TARGET ?= "all" + +# Output the ELF generated. Some platforms can use the ELF file and directly +# load it (JTAG booting, QEMU) additionally the ELF can be used for debugging +# purposes. +UBOOT_ELF ?= "" +UBOOT_ELF_SUFFIX ?= "elf" +UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}" + +# Some versions of u-boot build an SPL (Second Program Loader) image that +# should be packaged along with the u-boot binary as well as placed in the +# deploy directory. For those versions they can set the following variables +# to allow packaging the SPL. +SPL_BINARY ?= "" +SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" +SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}" +SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}" + +# Additional environment variables or a script can be installed alongside +# u-boot to be used automatically on boot. This file, typically 'uEnv.txt' +# or 'boot.scr', should be packaged along with u-boot as well as placed in the +# deploy directory. Machine configurations needing one of these files should +# include it in the SRC_URI and set the UBOOT_ENV parameter. +UBOOT_ENV_SUFFIX ?= "txt" +UBOOT_ENV ?= "" +UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" + +# U-Boot EXTLINUX variables. U-Boot searches for /boot/extlinux/extlinux.conf +# to find EXTLINUX conf file. +UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux" +UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" +UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" + +# returns all the elements from the src uri that are .cfg files +def find_cfgs(d): + sources=src_patches(d, True) + sources_list=[] + for s in sources: + if s.endswith('.cfg'): + sources_list.append(s) + + return sources_list + +do_configure () { + if [ -z "${UBOOT_CONFIG}" ]; then + if [ -n "${UBOOT_MACHINE}" ]; then + oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} + else + oe_runmake -C ${S} O=${B} oldconfig + fi + merge_config.sh -m .config ${@" ".join(find_cfgs(d))} + cml1_do_configure + fi +} + +do_compile () { + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'ld-is-gold', d)}" ]; then + sed -i 's/$(CROSS_COMPILE)ld$/$(CROSS_COMPILE)ld.bfd/g' ${S}/config.mk + fi + + unset LDFLAGS + unset CFLAGS + unset CPPFLAGS + + if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ] + then + echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion + echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion + fi + + if [ -n "${UBOOT_CONFIG}" ] + then + unset i j k + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + oe_runmake -C ${S} O=${B}/${config} ${config} + oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET} + for binary in ${UBOOT_BINARIES}; do + k=$(expr $k + 1); + if [ $k -eq $i ]; then + cp ${B}/${config}/${binary} ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} + fi + done + unset k + fi + done + unset j + done + unset i + else + oe_runmake -C ${S} O=${B} ${UBOOT_MAKE_TARGET} + fi + +} + +do_install () { + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -d ${D}/boot + install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -d ${D}/boot + install -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + fi + + if [ -n "${UBOOT_ELF}" ] + then + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + fi + fi + + if [ -e ${WORKDIR}/fw_env.config ] ; then + install -d ${D}${sysconfdir} + install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config + fi + + if [ -n "${SPL_BINARY}" ] + then + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME} + fi + fi + + if [ -n "${UBOOT_ENV}" ] + then + install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} + ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} + fi + + if [ "${UBOOT_EXTLINUX}" = "1" ] + then + install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME} + fi + +} + +FILES_${PN} = "/boot ${sysconfdir} ${datadir}" + +do_deploy () { + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -d ${DEPLOYDIR} + install -m 644 ${B}/${config}/u-boot-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} + cd ${DEPLOYDIR} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY} + fi + done + unset j + done + unset i + else + install -d ${DEPLOYDIR} + install -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + cd ${DEPLOYDIR} + rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY} + fi + + if [ -n "${UBOOT_ELF}" ] + then + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type} + ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY} + ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK} + fi + fi + + + if [ -n "${SPL_BINARY}" ] + then + if [ -n "${UBOOT_CONFIG}" ] + then + for config in ${UBOOT_MACHINE}; do + i=$(expr $i + 1); + for type in ${UBOOT_CONFIG}; do + j=$(expr $j + 1); + if [ $j -eq $i ] + then + install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR} + rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type} + ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK} + fi + done + unset j + done + unset i + else + install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} + rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK} + fi + fi + + + if [ -n "${UBOOT_ENV}" ] + then + install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} + rm -f ${DEPLOYDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + fi + + if [ "${UBOOT_EXTLINUX}" = "1" ] + then + install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK} + ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE} + ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME} + fi +} + +addtask deploy before do_build after do_compile diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bb new file mode 100644 index 00000000..02d67c0d --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bb @@ -0,0 +1,4 @@ +require u-boot-common.inc +require u-boot.inc + +DEPENDS += "bc-native dtc-native" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend new file mode 100644 index 00000000..03e7dc84 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_raspberrypi4 = "git://github.com/balena-os/u-boot;branch=ag/rpi4" +SRCREV_raspberrypi4 = "62b6e39a53c56a9085aeab1b47b5cc6020fcdb6f" +SRC_URI_raspberrypi4-64 = "git://github.com/balena-os/u-boot;branch=ag/rpi4" +SRCREV_raspberrypi4-64 = "62b6e39a53c56a9085aeab1b47b5cc6020fcdb6f" + +# Update the patch for u-boot 2019.07 +SRC_URI_remove_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch" +SRC_URI_append_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file mode 100644 index 00000000..9fba5da4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -0,0 +1,42 @@ +From ea966884e39aae9571c038fab55f3c1663d17850 Mon Sep 17 00:00:00 2001 +From: Fabio Berton +Date: Wed, 12 Jun 2019 13:40:20 -0300 +Subject: [PATCH] meson.build: check for all linux host_os combinations +Organization: O.S. Systems Software LTDA. + +Make sure that we are also looking for our host_os combinations like +linux-musl etc. when assuming support for DRM/KMS. + +Also delete a duplicate line. + +Upstream-Status: Pending + +Signed-off-by: Anuj Mittal +Signed-off-by: Fabio Berton +Signed-off-by: Otavio Salvador +--- + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 567a81afd6f..b33b430aed4 100644 +--- a/meson.build ++++ b/meson.build +@@ -107,7 +107,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 + # Only build shared_glapi if at least one OpenGL API is enabled + with_shared_glapi = get_option('shared-glapi') and with_any_opengl + +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system()) ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') + + dri_drivers = get_option('dri-drivers') + if dri_drivers.contains('auto') +@@ -845,7 +845,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', + endif + + # TODO: this is very incomplete +-if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) ++if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux') + pre_args += '-D_GNU_SOURCE' + endif + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch new file mode 100644 index 00000000..641bacf1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch @@ -0,0 +1,52 @@ +From cee8e48c5344124e5d84307cb0c48ee0c9b3e684 Mon Sep 17 00:00:00 2001 +From: Fabio Berton +Date: Wed, 12 Jun 2019 14:15:57 -0300 +Subject: [PATCH] meson.build: make TLS GLX optional again +Organization: O.S. Systems Software LTDA. + +This was optional with autotools, and needs to be disabled +when using musl C library, for instance. + +Upstream-Status: Pending + +Signed-off-by: Alexander Kanavin +Signed-off-by: Fabio Berton +Signed-off-by: Otavio Salvador +--- + meson.build | 4 +++- + meson_options.txt | 7 +++++++ + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index b33b430aed4..0e50bb26c0a 100644 +--- a/meson.build ++++ b/meson.build +@@ -369,7 +369,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat + endif + endif + +-pre_args += '-DGLX_USE_TLS' ++if get_option('glx-tls') ++ pre_args += '-DGLX_USE_TLS' ++endif + if with_glx != 'disabled' + if not (with_platform_x11 and with_any_opengl) + error('Cannot build GLX support without X11 platform support and at least one OpenGL API') +diff --git a/meson_options.txt b/meson_options.txt +index 1f72faabee8..fcd49efea27 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -339,6 +339,13 @@ option( + value : true, + description : 'Enable direct rendering in GLX and EGL for DRI', + ) ++option( ++ 'glx-tls', ++ type : 'boolean', ++ value : true, ++ description : 'Enable TLS support in GLX', ++) ++ + option( + 'I-love-half-baked-turnips', + type : 'boolean', diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch new file mode 100644 index 00000000..3458c191 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch @@ -0,0 +1,46 @@ +From f1482e88c2295b9c7288f5b273335a8e18039de8 Mon Sep 17 00:00:00 2001 +From: Fabio Berton +Date: Wed, 12 Jun 2019 14:18:31 -0300 +Subject: [PATCH] Allow enable DRI without DRI drivers +Organization: O.S. Systems Software LTDA. + +Upstream-Status: Pending + +Signed-off-by: Andrei Gherzan +Signed-off-by: Fabio Berton +Signed-off-by: Otavio Salvador +--- + meson.build | 2 +- + meson_options.txt | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 0e50bb26c0a..de065c290d6 100644 +--- a/meson.build ++++ b/meson.build +@@ -137,7 +137,7 @@ with_dri_r200 = dri_drivers.contains('r200') + with_dri_nouveau = dri_drivers.contains('nouveau') + with_dri_swrast = dri_drivers.contains('swrast') + +-with_dri = dri_drivers.length() != 0 and dri_drivers != [''] ++with_dri = get_option('dri') or (_drivers.length() != 0 and _drivers != ['']) + + gallium_drivers = get_option('gallium-drivers') + if gallium_drivers.contains('auto') +diff --git a/meson_options.txt b/meson_options.txt +index fcd49efea27..0529200b3bb 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -34,6 +34,12 @@ option( + choices : ['auto', 'true', 'false'], + description : 'enable support for dri3' + ) ++option( ++ 'dri', ++ type : 'boolean', ++ value : false, ++ description : 'enable support for dri' ++) + option( + 'dri-drivers', + type : 'array', diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/libglu_9.0.1.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/libglu_9.0.1.bb new file mode 100644 index 00000000..068fb19e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/libglu_9.0.1.bb @@ -0,0 +1,30 @@ +SUMMARY = "The OpenGL utility toolkit" +DESCRIPTION = "GLU is a utility toolkit used with OpenGL implementations" + +HOMEPAGE = "http://mesa3d.org" +BUGTRACKER = "https://bugs.freedesktop.org" +SECTION = "x11" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b356456e7d44471d9 \ + file://src/libtess/tess.c;endline=29;md5=6b79c570f644363b356456e7d44471d9" + +# Epoch as this used to be part of mesa +PE = "2" +PR = "0" + +SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.gz" + +SRC_URI[md5sum] = "5599a0e0a97335e10239d9165aced60d" +SRC_URI[sha256sum] = "f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7" + +S = "${WORKDIR}/glu-${PV}" + +DEPENDS = "virtual/libgl" + +inherit autotools pkgconfig distro_features_check + +# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES +REQUIRED_DISTRO_FEATURES = "x11 opengl" + +# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty +RDEPENDS_${PN}-dev = "" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch new file mode 100644 index 00000000..93ee9c28 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Add-missing-data-files.patch @@ -0,0 +1,624 @@ +From b695c3a3fa3f4cd48c13aa26542110de27075518 Mon Sep 17 00:00:00 2001 +From: Drew Moseley +Date: Mon, 12 May 2014 15:22:32 -0400 +Subject: [PATCH 1/9] mesa-demos: Add missing data files. + +Add some data files that are present in the git repository: + http://cgit.freedesktop.org/mesa/demos/tree/?id=mesa-demos-8.1.0 +but not in the release tarball + ftp://ftp.freedesktop.org/pub/mesa/demos/8.1.0/mesa-demos-8.1.0.tar.bz2 + +Upstream-Status: Backport +Signed-off-by: Drew Moseley +Signed-off-by: Martin Jansa +--- + src/fpglsl/depth-read.glsl | 4 + + src/fpglsl/infinite-loop.glsl | 7 + + src/glsl/CH11-bumpmaptex.frag | 47 +++++++ + src/glsl/blinking-teapot.frag | 31 +++++ + src/glsl/blinking-teapot.vert | 16 +++ + src/glsl/convolution.frag | 21 +++ + src/glsl/simplex-noise.glsl | 279 ++++++++++++++++++++++++++++++++++++++++ + src/glsl/skinning.vert | 24 ++++ + src/perf/glslstateschange1.frag | 19 +++ + src/perf/glslstateschange1.vert | 14 ++ + src/perf/glslstateschange2.frag | 17 +++ + src/perf/glslstateschange2.vert | 14 ++ + src/vpglsl/infinite-loop.glsl | 8 ++ + 13 files changed, 501 insertions(+) + create mode 100644 src/fpglsl/depth-read.glsl + create mode 100644 src/fpglsl/infinite-loop.glsl + create mode 100644 src/glsl/CH11-bumpmaptex.frag + create mode 100644 src/glsl/blinking-teapot.frag + create mode 100644 src/glsl/blinking-teapot.vert + create mode 100644 src/glsl/convolution.frag + create mode 100644 src/glsl/simplex-noise.glsl + create mode 100644 src/glsl/skinning.vert + create mode 100644 src/perf/glslstateschange1.frag + create mode 100644 src/perf/glslstateschange1.vert + create mode 100644 src/perf/glslstateschange2.frag + create mode 100644 src/perf/glslstateschange2.vert + create mode 100644 src/vpglsl/infinite-loop.glsl + +diff --git a/src/fpglsl/depth-read.glsl b/src/fpglsl/depth-read.glsl +new file mode 100644 +index 0000000..86d298e +--- /dev/null ++++ b/src/fpglsl/depth-read.glsl +@@ -0,0 +1,4 @@ ++void main() ++{ ++ gl_FragColor = gl_FragCoord.zzzz; ++} +diff --git a/src/fpglsl/infinite-loop.glsl b/src/fpglsl/infinite-loop.glsl +new file mode 100644 +index 0000000..c6dc6ee +--- /dev/null ++++ b/src/fpglsl/infinite-loop.glsl +@@ -0,0 +1,7 @@ ++void main() { ++ vec4 sum = vec4(0); ++ for (int i = 1; i != 2; i += 2) { ++ sum += vec4(0.1, 0.1, 0.1, 0.1); ++ } ++ gl_FragColor = sum; ++} +diff --git a/src/glsl/CH11-bumpmaptex.frag b/src/glsl/CH11-bumpmaptex.frag +new file mode 100644 +index 0000000..b5dabb4 +--- /dev/null ++++ b/src/glsl/CH11-bumpmaptex.frag +@@ -0,0 +1,47 @@ ++// ++// Fragment shader for procedural bumps ++// ++// Authors: John Kessenich, Randi Rost ++// ++// Copyright (c) 2002-2006 3Dlabs Inc. Ltd. ++// ++// See 3Dlabs-License.txt for license information ++// ++// Texture mapping/modulation added by Brian Paul ++// ++ ++varying vec3 LightDir; ++varying vec3 EyeDir; ++ ++uniform float BumpDensity; // = 16.0 ++uniform float BumpSize; // = 0.15 ++uniform float SpecularFactor; // = 0.5 ++ ++uniform sampler2D Tex; ++ ++void main() ++{ ++ vec3 ambient = vec3(0.25); ++ vec3 litColor; ++ vec2 c = BumpDensity * gl_TexCoord[0].st; ++ vec2 p = fract(c) - vec2(0.5); ++ ++ float d, f; ++ d = p.x * p.x + p.y * p.y; ++ f = inversesqrt(d + 1.0); ++ ++ if (d >= BumpSize) ++ { p = vec2(0.0); f = 1.0; } ++ ++ vec3 SurfaceColor = texture2D(Tex, gl_TexCoord[0].st).xyz; ++ ++ vec3 normDelta = vec3(p.x, p.y, 1.0) * f; ++ litColor = SurfaceColor * (ambient + max(dot(normDelta, LightDir), 0.0)); ++ vec3 reflectDir = reflect(LightDir, normDelta); ++ ++ float spec = max(dot(EyeDir, reflectDir), 0.0); ++ spec *= SpecularFactor; ++ litColor = min(litColor + spec, vec3(1.0)); ++ ++ gl_FragColor = vec4(litColor, 1.0); ++} +diff --git a/src/glsl/blinking-teapot.frag b/src/glsl/blinking-teapot.frag +new file mode 100644 +index 0000000..0db060b +--- /dev/null ++++ b/src/glsl/blinking-teapot.frag +@@ -0,0 +1,31 @@ ++#extension GL_ARB_uniform_buffer_object : enable ++ ++layout(std140) uniform colors0 ++{ ++ float DiffuseCool; ++ float DiffuseWarm; ++ vec3 SurfaceColor; ++ vec3 WarmColor; ++ vec3 CoolColor; ++ vec4 some[8]; ++}; ++ ++varying float NdotL; ++varying vec3 ReflectVec; ++varying vec3 ViewVec; ++ ++void main (void) ++{ ++ ++ vec3 kcool = min(CoolColor + DiffuseCool * SurfaceColor, 1.0); ++ vec3 kwarm = min(WarmColor + DiffuseWarm * SurfaceColor, 1.0); ++ vec3 kfinal = mix(kcool, kwarm, NdotL); ++ ++ vec3 nreflect = normalize(ReflectVec); ++ vec3 nview = normalize(ViewVec); ++ ++ float spec = max(dot(nreflect, nview), 0.0); ++ spec = pow(spec, 32.0); ++ ++ gl_FragColor = vec4 (min(kfinal + spec, 1.0), 1.0); ++} +diff --git a/src/glsl/blinking-teapot.vert b/src/glsl/blinking-teapot.vert +new file mode 100644 +index 0000000..397d733 +--- /dev/null ++++ b/src/glsl/blinking-teapot.vert +@@ -0,0 +1,16 @@ ++vec3 LightPosition = vec3(0.0, 10.0, 4.0); ++ ++varying float NdotL; ++varying vec3 ReflectVec; ++varying vec3 ViewVec; ++ ++void main(void) ++{ ++ vec3 ecPos = vec3 (gl_ModelViewMatrix * gl_Vertex); ++ vec3 tnorm = normalize(gl_NormalMatrix * gl_Normal); ++ vec3 lightVec = normalize(LightPosition - ecPos); ++ ReflectVec = normalize(reflect(-lightVec, tnorm)); ++ ViewVec = normalize(-ecPos); ++ NdotL = (dot(lightVec, tnorm) + 1.0) * 0.5; ++ gl_Position = ftransform(); ++} +diff --git a/src/glsl/convolution.frag b/src/glsl/convolution.frag +new file mode 100644 +index 0000000..e49b8ac +--- /dev/null ++++ b/src/glsl/convolution.frag +@@ -0,0 +1,21 @@ ++ ++const int KernelSize = 9; ++ ++//texture offsets ++uniform vec2 Offset[KernelSize]; ++//convolution kernel ++uniform vec4 KernelValue[KernelSize]; ++uniform sampler2D srcTex; ++uniform vec4 ScaleFactor; ++uniform vec4 BaseColor; ++ ++void main(void) ++{ ++ int i; ++ vec4 sum = vec4(0.0); ++ for (i = 0; i < KernelSize; ++i) { ++ vec4 tmp = texture2D(srcTex, gl_TexCoord[0].st + Offset[i]); ++ sum += tmp * KernelValue[i]; ++ } ++ gl_FragColor = sum * ScaleFactor + BaseColor; ++} +diff --git a/src/glsl/simplex-noise.glsl b/src/glsl/simplex-noise.glsl +new file mode 100644 +index 0000000..b6833cb +--- /dev/null ++++ b/src/glsl/simplex-noise.glsl +@@ -0,0 +1,279 @@ ++// ++// Description : Array and textureless GLSL 2D/3D/4D simplex ++// noise functions. ++// Author : Ian McEwan, Ashima Arts. ++// Maintainer : ijm ++// Lastmod : 20110223 ++// License : Copyright (C) 2011 Ashima Arts. All rights reserved. ++// Distributed under the Artistic License 2.0; See LICENCE file. ++// ++ ++#define NORMALIZE_GRADIENTS ++#undef USE_CIRCLE ++#define COLLAPSE_SORTNET ++ ++float permute(float x0,vec3 p) { ++ float x1 = mod(x0 * p.y, p.x); ++ return floor( mod( (x1 + p.z) *x0, p.x )); ++ } ++vec2 permute(vec2 x0,vec3 p) { ++ vec2 x1 = mod(x0 * p.y, p.x); ++ return floor( mod( (x1 + p.z) *x0, p.x )); ++ } ++vec3 permute(vec3 x0,vec3 p) { ++ vec3 x1 = mod(x0 * p.y, p.x); ++ return floor( mod( (x1 + p.z) *x0, p.x )); ++ } ++vec4 permute(vec4 x0,vec3 p) { ++ vec4 x1 = mod(x0 * p.y, p.x); ++ return floor( mod( (x1 + p.z) *x0, p.x )); ++ } ++ ++uniform vec4 pParam; ++// Example ++// const vec4 pParam = vec4( 17.* 17., 34., 1., 7.); ++ ++float taylorInvSqrt(float r) ++ { ++ return ( 0.83666002653408 + 0.7*0.85373472095314 - 0.85373472095314 * r ); ++ } ++ ++float simplexNoise2(vec2 v) ++ { ++ const vec2 C = vec2(0.211324865405187134, // (3.0-sqrt(3.0))/6.; ++ 0.366025403784438597); // 0.5*(sqrt(3.0)-1.); ++ const vec3 D = vec3( 0., 0.5, 2.0) * 3.14159265358979312; ++// First corner ++ vec2 i = floor(v + dot(v, C.yy) ); ++ vec2 x0 = v - i + dot(i, C.xx); ++ ++// Other corners ++ vec2 i1 = (x0.x > x0.y) ? vec2(1.,0.) : vec2(0.,1.) ; ++ ++ // x0 = x0 - 0. + 0. * C ++ vec2 x1 = x0 - i1 + 1. * C.xx ; ++ vec2 x2 = x0 - 1. + 2. * C.xx ; ++ ++// Permutations ++ i = mod(i, pParam.x); ++ vec3 p = permute( permute( ++ i.y + vec3(0., i1.y, 1. ), pParam.xyz) ++ + i.x + vec3(0., i1.x, 1. ), pParam.xyz); ++ ++#ifndef USE_CIRCLE ++// ( N points uniformly over a line, mapped onto a diamond.) ++ vec3 x = fract(p / pParam.w) ; ++ vec3 h = 0.5 - abs(x) ; ++ ++ vec3 sx = vec3(lessThan(x,D.xxx)) *2. -1.; ++ vec3 sh = vec3(lessThan(h,D.xxx)); ++ ++ vec3 a0 = x + sx*sh; ++ vec2 p0 = vec2(a0.x,h.x); ++ vec2 p1 = vec2(a0.y,h.y); ++ vec2 p2 = vec2(a0.z,h.z); ++ ++#ifdef NORMALISE_GRADIENTS ++ p0 *= taylorInvSqrt(dot(p0,p0)); ++ p1 *= taylorInvSqrt(dot(p1,p1)); ++ p2 *= taylorInvSqrt(dot(p2,p2)); ++#endif ++ ++ vec3 g = 2.0 * vec3( dot(p0, x0), dot(p1, x1), dot(p2, x2) ); ++#else ++// N points around a unit circle. ++ vec3 phi = D.z * mod(p,pParam.w) /pParam.w ; ++ vec4 a0 = sin(phi.xxyy+D.xyxy); ++ vec2 a1 = sin(phi.zz +D.xy); ++ vec3 g = vec3( dot(a0.xy, x0), dot(a0.zw, x1), dot(a1.xy, x2) ); ++#endif ++// mix ++ vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.); ++ m = m*m ; ++ return 1.66666* 70.*dot(m*m, g); ++ } ++ ++float simplexNoise3(vec3 v) ++ { ++ const vec2 C = vec2(1./6. , 1./3. ) ; ++ const vec4 D = vec4(0., 0.5, 1.0, 2.0); ++ ++// First corner ++ vec3 i = floor(v + dot(v, C.yyy) ); ++ vec3 x0 = v - i + dot(i, C.xxx) ; ++ ++// Other corners ++#ifdef COLLAPSE_SORTNET ++ vec3 g = vec3( greaterThan( x0.xyz, x0.yzx) ); ++ vec3 l = vec3( lessThanEqual( x0.xyz, x0.yzx) ); ++ ++ vec3 i1 = g.xyz * l.zxy; ++ vec3 i2 = max( g.xyz, l.zxy); ++#else ++// Keeping this clean - let the compiler optimize. ++ vec3 q1; ++ q1.x = max(x0.x, x0.y); ++ q1.y = min(x0.x, x0.y); ++ q1.z = x0.z; ++ ++ vec3 q2; ++ q2.x = max(q1.x,q1.z); ++ q2.z = min(q1.x,q1.z); ++ q2.y = q1.y; ++ ++ vec3 q3; ++ q3.y = max(q2.y, q2.z); ++ q3.z = min(q2.y, q2.z); ++ q3.x = q2.x; ++ ++ vec3 i1 = vec3(equal(q3.xxx, x0)); ++ vec3 i2 = i1 + vec3(equal(q3.yyy, x0)); ++#endif ++ ++ // x0 = x0 - 0. + 0. * C ++ vec3 x1 = x0 - i1 + 1. * C.xxx; ++ vec3 x2 = x0 - i2 + 2. * C.xxx; ++ vec3 x3 = x0 - 1. + 3. * C.xxx; ++ ++// Permutations ++ i = mod(i, pParam.x ); ++ vec4 p = permute( permute( permute( ++ i.z + vec4(0., i1.z, i2.z, 1. ), pParam.xyz) ++ + i.y + vec4(0., i1.y, i2.y, 1. ), pParam.xyz) ++ + i.x + vec4(0., i1.x, i2.x, 1. ), pParam.xyz); ++ ++// Gradients ++// ( N*N points uniformly over a square, mapped onto a octohedron.) ++ float n_ = 1.0/pParam.w ; ++ vec3 ns = n_ * D.wyz - D.xzx ; ++ ++ vec4 j = p - pParam.w*pParam.w*floor(p * ns.z *ns.z); // mod(p,N*N) ++ ++ vec4 x_ = floor(j * ns.z) ; ++ vec4 y_ = floor(j - pParam.w * x_ ) ; // mod(j,N) ++ ++ vec4 x = x_ *ns.x + ns.yyyy; ++ vec4 y = y_ *ns.x + ns.yyyy; ++ vec4 h = 1. - abs(x) - abs(y); ++ ++ vec4 b0 = vec4( x.xy, y.xy ); ++ vec4 b1 = vec4( x.zw, y.zw ); ++ ++ vec4 s0 = vec4(lessThan(b0,D.xxxx)) *2. -1.; ++ vec4 s1 = vec4(lessThan(b1,D.xxxx)) *2. -1.; ++ vec4 sh = vec4(lessThan(h, D.xxxx)); ++ ++ vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ; ++ vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ; ++ ++ vec3 p0 = vec3(a0.xy,h.x); ++ vec3 p1 = vec3(a0.zw,h.y); ++ vec3 p2 = vec3(a1.xy,h.z); ++ vec3 p3 = vec3(a1.zw,h.w); ++ ++#ifdef NORMALISE_GRADIENTS ++ p0 *= taylorInvSqrt(dot(p0,p0)); ++ p1 *= taylorInvSqrt(dot(p1,p1)); ++ p2 *= taylorInvSqrt(dot(p2,p2)); ++ p3 *= taylorInvSqrt(dot(p3,p3)); ++#endif ++ ++// Mix ++ vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.); ++ m = m * m; ++//used to be 64. ++ return 48.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), ++ dot(p2,x2), dot(p3,x3) ) ); ++ } ++ ++vec4 grad4(float j, vec4 ip) ++ { ++ const vec4 ones = vec4(1.,1.,1.,-1.); ++ vec4 p,s; ++ ++ p.xyz = floor( fract (vec3(j) * ip.xyz) *pParam.w) * ip.z -1.0; ++ p.w = 1.5 - dot(abs(p.xyz), ones.xyz); ++ s = vec4(lessThan(p,vec4(0.))); ++ p.xyz = p.xyz + (s.xyz*2.-1.) * s.www; ++ ++ return p; ++ } ++ ++float simplexNoise4(vec4 v) ++ { ++ const vec2 C = vec2( 0.138196601125010504, // (5 - sqrt(5))/20 G4 ++ 0.309016994374947451); // (sqrt(5) - 1)/4 F4 ++// First corner ++ vec4 i = floor(v + dot(v, C.yyyy) ); ++ vec4 x0 = v - i + dot(i, C.xxxx); ++ ++// Other corners ++ ++// Force existance of strict total ordering in sort. ++ vec4 q0 = floor(x0 * 1024.0) + vec4( 0., 1./4., 2./4. , 3./4.); ++ vec4 q1; ++ q1.xy = max(q0.xy,q0.zw); // x:z y:w ++ q1.zw = min(q0.xy,q0.zw); ++ ++ vec4 q2; ++ q2.xz = max(q1.xz,q1.yw); // x:y z:w ++ q2.yw = min(q1.xz,q1.yw); ++ ++ vec4 q3; ++ q3.y = max(q2.y,q2.z); // y:z ++ q3.z = min(q2.y,q2.z); ++ q3.xw = q2.xw; ++ ++ vec4 i1 = vec4(lessThanEqual(q3.xxxx, q0)); ++ vec4 i2 = vec4(lessThanEqual(q3.yyyy, q0)); ++ vec4 i3 = vec4(lessThanEqual(q3.zzzz, q0)); ++ ++ // x0 = x0 - 0. + 0. * C ++ vec4 x1 = x0 - i1 + 1. * C.xxxx; ++ vec4 x2 = x0 - i2 + 2. * C.xxxx; ++ vec4 x3 = x0 - i3 + 3. * C.xxxx; ++ vec4 x4 = x0 - 1. + 4. * C.xxxx; ++ ++// Permutations ++ i = mod(i, pParam.x ); ++ float j0 = permute( permute( permute( permute ( ++ i.w, pParam.xyz) + i.z, pParam.xyz) ++ + i.y, pParam.xyz) + i.x, pParam.xyz); ++ vec4 j1 = permute( permute( permute( permute ( ++ i.w + vec4(i1.w, i2.w, i3.w, 1. ), pParam.xyz) ++ + i.z + vec4(i1.z, i2.z, i3.z, 1. ), pParam.xyz) ++ + i.y + vec4(i1.y, i2.y, i3.y, 1. ), pParam.xyz) ++ + i.x + vec4(i1.x, i2.x, i3.x, 1. ), pParam.xyz); ++// Gradients ++// ( N*N*N points uniformly over a cube, mapped onto a 4-octohedron.) ++ vec4 ip = pParam ; ++ ip.xy *= pParam.w ; ++ ip.x *= pParam.w ; ++ ip = vec4(1.,1.,1.,2.) / ip ; ++ ++ vec4 p0 = grad4(j0, ip); ++ vec4 p1 = grad4(j1.x, ip); ++ vec4 p2 = grad4(j1.y, ip); ++ vec4 p3 = grad4(j1.z, ip); ++ vec4 p4 = grad4(j1.w, ip); ++ ++#ifdef NORMALISE_GRADIENTS ++ p0 *= taylorInvSqrt(dot(p0,p0)); ++ p1 *= taylorInvSqrt(dot(p1,p1)); ++ p2 *= taylorInvSqrt(dot(p2,p2)); ++ p3 *= taylorInvSqrt(dot(p3,p3)); ++ p4 *= taylorInvSqrt(dot(p4,p4)); ++#endif ++ ++// Mix ++ vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.); ++ vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.); ++ m0 = m0 * m0; ++ m1 = m1 * m1; ++ return 32. * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 ))) ++ + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ; ++ ++ } ++ ++ ++ +diff --git a/src/glsl/skinning.vert b/src/glsl/skinning.vert +new file mode 100644 +index 0000000..28970ee +--- /dev/null ++++ b/src/glsl/skinning.vert +@@ -0,0 +1,24 @@ ++// Vertex weighting/blendin shader ++// Brian Paul ++// 4 Nov 2008 ++ ++uniform mat4 mat0, mat1; ++attribute float weight; ++ ++void main() ++{ ++ // simple diffuse shading ++ // Note that we should really transform the normal vector along with ++ // the postion below... someday. ++ vec3 lightVec = vec3(0, 0, 1); ++ vec3 norm = gl_NormalMatrix * gl_Normal; ++ float dot = 0.2 + max(0.0, dot(norm, lightVec)); ++ gl_FrontColor = vec4(dot); ++ ++ // compute sum of weighted transformations ++ vec4 pos0 = mat0 * gl_Vertex; ++ vec4 pos1 = mat1 * gl_Vertex; ++ vec4 pos = mix(pos0, pos1, weight); ++ ++ gl_Position = gl_ModelViewProjectionMatrix * pos; ++} +diff --git a/src/perf/glslstateschange1.frag b/src/perf/glslstateschange1.frag +new file mode 100644 +index 0000000..0839436 +--- /dev/null ++++ b/src/perf/glslstateschange1.frag +@@ -0,0 +1,19 @@ ++// Multi-texture fragment shader ++// Brian Paul ++ ++// Composite second texture over first. ++// We're assuming the 2nd texture has a meaningful alpha channel. ++ ++uniform sampler2D tex1; ++uniform sampler2D tex2; ++uniform vec4 UniV1; ++uniform vec4 UniV2; ++ ++void main() ++{ ++ vec4 t3; ++ vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy); ++ vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy); ++ t3 = mix(t1, t2, t2.w); ++ gl_FragColor = t3 + UniV1 + UniV2; ++} +diff --git a/src/perf/glslstateschange1.vert b/src/perf/glslstateschange1.vert +new file mode 100644 +index 0000000..cef50db +--- /dev/null ++++ b/src/perf/glslstateschange1.vert +@@ -0,0 +1,14 @@ ++// Multi-texture vertex shader ++// Brian Paul ++ ++ ++attribute vec4 TexCoord0, TexCoord1; ++attribute vec4 VertCoord; ++ ++void main() ++{ ++ gl_TexCoord[0] = TexCoord0; ++ gl_TexCoord[1] = TexCoord1; ++ // note: may use gl_Vertex or VertCoord here for testing: ++ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; ++} +diff --git a/src/perf/glslstateschange2.frag b/src/perf/glslstateschange2.frag +new file mode 100644 +index 0000000..0df0319 +--- /dev/null ++++ b/src/perf/glslstateschange2.frag +@@ -0,0 +1,17 @@ ++// Multi-texture fragment shader ++// Brian Paul ++ ++// Composite second texture over first. ++// We're assuming the 2nd texture has a meaningful alpha channel. ++ ++uniform sampler2D tex1; ++uniform sampler2D tex2; ++uniform vec4 UniV1; ++uniform vec4 UniV2; ++ ++void main() ++{ ++ vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy); ++ vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy); ++ gl_FragColor = t1 + t2 + UniV1 + UniV2; ++} +diff --git a/src/perf/glslstateschange2.vert b/src/perf/glslstateschange2.vert +new file mode 100644 +index 0000000..cef50db +--- /dev/null ++++ b/src/perf/glslstateschange2.vert +@@ -0,0 +1,14 @@ ++// Multi-texture vertex shader ++// Brian Paul ++ ++ ++attribute vec4 TexCoord0, TexCoord1; ++attribute vec4 VertCoord; ++ ++void main() ++{ ++ gl_TexCoord[0] = TexCoord0; ++ gl_TexCoord[1] = TexCoord1; ++ // note: may use gl_Vertex or VertCoord here for testing: ++ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; ++} +diff --git a/src/vpglsl/infinite-loop.glsl b/src/vpglsl/infinite-loop.glsl +new file mode 100644 +index 0000000..bc7ae4b +--- /dev/null ++++ b/src/vpglsl/infinite-loop.glsl +@@ -0,0 +1,8 @@ ++void main() { ++ gl_Position = gl_Vertex; ++ vec4 sum = vec4(0); ++ for (int i = 1; i != 2; i += 2) { ++ sum += vec4(0.1, 0.1, 0.1, 0.1); ++ } ++ gl_FrontColor = sum; ++} +-- +2.0.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch new file mode 100644 index 00000000..f6b59a11 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch @@ -0,0 +1,377 @@ +From 779438770bedf3d53e6ad8f7cd6889b7f50daf3b Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 9 Jul 2014 14:23:41 +0200 +Subject: [PATCH] configure: Allow to disable demos which require GLEW or GLU + +* in some systems without X11 support we don't have GLEW, but + mesa-demos are still useful + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa + +Port to 8.3.0 +Signed-off-by: Jussi Kukkonen +--- + configure.ac | 49 ++++++++++++++++++++--------- + src/Makefile.am | 18 ++++++++--- + src/demos/Makefile.am | 73 ++++++++++++++++++++++++------------------- + src/egl/Makefile.am | 8 +++-- + src/egl/opengles1/Makefile.am | 10 ++++-- + src/egl/opengles2/Makefile.am | 29 ++++++++--------- + 6 files changed, 117 insertions(+), 70 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0525b09..28834cd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile], + [AC_DEFINE(HAVE_FREEGLUT)], + []) + +-dnl Check for GLEW +-PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4]) +-DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS" +-DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS" ++AC_ARG_ENABLE([glew], ++ [AS_HELP_STRING([--enable-glew], ++ [build demos which require glew @<:@default=yes@:>@])], ++ [enable_glew="$enableval"], ++ [enable_glew=yes] ++) ++ ++if test "x$enable_glew" = xyes; then ++ dnl Check for GLEW ++ PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4], [glew_enabled=yes], [glew_enabled=no]) ++ DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS" ++ DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS" ++fi + + # LIBS was set by AC_CHECK_LIB above + LIBS="" + +-PKG_CHECK_MODULES(GLU, [glu], [], +- [AC_CHECK_HEADER([GL/glu.h], +- [], +- AC_MSG_ERROR([GLU not found])) +- AC_CHECK_LIB([GLU], +- [gluBeginCurve], +- [GLU_LIBS=-lGLU], +- AC_MSG_ERROR([GLU required])) ]) ++AC_ARG_ENABLE([glu], ++ [AS_HELP_STRING([--enable-glu], ++ [build demos which require glu @<:@default=yes@:>@])], ++ [enable_glu="$enableval"], ++ [enable_glu=yes] ++) + +-DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS" +-DEMO_LIBS="$DEMO_LIBS $GLU_LIBS" ++if test "x$enable_glu" = xyes; then ++ PKG_CHECK_MODULES(GLU, [glu], [glu_enabled=yes], ++ [AC_CHECK_HEADER([GL/glu.h], ++ [], ++ AC_MSG_ERROR([GLU not found])) ++ AC_CHECK_LIB([GLU], ++ [gluBeginCurve], ++ [GLU_LIBS=-lGLU ++ glu_enabled=yes], ++ AC_MSG_ERROR([GLU required])) ]) ++ ++ DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS" ++ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS" ++fi + + AC_ARG_ENABLE([egl], + [AS_HELP_STRING([--enable-egl], +@@ -304,6 +323,8 @@ AC_SUBST([WAYLAND_CFLAGS]) + AC_SUBST([WAYLAND_LIBS]) + + ++AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes") ++AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes") + AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes") + AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes") + AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes") +diff --git a/src/Makefile.am b/src/Makefile.am +index 1647d64..8b89dee 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -22,15 +22,19 @@ + # Authors: + # Eric Anholt + ++if HAVE_GLEW ++UTIL = util ++endif ++ + SUBDIRS = \ +- util \ ++ $(UTIL) \ + data \ + demos \ + egl \ + fp \ + fpglsl \ + glsl \ +- gs \ ++ gs \ + objviewer \ + osdemos \ + perf \ +@@ -40,8 +44,12 @@ SUBDIRS = \ + slang \ + tests \ + tools \ +- trivial \ +- vp \ +- vpglsl \ + wgl \ + xdemos ++ ++if HAVE_GLEW ++SUBDIRS += \ ++ vp \ ++ vpglsl \ ++ trivial ++endif +diff --git a/src/demos/Makefile.am b/src/demos/Makefile.am +index 41603fa..ab1e3ab 100644 +--- a/src/demos/Makefile.am ++++ b/src/demos/Makefile.am +@@ -30,91 +30,100 @@ AM_LDFLAGS = \ + $(DEMO_LIBS) \ + $(GLUT_LIBS) + ++bin_PROGRAMS = ++ + if HAVE_GLUT +-bin_PROGRAMS = \ ++if HAVE_GLEW ++bin_PROGRAMS += \ + arbfplight \ + arbfslight \ + arbocclude \ + arbocclude2 \ +- bounce \ +- clearspd \ + copypix \ + cubemap \ + cuberender \ + dinoshade \ +- dissolve \ +- drawpix \ + engine \ + fbo_firecube \ + fbotexture \ +- fire \ + fogcoord \ + fplight \ + fslight \ ++ gloss \ ++ isosurf \ ++ multiarb \ ++ paltex \ ++ pointblast \ ++ projtex \ ++ shadowtex \ ++ spriteblast \ ++ stex3d \ ++ textures \ ++ vao_demo \ ++ winpos ++ ++copypix_LDADD = ../util/libutil.la ++cubemap_LDADD = ../util/libutil.la ++cuberender_LDADD = ../util/libutil.la ++engine_LDADD = ../util/libutil.la ++fbo_firecube_LDADD = ../util/libutil.la ++gloss_LDADD = ../util/libutil.la ++isosurf_LDADD = ../util/libutil.la ++multiarb_LDADD = ../util/libutil.la ++projtex_LDADD = ../util/libutil.la ++textures_LDADD = ../util/libutil.la ++winpos_LDADD = ../util/libutil.la ++endif ++ ++if HAVE_GLU ++bin_PROGRAMS += \ ++ bounce \ ++ clearspd \ ++ dissolve \ ++ drawpix \ ++ fire \ + gamma \ + gearbox \ + gears \ + geartrain \ + glinfo \ +- gloss \ + gltestperf \ + ipers \ +- isosurf \ + lodbias \ + morph3d \ +- multiarb \ +- paltex \ + pixeltest \ +- pointblast \ +- projtex \ + ray \ + readpix \ + reflect \ + renormal \ +- shadowtex \ + singlebuffer \ + spectex \ +- spriteblast \ +- stex3d \ + teapot \ + terrain \ + tessdemo \ + texcyl \ + texenv \ +- textures \ + trispd \ + tunnel2 \ +- tunnel \ +- vao_demo \ +- winpos +-endif ++ tunnel + + tunnel_SOURCES = \ + tunnel.c \ + tunneldat.h + +-copypix_LDADD = ../util/libutil.la +-cubemap_LDADD = ../util/libutil.la +-cuberender_LDADD = ../util/libutil.la +-drawpix_LDADD = ../util/libutil.la + dissolve_LDADD = ../util/libutil.la +-engine_LDADD = ../util/libutil.la +-fbo_firecube_LDADD = ../util/libutil.la ++drawpix_LDADD = ../util/libutil.la + fire_LDADD = ../util/libutil.la +-gloss_LDADD = ../util/libutil.la + ipers_LDADD = ../util/libutil.la +-isosurf_LDADD = ../util/libutil.la + lodbias_LDADD = ../util/libutil.la +-multiarb_LDADD = ../util/libutil.la +-projtex_LDADD = ../util/libutil.la + readpix_LDADD = ../util/libutil.la + reflect_LDADD = ../util/libutil.la + teapot_LDADD = ../util/libutil.la + texcyl_LDADD = ../util/libutil.la +-textures_LDADD = ../util/libutil.la + tunnel_LDADD = ../util/libutil.la + tunnel2_LDADD = ../util/libutil.la +-winpos_LDADD = ../util/libutil.la ++endif ++endif + + EXTRA_DIST = \ + README +diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am +index d64a49e..4fe1ca8 100644 +--- a/src/egl/Makefile.am ++++ b/src/egl/Makefile.am +@@ -24,8 +24,12 @@ + + SUBDIRS = \ + eglut \ +- opengl \ +- openvg \ + opengles1 \ + opengles2 \ + oes_vg ++ ++if HAVE_GLU ++SUBDIRS += \ ++ opengl \ ++ openvg ++endif +diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am +index fa397c2..21853e8 100644 +--- a/src/egl/opengles1/Makefile.am ++++ b/src/egl/opengles1/Makefile.am +@@ -36,9 +36,12 @@ AM_LDFLAGS = \ + $(EGL_LIBS) \ + -lm + ++noinst_PROGRAMS = ++ + if HAVE_EGL + if HAVE_GLESV1 +-noinst_PROGRAMS = \ ++if HAVE_X11 ++bin_PROGRAMS = \ + bindtex \ + clear \ + drawtex_x11 \ +@@ -52,8 +55,6 @@ noinst_PROGRAMS = \ + torus_x11 \ + tri_x11 \ + two_win +-endif +-endif + + bindtex_LDADD = $(X11_LIBS) + es1_info_LDADD = $(X11_LIBS) +@@ -76,3 +77,6 @@ drawtex_x11_LDADD = ../eglut/libeglut_x11.la + gears_x11_LDADD = ../eglut/libeglut_x11.la + torus_x11_LDADD = ../eglut/libeglut_x11.la + tri_x11_LDADD = ../eglut/libeglut_x11.la ++endif ++endif ++endif +diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am +index b80ba50..17f8d49 100644 +--- a/src/egl/opengles2/Makefile.am ++++ b/src/egl/opengles2/Makefile.am +@@ -33,27 +33,28 @@ AM_LDFLAGS = \ + $(EGL_LIBS) \ + -lm + ++bin_PROGRAMS = ++ + if HAVE_EGL + if HAVE_GLESV2 +-bin_PROGRAMS = +-if HAVE_X11 +-bin_PROGRAMS += \ +- es2_info \ +- es2gears_x11 \ +- es2tri +-endif + if HAVE_WAYLAND + bin_PROGRAMS += es2gears_wayland +-endif +-endif ++ ++es2gears_wayland_SOURCES = es2gears.c ++es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la + endif + +-es2_info_LDADD = $(X11_LIBS) +-es2tri_LDADD = $(X11_LIBS) ++if HAVE_X11 ++bin_PROGRAMS += \ ++ es2tri \ ++ es2_info \ ++ es2gears_x11 + ++es2_info_LDADD = $(X11_LIBS) + es2gears_x11_SOURCES = es2gears.c +- + es2gears_x11_LDADD = ../eglut/libeglut_x11.la ++es2tri_LDADD = $(X11_LIBS) ++endif ++endif ++endif + +-es2gears_wayland_SOURCES = es2gears.c +-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la +-- +2.1.4 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch new file mode 100644 index 00000000..f77b97f3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch @@ -0,0 +1,234 @@ +From 5e10108d76a59abac21c7e540bcfd2ddaccca2cb Mon Sep 17 00:00:00 2001 +From: Drew Moseley +Date: Fri, 9 May 2014 11:50:24 -0400 +Subject: [PATCH 4/9] Use DEMOS_DATA_DIR to locate data files + +Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=78496] +Signed-off-by: Drew Moseley +--- + src/glsl/bezier.c | 2 +- + src/glsl/blinking-teapot.c | 4 ++-- + src/glsl/brick.c | 4 ++-- + src/glsl/bump.c | 6 +++--- + src/glsl/convolutions.c | 2 +- + src/glsl/mandelbrot.c | 4 ++-- + src/glsl/multitex.c | 4 ++-- + src/glsl/simplex-noise.c | 2 +- + src/glsl/skinning.c | 4 ++-- + src/glsl/texdemo1.c | 8 ++++---- + src/glsl/toyball.c | 4 ++-- + src/objviewer/objview.c | 12 ++++++------ + src/perf/glslstateschange.c | 8 ++++---- + 13 files changed, 32 insertions(+), 32 deletions(-) + +diff --git a/src/glsl/bezier.c b/src/glsl/bezier.c +index 0b56bc1..e01603d 100644 +--- a/src/glsl/bezier.c ++++ b/src/glsl/bezier.c +@@ -13,7 +13,7 @@ + #include "glut_wrap.h" + #include "shaderutil.h" + +-static const char *filename = "bezier.geom"; ++static const char *filename = DEMOS_DATA_DIR "bezier.geom"; + + static GLuint fragShader; + static GLuint vertShader; +diff --git a/src/glsl/blinking-teapot.c b/src/glsl/blinking-teapot.c +index e3bf24d..7662b1f 100644 +--- a/src/glsl/blinking-teapot.c ++++ b/src/glsl/blinking-teapot.c +@@ -63,8 +63,8 @@ init_opengl (void) + exit(1); + } + +- vshad_id = CompileShaderFile (GL_VERTEX_SHADER, "blinking-teapot.vert"); +- fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, "blinking-teapot.frag"); ++ vshad_id = CompileShaderFile (GL_VERTEX_SHADER, DEMOS_DATA_DIR "blinking-teapot.vert"); ++ fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, DEMOS_DATA_DIR "blinking-teapot.frag"); + prog_id = LinkShaders (vshad_id, fshad_id); + + UseProgram (prog_id); +diff --git a/src/glsl/brick.c b/src/glsl/brick.c +index 3021856..fe5f190 100644 +--- a/src/glsl/brick.c ++++ b/src/glsl/brick.c +@@ -14,8 +14,8 @@ + #include "shaderutil.h" + + +-static char *FragProgFile = "CH06-brick.frag"; +-static char *VertProgFile = "CH06-brick.vert"; ++static char *FragProgFile = DEMOS_DATA_DIR "CH06-brick.frag"; ++static char *VertProgFile = DEMOS_DATA_DIR "CH06-brick.vert"; + + /* program/shader objects */ + static GLuint fragShader; +diff --git a/src/glsl/bump.c b/src/glsl/bump.c +index 59f62cd..3a1b20a 100644 +--- a/src/glsl/bump.c ++++ b/src/glsl/bump.c +@@ -15,9 +15,9 @@ + #include "readtex.h" + + +-static char *FragProgFile = "CH11-bumpmap.frag"; +-static char *FragTexProgFile = "CH11-bumpmaptex.frag"; +-static char *VertProgFile = "CH11-bumpmap.vert"; ++static char *FragProgFile = DEMOS_DATA_DIR "CH11-bumpmap.frag"; ++static char *FragTexProgFile = DEMOS_DATA_DIR "CH11-bumpmaptex.frag"; ++static char *VertProgFile = DEMOS_DATA_DIR "CH11-bumpmap.vert"; + static char *TextureFile = DEMOS_DATA_DIR "tile.rgb"; + + /* program/shader objects */ +diff --git a/src/glsl/convolutions.c b/src/glsl/convolutions.c +index a120cfe..9312f00 100644 +--- a/src/glsl/convolutions.c ++++ b/src/glsl/convolutions.c +@@ -340,7 +340,7 @@ static void init(void) + + menuInit(); + readTexture(textureLocation); +- createProgram("convolution.vert", "convolution.frag"); ++ createProgram(DEMOS_DATA_DIR "convolution.vert", DEMOS_DATA_DIR "convolution.frag"); + + glEnable(GL_TEXTURE_2D); + glClearColor(1.0, 1.0, 1.0, 1.0); +diff --git a/src/glsl/mandelbrot.c b/src/glsl/mandelbrot.c +index 31ede1d..ab34a0f 100644 +--- a/src/glsl/mandelbrot.c ++++ b/src/glsl/mandelbrot.c +@@ -14,8 +14,8 @@ + #include "shaderutil.h" + + +-static char *FragProgFile = "CH18-mandel.frag"; +-static char *VertProgFile = "CH18-mandel.vert"; ++static char *FragProgFile = DEMOS_DATA_DIR "CH18-mandel.frag"; ++static char *VertProgFile = DEMOS_DATA_DIR "CH18-mandel.vert"; + + /* program/shader objects */ + static GLuint fragShader; +diff --git a/src/glsl/multitex.c b/src/glsl/multitex.c +index 262ea50..546bd27 100644 +--- a/src/glsl/multitex.c ++++ b/src/glsl/multitex.c +@@ -35,8 +35,8 @@ + + static const char *Demo = "multitex"; + +-static const char *VertFile = "multitex.vert"; +-static const char *FragFile = "multitex.frag"; ++static const char *VertFile = DEMOS_DATA_DIR "multitex.vert"; ++static const char *FragFile = DEMOS_DATA_DIR "multitex.frag"; + + static const char *TexFiles[2] = + { +diff --git a/src/glsl/simplex-noise.c b/src/glsl/simplex-noise.c +index 13fdd5d..885f01e 100644 +--- a/src/glsl/simplex-noise.c ++++ b/src/glsl/simplex-noise.c +@@ -169,7 +169,7 @@ SpecialKey(int key, int x, int y) + static void + Init(void) + { +- const char *filename = "simplex-noise.glsl"; ++ const char *filename = DEMOS_DATA_DIR "simplex-noise.glsl"; + char noiseText[10000]; + FILE *f; + int len; +diff --git a/src/glsl/skinning.c b/src/glsl/skinning.c +index bf38d77..536d475 100644 +--- a/src/glsl/skinning.c ++++ b/src/glsl/skinning.c +@@ -20,8 +20,8 @@ + #define M_PI 3.1415926535 + #endif + +-static char *FragProgFile = "skinning.frag"; +-static char *VertProgFile = "skinning.vert"; ++static char *FragProgFile = DEMOS_DATA_DIR "skinning.frag"; ++static char *VertProgFile = DEMOS_DATA_DIR "skinning.vert"; + + /* program/shader objects */ + static GLuint fragShader; +diff --git a/src/glsl/texdemo1.c b/src/glsl/texdemo1.c +index 6cde239..a082342 100644 +--- a/src/glsl/texdemo1.c ++++ b/src/glsl/texdemo1.c +@@ -35,11 +35,11 @@ + + static const char *Demo = "texdemo1"; + +-static const char *ReflectVertFile = "reflect.vert"; +-static const char *CubeFragFile = "cubemap.frag"; ++static const char *ReflectVertFile = DEMOS_DATA_DIR "reflect.vert"; ++static const char *CubeFragFile = DEMOS_DATA_DIR "cubemap.frag"; + +-static const char *SimpleVertFile = "simple.vert"; +-static const char *SimpleTexFragFile = "shadowtex.frag"; ++static const char *SimpleVertFile = DEMOS_DATA_DIR "simple.vert"; ++static const char *SimpleTexFragFile = DEMOS_DATA_DIR "shadowtex.frag"; + + static const char *GroundImage = DEMOS_DATA_DIR "tile.rgb"; + +diff --git a/src/glsl/toyball.c b/src/glsl/toyball.c +index 5f27951..4e7e832 100644 +--- a/src/glsl/toyball.c ++++ b/src/glsl/toyball.c +@@ -14,8 +14,8 @@ + #include "shaderutil.h" + + +-static char *FragProgFile = "CH11-toyball.frag"; +-static char *VertProgFile = "CH11-toyball.vert"; ++static char *FragProgFile = DEMOS_DATA_DIR "CH11-toyball.frag"; ++static char *VertProgFile = DEMOS_DATA_DIR "CH11-toyball.vert"; + + /* program/shader objects */ + static GLuint fragShader; +diff --git a/src/objviewer/objview.c b/src/objviewer/objview.c +index 6def726..78a6acf 100644 +--- a/src/objviewer/objview.c ++++ b/src/objviewer/objview.c +@@ -162,12 +162,12 @@ init_model(void) + static void + init_skybox(void) + { +- SkyboxTex = LoadSkyBoxCubeTexture("alpine_east.rgb", +- "alpine_west.rgb", +- "alpine_up.rgb", +- "alpine_down.rgb", +- "alpine_south.rgb", +- "alpine_north.rgb"); ++ SkyboxTex = LoadSkyBoxCubeTexture(DEMOS_DATA_DIR "alpine_east.rgb", ++ DEMOS_DATA_DIR "alpine_west.rgb", ++ DEMOS_DATA_DIR "alpine_up.rgb", ++ DEMOS_DATA_DIR "alpine_down.rgb", ++ DEMOS_DATA_DIR "alpine_south.rgb", ++ DEMOS_DATA_DIR "alpine_north.rgb"); + glmSpecularTexture(Model, SkyboxTex); + } + +diff --git a/src/perf/glslstateschange.c b/src/perf/glslstateschange.c +index 7422b78..dbf8332 100644 +--- a/src/perf/glslstateschange.c ++++ b/src/perf/glslstateschange.c +@@ -33,10 +33,10 @@ + #include "glmain.h" + #include "common.h" + +-static const char *VertFile1 = "glslstateschange1.vert"; +-static const char *FragFile1 = "glslstateschange1.frag"; +-static const char *VertFile2 = "glslstateschange2.vert"; +-static const char *FragFile2 = "glslstateschange2.frag"; ++static const char *VertFile1 = DEMOS_DATA_DIR "glslstateschange1.vert"; ++static const char *FragFile1 = DEMOS_DATA_DIR "glslstateschange1.frag"; ++static const char *VertFile2 = DEMOS_DATA_DIR "glslstateschange2.vert"; ++static const char *FragFile2 = DEMOS_DATA_DIR "glslstateschange2.frag"; + static struct uniform_info Uniforms1[] = { + { "tex1", 1, GL_SAMPLER_2D, { 0, 0, 0, 0 }, -1 }, + { "tex2", 1, GL_SAMPLER_2D, { 1, 0, 0, 0 }, -1 }, +-- +2.0.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch new file mode 100644 index 00000000..b27d9eaf --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch @@ -0,0 +1,43 @@ +From 2e0367a941445a862ab99c54ec85d1357d0f73c0 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Thu, 10 Jul 2014 14:30:52 +0200 +Subject: [PATCH] Install few more test programs + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa + +Signed-off-by: Jussi Kukkonen + +--- + src/egl/opengl/Makefile.am | 3 +-- + src/egl/openvg/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am +index 6d184ff6..ab09d028 100644 +--- a/src/egl/opengl/Makefile.am ++++ b/src/egl/opengl/Makefile.am +@@ -57,8 +57,7 @@ endif + + if HAVE_EGL + bin_PROGRAMS = \ +- eglinfo +-noinst_PROGRAMS = \ ++ eglinfo \ + peglgears \ + $(EGL_DRM_DEMOS) \ + $(EGL_X11_DEMOS) \ +diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am +index b0f1212f..5fd1cf83 100644 +--- a/src/egl/openvg/Makefile.am ++++ b/src/egl/openvg/Makefile.am +@@ -49,7 +49,7 @@ endif + + if HAVE_EGL + if HAVE_VG +-noinst_PROGRAMS = \ ++bin_PROGRAMS = \ + $(EGL_X11_DEMOS) + endif + endif diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch new file mode 100644 index 00000000..a6d16817 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch @@ -0,0 +1,99 @@ +From 894add34c2b5e6b4ccc78996bf681d7ec7bc9e36 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Thu, 10 Jul 2014 14:29:27 +0200 +Subject: [PATCH] glsl, perf: Add few missing .glsl, .vert, .frag files to + EXTRA_DATA + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa + +--- + src/fpglsl/Makefile.am | 2 ++ + src/glsl/Makefile.am | 10 ++++++++-- + src/perf/Makefile.am | 6 ++++++ + src/vpglsl/Makefile.am | 1 + + 4 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am +index 47c1039f..fd43c919 100644 +--- a/src/fpglsl/Makefile.am ++++ b/src/fpglsl/Makefile.am +@@ -39,10 +39,12 @@ noinst_PROGRAMS = \ + endif + + EXTRA_DIST = \ ++ depth-read.glsl \ + dowhile2.glsl \ + dowhile.glsl \ + forbreak.glsl \ + for.glsl \ ++ infinite-loop.glsl \ + mov.glsl \ + mov-imm.glsl \ + simpleif.glsl \ +diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am +index 4faa8dbf..079a29d8 100644 +--- a/src/glsl/Makefile.am ++++ b/src/glsl/Makefile.am +@@ -37,7 +37,7 @@ AM_LDFLAGS = \ + if HAVE_GLUT + bin_PROGRAMS = \ + array \ +- bezier \ ++ bezier \ + bitmap \ + brick \ + bump \ +@@ -123,12 +123,16 @@ EXTRA_DIST = \ + CH06-brick.vert \ + CH11-bumpmap.frag \ + CH11-bumpmap.vert \ ++ CH11-bumpmaptex.frag \ + CH11-toyball.frag \ + CH11-toyball.vert \ + CH18-mandel.frag \ + CH18-mandel.vert \ +- bezier.geom \ ++ bezier.geom \ + brick.shtest \ ++ blinking-teapot.frag \ ++ blinking-teapot.vert \ ++ convolution.frag \ + convolution.vert \ + cubemap.frag \ + mandelbrot.shtest \ +@@ -138,5 +142,7 @@ EXTRA_DIST = \ + reflect.vert \ + shadowtex.frag \ + simple.vert \ ++ simplex-noise.glsl \ + skinning.frag \ ++ skinning.vert \ + toyball.shtest +diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am +index f0031fea..60069396 100644 +--- a/src/perf/Makefile.am ++++ b/src/perf/Makefile.am +@@ -59,3 +59,9 @@ endif + + glslstateschange_LDADD = libperf.la ../util/libutil.la + glsl_compile_time_LDADD = ../util/libutil.la ++ ++EXTRA_DIST = \ ++ glslstateschange1.frag \ ++ glslstateschange1.vert \ ++ glslstateschange2.frag \ ++ glslstateschange2.vert +diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am +index 4a85ed40..48b08f48 100644 +--- a/src/vpglsl/Makefile.am ++++ b/src/vpglsl/Makefile.am +@@ -44,6 +44,7 @@ EXTRA_DIST = \ + func2.glsl \ + ifelse.glsl \ + if.glsl \ ++ infinite-loop.glsl \ + mov.glsl \ + nestedifs.glsl \ + nestedswizzle.glsl \ diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch new file mode 100644 index 00000000..8a98ba60 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch @@ -0,0 +1,71 @@ +From 477ab6d90a17d8e4d3935be6ce8b8e154db0e3e5 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Thu, 10 Jul 2014 14:48:12 +0200 +Subject: [PATCH] glsl, perf: Install .glsl, .vert, .frag files + +Upstream-Status: Pending +Signed-off-by: Martin Jansa + +--- + src/fpglsl/Makefile.am | 3 ++- + src/glsl/Makefile.am | 3 ++- + src/perf/Makefile.am | 3 ++- + src/vpglsl/Makefile.am | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am +index fd43c919..2bf51de4 100644 +--- a/src/fpglsl/Makefile.am ++++ b/src/fpglsl/Makefile.am +@@ -38,7 +38,8 @@ noinst_PROGRAMS = \ + fp-tri + endif + +-EXTRA_DIST = \ ++demosdatadir=$(datadir)/$(PACKAGE)/ ++dist_demosdata_DATA= \ + depth-read.glsl \ + dowhile2.glsl \ + dowhile.glsl \ +diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am +index 079a29d8..f66ec299 100644 +--- a/src/glsl/Makefile.am ++++ b/src/glsl/Makefile.am +@@ -118,7 +118,8 @@ vert_or_frag_only_LDADD = ../util/libutil.la + vert_tex_LDADD = ../util/libutil.la + vsraytrace_LDADD = ../util/libutil.la + +-EXTRA_DIST = \ ++demosdatadir=$(datadir)/$(PACKAGE)/ ++dist_demosdata_DATA= \ + CH06-brick.frag \ + CH06-brick.vert \ + CH11-bumpmap.frag \ +diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am +index 60069396..469bdf45 100644 +--- a/src/perf/Makefile.am ++++ b/src/perf/Makefile.am +@@ -60,7 +60,8 @@ endif + glslstateschange_LDADD = libperf.la ../util/libutil.la + glsl_compile_time_LDADD = ../util/libutil.la + +-EXTRA_DIST = \ ++demosdatadir=$(datadir)/$(PACKAGE)/ ++dist_demosdata_DATA= \ + glslstateschange1.frag \ + glslstateschange1.vert \ + glslstateschange2.frag \ +diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am +index 48b08f48..55268675 100644 +--- a/src/vpglsl/Makefile.am ++++ b/src/vpglsl/Makefile.am +@@ -38,7 +38,8 @@ noinst_PROGRAMS = \ + vp-tris + endif + +-EXTRA_DIST = \ ++demosdatadir=$(datadir)/$(PACKAGE)/ ++dist_demosdata_DATA= \ + for.glsl \ + func.glsl \ + func2.glsl \ diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch new file mode 100644 index 00000000..c6876474 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch @@ -0,0 +1,44 @@ +From 3aa84c47e88a4c38446ce1323abf6f2c77389104 Mon Sep 17 00:00:00 2001 +From: Prabhu +Date: Mon, 16 Nov 2015 17:09:32 -0600 +Subject: [PATCH] mesa-demos: OpenVG demos with single frame need eglSwapBuffer + +sp and text demos rendering single frame. to display the +single frame rendered needed a eglSwapBuffer to diplay to window. +Hence added eglutPostRedisplay to display the frame + +Upstream-Status: Pending + +Signed-off-by: Prabhu +--- + src/egl/openvg/sp.c | 1 + + src/egl/openvg/text.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/egl/openvg/sp.c b/src/egl/openvg/sp.c +index a20c0a3..468e91e 100644 +--- a/src/egl/openvg/sp.c ++++ b/src/egl/openvg/sp.c +@@ -500,6 +500,7 @@ draw(void) + } + + vgFlush(); ++ eglutPostRedisplay(); + } + + +diff --git a/src/egl/openvg/text.c b/src/egl/openvg/text.c +index f5c6de8..492581c 100644 +--- a/src/egl/openvg/text.c ++++ b/src/egl/openvg/text.c +@@ -360,6 +360,7 @@ display(void) + { + vgClear(0, 0, width, height); + glyph_string_draw(10.0, 10.0); ++ eglutPostRedisplay(); + } + + +-- +2.5.1 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch new file mode 100644 index 00000000..e7be4dfb --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch @@ -0,0 +1,62 @@ +From 322af294390a7f4e1524c5a79312be6cbebce988 Mon Sep 17 00:00:00 2001 +From: Awais Belal +Date: Wed, 11 Nov 2015 17:22:12 +0500 +Subject: [PATCH] only build GLX demos if needed + +There are platforms that default to EGL only configurations +in which case the GLX applications are not required +at all. Allow the user to control generation of these +demos as needed through a configure switch. + +Signed-off-by: Awais Belal +Upstream-Status: Pending +--- + configure.ac | 9 +++++++++ + src/Makefile.am | 6 +++++- + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index f8ec7e3..1a4d96d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -132,6 +132,11 @@ if test "x$enable_glu" = xyes; then + DEMO_LIBS="$DEMO_LIBS $GLU_LIBS" + fi + ++AC_ARG_ENABLE([glx-demos], ++ [AS_HELP_STRING([--enable-glx-demos], ++ [enable GLX demos @<:@default=auto@:>@])], ++ [glx_demos_enabled="$enableval"], ++ [glx_demos_enabled=yes]) + AC_ARG_ENABLE([egl], + [AS_HELP_STRING([--enable-egl], + [enable EGL library @<:@default=auto@:>@])], +@@ -325,6 +333,7 @@ AC_SUBST([WAYLAND_LIBS]) + + AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes") + AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes") ++AM_CONDITIONAL(HAVE_GLX, test "x$glx_demos_enabled" = "xyes") + AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes") + AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes") + AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes") +diff --git a/src/Makefile.am b/src/Makefile.am +index 8b89dee..a4d7e8f 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -44,8 +44,12 @@ SUBDIRS = \ + slang \ + tests \ + tools \ +- wgl \ ++ wgl ++ ++if HAVE_GLX ++SUBDIRS += \ + xdemos ++endif + + if HAVE_GLEW + SUBDIRS += \ +-- +1.9.1 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos_8.4.0.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos_8.4.0.bb new file mode 100644 index 00000000..129a47df --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-demos_8.4.0.bb @@ -0,0 +1,59 @@ +SUMMARY = "Mesa demo applications" +DESCRIPTION = "This package includes the demonstration application, such as glxgears. \ +These applications can be used for Mesa validation and benchmarking." +HOMEPAGE = "http://mesa3d.org" +BUGTRACKER = "https://bugs.freedesktop.org" +SECTION = "x11" + +LICENSE = "MIT & PD" +LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \ + file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06" + +SRC_URI = "https://mesa.freedesktop.org/archive/demos/${BPN}-${PV}.tar.bz2 \ + file://0001-mesa-demos-Add-missing-data-files.patch \ + file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \ + file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \ + file://0007-Install-few-more-test-programs.patch \ + file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \ + file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \ + file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \ + file://0013-only-build-GLX-demos-if-needed.patch \ + " +SRC_URI[md5sum] = "6b65a02622765522176d00f553086fa3" +SRC_URI[sha256sum] = "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d" + +inherit autotools pkgconfig distro_features_check +# depends on virtual/egl, virtual/libgl ... +REQUIRED_DISTRO_FEATURES = "opengl x11" + +PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \ + x11 glew glu glx" + +# The Wayland code doesn't work with Wayland 1.0, so disable it for now +#${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}" + +EXTRA_OECONF = "--with-system-data-files" + +PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm" +PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl" +PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype" +PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl" +PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1" +PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" +PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,freeglut" +PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa," +PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg" +PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland" +PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11" +PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew" +PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl" +PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos" + +do_install_append() { + # it can be completely empty when all PACKAGECONFIG options are disabled + rmdir --ignore-fail-on-non-empty ${D}${bindir} + + if [ -f ${D}${bindir}/clear ]; then + mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos + fi +} diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_19.1.6.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_19.1.6.bb new file mode 100644 index 00000000..d4b1c1c4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa-gl_19.1.6.bb @@ -0,0 +1,10 @@ +require mesa_${PV}.bb + +SUMMARY += " (OpenGL only, no EGL/GLES)" + +PROVIDES = "virtual/libgl virtual/mesa" + +S = "${WORKDIR}/mesa-${PV}" + +PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa.inc b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa.inc new file mode 100644 index 00000000..54b7618f --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa.inc @@ -0,0 +1,267 @@ +SUMMARY = "A free implementation of the OpenGL API" +DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \ +a system for rendering interactive 3D graphics. \ +A variety of device drivers allows Mesa to be used in many different environments \ +ranging from software emulation to complete hardware acceleration for modern GPUs. \ +Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \ +environment." + +HOMEPAGE = "http://mesa3d.org" +BUGTRACKER = "https://bugs.freedesktop.org" +SECTION = "x11" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" + +PE = "2" + +DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" +EXTRANATIVEPATH += "chrpath-native" +PROVIDES = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ + virtual/mesa \ + " + +inherit meson pkgconfig python3native gettext distro_features_check + +# Unset these to stop python trying to report the target Python setup +_PYTHON_SYSCONFIGDATA_NAME[unexport] = "1" +STAGING_INCDIR[unexport] = "1" +STAGING_LIBDIR[unexport] = "1" + +BBCLASSEXTEND = "native nativesdk" + +ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan" + +PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \ + surfaceless" + +export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config" +export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}" +export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}" +export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" + +MESA_LLVM_RELEASE ?= "${LLVMVERSION}" + +EXTRA_OEMESON = " \ + -Dshared-glapi=true \ + -Dgallium-opencl=disabled \ + -Dglx-read-only-text=true \ + -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ +" + +PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ + glx-tls \ + " +PACKAGECONFIG_class-native ?= "gbm dri egl opengl glx-tls" +PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl glx-tls" + +PACKAGECONFIG_remove_libc-musl = "glx-tls" + +# "gbm" requires "dri", "opengl" +PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false" + +X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" +# "x11" requires "opengl" +PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" +PACKAGECONFIG[glx-tls] = "-Dglx-tls=true, -Dglx-tls=false" +PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc" +PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" + +DRIDRIVERS_class-native = "swrast" +DRIDRIVERS_class-nativesdk = "swrast" +DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915" +DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915" +# "dri" requires "opengl" +PACKAGECONFIG[dri] = "-Ddri=true -Ddri-drivers=${DRIDRIVERS}, -Ddri=false -Ddri-drivers='', xorgproto libdrm" +PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence" + +# Vulkan drivers need dri3 enabled +# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 +VULKAN_DRIVERS = "" +VULKAN_DRIVERS_append_x86_class-target = ",intel" +VULKAN_DRIVERS_append_x86-64_class-target = ",intel" +PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers=''," + +PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" + +# "gles" requires "opengl" +PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false" + +# "egl" requires "dri", "opengl" +PACKAGECONFIG[egl] = "-Degl=true, -Degl=false" + +PACKAGECONFIG[etnaviv] = "" +PACKAGECONFIG[kmsro] = "" +PACKAGECONFIG[vc4] = "" +PACKAGECONFIG[v3d] = "" + +GALLIUMDRIVERS = "swrast" +# gallium swrast was found to crash Xorg on startup in x32 qemu +GALLIUMDRIVERS_x86-x32 = "" + +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" + +# radeonsi requires LLVM +GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" +GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}" +GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" + +PACKAGECONFIG[r600] = "" + +GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}" +GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" +GALLIUMDRIVERS_append = ",virgl" + +PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''" +PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \ + ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" +PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false" + +PACKAGECONFIG[lima] = "" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" + +PACKAGECONFIG[panfrost] = "" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}" + +OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}" +PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none" + +PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind" + +# mesa tries to run cross-built gen_matypes on build machine to get struct size information +EXTRA_OEMESON_append = " -Dasm=false" + +# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) +FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" + +CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" + +# Remove the mesa dependency on mesa-dev, as mesa is empty +RDEPENDS_${PN}-dev = "" + +# Add dependency so that GLES3 header don't need to be added manually +RDEPENDS_libgles2-mesa-dev += "libgles3-mesa-dev" + +PACKAGES =+ "libegl-mesa libegl-mesa-dev \ + libosmesa libosmesa-dev \ + libgl-mesa libgl-mesa-dev \ + libglapi libglapi-dev \ + libgbm libgbm-dev \ + libgles1-mesa libgles1-mesa-dev \ + libgles2-mesa libgles2-mesa-dev \ + libgles3-mesa libgles3-mesa-dev \ + libxatracker libxatracker-dev \ + mesa-megadriver mesa-vulkan-drivers \ + " + +do_install_append () { + # Drivers never need libtool .la files + rm -f ${D}${libdir}/dri/*.la + rm -f ${D}${libdir}/egl/*.la + rm -f ${D}${libdir}/gallium-pipe/*.la + rm -f ${D}${libdir}/gbm/*.la + + # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used + chrpath --delete ${D}${libdir}/dri/*_dri.so || true + + # libwayland-egl has been moved to wayland 1.15+ + rm -f ${D}${libdir}/libwayland-egl* + rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc +} + +# For the packages that make up the OpenGL interfaces, inject variables so that +# they don't get Debian-renamed (which would remove the -mesa suffix), and +# RPROVIDEs/RCONFLICTs on the generic libgl name. +python __anonymous() { + pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() + for p in (("egl", "libegl", "libegl1"), + ("dri", "libgl", "libgl1"), + ("gles", "libgles1", "libglesv1-cm1"), + ("gles", "libgles2", "libglesv2-2"), + ("gles", "libgles3",)): + if not p[0] in pkgconfig: + continue + fullp = p[1] + "-mesa" + pkgs = " ".join(p[1:]) + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) + + d.appendVar("RRECOMMENDS_" + fullp, " mesa-megadriver") + + # For -dev, the first element is both the Debian and original name + fullp += "-dev" + pkgs = p[1] + "-dev" + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) +} + +python mesa_populate_packages() { + pkgs = ['mesa', 'mesa-dev', 'mesa-dbg'] + for pkg in pkgs: + d.setVar("RPROVIDES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) + d.setVar("RCONFLICTS_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) + d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) + + import re + dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri") + if os.path.isdir(dri_drivers_root): + dri_pkgs = os.listdir(dri_drivers_root) + lib_name = d.expand("${MLPREFIX}mesa-megadriver") + for p in dri_pkgs: + m = re.match(r'^(.*)_dri\.so$', p) + if m: + pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) + d.appendVar("RPROVIDES_%s" % lib_name, pkg_name) + d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name) + d.appendVar("RREPLACES_%s" % lib_name, pkg_name) + + pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") + do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') +} + +PACKAGESPLITFUNCS_prepend = "mesa_populate_packages " + +PACKAGES_DYNAMIC += "^mesa-driver-.*" + +FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf" +FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan" +FILES_libegl-mesa = "${libdir}/libEGL.so.*" +FILES_libgbm = "${libdir}/libgbm.so.*" +FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*" +FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*" +FILES_libgl-mesa = "${libdir}/libGL.so.*" +FILES_libglapi = "${libdir}/libglapi.so.*" +FILES_libosmesa = "${libdir}/libOSMesa.so.*" +FILES_libxatracker = "${libdir}/libxatracker.so.*" + +FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan" +FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" +FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" +FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" +FILES_libglapi-dev = "${libdir}/libglapi.*" +FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" +FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" +FILES_libgles3-mesa-dev = "${includedir}/GLES3" +FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" +FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ + ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ + ${libdir}/pkgconfig/xatracker.pc" + +# Fix upgrade path from mesa to mesa-megadriver +RREPLACES_mesa-megadriver = "mesa" +RCONFLICTS_mesa-megadriver = "mesa" +RPROVIDES_mesa-megadriver = "mesa" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 00000000..58aea6c0 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1,2 @@ +# enable ludicrous speed for GFX on rpi4 +PACKAGECONFIG_append_class-target = " v3d kmsro" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_19.1.6.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_19.1.6.bb new file mode 100644 index 00000000..19221e9e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/mesa/mesa_19.1.6.bb @@ -0,0 +1,20 @@ +require ${BPN}.inc + +SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ + file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ + file://0002-meson.build-make-TLS-GLX-optional-again.patch \ + file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ + " + +SRC_URI[md5sum] = "7dbb40b8d10e89bee0a5bfc85350647b" +SRC_URI[sha256sum] = "2a369b7b48545c6486e7e44913ad022daca097c8bd937bf30dcf3f17a94d3496" + +UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" + +#because we cannot rely on the fact that all apps will use pkgconfig, +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then + sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h + fi +} diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend new file mode 100644 index 00000000..d4c74ef4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/userland/userland_%.bbappend @@ -0,0 +1,4 @@ +# FIXME: Temporary fix that can be removed once commit 752db52 gets backported +# from master to thud branch of meta-raspberrypi +RDEPENDS_${PN}_remove = "libegl1" +RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..d652d6be --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://dsi.cfg" + +# Reduce the screen resolution to HD Ready (720p) +SRC_URI_remove = "file://hdmi-a-1-270.cfg" +SRC_URI_append = "file://hdmi-a-1-270-720p.cfg" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg new file mode 100644 index 00000000..72a6d2bf --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg @@ -0,0 +1,5 @@ +# Support the Raspberry Pi Foundation 7" tablet which uses the DSI connector +# rather than HDMI. +[output] +name=DSI-1 +transform=270 diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg new file mode 100644 index 00000000..e1c9db1a --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg @@ -0,0 +1,7 @@ +# A display is connected to HDMI-A-1 and needs to be rotated 270 degrees +# to have a proper orientation of the homescreen. For example the various sizes +# of the GeChic display or the Dell display. +[output] +name=HDMI-A-1 +transform=270 +mode=1280x720 diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb new file mode 100644 index 00000000..818b5e78 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb @@ -0,0 +1,47 @@ +SUMMARY = "Combine dtb and dtbo" +DESCRIPTION = "Combine specified dtb and one or more dtbo into specified filename found in deploydir" +SECTION = "bootloader" +PR = "r1" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +DEPENDS = "dtc-native" + +ALLOW_EMPTY_${PN} = "1" +FILES_${PN} = "" + +S = "${WORKDIR}" + +do_compile[depends] += "virtual/kernel:do_deploy" + +do_compile () { + # Official touchscreen setup (rpi3b/rpi3b dtb, vc4-kms-v3d and ft5406) + if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b-plus+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fi + + # HDMI screen setup (rpi3b/rpi3b dtb and vc4-kms-v3d) + if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b-plus+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + fi +} + +do_deploy () { + install -d ${DEPLOY_DIR_IMAGE} + if [ -f "${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} + fi + if [ -f "${S}/bcm2710-rpi-3+vc4+ft5406.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE} + fi + if [ -f "${S}/bcm2710-rpi-3-b+vc4.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE} + fi + if [ -f "${S}/bcm2710-rpi-3+vc4.dtb" ]; then + install -m 0644 ${S}/bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE} + fi +} + +addtask deploy after do_install diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro/0001-brcmfmac43455-sdio.txt-Follow-raspbian-change-for-bo.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro/0001-brcmfmac43455-sdio.txt-Follow-raspbian-change-for-bo.patch new file mode 100644 index 00000000..1ad0fd1b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro/0001-brcmfmac43455-sdio.txt-Follow-raspbian-change-for-bo.patch @@ -0,0 +1,39 @@ +From c9d4f263131cb8e62597e0a296968b5cdbfe0019 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Thu, 27 Jun 2019 20:49:10 +0100 +Subject: [PATCH] brcmfmac43455-sdio.txt: Follow raspbian change for + boardflags3 + +Without this change the WiFi interface on RPi4 never comes up. Also the +upstream repository doesn't include this change. It is only (as far as I +know) part of the raspberrypi deb repository with the following +changelog: + +firmware-nonfree (1:20190114-1+rpt2) buster; urgency=medium + * Update brcmfmac43455-sdio.txt + - Update boardflags3 + -- Serge Schneider Thu, 18 Apr 2019 14:35:34 ++0100 + +Upstream-status: Pending +Signed-off-by: Andrei Gherzan +--- + brcm/brcmfmac43455-sdio.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/brcm/brcmfmac43455-sdio.txt b/brcm/brcmfmac43455-sdio.txt +index 54d9321..6801286 100644 +--- a/brcm/brcmfmac43455-sdio.txt ++++ b/brcm/brcmfmac43455-sdio.txt +@@ -21,7 +21,7 @@ btc_mode=1 + # bit1 for btcoex + boardflags=0x00480201 + boardflags2=0x40800000 +-boardflags3=0x48200100 ++boardflags3=0x44200100 + phycal_tempdelta=15 + rxchain=1 + txchain=1 +-- +2.17.1 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_%.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_%.bbappend new file mode 100644 index 00000000..30c18fb0 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux-firmware-rpidistro/linux-firmware-rpidistro_%.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-brcmfmac43455-sdio.txt-Follow-raspbian-change-for-bo.patch" + +do_unpack_append() { + bb.build.exec_func('do_clean_pc', d) +} +do_clean_pc() { + rm -rf ${S}/.pc +} diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/rpi-kernel-misc.cfg b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/rpi-kernel-misc.cfg new file mode 100644 index 00000000..07b14371 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/rpi-kernel-misc.cfg @@ -0,0 +1 @@ +CONFIG_SENSORS_RPI_POE_FAN=m diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-faytech-fix-rpi.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-faytech-fix-rpi.patch new file mode 100644 index 00000000..00e36920 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0002-faytech-fix-rpi.patch @@ -0,0 +1,33 @@ +From f9fefc63456dd50eeec727ae2fbc13b0d84eb44e Mon Sep 17 00:00:00 2001 +From: Tom Pollard +Date: Wed, 6 Apr 2016 07:47:25 +0000 +Subject: [PATCH 1/1] Fix lack of touch up for Faytech 10" Touchscreen MonitorV2 + +NOTE: This is a very temporary hack that is not in a state to be upstreamed yet. +--- +Index: a/drivers/hid/hid-multitouch.c +=================================================================== +--- a/drivers/hid/hid-multitouch.c 2016-07-05 08:45:06.006466000 +0000 ++++ b/drivers/hid/hid-multitouch.c 2016-07-05 08:48:44.574466000 +0000 +@@ -205,7 +205,6 @@ + { .name = MT_CLS_WIN_8, + .quirks = MT_QUIRK_ALWAYS_VALID | + MT_QUIRK_IGNORE_DUPLICATES | +- MT_QUIRK_HOVERING | + MT_QUIRK_CONTACT_CNT_ACCURATE }, + { .name = MT_CLS_EXPORT_ALL_INPUTS, + .quirks = MT_QUIRK_ALWAYS_VALID | +@@ -396,11 +395,6 @@ + td->is_buttonpad = true; + + break; +- case 0xff0000c5: +- /* Retrieve the Win8 blob once to enable some devices */ +- if (usage->usage_index == 0) +- mt_get_feature(hdev, field->report); +- break; + } + } + +-- +1.9.1 diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg new file mode 100644 index 00000000..4a67a7e6 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/disable_kprobes.cfg @@ -0,0 +1 @@ +CONFIG_KPROBES=n diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-hciuart.cfg b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-hciuart.cfg new file mode 100644 index 00000000..eac59dbd --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-hciuart.cfg @@ -0,0 +1,12 @@ +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +# CONFIG_BT_HCIUART_BCSP is not set +# CONFIG_BT_HCIUART_ATH3K is not set +# CONFIG_BT_HCIUART_LL is not set +CONFIG_BT_HCIUART_3WIRE=y +# CONFIG_BT_HCIUART_INTEL is not set +CONFIG_BT_HCIUART_BCM=y +# CONFIG_BT_HCIUART_QCA is not set +# CONFIG_BT_HCIUART_AG6XX is not set +# CONFIG_BT_HCIUART_MRVL is not set +# CONFIG_BT_HCIBPA10X is not set diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg new file mode 100644 index 00000000..8c573578 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi-panel.cfg @@ -0,0 +1 @@ +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi_network.cfg b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi_network.cfg new file mode 100644 index 00000000..993d1508 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/raspberrypi_network.cfg @@ -0,0 +1,5 @@ +CONFIG_NETDEVICES=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_DRIVERS=y +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_SMSC75XX=y diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi4.inc b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi4.inc new file mode 100644 index 00000000..ea7f7783 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi4.inc @@ -0,0 +1,140 @@ +DESCRIPTION = "Linux Kernel for Raspberry Pi" +SECTION = "kernel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +COMPATIBLE_MACHINE = "^rpi$" + +PE = "1" +PV = "${LINUX_VERSION}+git${SRCPV}" + +inherit kernel siteinfo +require recipes-kernel/linux/linux-yocto.inc + +SRC_URI += "file://rpi-kernel-misc.cfg" + +KCONFIG_MODE = "--alldefconfig" +KBUILD_DEFCONFIG_raspberrypi0-wifi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig" +KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig" +KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig" +KBUILD_DEFCONFIG_raspberrypi4 ?= "bcm2711_defconfig" +KBUILD_DEFCONFIG_raspberrypi4-64 ?= "bcm2711_defconfig" + +# CMDLINE for raspberrypi +SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}" +CMDLINE ?= "dwc_otg.lpm_enable=0 ${SERIAL} root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" + +# Add the kernel debugger over console kernel command line option if enabled +CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}' + +# Disable rpi logo on boot +CMDLINE_append += ' ${@oe.utils.conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo.nologo", "", d)}' + +# You can define CMDLINE_DEBUG as "debug" in your local.conf or distro.conf +# to enable kernel debugging. +CMDLINE_DEBUG ?= "" +CMDLINE_append = " ${CMDLINE_DEBUG}" + +KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}" + +# A LOADADDR is needed when building a uImage format kernel. This value is not +# set by default in rpi-4.8.y and later branches so we need to provide it +# manually. This value unused if KERNEL_IMAGETYPE is not uImage. +KERNEL_EXTRA_ARGS += "LOADADDR=0x00008000" + +# Set a variable in .configure +# $1 - Configure variable to be set +# $2 - value [n/y/value] +kernel_configure_variable() { + # Remove the config + CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;" + if test "$2" = "n" + then + echo "# CONFIG_$1 is not set" >> ${B}/.config + else + echo "CONFIG_$1=$2" >> ${B}/.config + fi +} + +config_setup() { + # From kernel.bbclass. Unfortunately, this is needed to support builds that + # use devtool. The reason is as follows: + # + # - In devtool builds, externalsrc.bbclass gets inherited and sets a list of + # SRCTREECOVEREDTASKS, which don't get run because they affect the source + # tree and, when using devtool, we want the developer's changes to be the + # single source of truth. kernel-yocto.bbclass adds do_kernel_configme to + # SRCTREECOVEREDTASKS, so it doesn't run in a devtool build., In a normal + # non-devtool build, do_kernel_configme creates ${B}.config. + # + # - Normally (e.g. in linux-yocto), it would be OK that do_kernel_configme + # doesn't run, because the first few lines of do_configure in kernel.bbclass + # populate ${B}.config from either ${S}.config (if it exists) for custom + # developer changes, or otherwise from ${WORDIR}/defconfig. + # + # - In linux-raspberrypi, we add do_configure_prepend, which tweaks + # ${B}.config. Since this runs *before* the kernel.bbclass do_configure, + # ${B}.config doesn't yet exist and we hit an error. Thus we need to move + # the logic from do_configure up to before our do_configure_prepend. Because + # we are copying only a portion of do_configure and not the whole thing, + # there is no clean way to do it using OE functionality, so we just + # copy-and-paste. + if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then + mv "${S}/.config" "${B}/.config" + fi + + # Copy defconfig to .config if .config does not exist. This allows + # recipes to manage the .config themselves in do_configure_prepend(). + if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then + cp "${WORKDIR}/defconfig" "${B}/.config" + fi +} + +do_configure_prepend() { + config_setup + + mv -f ${B}/.config ${B}/.config.patched + CONF_SED_SCRIPT="" + + # Localversion + kernel_configure_variable LOCALVERSION "\"\"" + + if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + kernel_configure_variable OVERLAY_FS y + kernel_configure_variable SQUASHFS y + kernel_configure_variable UBIFS_FS y + fi + + # Activate the configuration options for VC4 + VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" + if [ "${VC4GRAPHICS}" = "1" ]; then + kernel_configure_variable I2C_BCM2835 y + kernel_configure_variable DRM y + kernel_configure_variable DRM_FBDEV_EMULATION y + kernel_configure_variable DRM_VC4 y + fi + + # Keep this the last line + # Remove all modified configs and add the rest to .config + sed -e "${CONF_SED_SCRIPT}" < '${B}/.config.patched' >> '${B}/.config' + rm -f ${B}/.config.patched +} + +do_compile_append() { + if [ "${SITEINFO_BITS}" = "64" ]; then + cc_extra=$(get_cc_option) + oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + fi +} + +do_deploy_append() { + # Deploy cmdline.txt + install -d ${DEPLOYDIR}/bcm2835-bootfiles + PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" + if [ ${PITFT} = "1" ]; then + PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8" + fi + echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt +} diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend new file mode 100644 index 00000000..c12cd6c5 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend @@ -0,0 +1,40 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +require recipes-kernel/linux/linux-agl.inc + +# NOTE: Kprobes need to be disabled until linux-raspberrypi gets updated +# to newer than 4.14.104 to avoid lttng-modules failing to build. +SRC_URI_append = "\ + ${@oe.utils.conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \ + file://disable_kprobes.cfg \ +" + +CMDLINE_DEBUG = "" +CMDLINE_append = " usbhid.mousepoll=0" + +# Add options to allow CMA to operate +CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_CMA", "1", "coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}' + +KERNEL_MODULE_AUTOLOAD += "snd-bcm2835" +KERNEL_MODULE_AUTOLOAD += "hid-multitouch" + +RDEPENDS_${PN} += "kernel-module-snd-bcm2835" +PACKAGES += "kernel-module-snd-bcm2835" + +# Enable support for usb video class for usb camera devices +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg" + +# Enable support for joystick devices +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg" + +# Enable support for Pi foundation touchscreen +SRC_URI_append = " file://raspberrypi-panel.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-panel.cfg" + +# Enable bt hci uart +SRC_URI_append = " file://raspberrypi-hciuart.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-hciuart.cfg" + +# ENABLE NETWORK (built-in) +SRC_URI_append = " file://raspberrypi_network.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi_network.cfg" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14%.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14%.bbappend new file mode 100644 index 00000000..ba11890b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14%.bbappend @@ -0,0 +1 @@ +require recipes-kernel/linux/linux-agl-4.14.inc diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb new file mode 100644 index 00000000..e58559b8 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb @@ -0,0 +1,16 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" + +LINUX_VERSION ?= "4.19.58" +LINUX_RPI_BRANCH ?= "rpi-4.19.y" + +SRCREV = "8222f38b1ceadd0642d49812fd34a3a6cb00e264" +SRC_URI = " \ + git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \ + " +SRC_URI_append_raspberrypi4-64 = " file://rpi4-64-kernel-misc.cfg" + +require linux-raspberrypi4.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +KERNEL_EXTRA_ARGS_append_rpi = " DTC_FLAGS='-@ -H epapr'" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend new file mode 100644 index 00000000..e48a380a --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend @@ -0,0 +1,2 @@ +# Disable faad by default to avoid licensing issues +PACKAGECONFIG_remove_rpi = "faad" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc new file mode 100644 index 00000000..9295739b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc @@ -0,0 +1,5 @@ +#Keep this as a reminder +#MACHINEOVERRIDES .= ":kingfisher" +#PACKAGE_EXTRA_ARCHS_append = " kingfisher" + +PREFERRED_RPROVIDER_virtual/gpsd-conf ?= "gpsd-kingfisher-conf" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf new file mode 100644 index 00000000..796d9268 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf @@ -0,0 +1,73 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += " \ + ${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bb \ + ${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bbappend \ + ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ +" + +BBFILE_COLLECTIONS += "rcar-gen3-cogent" +BBFILE_PATTERN_rcar-gen3-cogent := "^${LAYERDIR}/../../../bsp/meta-rcar/meta-rcar-gen3-adas/" +BBFILE_PRIORITY_rcar-gen3-cogent = "7" + +LAYERSERIES_COMPAT_rcar-gen3-cogent = "thud" + +# Custom packages +IMAGE_INSTALL_append_rcar-gen3 = " \ + can-utils \ + libsocketcan \ + spidev-dbg spidev-test \ + e2fsprogs \ + e2fsprogs-tune2fs \ + ethtool \ + pciutils \ + usbutils \ + mtd-utils \ + capture \ + v4l2-fw \ + iperf3 \ + bonnie++ \ + lmbench \ + eglibc-utils \ + mm-init \ + iio-utils \ + most-tools \ +" + +# Radio packages +IMAGE_INSTALL_append_rcar-gen3 += " \ + si-tools \ + si-init \ + linux-firmware-wl18xx \ + ti-bt \ + ti-bt-firmware \ + bluez5 \ + bluez5-testtools \ + ofono \ + ofono-tests \ +" + +# IMP +IMAGE_INSTALL_append_r8a7797 += " \ + kernel-module-uio-imp \ + kernel-module-cmemdrv \ + udev-rules-cvlib \ +" + +IMAGE_INSTALL_append_r8a7798 += " \ + kernel-module-uio-imp \ + kernel-module-cmemdrv \ + udev-rules-cvlib \ +" + +DISTRO_FEATURES_append = " surroundview " +DISTRO_FEATURES_append = " bluetooth" + + +BBMASK += "/meta-rcar-gen3-adas/recipes-core/systemd/" +BBMASK += "/meta-rcar-gen3-adas/recipes-graphics/opencv/" +BBMASK += "/meta-rcar-gen3-adas/recipes-devtools/valgrind/" + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-init.service b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-init.service new file mode 100644 index 00000000..d2204cb6 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-init.service @@ -0,0 +1,10 @@ +[Unit] +Description=Initialize Si468x radio +ConditionPathExists=/sys/firmware/devicetree/base/si468x@0/compatible + +[Service] +Type=oneshot +ExecStart=/usr/bin/si_init + +[Install] +WantedBy=sysinit.target diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch new file mode 100644 index 00000000..9bbccadd --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch @@ -0,0 +1,184 @@ +FM configuration improvements + +Changes include: +- Add command-line option for selecting FM band plan. The default + band plan is US / Canada. +- Add command-line options for setting FM scanning valid SNR and RSSI + thresholds to allow tweaking sensitivity in poor radio environments. +- Increased seeking scan timeout to 3 seconds, which seems to improve + behavior in poor radio environments where powerful stations may be + far apart. +- Removed explicit setting of FM_SOFTMUTE_SNR_LIMITS, as it seemed + like it might be resulting in odd muting behavior when scanning. +- Changed initial FM frequency if not specified to the minimum of the + band plan. + +Signed-off-by: Scott Murray + +diff --git a/si46xx.h b/si46xx.h +index 172ea8b..c32fca4 100644 +--- a/si46xx.h ++++ b/si46xx.h +@@ -83,6 +83,7 @@ + #define SI46XX_PIN_CONFIG_ENABLE 0x0800 + #define SI46XX_FM_SEEK_BAND_BOTTOM 0x3100 + #define SI46XX_FM_SEEK_BAND_TOP 0x3101 ++#define SI46XX_FM_SEEK_FREQUENCY_SPACING 0x3102 + #define SI46XX_FM_VALID_MAX_TUNE_ERROR 0x3200 + #define SI46XX_FM_VALID_RSSI_TIME 0x3201 + #define SI46XX_FM_VALID_RSSI_THRESHOLD 0x3202 +@@ -150,7 +151,7 @@ + #define MAX_SERVICES 32 + #define MAX_COMPONENTS 15 + +-#define TIMEOUT_SEEK 2000 /* mS = 2S */ ++#define TIMEOUT_SEEK 3000 /* mS = 3S */ + #define TIMEOUT_TUNE 500 /* mS = .5S */ + + struct dab_service_t{ +diff --git a/si_ctl.c b/si_ctl.c +index 59dfaf2..f168218 100644 +--- a/si_ctl.c ++++ b/si_ctl.c +@@ -101,6 +101,26 @@ uint32_t frequency_list_ch[] = { CHAN_12A, + CHAN_9D, + CHAN_8B}; + ++// Structure to describe FM band plans, all values in Hz. ++typedef struct { ++ char *name; ++ uint32_t min; ++ uint32_t max; ++ uint32_t step; ++} fm_band_plan_t; ++ ++static fm_band_plan_t known_fm_band_plans[5] = { ++ { .name = "US", .min = 87900000, .max = 107900000, .step = 200000 }, ++ { .name = "JP", .min = 76000000, .max = 95000000, .step = 100000 }, ++ { .name = "EU", .min = 87500000, .max = 108000000, .step = 50000 }, ++ { .name = "ITU-1", .min = 87500000, .max = 108000000, .step = 50000 }, ++ { .name = "ITU-2", .min = 87900000, .max = 107900000, .step = 50000 } ++}; ++ ++static unsigned int fm_band_plan; ++static int fm_snr_threshold = 128; ++static int fm_rssi_threshold = 128; ++ + int init_am(int offset) + { + int ret; +@@ -160,12 +180,32 @@ int init_fm(int offset) + * enable I2S output + */ + si46xx_set_property(SI46XX_PIN_CONFIG_ENABLE, 0x0003); +- //si46xx_set_property(SI46XX_FM_VALID_RSSI_THRESHOLD,0x0000); +- //si46xx_set_property(SI46XX_FM_VALID_SNR_THRESHOLD,0x0000); +- si46xx_set_property(SI46XX_FM_SOFTMUTE_SNR_LIMITS, 0x0000); // set the SNR limits for soft mute attenuation ++ //si46xx_set_property(SI46XX_FM_SOFTMUTE_SNR_LIMITS, 0x0000); // set the SNR limits for soft mute attenuation + si46xx_set_property(SI46XX_FM_TUNE_FE_CFG, 0x0000); // front end switch open +- si46xx_set_property(SI46XX_FM_SEEK_BAND_BOTTOM, 88000 / 10); +- si46xx_set_property(SI46XX_FM_SEEK_BAND_TOP, 108000 / 10); ++ ++ //si46xx_set_property(SI46XX_FM_SEEK_BAND_BOTTOM, 88000 / 10); ++ //si46xx_set_property(SI46XX_FM_SEEK_BAND_TOP, 108000 / 10); ++ if (verbose) ++ fprintf(stderr, "Using FM Bandplan: %s\n", known_fm_band_plans[fm_band_plan].name); ++ si46xx_set_property(SI46XX_FM_SEEK_BAND_BOTTOM, known_fm_band_plans[fm_band_plan].min / 10000); ++ si46xx_set_property(SI46XX_FM_SEEK_BAND_TOP, known_fm_band_plans[fm_band_plan].max / 10000); ++ if (verbose) ++ fprintf(stderr, "Using FM band: %d - %d, %d spacing\n", ++ known_fm_band_plans[fm_band_plan].min / 10000, ++ known_fm_band_plans[fm_band_plan].max / 10000, ++ known_fm_band_plans[fm_band_plan].step / 10000); ++ si46xx_set_property(SI46XX_FM_SEEK_FREQUENCY_SPACING, known_fm_band_plans[fm_band_plan].step / 10000); ++ if (fm_snr_threshold != 128) { ++ if (verbose) ++ fprintf(stderr, "Setting FM valid SNR threshold to %d dB\n", fm_snr_threshold); ++ si46xx_set_property(SI46XX_FM_VALID_SNR_THRESHOLD, fm_snr_threshold); ++ } ++ if (fm_rssi_threshold != 128) { ++ if (verbose) ++ fprintf(stderr, "Setting FM valid RSSI threshold to %d dB\n", fm_rssi_threshold); ++ si46xx_set_property(SI46XX_FM_VALID_RSSI_THRESHOLD, fm_rssi_threshold); ++ } ++ + /* + * rate + */ +@@ -190,6 +230,7 @@ int init_fm(int offset) + + return 0; + } ++ + int init_dab(int offset) + { + int ret; +@@ -245,6 +286,10 @@ int output_help(char *prog_name) + printf(" -l up|down FM/AM seek next station\n"); + printf(" -d FM/AM RSQ status\n"); + printf(" -m FM rds status\n"); ++ printf("Common FM:\n"); ++ printf(" -p bandplan FM bandplan (us, jp, eu, itu-1, itu-2\n"); ++ printf(" -t SNR FM scan valid SNR threshold (-127 to 127 dB)\n"); ++ printf(" -u RSSI FM scan valid RSSI threshold (-127 to 127 dBuV)\n"); + printf("DAB only:\n"); + printf(" -e dab status\n"); + printf(" -f service start service of dab service list\n"); +@@ -354,6 +399,7 @@ int main(int argc, char **argv) + int offset = - 1; + int mode; + int tmp; ++ unsigned int i; + struct dab_digrad_status_t dab_digrad_status; + bool init = false; + bool seek_up = false; +@@ -374,7 +420,7 @@ int main(int argc, char **argv) + + optind = 0; + while (optind < argc) { +- if ((c = getopt(argc, argv, "a:b:c:def:ghi:j:k:l:mnosv")) != -1) { ++ if ((c = getopt(argc, argv, "a:b:c:def:ghi:j:k:l:mnop:st:u:v")) != -1) { + switch(c){ + /* init */ + case 'a': +@@ -422,6 +468,31 @@ int main(int argc, char **argv) + case 'c': + frequency = atoi(optarg); + break; ++ /* FM */ ++ case 'p': ++ for(i = 0; ++ i < sizeof(known_fm_band_plans) / sizeof(fm_band_plan_t); ++ i++) { ++ if(!strcasecmp(optarg, known_fm_band_plans[i].name)) { ++ fm_band_plan = i; ++ break; ++ } ++ } ++ if(i >= (sizeof(known_fm_band_plans) / sizeof(fm_band_plan_t))) { ++ printf("Invalid mode: %s\n", optarg); ++ return -EINVAL; ++ } ++ break; ++ case 't': ++ fm_snr_threshold = atoi(optarg); ++ if(fm_snr_threshold < -128 || fm_snr_threshold > 127) ++ fm_snr_threshold = 128; // use firmware default ++ break; ++ case 'u': ++ fm_rssi_threshold = atoi(optarg); ++ if(fm_rssi_threshold < -128 || fm_rssi_threshold > 127) ++ fm_rssi_threshold = 128; // use firmware default ++ break; + /* DAB stuff. TODO: rework */ + case 'e': + si46xx_dab_digrad_status(&dab_digrad_status); +@@ -473,7 +544,7 @@ int main(int argc, char **argv) + case SI46XX_MODE_FM: + ret = init_fm(offset); + if (frequency < 0) +- frequency = 105500; ++ frequency = known_fm_band_plans[fm_band_plan].min / 1000; + break; + case SI46XX_MODE_AM: + ret = init_am(offset); diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb new file mode 100644 index 00000000..7ab99e02 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "Systemd service unit for Si468x radio initialization" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +inherit systemd + +SRC_URI = "file://si-init.service" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/si-init.service ${D}${systemd_system_unitdir} + + # Add symlink to sysinit.target.wants + install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants + ln -s ${systemd_system_unitdir}/si-init.service ${D}${sysconfdir}/systemd/system/sysinit.target.wants/ + + # Add a rule to ensure the 'audio' user has permission to access + # the Si468x device via i2c + install -d ${D}${sysconfdir}/udev/rules.d + cat >${D}${sysconfdir}/udev/rules.d/zz-radio-si.rules <<'EOF' +KERNEL=="i2c-12", MODE="0660", GROUP="audio", SECLABEL{smack}="*" +EOF +} + +FILES_${PN} += "${systemd_system_unitdir}" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend new file mode 100644 index 00000000..7a459314 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/files" + +SRC_URI += " \ + file://si-tools-fm-improvements.patch \ +" + +EXTRA_OEMAKE_append = " 'LDFLAGS=${LDFLAGS}'" + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service new file mode 100644 index 00000000..214e6070 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service @@ -0,0 +1,10 @@ +[Unit] +Description=User Mode Init Manager for TI shared transport +Before=bluetooth.service + +[Service] +ExecStartPre=-/sbin/modprobe -q btwilink +ExecStart=/usr/bin/uim -f /sys/devices/platform/kim + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend new file mode 100644 index 00000000..a08cb262 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend @@ -0,0 +1,18 @@ +inherit systemd + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://ti-uim.service" + +SYSTEMD_SERVICE_${PN} = "ti-uim.service" + +PR = "r0" +PV = "0.1+git${SRCPV}" + +do_install_append() { + # We do not want the blacklist + rm -f ${D}/${sysconfdir}/modprobe.d/ti_bt.conf + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/ti-uim.service ${D}${systemd_unitdir}/system +} diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch new file mode 100644 index 00000000..64c9542a --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch @@ -0,0 +1,84 @@ +From ce9a7a41a9f65cc8cc129cdd27e155b35b26d393 Mon Sep 17 00:00:00 2001 +From: Matt Porter +Date: Wed, 13 Dec 2017 12:49:20 -0500 +Subject: [PATCH] arm64: dts: renesas: preserve drm HDMI connector naming on KF + +Kingfisher adds encoders on ports 0 and 2 of the R-Car +display unit. The bare ULCB SK has only an HDMI encoder +in use on port 1. When the system is booted with an SK +dtb, port 1's HDMI encoder is assigned as HDMI-A-1 because +it is the first (and only) encoder present. When booting +a KF dtb, port 0's HDMI encoder preceeds port1 in the dtb due +to incremental ordering of the endpoint port nodes. This causes +the KF HDMI to be assigned HDMI-A-1 and the SK HDMI to be assigned +as HDMI-A-2. In order to preserve the SK's HDMI output naming as +connector HDMI-A-1, reorder the endpoint port nodes so that port1 +is first. + +Change-Id: Ibbb1975c2383a526a54c257fb7d68d32a042d468 +Signed-off-by: Matt Porter +Signed-off-by: Ronan Le Martret +--- + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 10 +++++----- + arch/arm64/boot/dts/renesas/r8a7796.dtsi | 10 +++++----- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +index f7f947d27b0d..5bcc2391587d 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +@@ -3054,11 +3054,6 @@ + #address-cells = <1>; + #size-cells = <0>; + +- port@0 { +- reg = <0>; +- du_out_rgb: endpoint { +- }; +- }; + port@1 { + reg = <1>; + du_out_hdmi0: endpoint { +@@ -3076,6 +3071,11 @@ + du_out_lvds0: endpoint { + }; + }; ++ port@0 { ++ reg = <0>; ++ du_out_rgb: endpoint { ++ }; ++ }; + }; + }; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +index df26656e0f19..154ac1dd91fa 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +@@ -2846,11 +2846,6 @@ + #address-cells = <1>; + #size-cells = <0>; + +- port@0 { +- reg = <0>; +- du_out_rgb: endpoint { +- }; +- }; + port@1 { + reg = <1>; + du_out_hdmi0: endpoint { +@@ -2862,6 +2857,11 @@ + du_out_lvds0: endpoint { + }; + }; ++ port@0 { ++ reg = <0>; ++ du_out_rgb: endpoint { ++ }; ++ }; + }; + }; + +-- +2.11.0 + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg new file mode 100644 index 00000000..4179e25c --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg @@ -0,0 +1,9 @@ +# CONFIG_STAGING is not set +# CONFIG_MOST is not set +# CONFIG_MOSTCORE is not set +# CONFIG_AIM_CDEV is not set +# CONFIG_AIM_NETWORK is not set +# CONFIG_AIM_SOUND is not set +# CONFIG_AIM_V4L2 is not set +# CONFIG_HDM_DIM2 is not set + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend new file mode 100644 index 00000000..72a4a78e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend @@ -0,0 +1,30 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_ulcb = " \ + file://0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch \ + file://disable_most.cfg \ +" + +SRC_URI_remove_ulcb = " \ + file://0113-arm64-dts-ulcb-kf-increase-SDIO-frequency-for-WLAN-c.patch \ +" + +KERNEL_DEVICETREE_remove_h3ulcb = " \ + renesas/r8a7795-es1-h3ulcb-view.dtb \ + renesas/r8a7795-es1-h3ulcb-had-alfa.dtb \ + renesas/r8a7795-es1-h3ulcb-had-beta.dtb \ + renesas/r8a7795-es1-h3ulcb-vb.dtb \ + renesas/r8a7795-es1-h3ulcb-vb2.dtb \ + renesas/r8a7795-es1-h3ulcb-vbm.dtb \ + renesas/r8a7795-h3ulcb-view.dtb \ + renesas/r8a7795-h3ulcb-had-alfa.dtb \ + renesas/r8a7795-h3ulcb-had-beta.dtb \ + renesas/r8a7795-h3ulcb-vb.dtb \ + renesas/r8a7795-h3ulcb-vb2.dtb \ + renesas/r8a7795-h3ulcb-vb2.1.dtb \ + renesas/r8a7795-h3ulcb-vbm.dtb \ + renesas/r8a7795-h3ulcb-4x2g-vb.dtb \ + renesas/r8a7795-h3ulcb-4x2g-vb2.dtb \ + renesas/r8a7795-h3ulcb-4x2g-vb2.1.dtb \ + renesas/r8a7795-h3ulcb-4x2g-vbm.dtb \ +" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf new file mode 100644 index 00000000..f0c47231 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-h3ulcb_r8a7795.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video16 +output-device-name=/dev/video17 diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf new file mode 100644 index 00000000..25a3fa1e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter/gstvspfilter-m3ulcb_r8a7796.conf @@ -0,0 +1,2 @@ +input-device-name=/dev/video8 +output-device-name=/dev/video9 diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend new file mode 100644 index 00000000..e77b58e0 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-multimedia/gstreamer/gstreamer1.0-plugin-vspfilter_1.0.1.bbappend @@ -0,0 +1,3 @@ +COMPATIBLE_MACHINE = "r8a7795|r8a7796" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/files/gpsd.kingfisher b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/files/gpsd.kingfisher new file mode 100644 index 00000000..7e991dc0 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/files/gpsd.kingfisher @@ -0,0 +1,4 @@ +# If you must specify a non-NMEA driver, uncomment and modify the next line +GPSD_SOCKET="/var/run/gpsd.sock" +GPSD_OPTIONS="" +GPS_DEVICES="/dev/ttySC2" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-kingfisher-conf_1.0.bb b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-kingfisher-conf_1.0.bb new file mode 100644 index 00000000..2c4192b9 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-kingfisher-conf_1.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "King fisher specific gpsd config" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD;md5=3775480a712fc46a69647678acb234cb" + +SRC_URI = " \ + file://gpsd.kingfisher \ +" + +inherit update-alternatives + +RPROVIDES_${PN} += "virtual/gpsd-conf" + +ALTERNATIVE_${PN} = "gpsd-defaults" +ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" +ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.kingfisher" +ALTERNATIVE_PRIORITY[gpsd-defaults] = "20" + +COMPATIBLE_MACHINE = "ulcb" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install() { + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/gpsd.kingfisher ${D}/${sysconfdir}/default/gpsd.kingfisher +} + +FILES_${PN} = "${sysconfdir}/default/gpsd.kingfisher" +CONFFILES_${PN} = "${sysconfdir}/default/gpsd.kingfisher" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend new file mode 100644 index 00000000..72d991c7 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state new file mode 100644 index 00000000..12353942 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state @@ -0,0 +1,321 @@ +state.ak4613 { + control.1 { + iface MIXER + name 'Digital Playback Volume1' + value.0 204 + value.1 204 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2550 + dbvalue.1 -2550 + } + } + control.2 { + iface MIXER + name 'Digital Playback Volume2' + value.0 204 + value.1 204 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2550 + dbvalue.1 -2550 + } + } + control.3 { + iface MIXER + name 'Digital Playback Volume3' + value.0 204 + value.1 204 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2550 + dbvalue.1 -2550 + } + } + control.4 { + iface MIXER + name 'Digital Playback Volume4' + value.0 204 + value.1 204 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2550 + dbvalue.1 -2550 + } + } + control.5 { + iface MIXER + name 'Digital Playback Volume5' + value.0 204 + value.1 204 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2550 + dbvalue.1 -2550 + } + } + control.6 { + iface MIXER + name 'Digital Playback Volume6' + value.0 204 + value.1 204 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 255' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2550 + dbvalue.1 -2550 + } + } + control.7 { + iface MIXER + name 'DVC Out Playback Volume' + value.0 1677721 + value.1 1677721 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 8388607' + } + } + control.8 { + iface MIXER + name 'DVC Out Mute Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.9 { + iface MIXER + name 'DVC Out Ramp Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.10 { + iface MIXER + name 'DVC Out Ramp Up Rate' + value '128 dB/1 step' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '128 dB/1 step' + item.1 '64 dB/1 step' + item.2 '32 dB/1 step' + item.3 '16 dB/1 step' + item.4 '8 dB/1 step' + item.5 '4 dB/1 step' + item.6 '2 dB/1 step' + item.7 '1 dB/1 step' + item.8 '0.5 dB/1 step' + item.9 '0.25 dB/1 step' + item.10 '0.125 dB/1 step' + item.11 '0.125 dB/2 steps' + item.12 '0.125 dB/4 steps' + item.13 '0.125 dB/8 steps' + item.14 '0.125 dB/16 steps' + item.15 '0.125 dB/32 steps' + item.16 '0.125 dB/64 steps' + item.17 '0.125 dB/128 steps' + item.18 '0.125 dB/256 steps' + item.19 '0.125 dB/512 steps' + item.20 '0.125 dB/1024 steps' + item.21 '0.125 dB/2048 steps' + item.22 '0.125 dB/4096 steps' + item.23 '0.125 dB/8192 steps' + } + } + control.11 { + iface MIXER + name 'DVC Out Ramp Down Rate' + value '128 dB/1 step' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '128 dB/1 step' + item.1 '64 dB/1 step' + item.2 '32 dB/1 step' + item.3 '16 dB/1 step' + item.4 '8 dB/1 step' + item.5 '4 dB/1 step' + item.6 '2 dB/1 step' + item.7 '1 dB/1 step' + item.8 '0.5 dB/1 step' + item.9 '0.25 dB/1 step' + item.10 '0.125 dB/1 step' + item.11 '0.125 dB/2 steps' + item.12 '0.125 dB/4 steps' + item.13 '0.125 dB/8 steps' + item.14 '0.125 dB/16 steps' + item.15 '0.125 dB/32 steps' + item.16 '0.125 dB/64 steps' + item.17 '0.125 dB/128 steps' + item.18 '0.125 dB/256 steps' + item.19 '0.125 dB/512 steps' + item.20 '0.125 dB/1024 steps' + item.21 '0.125 dB/2048 steps' + item.22 '0.125 dB/4096 steps' + item.23 '0.125 dB/8192 steps' + } + } + control.12 { + iface MIXER + name 'SRC Out Rate Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.13 { + iface MIXER + name 'SRC Out Rate' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 192000' + } + } + control.14 { + iface MIXER + name 'DVC In Capture Volume' + value.0 838861 + value.1 838861 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 8388607' + } + } + control.15 { + iface MIXER + name 'DVC In Mute Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.16 { + iface MIXER + name 'DVC In Ramp Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.17 { + iface MIXER + name 'DVC In Ramp Up Rate' + value '128 dB/1 step' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '128 dB/1 step' + item.1 '64 dB/1 step' + item.2 '32 dB/1 step' + item.3 '16 dB/1 step' + item.4 '8 dB/1 step' + item.5 '4 dB/1 step' + item.6 '2 dB/1 step' + item.7 '1 dB/1 step' + item.8 '0.5 dB/1 step' + item.9 '0.25 dB/1 step' + item.10 '0.125 dB/1 step' + item.11 '0.125 dB/2 steps' + item.12 '0.125 dB/4 steps' + item.13 '0.125 dB/8 steps' + item.14 '0.125 dB/16 steps' + item.15 '0.125 dB/32 steps' + item.16 '0.125 dB/64 steps' + item.17 '0.125 dB/128 steps' + item.18 '0.125 dB/256 steps' + item.19 '0.125 dB/512 steps' + item.20 '0.125 dB/1024 steps' + item.21 '0.125 dB/2048 steps' + item.22 '0.125 dB/4096 steps' + item.23 '0.125 dB/8192 steps' + } + } + control.18 { + iface MIXER + name 'DVC In Ramp Down Rate' + value '128 dB/1 step' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '128 dB/1 step' + item.1 '64 dB/1 step' + item.2 '32 dB/1 step' + item.3 '16 dB/1 step' + item.4 '8 dB/1 step' + item.5 '4 dB/1 step' + item.6 '2 dB/1 step' + item.7 '1 dB/1 step' + item.8 '0.5 dB/1 step' + item.9 '0.25 dB/1 step' + item.10 '0.125 dB/1 step' + item.11 '0.125 dB/2 steps' + item.12 '0.125 dB/4 steps' + item.13 '0.125 dB/8 steps' + item.14 '0.125 dB/16 steps' + item.15 '0.125 dB/32 steps' + item.16 '0.125 dB/64 steps' + item.17 '0.125 dB/128 steps' + item.18 '0.125 dB/256 steps' + item.19 '0.125 dB/512 steps' + item.20 '0.125 dB/1024 steps' + item.21 '0.125 dB/2048 steps' + item.22 '0.125 dB/4096 steps' + item.23 '0.125 dB/8192 steps' + } + } +} diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend new file mode 100644 index 00000000..cdfb3cbe --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = " \ + file://0001-Boot-Normal-World-in-EL2.patch \ +" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-Boot-Normal-World-in-EL2.patch b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-Boot-Normal-World-in-EL2.patch new file mode 100644 index 00000000..6ce9c0f9 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-Boot-Normal-World-in-EL2.patch @@ -0,0 +1,28 @@ +From c97f38b09f8b7d9c57a6e6f500c6ba8f7abd9914 Mon Sep 17 00:00:00 2001 +From: Michele Paolino +Date: Fri, 19 May 2017 14:50:55 +0200 +Subject: [PATCH] Boot Normal World in EL2 + +This patch configures ATF (SPSR register) to boot BL33 in EL2. + +Signed-off-by: Michele Paolino +--- + plat/renesas/rcar/platform.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plat/renesas/rcar/platform.mk b/plat/renesas/rcar/platform.mk +index ef7bf0f..06bc592 100644 +--- a/plat/renesas/rcar/platform.mk ++++ b/plat/renesas/rcar/platform.mk +@@ -186,7 +186,7 @@ $(eval $(call add_define,RCAR_DRAM_SPLIT)) + + # Process RCAR_BL33_EXECUTION_EL flag + ifndef RCAR_BL33_EXECUTION_EL +-RCAR_BL33_EXECUTION_EL := 0 ++RCAR_BL33_EXECUTION_EL := 1 + endif + $(eval $(call add_define,RCAR_BL33_EXECUTION_EL)) + +-- +2.7.4 + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt new file mode 100644 index 00000000..ff86b4e8 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt @@ -0,0 +1,18 @@ +bootkaddr=0x49090000 +bootdaddr=0x48000000 +bootiaddr=0x5C3F9520 + +bootargs_console=console=ttySC0,115200 ignore_loglevel +bootargs_extra=rw rootfstype=ext4 rootwait rootdelay=2 +bootargs_root=ostree_root=/dev/mmcblk1p2 root=/dev/ram0 ramdisk_size=16384 + +bootmmc=0:1 +rootmmc=0:2 + +booteload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/loader/uEnv.txt; env import -t ${bootkaddr} ${filesize} +bootkload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/${kernel_image} +bootiload_sd=ext4load mmc ${rootmmc} ${bootiaddr} boot/${ramdisk_image}; setenv ramdisk_size ${filesize} +bootdload_sd=fatload mmc ${bootmmc} ${bootdaddr} Image-r8a7795-h3ulcb.dtb + +bootcmd=run booteload_sd; setenv bootargs ${bootargs} ${bootargs_console} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; run bootdload_sd; booti ${bootkaddr} ${bootiaddr}:${ramdisk_size} ${bootdaddr} + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt new file mode 100644 index 00000000..64f83330 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt @@ -0,0 +1,18 @@ +bootkaddr=0x49090000 +bootdaddr=0x48000000 +bootiaddr=0x5C3F9520 + +bootargs_console=console=ttySC0,115200 ignore_loglevel +bootargs_extra=rw rootfstype=ext4 rootwait rootdelay=2 +bootargs_root=ostree_root=/dev/mmcblk1p2 root=/dev/ram0 ramdisk_size=16384 + +bootmmc=0:1 +rootmmc=0:2 + +booteload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/loader/uEnv.txt; env import -t ${bootkaddr} ${filesize} +bootkload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/${kernel_image} +bootiload_sd=ext4load mmc ${rootmmc} ${bootiaddr} boot/${ramdisk_image}; setenv ramdisk_size ${filesize} +bootdload_sd=fatload mmc ${bootmmc} ${bootdaddr} Image-r8a7796-m3ulcb.dtb + +bootcmd=run booteload_sd; setenv bootargs ${bootargs} ${bootargs_console} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; run bootdload_sd; booti ${bootkaddr} ${bootiaddr}:${ramdisk_size} ${bootdaddr} + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/renesas-ota-bootfiles.bb b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/renesas-ota-bootfiles.bb new file mode 100644 index 00000000..db08f3f4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/renesas-ota-bootfiles.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Boot files (bootscripts etc.) for Renesas RCar-M3 board" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit deploy + +COMPATIBLE_MACHINE = "(m3ulcb|h3ulcb|ebisu)" + +S = "${WORKDIR}" + +SRC_URI_append_sota = "file://uEnv-ota-m3ulcb.txt \ + file://uEnv-ota-h3ulcb.txt" + +do_deploy() { + install -d ${DEPLOYDIR}/${PN} +} + +do_deploy_append_sota() { + install -m 0755 ${WORKDIR}/uEnv-ota-${BOARD_NAME}.txt ${DEPLOYDIR}/${PN}/uEnv.txt +} + +addtask deploy before do_package after do_install +do_deploy[dirs] += "${DEPLOYDIR}/${PN}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb new file mode 100644 index 00000000..a477e1c3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb @@ -0,0 +1,7 @@ +DESCRIPTION = "Virtual gles-module" + +LICENSE="GPLv2" + +DEPENDS = "gles-user-module wayland-kms libgbm" + +PROVIDES = "virtual/libgles2 virtual/egl" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..198f83f1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://kingfisher_output.cfg" +SRC_URI_append_ebisu += "file://ebisu_output.cfg" + +do_configure() { + echo repaint-window=34 >> ${WORKDIR}/core.cfg + + echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg + echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg +} diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/ebisu_output.cfg b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/ebisu_output.cfg new file mode 100644 index 00000000..618f04e7 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/ebisu_output.cfg @@ -0,0 +1,4 @@ +[output] +name=VGA-1 +mode=off + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/kingfisher_output.cfg b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/kingfisher_output.cfg new file mode 100644 index 00000000..a194a4a4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf/kingfisher_output.cfg @@ -0,0 +1,8 @@ +[output] +name=HDMI-A-2 +mode=off + +[output] +name=LVDS-1 +mode=off + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 00000000..38590dcd --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1 @@ +DEPENDS_append_ulcb = " gstreamer1.0-plugins-base" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend new file mode 100644 index 00000000..8a4176fc --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend @@ -0,0 +1,4 @@ +module_do_compile_prepend() { + cd ${S}/build/linux/config/compilers + cp aarch64-poky-linux.mk ${TARGET_SYS}.mk +} diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend new file mode 100644 index 00000000..5262a9c5 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend @@ -0,0 +1,2 @@ +KERNEL_MODULE_AUTOLOAD_append = " mmngr" +KERNEL_MODULE_PACKAGE_SUFFIX = "" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend new file mode 100644 index 00000000..6b935b09 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend @@ -0,0 +1,2 @@ +KERNEL_MODULE_AUTOLOAD_append = " mmngrbuf" +KERNEL_MODULE_PACKAGE_SUFFIX = "" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend new file mode 100644 index 00000000..f1450747 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-uvcs/kernel-module-uvcs-drv.bbappend @@ -0,0 +1 @@ +KERNEL_MODULE_AUTOLOAD = "uvcs_drv" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend new file mode 100644 index 00000000..37979724 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend @@ -0,0 +1,2 @@ +KERNEL_MODULE_AUTOLOAD_append = " vspm_if" +KERNEL_MODULE_PACKAGE_SUFFIX = "" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch new file mode 100644 index 00000000..966b006a --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch @@ -0,0 +1,125 @@ +The ADSP on Renesas SoCs required a reserved memory area to become +enabled, and this needs to be done manually. + +This patch adds sound hardware abstraction information for the m3ulcb +and m3ulcb-kf (kingfisher) device trees. This is helpful on-board the +ADSP for dynamically determining sound hardware at runtime, allowing +single binaries to be used between the two boards. + +Future work will incorporate the h3ulcb and Salvator boards into the +abstraction. + +Signed-off-by: Ronan Le Martret +Signed-off-by: Mark Farrugia +--- +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts +index de2390f009e7..4ccfa8315d17 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts +@@ -15,6 +15,39 @@ + "renesas,r8a7796"; + }; + ++ ++&adsp { ++ ++ /* ADSP playback setting for pcm3168 */ ++ adsp_playback0: adsp,playback { ++ mode = "tdm"; ++ clock-mode = "master"; ++ bus-width = <24>; ++ ssi = <3>; ++ bus-if = <0>; ++ channels = <8>; ++ pin-share-ssi = <4>; ++ }; ++ ++ /* ADSP capture setting for pcm3168 */ ++ adsp_capture0: adsp,capture { ++ mode = "tdm"; ++ clock-mode = "slave"; ++ bus-width = <24>; ++ ssi = <4>; ++ bus-if = <0>; ++ channels = <8>; ++ pin-share-ssi = <3>; ++ }; ++ ++ adsp,ports { ++ port@0 { ++ playback = <&adsp_playback0>; ++ capture = <&adsp_capture0>; ++ }; ++ }; ++}; ++ + &du { + ports { + port@0 { +diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts +index 1cd64c1b3b31..71e59da3528d 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts ++++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts +@@ -42,11 +42,18 @@ + reg = <0x00000000 0x54000000 0x0 0x03000000>; + }; + ++ /* For Audio DSP */ ++ adsp_reserved: linux,adsp { ++ compatible = "shared-dma-pool"; ++ reusable; ++ reg = <0x00000000 0x57000000 0x0 0x01000000>; ++ }; ++ + /* global autoconfigured region for contiguous allocations */ + linux,cma@57000000 { + compatible = "shared-dma-pool"; + reusable; +- reg = <0x00000000 0x57000000 0x0 0x19000000>; ++ reg = <0x00000000 0x58000000 0x0 0x18000000>; + linux,cma-default; + }; + +@@ -110,6 +117,42 @@ + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + ++&adsp { ++ status = "okay"; ++ clock-frequency = <12288000 11289600>; ++ audio-clocks = <22579200 24576000>; ++ memory-region = <&adsp_reserved>; ++ ++ /* ADSP playback setting for ak4613 */ ++ adsp_playback0: adsp,playback { ++ mode = "i2s"; ++ clock-mode = "master"; ++ bus-width = <16>; ++ ssi = <0>; ++ bus-if = <0>; ++ channels = <2>; ++ pin-share-ssi = <1>; ++ }; ++ ++ /* ADSP capture setting for ak4613 */ ++ adsp_capture0: adsp,capture { ++ mode = "i2s"; ++ clock-mode = "slave"; ++ bus-width = <16>; ++ ssi = <1>; ++ bus-if = <0>; ++ channels = <2>; ++ pin-share-ssi = <0>; ++ }; ++ ++ adsp,ports { ++ port@0 { ++ playback = <&adsp_playback0>; ++ capture = <&adsp_capture0>; ++ }; ++ }; ++}; ++ + &vspb { + status = "okay"; + }; diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/namespace_fix.cfg b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/namespace_fix.cfg new file mode 100644 index 00000000..d5ade412 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/namespace_fix.cfg @@ -0,0 +1,4 @@ +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_NET_NS=y diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend new file mode 100644 index 00000000..e72dc3df --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +require recipes-kernel/linux/linux-agl.inc + +SRC_URI_append = " file://namespace_fix.cfg \ + " + +# Add ADSP patch to enable and add sound hardware abstraction +SRC_URI_append_ulcb = " \ + file://0004-ADSP-enable-and-add-sound-hardware-abstraction.patch \ +" diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend new file mode 100644 index 00000000..c1e9ce12 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend @@ -0,0 +1,3 @@ +require recipes-kernel/linux/linux-agl-4.14.inc + + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bbappend new file mode 100644 index 00000000..b35c614c --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/omx-module/omx-user-module.bbappend @@ -0,0 +1,8 @@ +setup_build_tree() { + for omxmc in ${OMX_COMMON_SRC} ${OMX_VIDEO_DEC_COMMON_SRC} ${OMX_VIDEO_ENC_COMMON_SRC} + do + tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${WORKDIR} + tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${S} ${omxmc}/src --strip=2 + tar xf ${WORKDIR}/${omxmc}.tar.bz2 -C ${S} ${omxmc}/include --strip=1 + done +} diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh b/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh new file mode 100644 index 00000000..0dea86bd --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston5-20190802.zip" +ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20190802.zip" + +COPY_SCRIPT="$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh" + +test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs +DOWNLOAD_DIR=${XDG_DOWNLOAD_DIR:-$HOME/Downloads} +EXTRACT_DIR=$METADIR/binary-tmp + +stdout_in_terminal=1 +[[ -t 1 ]] && stdout_in_terminal=1 +function color { + [[ $stdout_in_terminal == 0 ]] && return + for k in $*; do + case $k in + bold) tput bold;; + none) tput sgr0;; + *) tput setaf $k;; + esac + if [[ $? != 0 ]]; then + echo "tput: terminal doesn't support color settings, continuing" >&2 + true + fi + done +} +color_green=$(color bold 2) +color_yellow=$(color bold 3) +color_red=$(color bold 1) +color_none=$(color none) + +function error() { + echo "${color_red}$@${color_none}" >&2 +} + +function log() { + echo "$@" >&2 +} + +function copy_mm_packages() { + # first clean up workdir + [[ -d $EXTRACT_DIR ]] && rm -r $EXTRACT_DIR + + if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then + mkdir -p $EXTRACT_DIR + cp --update $DOWNLOAD_DIR/$ZIP_1 $EXTRACT_DIR + cp --update $DOWNLOAD_DIR/$ZIP_2 $EXTRACT_DIR + else + error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_1+"\" NOT EXTRACTING CORRECTLY" + error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_2+"\" NOT EXTRACTING CORRECTLY" + log "The graphics and multimedia acceleration packages for " + log "the R-Car Gen3 board BSP can be downloaded from:" + log "" + log + error "These 2 files from there should be stored in your" + error "'$DOWNLOAD_DIR' directory." + error " $ZIP_1" + error " $ZIP_2" + return 1 + fi + + if [ -f $COPY_SCRIPT ]; then + cd $METADIR/bsp/meta-renesas-rcar-gen3/ + $COPY_SCRIPT -d -f $EXTRACT_DIR + cd .. + else + log "scripts to copy drivers for Gen3 not found." + return 1 + fi +} diff --git a/meta-agl/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..e737b540 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,6 @@ +do_configure_append_bbe() { + echo 'gbm-format=rgb565' >> ${WORKDIR}/core.cfg + if [[ -e "${WORKDIR}/hdmi-a-1-270.cfg" ]]; then + echo 'mode=1280x720' >> ${WORKDIR}/hdmi-a-1-270.cfg + fi +} diff --git a/meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/cma-256.cfg b/meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/cma-256.cfg new file mode 100644 index 00000000..e08ea6c7 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/cma-256.cfg @@ -0,0 +1 @@ +CONFIG_CMA_SIZE_MBYTES=256 diff --git a/meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend b/meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend new file mode 100644 index 00000000..6c15b166 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend @@ -0,0 +1,5 @@ +require recipes-kernel/linux/linux-agl.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI += "file://cma-256.cfg" diff --git a/meta-agl/meta-agl-bsp/meta-synopsys/recipes-kernel/linux/linux-arc_%.bbappend b/meta-agl/meta-agl-bsp/meta-synopsys/recipes-kernel/linux/linux-arc_%.bbappend new file mode 100644 index 00000000..88ac94b1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-synopsys/recipes-kernel/linux/linux-arc_%.bbappend @@ -0,0 +1 @@ +require recipes-kernel/linux/linux-agl.inc diff --git a/meta-agl/meta-agl-bsp/meta-ti/.gitkeep b/meta-agl/meta-agl-bsp/meta-ti/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-Add-soc-performance-monitor-utilites.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-Add-soc-performance-monitor-utilites.patch new file mode 100644 index 00000000..4268b7dc --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-Add-soc-performance-monitor-utilites.patch @@ -0,0 +1,3570 @@ +From 7830118ecb980766f4a6e3997769d7ae326bee77 Mon Sep 17 00:00:00 2001 +From: Karthik Ramanan +Date: Fri, 3 Jun 2016 18:32:50 +0530 +Subject: [PATCH] Add soc performance monitor utilites + +Signed-off-by: Karthik Ramanan +--- + Makefile.am | 17 +- + clients/Dra7xx_ddrstat_speed.c | 494 +++++++++++++ + clients/soc_performance_monitor.c | 630 ++++++++++++++++ + clients/soc_performance_monitor.h | 40 ++ + clients/statcoll.c | 1433 +++++++++++++++++++++++++++++++++++++ + clients/statcoll.h | 152 ++++ + clients/statcoll_gui.h | 101 +++ + clients/time_bar_graph.c | 515 +++++++++++++ + clients/time_bar_graph.h | 93 +++ + 10 files changed, 4873 insertions(+), 1 deletion(-) + create mode 100644 clients/Dra7xx_ddrstat_speed.c + create mode 100644 clients/soc_performance_monitor.c + create mode 100644 clients/soc_performance_monitor.h + create mode 100644 clients/statcoll.c + create mode 100644 clients/statcoll.h + create mode 100644 clients/statcoll_gui.h + create mode 100644 clients/time_bar_graph.c + create mode 100644 clients/time_bar_graph.h + +diff --git a/Makefile.am b/Makefile.am +index 62719c9..55aed6d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -432,7 +432,9 @@ demo_clients = \ + weston-fullscreen \ + weston-stacking \ + weston-calibrator \ +- weston-scaler ++ weston-scaler \ ++ soc-performance-monitor \ ++ soc-ddr-bw-visualizer + + if INSTALL_DEMO_CLIENTS + bin_PROGRAMS += $(demo_clients) +@@ -570,6 +572,19 @@ weston_image_SOURCES = clients/image.c + weston_image_LDADD = libtoytoolkit.la + weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) + ++noinst_LTLIBRARIES += libtimebargraph.la ++libtimebargraph_la_SOURCES = clients/time_bar_graph.c clients/time_bar_graph.h ++libtimebargraph_la_LIBADD = libtoytoolkit.la ++libtimebargraph_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_CFLAGS) $(CAIRO_EGL_CFLAGS) ++ ++soc_performance_monitor_SOURCES = clients/soc_performance_monitor.c clients/soc_performance_monitor.h ++soc_performance_monitor_LDADD = libtoytoolkit.la libtimebargraph.la ++soc_performance__CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) ++ ++soc_ddr_bw_visualizer_SOURCES = clients/statcoll.c clients/Dra7xx_ddrstat_speed.c clients/statcoll.h clients/statcoll_gui.h ++soc_ddr_bw_visualizer_LDADD = libtoytoolkit.la libtimebargraph.la ++soc_ddr_bw_visualizer__CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) ++ + weston_cliptest_SOURCES = \ + clients/cliptest.c \ + src/vertex-clipping.c \ +diff --git a/clients/Dra7xx_ddrstat_speed.c b/clients/Dra7xx_ddrstat_speed.c +new file mode 100644 +index 0000000..af06733 +--- /dev/null ++++ b/clients/Dra7xx_ddrstat_speed.c +@@ -0,0 +1,494 @@ ++/* ++ * Copyright (C) 2015 Texas Instruments ++ * Author: Karthik Ramanan ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see . ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "statcoll.h" ++ ++#define PAGE_SIZE 4096 ++ ++#define EMIF1_BASE 0x4c000000 ++#define EMIF2_BASE 0x4d000000 ++ ++#define EMIF_PERF_CNT_1 0x80 ++#define EMIF_PERF_CNT_2 0x84 ++#define EMIF_PERF_CNT_CFG 0x88 ++#define EMIF_PERF_CNT_TIM 0x90 ++ ++static unsigned ++tv_diff(struct timeval *tv1, struct timeval *tv2) ++{ ++ return (tv2->tv_sec - tv1->tv_sec) * 1000000 + ++ (tv2->tv_usec - tv1->tv_usec); ++} ++ ++ ++struct emif_perf { ++ int code; ++ const char *name; ++}; ++ ++static const struct emif_perf emif_perf_tab[] = { ++ { 0, "access" }, ++ { 1, "activate" }, ++ { 2, "read" }, ++ { 3, "write" }, ++ { 4, "fifo_cmd" }, ++ { 5, "fifo_write" }, ++ { 6, "fifo_read" }, ++ { 7, "fifo_ret" }, ++ { 8, "prio" }, ++ { 9, "cmd_pend" }, ++ { 10, "data" }, ++}; ++ ++static void *emif1, *emif2; ++static int BANDWIDTH=0; ++static int DELAY = 1; ++static int EMIF_PERF_CFG1 = 9; ++static int EMIF_PERF_CFG2 = 10; ++ ++ ++static int STATCOLL=0; ++static int TOTAL_TIME; ++static int INTERVAL_US; ++ ++struct timeval t1, t2; ++ ++FILE* outfile; ++struct emif_stats { ++ uint32_t cycles; ++ uint32_t cnt1; ++ uint32_t cnt2; ++}; ++ ++static struct emif_stats emif1_start, emif1_end; ++static struct emif_stats emif2_start, emif2_end; ++ ++static void *emif_init(int fd, unsigned base) ++{ ++ void *mem = ++ mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, base); ++ volatile uint32_t *emif = mem,temp; ++ ++ if (mem == MAP_FAILED){ ++ return NULL; ++ } ++ ++ emif[EMIF_PERF_CNT_CFG>>2] = EMIF_PERF_CFG2 << 16 | EMIF_PERF_CFG1; ++ ++ return mem; ++} ++ ++static void emif_read(volatile uint32_t *emif, struct emif_stats *st) ++{ ++ st->cycles = emif[EMIF_PERF_CNT_TIM>>2]; ++ st->cnt1 = emif[EMIF_PERF_CNT_1>>2]; ++ st->cnt2 = emif[EMIF_PERF_CNT_2>>2]; ++} ++ ++static void emif_print(const char *tag, struct emif_stats *st1, ++ struct emif_stats *st2) ++{ ++ uint32_t cycles = st2->cycles - st1->cycles; ++ uint32_t cnt1 = st2->cnt1 - st1->cnt1; ++ uint32_t cnt2 = st2->cnt2 - st1->cnt2; ++ printf("%s %s %2llu%% %s %2llu%%", tag, ++ emif_perf_tab[EMIF_PERF_CFG1].name, 100ull*cnt1/cycles, ++ emif_perf_tab[EMIF_PERF_CFG2].name, 100ull*cnt2/cycles); ++ fprintf(outfile,"%s%s= %2llu,%s%s= %2llu,", ++ tag, emif_perf_tab[EMIF_PERF_CFG1].name, 100ull*cnt1/cycles, ++ tag, emif_perf_tab[EMIF_PERF_CFG2].name, 100ull*cnt2/cycles); ++} ++ ++static int perf_init(void) ++{ ++ int fd = open("/dev/mem", O_RDWR); ++ int err = 0; ++ ++ if (fd == -1){ ++ printf("error fd=open() \n"); ++ return -1; ++ } ++ emif1 = emif_init(fd, EMIF1_BASE); ++ emif2 = emif_init(fd, EMIF2_BASE); ++ ++ if (!emif1 || !emif2){ ++ printf("error if (!emif1 || !emif2) \n"); ++ err = -1; ++ } ++ ++ close(fd); ++ return err; ++} ++ ++static void perf_start(void) ++{ ++ if (emif1) { ++ emif_read(emif1, &emif1_start); ++ emif_read(emif2, &emif2_start); ++ } ++} ++ ++static void perf_stop(void) ++{ ++ if (emif1) { ++ emif_read(emif1, &emif1_end); ++ emif_read(emif2, &emif2_end); ++ } ++} ++ ++static void perf_print(void) ++{ ++ if (emif1) { ++ emif_print("EMIF1", &emif1_start, &emif1_end); ++ printf("\t"); ++ emif_print("EMIF2", &emif2_start, &emif2_end); ++ printf("\r"); ++ fprintf(outfile, "\n"); ++ fflush(outfile); ++ fflush(stdout); ++ } ++} ++ ++static void perf_close(void) ++{ ++ if (emif1) munmap(emif1, PAGE_SIZE); ++ if (emif2) munmap(emif2, PAGE_SIZE); ++} ++ ++static int get_cfg(const char *name, int def) ++{ ++ char *end; ++ int n = strtol(name, &end, 0); ++ int i; ++ ++ if (!*end) ++ return n; ++ ++ for (i = 0; i < sizeof(emif_perf_tab)/sizeof(emif_perf_tab[0]); i++) ++ if (!strcmp(name, emif_perf_tab[i].name)) ++ return emif_perf_tab[i].code; ++ ++ return def; ++} ++ ++ ++unsigned int emif_freq() ++{ ++ volatile unsigned *tim1; ++ unsigned v1, v2; ++ int fd; ++ ++ /*calculation EMIF frequency ++ EMIF_PERF_CNT_TIM = \n32-bit counter that ++ continuously counts number for ++ EMIF_FCLK clock cycles elapsed ++ after EMIFis brought out of reset*/ ++ ++ fd = open("/dev/mem", O_RDONLY); ++ if (fd == -1) { ++ perror("/dev/mem"); ++ return 1; ++ } ++ ++ void *mem = ++ mem = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, EMIF1_BASE); ++ if (mem == MAP_FAILED) { ++ perror("mmap"); ++ exit(1); ++ } ++ ++ tim1 = (unsigned *)((char*)mem + EMIF_PERF_CNT_TIM); ++ ++ v1 = *tim1; ++ gettimeofday(&t1, NULL); ++ sleep(2); ++ v2 = *tim1; ++ gettimeofday(&t2, NULL); ++ ++ munmap(mem, PAGE_SIZE); ++ close(fd); ++ ++ return (v2 - v1) / tv_diff(&t1, &t2); ++ ++} ++ ++ ++char config_file_path[100]; ++char keylist[][50] = { ++ "DELAY", ++ "EMIF_PERF_CFG1", ++ "EMIF_PERF_CFG2", ++ "BANDWIDTH", ++ "STATCOLL", ++ "TOTAL_TIME", ++ "INTERVAL_US", ++ "INITIATORS", ++}; ++ ++char line[512], *p; ++char tokens[6][512]; ++int temp, flag = 0; ++char *keyvalue, *pair; ++char key[100]; ++int linecount=0; ++ ++ ++int debug=0; ++ ++void print_valid_options(void) ++{ ++ int i; ++ printf("Invalid key found\n"); ++ printf("Supported keys are :\n"); ++ for(i=0; i \n" ++ "## default : DELAY=1 EMIF_PERF_CFG1=9 EMIF_PERF_CFG2=10\n" ++ "## option : for EMIF_PERF_CFG1 and EMIF_PERF_CFG2\n" ++ "## 0 -> access,\n" ++ "## 1 -> activate,\n" ++ "## 2 -> read,\n" ++ "## 3 -> write,\n" ++ "## 4 -> fifo_cmd,\n" ++ "## 5 -> fifo_write,\n" ++ "## 6 -> fifo_read,\n" ++ "## 7 -> fifo_ret,\n" ++ "## 8 -> prio,\n" ++ "## 9 -> cmd_pend,\n" ++ "## 10 -> data \n##\n" ++ ++ "## EMIF frq : %d MHz\n\n", emif_freq() ); ++} ++ ++ ++int main(int argc, char **argv) ++{ ++ int option; ++ FILE *fp; ++ int i; ++ int xpos = 600, ypos = 40; ++ ++ ++ /* Read config file */ ++ /* Initialize this to turn off verbosity of getopt */ ++ opterr = 0; ++ ++// while ((option = getopt (argc, argv, "df:")) != -1) ++ while ((option = getopt (argc, argv, "dx:y:")) != -1) ++ { ++ switch(option) ++ { ++#if 0 ++ case 'f': ++ strcpy(config_file_path, optarg); ++ break; ++#endif ++ case 'd': ++ debug=1; ++ break; ++ case 'x': ++ xpos=atoi(optarg); ++ break; ++ case 'y': ++ ypos=atoi(optarg); ++ break; ++ ++ default: ++ printf("Invalid option.. Exiting\n"); ++ exit(0); ++ } ++ } ++ ++ printf("xpos = %d, ypos = %d\n", xpos, ypos); ++ ++ strcpy(config_file_path,"config.ini"); ++ fp = fopen(config_file_path, "r"); ++ if (fp == NULL) { ++ fprintf(stderr, "couldn't open the specified file\n"); ++ return -1; ++ } ++ ++ while (fgets(line, sizeof line, fp)) { ++ printd("Line is = %s", line); ++ ++ if (line[0] == '#' || line[0] == '\n') { ++ continue; ++ } ++ ++ memset(tokens, 0, sizeof(tokens)); ++ i = 0; ++ ++ pair = strtok (line," ,"); ++ while (pair != NULL) ++ { ++ printd ("\tPair is = %s\n",pair); ++ strcpy(tokens[i++], pair); ++ pair = strtok (NULL, " ,.-"); ++ } ++ ++ for(temp=0; temp< i; temp++) ++ { ++ printd("Line %d: %s\n", temp, tokens[temp]); ++ ++ keyvalue = strtok (tokens[temp]," ="); ++ while (keyvalue != NULL) ++ { ++ if(flag == 0) ++ { ++ if(validatekey(keyvalue)) ++ { ++ print_valid_options(); ++ exit(0); ++ } ++ strcpy(key, keyvalue); ++ printd ("\tKey is = %s\n",key); ++ flag++; ++ } ++ else ++ { ++ printd ("\tValue is = %s",keyvalue); ++ printd (" (%d)\n", atoi(keyvalue)); ++ add_key_value(key, atoi(keyvalue)); ++ flag = 0; ++ } ++ keyvalue = strtok (NULL, " ="); ++ } ++ } ++ ++ ++ ++ linecount++; ++ printd("%s", "------------------- \n"); ++ ++ } ++ ++ fclose(fp); ++ ++ printf("\n\nCOMPLETED: Parsing of the user specified parameters.. \n \ ++ \nConfiguring device now.. \n\n"); ++ if(BANDWIDTH == 1) { ++ bandwidth_usage(); ++ if (DELAY <= 0) ++ DELAY = 1; ++ ++ if (perf_init()){ ++ printf("perf_init return non zero \n"); ++ return 1; ++ } ++ ++ outfile = fopen("emif-performance.csv", "w+"); ++ if (!outfile) { ++ printf("\n Error opening file"); ++ } ++ for (;;) { ++ perf_start(); ++ sleep(DELAY); ++ perf_stop(); ++ perf_print(); ++ } ++ ++ fclose(outfile); ++ perf_close(); ++ return 0; ++ } ++ ++ if(STATCOLL == 1) { ++ printf("STATISTICS COLLECTOR option chosen\n"); ++ printf("------------------------------------------------\n\n"); ++ fp = fopen("initiators.cfg", "r"); ++ if (fp == NULL) { ++ fprintf(stderr, "couldn't open the specified file initiators.cfg'\n"); ++ return -1; ++ } ++ ++ int i=0; ++ char list[100][50]; ++ memset(list, sizeof(list), 0); ++ while (fgets(line, sizeof line, fp)) { ++ printf("Line is = %s", line); ++ /* Slightly strange way to chop off the \n character */ ++ strtok(line, "\n"); ++ strcpy(list[i++], line); ++ } ++ fclose(fp); ++ ++ statcoll_start(TOTAL_TIME, INTERVAL_US, list, xpos, ypos); ++ } ++ ++} ++ +diff --git a/clients/soc_performance_monitor.c b/clients/soc_performance_monitor.c +new file mode 100644 +index 0000000..5d1db32 +--- /dev/null ++++ b/clients/soc_performance_monitor.c +@@ -0,0 +1,630 @@ ++/* ++ * Copyright (C) 2016 Texas Instruments ++ * Author: Karthik Ramanan ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see . ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "time_bar_graph.h" ++ ++#include "soc_performance_monitor.h" ++ ++static int debug=0; ++ ++static char readfifo[100]; ++static int MAX_WIDTH=1920; ++static int MAX_HEIGHT=1080; ++static int x_pos=0; ++static int y_pos=40; ++ ++void *ctx; ++struct time_graph_create_params tg_p; ++struct bar_graph_create_params bg_p; ++ ++static int cpu_load_offset = 0; ++static int total_cpu_load_items = 0; ++static int total_elements = 0; ++ ++struct _bar_graph_y_config *y_cfg; ++struct _text_config *t_cfg; ++char *tg_text[100]; ++char *bg_text[100]; ++ ++ ++int command_handler(int command, double *y, char **text) ++{ ++ static int fd; ++ char buf[MAX_BUF]; ++ int i, bytes, offset; ++ ++ switch(command) ++ { ++ case OPEN: ++ fd = open(readfifo, O_RDONLY|O_NONBLOCK); ++ break; ++ ++ case READ: ++ ++ /* open, read, and display the message from the FIFO */ ++ bytes=read(fd, buf, MAX_BUF); ++ buf[bytes]='\0'; ++ if(bytes > 0) ++ { ++ char command[100]; ++ char string[100]; ++ sscanf(buf, "%s %s", command, string); ++ printd("Received %s\n", buf); ++ if(strcmp(command, "TABLE:") == 0) ++ { ++ char field[100], value[100], unit[100]; ++ sscanf(buf, "%s %s %s %s", command, field, value, unit); ++ for(i=0; iBL_START_X; ++ const int BL_START_Y = table_config->BL_START_Y; ++ const int BAR_GAP = table_config->BAR_GAP; ++ const int BAR_HEIGHT = table_config->BAR_HEIGHT; ++ const int BAR_WIDTH = table_config->BAR_WIDTH; ++ const int TR_START_X = table_config->TR_START_X; ++ const int TR_START_Y = table_config->TR_START_Y; ++ const int FONT_SIZE = table_config->FONT_SIZE; ++ printf("Filling from %d to %d\n", start_offset, end_offset); ++ cpu_load_offset = start_offset; ++ ++ for(i=start_offset; i< end_offset-1; i++) { ++ y_cfg[i*2].region.bottom_left.x = BL_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); ++ y_cfg[i*2].region.bottom_left.y = BL_START_Y; ++ y_cfg[i*2].region.top_right.x = TR_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); ++ y_cfg[i*2].region.top_right.y = TR_START_Y; ++ y_cfg[i*2].line_color.r = 1.0; ++ y_cfg[i*2].line_color.g = 1.0; ++ y_cfg[i*2].line_color.b = 1.0; ++ y_cfg[i*2].line_color.a = 1.0; ++ y_cfg[i*2].fill_color.r = 0.0; ++ y_cfg[i*2].fill_color.g = 0.0; ++ y_cfg[i*2].fill_color.b = 1.0; ++ y_cfg[i*2].fill_color.a = 0.7; ++ ++ y_cfg[i*2+1].region.bottom_left.x = BL_START_X +(i-start_offset) * (BAR_GAP + BAR_WIDTH); ++ y_cfg[i*2+1].region.bottom_left.y = BL_START_Y; ++ y_cfg[i*2+1].region.top_right.x = TR_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); ++ y_cfg[i*2+1].region.top_right.y = TR_START_Y; ++ y_cfg[i*2+1].line_color.r = 1.0; ++ y_cfg[i*2+1].line_color.g = 1.0; ++ y_cfg[i*2+1].line_color.b = 1.0; ++ y_cfg[i*2+1].line_color.a = 1.0; ++ y_cfg[i*2+1].fill_color.r = 1.0; ++ y_cfg[i*2+1].fill_color.g = 0.0; ++ y_cfg[i*2+1].fill_color.b = 0.0; ++ y_cfg[i*2+1].fill_color.a = 1.0; ++ ++ ++ t_cfg[i*2].color.r = 1.0; ++ t_cfg[i*2].color.g = 1.0; ++ t_cfg[i*2].color.b = 1.0; ++ t_cfg[i*2].color.a = 1.0; ++ t_cfg[i*2].at.x = BL_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); ++ t_cfg[i*2].at.y = BL_START_Y + FONT_SIZE; ++ t_cfg[i*2].fontsize = FONT_SIZE; ++ ++ t_cfg[i*2+1].color.r = 1.0; ++ t_cfg[i*2+1].color.g = 1.0; ++ t_cfg[i*2+1].color.b = 1.0; ++ t_cfg[i*2+1].color.a = 1.0; ++ t_cfg[i*2+1].at.x = BL_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); ++ t_cfg[i*2+1].at.y = BL_START_Y - BAR_HEIGHT - FONT_SIZE; ++ t_cfg[i*2+1].fontsize = FONT_SIZE; ++ ++ strcpy(bg_text[i*2], output[i - start_offset]); ++ strcpy(bg_text[i*2+1], "0%"); ++ } ++ ++ t_cfg[(end_offset-1)*2].color.r = 0.0; ++ t_cfg[(end_offset-1)*2].color.g = 1.0; ++ t_cfg[(end_offset-1)*2].color.b = 1.0; ++ t_cfg[(end_offset-1)*2].color.a = 1.0; ++ t_cfg[(end_offset-1)*2].at.x = BL_START_X + 80; ++ t_cfg[(end_offset-1)*2].at.y = TR_START_Y - 40; ++ t_cfg[(end_offset-1)*2].fontsize = FONT_SIZE + 3; ++ ++ printd("Copying title string %s\n", output[end_offset - start_offset -1]); ++ strcpy(bg_text[(end_offset-1)*2], output[end_offset - start_offset-1]); ++} ++ ++void fill_table_details(int start_offset, int end_offset, char **output, struct table_configuration *table_config) ++{ ++ int i; ++ ++ const int BL_START_X = table_config->BL_START_X; ++ const int BL_START_Y = table_config->BL_START_Y; ++ const int BAR_GAP = table_config->BAR_GAP; ++ const int BAR_HEIGHT = table_config->BAR_HEIGHT; ++ const int BAR_WIDTH = table_config->BAR_WIDTH; ++ const int TR_START_X = table_config->TR_START_X; ++ const int TR_START_Y = table_config->TR_START_Y; ++ const int FONT_SIZE = table_config->FONT_SIZE; ++ printf("Filling from %d to %d\n", start_offset, end_offset); ++ ++ ++ char tokenize[200]; ++ char tokens[10][100]; ++ char *pair, *key, *value; ++ int k=0; ++ char title[100], unit[100]; ++ ++ strcpy(tokenize, output[end_offset - start_offset - 1]); ++ memset(tokens, 0, sizeof(tokens)); ++ ++ k=0; ++ pair = strtok (tokenize,","); ++ while (pair != NULL) { ++ strcpy(tokens[k++], pair); ++ pair = strtok (NULL, ","); ++ } ++ ++ i=0; ++ memset(title, 0, sizeof(title)); ++ memset(unit, 0, sizeof(unit)); ++ while(i < k) { ++ key=strtok(tokens[i], "="); ++ if(key != NULL) { ++ if(strcmp(key,"TITLE") == 0) { ++ value = strtok(NULL, "="); ++ if(value != NULL) { ++ strcpy(title, value); ++ } ++ } ++ if(strcmp(key,"UNIT") == 0) { ++ value = strtok(NULL, "="); ++ if(value != NULL) { ++ strcpy(unit, value); ++ } ++ } ++ } ++ i++; ++ } ++ ++ for(i=start_offset; i< end_offset-1; i++) { ++ y_cfg[i*2].region.bottom_left.x = BL_START_X; ++ y_cfg[i*2].region.bottom_left.y = BL_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT); ++ y_cfg[i*2].region.top_right.x = TR_START_X; ++ y_cfg[i*2].region.top_right.y = TR_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT); ++ y_cfg[i*2].line_color.r = 1.0; ++ y_cfg[i*2].line_color.g = 1.0; ++ y_cfg[i*2].line_color.b = 1.0; ++ y_cfg[i*2].line_color.a = 1.0; ++ y_cfg[i*2].fill_color.r = 0.0; ++ y_cfg[i*2].fill_color.g = 0.3; ++ y_cfg[i*2].fill_color.b = 0.0; ++ y_cfg[i*2].fill_color.a = 0.7; ++ ++ y_cfg[i*2+1].region.bottom_left.x = TR_START_X; ++ y_cfg[i*2+1].region.bottom_left.y = BL_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT); ++ y_cfg[i*2+1].region.top_right.x = TR_START_X + (BAR_WIDTH); //+ 1 * BL_START_X; ++ y_cfg[i*2+1].region.top_right.y = TR_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT);; ++ y_cfg[i*2+1].line_color.r = 1.0; ++ y_cfg[i*2+1].line_color.g = 1.0; ++ y_cfg[i*2+1].line_color.b = 1.0; ++ y_cfg[i*2+1].line_color.a = 1.0; ++ y_cfg[i*2+1].fill_color.r = 0.3; ++ y_cfg[i*2+1].fill_color.g = 0.0; ++ y_cfg[i*2+1].fill_color.b = 0.0; ++ y_cfg[i*2+1].fill_color.a = 0.7; ++ ++ ++ t_cfg[i*2].color.r = 1.0; ++ t_cfg[i*2].color.g = 1.0; ++ t_cfg[i*2].color.b = 1.0; ++ t_cfg[i*2].color.a = 1.0; ++ t_cfg[i*2].at.x = BL_START_X + 5; ++ t_cfg[i*2].at.y = BL_START_Y + (i - start_offset) * (BAR_GAP+BAR_HEIGHT) -5; ++ t_cfg[i*2].fontsize = FONT_SIZE; ++ ++ t_cfg[i*2+1].color.r = 1.0; ++ t_cfg[i*2+1].color.g = 1.0; ++ t_cfg[i*2+1].color.b = 1.0; ++ t_cfg[i*2+1].color.a = 1.0; ++ t_cfg[i*2+1].at.x = TR_START_X + 50;//BAR_WIDTH + TR_START_X; ++ t_cfg[i*2+1].at.y = BL_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT) -5; ++ t_cfg[i*2+1].fontsize = FONT_SIZE; ++ ++ printd("Copying string %s at %d\n", output[i-start_offset], i); ++ strcpy(bg_text[i*2], output[i-start_offset]); ++ printd("Setting text 0 %s at %d\n", unit, i*2+1); ++ sprintf(bg_text[i*2+1], "0 %s", unit); ++ } ++ for(i=start_offset; i< end_offset*2; i++) { ++ printd("%d - (%d, %d) to (%d, %d)\n", i, y_cfg[i].region.bottom_left.x, y_cfg[i].region.bottom_left.y, y_cfg[i].region.top_right.x, y_cfg[i].region.top_right.y); ++ } ++ ++ t_cfg[(end_offset-1)*2].color.r = 0.0; ++ t_cfg[(end_offset-1)*2].color.g = 1.0; ++ t_cfg[(end_offset-1)*2].color.b = 1.0; ++ t_cfg[(end_offset-1)*2].color.a = 1.0; ++ t_cfg[(end_offset-1)*2].at.x = BL_START_X + 80; ++ t_cfg[(end_offset-1)*2].at.y = BL_START_Y - 40; ++ t_cfg[(end_offset-1)*2].fontsize = FONT_SIZE + 3; ++ ++ printd("Copying title string %s\n", title); ++ strcpy(bg_text[(end_offset-1)*2], title); ++ ++} ++ ++ ++int get_key_value_from_string(char *string, char *limiter, char *key, char *value) ++{ ++ char *mykey, *myvalue; ++ ++ mykey=strtok(string, limiter); ++ if(mykey != NULL) { ++ myvalue = strtok(NULL, "="); ++ strtok(myvalue, "\n"); ++ if(myvalue == NULL) { ++ return -1; ++ } ++ } ++ else { ++ return -1; ++ } ++ printd("Key is %s\n", mykey); ++ printd("Value is %s\n", myvalue); ++ strcpy(key, mykey); ++ strcpy(value, myvalue); ++ return 0; ++ ++} ++ ++void populate_table_configuration(struct table_configuration *tbl_cfg, int cur_items, char **item_list) ++{ ++ static int total_items = 0; ++ static int total_tables = 0; ++ ++ tbl_cfg->BAR_HEIGHT = 25; ++ tbl_cfg->BAR_WIDTH = 150; ++ tbl_cfg->BL_START_X = 40; ++ tbl_cfg->BL_START_Y = 80 + (total_items + total_tables) * tbl_cfg->BAR_HEIGHT; ++ tbl_cfg->BAR_GAP = 0; ++ tbl_cfg->TR_START_X = tbl_cfg->BL_START_X + tbl_cfg->BAR_WIDTH; ++ tbl_cfg->TR_START_Y = tbl_cfg->BL_START_Y - tbl_cfg->BAR_HEIGHT; ++ tbl_cfg->FONT_SIZE = 15; ++ ++ printf("Proceeding with filling out details...\n"); ++ if(cur_items > 0) ++ fill_table_details(total_items, total_items+cur_items, item_list, tbl_cfg); ++ ++ total_items += cur_items; ++ if(cur_items > 0) ++ total_tables++; ++ ++ printf("total_items = %d, total_tables = %d\n", total_items, total_tables); ++ return; ++} ++ ++int fill_list_from_section(char **section_list, char *section_name) ++{ ++ int total_items, j; ++ ++ for(j=0; j<20; j++) { ++ section_list[j] = malloc(100); ++ } ++ ++ total_items = get_strings_in_section(section_name, section_list); ++ printf("\tThe total values in the section %s are %d\n", section_name, total_items); ++ for(j=0; j 0) { ++ fill_cpu_load_details(total_boot_items+total_temperature_items+total_voltage_items+total_frequency_items, total_boot_items+total_temperature_items+total_voltage_items+total_frequency_items+total_cpu_load_items, cpu_load_list, &cpu_load_config); ++ } ++ else { ++ cpu_load_offset = total_boot_items + total_temperature_items + total_voltage_items + total_frequency_items; ++ } ++ ++ tg_p.title=(char *)malloc(100); ++ sprintf(tg_p.title, "CPU Usage[@position-req=%dx%d]", x_pos, y_pos); ++ tg_p.height = MAX_HEIGHT; ++ tg_p.width = MAX_WIDTH; ++ ++ struct _y_config *tg_y_cfg = malloc(tg_p.num_of_y_items * sizeof(struct _y_config)); ++ tg_p.y_config_array = tg_y_cfg; ++ tg_p.text_config_array = t_cfg; ++ ++ printf("Proceeding to create starting visualization...\n"); ++ ctx = time_graph_create(argc, argv, &tg_p); ++ if (!ctx) { ++ printf("Unable to create time_graph... \n"); ++ exit(0); ++ } ++ ++ ctx = bar_graph_create(argc, argv, &bg_p); ++ if (!ctx) { ++ printf("Error creating context\n"); ++ exit(0); ++ } ++ ++ command_handler(OPEN, NULL, NULL); ++ ++ /* Plot the graph first time */ ++ time_graph_plot(ctx, tg_y, (const char **)tg_text); ++ bar_graph_plot(ctx, bg_y, (const char **)bg_text); ++ ++ while (!sigtermed) ++ { ++ usleep(refresh_rate); ++ int bytes_read = command_handler(READ, bg_y, bg_text); ++ if(bytes_read > 0) { ++ time_graph_plot(ctx, tg_y, (const char **)tg_text); ++ bar_graph_plot(ctx, bg_y, (const char **)bg_text); ++ } ++ } ++ ++ bar_graph_destroy(ctx); ++ command_handler(CLOSE, NULL, NULL); ++ return 0; ++} +diff --git a/clients/soc_performance_monitor.h b/clients/soc_performance_monitor.h +new file mode 100644 +index 0000000..861c8c7 +--- /dev/null ++++ b/clients/soc_performance_monitor.h +@@ -0,0 +1,40 @@ ++#define __SLEEP usleep(1000000) ++ ++#define MAX_BUF 1024 ++#define OPEN 1 ++#define READ 2 ++#define CLOSE 3 ++ ++#define MAX_COLORS 12 ++ ++#define printd(fmt, ...) \ ++ do { if (debug) fprintf(stderr, fmt, __VA_ARGS__); } while (0) ++ ++ ++struct _rgba pallette[MAX_COLORS] = ++{ ++ { 1.0, 0.0, 0.0, 1.0 }, ++ { 0.0, 0.5, 0.0, 1.0 }, ++ { 0.0, 0.0, 1.0, 1.0 }, ++ { 0.0, 0.0, 0.0, 1.0 }, ++ { 0.0, 0.5, 1.0, 1.0 }, ++ { 1.0, 0.0, 1.0, 1.0 }, ++ { 0.5, 0.5, 1.0, 1.0 }, ++ { 1.0, 0.5, 0.0, 1.0 }, ++ { 0.5, 0.5, 0.25, 1.0 }, ++ { 0.5, 0.0, 0.0, 1.0 }, ++ { 1.0, 0.5, 0.5, 1.0 }, ++ { 0.0, 0.0, 0.20, 1.0 } ++}; ++ ++struct table_configuration { ++ int BL_START_X; ++ int BL_START_Y; ++ int BAR_GAP; ++ int BAR_HEIGHT; ++ int BAR_WIDTH; ++ int TR_START_X; ++ int TR_START_Y; ++ int FONT_SIZE; ++}; ++ +diff --git a/clients/statcoll.c b/clients/statcoll.c +new file mode 100644 +index 0000000..5d5cae7 +--- /dev/null ++++ b/clients/statcoll.c +@@ -0,0 +1,1433 @@ ++/* ++ * Copyright (C) 2015 Texas Instruments ++ * created by prash@ti.com on 16 Jan 2013 ++ * Adapted to Linux with changes in framework: Karthik R ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program. If not, see . ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "statcoll.h" ++#include "statcoll_gui.h" ++#include "time_bar_graph.h" ++ ++#define ENABLE_MODE 0x0 ++#define READ_STATUS_MODE 0x1 ++ ++ ++ ++#define OPEN 1 ++#define READ 2 ++#define CLOSE 3 ++ ++ ++#if 1 ++#define __SLEEP sleep(1) ++#else ++#define __SLEEP usleep(100000) ++#endif ++//#define DUMMY_MODE ++ ++#define MAX_COLORS 12 ++ ++struct _rgba pallette[MAX_COLORS] = ++{ ++ { 1.0, 0.0, 0.0, 1.0 }, ++ { 0.0, 0.5, 0.0, 1.0 }, ++ { 0.0, 0.0, 1.0, 1.0 }, ++ { 0.0, 0.0, 0.0, 1.0 }, ++ { 0.0, 0.5, 1.0, 1.0 }, ++ { 1.0, 0.0, 1.0, 1.0 }, ++ { 0.5, 0.5, 1.0, 1.0 }, ++ { 1.0, 0.5, 0.0, 1.0 }, ++ { 0.5, 0.5, 0.25, 1.0 }, ++ { 0.5, 0.0, 0.0, 1.0 }, ++ { 1.0, 0.5, 0.5, 1.0 }, ++ { 0.0, 0.0, 0.20, 1.0 } ++}; ++ ++const struct list_of_initiators initiators[STATCOL_MAX] = ++{ ++ { STATCOL_EMIF1_SYS, "STATCOL_EMIF1_SYS" }, ++ { STATCOL_EMIF2_SYS,"STATCOL_EMIF2_SYS" }, ++ { STATCOL_MA_MPU_P1,"STATCOL_MPU_P1" }, ++ { STATCOL_MA_MPU_P2,"STATCOL_MPU_P2" }, ++ { STATCOL_MPU1,"STATCOL_MPU1" }, ++ { STATCOL_MMU1,"STATCOL_MMU1" }, ++ { STATCOL_TPTC_RD1,"STATCOL_TPTC_RD1" }, ++ { STATCOL_TPTC_WR1,"STATCOL_TPTC_WR1" }, ++ { STATCOL_TPTC_RD2,"STATCOL_TPTC_RD2" }, ++ { STATCOL_TPTC_WR2,"STATCOL_TPTC_WR2" }, ++ { STATCOL_VIP1_P1,"STATCOL_VIP1_P1" }, ++ { STATCOL_VIP1_P2,"STATCOL_VIP1_P2" }, ++ { STATCOL_VIP2_P1,"STATCOL_VIP2_P1" }, ++ { STATCOL_VIP2_P2,"STATCOL_VIP2_P2" }, ++ { STATCOL_VIP3_P1,"STATCOL_VIP3_P1" }, ++ { STATCOL_VIP3_P2,"STATCOL_VIP3_P2" }, ++ { STATCOL_VPE_P1,"STATCOL_VPE_P1" }, ++ { STATCOL_VPE_P2,"STATCOL_VPE_P2" }, ++ { STATCOL_EVE1_TC0,"STATCOL_EVE1_TC0" }, ++ { STATCOL_EVE1_TC1,"STATCOL_EVE1_TC1" }, ++ { STATCOL_EVE2_TC0,"STATCOL_EVE2_TC0" }, ++ { STATCOL_EVE2_TC1,"STATCOL_EVE2_TC1" }, ++ { STATCOL_EVE3_TC0,"STATCOL_EVE3_TC0" }, ++ { STATCOL_EVE3_TC1,"STATCOL_EVE3_TC1" }, ++ { STATCOL_EVE4_TC0,"STATCOL_EVE4_TC0" }, ++ { STATCOL_EVE4_TC1,"STATCOL_EVE4_TC1" }, ++ { STATCOL_DSP1_MDMA,"STATCOL_DSP1_MDMA" }, ++ { STATCOL_DSP1_EDMA,"STATCOL_DSP1_EDMA" }, ++ { STATCOL_DSP2_MDMA,"STATCOL_DSP2_MDMA" }, ++ { STATCOL_DSP2_EDMA,"STATCOL_DSP2_EDMA" }, ++ { STATCOL_IVA,"STATCOL_IVA" }, ++ { STATCOL_GPU_P1,"STATCOL_GPU_P1" }, ++ { STATCOL_GPU_P2,"STATCOL_GPU_P2" }, ++ { STATCOL_BB2D_P1,"STATCOL_BB2D_P1" }, ++ { STATCOL_DSS,"STATCOL_DSS" }, ++ { STATCOL_CSI2_2,"STATCOL_CSI2_2" }, ++ { STATCOL_MMU2,"STATCOL_MMU2" }, ++ { STATCOL_IPU1,"STATCOL_IPU1" }, ++ { STATCOL_IPU2,"STATCOL_IPU2" }, ++ { STATCOL_DMA_SYSTEM_RD,"STATCOL_DMA_SYSTEM_RD" }, ++ { STATCOL_DMA_SYSTEM_WR,"STATCOL_DMA_SYSTEM_WR" }, ++ { STATCOL_CSI2_1,"STATCOL_CSI2_1" }, ++ { STATCOL_USB3_SS,"STATCOL_USB3_SS" }, ++ { STATCOL_USB2_SS,"STATCOL_USB2_SS" }, ++ { STATCOL_USB2_ULPI_SS1,"STATCOL_USB2_ULPI_SS1" }, ++ { STATCOL_USB2_ULPI_SS2,"STATCOL_USB2_ULPI_SS2" }, ++ { STATCOL_PCIE_SS1,"STATCOL_PCIE_SS1" }, ++ { STATCOL_PCIE_SS2,"STATCOL_PCIE_SS2" }, ++ { STATCOL_DSP1_CFG,"STATCOL_DSP1_CFG" }, ++ { STATCOL_DSP2_CFG,"STATCOL_DSP2_CFG" }, ++ { STATCOL_GMAC_SW,"STATCOL_GMAC_SW" }, ++ { STATCOL_PRUSS1_P1,"STATCOL_PRUSS1_P1" }, ++ { STATCOL_PRUSS1_P2,"STATCOL_PRUSS1_P2" }, ++ { STATCOL_PRUSS2_P1,"STATCOL_PRUSS2_P1" }, ++ { STATCOL_PRUSS2_P2,"STATCOL_PRUSS2_P2" }, ++ { STATCOL_DMA_CRYPTO_RD,"STATCOL_DMA_CRYPTO_RD" }, ++ { STATCOL_DMA_CRYPTO_WR,"STATCOL_DMA_CRYPTO_WR" }, ++ { STATCOL_MPU2,"STATCOL_MPU2" }, ++ { STATCOL_MMC1,"STATCOL_MMC1" }, ++ { STATCOL_MMC2,"STATCOL_MMC2" }, ++ { STATCOL_SATA,"STATCOL_SATA" }, ++ { STATCOL_MLBSS,"STATCOL_MLBSS" }, ++ { STATCOL_BB2D_P2,"STATCOL_BB2D_P2" }, ++ { STATCOL_IEEE1500,"STATCOL_IEEE1500" }, ++ { STATCOL_DBG,"STATCOL_DBG" }, ++ { STATCOL_VCP1,"STATCOL_VCP1" }, ++ { STATCOL_OCMC_RAM1,"STATCOL_OCMC_RAM1" }, ++ { STATCOL_OCMC_RAM2,"STATCOL_OCMC_RAM2" }, ++ { STATCOL_OCMC_RAM3,"STATCOL_OCMC_RAM3" }, ++ { STATCOL_GPMC,"STATCOL_GPMC" }, ++ { STATCOL_MCASP1,"STATCOL_MCASP1" }, ++ { STATCOL_MCASP2,"STATCOL_MCASP2" }, ++ { STATCOL_MCASP3,"STATCOL_MCASP3" }, ++ { STATCOL_VCP2, "STATCOL_VCP2" } ++}; ++ ++StatCollectorObj gStatColState; ++ ++static void *statcoll_base_mem; ++static int *l3_3_clkctrl; ++ ++static UInt32 *statCountDSS = NULL; ++static UInt32 *statCountIVA = NULL; ++static UInt32 *statCountBB2DP1 = NULL; ++static UInt32 *statCountBB2DP2 = NULL; ++static UInt32 *statCountUSB4 = NULL; ++static UInt32 *statCountSata = NULL; ++static UInt32 *statCountEmif1 = NULL; ++static UInt32 *statCountEmif2 = NULL; ++ ++ ++static statcoll_initiators_object global_object[STATCOL_MAX]; ++UInt32 statCountIdx = 0; ++UInt32 TRACE_SZ = 0; ++ ++void create_overall_box(struct _bar_graph_y_config *y_cfg, struct _text_config *t_cfg, char *text[]) ++{ ++ int i=0; ++ ++ memset(y_cfg, 0x0, sizeof(struct _y_config)*25); ++ memset(t_cfg, 0x0, sizeof(struct _text_config)*25); ++ ++ ++ for(i=0; iline_color.r = 1.0; ++ (y_cfg+i)->line_color.g = 1.0; ++ (y_cfg+i)->line_color.b = 1.0; ++ (y_cfg+i)->line_color.a = 0.7; ++ (y_cfg+i)->fill_color.r = 0.0; ++ (y_cfg+i)->fill_color.g = 0.0; ++ (y_cfg+i)->fill_color.b = 0.0; ++ (y_cfg+i)->fill_color.a = 0.1; ++ } ++ ++ (y_cfg+0)->region.bottom_left.x = 0; ++ (y_cfg+0)->region.bottom_left.y = MAX_HEIGHT - HEIGHT_EMIF_AREA; ++ (y_cfg+0)->region.top_right.x = MAX_WIDTH; ++ (y_cfg+0)->region.top_right.y = 0; ++ ++ (t_cfg+0)->at.x = MAX_WIDTH/2 - 8*FONT_SIZE - 50; ++ (t_cfg+0)->at.y = BORDER - FONT_SIZE + 6; ++ strcpy(text[0], string_list[0]); ++ ++ (y_cfg+1)->region.bottom_left.x = TIME_GRAPH_AREA_BL_X; ++ (y_cfg+1)->region.bottom_left.y = TIME_GRAPH_AREA_BL_Y; ++ (y_cfg+1)->region.top_right.x = TIME_GRAPH_AREA_TR_X; ++ (y_cfg+1)->region.top_right.y = TIME_GRAPH_AREA_TR_Y; ++ ++ (t_cfg+1)->at.x = TIME_GRAPH_AREA_BL_X - 2*FONT_SIZE; ++ (t_cfg+1)->at.y = TIME_GRAPH_AREA_TR_Y; ++ strcpy(text[1],string_list[1]); ++ ++ for(i=2; i<7; i++) ++ { ++ (y_cfg+i)->region.bottom_left.x = TIME_GRAPH_AREA_BL_X; ++ (y_cfg+i)->region.bottom_left.y = TIME_GRAPH_AREA_BL_Y;// - (i-2) * (30); ++ (y_cfg+i)->region.top_right.x = TIME_GRAPH_AREA_TR_X; ++ (y_cfg+i)->region.top_right.y = TIME_GRAPH_AREA_TR_Y + (i-1) * ((TIME_GRAPH_AREA_BL_Y - TIME_GRAPH_AREA_TR_Y)/5); ++ (t_cfg+i)->at.x = TIME_GRAPH_AREA_BL_X - 2*FONT_SIZE; ++ (t_cfg+i)->at.y = TIME_GRAPH_AREA_TR_Y + (i-1) * ((TIME_GRAPH_AREA_BL_Y - TIME_GRAPH_AREA_TR_Y)/5);//TIME_GRAPH_AREA_TR_Y; ++ strcpy(text[i],string_list[i]); ++ } ++ ++#if 1 ++ (y_cfg+7)->region.bottom_left.x = EMIF_AREA_BL_X; ++ (y_cfg+7)->region.bottom_left.y = EMIF_AREA_BL_Y; ++ (y_cfg+7)->region.top_right.x = EMIF_AREA_TR_X; ++ (y_cfg+7)->region.top_right.y = EMIF_AREA_TR_Y; ++ ++ (t_cfg+7)->at.x = WIDTH_EMIF_AREA/2 - 2*FONT_SIZE; ++ (t_cfg+7)->at.y = EMIF_AREA_TR_Y + FONT_SIZE; ++ strcpy(text[7],string_list[7]); ++ ++ for(i=8; i<12; i=i+2) ++ { ++ (y_cfg+i)->region.bottom_left.x = EMIF_AREA_BL_X + BORDER + (i-8)*(BAR_WIDTH+BAR_GAP)/2; ++ (y_cfg+i)->region.bottom_left.y = EMIF_AREA_BL_Y - BORDER/2;// - (i-2) * (30); ++ (y_cfg+i)->region.top_right.x = EMIF_AREA_BL_X + BORDER + BAR_WIDTH + (i-8) * (BAR_WIDTH + BAR_GAP)/2; ++ (y_cfg+i)->region.top_right.y = EMIF_AREA_TR_Y + BORDER * 1.2; ++ ++ (y_cfg+i)->fill_color.r = 1.0; ++ (y_cfg+i)->fill_color.g = 0.0; ++ (y_cfg+i)->fill_color.b = 0.0; ++ (y_cfg+i)->fill_color.a = 0.1; ++ ++ (y_cfg+i+1)->region.bottom_left.x = EMIF_AREA_BL_X + BORDER + (i-8) * (BAR_WIDTH + BAR_GAP)/2; ++ (y_cfg+i+1)->region.bottom_left.y = EMIF_AREA_BL_Y - BORDER/2; ++ (y_cfg+i+1)->region.top_right.x = EMIF_AREA_BL_X + BORDER + BAR_WIDTH + (i-8) * (BAR_WIDTH + BAR_GAP)/2; ++ (y_cfg+i+1)->region.top_right.y = EMIF_AREA_TR_Y + BORDER*1.2; ++ ++ (y_cfg+i+1)->fill_color.r = 0.0; ++ (y_cfg+i+1)->fill_color.g = 1.0; ++ (y_cfg+i+1)->fill_color.b = 0.0; ++ (y_cfg+i+1)->fill_color.a = 1.0; ++ ++ (t_cfg+i)->at.x = EMIF_AREA_BL_X + BAR_WIDTH + BORDER + (i-8) * (BAR_WIDTH + BAR_GAP)/2- 2.2*FONT_SIZE; ++ (t_cfg+i)->at.y = EMIF_AREA_TR_Y + BORDER*1.2 -5; ++ ++ /* Fixed strings */ ++ (t_cfg+i+1)->at.x = EMIF_AREA_BL_X + BORDER + (i-8) * (BAR_WIDTH + BAR_GAP)/2; ++ (t_cfg+i+1)->at.y = EMIF_AREA_BL_Y;// - BORDER + FONT_SIZE; ++ ++ strcpy(text[i],string_list[i]); ++ strcpy(text[i+1],string_list[i+1]); ++ } ++ ++ (y_cfg+12)->region.bottom_left.x = INITIATORS_AREA_BL_X; ++ (y_cfg+12)->region.bottom_left.y = INITIATORS_AREA_BL_Y; ++ (y_cfg+12)->region.top_right.x = INITIATORS_AREA_TR_X; ++ (y_cfg+12)->region.top_right.y = INITIATORS_AREA_TR_Y; ++ ++ (t_cfg+12)->at.x = EMIF_AREA_TR_X + (INITIATORS_AREA_TR_X - INITIATORS_AREA_BL_X)/2 - 4 * FONT_SIZE; ++ (t_cfg+12)->at.y = INITIATORS_AREA_TR_Y + FONT_SIZE; ++ strcpy(text[12],string_list[12]); ++ ++ for(i=13; i<25; i=i+2) ++ { ++ (y_cfg+i)->region.bottom_left.x = INITIATORS_AREA_BL_X + BORDER + (i-13)*(BAR_WIDTH+BAR_GAP)/2; ++ (y_cfg+i)->region.bottom_left.y = INITIATORS_AREA_BL_Y - BORDER/2;// - (i-2) * (30); ++ (y_cfg+i)->region.top_right.x = INITIATORS_AREA_BL_X + BORDER + BAR_WIDTH + (i-13) * (BAR_WIDTH + BAR_GAP)/2; ++ (y_cfg+i)->region.top_right.y = INITIATORS_AREA_TR_Y + BORDER*1.2; ++ ++ (y_cfg+i)->fill_color.r = 1.0; ++ (y_cfg+i)->fill_color.g = 0.0; ++ (y_cfg+i)->fill_color.b = 0.0; ++ (y_cfg+i)->fill_color.a = 0.1; ++ ++ (y_cfg+i+1)->region.bottom_left.x = INITIATORS_AREA_BL_X + BORDER + (i-13) * (BAR_WIDTH + BAR_GAP)/2; ++ (y_cfg+i+1)->region.bottom_left.y = INITIATORS_AREA_BL_Y - BORDER/2;// - (i-2) * (30); ++ (y_cfg+i+1)->region.top_right.x = INITIATORS_AREA_BL_X + BORDER + BAR_WIDTH + (i-13) * (BAR_WIDTH + BAR_GAP)/2; ++ (y_cfg+i+1)->region.top_right.y = INITIATORS_AREA_TR_Y + BORDER* 1.2; ++ ++ (y_cfg+i+1)->fill_color.r = 0.0; ++ (y_cfg+i+1)->fill_color.g = 1.0; ++ (y_cfg+i+1)->fill_color.b = 0.0; ++ (y_cfg+i+1)->fill_color.a = 1.0; ++ ++ (t_cfg+i)->at.x = INITIATORS_AREA_BL_X + BORDER + BAR_WIDTH + (i-13) * (BAR_WIDTH + BAR_GAP)/2 - 2.2* FONT_SIZE; ++ (t_cfg+i)->at.y = INITIATORS_AREA_TR_Y + BORDER*1.2 -5; ++ ++ (t_cfg+i+1)->at.x = INITIATORS_AREA_BL_X + BORDER + (i-13)*(BAR_WIDTH+BAR_GAP)/2; ++ (t_cfg+i+1)->at.y = INITIATORS_AREA_BL_Y; ++ ++ strcpy(text[i],string_list[i]); ++ strcpy(text[i+1],string_list[i+1]); ++ } ++#endif ++ ++#if 0 ++ for(i=0; i<25; i++) ++ printf("(%d, %d) to (%d, %d)\n", (y_cfg +i)->region.bottom_left.x,(y_cfg +i)->region.bottom_left.y,(y_cfg +i)->region.top_right.x, (y_cfg +i)->region.top_right.y); ++#endif ++ ++ ++ ++ for(i=0; i<25; i++) { ++ (t_cfg+i)->color.r = 0.0; ++ (t_cfg+i)->color.g = 1.0; ++ (t_cfg+i)->color.b = 1.0; ++ (t_cfg+i)->color.a = 1.0; ++ (t_cfg+i)->fontsize = FONT_SIZE; ++ } ++ (t_cfg+0)->fontsize = 20; ++ ++ ++} ++ ++ ++void statCollectorInit() ++{ ++ int index; ++ ++ gStatColState.stat0_filter_cnt = 0; ++ gStatColState.stat1_filter_cnt = 0; ++ gStatColState.stat2_filter_cnt = 0; ++ gStatColState.stat3_filter_cnt = 0; ++ gStatColState.stat4_filter_cnt = 0; ++ gStatColState.stat5_filter_cnt = 0; ++ gStatColState.stat6_filter_cnt = 0; ++ gStatColState.stat7_filter_cnt = 0; ++ gStatColState.stat8_filter_cnt = 0; ++ gStatColState.stat9_filter_cnt = 0; ++ ++ for(index=STATCOL_EMIF1_SYS; index < STATCOL_MAX; index++) ++ { ++ global_object[index].b_enabled = 0; ++ ++ strcpy(global_object[index].name, initiators[index].name); ++ ++ global_object[index].readings = malloc(TRACE_SZ * sizeof(UInt32)); ++ memset(global_object[index].readings, 0, TRACE_SZ * sizeof(UInt32)); ++ ++ global_object[index].timestamp = NULL; ++ ++ global_object[index].group_id = 0xFF; ++ global_object[index].counter_id = 0; ++ global_object[index].base_address = 0; ++ global_object[index].mux_req = 0; ++ } ++ ++} ++ ++void wr_stat_reg(UInt32 address, UInt32 data) ++{ ++ UInt32 *mymem = statcoll_base_mem; ++ UInt32 delta = (address - STATCOLL_BASE) / 4; ++#ifndef DUMMY_MODE ++ mymem[delta] = data; ++#else ++ printf("WRITE: Address = 0x%x, Data = 0x%x\n", address, data); ++#endif ++} ++ ++UInt32 rd_stat_reg(UInt32 address) ++{ ++#ifndef DUMMY_MODE ++ UInt32 *mymem = statcoll_base_mem; ++ UInt32 data; ++ UInt32 delta = (address - STATCOLL_BASE) / 4; ++ data = mymem[delta]; ++ return data; ++#else ++ printf("READ: Address = 0x%x\n", address); ++#endif ++} ++ ++UInt32 statCollectorControlInitialize(UInt32 instance_id) ++{ ++ UInt32 cur_base_address = 0; ++ UInt32 cur_event_mux_req; ++ UInt32 cur_event_mux_resp; ++ UInt32 cur_stat_filter_cnt; ++ ++ switch (instance_id) ++ { ++ case STATCOL_EMIF1_SYS: ++ cur_base_address = stat_coll0_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; ++ global_object[instance_id].group_id = 0; ++ break; ++ case STATCOL_EMIF2_SYS: ++ cur_base_address = stat_coll0_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; ++ global_object[instance_id].group_id = 0; ++ break; ++ case STATCOL_MA_MPU_P1: ++ cur_base_address = stat_coll0_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; ++ global_object[instance_id].group_id = 0; ++ break; ++ case STATCOL_MA_MPU_P2: ++ cur_base_address = stat_coll0_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; ++ global_object[instance_id].group_id = 0; ++ break; ++ case STATCOL_MPU1: ++ cur_base_address = stat_coll1_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; ++ global_object[instance_id].group_id = 1; ++ break; ++ case STATCOL_MMU1: ++ cur_base_address = stat_coll1_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; ++ global_object[instance_id].group_id = 1; ++ break; ++ case STATCOL_TPTC_RD1: ++ cur_base_address = stat_coll1_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; ++ global_object[instance_id].group_id = 1; ++ break; ++ case STATCOL_TPTC_WR1: ++ cur_base_address = stat_coll1_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; ++ global_object[instance_id].group_id = 1; ++ break; ++ case STATCOL_TPTC_RD2: ++ cur_base_address = stat_coll1_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; ++ global_object[instance_id].group_id = 1; ++ break; ++ case STATCOL_TPTC_WR2: ++ cur_base_address = stat_coll1_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; ++ global_object[instance_id].group_id = 1; ++ break; ++ case STATCOL_VIP1_P1: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_VIP1_P2: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_VIP2_P1: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_VIP2_P2: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_VIP3_P1: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_VIP3_P2: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_VPE_P1: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_VPE_P2: ++ cur_base_address = stat_coll2_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; ++ global_object[instance_id].group_id = 2; ++ break; ++ case STATCOL_EVE1_TC0: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_EVE1_TC1: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_EVE2_TC0: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_EVE2_TC1: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_EVE3_TC0: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_EVE3_TC1: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_EVE4_TC0: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_EVE4_TC1: ++ cur_base_address = stat_coll3_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; ++ global_object[instance_id].group_id = 3; ++ break; ++ case STATCOL_DSP1_MDMA: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_DSP1_EDMA: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_DSP2_MDMA: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_DSP2_EDMA: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_IVA: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_GPU_P1: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_GPU_P2: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_BB2D_P1: ++ cur_base_address = stat_coll4_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; ++ global_object[instance_id].group_id = 4; ++ break; ++ case STATCOL_DSS: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_CSI2_2: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_MMU2: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_IPU1: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_IPU2: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_DMA_SYSTEM_RD: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_DMA_SYSTEM_WR: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_CSI2_1: ++ cur_base_address = stat_coll5_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; ++ global_object[instance_id].group_id = 5; ++ break; ++ case STATCOL_USB3_SS: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_USB2_SS: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_USB2_ULPI_SS1: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_USB2_ULPI_SS2: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_PCIE_SS1: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_PCIE_SS2: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_DSP1_CFG: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_DSP2_CFG: ++ cur_base_address = stat_coll6_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; ++ global_object[instance_id].group_id = 6; ++ break; ++ case STATCOL_GMAC_SW: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_PRUSS1_P1: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_PRUSS1_P2: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_PRUSS2_P1: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_PRUSS2_P2: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_DMA_CRYPTO_RD: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_DMA_CRYPTO_WR: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_MPU2: ++ cur_base_address = stat_coll7_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; ++ global_object[instance_id].group_id = 7; ++ break; ++ case STATCOL_MMC1: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_MMC2: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_SATA: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_MLBSS: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_BB2D_P2: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_IEEE1500: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_DBG: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_VCP1: ++ cur_base_address = stat_coll8_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; ++ global_object[instance_id].group_id = 8; ++ break; ++ case STATCOL_OCMC_RAM1: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 0; ++ cur_event_mux_resp = 1; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ case STATCOL_OCMC_RAM2: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 2; ++ cur_event_mux_resp = 3; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ case STATCOL_OCMC_RAM3: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 4; ++ cur_event_mux_resp = 5; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ case STATCOL_GPMC: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 6; ++ cur_event_mux_resp = 7; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ case STATCOL_MCASP1: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 8; ++ cur_event_mux_resp = 9; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ case STATCOL_MCASP2: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 10; ++ cur_event_mux_resp = 11; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ case STATCOL_MCASP3: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 12; ++ cur_event_mux_resp = 13; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ case STATCOL_VCP2: ++ cur_base_address = stat_coll9_base_address; ++ cur_event_mux_req = 14; ++ cur_event_mux_resp = 15; ++ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; ++ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; ++ global_object[instance_id].group_id = 9; ++ break; ++ default: ++ printf("ERROR: Unknown initiator %d\n", instance_id); ++ exit(0); ++ }; ++ ++ { ++ if ( cur_stat_filter_cnt > 4 ) ++ { ++ printf("WARNING: We have exhausted filters/counters.....\n"); ++ return 0; ++ } ++ // Global Enable Stat Collector ++ wr_stat_reg(cur_base_address+0x8,0x1); ++ ++ // Soft Enable Stat Collector ++ wr_stat_reg(cur_base_address+0xC,0x1); ++ ++ wr_stat_reg(cur_base_address+0x18,0x5); ++ // Operation of Stat Collector / RespEvt => Packet ++ wr_stat_reg(cur_base_address+0x1C,0x5); ++ ++ ++ // Event Sel ++ wr_stat_reg(cur_base_address+0x20+4*(cur_stat_filter_cnt-1),cur_event_mux_req); ++ ++ // Op is EventInfo ++ wr_stat_reg(cur_base_address+0x1FC+(0x158*(cur_stat_filter_cnt-1)),2); ++ ++ // Event Info Sel Op -> packet length ++ wr_stat_reg(cur_base_address+0x1F8+(0x158*(cur_stat_filter_cnt-1)),0); ++ ++ // Filter Global Enable ++ wr_stat_reg(cur_base_address+0xAC+(0x158*(cur_stat_filter_cnt-1)),0x1); ++ ++ // Filter Enable ++ wr_stat_reg(cur_base_address+0xBC+(0x158*(cur_stat_filter_cnt-1)),0x1); ++ ++ // Manual dump ++ wr_stat_reg(cur_base_address+0x54,0x1); ++ // use send register to reset counters ++ ++ } ++ ++ global_object[instance_id].mux_req = cur_event_mux_req; ++ global_object[instance_id].base_address = cur_base_address; ++ global_object[instance_id].counter_id = cur_stat_filter_cnt; ++ global_object[instance_id].b_enabled = 1; ++ ++ return cur_stat_filter_cnt; ++} ++ ++ ++ ++void statCollectorReadGroup(UInt32 group_id) ++{ ++ int i=0; ++ UInt32 cur_base_address = 0x45001000 + ((group_id - 1) * 0x1000); ++ ++ wr_stat_reg(cur_base_address+0xC,0x0); ++ ++ for(i=0; i < STATCOL_MAX; i++) ++ { ++ if(global_object[i].group_id == (group_id - 1) && ++ global_object[i].b_enabled == 1) ++ { ++ UInt32 cur_stat_filter_cnt = global_object[i].counter_id; ++ ++ global_object[i].readings[statCountIdx] = rd_stat_reg(cur_base_address+0x8C+((cur_stat_filter_cnt-1)*4)); ++ } ++ } ++ ++ wr_stat_reg(cur_base_address+0xC,0x1); ++} ++ ++ ++volatile sig_atomic_t sigtermed = 0; ++ ++void my_signal_handler(int signum) ++{ ++ if (signum == SIGTERM || signum == SIGINT) { ++ sigtermed = 1; ++ } ++} ++ ++struct sort ++{ ++ int pos; ++ double value; ++}; ++ ++ ++void *ctx; ++struct time_graph_create_params p; ++char xpos_string[100], ypos_string[100]; ++ ++void mpu_handler(int command) ++{ ++#if 1 ++ static int fd; ++ char buf[1000]; ++ char * tabledata= "/tmp/statcollfifo"; ++ int i; ++ int bytes; ++ static int offset = 13; ++ ++ switch(command) ++ { ++ case OPEN: ++ fd = open(tabledata, O_RDONLY|O_NONBLOCK); ++ break; ++ ++ case READ: ++ ++ /* open, read, and display the message from the FIFO */ ++ bytes=read(fd, buf, 1000); ++ if(bytes > 0) ++ { ++ char str[100]; ++ char value[100]; ++ sscanf(buf, "%s %s", str, value); ++ if(strcmp(str, "MOVE:") == 0) ++ { ++ printf("Received MOVE command : %s\n", buf); ++ sprintf(p.title, "CPU Usage[@position-req=%sx%s]", value, ypos_string); ++ move_graph(ctx, &p); ++ } ++ else ++ { ++ printf("ERROR: Received unexpected data from FIFO - \" %s \" \n", buf); ++ } ++ memset(buf, 0x0, sizeof(buf)); ++ } ++ ++ break; ++ ++ case CLOSE: ++ close(fd); ++ break; ++ } ++#endif ++ return; ++} ++ ++ ++UInt32 statcoll_start(UInt32 TOTAL_TIME, UInt32 INTERVAL_US, char list[][50], UInt32 xpos, UInt32 ypos) ++{ ++ int i, fd, index; ++ UInt32 counterIdDss, counterIdIva, counterIdBB2dP1, counterIdBB2dP2, counterIdUsb4, counterIdSata, counterIdEmif1, counterIdEmif2; ++ ++ if (SIG_ERR == signal(SIGPIPE,SIG_IGN)) ++ exit(1); ++ ++ if (SIG_ERR == signal(SIGINT,my_signal_handler)) ++ exit(1); ++ ++ if (SIG_ERR == signal(SIGTERM,my_signal_handler)) ++ exit(1); ++ ++ ++ struct timeval tv1, tv2; ++ gettimeofday(&tv1, NULL); ++ printf("------------------------------------------------\n"); ++ printf("Compile time = %s %s\n",__DATE__, __TIME__); ++ printf("------------------------------------------------\n\n"); ++ //printd("Start time = %d\n", time(NULL)); ++ //printd("Time seconds = %d, usecs = %d\n", tv.tv_sec, tv.tv_usec); ++ ++ statcoll_params params; ++ memset(¶ms, sizeof(params), 0); ++ params.INTERVAL_US = INTERVAL_US; ++ params.TOTAL_TIME = TOTAL_TIME; ++ ++ i=0; ++ index=0; ++ ++ while(list[i][0] != 0) ++ { ++ for(index=0; index< STATCOL_MAX; index++) { ++ if(strcmp(list[i], initiators[index].name) == 0) ++ { ++ strcpy(params.user_config_list[params.no_of_initiators].name, list[i]); ++ params.user_config_list[params.no_of_initiators++].id = initiators[index].id; ++ break; ++ } ++ } ++ ++ if(index == STATCOL_MAX) { ++ printf("ERROR: Unknown initiator.%d.. .%s. \n", i, list[i]); ++ //exit(0); ++ } ++ i++; ++ } ++ ++ struct bar_graph_create_params bg_p; ++ struct _y_config *y_cfg; ++ struct _text_config *t_cfg; ++ double *y; ++ double *bg_y; ++ char *text_list[STATCOL_MAX]; ++ ++ struct _bar_graph_y_config *bg_y_cfg; ++ struct _text_config *bg_t_cfg; ++ char *bg_text_list[STATCOL_MAX]; ++ ++ sprintf(xpos_string, "%d", xpos); ++ sprintf(ypos_string, "%d", ypos); ++ p.title=(char *)malloc(100); ++ sprintf(p.title, "CPU Usage[@position-req=%sx%s]", xpos_string, ypos_string); ++ //p.height = MAX_HEIGHT - HEIGHT_EMIF_AREA; ++ p.height = MAX_HEIGHT;// - HEIGHT_EMIF_AREA; ++ p.width = MAX_WIDTH; ++ p.draw_area.bottom_left.x = TIME_GRAPH_AREA_BL_X; ++ p.draw_area.bottom_left.y = TIME_GRAPH_AREA_BL_Y; ++ p.draw_area.top_right.x = TIME_GRAPH_AREA_TR_X; ++ p.draw_area.top_right.y = TIME_GRAPH_AREA_TR_Y; ++ p.time_span = 120000; // 120 seconds ++ p.num_of_y_items = params.no_of_initiators+1; ++ p.num_of_text_items = 0;//params.no_of_initiators; ++ ++ ++ y_cfg = malloc((params.no_of_initiators+1) * sizeof(struct _y_config)); ++ t_cfg = malloc(params.no_of_initiators * sizeof(struct _text_config)); ++ y = malloc((params.no_of_initiators+1) * sizeof(double)); ++ p.y_config_array = y_cfg; ++ p.text_config_array = t_cfg; ++ ++ bg_y_cfg = malloc(TOTAL_Y_PARAMETERS * sizeof(struct _bar_graph_y_config)); ++ bg_t_cfg = malloc(TOTAL_Y_PARAMETERS * sizeof(struct _text_config)); ++ bg_y = malloc(TOTAL_Y_PARAMETERS * sizeof(double)); ++ ++ for(i=0; iline_color.r = pallette[i%MAX_COLORS].r; ++ ((struct _y_config *)y_cfg+i)->line_color.g = pallette[i%MAX_COLORS].g; ++ ((struct _y_config *)y_cfg+i)->line_color.b = pallette[i%MAX_COLORS].b; ++ ((struct _y_config *)y_cfg+i)->line_color.a = 0.0;//pallette[i%MAX_COLORS].a; ++ ++ ((struct _y_config *)y_cfg+i)->fill_color.r = 0.0; ++ ((struct _y_config *)y_cfg+i)->fill_color.g = 1.0; ++ ((struct _y_config *)y_cfg+i)->fill_color.b = 0.0; ++ ((struct _y_config *)y_cfg+i)->fill_color.a = 0.5; ++ ++ i++; ++ } ++ ++ ((struct _y_config *)y_cfg+i)->line_color.r = 0.0; ++ ((struct _y_config *)y_cfg+i)->line_color.g = 0.0; ++ ((struct _y_config *)y_cfg+i)->line_color.b = 0.0; ++ ((struct _y_config *)y_cfg+i)->line_color.a = 0.5; ++ ((struct _y_config *)y_cfg+i)->fill_color.r = 0.1; ++ ((struct _y_config *)y_cfg+i)->fill_color.g = 0.9; ++ ((struct _y_config *)y_cfg+i)->fill_color.b = 0.5; ++ ((struct _y_config *)y_cfg+i)->fill_color.a = 1.0; ++ ++ bg_p.title = "CPU Usage"; ++ ++ bg_p.num_of_y_items = TOTAL_Y_PARAMETERS; ++ bg_p.y_config_array = bg_y_cfg; ++ bg_p.num_of_text_items = TOTAL_Y_PARAMETERS; ++ bg_p.text_config_array = bg_t_cfg; ++ ++ ++ int argc; ++ char *argv[10]; ++ ctx = time_graph_create(argc, argv, &p); ++ if (!ctx) { ++ printf("Error creating context\n"); ++ exit(0); ++ } ++ ++ printf("\n Context after time_graph_create = 0x%x\n", ctx); ++ ctx = bar_graph_create(argc, argv, &bg_p); ++ if (!ctx) { ++ printf("Error creating context\n"); ++ exit(0); ++ } ++ ++ printf("\n Context after bar_graph_create= 0x%x\n", ctx); ++ ++ printf("Total configured initiators = %d\n", params.no_of_initiators); ++ ++ ++ fd = open("/dev/mem", O_RDWR); ++ if (fd == -1){ ++ printf("error fd=open() \n"); ++ return -1; ++ } ++ statcoll_base_mem = mmap(NULL, STATCOLL_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, STATCOLL_BASE); ++ ++ if (statcoll_base_mem == MAP_FAILED){ ++ printf("ERROR: mmap failed \n"); ++ return; ++ } ++ close(fd); ++ ++ fd = open("/dev/mem", O_RDWR); ++ if (fd == -1){ ++ printf("error fd=open() \n"); ++ return -1; ++ } ++ l3_3_clkctrl = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, CM_L3INSTR_REGISTER_BASE); ++ if (l3_3_clkctrl == MAP_FAILED){ ++ printf("ERROR: mmap failed for CM_L3INSTR_REGISTER_BASE\n"); ++ return; ++ } ++ close(fd); ++ ++ printf("SUCCESS: Mapped 0x%x to user space address 0x%x\n", STATCOLL_BASE, statcoll_base_mem); ++ printf("INTERVAL = %d usecs\n", INTERVAL_US); ++ printf("TOTAL TIME = %d seconds\n", TOTAL_TIME); ++ TRACE_SZ = (TOTAL_TIME * 1000000)/INTERVAL_US; ++ printf("TRACE SIZE = %d samples\n", TRACE_SZ); ++ ++ printf("**************************************\n"); ++ printf("Going to initialize the L3 clocks \n"); ++ l3_3_clkctrl[CM_L3INSTR_L3INSTR_CLKSTCTRL_OFFSET >> 2] = 0x2; ++ l3_3_clkctrl[CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET >> 2] = 0x1; ++ printf("**************************************\n"); ++ ++ while( (l3_3_clkctrl[CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET >> 2] & 0x30000) != 0x0) ++ { ++ printf("Waiting on module to be functional\n"); ++ } ++ ++ statCollectorInit(); ++ ++ printf("SUCCESS: Initialized STAT COLLECTOR\n"); ++ /* Initialize all enabled initiators */ ++ for(index =0; index < params.no_of_initiators; index++) { ++ printf("\t\t Initialized %s\n", params.user_config_list[index].name); ++ statCollectorControlInitialize(params.user_config_list[index].id); ++ } ++ ++ const char *bg_text = "CPU Utilization"; ++ ++ int second_counter=0; ++ memset(y, 0x0, sizeof(double)* (params.no_of_initiators+1)); ++ ++ ++ ++ ++ mpu_handler(OPEN); ++ ++ ++ while(statCountIdx != (TRACE_SZ - 1)) ++ { ++ usleep(INTERVAL_US); ++ int group; ++ for(group = 1; group<11; group++) ++ statCollectorReadGroup(group); ++ ++ mpu_handler(READ); ++ ++ if(statCountIdx != 0 ) ++ for(i=0; i ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include "window.h" ++#include "../shared/cairo-util.h" ++#include "time_bar_graph.h" ++ ++//#define DEBUG 1 ++#ifdef DEBUG ++#define DBG(x...) printf(x) ++#else ++#define DBG(x...) // printf(x) ++#endif ++ ++#define MAX_ITEMS 180 ++#define MAX_TEXT_SIZE 128 ++ ++struct graph_dataset_point { ++ int next_index; ++ double y_values[MAX_ITEMS]; ++}; ++ ++struct graph_data { ++ int dataset_size; ++ int first_index, last_index, num_elems; ++ uint64_t last_time; ++ struct graph_dataset_point dataset[1]; ++}; ++ ++struct graph { ++ struct display *display; ++ struct window *window; ++ struct widget *widget; ++ int width, height; ++ struct time_graph_create_params params; ++ struct bar_graph_create_params bar_graph_params; ++ struct _y_config y_config_array[MAX_ITEMS]; ++ struct _text_config text_config_array[MAX_ITEMS]; ++ ++ /* Bar graph parameters */ ++ struct _bar_graph_y_config bar_graph_y_config_array[MAX_ITEMS]; ++ struct _text_config bar_graph_text_config_array[MAX_ITEMS]; ++ ++ pthread_t thr; ++ int eventfd; ++ struct task task; ++ double x_scaling_factor; ++ pthread_mutex_t mtx; ++ double time_graph_y_values[MAX_ITEMS]; ++ char text_values[MAX_ITEMS][MAX_TEXT_SIZE]; ++ ++ double bar_graph_y_values[MAX_ITEMS]; ++ char bar_graph_text_values[MAX_ITEMS][MAX_TEXT_SIZE]; ++ ++ uint64_t time_now; ++ time_t start_time_tv_sec; ++ struct graph_data *data; ++}; ++ ++struct graph *global_graph=NULL; ++static void ++draw_stuff(struct graph *g, cairo_surface_t *surface) ++{ ++ cairo_t *cr; ++ int i, j, n_elems; ++ double c_x, c_y, d_x, d_y; ++ ++ cr = cairo_create(surface); ++ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); ++ cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 0.5); ++ cairo_paint(cr); ++ cairo_select_font_face(cr, "mono", ++ CAIRO_FONT_SLANT_NORMAL, ++ CAIRO_FONT_WEIGHT_BOLD); ++ cairo_set_line_width (cr, 1.0); ++ cairo_set_operator(cr, CAIRO_OPERATOR_OVER); ++ pthread_mutex_lock(&g->mtx); ++ for (j=0; g->data->num_elems > 0 && jparams.num_of_y_items; j++) { ++ n_elems = g->data->num_elems; ++ DBG("first_index: %d, last_index: %d\n", g->data->first_index, g->data->last_index); ++ if (g->y_config_array[j].fill_color.a != 0.0) ++ cairo_move_to(cr, (double)g->params.draw_area.bottom_left.x, (double)g->params.draw_area.bottom_left.y); ++ c_x = (double)g->params.draw_area.bottom_left.x; ++ c_y = (double)g->params.draw_area.bottom_left.y; ++ d_x = 0; ++ i = g->data->first_index; ++ while (n_elems) { ++ DBG("index: %d, x: %f, y: %f, next_index: %d\n", i, c_x, ++ g->data->dataset[i].y_values[j], g->data->dataset[i].next_index); ++ d_y = g->data->dataset[i].y_values[j] - c_y; ++ c_y = g->data->dataset[i].y_values[j]; ++ c_x = c_x + d_x; ++ if (g->y_config_array[j].fill_color.a == 0.0 && n_elems == g->data->num_elems) { ++ cairo_move_to(cr, c_x, c_y); ++ } else { ++ cairo_curve_to(cr, c_x - (d_x * 0.75), c_y - (d_y * 0.92), c_x - (d_x * 0.25), c_y - (d_y * 0.08), c_x, c_y); ++ } ++ if (g->data->dataset[i].next_index > i) { ++ d_x = (g->data->dataset[i].next_index - i); ++ } else { ++ d_x = (g->data->dataset_size + g->data->dataset[i].next_index - i); ++ } ++ i = g->data->dataset[i].next_index; ++ n_elems--; ++ } ++ if (g->y_config_array[j].fill_color.a != 0.0) { ++ cairo_line_to(cr, c_x, (double)g->params.draw_area.bottom_left.y); ++ cairo_line_to(cr, (double)g->params.draw_area.bottom_left.x, (double)g->params.draw_area.bottom_left.y); ++ cairo_close_path(cr); ++ cairo_set_source_rgba(cr, g->y_config_array[j].fill_color.r, g->y_config_array[j].fill_color.g, ++ g->y_config_array[j].fill_color.b, g->y_config_array[j].fill_color.a); ++ cairo_fill_preserve(cr); ++ } ++ cairo_set_source_rgba(cr, g->y_config_array[j].line_color.r, g->y_config_array[j].line_color.g, ++ g->y_config_array[j].line_color.b, g->y_config_array[j].line_color.a); ++ cairo_stroke(cr); ++ } ++ ++ for (j=0; jparams.num_of_text_items; j++) { ++ cairo_move_to(cr, (double)g->text_config_array[j].at.x, (double)g->text_config_array[j].at.y); ++ cairo_set_font_size(cr, g->text_config_array[j].fontsize); ++ cairo_set_source_rgba(cr, g->text_config_array[j].color.r, g->text_config_array[j].color.g, ++ g->text_config_array[j].color.b, g->text_config_array[j].color.a); ++ cairo_show_text(cr, g->text_values[j]); ++ } ++ ++ ++ for (j=0; jbar_graph_params.num_of_y_items; j++) { ++ cairo_move_to(cr, (double)g->bar_graph_params.y_config_array[j].region.bottom_left.x, ++ (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y); ++ c_y = (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y - ++ (g->bar_graph_y_values[j] * (double)(g->bar_graph_params.y_config_array[j].region.bottom_left.y - ++ g->bar_graph_params.y_config_array[j].region.top_right.y)); ++ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.bottom_left.x, c_y); ++ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.top_right.x, c_y); ++ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.top_right.x, ++ (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y); ++ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.bottom_left.x, ++ (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y); ++ cairo_close_path(cr); ++ cairo_set_source_rgba(cr, g->bar_graph_y_config_array[j].fill_color.r, g->bar_graph_y_config_array[j].fill_color.g, ++ g->bar_graph_y_config_array[j].fill_color.b, g->bar_graph_y_config_array[j].fill_color.a); ++ cairo_fill_preserve(cr); ++ cairo_set_source_rgba(cr, g->bar_graph_y_config_array[j].line_color.r, g->bar_graph_y_config_array[j].line_color.g, ++ g->bar_graph_y_config_array[j].line_color.b, g->bar_graph_y_config_array[j].line_color.a); ++ cairo_stroke(cr); ++ } ++ for (j=0; jbar_graph_params.num_of_text_items; j++) { ++ cairo_move_to(cr, (double)g->bar_graph_text_config_array[j].at.x, (double)g->bar_graph_text_config_array[j].at.y); ++ cairo_set_font_size(cr, g->bar_graph_text_config_array[j].fontsize); ++ cairo_set_source_rgba(cr, g->bar_graph_text_config_array[j].color.r, g->bar_graph_text_config_array[j].color.g, ++ g->bar_graph_text_config_array[j].color.b, g->bar_graph_text_config_array[j].color.a); ++ cairo_save (cr); ++ //cairo_rotate(cr, 2*3.14*21/24); ++ cairo_show_text(cr, g->bar_graph_text_values[j]); ++ cairo_restore(cr); ++ } ++ pthread_mutex_unlock(&g->mtx); ++ cairo_destroy(cr); ++} ++ ++static void ++resize_handler(struct widget *widget, ++ int32_t width, int32_t height, void *data) ++{ ++ struct graph *g = data; ++ ++ /* Dont resize me */ ++ widget_set_size(g->widget, g->width, g->height); ++} ++ ++static void ++redraw_handler(struct widget *widget, void *data) ++{ ++ struct graph *g = data; ++ cairo_surface_t *surface; ++ ++ surface = window_get_surface(g->window); ++ if (surface == NULL || ++ cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) { ++ fprintf(stderr, "failed to create cairo egl surface\n"); ++ return; ++ } ++ ++ draw_stuff(g, surface); ++ cairo_surface_destroy(surface); ++} ++ ++static void ++button_handler(struct widget *widget, ++ struct input *input, uint32_t time, ++ uint32_t button, enum wl_pointer_button_state state, void *data) ++{ ++ struct graph *g = data; ++ ++ switch (button) { ++ case BTN_LEFT: ++ if (state == WL_POINTER_BUTTON_STATE_PRESSED) ++ window_move(g->window, input, ++ display_get_serial(g->display)); ++ break; ++ case BTN_MIDDLE: ++ if (state == WL_POINTER_BUTTON_STATE_PRESSED) ++ widget_schedule_redraw(widget); ++ break; ++ case BTN_RIGHT: ++ if (state == WL_POINTER_BUTTON_STATE_PRESSED) ++ window_show_frame_menu(g->window, input, time); ++ break; ++ } ++} ++ ++static void ++touch_down_handler(struct widget *widget, struct input *input, ++ uint32_t serial, uint32_t time, int32_t id, ++ float x, float y, void *data) ++{ ++ struct graph *g = data; ++ window_move(g->window, input, display_get_serial(g->display)); ++} ++ ++static void task_run(struct task *task, uint32_t events) ++{ ++ eventfd_t e; ++ struct graph *g = (struct graph *)(task->link.prev); ++ uint64_t time_diff; ++ int elems, tmp, incr, i; ++ double y; ++ ++ eventfd_read(g->eventfd, &e); ++ if(e == 1) { ++ pthread_mutex_lock(&g->mtx); ++ /* Process new data */ ++ DBG("time_now: %llu, last_time: %llu\n", g->time_now, g->data->last_time); ++ if (g->time_now > g->data->last_time) { ++ time_diff = g->time_now - g->data->last_time; ++ y = (double)time_diff * g->x_scaling_factor; ++ incr = (int)y; ++ DBG("incr: %d\n", incr); ++ ++ if (g->data->last_index >= g->data->first_index) elems = g->data->last_index - g->data->first_index + 1; ++ else elems = g->data->dataset_size - g->data->first_index + g->data->last_index + 1; ++ /* Move first index to make room for new element */ ++ while (g->data->dataset_size > 0 && (elems + incr) > g->data->dataset_size) { ++ tmp = g->data->dataset[g->data->first_index].next_index - g->data->first_index; ++ if (tmp < 0) tmp = g->data->dataset_size + tmp; ++ g->data->first_index = g->data->dataset[g->data->first_index].next_index; ++ elems -= tmp; ++ g->data->num_elems--; ++ } ++ for (i=0; iparams.num_of_y_items; i++) { ++ /* Scale Y */ ++ y = g->time_graph_y_values[i] * (double)(g->params.draw_area.bottom_left.y-g->params.draw_area.top_right.y); ++ y = (double)g->params.draw_area.bottom_left.y - y; ++ g->data->dataset[g->data->last_index].y_values[i] = y; ++ } ++ g->data->dataset[g->data->last_index].next_index = g->data->last_index + incr; ++ if (g->data->dataset[g->data->last_index].next_index >= g->data->dataset_size) ++ g->data->dataset[g->data->last_index].next_index -= g->data->dataset_size; ++ g->data->num_elems++; ++ g->data->last_index = g->data->dataset[g->data->last_index].next_index; ++ g->data->last_time = g->time_now; ++ } ++ pthread_mutex_unlock(&g->mtx); ++ } ++ widget_schedule_redraw(g->widget); ++ DBG("event task ran...\n"); ++} ++ ++void *time_graph_create(int argc, char *argv[], struct time_graph_create_params *cp) ++{ ++ struct graph *g; ++ struct display *d; ++ int dataset_size; ++ struct timeval tv; ++ ++ if (cp->num_of_y_items > MAX_ITEMS) return NULL; ++ if (cp->num_of_text_items > MAX_ITEMS) return NULL; ++ ++ g = (struct graph*)malloc(sizeof(struct graph)); ++ if (g == NULL) { ++ fprintf(stderr, "failed to allocate memory\n"); ++ return NULL; ++ } ++ global_graph = g; ++ g->params = *cp; ++ if (cp->num_of_y_items) ++ memcpy(&g->y_config_array[0], cp->y_config_array, ++ sizeof(struct _y_config) * cp->num_of_y_items); ++ if (cp->num_of_text_items) ++ memcpy(&g->text_config_array[0], cp->text_config_array, ++ sizeof(struct _text_config) * cp->num_of_text_items); ++ d = display_create(&argc, argv); ++ if (d == NULL) { ++ fprintf(stderr, "failed to create display: %m\n"); ++ return NULL; ++ } ++ g->display = d; ++ //g->bg_image = load_cairo_surface(cp->bg_image); ++ g->width = cp->width; //cairo_image_surface_get_width(g->bg_image); ++ g->height = cp->height; //cairo_image_surface_get_height(g->bg_image); ++ dataset_size = cp->draw_area.top_right.x - cp->draw_area.bottom_left.x; ++ g->data = (struct graph_data *)malloc(sizeof(struct graph_data) + ++ (dataset_size * sizeof(struct graph_dataset_point))); ++ if (!g->data) { ++ fprintf(stderr, "failed to allocate memory\n"); ++ display_destroy(g->display); ++ //cairo_surface_destroy(g->bg_image); ++ free(g); ++ return NULL; ++ } ++ g->data->first_index = 0; ++ g->data->last_index = 0; ++ g->data->num_elems = 0; ++ g->data->dataset_size = dataset_size; ++ g->x_scaling_factor = (double)dataset_size / (double)cp->time_span; ++ g->window = window_create(d); ++ g->widget = window_add_widget(g->window, g); ++ window_set_title(g->window, cp->title); ++ widget_set_resize_handler(g->widget, resize_handler); ++ widget_set_redraw_handler(g->widget, redraw_handler); ++ widget_set_button_handler(g->widget, button_handler); ++ widget_set_default_cursor(g->widget, CURSOR_HAND1); ++ widget_set_touch_down_handler(g->widget, touch_down_handler); ++ window_schedule_resize(g->window, g->width, g->height); ++ g->eventfd = eventfd(0, 0); ++ g->task.run = task_run; ++ g->task.link.prev = (struct wl_list*)g; ++ g->task.link.next = NULL; ++ display_watch_fd(d, g->eventfd, EPOLLIN, &g->task); ++ pthread_mutex_init(&g->mtx, NULL); ++ ++ if (0 != pthread_create(&g->thr, NULL, (void *(*)(void *))display_run, (void *)d)) { ++ fprintf(stderr, "pthread_create failed: %m\n"); ++ widget_destroy(g->widget); ++ window_destroy(g->window); ++ display_destroy(g->display); ++ //cairo_surface_destroy(g->bg_image); ++ free(g->data); ++ close(g->eventfd); ++ free(g); ++ return NULL; ++ } ++ gettimeofday(&tv, NULL); ++ g->start_time_tv_sec = tv.tv_sec; ++ g->data->last_time = 0; ++ return (void*)g; ++} ++ ++void move_graph(void *ctx, struct time_graph_create_params *cp) ++{ ++ struct graph *g = ctx; ++ window_set_title(g->window, cp->title); ++} ++ ++void time_graph_plot(void *ctx, double *y_values, const char *text_values[]) ++{ ++ struct timeval tv; ++ struct graph *g = ctx; ++ int i; ++ pthread_mutex_lock(&g->mtx); ++ gettimeofday(&tv, NULL); ++ g->time_now = ((tv.tv_sec - g->start_time_tv_sec) * 1000) + (tv.tv_usec / 1000); ++ memcpy(g->time_graph_y_values, y_values, g->params.num_of_y_items * sizeof(double)); ++ for (i=0;iparams.num_of_text_items; i++) { ++ strncpy(g->text_values[i], text_values[i], MAX_TEXT_SIZE); ++ g->text_values[i][MAX_TEXT_SIZE-1] = '\0'; ++ } ++ pthread_mutex_unlock(&g->mtx); ++ eventfd_write(g->eventfd, (eventfd_t)1); ++} ++ ++void time_graph_destroy(void *ctx) ++{ ++ struct graph *g = (struct graph *)ctx; ++ display_exit(g->display); ++ eventfd_write(g->eventfd, (eventfd_t)1); ++ pthread_join(g->thr, NULL); ++ widget_destroy(g->widget); ++ window_destroy(g->window); ++ display_destroy(g->display); ++ free(g->data); ++ close(g->eventfd); ++ free(g); ++ global_graph=NULL; ++} ++ ++void util_get_cpu_usage(double *cpu_usage) ++{ ++ static FILE *fp = NULL; ++ char buf[256]; ++ uint64_t tot; ++ uint64_t u, n, s, i, w, x, y, z; ++ static uint64_t last_i = 0, last_total = 0; ++ ++ ++ if (!fp) { ++ if (!(fp = fopen("/proc/stat", "r"))) ++ fprintf(stderr, "Failed /proc/stat open: %s", strerror(errno)); ++ } ++ if (fp) { ++ while (1) { ++ rewind(fp); ++ fflush(fp); ++ if (!fgets(buf, sizeof(buf), fp)) { ++ fprintf(stderr, "failed /proc/stat read\n"); ++ } else { ++ sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", ++ &u, ++ &n, ++ &s, ++ &i, ++ &w, ++ &x, ++ &y, ++ &z ++ ); ++ if (last_total == 0) { ++ last_total = u+n+s+i+w+x+y+z; ++ last_i = i; ++ usleep(100000); ++ } else { ++ tot = u+n+s+i+w+x+y+z; ++ *cpu_usage = (1.0 - ((double)(i-last_i)/(double)(tot-last_total))); ++ last_i = i; ++ last_total = tot; ++ break; ++ } ++ } ++ } ++ } ++} ++ ++void *bar_graph_create(int argc, char *argv[], struct bar_graph_create_params *cp) ++{ ++ struct graph *g; ++ struct display *d; ++ struct timeval tv; ++ ++ if (cp->num_of_y_items > MAX_ITEMS) return NULL; ++ if (cp->num_of_text_items > MAX_ITEMS) return NULL; ++ ++ if (global_graph == NULL) { ++ fprintf(stderr, "graph not initialized invoke time_graph_create first\n"); ++ return NULL; ++ } ++ g=global_graph; ++ g->bar_graph_params = *cp; ++ if (cp->num_of_y_items) ++ memcpy(&g->bar_graph_y_config_array[0], cp->y_config_array, ++ sizeof(struct _bar_graph_y_config) * cp->num_of_y_items); ++ if (cp->num_of_text_items) ++ memcpy(&g->bar_graph_text_config_array[0], cp->text_config_array, ++ sizeof(struct _text_config) * cp->num_of_text_items); ++ ++ return g; ++} ++ ++void bar_graph_plot(void *ctx, double *y_values, const char *text_values[]) ++{ ++ struct graph *g = ctx; ++ int i; ++ pthread_mutex_lock(&g->mtx); ++ memcpy(g->bar_graph_y_values, y_values, g->bar_graph_params.num_of_y_items * sizeof(double)); ++ for (i=0;ibar_graph_params.num_of_text_items; i++) { ++ strncpy(g->bar_graph_text_values[i], text_values[i], MAX_TEXT_SIZE); ++ g->bar_graph_text_values[i][MAX_TEXT_SIZE-1] = '\0'; ++ } ++ pthread_mutex_unlock(&g->mtx); ++ //eventfd_write(g->eventfd, (eventfd_t)2); ++} ++ ++void bar_graph_destroy(void *ctx) ++{ ++ printf("Nothing to be done for this call\n"); ++ return; ++} ++ +diff --git a/clients/time_bar_graph.h b/clients/time_bar_graph.h +new file mode 100644 +index 0000000..97ac05a +--- /dev/null ++++ b/clients/time_bar_graph.h +@@ -0,0 +1,93 @@ ++ ++#ifndef _BAR_GRAPH_H_ ++#define _BAR_GRAPH_H_ ++ ++#include ++ ++struct _rgba { ++ double r, g, b, a; // Values between 0 and 1 ++}; ++ ++struct _coordinate { ++ uint32_t x, y; // Co-ordinates relative to top-left of the window ++}; ++ ++struct _rect { ++ struct _coordinate bottom_left, top_right; ++}; ++ ++struct _y_config { ++ struct _rgba line_color; // Line color ++ struct _rgba fill_color; // Fill color, 0 alpha => no fill ++}; ++ ++struct _text_config { ++ struct _rgba color; // Color for drawing the text, RGBA ++ struct _coordinate at; // where to draw the text ++ int fontsize; // Font size ++}; ++ ++struct time_graph_create_params { ++ char *title; ++ //const char *bg_image; ++ uint32_t width; ++ uint32_t height; ++ struct _rect draw_area; ++ uint32_t time_span; // Amount of time the graph has to span in milliseconds ++ uint32_t num_of_y_items; ++ struct _y_config *y_config_array; ++ uint32_t num_of_text_items; ++ struct _text_config *text_config_array; ++}; ++ ++ ++struct _bar_graph_y_config { ++ struct _rect region; // Region for the bar graph ++ struct _rgba line_color; // Color for drawing the line, RGBA ++ struct _rgba fill_color; // Fill under the line with color RGBA, 0 => no fill ++}; ++ ++struct bar_graph_create_params { ++ char *title; ++ //const char *bg_image; ++ uint32_t num_of_y_items; ++ struct _bar_graph_y_config *y_config_array; ++ uint32_t num_of_text_items; ++ struct _text_config *text_config_array; ++}; ++ ++/* Creates a time graph using create parameters */ ++void *bar_graph_create(int argc, char *argv[], struct bar_graph_create_params *cp); ++ ++void move_graph(void *ctx, struct time_graph_create_params *cp); ++ ++/* Plots a new set of y-values from the values in the array y_values. ++ The number of values must be equal to "num_of_y_items" from create params ++ y_values must be normalized between 0.0 to 1.0 ++*/ ++void bar_graph_plot(void *ctx, double *y_values, const char *text_values[]); ++ ++/* Destroy the graph */ ++void bar_graph_destroy(void *ctx); ++ ++ ++/* Creates a time graph using create parameters */ ++void *time_graph_create(int argc, char *argv[], struct time_graph_create_params *cp); ++ ++/* ++ * Plots a new set of points from the values in the array y_values. ++ * The number of values in the array y_values must be equal to "num_of_y_items" ++ * from create params ++ * y_values must be normalized between 0.0 to 1.0 ++ ++ * The number of values in the array text_values must be equal to "num_of_text_items" ++ * from create params ++*/ ++void time_graph_plot(void *ctx, double *y_values, const char *text_values[]); ++ ++/* Destroy the graph */ ++void time_graph_destroy(void *ctx); ++ ++void util_get_cpu_usage(double *cpu_usage); ++ ++#endif /* _BAR_GRAPH_H_ */ +-- +1.9.1 + diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch new file mode 100644 index 00000000..7801bdd5 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch @@ -0,0 +1,29 @@ +From 53d7c243ba0baa052081735b8effff4e2679ce65 Mon Sep 17 00:00:00 2001 +From: Kamal Pandey +Date: Thu, 4 Apr 2019 19:45:45 +0530 +Subject: [PATCH] FIX: weston: clients: typo in simple-dmabuf-egl.c + +Fix variable EGL_NO_IMAGE to EGL_NO_IMAGE_KHR in +clients/simple-dmabuf-egl.c + +Signed-off-by: Kamal Pandey +--- + clients/simple-dmabuf-egl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clients/simple-dmabuf-egl.c b/clients/simple-dmabuf-egl.c +index 75d880e08..2d99c4709 100644 +--- a/clients/simple-dmabuf-egl.c ++++ b/clients/simple-dmabuf-egl.c +@@ -293,7 +293,7 @@ create_fbo_for_buffer(struct display *display, struct buffer *buffer) + EGL_NO_CONTEXT, + EGL_LINUX_DMA_BUF_EXT, + NULL, attribs); +- if (buffer->egl_image == EGL_NO_IMAGE) { ++ if (buffer->egl_image == EGL_NO_IMAGE_KHR) { + fprintf(stderr, "EGLImageKHR creation failed\n"); + return false; + } +-- +2.21.0 + diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch new file mode 100644 index 00000000..45d4ec7d --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch @@ -0,0 +1,37 @@ +From e8e7a9f7dfa164a75fdbdca87622a2e13334478a Mon Sep 17 00:00:00 2001 +From: Anand Balagopalakrishnan +Date: Sat, 23 Jan 2016 22:48:07 +0530 +Subject: [PATCH 1/1] udev-seat: restrict udev enumeration to card0 + +In case of separate GPU and Display devices as found in embedded systems, we +could have modeset node and render node controlled by different drivers. +There is a distinct possibility that udev enumeration returns the DRM device +corresponding to render node as the primary DRM device. + +Obviously, modeset operations cannot be done on the GPU DRM device. + +Restrict the udev enumeration to card0 and ensure that DRM device corresponding +to display is returned as the primary DRM device. + +Upstream-Status: Pending + +Signed-off-by: Anand Balagopalakrishnan +--- + libweston/compositor-drm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c +index 6777bf8..59c2cc5 100644 +--- a/libweston/compositor-drm.c ++++ b/libweston/compositor-drm.c +@@ -2827,7 +2827,7 @@ find_primary_gpu(struct drm_backend *b, const char *seat) + + e = udev_enumerate_new(b->udev); + udev_enumerate_add_match_subsystem(e, "drm"); +- udev_enumerate_add_match_sysname(e, "card[0-9]*"); ++ udev_enumerate_add_match_sysname(e, "card0"); + + udev_enumerate_scan_devices(e); + drm_device = NULL; +-- +1.7.9.5 diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch new file mode 100644 index 00000000..b7f467b4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch @@ -0,0 +1,31 @@ +From 5b5de6a814b43ca023a92b85b407b3d061dbc64f Mon Sep 17 00:00:00 2001 +From: Eric Ruei +Date: Thu, 9 Mar 2017 14:32:24 -0500 +Subject: [PATCH 2/4] Weston: Allow visual_id to be 0 + +The inquiry of visual id from egl API eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) +is an optional feature. The visual id will be set to 0 if this feature is +not supported. Therefore, the return condition @function match_config_to_visual() +should be (id == visual_id || id == 0) instead of (id == visual_id) + +Signed-off-by: Eric Ruei +--- + libweston/gl-renderer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c +index 23c0cd7..4c1f170 100644 +--- a/libweston/gl-renderer.c ++++ b/libweston/gl-renderer.c +@@ -2462,7 +2462,7 @@ match_config_to_visual(EGLDisplay egl_display, + &id)) + continue; + +- if (id == visual_id) ++ if (id == visual_id || id == 0) + return i; + } + +-- +1.9.1 + diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch new file mode 100644 index 00000000..126d4ed3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch @@ -0,0 +1,39 @@ +From 0d15218ced5bf2e6f3d05758f0f5f21c2a0303f2 Mon Sep 17 00:00:00 2001 +From: Eric Ruei +Date: Thu, 9 Mar 2017 14:33:08 -0500 +Subject: [PATCH 3/4] Weston: Fix virtual keyboard display issue for QT5 + application + +The virtual keyboard does pop up as expected, however, it will never hide +even when the application is terminated. This problem is due to the order +of the text APIs( text_input_activate and test_input_show_input_panel) are +invoked in QT5 and a potential bug of the API implementation. The virtual +keyboard works as expected if the test_input_show_input_panel() is invoked +prior to the test_input_activate() as most of the weston sample applications +do. However, the problem will show up if that order is reversed and the reason +why is that the current_panel is not set in this case and hence this panel +cannot be hidden. + +It is required to set the current_panel to the text_input when the input_panel +becomes visible at the first time. + +Updated for weston 5.0.0 by Scott Murray . + +Signed-off-by: Eric Ruei +Signed-off-by: Scott Murray +--- + compositor/text-backend.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/compositor/text-backend.c b/compositor/text-backend.c +index 664c36f7..b610dfb1 100644 +--- a/compositor/text-backend.c ++++ b/compositor/text-backend.c +@@ -349,6 +349,7 @@ text_input_show_input_panel(struct wl_client *client, + text_input->surface); + wl_signal_emit(&ec->update_input_panel_signal, + &text_input->cursor_rectangle); ++ text_input->manager->current_text_input = text_input; + } + } + diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch new file mode 100644 index 00000000..ba20551e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch @@ -0,0 +1,36 @@ +From 8958bf21960a475d2933e688d0da9a0d2186d509 Mon Sep 17 00:00:00 2001 +From: Eric Ruei +Date: Thu, 9 Mar 2017 14:34:18 -0500 +Subject: [PATCH 4/4] Weston: Fix touch screen crash issue + +Touch screen operation causes the weston to crash with segment fault sometimes. +The crash occurs when the coordinate (x,y) passed to the weston input module +is outside the view window, hence the weston compositor is not able to pick +up a display view and there is no code to detect this condition at function +notify_touch(). + +Signed-off-by: Eric Ruei +--- + libweston/input.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libweston/input.c b/libweston/input.c +index 8fe898c..0f72d23 100644 +--- a/libweston/input.c ++++ b/libweston/input.c +@@ -1848,6 +1848,12 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id, + * until all touch points are up again. */ + if (touch->num_tp == 1) { + ev = weston_compositor_pick_view(ec, x, y, &sx, &sy); ++ if (!ev) ++ { ++ weston_log("notify_touch: weston_compositor_pick_view(%d, %d) failed to find a view!\n", ++ wl_fixed_to_int(x), wl_fixed_to_int(y)); ++ return; ++ } + weston_touch_set_focus(touch, ev); + } else if (!touch->focus) { + /* Unexpected condition: We have non-initial touch but +-- +1.9.1 + diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend new file mode 100644 index 00000000..5d27bb8e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend @@ -0,0 +1,25 @@ +# When configured for fbdev compositor, make it the default +PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor WESTON_NATIVE_BACKEND="fbdev-backend.so",--disable-fbdev-compositor,udev mtdev" +PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev libgbm mtdev" + +PR_append = ".agl_arago_23" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +RDEPENDS_${PN} += "weston-conf" + +####################### F I X M E ########################## +DISABLED_SRC_URI += " \ + file://0001-Add-soc-performance-monitor-utilites.patch \ +" +####################### F I X M E ########################## + +SRC_URI += " \ + file://0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch \ + file://0002-Weston-Allow-visual_id-to-be-0.patch \ + file://0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \ + file://0004-Weston-Fix-touch-screen-crash-issue.patch \ +" + + +RDEPENDS_${PN}_remove = "weston-conf" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state.bbappend new file mode 100644 index 00000000..3b2b8beb --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend_dra7xx-evm := "${THISDIR}/${PN}:" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state/asound.state b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state/asound.state new file mode 100644 index 00000000..fe3ce679 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state/asound.state @@ -0,0 +1,1347 @@ +state.DRA7xxEVM { + control.1 { + iface MIXER + name 'Left Line Mixer Line2R Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.2 { + iface MIXER + name 'Right Line Mixer Line2L Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.3 { + iface MIXER + name 'Left HP Mixer Line2R Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.4 { + iface MIXER + name 'Right HP Mixer Line2L Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.5 { + iface MIXER + name 'Left HPCOM Mixer Line2R Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.6 { + iface MIXER + name 'Right HPCOM Mixer Line2L Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.7 { + iface MIXER + name 'Line Line2 Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.8 { + iface MIXER + name 'HP Line2 Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.9 { + iface MIXER + name 'HPCOM Line2 Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.10 { + iface MIXER + name 'Mono Line2 Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.11 { + iface MIXER + name 'Mono PGA Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.12 { + iface MIXER + name 'Mono DAC Playback Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.13 { + iface MIXER + name 'Mono Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.14 { + iface MIXER + name 'PCM Playback Volume' + value.0 127 + value.1 127 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 127' + dbmin -6350 + dbmax 0 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.15 { + iface MIXER + name 'Left Line Mixer PGAR Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.16 { + iface MIXER + name 'Left Line Mixer DACR1 Playback Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.17 { + iface MIXER + name 'Right Line Mixer PGAL Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.18 { + iface MIXER + name 'Right Line Mixer DACL1 Playback Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.19 { + iface MIXER + name 'Left HP Mixer PGAR Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.20 { + iface MIXER + name 'Left HP Mixer DACR1 Playback Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.21 { + iface MIXER + name 'Right HP Mixer PGAL Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.22 { + iface MIXER + name 'Right HP Mixer DACL1 Playback Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.23 { + iface MIXER + name 'Left HPCOM Mixer PGAR Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.24 { + iface MIXER + name 'Left HPCOM Mixer DACR1 Playback Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.25 { + iface MIXER + name 'Right HPCOM Mixer PGAL Bypass Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.26 { + iface MIXER + name 'Right HPCOM Mixer DACL1 Playback Volume' + value 118 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + } + } + control.27 { + iface MIXER + name 'Line PGA Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.28 { + iface MIXER + name 'Line DAC Playback Volume' + value.0 118 + value.1 118 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.29 { + iface MIXER + name 'HP PGA Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.30 { + iface MIXER + name 'HP DAC Playback Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.31 { + iface MIXER + name 'HPCOM PGA Bypass Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.32 { + iface MIXER + name 'HPCOM DAC Playback Volume' + value.0 71 + value.1 71 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 118' + dbmin -9999999 + dbmax 0 + dbvalue.0 -2350 + dbvalue.1 -2350 + } + } + control.33 { + iface MIXER + name 'Line Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.34 { + iface MIXER + name 'HP Playback Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.35 { + iface MIXER + name 'HPCOM Playback Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.36 { + iface MIXER + name 'AGC Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.37 { + iface MIXER + name 'Left AGC Target level' + value '-5.5dB' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '-5.5dB' + item.1 '-8dB' + item.2 '-10dB' + item.3 '-12dB' + item.4 '-14dB' + item.5 '-17dB' + item.6 '-20dB' + item.7 '-24dB' + } + } + control.38 { + iface MIXER + name 'Right AGC Target level' + value '-5.5dB' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '-5.5dB' + item.1 '-8dB' + item.2 '-10dB' + item.3 '-12dB' + item.4 '-14dB' + item.5 '-17dB' + item.6 '-20dB' + item.7 '-24dB' + } + } + control.39 { + iface MIXER + name 'Left AGC Attack time' + value '8ms' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '8ms' + item.1 '11ms' + item.2 '16ms' + item.3 '20ms' + } + } + control.40 { + iface MIXER + name 'Right AGC Attack time' + value '8ms' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '8ms' + item.1 '11ms' + item.2 '16ms' + item.3 '20ms' + } + } + control.41 { + iface MIXER + name 'Left AGC Decay time' + value '100ms' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '100ms' + item.1 '200ms' + item.2 '400ms' + item.3 '500ms' + } + } + control.42 { + iface MIXER + name 'Right AGC Decay time' + value '100ms' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '100ms' + item.1 '200ms' + item.2 '400ms' + item.3 '500ms' + } + } + control.43 { + iface MIXER + name 'De-emphasis Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.44 { + iface MIXER + name 'PGA Capture Volume' + value.0 79 + value.1 79 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 119' + dbmin 0 + dbmax 5950 + dbvalue.0 3950 + dbvalue.1 3950 + } + } + control.45 { + iface MIXER + name 'PGA Capture Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.46 { + iface MIXER + name 'ADC HPF Cut-off' + value.0 Disabled + value.1 Disabled + comment { + access 'read write' + type ENUMERATED + count 2 + item.0 Disabled + item.1 '0.0045xFs' + item.2 '0.0125xFs' + item.3 '0.025xFs' + } + } + control.47 { + iface MIXER + name 'Output Driver Power-On time' + value '0us' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '0us' + item.1 '10us' + item.2 '100us' + item.3 '1ms' + item.4 '10ms' + item.5 '50ms' + item.6 '100ms' + item.7 '200ms' + item.8 '400ms' + item.9 '800ms' + item.10 '2s' + item.11 '4s' + } + } + control.48 { + iface MIXER + name 'Output Driver Ramp-up step' + value '0ms' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 '0ms' + item.1 '1ms' + item.2 '2ms' + item.3 '4ms' + } + } + control.49 { + iface MIXER + name 'Left DAC Mux' + value DAC_L1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 DAC_L1 + item.1 DAC_L3 + item.2 DAC_L2 + } + } + control.50 { + iface MIXER + name 'Left HPCOM Mux' + value 'differential of HPLOUT' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'differential of HPLOUT' + item.1 'constant VCM' + item.2 single-ended + } + } + control.51 { + iface MIXER + name 'Right DAC Mux' + value DAC_R1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 DAC_R1 + item.1 DAC_R3 + item.2 DAC_R2 + } + } + control.52 { + iface MIXER + name 'Right HPCOM Mux' + value 'differential of HPROUT' + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 'differential of HPROUT' + item.1 'constant VCM' + item.2 single-ended + item.3 'differential of HPLCOM' + item.4 'external feedback' + } + } + control.53 { + iface MIXER + name 'Left Line1L Mux' + value single-ended + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 single-ended + item.1 differential + } + } + control.54 { + iface MIXER + name 'Left Line1R Mux' + value single-ended + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 single-ended + item.1 differential + } + } + control.55 { + iface MIXER + name 'Right Line1L Mux' + value single-ended + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 single-ended + item.1 differential + } + } + control.56 { + iface MIXER + name 'Right Line1R Mux' + value single-ended + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 single-ended + item.1 differential + } + } + control.57 { + iface MIXER + name 'Left PGA Mixer Line1L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.58 { + iface MIXER + name 'Left PGA Mixer Line1R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.59 { + iface MIXER + name 'Left PGA Mixer Line2L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.60 { + iface MIXER + name 'Left PGA Mixer Mic3L Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.61 { + iface MIXER + name 'Left PGA Mixer Mic3R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.62 { + iface MIXER + name 'Left Line2L Mux' + value single-ended + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 single-ended + item.1 differential + } + } + control.63 { + iface MIXER + name 'Right PGA Mixer Line1R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.64 { + iface MIXER + name 'Right PGA Mixer Line1L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.65 { + iface MIXER + name 'Right PGA Mixer Line2R Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.66 { + iface MIXER + name 'Right PGA Mixer Mic3L Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.67 { + iface MIXER + name 'Right PGA Mixer Mic3R Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.68 { + iface MIXER + name 'Right Line2R Mux' + value single-ended + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 single-ended + item.1 differential + } + } + control.69 { + iface MIXER + name 'Left Line Mixer PGAL Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.70 { + iface MIXER + name 'Left Line Mixer DACL1 Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.71 { + iface MIXER + name 'Left Line Mixer PGAR Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.72 { + iface MIXER + name 'Left Line Mixer DACR1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.73 { + iface MIXER + name 'Left Line Mixer Line2L Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.74 { + iface MIXER + name 'Left Line Mixer Line2R Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.75 { + iface MIXER + name 'Right Line Mixer PGAL Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.76 { + iface MIXER + name 'Right Line Mixer DACL1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.77 { + iface MIXER + name 'Right Line Mixer PGAR Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.78 { + iface MIXER + name 'Right Line Mixer DACR1 Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.79 { + iface MIXER + name 'Right Line Mixer Line2L Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.80 { + iface MIXER + name 'Right Line Mixer Line2R Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.81 { + iface MIXER + name 'Left HP Mixer PGAL Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.82 { + iface MIXER + name 'Left HP Mixer DACL1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.83 { + iface MIXER + name 'Left HP Mixer PGAR Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.84 { + iface MIXER + name 'Left HP Mixer DACR1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.85 { + iface MIXER + name 'Left HP Mixer Line2L Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.86 { + iface MIXER + name 'Left HP Mixer Line2R Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.87 { + iface MIXER + name 'Right HP Mixer PGAL Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.88 { + iface MIXER + name 'Right HP Mixer DACL1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.89 { + iface MIXER + name 'Right HP Mixer PGAR Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.90 { + iface MIXER + name 'Right HP Mixer DACR1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.91 { + iface MIXER + name 'Right HP Mixer Line2L Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.92 { + iface MIXER + name 'Right HP Mixer Line2R Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.93 { + iface MIXER + name 'Left HPCOM Mixer PGAL Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.94 { + iface MIXER + name 'Left HPCOM Mixer DACL1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.95 { + iface MIXER + name 'Left HPCOM Mixer PGAR Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.96 { + iface MIXER + name 'Left HPCOM Mixer DACR1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.97 { + iface MIXER + name 'Left HPCOM Mixer Line2L Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.98 { + iface MIXER + name 'Left HPCOM Mixer Line2R Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.99 { + iface MIXER + name 'Right HPCOM Mixer PGAL Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.100 { + iface MIXER + name 'Right HPCOM Mixer DACL1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.101 { + iface MIXER + name 'Right HPCOM Mixer PGAR Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.102 { + iface MIXER + name 'Right HPCOM Mixer DACR1 Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.103 { + iface MIXER + name 'Right HPCOM Mixer Line2L Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.104 { + iface MIXER + name 'Right HPCOM Mixer Line2R Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.105 { + iface MIXER + name 'Mono Mixer Line2L Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.106 { + iface MIXER + name 'Mono Mixer PGAL Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.107 { + iface MIXER + name 'Mono Mixer DACL1 Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.108 { + iface MIXER + name 'Mono Mixer Line2R Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.109 { + iface MIXER + name 'Mono Mixer PGAR Bypass Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.110 { + iface MIXER + name 'Mono Mixer DACR1 Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +} +state.H58040000encode { + control { + } +} diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend new file mode 100644 index 00000000..1fc5130f --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend @@ -0,0 +1,3 @@ +# We need to override some of the build in defaults and the recipe is very +# strict in how it grabs the correct compiler. Pass in our override here. +TOOLCHAIN_OPTIONS += "${SECURITY_NOPIE_CFLAGS}" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch new file mode 100644 index 00000000..9fdd95b4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch @@ -0,0 +1,12 @@ +diff --git a/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk b/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk +new file mode 100644 +index 0000000..2abaa9f +--- /dev/null ++++ b/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk +@@ -0,0 +1,6 @@ ++# 32-bit ARM hard float compiler ++ifeq ($(MULTIARCH),1) ++ TARGET_SECONDARY_ARCH := target_armhf ++else ++ TARGET_PRIMARY_ARCH := target_armhf ++endif diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend new file mode 100644 index 00000000..182f6cac --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://add-AGL-toolchain-config.patch" +SRCREV = "16961a3f4524b653fba99d949d6972c77c7d2701" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/files/uEnv.txt b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/files/uEnv.txt new file mode 100755 index 00000000..79f3d1ff --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/files/uEnv.txt @@ -0,0 +1 @@ +fdtfile=dra7-evm-lcd-osd101t2045.dtb diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_%.bbappend new file mode 100644 index 00000000..d1b9b270 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_%.bbappend @@ -0,0 +1,16 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +PR_append = "_agl" + +SRC_URI += " file://${UBOOT_ENV_BINARY}" + +UBOOT_ENV = "uEnv" + +do_deploy_append () { + if [ "x${UBOOT_ENV}" != "x" ] + then + install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} + ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} + fi +} + diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend new file mode 100644 index 00000000..7a16fbfe --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend @@ -0,0 +1,2 @@ +# Hotfix for rpm metadata clash with ti-sgx-ddk-um-dev +DIRFILES = "1" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um/pvr.service b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um/pvr.service new file mode 100644 index 00000000..1acb94fd --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um/pvr.service @@ -0,0 +1,19 @@ +[Unit] +Description=PVR service +SourcePath=/etc/ti-sgx/rc.pvr +DefaultDependencies=no +Before=psplash-start.service + +[Service] +Type=forking +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +ExecStart=/etc/ti-sgx/rc.pvr start +ExecStop=/etc/ti-sgx/rc.pvr stop + +[Install] +WantedBy=sysinit.target diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend new file mode 100644 index 00000000..fe93f1a6 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend @@ -0,0 +1,22 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" +FILES_${PN} += "/etc/ti-sgx/" + +SRC_URI_append = "\ + file://pvr.service \ +" + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "pvr.service" + +do_install_append() { + install -d ${D}${systemd_system_unitdir} + install -m 0755 ${WORKDIR}/pvr.service ${D}${systemd_system_unitdir} + install -d ${D}/etc/ti-sgx + install -m 0755 ${D}/etc/init.d/rc.pvr ${D}/etc/ti-sgx +} + + +# Fix for rpm metadata clash with libgbm-dev +DIRFILES = "1" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend new file mode 100644 index 00000000..a5a69513 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend @@ -0,0 +1,7 @@ +# Remove GBM support from Mesa +# TI Platforms provides own GBM library + +PACKAGES_remove = "libgbm" +PACKAGES_remove = "libgbm-dev" + +EXTRA_OECONF_remove = "--enable-gbm" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..684031ea --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# While we could have a panel attached to HDMI, we only use the default +# panel isntead. +SRC_URI_remove_dra7xx-evm = "file://hdmi-a-1-270.cfg" +# Our DPI panel shows up as "UNNAMED-1" +SRC_URI_append_dra7xx-evm = " file://unnamed.cfg" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf/unnamed.cfg b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf/unnamed.cfg new file mode 100644 index 00000000..29544932 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf/unnamed.cfg @@ -0,0 +1,3 @@ +[output] +name=UNNAMED-1 +transform=270 diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch new file mode 100644 index 00000000..6c54c5ee --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch @@ -0,0 +1,39 @@ +diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts +index 35424da..08fca09 100644 +--- a/arch/arm/boot/dts/dra7-evm.dts ++++ b/arch/arm/boot/dts/dra7-evm.dts +@@ -243,6 +243,20 @@ + DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */ + >; + }; ++ dcan2_pins_default: dcan2_pins_default { ++ pinctrl-single,pins = < ++ DRA7XX_CORE_IOPAD(0x3688, PIN_OUTPUT_PULLUP | MUX_MODE2) /* gpio6_14.dcan2_tx */ ++ DRA7XX_CORE_IOPAD(0x368C, PIN_INPUT_PULLUP | MUX_MODE2) /* gpio6_15.dcan2_rx */ ++ >; ++ }; ++ ++ dcan2_pins_sleep: dcan2_pins_sleep { ++ pinctrl-single,pins = < ++ DRA7XX_CORE_IOPAD(0x3688, MUX_MODE15 | PULL_UP) /* gpio6_14.dcan2_tx.off */ ++ DRA7XX_CORE_IOPAD(0x368C, MUX_MODE15 | PULL_UP) /* gpio6_15.dcan2_rx.off */ ++ >; ++ }; ++ + }; + + &i2c1 { +@@ -703,6 +717,13 @@ + memory-region = <&ipu1_memory_region>; + }; + ++&dcan2 { ++ status = "ok"; ++ pinctrl-names = "default", "sleep"; ++ pinctrl-0 = <&dcan2_pins_default>; ++ pinctrl-1 = <&dcan2_pins_sleep>; ++}; ++ + &dsp1 { + status = "okay"; + memory-region = <&dsp1_memory_region>; diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend new file mode 100644 index 00000000..2f6c449b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend @@ -0,0 +1,11 @@ +require recipes-kernel/linux/linux-agl.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +#------------------------------------------------------------------------- +# patches for enabling dcan2 and fix dcan1 & dcan2 adresses + +SRC_URI += " \ + file://dcan2_pinmux_enable.patch \ +" + diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio/dra7xx-evm-set-default-sink-source.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio/dra7xx-evm-set-default-sink-source.patch new file mode 100644 index 00000000..d45c5ef5 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio/dra7xx-evm-set-default-sink-source.patch @@ -0,0 +1,15 @@ +--- pulseaudio-9.0/src/daemon/default.pa.in.orig 2017-08-04 00:07:08.833004893 +0300 ++++ pulseaudio-9.0/src/daemon/default.pa.in 2017-08-04 00:09:18.045102067 +0300 +@@ -162,8 +162,10 @@ + ])dnl + + ### Make some devices default +-#set-default-sink output +-#set-default-source input ++# DRA7xx-EVM CPU Board Line-Out/Headphone ++set-default-sink alsa_output.platform-sound0.analog-stereo ++# DRA7xx-EVM CPU Board Microphone/Line-In ++set-default-source alsa_input.platform-sound0.analog-stereo + + .ifexists module-router.so + load-module module-router diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend new file mode 100644 index 00000000..37c4179e --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/pulseaudio:" + +################### F I X M E #################### +# FIXME pyro +DISABLED_SRC_URI += " \ + file://dra7xx-evm-set-default-sink-source.patch \ +" diff --git a/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch new file mode 100644 index 00000000..5172fdd3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch @@ -0,0 +1,41 @@ +From ebb26338d0c2f436a86fd4d7cb8d723a90d6a369 Mon Sep 17 00:00:00 2001 +From: Anton Gerasimov +Date: Thu, 15 Sep 2016 17:52:41 +0200 +Subject: [PATCH 1/2] Set up environment for OSTree integration + +--- + include/configs/qemu-x86.h | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h +index 78c296f..79df455 100644 +--- a/include/configs/qemu-x86.h ++++ b/include/configs/qemu-x86.h +@@ -74,4 +74,24 @@ + #undef CONFIG_ENV_IS_IN_SPI_FLASH + #define CONFIG_ENV_IS_NOWHERE + ++#undef CONFIG_BOOTARGS ++#define CONFIG_BOOTARGS "root=/dev/hda2 console=ttyS0" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run loadenv;" \ ++ "setenv bootargs $bootargs\" console=ttyS0 root=/dev/ram0 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda ramdisk_size=16384 \";" \ ++ "ext2load ide 0 $loadaddr \"/boot\"$kernel_image;" \ ++ "ext2load ide 0 $ramdiskaddr \"/boot\"$ramdisk_image;" \ ++ "zboot $loadaddr - $ramdiskaddr $filesize" ++ ++#undef CONFIG_EXTRA_ENV_SETTINGS ++#define CONFIG_EXTRA_ENV_SETTINGS "kernel_image=/bzImage\0" \ ++ "ramdisk_image=/initrd\0" \ ++ "ramdiskaddr=0x4000000\0" \ ++ "bootdelay=3\0" \ ++ "loadenv=if ext2load ide 0 $loadaddr /boot/loader/uEnv.txt; then env import -t $loadaddr $filesize; fi;" ++ + #endif /* __CONFIG_H */ +-- +2.9.3 + diff --git a/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch new file mode 100644 index 00000000..df1f786c --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch @@ -0,0 +1,86 @@ +From ba619c7ec7820e80d1b5b520440fdb81c31c0baf Mon Sep 17 00:00:00 2001 +From: Ronan Le Martret +Date: Fri, 14 Oct 2016 09:03:11 +0200 +Subject: [PATCH] fix gcc6 build + +Signed-off-by: ronan +--- + include/linux/compiler-gcc6.h | 66 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 66 insertions(+) + create mode 100644 include/linux/compiler-gcc6.h + +diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h +new file mode 100644 +index 0000000..a3d00d8 +--- /dev/null ++++ b/include/linux/compiler-gcc6.h +@@ -0,0 +1,66 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ Early snapshots of gcc 4.3 don't support this and we can't detect this ++ in the preprocessor, but we can live with this because they're unreleased. ++ Maketime probing would be overkill here. ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * Fixed in GCC 4.8.2 and later versions. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.6.6 + diff --git a/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch new file mode 100644 index 00000000..7540b746 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch @@ -0,0 +1,138 @@ +From ab0d7e270d89f6eb99582197d2d58bf60c9c3d26 Mon Sep 17 00:00:00 2001 +From: Anton Gerasimov +Date: Thu, 15 Sep 2016 16:49:32 +0200 +Subject: [PATCH 2/2] Replace wraps with built-in code to remove dependency on + multilib + +--- + arch/x86/config.mk | 2 -- + arch/x86/lib/gcc.c | 104 ++++++++++++++++++++++++++++++++++++++++++++--------- + 2 files changed, 87 insertions(+), 19 deletions(-) + +diff --git a/arch/x86/config.mk b/arch/x86/config.mk +index 999143e..139576e 100644 +--- a/arch/x86/config.mk ++++ b/arch/x86/config.mk +@@ -22,5 +22,3 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden + PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386 + + LDFLAGS_FINAL += --gc-sections -pie +-LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 +-LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 +diff --git a/arch/x86/lib/gcc.c b/arch/x86/lib/gcc.c +index 497ad75..c321b11 100644 +--- a/arch/x86/lib/gcc.c ++++ b/arch/x86/lib/gcc.c +@@ -19,22 +19,92 @@ + + #ifdef __GNUC__ + +-/* +- * GCC's libgcc handling is quite broken. While the libgcc functions +- * are always regparm(0) the code that calls them uses whatever the +- * compiler call specifies. Therefore we need a wrapper around those +- * functions. See gcc bug PR41055 for more information. +- */ +-#define WRAP_LIBGCC_CALL(type, name) \ +- type __normal_##name(type a, type b) __attribute__((regparm(0))); \ +- type __wrap_##name(type a, type b); \ +- type __attribute__((no_instrument_function)) \ +- __wrap_##name(type a, type b) \ +- { return __normal_##name(a, b); } +- +-WRAP_LIBGCC_CALL(long long, __divdi3) +-WRAP_LIBGCC_CALL(unsigned long long, __udivdi3) +-WRAP_LIBGCC_CALL(long long, __moddi3) +-WRAP_LIBGCC_CALL(unsigned long long, __umoddi3) ++#include ++#include ++ ++uint64_t __udivmoddi4 ( uint64_t num, ++ uint64_t den, ++ uint64_t *rem_p ) ++{ ++ uint64_t quot = 0, qbit = 1; ++ ++ if ( den == 0 ) { ++ return 1/((unsigned)den); /* Intentional divide by zero, without ++ triggering a compiler warning which ++ would abort the build */ ++ } ++ ++ /* Left-justify denominator and count shift */ ++ while ( (int64_t)den >= 0 ) { ++ den <<= 1; ++ qbit <<= 1; ++ } ++ ++ while ( qbit ) { ++ if ( den <= num ) { ++ num -= den; ++ quot += qbit; ++ } ++ den >>= 1; ++ qbit >>= 1; ++ } ++ ++ if ( rem_p ) ++ *rem_p = num; ++ ++ return quot; ++} ++uint64_t __udivdi3( uint64_t num, uint64_t den ) ++{ ++ return __udivmoddi4(num, den, NULL); ++} ++ ++uint64_t __umoddi3 ( uint64_t num, uint64_t den ) ++{ ++ uint64_t v; ++ ++ (void) __udivmoddi4(num, den, &v); ++ return v; ++} ++ ++int64_t __divmoddi4 ( int64_t num, ++ int64_t den, ++ int64_t* rem_p ) ++{ ++ int minus = 0; ++ int64_t v; ++ ++ if ( num < 0 ) { ++ num = -num; ++ minus = 1; ++ } ++ if ( den < 0 ) { ++ den = -den; ++ minus ^= 1; ++ } ++ ++ v = __udivmoddi4(num, den, (uint64_t *)rem_p); ++ if ( minus ) { ++ v = -v; ++ if ( rem_p ) ++ *rem_p = -(*rem_p); ++ } ++ ++ return v; ++} ++ ++ ++int64_t __moddi3 (int64_t num, int64_t den) ++{ ++ int64_t v; ++ ++ (void) __divmoddi4(num, den, &v); ++ return v; ++} ++ ++int64_t __divdi3(int64_t num, int64_t den) ++{ ++ return __divmoddi4(num, den, NULL); ++} + + #endif +-- +2.9.3 + diff --git a/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch new file mode 100644 index 00000000..fc7933ea --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch @@ -0,0 +1,101 @@ +From eea58226f0b604d3047c495985197113838d3a7a Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Tue, 20 Jun 2017 13:25:20 -0400 +Subject: [PATCH] fix build for gcc7 + +| In file included from .../include/linux/compiler.h:54:0, +| from .../include/uapi/linux/stddef.h:1, +| from .../include/linux/stddef.h:4, +| from .../include/uapi/linux/posix_types.h:4, +| from .../include/uapi/linux/types.h:13, +| from .../include/linux/types.h:5, +| from .../include/linux/mod_devicetable.h:11, +| from .../scripts/mod/devicetable-offsets.c:2: +| .../include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory +| #include gcc_header(__GNUC__) + +Upstream-Status: Pending + +Signed-off-by: Trevor Woerner +Signed-off-by: Fabio Berton +Signed-off-by: Leon Anavi +--- + include/linux/compiler-gcc7.h | 66 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 66 insertions(+) + create mode 100644 include/linux/compiler-gcc7.h + +diff --git a/include/linux/compiler-gcc7.h b/include/linux/compiler-gcc7.h +new file mode 100644 +index 0000000..cdd1cc2 +--- /dev/null ++++ b/include/linux/compiler-gcc7.h +@@ -0,0 +1,66 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ Early snapshots of gcc 4.3 don't support this and we can't detect this ++ in the preprocessor, but we can live with this because they're unreleased. ++ Maketime probing would be overkill here. ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * Fixed in GCC 4.8.2 and later versions. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.7.4 + diff --git a/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb new file mode 100644 index 00000000..7ef3cacd --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb @@ -0,0 +1,29 @@ +include recipes-bsp/u-boot/u-boot.inc +DEPENDS += "dtc-native" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95" + +# This revision corresponds to the tag "v2015.07" +# We use the revision in order to avoid having to fetch it from the +# repo during parse +SRCREV = "baba2f57e8f4ed3fa67fe213d22da0de5e00f204" + +SRC_URI = "\ + git://git.denx.de/u-boot.git;branch=master \ + file://0001-Set-up-environment-for-OSTree-integration.patch \ + file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \ + file://0001-fixup-build-with-gcc6.patch \ + file://0002-fixup-build-with-gcc7.patch \ +" +S = "${WORKDIR}/git" + +PV = "v2015.07+git${SRCPV}" + +EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline " +EXTRA_OEMAKE_append_qemux86 = " BUILD_ROM=y" +EXTRA_OEMAKE_append_qemux86-64 = " BUILD_ROM=y" + +UBOOT_SUFFIX = "bin" +UBOOT_SUFFIX_qemux86 = "rom" +UBOOT_SUFFIX_qemux86-64 = "rom" diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch b/meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch new file mode 100644 index 00000000..fb574847 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch @@ -0,0 +1,26 @@ +diff --git a/modules/videoio/src/cap_libv4l.cpp b/modules/videoio/src/cap_libv4l.cpp +index d82ad43..a3929a6 100644 +--- a/modules/videoio/src/cap_libv4l.cpp ++++ b/modules/videoio/src/cap_libv4l.cpp +@@ -271,7 +271,7 @@ make & enjoy! + #define DEFAULT_V4L_HEIGHT 480 + + #define CHANNEL_NUMBER 1 +-#define MAX_CAMERAS 8 ++#define MAX_CAMERAS 16 + + + // default and maximum number of V4L buffers, not including last, 'special' buffer +diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp +index 37d93cd..6b4321c 100644 +--- a/modules/videoio/src/cap_v4l.cpp ++++ b/modules/videoio/src/cap_v4l.cpp +@@ -241,7 +241,7 @@ make & enjoy! + #define DEFAULT_V4L_FPS 30 + + #define CHANNEL_NUMBER 1 +-#define MAX_CAMERAS 8 ++#define MAX_CAMERAS 16 + + + // default and maximum number of V4L buffers, not including last, 'special' buffer diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv_3.%.bbappend b/meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv_3.%.bbappend new file mode 100644 index 00000000..8a68b064 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/opencv/opencv_3.%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0004-Change-Max-Device-Count-To-16.patch \ + " diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/wayland-protocols_1.17.bb b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/wayland-protocols_1.17.bb new file mode 100644 index 00000000..ee9e3d43 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/wayland-protocols_1.17.bb @@ -0,0 +1,24 @@ +SUMMARY = "Collection of additional Wayland protocols" +DESCRIPTION = "Wayland protocols that add functionality not \ +available in the Wayland core protocol. Such protocols either add \ +completely new functionality, or extend the functionality of some other \ +protocol either in Wayland core, or some other protocol in \ +wayland-protocols." +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ + file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + " +SRC_URI[md5sum] = "e0b523ff162e30bab46be1d65d527683" +SRC_URI[sha256sum] = "6b1485951fdcd36a960c870c46f28b03a3e5121fb46246916333ed07f78c98c5" +SRC_URI[md5sum] = "55ddd5fdb02b73b9de9559aaec267315" +SRC_URI[sha256sum] = "df1319cf9705643aea9fd16f9056f4e5b2471bd10c0cc3713d4a4cdc23d6812f" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit allarch autotools pkgconfig + +PACKAGES = "${PN}" +FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bb new file mode 100644 index 00000000..4628f96f --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bb @@ -0,0 +1,30 @@ +SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://core.cfg \ + file://ivishell.cfg \ + file://id-agent.cfg \ + file://shell.cfg \ + file://hdmi-a-1-270.cfg \ + " + +S = "${WORKDIR}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_compile() { + # Put all of our cfg files together. + rm -f ${WORKDIR}/weston.ini + for F in ${WORKDIR}/*.cfg; do + cat $F >> ${WORKDIR}/weston.ini + echo >> ${WORKDIR}/weston.ini + done + sed -i -e '$ d' ${WORKDIR}/weston.ini +} + +do_install_append() { + WESTON_INI_CONFIG=${sysconfdir}/xdg/weston + install -d ${D}${WESTON_INI_CONFIG} + install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini +} diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend new file mode 100644 index 00000000..00cd35b3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI += "${@bb.utils.contains("DISTRO_FEATURES", "gst-record", "file://virtualoutput.cfg", "",d)}" + +do_configure_append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'gst-record', 'true', 'false', d)}; then + echo virtual=1 >> ${WORKDIR}/core.cfg + fi +} + diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg new file mode 100644 index 00000000..eb5d470e --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg @@ -0,0 +1,5 @@ +[core] +shell=ivi-shell.so +backend=drm-backend.so +require-input=false +modules=systemd-notify.so,ivi-controller.so diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg new file mode 100644 index 00000000..dffc2b6d --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg @@ -0,0 +1,6 @@ +# A display is connected to HDMI-A-1 and needs to be rotated 270 degrees +# to have a proper orientation of the homescreen. For example the various sizes +# of the GeChic display or the Dell display. +[output] +name=HDMI-A-1 +transform=270 diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg new file mode 100644 index 00000000..88a692a1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg @@ -0,0 +1,6 @@ +# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees +# to have a proper orientation of the homescreen. For example, the 'eGalax' +# display used in some instances. +[output] +name=HDMI-A-1 +transform=90 diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/id-agent.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/id-agent.cfg new file mode 100644 index 00000000..c8529925 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/id-agent.cfg @@ -0,0 +1,3 @@ +[desktop-app-default] +default-surface-id=2000000 +default-surface-id-max=2001000 diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg new file mode 100644 index 00000000..d0bcb833 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/ivishell.cfg @@ -0,0 +1,3 @@ +[ivi-shell] +ivi-input-module=ivi-input-controller.so +ivi-id-agent-module=ivi-id-agent.so diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/shell.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/shell.cfg new file mode 100644 index 00000000..975e539e --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/shell.cfg @@ -0,0 +1,3 @@ +[shell] +locking=true +panel-position=none diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg new file mode 100644 index 00000000..51985127 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg @@ -0,0 +1,5 @@ +[remote-output] +name=remote-1 +mode=384x368@30 +host=192.168.20.99 +port=5005 diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch new file mode 100644 index 00000000..0eb3d95a --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-make-error-portable.patch @@ -0,0 +1,78 @@ +From c4677e155736062e75687f1a655732c8902e912b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 29 May 2015 20:56:00 -0700 +Subject: [PATCH] make error() portable + +error() is not posix but gnu extension so may not be available on all +kind of systemsi e.g. musl. + +Upstream-Status: Submitted + +Signed-off-by: Khem Raj + +--- + configure.ac | 2 ++ + libweston/weston-error.h | 20 ++++++++++++++++++++ + libweston/weston-launch.c | 2 +- + 3 files changed, 23 insertions(+), 1 deletion(-) + create mode 100644 libweston/weston-error.h + +diff --git a/configure.ac b/configure.ac +index c05ad01..6da6e04 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -126,6 +126,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], + [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")], + [[#include ]]) + ++AC_CHECK_HEADERS([error.h]) ++ + AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) + + # check for libdrm as a build-time dependency only +diff --git a/libweston/weston-error.h b/libweston/weston-error.h +new file mode 100644 +index 0000000..2089d02 +--- /dev/null ++++ b/libweston/weston-error.h +@@ -0,0 +1,20 @@ ++#ifndef _WESTON_ERROR_H ++#define _WESTON_ERROR_H ++ ++#if defined(HAVE_ERROR_H) ++#include ++#else ++#include ++#include ++#define _weston_error(S, E, F, ...) do { \ ++ if (E) \ ++ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ ++ else \ ++ err(S, F, ##__VA_ARGS__); \ ++} while(0) ++ ++#define error _weston_error ++#endif ++ ++#endif ++ +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index bf73e0d..9064439 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c +@@ -33,7 +33,6 @@ + #include + #include + +-#include + #include + + #include +@@ -59,6 +58,7 @@ + #endif + + #include "weston-launch.h" ++#include "weston-error.h" + + #define DRM_MAJOR 226 + diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch new file mode 100644 index 00000000..d648538b --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -0,0 +1,173 @@ +From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein +Date: Wed, 22 Feb 2017 15:53:30 +0200 +Subject: [PATCH] weston-launch: Provide a default version that doesn't require PAM + +weston-launch requires PAM for starting weston as a non-root user. + +Since starting weston as root is a valid use case by itself, if +PAM is not available, provide a default version of weston-launch +without non-root-user support. + +Upstream-Status: Pending + +Signed-off-by: Tom Hochstein +Signed-off-by: Jussi Kukkonen +Signed-off-by: Denys Dmytriyenko + +--- + configure.ac | 9 +++++++-- + libweston/weston-launch.c | 20 ++++++++++++++++++++ + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index dc9c802..48cf5cb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -451,13 +451,17 @@ AC_ARG_ENABLE(resize-optimization, + AS_IF([test "x$enable_resize_optimization" = "xyes"], + [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) + ++AC_ARG_WITH(pam, ++ AS_HELP_STRING([--with-pam], [Use PAM]), ++ [use_pam=$withval], [use_pam=yes]) + AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) + AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) +-if test x$enable_weston_launch = xyes; then ++if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then + WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) + if test x$have_pam = xno; then +- AC_ERROR([weston-launch requires pam]) ++ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) + fi ++ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) + fi + + AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") +@@ -702,6 +706,7 @@ AC_MSG_RESULT([ + Enable developer documentation ${enable_devdocs} + + weston-launch utility ${enable_weston_launch} ++ PAM support ${use_pam} + systemd-login support ${have_systemd_login} + systemd notify support ${enable_systemd_notify} + +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index 166bf3b..6fb9232 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c +@@ -51,7 +51,9 @@ + + #include + #include ++#ifdef HAVE_PAM + #include ++#endif + + #ifdef HAVE_SYSTEMD_LOGIN + #include +@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) + #endif + + struct weston_launch { ++#ifdef HAVE_PAM + struct pam_conv pc; + pam_handle_t *ph; ++#endif + int tty; + int ttynr; + int sock[2]; +@@ -189,6 +193,7 @@ weston_launch_allowed(struct weston_launch *wl) + return false; + } + ++#ifdef HAVE_PAM + static int + pam_conversation_fn(int msg_count, + const struct pam_message **messages, +@@ -229,6 +234,7 @@ setup_pam(struct weston_launch *wl) + + return 0; + } ++#endif + + static int + setup_launcher_socket(struct weston_launch *wl) +@@ -422,6 +428,7 @@ quit(struct weston_launch *wl, int status) + close(wl->signalfd); + close(wl->sock[0]); + ++#ifdef HAVE_PAM + if (wl->new_user) { + err = pam_close_session(wl->ph, 0); + if (err) +@@ -429,6 +436,7 @@ quit(struct weston_launch *wl, int status) + err, pam_strerror(wl->ph, err)); + pam_end(wl->ph, err); + } ++#endif + + if (ioctl(wl->tty, KDSKBMUTE, 0) && + ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) +@@ -608,6 +616,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + setenv("HOME", wl->pw->pw_dir, 1); + setenv("SHELL", wl->pw->pw_shell, 1); + ++#ifdef HAVE_PAM + env = pam_getenvlist(wl->ph); + if (env) { + for (i = 0; env[i]; ++i) { +@@ -616,6 +625,7 @@ setup_session(struct weston_launch *wl, char **child_argv) + } + free(env); + } ++#endif + + /* + * We open a new session, so it makes sense +@@ -683,8 +693,10 @@ static void + help(const char *name) + { + fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); ++#ifdef HAVE_PAM + fprintf(stderr, " -u, --user Start session as specified username,\n" + " e.g. -u joe, requires root.\n"); ++#endif + fprintf(stderr, " -t, --tty Start session on alternative tty,\n" + " e.g. -t /dev/tty4, requires -u option.\n"); + fprintf(stderr, " -v, --verbose Be verbose\n"); +@@ -698,7 +710,9 @@ main(int argc, char *argv[]) + int i, c; + char *tty = NULL; + struct option opts[] = { ++#ifdef HAVE_PAM + { "user", required_argument, NULL, 'u' }, ++#endif + { "tty", required_argument, NULL, 't' }, + { "verbose", no_argument, NULL, 'v' }, + { "help", no_argument, NULL, 'h' }, +@@ -710,9 +724,13 @@ main(int argc, char *argv[]) + while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { + switch (c) { + case 'u': ++#ifdef HAVE_PAM + wl.new_user = optarg; + if (getuid() != 0) + error(1, 0, "Permission denied. -u allowed for root only"); ++#else ++ error(1, 0, "-u is unsupported in this weston-launch build"); ++#endif + break; + case 't': + tty = optarg; +@@ -753,8 +771,10 @@ main(int argc, char *argv[]) + if (setup_tty(&wl, tty) < 0) + exit(EXIT_FAILURE); + ++#ifdef HAVE_PAM + if (wl.new_user && setup_pam(&wl) < 0) + exit(EXIT_FAILURE); ++#endif + + if (setup_launcher_socket(&wl) < 0) + exit(EXIT_FAILURE); diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.desktop b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.desktop new file mode 100644 index 00000000..1086ae8b --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=Weston +Comment=Wayland Compostitor +Exec=weston +Icon=weston +Terminal=false +Categories=Utility; diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.png b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.png new file mode 100644 index 00000000..ea8b7e0e Binary files /dev/null and b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/weston.png differ diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/xwayland.weston-start b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/xwayland.weston-start new file mode 100644 index 00000000..b483c97c --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston/xwayland.weston-start @@ -0,0 +1,7 @@ +#!/bin/sh + +if type Xwayland >/dev/null 2>/dev/null; then + mkdir -p /tmp/.X11-unix + + add_weston_argument "--modules=xwayland.so" +fi diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb new file mode 100644 index 00000000..f1e67e31 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb @@ -0,0 +1,111 @@ +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://0001-make-error-portable.patch \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +" +SRC_URI[md5sum] = "752a04ce3c65af4884cfac4e57231bdb" +SRC_URI[sha256sum] = "15a23423bcfa45e31e1dedc0cd524ba71e2930df174fde9c99b71a537c4e4caf" +SRC_URI[md5sum] = "7c634e262f8a464a076c97fd50ad36b3" +SRC_URI[sha256sum] = "546323a90607b3bd7f48809ea9d76e64cd09718102f2deca6d95aa59a882e612" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit autotools pkgconfig useradd distro_features_check +# depends on virtual/egl +REQUIRED_DISTRO_FEATURES = "opengl" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OECONF = "--enable-setuid-install \ + --disable-rdp-compositor \ + --enable-autotools \ + " +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ + clients launch" +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +# Weston on X11 +PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" +# weston-launch +PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" +# Weston with cairo glesv2 support +PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" +# Weston with lcms support +PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" +# colord CMS support +PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" +# Clients support +PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" +# Weston with PAM support +PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" + +do_install_append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}" + +FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES_${PN}-examples = "${bindir}/*" + +FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" + +RDEPENDS_${PN} += "xkeyboard-config" +RRECOMMENDS_${PN} = "weston-conf liberation-fonts" +RRECOMMENDS_${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend b/meta-agl/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend new file mode 100644 index 00000000..52fe69d2 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend @@ -0,0 +1,6 @@ +# fix for kernel using hardcoded awk while our filesystem only provides gawk +do_install_append() { + # enforce all scripts to use /usr/bin/awk . This fixes the rpm dependency failure on install of kernel-devsrc + cd ${D} || true + ( for i in `grep -srI "\!/bin/awk" | cut -d":" -f1 ` ; do sed -i -e "s#\!/bin/awk#\!/usr/bin/env awk#g" $i ; done ) || true +} \ No newline at end of file diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch new file mode 100644 index 00000000..c595dfdf --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch @@ -0,0 +1,40 @@ +From 63f5acdf097b7baca8d0f7056a037f8811b48aaa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Tue, 27 Feb 2018 17:06:21 +0100 +Subject: [PATCH] Smack: Handle CGROUP2 in the same way that CGROUP +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The new file system CGROUP2 isn't actually handled +by smack. This changes makes Smack treat equally +CGROUP and CGROUP2 items. + +Signed-off-by: José Bollo +--- + security/smack/smack_lsm.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c +index 03fdecba93bb..5d77ed04422c 100644 +--- a/security/smack/smack_lsm.c ++++ b/security/smack/smack_lsm.c +@@ -3431,6 +3431,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) + if (opt_dentry->d_parent == opt_dentry) { + switch (sbp->s_magic) { + case CGROUP_SUPER_MAGIC: ++ case CGROUP2_SUPER_MAGIC: + /* + * The cgroup filesystem is never mounted, + * so there's no opportunity to set the mount +@@ -3474,6 +3475,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) + switch (sbp->s_magic) { + case SMACK_MAGIC: + case CGROUP_SUPER_MAGIC: ++ case CGROUP2_SUPER_MAGIC: + /* + * Casey says that it's a little embarrassing + * that the smack file system doesn't do +-- +2.14.3 + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch new file mode 100644 index 00000000..4100bb8f --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch @@ -0,0 +1,109 @@ +Smack: Privilege check on key operations + +Operations on key objects are subjected to Smack policy +even if the process is privileged. This is inconsistent +with the general behavior of Smack and may cause issues +with authentication by privileged daemons. This patch +allows processes with CAP_MAC_OVERRIDE to access keys +even if the Smack rules indicate otherwise. + +Reported-by: Jose Bollo +Signed-off-by: Casey Schaufler +--- + security/smack/smack.h | 1 + + security/smack/smack_access.c | 40 +++++++++++++++++++++++++++++----------- + security/smack/smack_lsm.c | 4 ++++ + 3 files changed, 34 insertions(+), 11 deletions(-) + +diff --git a/security/smack/smack.h b/security/smack/smack.h +index 6a71fc7..f7db791 100644 +--- a/security/smack/smack.h ++++ b/security/smack/smack.h +@@ -321,6 +321,7 @@ struct smack_known *smk_import_entry(const char *, int); + void smk_insert_entry(struct smack_known *skp); + struct smack_known *smk_find_entry(const char *); + bool smack_privileged(int cap); ++bool smack_privileged_cred(int cap, const struct cred *cred); + void smk_destroy_label_list(struct list_head *list); + + /* +diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c +index 1a30041..141ffac 100644 +--- a/security/smack/smack_access.c ++++ b/security/smack/smack_access.c +@@ -623,26 +623,24 @@ struct smack_known *smack_from_secid(const u32 secid) + LIST_HEAD(smack_onlycap_list); + DEFINE_MUTEX(smack_onlycap_lock); + +-/* ++/** ++ * smack_privileged_cred - are all privilege requirements met by cred ++ * @cap: The requested capability ++ * @cred: the credential to use ++ * + * Is the task privileged and allowed to be privileged + * by the onlycap rule. + * + * Returns true if the task is allowed to be privileged, false if it's not. + */ +-bool smack_privileged(int cap) ++bool smack_privileged_cred(int cap, const struct cred *cred) + { +- struct smack_known *skp = smk_of_current(); ++ struct task_smack *tsp = cred->security; ++ struct smack_known *skp = tsp->smk_task; + struct smack_known_list_elem *sklep; + int rc; + +- /* +- * All kernel tasks are privileged +- */ +- if (unlikely(current->flags & PF_KTHREAD)) +- return true; +- +- rc = cap_capable(current_cred(), &init_user_ns, cap, +- SECURITY_CAP_AUDIT); ++ rc = cap_capable(cred, &init_user_ns, cap, SECURITY_CAP_AUDIT); + if (rc) + return false; + +@@ -662,3 +660,23 @@ bool smack_privileged(int cap) + + return false; + } ++ ++/** ++ * smack_privileged - are all privilege requirements met ++ * @cap: The requested capability ++ * ++ * Is the task privileged and allowed to be privileged ++ * by the onlycap rule. ++ * ++ * Returns true if the task is allowed to be privileged, false if it's not. ++ */ ++bool smack_privileged(int cap) ++{ ++ /* ++ * All kernel tasks are privileged ++ */ ++ if (unlikely(current->flags & PF_KTHREAD)) ++ return true; ++ ++ return smack_privileged_cred(cap, current_cred()); ++} +diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c +index 30f2c3d..03fdecb 100644 +--- a/security/smack/smack_lsm.c ++++ b/security/smack/smack_lsm.c +@@ -4369,6 +4369,10 @@ static int smack_key_permission(key_ref_t key_ref, + */ + if (tkp == NULL) + return -EACCES; ++ ++ if (smack_privileged_cred(CAP_MAC_OVERRIDE, cred)) ++ return 0; ++ + #ifdef CONFIG_AUDIT + smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_KEY); + ad.a.u.key_struct.key = keyp->serial; + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.9/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.9/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch new file mode 100644 index 00000000..a1eeac3d --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.9/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch @@ -0,0 +1,49 @@ +From c8bbb0f916de54610513e376070aea531af19dd6 Mon Sep 17 00:00:00 2001 +From: jooseong lee +Date: Thu, 3 Nov 2016 10:55:43 +0100 +Subject: [PATCH 4/4] Smack: Assign smack_known_web label for kernel thread's +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Assign smack_known_web label for kernel thread's socket in the sk_alloc_security hook + +Creating struct sock by sk_alloc function in various kernel subsystems +like bluetooth dosen't call smack_socket_post_create(). In such case, +received sock label is the floor('_') label and makes access deny. + +Refers-to: https://review.tizen.org/gerrit/#/c/80717/4 + +Change-Id: I2e5c9359bfede84a988fd4d4d74cdb9dfdfc52d8 +Signed-off-by: jooseong lee +Signed-off-by: José Bollo +--- + security/smack/smack_lsm.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c +index cf8a93f..21651bc 100644 +--- a/security/smack/smack_lsm.c ++++ b/security/smack/smack_lsm.c +@@ -2321,8 +2321,16 @@ static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) + if (ssp == NULL) + return -ENOMEM; + +- ssp->smk_in = skp; +- ssp->smk_out = skp; ++ /* ++ * Sockets created by kernel threads receive web label. ++ */ ++ if (unlikely(current->flags & PF_KTHREAD)) { ++ ssp->smk_in = &smack_known_web; ++ ssp->smk_out = &smack_known_web; ++ } else { ++ ssp->smk_in = skp; ++ ssp->smk_out = skp; ++ } + ssp->smk_packet = NULL; + + sk->sk_security = ssp; +-- +2.7.4 + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc new file mode 100644 index 00000000..87249bdc --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.14:" + +#------------------------------------------------------------------------- +# smack patches for kernels keys + +SRC_URI_append_with-lsm-smack = "\ + file://Smack-Privilege-check-on-key-operations.patch \ + file://Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch \ + " + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc new file mode 100644 index 00000000..c4ebf4d4 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.9.inc @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.9:" + +#------------------------------------------------------------------------- +# smack patches for handling bluetooth + +SRC_URI_append_with-lsm-smack = "\ + file://0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch \ + " diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc new file mode 100644 index 00000000..e8be23c7 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc @@ -0,0 +1,94 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" + +DEPENDS += "kern-tools-native" + +# returns all the elements from the src uri that are .cfg files +def find_cfgs(d): + sources=src_patches(d, True) + sources_list=[] + for s in sources: + if s.endswith('.cfg'): + sources_list.append(s) + + return sources_list + +do_configure_append () { + [ ! -f .config ] && cp -a ${WORKDIR}/defconfig .config + merge_config.sh -m .config ${@" ".join(find_cfgs(d))} + yes '' | make oldconfig +} + +# Extra configuration options for the AGL kernel +SRC_URI_append = "\ + file://can-bus.cfg \ + file://usb.cfg \ + file://uvc.cfg \ + file://joystick.cfg \ + file://fanotify.cfg \ + file://uinput.cfg \ + file://hid.cfg \ + file://drm.cfg \ + file://btusb.cfg \ + file://usbaudio.cfg \ + file://usbmodem.cfg \ + file://i2c-led.cfg \ + file://nfc.cfg \ + " +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/can-bus.cfg" +# Enable support for usb video class for usb camera devices +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg" +# Enable support for joystick devices +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fanotify.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uinput.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/hid.cfg" +# Enable DRM support for graphics +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/drm.cfg" +# Enable Bluetooth USB devices +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg" +# Enable USB audio devices +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/usbaudio.cfg" +# Enable I2C and LED for demontrator +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/i2c-led.cfg" +# Enable NFC devices +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/nfc.cfg" + +# Enable required features for the agl-netboot feature +SRC_URI_append_netboot = " file://nbd.cfg \ + file://ramdisk.cfg" +KERNEL_CONFIG_FRAGMENTS_append_netboot = " ${WORKDIR}/nbd.cfg ${WORKDIR}/ramdisk.cfg" + +# Enable support for TP-Link TL-W722N USB Wifi adapter +SRC_URI_append = " file://ath9k_htc.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/ath9k_htc.cfg" + +# Enable support for RTLSDR +SRC_URI_append = " file://rtl_sdr.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg" + +# Additional drivers for virtual machines +# OVERRIDES save us some c'n'p below ... +OVERRIDES_prepend_qemux86 = "virtualmachine:" +OVERRIDES_prepend_qemux86-64 = "virtualmachine:" +SRC_URI_append_virtualmachine = " file://vbox-vmware-sata.cfg" +KERNEL_CONFIG_FRAGMENTS_append_virtualmachine = " ${WORKDIR}/vbox-vmware-sata.cfg" + +# Enable support for smack +KERNEL_CONFIG_FRAGMENTS_append_with-lsm-smack = "\ + ${WORKDIR}/audit.cfg \ + ${WORKDIR}/smack.cfg \ + ${WORKDIR}/smack-default-lsm.cfg \ +" + +# ALSA support and other sound related configuration +SRC_URI_append = " file://sound.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/sound.cfg" + +# iio-dummy-device support for test iiodevice +SRC_URI_append = " file://iiodevice.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/iiodevice.cfg" + +# external rtc support via e.g. http://wiki.seeedstudio.com/Grove-RTC/ +SRC_URI_append = " file://rtc.cfg" +KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtc.cfg" + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 00000000..38611202 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend @@ -0,0 +1 @@ +require linux-agl.inc diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg new file mode 100644 index 00000000..6f7d4988 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg @@ -0,0 +1,4 @@ +CONFIG_CFG80211=m +CONFIG_MAC80211=m +CONFIG_ATH_CARDS=m +CONFIG_ATH9K_HTC=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg new file mode 100644 index 00000000..dd7c460b --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg @@ -0,0 +1,37 @@ +CONFIG_BT=m +CONFIG_BT_BREDR=y +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_HS=y +CONFIG_BT_LE=y +CONFIG_BT_LEDS=y +# CONFIG_BT_SELFTEST is not set +CONFIG_BT_DEBUGFS=y + +# +# Bluetooth device drivers +# +CONFIG_BT_INTEL=m +CONFIG_BT_BCM=m +CONFIG_BT_RTL=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTUSB_BCM=y +CONFIG_BT_HCIBTUSB_RTL=y +# CONFIG_BT_HCIBTSDIO is not set +# CONFIG_BT_HCIUART is not set +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT_MRVL is not set +# CONFIG_BT_ATH3K is not set +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_CMAC=m + +# +# Bluetooth AVRCP support +# +CONFIG_INPUT_UINPUT=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/can-bus.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/can-bus.cfg new file mode 100644 index 00000000..57e25fc6 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/can-bus.cfg @@ -0,0 +1,41 @@ +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +# CONFIG_TASK_XACCT is not set +CONFIG_USER_RETURN_NOTIFIER=y +CONFIG_PREEMPT_NOTIFIERS=y +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_GW=m + +# +# CAN Device Drivers +# +CONFIG_CAN_C_CAN=m +CONFIG_CAN_C_CAN_PLATFORM=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_DEV=m +CONFIG_CAN_CALC_BITTIMING=y +# CONFIG_CAN_LEDS is not set +# CONFIG_CAN_SJA1000 is not set +# CONFIG_CAN_M_CAN is not set +# CONFIG_CAN_CC770 is not set + +# +# CAN SPI interfaces +# +CONFIG_CAN_MCP251X=m + +# +# CAN USB interfaces +# +# CONFIG_CAN_EMS_USB is not set +CONFIG_CAN_ESD_USB2=m +CONFIG_CAN_GS_USB=m +CONFIG_CAN_KVASER_USB=m +CONFIG_CAN_PEAK_USB=m +CONFIG_CAN_8DEV_USB=m +CONFIG_CAN_MCBA_USB=m +# CONFIG_CAN_SOFTING is not set +# CONFIG_CAN_DEBUG_DEVICES is not set diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg new file mode 100644 index 00000000..65fe71cd --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg @@ -0,0 +1,2 @@ +CONFIG_DRM_BOCHS=y +CONFIG_DRM_VIRTIO_GPU=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg new file mode 100644 index 00000000..de5dd8d3 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg @@ -0,0 +1,3 @@ +# Enable the fanotify API (notification/interception of FS events) +CONFIG_FANOTIFY=y +CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg new file mode 100644 index 00000000..327c753a --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg @@ -0,0 +1 @@ +CONFIG_HID_MULTITOUCH=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/i2c-led.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/i2c-led.cfg new file mode 100644 index 00000000..248b5118 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/i2c-led.cfg @@ -0,0 +1,3 @@ +# enabling I2C and LED for demonstrator +CONFIG_I2C_TINY_USB=y +CONFIG_LEDS_BLINKM=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg new file mode 100644 index 00000000..8633f29a --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg @@ -0,0 +1,25 @@ +# +# Extcon Device Drivers +# +CONFIG_IIO=y +CONFIG_IIO_BUFFER=y +CONFIG_IIO_BUFFER_CB=y +CONFIG_IIO_KFIFO_BUF=y +CONFIG_IIO_CONFIGFS=m +CONFIG_IIO_TRIGGER=y +CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 +CONFIG_IIO_SW_DEVICE=m +CONFIG_IIO_SW_TRIGGER=m + +# +# IIO dummy driver +# +CONFIG_IIO_DUMMY_EVGEN=m +CONFIG_IIO_SIMPLE_DUMMY=m +CONFIG_IIO_SIMPLE_DUMMY_EVENTS=y +CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y + +# +# Triggers - standalone +# +CONFIG_IIO_HRTIMER_TRIGGER=m \ No newline at end of file diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/joystick.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/joystick.cfg new file mode 100644 index 00000000..2201bcb0 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/joystick.cfg @@ -0,0 +1,9 @@ +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_ADI=y +CONFIG_GAMEPORT=y +CONFIG_HID_LOGITECH=y +CONFIG_LOGIWHEELS_FF=y +CONFIG_HID_LOGITECH_HIDPP=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIG940_FF=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg new file mode 100644 index 00000000..af37685e --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg @@ -0,0 +1 @@ +CONFIG_BLK_DEV_NBD=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nfc.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nfc.cfg new file mode 100644 index 00000000..6d863a07 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/nfc.cfg @@ -0,0 +1,34 @@ +CONFIG_NFC=m +CONFIG_NFC_DIGITAL=m +CONFIG_NFC_NCI=m +CONFIG_NFC_NCI_SPI=m +CONFIG_NFC_HCI=m +CONFIG_NFC_SHDLC=y +CONFIG_NFC_TRF7970A=m +CONFIG_NFC_MEI_PHY=m +CONFIG_NFC_PORT100=m +CONFIG_NFC_FDP=m +CONFIG_NFC_FDP_I2C=m +CONFIG_NFC_PN544=m +CONFIG_NFC_PN544_I2C=m +CONFIG_NFC_PN544_MEI=m +CONFIG_NFC_PN533=m +CONFIG_NFC_PN533_USB=m +CONFIG_NFC_PN533_I2C=m +CONFIG_NFC_MICROREAD=m +CONFIG_NFC_MICROREAD_I2C=m +CONFIG_NFC_MICROREAD_MEI=m +CONFIG_NFC_MRVL=m +CONFIG_NFC_MRVL_USB=m +CONFIG_NFC_MRVL_I2C=m +CONFIG_NFC_MRVL_SPI=m +CONFIG_NFC_ST21NFCA=m +CONFIG_NFC_ST21NFCA_I2C=m +CONFIG_NFC_ST_NCI=m +CONFIG_NFC_ST_NCI_I2C=m +CONFIG_NFC_ST_NCI_SPI=m +CONFIG_NFC_NXP_NCI=m +CONFIG_NFC_NXP_NCI_I2C=m +CONFIG_NFC_S3FWRN5=m +CONFIG_NFC_S3FWRN5_I2C=m +CONFIG_NFC_ST95HF=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/procevent.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/procevent.cfg new file mode 100644 index 00000000..6e08c25b --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/procevent.cfg @@ -0,0 +1,2 @@ +CONFIG_CONNECTOR=y +CONFIG_PROC_EVENTS=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg new file mode 100644 index 00000000..3d44de80 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg @@ -0,0 +1,2 @@ +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtc.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtc.cfg new file mode 100644 index 00000000..2641958a --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtc.cfg @@ -0,0 +1,7 @@ +CONFIG_RTC_CLASS=y +CONFIG_RTC_LIB=y +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS3232=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg new file mode 100644 index 00000000..d4574700 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg @@ -0,0 +1,4 @@ +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_RTL28XXU=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/scheddebug.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/scheddebug.cfg new file mode 100644 index 00000000..e8b09aa7 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/scheddebug.cfg @@ -0,0 +1 @@ +CONFIG_SCHED_DEBUG=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/sound.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/sound.cfg new file mode 100644 index 00000000..ad34ea68 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/sound.cfg @@ -0,0 +1,7 @@ +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_MAX_CARDS=32 +CONFIG_SND_ALOOP=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg new file mode 100644 index 00000000..7996ef1d --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg @@ -0,0 +1,3 @@ +# Enable the User-level Input driver (required by "wayland-fits") +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usb.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usb.cfg new file mode 100644 index 00000000..8e9e98ec --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usb.cfg @@ -0,0 +1,8 @@ +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_ACM=m +CONFIG_CRC_CCITT=y +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_PCI=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbaudio.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbaudio.cfg new file mode 100644 index 00000000..5961f43d --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbaudio.cfg @@ -0,0 +1,2 @@ +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbmodem.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbmodem.cfg new file mode 100644 index 00000000..3ded931e --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/usbmodem.cfg @@ -0,0 +1,7 @@ +CONFIG_USB_USBNET=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_QUALCOMM=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uvc.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uvc.cfg new file mode 100644 index 00000000..7c6556c1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/uvc.cfg @@ -0,0 +1,4 @@ +CONFIG_VIDEOBUF2_VMALLOC=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg new file mode 100644 index 00000000..ce1eca1a --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg @@ -0,0 +1,19 @@ +# enable harddrive driver for vmware/virtualbox +CONFIG_ATA_PIIX=y +CONFIG_SATA_AHCI=y +CONFIG_ATA_SFF=y +CONFIG_ATA_BMDMA=y +CONFIG_ATA_GENERIC=y +CONFIG_ATA_ACPI=y + +# needed for VMWare +CONFIG_SCSI=y +CONFIG_BLK_DEV_SD=y +CONFIG_FUSION=y +CONFIG_FUSION_SPI=y +CONFIG_DRM_VMWGFX=y +CONFIG_DRM_VMWGFX_FBCON=y +CONFIG_VMWARE_BALLOON=m +CONFIG_VMWARE_VMCI=m +CONFIG_VMWARE_VMCI_VSOCKETS=m +CONFIG_SND_ENS1371=m diff --git a/meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch b/meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch new file mode 100644 index 00000000..28c9c09b --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch @@ -0,0 +1,144 @@ +From 11b29ce444610a07067a89b38e9e85c2162bbf67 Mon Sep 17 00:00:00 2001 +From: Tim Orling +Date: Mon, 15 Oct 2018 18:30:42 -0700 +Subject: [PATCH 7/7] [WIP] Initial LAVA support + +Linaro Automated Validation Architecture (LAVA) launches a test suite +on the target but thereafter only observes stdout. + +LAVA knows that a test case has started or ended based on signals +emitted to stdout: +(setup) + +(teardown) + + + +It is valid to have a measurement without units, but not units without a measurement. + +Signed-off-by: Tim Orling +--- + flags.h | 10 ++++++++++ + main.c | 9 ++++++++- + utils.c | 15 +++++++++++++++ + utils.h | 2 +- + 4 files changed, 34 insertions(+), 2 deletions(-) + create mode 100644 flags.h + +diff --git a/flags.h b/flags.h +new file mode 100644 +index 000000000000..0dac2234e0b4 +--- /dev/null ++++ b/flags.h +@@ -0,0 +1,10 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++ ++/* Flag bit definitions */ ++ ++#ifndef __FLAGS_H__ ++#define __FLAGS_H__ ++ ++#define LAVA_SIGNAL_ENABLE (0x0001) ++ ++#endif /* __FLAGS_H__ */ +diff --git a/main.c b/main.c +index 83600b7d1b31..92ced6926c3d 100644 +--- a/main.c ++++ b/main.c +@@ -36,6 +36,7 @@ + #endif + + #include "utils.h" ++#include "flags.h" + + #define DEFAULT_DIRECTORY "/usr/lib" + #define DEFAULT_TIMEOUT 300 +@@ -70,8 +71,9 @@ main(int argc, char *argv[]) + opts.timeout = DEFAULT_TIMEOUT; + opts.ptests = NULL; + opts.xml_filename = NULL; ++ opts.flags = 0; + +- while ((opt = getopt(argc, argv, "d:e:lt:x:h")) != -1) { ++ while ((opt = getopt(argc, argv, "d:e:lt:x:Lh")) != -1) { + switch (opt) { + case 'd': + free(opts.directory); +@@ -118,6 +120,11 @@ main(int argc, char *argv[]) + opts.xml_filename = strdup(optarg); + CHECK_ALLOCATION(opts.xml_filename, 1, 1); + break; ++ case 'L': ++ // set LAVA signal mode ++ opts.flags |= LAVA_SIGNAL_ENABLE; ++ fprintf(stdout, "LAVA_SIGNAL_ENABLE == %d\n", opts.flags); ++ break; + default: + print_usage(stdout, argv[0]); + exit(1); +diff --git a/utils.c b/utils.c +index ed2eff7900c1..0fd1da6aec92 100644 +--- a/utils.c ++++ b/utils.c +@@ -39,6 +39,7 @@ + + #include "ptest_list.h" + #include "utils.h" ++#include "flags.h" + + #define GET_STIME_BUF_SIZE 1024 + #define WAIT_CHILD_POLL_TIMEOUT_MS 200 +@@ -358,6 +359,7 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, + fprintf(fp, "START: %s\n", progname); + PTEST_LIST_ITERATE_START(head, p); + char *ptest_dir = strdup(p->run_ptest); ++ char *ptest = strdup(p->ptest); + if (ptest_dir == NULL) { + rc = -1; + break; +@@ -376,6 +378,11 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, + int fds[2]; fds[0] = pipefd_stdout[0]; fds[1] = pipefd_stderr[0]; + FILE *fps[2]; fps[0] = fp; fps[1] = fp_stderr; + ++ char result[5]; // pass\0, fail\0, skip\0 ++ ++ if (opts.flags & LAVA_SIGNAL_ENABLE) { ++ fprintf(stdout, "\n", ptest); ++ } + fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE)); + fprintf(fp, "BEGIN: %s\n", ptest_dir); + +@@ -389,6 +396,14 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, + + fprintf(fp, "END: %s\n", ptest_dir); + fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE)); ++ if (opts.flags & LAVA_SIGNAL_ENABLE) { ++ if (status) ++ sprintf(result, "fail"); ++ else ++ sprintf(result, "pass"); ++ fprintf(stdout, "\n", ptest); ++ fprintf(stdout, "\n", ptest, result); ++ } + } + PTEST_LIST_ITERATE_END; + fprintf(fp, "STOP: %s\n", progname); +diff --git a/utils.h b/utils.h +index ee85163ddfff..06d4c100d151 100644 +--- a/utils.h ++++ b/utils.h +@@ -37,9 +37,9 @@ struct ptest_options { + int timeout; + char **ptests; + char *xml_filename; ++ unsigned int flags; + }; + +- + extern void check_allocation1(void *, size_t, char *, int, int); + extern struct ptest_list *get_available_ptests(const char *); + extern int print_ptests(struct ptest_list *, FILE *); +-- +2.11.0 + diff --git a/meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend b/meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend new file mode 100644 index 00000000..7a1d2a8f --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.2.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0007-WIP-Initial-LAVA-support.patch" + diff --git a/meta-agl/meta-agl-bsp/wic/directdisk.wks.in b/meta-agl/meta-agl-bsp/wic/directdisk.wks.in new file mode 100644 index 00000000..f7b220cd --- /dev/null +++ b/meta-agl/meta-agl-bsp/wic/directdisk.wks.in @@ -0,0 +1,9 @@ +# short-description: Create a 'pcbios' direct disk image +# long-description: Creates a partitioned legacy BIOS disk image that the user +# can directly dd to boot media. + +part /boot --source bootimg-pcbios --use-uuid --label boot --active --align 1024 +part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024 + +bootloader --timeout=0 --append="rootwait rootfstype=ext4 ${QB_KERNEL_CMDLINE_APPEND}" + diff --git a/meta-agl/meta-agl-bsp/wic/sdimage-bootpart-uuid.wks b/meta-agl/meta-agl-bsp/wic/sdimage-bootpart-uuid.wks new file mode 100644 index 00000000..1f51a0bd --- /dev/null +++ b/meta-agl/meta-agl-bsp/wic/sdimage-bootpart-uuid.wks @@ -0,0 +1,6 @@ +# short-description: Create SD card image with a boot partition +# long-description: Creates a partitioned SD card image. Boot files +# are located in the first vfat partition. + +part /boot --source bootimg-partition --fstype=vfat --label boot --use-uuid --active --align 4 --size 16 +part / --source rootfs --fstype=ext4 --label root --align 4 --use-uuid diff --git a/meta-agl/meta-agl-bsp/wic/singlepart-noloader.wks b/meta-agl/meta-agl-bsp/wic/singlepart-noloader.wks new file mode 100644 index 00000000..31c499ae --- /dev/null +++ b/meta-agl/meta-agl-bsp/wic/singlepart-noloader.wks @@ -0,0 +1,5 @@ +# short-description: Single partition rootfs with UUID and no bootloader +# long-description: Creates a partitioned image with a single partition in +# use and does not contain a bootloader. + +part / --source rootfs --use-uuid --fstype=ext4 --label root --align 4096 diff --git a/meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks b/meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks new file mode 100644 index 00000000..56393728 --- /dev/null +++ b/meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks @@ -0,0 +1,23 @@ +# short-description: Custom EFI disk image with systemd-boot +# long-description: Creates a partitioned EFI disk image that the user +# can directly dd to boot media. The selected bootloader is systemd-boot +# and we do not have swap + +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --use-uuid --label msdos --active --align 1024 + +part / --source rootfs --fstype=ext4 --label platform --align 1024 --use-uuid + +# Modify the append line here as needed to suit the environment. +# +# To change the default video resolution add one of the following +# resolutions: +# uvesafb.mode_option=1024x768-32 +# uvesafb.mode_option=1280x1024-32 +# uvesafb.mode_option=1600x1200-32 +# +# To avoid corrupt boot screen by systemd message you can remove the +# console=tty0 portion below or disable all boot messages by kernel command +# line. To disable all boot messages add: +# +# quiet +bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 reboot=efi" diff --git a/meta-agl/meta-agl-bsp/wic/systemd-joule-bootdisk.wks b/meta-agl/meta-agl-bsp/wic/systemd-joule-bootdisk.wks new file mode 100644 index 00000000..a318e231 --- /dev/null +++ b/meta-agl/meta-agl-bsp/wic/systemd-joule-bootdisk.wks @@ -0,0 +1,12 @@ +# short-description: Custom EFI disk image with systemd-boot +# long-description: Creates a partitioned EFI disk image that the user +# can directly dd to boot media. The selected bootloader is systemd-boot +# and we do not have swap. We assume a Joule system and provide an +# appropriate kernel command line. + +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --use-uuid --label msdos --active --align 1024 + +part / --source rootfs --fstype=ext4 --label platform --align 1024 --use-uuid + +# Modify the append line here as needed to suit the environment +bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS2,115200n8 console=tty0 video=efifb maxcpus=4 noxsave reboot=efi kmemleak=off" diff --git a/meta-agl/meta-agl-distro/conf/distro/include/aarch64-tune.inc b/meta-agl/meta-agl-distro/conf/distro/include/aarch64-tune.inc new file mode 100644 index 00000000..a2a308fe --- /dev/null +++ b/meta-agl/meta-agl-distro/conf/distro/include/aarch64-tune.inc @@ -0,0 +1,13 @@ +# DEFAULTTUNE overrides for AGL on aarch64 + +# We should not need the tuning include below as the BSP should include the right set already. +# A double inclusion would produce a warning. This include line is just for reference +# include conf/machine/include/arm/arch-armv8.inc + +DEFAULTTUNE = "aarch64" +# not yet ready +#QB_SYSTEM_NAME ?= "qemu-system-aarch" +#QB_DEFAULT_KERNEL ?= "zImage" +#QB_DEFAULT_FSTYPE ?= "ext4" +#QB_MACHINE ?= "-machine foo" +#QB_CPU ?= "-cpu bar" diff --git a/meta-agl/meta-agl-distro/conf/distro/include/arc-tune.inc b/meta-agl/meta-agl-distro/conf/distro/include/arc-tune.inc new file mode 100644 index 00000000..43dabd5a --- /dev/null +++ b/meta-agl/meta-agl-distro/conf/distro/include/arc-tune.inc @@ -0,0 +1,3 @@ +# DEFAULTTUNE overrides for AGL on arc + +# DEFAULTTUNE ?= "archs" diff --git a/meta-agl/meta-agl-distro/conf/distro/include/arm-tune.inc b/meta-agl/meta-agl-distro/conf/distro/include/arm-tune.inc new file mode 100644 index 00000000..fa68e05a --- /dev/null +++ b/meta-agl/meta-agl-distro/conf/distro/include/arm-tune.inc @@ -0,0 +1,23 @@ +# DEFAULTTUNE overrides for AGL on ARM 32bit + +# We should not need the tuning include below as the BSP should include the right set already. +# A double inclusion would produce a warning. This include line is just for reference +# include conf/machine/include/arm/arch-armv7ve.inc +# medium profile boards need to +# include conf/machine/include/arch/arm-armv7-a.inc + +# Standard target for 32bit ARM (newer than cortex-a15) +AGLDEFAULTTUNE = "armv7vethf-neon-vfpv4" + +# for cortex-a8, cortex-a9, cortex-a7 (=rpi 2/3) +AGLDEFAULTTUNE := "${@bb.utils.contains('DISTRO_FEATURES', 'agl-medium-arm-compiler', 'armv7athf-neon', '${AGLDEFAULTTUNE}', d)}" + +# for armv6 (=rpi0/1) +AGLDEFAULTTUNE := "${@bb.utils.contains('DISTRO_FEATURES', 'agl-low-arm-compiler', 'arm1176jzfshf', '${AGLDEFAULTTUNE}', d)}" +DEFAULTTUNE := "${AGLDEFAULTTUNE}" + +QB_SYSTEM_NAME ?= "qemu-system-arm" +QB_DEFAULT_KERNEL ?= "zImage" +QB_DEFAULT_FSTYPE ?= "ext4" +QB_MACHINE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'agl-medium-arm-compiler', '-machine vexpress-a9', '-machine vexpress-a15', d)}" +QB_CPU ?= "${@bb.utils.contains('DISTRO_FEATURES', 'agl-medium-arm-compiler', '-cpu cortex-a9', '-cpu cortex-a15', d)}" diff --git a/meta-agl/meta-agl-distro/conf/distro/include/x86_64-tune.inc b/meta-agl/meta-agl-distro/conf/distro/include/x86_64-tune.inc new file mode 100644 index 00000000..2efeca04 --- /dev/null +++ b/meta-agl/meta-agl-distro/conf/distro/include/x86_64-tune.inc @@ -0,0 +1,55 @@ +# DEFAULTTUNE overrides for AGL on x86-64 + +# We should not need the tuning include below as the BSP should include the right set already. +# A double inclusion would produce a warning. This include line is just for reference +#include conf/machine/include/tune-corei7.inc +DEFAULTTUNE = "corei7-64" + +# shortened copy of tune-corei7.inc due to bug in inclusion for tune-core2.inc +# TUNE_ARCH is using .= x86-64 , if done twice, you get x86-64x86-64 as TUNE_ARCH :/ +# we should have at least the core2 tunings by default (=qemux86-64) + +# Extra tune features +TUNEVALID[corei7] = "Enable corei7 specific processor optimizations" +TUNE_CCARGS = "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2', '', d)}" + +# Extra tune selections +AVAILTUNES += "corei7-32" +TUNE_FEATURES_tune-corei7-32 = "${TUNE_FEATURES_tune-x86} corei7" +BASE_LIB_tune-corei7-32 = "lib" +TUNE_PKGARCH_tune-corei7-32 = "corei7-32" +PACKAGE_EXTRA_ARCHS_tune-corei7-32 = "${PACKAGE_EXTRA_ARCHS_tune-core2-32} corei7-32" +QEMU_EXTRAOPTIONS_corei7-32 = " -cpu Nehalem,check=false" + +AVAILTUNES += "corei7-64" +TUNE_FEATURES_tune-corei7-64 = "${TUNE_FEATURES_tune-x86-64} corei7" +BASE_LIB_tune-corei7-64 = "lib64" +TUNE_PKGARCH_tune-corei7-64 = "corei7-64" +PACKAGE_EXTRA_ARCHS_tune-corei7-64 = "${PACKAGE_EXTRA_ARCHS_tune-core2-64} corei7-64" +QEMU_EXTRAOPTIONS_corei7-64 = " -cpu Nehalem,check=false" + +AVAILTUNES += "corei7-64-x32" +TUNE_FEATURES_tune-corei7-64-x32 = "${TUNE_FEATURES_tune-x86-64-x32} corei7" +BASE_LIB_tune-corei7-64-x32 = "libx32" +TUNE_PKGARCH_tune-corei7-64-x32 = "corei7-64-x32" +PACKAGE_EXTRA_ARCHS_tune-corei7-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-core2-64-x32} corei7-64-x32" +QEMU_EXTRAOPTIONS_corei7-64-x32 = " -cpu Nehalem,check=false" + +TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'm64', '${X86ARCH64}', '' ,d)}" + +# Bump qemux86-64 up to corei7 +AVAILTUNES += "qemux86-64" +TUNE_FEATURES_tune-qemux86-64 = "${TUNE_FEATURES_tune-x86-64} corei7" +BASE_LIB_tune-qemux86-64 = "lib64" +TUNE_PKGARCH_tune-qemux86-64 = "corei7-64" +PACKAGE_EXTRA_ARCHS_tune-qemux86-64 = "${PACKAGE_EXTRA_ARCHS_tune-core2-64} corei7-64" +QEMU_EXTRAOPTIONS_qemux86-64 = " -cpu Nehalem,check=false" + +# QEMU / runqemu options (partly overrides qemuboot-x86.inc) +QB_MACHINE = "-machine q35" +QB_SYSTEM_NAME_x86-64 = "qemu-system-x86_64" +QB_CPU_x86-64 = "-cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt" +QB_CPU_KVM_x86-64 = "-cpu kvm64 -cpu qemu64,+ssse3,+sse4.1,+sse4.2,+popcnt" + +# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy +QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci" diff --git a/meta-agl/meta-agl-distro/conf/distro/poky-agl.conf b/meta-agl/meta-agl-distro/conf/distro/poky-agl.conf new file mode 100644 index 00000000..15d8ccb9 --- /dev/null +++ b/meta-agl/meta-agl-distro/conf/distro/poky-agl.conf @@ -0,0 +1,174 @@ +require conf/distro/poky.conf + +# AGL specific derivations +DISTRO = "poky-agl" +DISTRO_NAME = "Automotive Grade Linux" + + +# Release flags +DISTRO_CODENAME = "halibut" +AGL_BRANCH = "halibut" +AGLVERSION = "8.0.2" +# switch devel/release +#AGLRELEASETYPE ?= "agldevelopment" +AGLRELEASETYPE ?= "aglrelease" +OVERRIDES .= ":${AGLRELEASETYPE}" +# + +#for development +DISTRO_VERSION_agldevelopment := "${AGLVERSION}+snapshot-${DATE}" +AGL_APP_REVISION_agldevelopment = "${AUTOREV}" +AGL_DEFAULT_REVISION_agldevelopment = "${AUTOREV}" + +#for release +DISTRO_VERSION_aglrelease := "${AGLVERSION}" +DISTRO_BRANCH_VERSION_TAG = "${DISTRO_CODENAME}/${@'${DISTRO_VERSION}'.replace('+snapshot-${DATE}','')}" +AGL_APP_REVISION_aglrelease := "refs/tags/${DISTRO_BRANCH_VERSION_TAG}" +AGL_DEFAULT_REVISION_aglrelease := "refs/tags/${DISTRO_BRANCH_VERSION_TAG}" + + +# SDK +SDK_VENDOR = "-aglsdk" +SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}" + +# SDKPATH is the folder where the SDK is going to be installed +# Due to an issue with the qt5 environment (see SPEC-1667), +# we add DEFAULTTUNE to the SDKPATH to mitigate the issue. +SDKPATH = "/opt/agl-sdk/${SDK_VERSION}-${DEFAULTTUNE}" + + +MAINTAINER = "AGL " + +TARGET_VENDOR = "-agl" + +# Override these in poky based distros +AGL_DEFAULT_DISTRO_FEATURES = "largefile systemd opengl wayland pam bluetooth bluez5 3g" +POKY_DEFAULT_DISTRO_FEATURES := "${AGL_DEFAULT_DISTRO_FEATURES}" +OVERRIDES .= ":${DISTRO_CODENAME}" + +QEMU_TARGETS ?= "arm aarch64 i386 x86_64" +# Other QEMU_TARGETS "mips mips64 mips64el ppc sh4" + +MIRRORS =+ "\ +bzr://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +cvs://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +git://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +gitsm://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +hg://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +osc://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +p4://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +svn://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +bzr://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +cvs://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +git://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +gitsm://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +hg://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +osc://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +p4://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +svn://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ + \ +ftp://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +http://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +https://.*/.* https://download.automotivelinux.org/AGL/mirror/ \n \ +ftp://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +http://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +https://.*/.* http://download.automotivelinux.org/AGL/mirror/ \n \ +" + +# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully +# fetch from the network (and warn you if not). To disable the test set +# the variable to be empty. +# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD +CONNECTIVITY_CHECK_URIS ?= "" + +PREFERRED_PROVIDER_udev ?= "systemd" +PREFERRED_PROVIDER_udev-utils ?= "systemd" + +VIRTUAL-RUNTIME_init_manager = "systemd" +VIRTUAL-RUNTIME_initscripts = "" + +# network manager to use (possible values: systemd, connman) +VIRTUAL-RUNTIME_net_manager = "connman" + +DISTRO_FEATURES_APPEND = " " +DISTRO_FEATURES_remove = "x11" +DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit pulseaudio" + +# Prefer GStreamer 1.14.x by default +PREFERRED_VERSION_gstreamer1.0 ?= "1.14.%" +PREFERRED_VERSION_gstreamer1.0-plugins-bad ?= "1.14.%" +PREFERRED_VERSION_gstreamer1.0-plugins-base ?= "1.14.%" +PREFERRED_VERSION_gstreamer1.0-plugins-good ?= "1.14.%" +PREFERRED_VERSION_gstreamer1.0-plugins-ugly ?= "1.14.%" +PREFERRED_VERSION_gstreamer1.0-libav ?= "1.14.%" +PREFERRED_VERSION_gstreamer1.0-omx ?= "1.14.%" + +# Prefer libjpeg-turbo +PREFERRED_PROVIDER_jpeg = "libjpeg-turbo" + +# using multiple BSP layers causes dangling bbappends in meta-agl-bsp +# turn it into a warning +#BB_DANGLINGAPPENDS_WARNONLY = "1" + +# Not yet upstreamed; should be submitted. +SECURITY_CFLAGS_pn-qtwebengine = "${SECURITY_NO_PIE_CFLAGS}" + +#Redefined USER_CLASSES +#Disable prelink. It is unmaintained and likely will go away. +#default: USER_CLASSES ?= "buildstats image-mklibs image-prelink" +USER_CLASSES = "buildstats image-mklibs" + +# AGL uses 4 optimization levels +# 2 for ARM 32bit +# - a high and a medium setting for the CCARGS +# - the high setting is default (needs >= cortex-a15) +# - the medium setting is enabled with: DISTRO_FEATURES_append = " agl-medium-arm-compiler " +# 1 for ARM 64bit / AARCH64 +# 1 for x86-64 +require conf/distro/include/${TARGET_ARCH}-tune.inc + +# Generic qemu and qemuboot (runqemu) enhancements +# check qemuboot.bbclass +# - use 2G RAM by default +QB_MEM ?= "-m 2048" +# use pulseaudio on the host side - off as qemu-native is built with alsa +#QB_AUDIO_DRV = "pa" +# expose a virtual 'hda' sound card to the guest (arm/aarch64/x86-64) +QB_AUDIO_OPT = "-soundhw hda" + +# Board templates can add extra IMAGE_FSTYPES through this. +# It is added (late) through the AGL image recipes. +AGL_EXTRA_IMAGE_FSTYPES ??= "" +AGL_EXTRA_INITRAMFS_FSTYPES ??= "" +# +# Default IMAGE FSTYPES compressed tarball + ext4.xz +AGL_DEFAULT_IMAGE_FSTYPES ?= "tar.xz ${@bb.utils.contains('DISTRO_FEATURES', 'AGLCI', 'ext4.xz', 'ext4', d)}" +AGL_DEFAULT_INITRAMFS_FSTYPES ?= "ext4.gz" + +# DEFAULT IMAGE_FSTYPES for AGL (no - BSPs should not set this) +# +IMAGE_FSTYPES := "${AGL_DEFAULT_IMAGE_FSTYPES} ${AGL_EXTRA_IMAGE_FSTYPES}" +INITRAMFS_FSTYPES := "${AGL_DEFAULT_INITRAMFS_FSTYPES} ${AGL_EXTRA_INITRAMFS_FSTYPES}" +# +# THE FUTURE is 'wic' +# IMAGE_FSTYPES_append = " wic" + +# enable the packagemanagement +IMAGE_FEATURES =+ "package-management" +PACKAGE_FEED_URIS = "http://192.168.7.1:8000/tmp/deploy/" +PACKAGE_FEED_BASE_PATHS = "rpm" +PACKAGE_FEED_ARCHS = "" +#${PACKAGE_ARCHS}" + + +# Fix for rpm metadata clash between nativesdk-cmake and nativesdk-qtbase-tools +# (revalidate after 2017-10-15, 2018-06-12: still required) +DIRFILES_pn-nativesdk-cmake = "1" + +# For https://jira.automotivelinux.org/browse/SPEC-1629 : +# We exclude the conflicting vars from the sstate task hash. +# This needs to be verified. +do_package_write_rpm[vardepsexclude] += "ARCHIVER_TOPDIR PF" + +# Set preferred provider to new navi application +PREFERRED_RPROVIDER_virtual/navigation ?= "ondemandnavi" diff --git a/meta-agl/meta-agl-distro/conf/layer.conf b/meta-agl/meta-agl-distro/conf/layer.conf new file mode 100644 index 00000000..3c60fd4c --- /dev/null +++ b/meta-agl/meta-agl-distro/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "agl-distro" +BBFILE_PATTERN_agl-distro = "^${LAYERDIR}/" +BBFILE_PRIORITY_agl-distro = "70" + +LAYERSERIES_COMPAT_agl-distro = "thud" diff --git a/meta-agl/meta-agl-distro/scripts/oe-depends-dot b/meta-agl/meta-agl-distro/scripts/oe-depends-dot new file mode 100755 index 00000000..5cec23bf --- /dev/null +++ b/meta-agl/meta-agl-distro/scripts/oe-depends-dot @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 +# +# Copyright (C) 2018 Wind River Systems, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +import os +import sys +import argparse +import logging +import re + +class Dot(object): + def __init__(self): + parser = argparse.ArgumentParser( + description="Analyse recipe-depends.dot generated by bitbake -g", + epilog="Use %(prog)s --help to get help") + parser.add_argument("dotfile", + help = "Specify the dotfile", nargs = 1, action='store', default='') + parser.add_argument("-k", "--key", + help = "Specify the key, e.g., recipe name", + action="store", default='') + parser.add_argument("-d", "--depends", + help = "Print the key's dependencies", + action="store_true", default=False) + parser.add_argument("-w", "--why", + help = "Print why the key is built", + action="store_true", default=False) + parser.add_argument("-r", "--remove", + help = "Remove duplicated dependencies to reduce the size of the dot files." + " For example, A->B, B->C, A->C, then A->C can be removed.", + action="store_true", default=False) + + self.args = parser.parse_args() + + if len(sys.argv) != 3 and len(sys.argv) < 5: + print('ERROR: Not enough args, see --help for usage') + + def main(self): + #print(self.args.dotfile[0]) + # The format is {key: depends} + depends = {} + with open(self.args.dotfile[0], 'r') as f: + for line in f.readlines(): + if ' -> ' not in line: + continue + line_no_quotes = line.replace('"', '') + m = re.match("(.*) -> (.*)", line_no_quotes) + if not m: + print('WARNING: Found unexpected line: %s' % line) + continue + key = m.group(1) + if key == "meta-world-pkgdata": + continue + dep = m.group(2) + if key in depends: + if not key in depends[key]: + depends[key].add(dep) + else: + print('WARNING: Fonud duplicated line: %s' % line) + else: + depends[key] = set() + depends[key].add(dep) + + if self.args.remove: + reduced_depends = {} + for k, deps in depends.items(): + child_deps = set() + added = set() + # Both direct and indirect depends are already in the dict, so + # we don't have to do this recursively. + for dep in deps: + if dep in depends: + child_deps |= depends[dep] + + reduced_depends[k] = deps - child_deps + outfile= '%s-reduced%s' % (self.args.dotfile[0][:-4], self.args.dotfile[0][-4:]) + with open(outfile, 'w') as f: + print('Saving reduced dot file to %s' % outfile) + f.write('digraph depends {\n') + for k, v in reduced_depends.items(): + for dep in v: + f.write('"%s" -> "%s"\n' % (k, dep)) + f.write('}\n') + sys.exit(0) + + if self.args.key not in depends: + print("ERROR: Can't find key %s in %s" % (self.args.key, self.args.dotfile[0])) + sys.exit(1) + + if self.args.depends: + if self.args.key in depends: + print('Depends: %s' % ' '.join(depends[self.args.key])) + + reverse_deps = [] + if self.args.why: + for k, v in depends.items(): + if self.args.key in v and not k in reverse_deps: + reverse_deps.append(k) + print('Because: %s' % ' '.join(reverse_deps)) + +if __name__ == "__main__": + try: + dot = Dot() + ret = dot.main() + except Exception as esc: + ret = 1 + import traceback + traceback.print_exc() + sys.exit(ret) diff --git a/meta-agl/meta-agl-profile-cluster-qt5/conf/layer.conf b/meta-agl/meta-agl-profile-cluster-qt5/conf/layer.conf new file mode 100644 index 00000000..aa11e32d --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofileclusterqt5" +BBFILE_PATTERN_aglprofileclusterqt5 = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofileclusterqt5 = "70" + +LAYERSERIES_COMPAT_aglprofileclusterqt5 = "thud" diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.bb b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.bb new file mode 100644 index 00000000..244e2ba4 --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.bb @@ -0,0 +1,9 @@ +SUMMARY = "A basic Wayland based cluster image with Qt5 support" + +require agl-image-cluster-qt5.inc + +LICENSE = "MIT" + +IMAGE_INSTALL_append = "\ + profile-cluster-qt5 \ + " diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.inc b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.inc new file mode 100644 index 00000000..9f9f530f --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/images/agl-image-cluster-qt5.inc @@ -0,0 +1,7 @@ +require recipes-platform/images/agl-image-boot.inc + +IMAGE_FEATURES += "splash package-management ssh-server-dropbear" + +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES = "wayland" diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qt5.bb b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qt5.bb new file mode 100644 index 00000000..5436a561 --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qt5.bb @@ -0,0 +1,21 @@ +SUMMARY = "The middleware for AGL Qt5 based cluster profile" +DESCRIPTION = "The set of packages required for AGL Qt5 based Cluster Distribution" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-profile-cluster-qt5 \ + profile-cluster-qt5 \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-image-boot \ + packagegroup-agl-core-security \ + packagegroup-agl-graphical-weston \ + packagegroup-agl-appfw-native-qt5 \ +" + +RDEPENDS_profile-cluster-qt5 = "${PN}" diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qtcompositor.bb b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qtcompositor.bb new file mode 100644 index 00000000..9d54b33a --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-cluster-qtcompositor.bb @@ -0,0 +1,36 @@ +SUMMARY = "The middleware for AGL Qt5 based cluster qtcompositor" +DESCRIPTION = "The set of packages required for AGL Qt5 based Cluster Demo Qtcompositor Distribution" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-profile-cluster-qtcompositor \ + profile-cluster-qt5 \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-image-boot \ + packagegroup-agl-core-security \ + packagegroup-agl-core-connectivity \ +" + +QT_LITE = " \ + qtbase \ + qtdeclarative \ + qtwayland \ + qtgraphicaleffects-qmlplugins \ + qtsvg-plugins \ + qtwebsockets \ + qtwebsockets-qmlplugins \ + qtcompositor-conf \ +" + +RDEPENDS_${PN}_append = " \ + ${QT_LITE} \ + agl-login-manager \ +" + +RDEPENDS_profile-cluster-qt5 = "${PN}" diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0001-fixed-eglfs_kms-fails-to-build.patch b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0001-fixed-eglfs_kms-fails-to-build.patch new file mode 100644 index 00000000..5c936e7a --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0001-fixed-eglfs_kms-fails-to-build.patch @@ -0,0 +1,45 @@ +537bb3cc027eed14500fe5724ab30f Mon Sep 17 00:00:00 2001 +From: Laszlo Agocs +Date: Fri, 14 Dec 2018 10:48:43 +0100 +Subject: eglfs: avoid breaking builds without EGL_EXT_platform_base + +Change-Id: I9183e17b42c00435f20c00a414e1f20aa3972351 +Fixes: QTBUG-72559 +Reviewed-by: Johan Helsing +--- + .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp | 1 - + .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp | 4 ++++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +(limited to 'src/plugins/platforms/eglfs/deviceintegration/eglfs_kms') + +diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +index 1e4f4e72c8..f154520669 100644 +--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp ++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +@@ -63,7 +63,6 @@ QEglFSKmsGbmIntegration::QEglFSKmsGbmIntegration() + + #ifndef EGL_EXT_platform_base + typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); +-typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); + #endif + + #ifndef EGL_PLATFORM_GBM_KHR +diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp +index 65a7c4f38a..a93762e5b4 100644 +--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp ++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmwindow.cpp +@@ -45,6 +45,10 @@ + + QT_BEGIN_NAMESPACE + ++#ifndef EGL_EXT_platform_base ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); ++#endif ++ + void QEglFSKmsGbmWindow::resetSurface() + { + QEglFSKmsGbmScreen *gbmScreen = static_cast(screen()); +-- +cgit v1.2.1 + diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0002-fixed-invalid-conversion-from-EGLNativeDisplayType-to-void.patch b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0002-fixed-invalid-conversion-from-EGLNativeDisplayType-to-void.patch new file mode 100644 index 00000000..3c33cfc1 --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/files/0002-fixed-invalid-conversion-from-EGLNativeDisplayType-to-void.patch @@ -0,0 +1,24 @@ +From 9514c51b5a6881c445586fa3a232ccd47fe4b1e5 Mon Sep 17 00:00:00 2001 +From: Stefan Zehetbauer +Date: Fri, 14 Dec 2018 13:26:03 +0100 +Subject: [PATCH] fixed invalid conversion from EGLNativeDisplayType to void* + +--- + .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +index d495a8d..34ca9e8 100644 +--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp ++++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +@@ -82,7 +82,7 @@ EGLDisplay QEglFSKmsGbmIntegration::createDisplay(EGLNativeDisplayType nativeDis + } + + if (getPlatformDisplay) { +- display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, nativeDisplay, nullptr); ++ display = getPlatformDisplay(EGL_PLATFORM_GBM_KHR, reinterpret_cast(&nativeDisplay), nullptr); + } else { + qCDebug(qLcEglfsKmsDebug, "No eglGetPlatformDisplay for GBM, falling back to eglGetDisplay"); + display = eglGetDisplay(nativeDisplay); +-- +1.9.1 diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtbase_%.bbappend b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtbase_%.bbappend new file mode 100644 index 00000000..50db225c --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtbase_%.bbappend @@ -0,0 +1,10 @@ +#Enable eglfs for QT based application + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + + +SRC_URI += " file://0001-fixed-eglfs_kms-fails-to-build.patch \ + file://0002-fixed-invalid-conversion-from-EGLNativeDisplayType-to-void.patch \ + " + +PACKAGECONFIG_GL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' eglfs kms gbm', '', d)}" diff --git a/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtcompositor-conf_1.0.bb b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtcompositor-conf_1.0.bb new file mode 100644 index 00000000..49111b6e --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster-qt5/recipes-qt/qt5/qtcompositor-conf_1.0.bb @@ -0,0 +1,40 @@ +SUMMARY = "Configuration files for running wayland with a non-weston compositor" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit allarch agl-graphical + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + # Add a rule to ensure the 'display' user has permissions to + # open the graphics device + install -d ${D}${sysconfdir}/udev/rules.d + cat >${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF' +SUBSYSTEM=="drm", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*" +EOF + + # user 'display' must also be able to access /dev/input/* + cat >${D}${sysconfdir}/udev/rules.d/zz-input.rules <<'EOF' +SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="^" +EOF + + # user 'display' must also be able to access /dev/media*, etc. + cat >${D}${sysconfdir}/udev/rules.d/zz-remote-display.rules <<'EOF' +SUBSYSTEM=="media", MODE="0660", GROUP="display", SECLABEL{smack}="*" +SUBSYSTEM=="video4linux", MODE="0660", GROUP="display", SECLABEL{smack}="*" +KERNEL=="uvcs", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*" +KERNEL=="rgnmm", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*" +EOF +} + +do_install_append_imx() { + install -d ${D}${sysconfdir}/udev/rules.d + cat >>${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF' +SUBSYSTEM=="gpu_class", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*" +EOF + +} + +RCONFLICTS_${PN} = "weston-init" diff --git a/meta-agl/meta-agl-profile-cluster/conf/layer.conf b/meta-agl/meta-agl-profile-cluster/conf/layer.conf new file mode 100644 index 00000000..e15c3be4 --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofilecluster" +BBFILE_PATTERN_aglprofilecluster = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofilecluster = "70" + +LAYERSERIES_COMPAT_aglprofilecluster = "thud" diff --git a/meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.bb b/meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.bb new file mode 100644 index 00000000..552d7a74 --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.bb @@ -0,0 +1,9 @@ +SUMMARY = "A basic Wayland based cluster image" + +require agl-image-cluster.inc + +LICENSE = "MIT" + +IMAGE_INSTALL_append = "\ + profile-cluster \ + " diff --git a/meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.inc b/meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.inc new file mode 100644 index 00000000..9f9f530f --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster/recipes-platform/images/agl-image-cluster.inc @@ -0,0 +1,7 @@ +require recipes-platform/images/agl-image-boot.inc + +IMAGE_FEATURES += "splash package-management ssh-server-dropbear" + +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES = "wayland" diff --git a/meta-agl/meta-agl-profile-cluster/recipes-platform/packagegroups/packagegroup-agl-profile-cluster.bb b/meta-agl/meta-agl-profile-cluster/recipes-platform/packagegroups/packagegroup-agl-profile-cluster.bb new file mode 100644 index 00000000..c0c61246 --- /dev/null +++ b/meta-agl/meta-agl-profile-cluster/recipes-platform/packagegroups/packagegroup-agl-profile-cluster.bb @@ -0,0 +1,20 @@ +SUMMARY = "The middleware for AGL cluster profile" +DESCRIPTION = "The set of packages required for AGL Cluster Distribution" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-profile-cluster \ + profile-cluster \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-image-boot \ + packagegroup-agl-core-security \ + packagegroup-agl-graphical-weston \ +" + +RDEPENDS_profile-cluster = "${PN}" diff --git a/meta-agl/meta-agl-profile-core/classes/cloc.bbclass b/meta-agl/meta-agl-profile-core/classes/cloc.bbclass new file mode 100644 index 00000000..53713bfc --- /dev/null +++ b/meta-agl/meta-agl-profile-core/classes/cloc.bbclass @@ -0,0 +1,29 @@ +# (C) 2017 Jan-Simon Möller +# +# License: GPLv2 +# +# summary with +# cloc --sum-reports `find . -name "*clocreport" | grep -v "\-native" ` --out summary.report + +CLOC_DIRECTORY ??= "${DEPLOY_DIR}/cloc/" +CLOCSTATEDIR = "${WORKDIR}/cloc-destdir/" + +python do_cloc() { + + import subprocess + + source_dir = d.getVar('S', True) + pn = d.getVar('PN', True) + + destdir = d.expand('${CLOCSTATEDIR}') + bb.utils.mkdirhier(destdir) + + cloc_cmd = 'cloc %s -q --out=%s/%s.clocreport' % (source_dir, destdir, pn ) + subprocess.call(cloc_cmd, shell=True) + +} + + +addtask cloc before do_configure after do_unpack + +EXPORT_FUNCTIONS do_cloc diff --git a/meta-agl/meta-agl-profile-core/conf/include/agl-devel.inc b/meta-agl/meta-agl-profile-core/conf/include/agl-devel.inc new file mode 100644 index 00000000..2157f6f1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/conf/include/agl-devel.inc @@ -0,0 +1,17 @@ +IMAGE_FEATURES =+ "debug-tweaks eclipse-debug tools-debug tools-profile" + +IMAGE_INSTALL_append = " \ + packagegroup-agl-core-devel \ +" + +IMAGE_INSTALL_append = "${@bb.utils.contains('IMAGE_FSTYPES', 'wic.vmdk', ' open-vm-tools vboxguestdrivers', '', d)}" +# Install libdrm-test, including modetest, to images with GUI +IMAGE_INSTALL_append = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libdrm-tests', '', d)}" + +# disable install of debug files in SDK +# initial value: SDKIMAGE_FEATURES="dev-pkgs dbg-pkgs staticdev-pkgs" +SDKIMAGE_FEATURES="dev-pkgs" + +# allows insertion of code or items specific to developement +OVERRIDES .= ":agl-devel" +DISTRO_FEATURES_append = " agl-devel" diff --git a/meta-agl/meta-agl-profile-core/conf/include/agl-gplv2.inc b/meta-agl/meta-agl-profile-core/conf/include/agl-gplv2.inc new file mode 100644 index 00000000..fc9a4072 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/conf/include/agl-gplv2.inc @@ -0,0 +1,8 @@ +# GPLv3 Compliance +PREFERRED_VERSION_bash = "3.2.%" +PREFERRED_VERSION_gawk = "3.1.%" +PREFERRED_VERSION_gdbm = "1.8.%" +PREFERRED_VERSION_gnupg = "1.4.7" +PREFERRED_VERSION_gnutls = "3.3.%" +PREFERRED_VERSION_mc = "4.7.5.%" +PREFERRED_VERSION_readline = "5.2" diff --git a/meta-agl/meta-agl-profile-core/conf/include/agl-pulseaudio.inc b/meta-agl/meta-agl-profile-core/conf/include/agl-pulseaudio.inc new file mode 100644 index 00000000..69092ab9 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/conf/include/agl-pulseaudio.inc @@ -0,0 +1 @@ +DISTRO_FEATURES_append = " pulseaudio" diff --git a/meta-agl/meta-agl-profile-core/conf/include/base-agl.inc b/meta-agl/meta-agl-profile-core/conf/include/base-agl.inc new file mode 100644 index 00000000..a332c08a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/conf/include/base-agl.inc @@ -0,0 +1,19 @@ +# AGL includes all kernel modules here for ease-of-use during development. +# Comment this out to be able to select the kernel modules yourself. +IMAGE_INSTALL_append = " kernel-modules" + +# Likewise as we included all kernel modules by default in the filesystem, +# we do not need a separate tarball stored. +# Comment this out to receive the separate modules tarball again. +MODULE_TARBALL_DEPLOY ?= "0" + +# Comment out below if want to use QtWebkit +PACKAGECONFIG_remove_pn-qtquick1 = "webkit" + + +ASSUME_PROVIDED_remove = "tar-native" + +# Use static IDs to enable full-filesystem updates +USERADDEXTENSION = "useradd-staticids" +USERADD_ERROR_DYNAMIC = "error" + diff --git a/meta-agl/meta-agl-profile-core/conf/layer.conf b/meta-agl/meta-agl-profile-core/conf/layer.conf new file mode 100644 index 00000000..641b2286 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofilecore" +BBFILE_PATTERN_aglprofilecore = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofilecore = "80" + +LAYERSERIES_COMPAT_aglprofilecore = "thud" diff --git a/meta-agl/meta-agl-profile-core/files/group b/meta-agl/meta-agl-profile-core/files/group new file mode 100644 index 00000000..ebf19e9a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/files/group @@ -0,0 +1,92 @@ +root::0: +daemon::1: +bin::2: +sys::3: +adm::4: +tty::5: +disk::6: +lp::7: +mail::8: +news::9: +uucp::10: +man::12: +proxy::13: +kmem::15: +input::19: +dialout::20: +fax::21: +voice::22: +cdrom::24: +floppy::25: +tape::26: +sudo::27: +audio::29: +dip::30: +www-data::33: +backup::34: +operator::37: +list::38: +irc::39: +src::40: +gnats::41: +shadow::42: +utmp::43: +video::44: +sasl::45: +plugdev::46: +staff::50: +games::60: +shutdown::70: +users::100: +nogroup::65534: +cynara::999: +dhcp::998: +avahi::997: +tracing::1000: +sshd::996: +systemd-bus-proxy::995: +netdev::993: +messagebus::994: +afm::992: +weston-launch::986: +lock::990: +systemd-journal::989: +systemd-timesync::988: +systemd-coredump::888: +pulse::991: +bind::987: +trinity::985: +mpd::984: +mysql::983: +polkitd::982: +datetime::981: +network::980: +zabbix::979: +nm-openvpn::978: +xuser::1002: +builder::977: +rpc::976: +crontab::975: +lpadmin::974: +_apt::972: +rpcuser::970: +avahi-autoipd::969: +ntp::968: +dovecot::967: +dovenull::966: +quagga::965: +quaggavty::964: +rwhod::963: +ftp::962: +squid::960: +postfix::959: +vmail::958: +opensaf::957: +lldpd::956: +postdrop::954: +display::200: +agl-driver::1001: +agl-passenger::1002: +systemd-network::1005: +systemd-resolve::1006: +mosquitto::1007: diff --git a/meta-agl/meta-agl-profile-core/files/passwd b/meta-agl/meta-agl-profile-core/files/passwd new file mode 100644 index 00000000..bd1788f1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/files/passwd @@ -0,0 +1,62 @@ +root::0:0::: +daemon::1:1::: +bin::2:2::: +sys::3:3::: +sync::4:65534::: +games::5:60::: +man::6:12::: +lp::7:7::: +mail::8:8::: +news::9:9::: +uucp::10:10::: +proxy::13:13::: +www-data::33:33::: +backup::34:34::: +list::38:38::: +irc::39:39::: +gnats::41:41::: +nobody::65534:65534::: +cynara::999:999::: +dhcp::998:998::: +avahi::997:997::: +sshd::996:996::: +systemd-bus-proxy::995:995::: +agl-driver::1001:1001::: +agl-passenger::1002:1002::: +messagebus::994:994::: +afm::992:992::: +systemd-timesync::988:988::: +systemd-coredump::888:888::: +pulse::991:991::: +bind::987:987::: +trinity::985:985::: +mpd::984:984::: +mysql::983:983::: +polkitd::982:982::: +zabbix::979:979::: +nm-openvpn::978:978::: +xuser::1002:1002::: +builder::977:977::: +rpc::976:976::: +distcc::973:65534::: +_apt::972:972::: +ppp::971:65534::: +rpcuser::970:970::: +avahi-autoipd::969:969::: +ntp::968:968::: +dovecot::967:967::: +dovenull::966:966::: +quagga::965:965::: +rwhod::963:963::: +ftp::962:962::: +radvd::961:65534::: +squid::960:960::: +postfix::959:959::: +vmail::958:958::: +opensaf::957:957::: +lldpd::956:956::: +cyrus::955:8::: +display::200:200::: +systemd-network::1005:1005::: +systemd-resolve::1006:1006::: +mosquitto::1007:1007::: diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-map/agl-service-bluetooth-map_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-map/agl-service-bluetooth-map_git.bb new file mode 100644 index 00000000..bc53051f --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-map/agl-service-bluetooth-map_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Bluetooth MAP Service Binding" +DESCRIPTION = "AGL Bluetooth MAP Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-bluetooth-map" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-bluetooth-map;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS_${PN} = "bluez5-obex agl-service-bluetooth" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-pbap/agl-service-bluetooth-pbap_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-pbap/agl-service-bluetooth-pbap_git.bb new file mode 100644 index 00000000..3f9ff7be --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth-pbap/agl-service-bluetooth-pbap_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Bluetooth PBAP Service Binding" +DESCRIPTION = "AGL Bluetooth PBAP Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-bluetooth-pbap" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-bluetooth-pbap;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS_${PN} = "bluez5-obex agl-service-bluetooth agl-service-data-persistence" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth/agl-service-bluetooth_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth/agl-service-bluetooth_git.bb new file mode 100644 index 00000000..8cfa8ec8 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-bluetooth/agl-service-bluetooth_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Bluetooth Service Binding" +DESCRIPTION = "AGL Bluetooth Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-bluetooth" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-bluetooth;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS_${PN} = "agl-service-data-persistence agl-service-network" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb new file mode 100644 index 00000000..91c6b75c --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/agl-service-can-low-level_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Low level CAN service" +DESCRIPTION = "AGL Service application for read and decode CAN messages" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/low-level-can-service" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-can-low-level;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "087a7c0e7de28bb1c16895ef9d414666d37a35ea" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + +DEPENDS = "libafb-helpers" +RDEPENDS_${PN} = "dev-mapping" + +inherit cmake aglwgt pkgconfig ptest + diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/files/run-ptest b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/files/run-ptest new file mode 100644 index 00000000..cc9c4136 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-can-low-level/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +afm-test /usr/AGL/apps/testwgt/low-can-service-test.wgt diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-data-persistence/agl-service-data-persistence_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-data-persistence/agl-service-data-persistence_git.bb new file mode 100644 index 00000000..bb8caaad --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-data-persistence/agl-service-data-persistence_git.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "AGL low level user database binding" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-data-persistence/" +SECTION = "base" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8089a3c40cff9caffd1b9ba5aa3dfd67" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-data-persistence;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +inherit cmake aglwgt pkgconfig + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS += " af-binder json-c gdbm " + diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geoclue/agl-service-geoclue_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geoclue/agl-service-geoclue_git.bb new file mode 100644 index 00000000..a1292324 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geoclue/agl-service-geoclue_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "GeoClue Service Binding" +DESCRIPTION = "AGL GeoClue Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-geoclue" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-geoclue;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c geoclue" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geofence/agl-service-geofence_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geofence/agl-service-geofence_git.bb new file mode 100644 index 00000000..8bdcd7c9 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-geofence/agl-service-geofence_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Geofence Service Binding" +DESCRIPTION = "AGL Geofence Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-geofence" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-geofence;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c glib-2.0" +RDEPENDS_${PN} = "agl-service-gps" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-gps/agl-service-gps_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-gps/agl-service-gps_git.bb new file mode 100644 index 00000000..254e5e40 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-gps/agl-service-gps_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "GPS/GNSS Service Binding" +DESCRIPTION = "AGL GPS/GNSS Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-gps" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-gps;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c gpsd" +RDEPENDS_${PN} = "libgps" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bb new file mode 100644 index 00000000..f5dc0814 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "HVAC Service Binding" +DESCRIPTION = "AGL HVAC Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-hvac" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-hvac;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c" +RDEPENDS_${PN} += "agl-service-identity-agent" + +do_install_append () { + install -D -m 644 ${S}/hvac.json ${D}${sysconfdir}/hvac.json +} + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bbappend b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bbappend new file mode 100644 index 00000000..0817d5ed --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-hvac/agl-service-hvac_git.bbappend @@ -0,0 +1,5 @@ +# for demo +PACKAGE_ARCH_m3ulcb = "${MACHINE_ARCH}" +do_configure_prepend_m3ulcb() { +sed -i -e "s#vcan0#sllin0#g" ${S}/binding/hvac-demo-binding.c +} \ No newline at end of file diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-identity-agent/agl-service-identity-agent_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-identity-agent/agl-service-identity-agent_git.bb new file mode 100644 index 00000000..56e11832 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-identity-agent/agl-service-identity-agent_git.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "AGL identity agent binding" +HOMEPAGE = "https://gitlab.com/iotbzh/aia-binding" +SECTION = "base" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-identity-agent;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" +PV = "1.0+git${SRCPV}" + +inherit cmake aglwgt pkgconfig + +S = "${WORKDIR}/git" + +DEPENDS = "curl af-binder json-c systemd" + diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-iiodevices/agl-service-iiodevices_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-iiodevices/agl-service-iiodevices_git.bb new file mode 100644 index 00000000..cc893698 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-iiodevices/agl-service-iiodevices_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "IIODEVICES Service Binding" +DESCRIPTION = "AGL IIODEVICES Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-iiodevices" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-iiodevices;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c libiio glib-2.0" + +RDEPENDS_${PN} = "libiio" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-mediascanner/agl-service-mediascanner_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-mediascanner/agl-service-mediascanner_git.bb new file mode 100644 index 00000000..c50a0480 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-mediascanner/agl-service-mediascanner_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Mediascanner Service Binding" +DESCRIPTION = "AGL Mediascanner Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-mediascanner" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-mediascanner;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c sqlite3 glib-2.0" +RDEPENDS_${PN} = "lightmediascanner" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-navigation/agl-service-navigation_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-navigation/agl-service-navigation_git.bb new file mode 100755 index 00000000..c7a6fce0 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-navigation/agl-service-navigation_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Navigation Service Binding" +DESCRIPTION = "AGL Navigation Service API Binding" +HOMEPAGE = "https://github.com/AGLExport/agl-service-navigation" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "json-c libdbus-c++" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-navigation;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-network/agl-service-network_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-network/agl-service-network_git.bb new file mode 100644 index 00000000..dbe9b3e9 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-network/agl-service-network_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "Network Service Binding" +DESCRIPTION = "AGL Network Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-network" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-network;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" + +FILES_${PN}-tools = "${sbindir}/agl-service-network-ctl" +PACKAGES = "${PN}-tools ${PN}-dbg ${PN}" + +do_install_append() { + install -d ${D}${sbindir} + install -m 755 ${B}/test/agl-service-network-ctl ${D}${sbindir} +} + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-nfc/agl-service-nfc_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-nfc/agl-service-nfc_git.bb new file mode 100644 index 00000000..1757dcb3 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-nfc/agl-service-nfc_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "agl-service-nfc" +DESCRIPTION = "" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-nfc/" +SECTION = "apps" +DEPENDS = "af-binder json-c glib-2.0 neardal" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit cmake pkgconfig aglwgt + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-nfc;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-platform-info/agl-service-platform-info_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-platform-info/agl-service-platform-info_git.bb new file mode 100644 index 00000000..43eed3f2 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-platform-info/agl-service-platform-info_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Platform info provider binding" +DESCRIPTION = "AGL Platform info provider binding" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-platform-info/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-platform-info;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "libafb-helpers" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/agl-service-signal-composer_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/agl-service-signal-composer_git.bb new file mode 100644 index 00000000..742a7f7f --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/agl-service-signal-composer_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "agl-service-signal-composer" +DESCRIPTION = "AGL High Level Signaling service to handle CAN, LIN, and others signaling sources" +HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-signal-composer/" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit cmake pkgconfig aglwgt ptest + +DEPENDS += "lua lua-native libappcontroller libafb-helpers" +RDEPENDS_${PN} += "lua" + +SRC_URI = "gitsm://git.automotivelinux.org/apps/agl-service-signal-composer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "fe311f49703e9691fa7d515ed84a70b996f7f3e8" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/files/run-ptest b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/files/run-ptest new file mode 100644 index 00000000..49187ad8 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-signal-composer/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +afm-test /usr/AGL/apps/testwgt/signal-composer-test.wgt diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-steering-wheel/agl-service-steering-wheel_0.1.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-steering-wheel/agl-service-steering-wheel_0.1.bb new file mode 100644 index 00000000..a34644ce --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-steering-wheel/agl-service-steering-wheel_0.1.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "logitech g29 wheel service" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-steering-wheel" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" +SECTION = "apps" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-steering-wheel;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "6d5d619a059b5aeb76c2add9bc28d45bd31279e9" +PN = "agl-service-steering-wheel" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 af-binder" + +inherit cmake aglwgt diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-telephony/agl-service-telephony_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-telephony/agl-service-telephony_git.bb new file mode 100644 index 00000000..ff391364 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-telephony/agl-service-telephony_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Telephony Service Binding" +DESCRIPTION = "AGL Telephony Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-telephony" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-telephony;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c glib-2.0" +RDEPENDS_${PN} = "ofono" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-unicens/agl-service-unicens_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-unicens/agl-service-unicens_git.bb new file mode 100644 index 00000000..0126c768 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-unicens/agl-service-unicens_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "4A - Infotainment network setup and access" +DESCRIPTION = "Infotainment network setup and access (using Unified Centralized Network Stack)" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-unicens" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-unicens;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "0.1+git${SRCPV}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt pkgconfig + +DEPENDS += "alsa-lib json-c systemd af-binder glib-2.0 libxml2 libafb-helpers" +RDEPENDS_${PN} += "libxml2 " + diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-weather/agl-service-weather_git.bb b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-weather/agl-service-weather_git.bb new file mode 100644 index 00000000..75532da4 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/agl-service-weather/agl-service-weather_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Weather Service Binding" +DESCRIPTION = "AGL Weather Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-weather" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-weather;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "glib-2.0 json-c" +RDEPENDS_${PN} = "agl-service-geoclue" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-core/recipes-apis/high-level-viwi-service/high-level-viwi-service.bb b/meta-agl/meta-agl-profile-core/recipes-apis/high-level-viwi-service/high-level-viwi-service.bb new file mode 100644 index 00000000..b7dc38b5 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-apis/high-level-viwi-service/high-level-viwi-service.bb @@ -0,0 +1,19 @@ +SUMMARY = "High level ViWi service" +DESCRIPTION = "AGL High Level service using ViWi protocol to expose CAN API." +HOMEPAGE = "https://github.com/iotbzh/high-level-viwi-service" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5de84541278ea4e62cacfdc0f890c459" + +SRC_URI = "gitsm://github.com/iotbzh/high-level-viwi-service.git;protocol=https" +SRCREV = "e9d304eb5ac99b3ba6b72022458f09fcd713b584" + +PV = "4.0+git${SRCPV}" +S = "${WORKDIR}/git" + +# Run-time dependencies +RDEPENDS_${PN} += "agl-service-can-low-level" + +inherit cmake aglwgt + +AGLWGT_AUTOINSTALL_${PN} := "0" diff --git a/meta-agl/meta-agl-profile-core/recipes-config/agl-login-manager/agl-login-manager_0.1.bb b/meta-agl/meta-agl-profile-core/recipes-config/agl-login-manager/agl-login-manager_0.1.bb new file mode 100644 index 00000000..49efce79 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-config/agl-login-manager/agl-login-manager_0.1.bb @@ -0,0 +1,19 @@ +SUMMARY = "AGL Login manager" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +LOGIN_USER ??="1001 1002" + +RDEPENDS_${PN} += "af-main" + +do_install_append() { + + install -d ${D}${systemd_system_unitdir}/multi-user.target.wants/ + + for AGL_USER in ${LOGIN_USER};do + ln -s ../afm-user-session@.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-user-session@${AGL_USER}.service + done +} + +FILES_${PN} += "${systemd_system_unitdir}" diff --git a/meta-agl/meta-agl-profile-core/recipes-config/agl-users/agl-users_0.1.bb b/meta-agl/meta-agl-profile-core/recipes-config/agl-users/agl-users_0.1.bb new file mode 100644 index 00000000..709a1091 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-config/agl-users/agl-users_0.1.bb @@ -0,0 +1,27 @@ +inherit allarch useradd + +SUMMARY = "AGL Users Seed" +DESCRIPTION = "This is a core framework component that\ + defines how users are managed and who are the default users." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +ALLOW_EMPTY_${PN} = "1" + +USERADD_PACKAGES = "${PN}" + +USERADDEXTENSION = "useradd-staticids" + +GROUPADD_PARAM_${PN} = "\ + --system display ; \ + --system weston-launch ; \ + -g 1001 agl-driver ; \ + -g 1002 agl-passenger \ +" + +USERADD_PARAM_${PN} = "\ + -g 1001 -u 1001 -o -d /home/1001 -m -K PASS_MAX_DAYS=-1 agl-driver ; \ + -g 1002 -u 1002 -o -d /home/1002 -m -K PASS_MAX_DAYS=-1 agl-passenger ; \ + --gid display --groups weston-launch,video,input --home-dir /run/platform/display --shell /bin/false --comment \"Display daemon\" --key PASS_MAX_DAYS=-1 display \ +" diff --git a/meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default b/meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default new file mode 100644 index 00000000..7bd8bf2e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/dev-mapping.conf.default @@ -0,0 +1,6 @@ +; Default CAN device mapping +; Format has to follow ini rules key="value", notice " around value. + +[CANbus-mapping] +hs="can0" +ls="can0" diff --git a/meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb b/meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb new file mode 100644 index 00000000..befb5443 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping_0.1.bb @@ -0,0 +1,18 @@ +inherit allarch + +SUMMARY = "AGL Device mapping configuration file" +DESCRIPTION = "This provide default dev-mapping.conf file \ + that defines mapping between kernel device and logical name \ + used in low-can binding by example." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://dev-mapping.conf.default" + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/dev-mapping.conf.default ${D}${sysconfdir}/dev-mapping.conf +} diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb new file mode 100644 index 00000000..010329ee --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/bluez-alsa_git.bb @@ -0,0 +1,43 @@ +SUMMARY = "Bluetooth Audio ALSA Backend" +HOMEPAGE = "https://github.com/Arkq/bluez-alsa" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3d7d6ac7e2dbd2505652dceb3acdf1fe" + +SRC_URI = "git://github.com/Arkq/bluez-alsa.git;protocol=https;branch=master" +SRCREV = "2cd6e4686f7808276480b430fb37df55dfdcc02b" + +SRC_URI += "file://bluez-alsa.service" + +S = "${WORKDIR}/git" + +DEPENDS += "alsa-lib bluez5 systemd glib-2.0 sbc" + +PACKAGECONFIG[aac] = "--enable-aac, --disable-aac, " +PACKAGECONFIG[aptx] = "--enable-aptx,--disable-aptx," +PACKAGECONFIG[ofono] = "--enable-ofono, --disable-ofono," + +inherit autotools pkgconfig +inherit systemd + +SYSTEMD_AUTO_ENABLE = "enable" +SYSTEMD_SERVICE_${PN} = "bluez-alsa.service" + +PACKAGECONFIG += "ofono" + +# enable debug tools in devel images +PACKAGECONFIG[hcitop] = "--enable-hcitop, --disable-hcitop, libbsd ncurses" +PACKAGECONFIG[rfcomm] = "--enable-rfcomm, --disable-rfcomm," +PACKAGECONFIG_append_agl-devel = " hcitop rfcomm" + +do_install_append () { + install -d ${D}${base_libdir}/systemd/system + install -m 0644 ${WORKDIR}/bluez-alsa.service ${D}${base_libdir}/systemd/system +} + +FILES_${PN} += "\ + ${datadir}/alsa/alsa.conf.d/20-bluealsa.conf\ + ${libdir}/alsa-lib/libasound_module_ctl_bluealsa.so\ + ${libdir}/alsa-lib/libasound_module_pcm_bluealsa.so\ +" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/files/bluez-alsa.service b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/files/bluez-alsa.service new file mode 100644 index 00000000..b59302ee --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez-alsa/files/bluez-alsa.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bluetooth Audio ALSA Backend +After=bluetooth.service +Requires=bluetooth.service + +[Service] +Type=simple +ExecStart=/usr/bin/bluealsa -p a2dp-sink -p hfp-ofono + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/0001-obex-report-notification-status-on-incoming-message.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/0001-obex-report-notification-status-on-incoming-message.patch new file mode 100644 index 00000000..44bae715 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/0001-obex-report-notification-status-on-incoming-message.patch @@ -0,0 +1,26 @@ +From 0d85faf308285c6a1f77f01660a2ce0541bfa5b4 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Wed, 12 Jun 2019 17:04:00 -0700 +Subject: [PATCH] obex: report notification status on incoming message + +To match doc/obex.txt on incoming message notification the respective +Status field should be set. +--- + obexd/client/map.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/obexd/client/map.c b/obexd/client/map.c +index 550c5afb4..23be2d6b2 100644 +--- a/obexd/client/map.c ++++ b/obexd/client/map.c +@@ -1914,6 +1914,7 @@ static void map_handle_notification(struct map_event *event, void *user_data) + switch (event->type) { + case MAP_ET_NEW_MESSAGE: + map_handle_new_message(map, event); ++ map_handle_status_changed(map, event, "notification"); + break; + case MAP_ET_DELIVERY_SUCCESS: + map_handle_status_changed(map, event, "delivery-success"); +-- +2.20.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/bluetooth.conf b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/bluetooth.conf new file mode 100644 index 00000000..1f2762de --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/bluetooth.conf @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf new file mode 100644 index 00000000..8545d76e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5/tmpdir.conf @@ -0,0 +1,2 @@ +[Service] +Environment="TMPDIR=/run/user/%U/usrshr" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend new file mode 100644 index 00000000..36fb3151 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/bluez5/bluez5_%.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append = " \ + file://bluetooth.conf \ + file://tmpdir.conf \ + file://0001-obex-report-notification-status-on-incoming-message.patch \ +" + +FILES_${PN} += "${systemd_user_unitdir}/obex.service.d/tmpdir.conf" + +do_install_append() { + install -m 0644 ${WORKDIR}/bluetooth.conf ${D}${sysconfdir}/dbus-1/system.d/bluetooth.conf + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + mkdir -p ${D}${systemd_user_unitdir}/obex.service.d + install -m 0644 ${WORKDIR}/tmpdir.conf ${D}${systemd_user_unitdir}/obex.service.d/tmpdir.conf + mkdir -p ${D}/etc/systemd/user + ln -sf ${systemd_user_unitdir}/obex.service ${D}/etc/systemd/user/dbus-org.bluez.obex.service + fi +} diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/busybox_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/busybox_%.bbappend new file mode 100644 index 00000000..198b651d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/busybox_%.bbappend @@ -0,0 +1,2 @@ +SRC_URI += "file://enable-wget-https.cfg" +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/files/enable-wget-https.cfg b/meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/files/enable-wget-https.cfg new file mode 100644 index 00000000..e92006be --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/busybox/files/enable-wget-https.cfg @@ -0,0 +1,3 @@ +# Thu Jun 8 17:32:07 2017 +CONFIG_FEATURE_WGET_OPENSSL=y +CONFIG_FEATURE_WGET_SSL_HELPER=y diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb new file mode 100644 index 00000000..61086dfe --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "A simple ncurses interface for connman" +DESCRIPTION = "A simple ncurses interface for connman" +HOMEPAGE = "https://gitlab.com/iotbzh/connman-json-client" + +SECTION = "console/network" + +DEPENDS = "dbus ncurses connman json-c" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8c16666ae6c159876a0ba63099614381" + +SRC_URI = "git://gitlab.com/iotbzh/connman-json-client.git;protocol=https" +SRCREV = "2b0f93ec9518c978c04807fe52e95315d6d80e6b" + +inherit autotools pkgconfig + +EXTRA_AUTORECONF += " -i" +EXTRA_OECONF += " --disable-optimization --enable-debug" + +S = "${WORKDIR}/git" + +do_install () { + install -dm755 ${D}${bindir} + install -Dm755 connman_ncurses ${D}${bindir} +} + +FILES_${PN} = "${bindir}/connman_ncurses" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/.appends.core b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/.appends.core new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman.inc b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman.inc new file mode 100644 index 00000000..0a117e44 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman.inc @@ -0,0 +1,216 @@ +SUMMARY = "A daemon for managing internet connections within embedded devices" +DESCRIPTION = "The ConnMan project provides a daemon for managing \ +internet connections within embedded devices running the Linux \ +operating system. The Connection Manager is designed to be slim and \ +to use as few resources as possible, so it can be easily integrated. \ +It is a fully modular system that can be extended, through plug-ins, \ +to support all kinds of wired or wireless technologies. Also, \ +configuration methods, like DHCP and domain name resolving, are \ +implemented using plug-ins." +HOMEPAGE = "http://connman.net/" +BUGTRACKER = "https://01.org/jira/browse/CM" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ + file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" + +inherit autotools pkgconfig systemd update-rc.d bluetooth update-alternatives + +DEPENDS = "dbus glib-2.0 ppp readline" + +INC_PR = "r20" + +EXTRA_OECONF += "\ + ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ + ac_cv_path_PPPD=${sbindir}/pppd \ + --enable-debug \ + --enable-loopback \ + --enable-ethernet \ + --enable-tools \ + --disable-polkit \ + --enable-client \ +" + +PACKAGECONFIG ??= "wispr \ + ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ + iptables \ +" + +# If you want ConnMan to support VPN, add following statement into +# local.conf or distro config +# PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp" + +PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" +PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant" +PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, ${BLUEZ}, ${BLUEZ}" +PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" +PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," +PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" +PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" +PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd" +PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" +# WISPr support for logging into hotspots, requires TLS +PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," +PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables-ipv4 kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-meta kernel-module-nft-masq-ipv4 kernel-module-nft-nat" +PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables" + +INITSCRIPT_NAME = "connman" +INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." + +python __anonymous () { + systemd_packages = "${PN}" + pkgconfig = d.getVar('PACKAGECONFIG') + if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): + systemd_packages += " ${PN}-vpn" + d.setVar('SYSTEMD_PACKAGES', systemd_packages) +} + +SYSTEMD_SERVICE_${PN} = "connman.service" +SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" +SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" +ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" + +do_install_append() { + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman + sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman + fi + + install -d ${D}${bindir} + install -m 0755 ${B}/tools/*-test ${D}${bindir} + if [ -e ${B}/tools/wispr ]; then + install -m 0755 ${B}/tools/wispr ${D}${bindir} + fi + install -m 0755 ${B}/client/connmanctl ${D}${bindir} + + # We don't need to package an empty directory + rmdir --ignore-fail-on-non-empty ${D}${libdir}/connman/scripts + + # Automake 1.12 won't install empty directories, but we need the + # plugins directory to be present for ownership + mkdir -p ${D}${libdir}/connman/plugins + + # For read-only filesystem, do not create links during bootup + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman + fi +} + +# These used to be plugins, but now they are core +RPROVIDES_${PN} = "\ + connman-plugin-loopback \ + connman-plugin-ethernet \ + ${@bb.utils.contains('PACKAGECONFIG', 'bluetooth','connman-plugin-bluetooth', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'wifi','connman-plugin-wifi', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ + " + +RDEPENDS_${PN} = "\ + dbus \ + " + +PACKAGES_DYNAMIC += "^${PN}-plugin-.*" + +def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): + plugintype = pkg.split( '-' )[-1] + if plugintype in depmap: + rdepends = map(lambda x: multilib_prefix + x, \ + depmap[plugintype].split()) + d.setVar("RDEPENDS_%s" % pkg, " ".join(rdepends)) + if add_insane_skip: + d.appendVar("INSANE_SKIP_%s" % pkg, "dev-so") + +python populate_packages_prepend() { + depmap = dict(pppd="ppp") + multilib_prefix = (d.getVar("MLPREFIX") or "") + + hook = lambda file,pkg,x,y,z: \ + add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False) + plugin_dir = d.expand('${libdir}/connman/plugins/') + plugin_name = d.expand('${PN}-plugin-%s') + do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ + '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True ) + + hook = lambda file,pkg,x,y,z: \ + add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True) + plugin_dir = d.expand('${libdir}/connman/plugins-vpn/') + plugin_name = d.expand('${PN}-plugin-vpn-%s') + do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ + '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True ) +} + +PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" + +FILES_${PN}-tools = "${bindir}/wispr" +RDEPENDS_${PN}-tools ="${PN}" + +FILES_${PN}-tests = "${bindir}/*-test" + +FILES_${PN}-client = "${bindir}/connmanctl" +RDEPENDS_${PN}-client ="${PN}" + +FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ + ${libdir}/connman/plugins \ + ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ + ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ + ${datadir}/dbus-1/system-services/* \ + ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" + +FILES_${PN}-dev += "${libdir}/connman/*/*.la" + +PACKAGES =+ "${PN}-vpn ${PN}-wait-online" + +SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices" +DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \ +managing VPN connections within embedded devices running the Linux \ +operating system. The connman-vpnd handles all the VPN connections \ +and starts/stops VPN client processes when necessary. The connman-vpnd \ +provides a DBus API for managing VPN connections. All the different \ +VPN technogies are implemented using plug-ins." +FILES_${PN}-vpn += "${sbindir}/connman-vpnd \ + ${sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf \ + ${datadir}/dbus-1/system-services/net.connman.vpn.service \ + ${systemd_unitdir}/system/connman-vpn.service" + +SUMMARY_${PN}-wait-online = "A program that will return once ConnMan has connected to a network" +DESCRIPTION_${PN}-wait-online = "A service that can be enabled so that \ +the system waits until a network connection is established." +FILES_${PN}-wait-online += "${sbindir}/connmand-wait-online \ + ${systemd_unitdir}/system/connman-wait-online.service" + +SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN" +DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \ +to create a VPN connection to OpenVPN server." +FILES_${PN}-plugin-vpn-openvpn += "${libdir}/connman/scripts/openvpn-script \ + ${libdir}/connman/plugins-vpn/openvpn.so" +RDEPENDS_${PN}-plugin-vpn-openvpn += "${PN}-vpn" +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','openvpn','${PN}-plugin-vpn-openvpn', '', d)}" + +SUMMARY_${PN}-plugin-vpn-vpnc = "A vpnc plugin for ConnMan VPN" +DESCRIPTION_${PN}-plugin-vpn-vpnc = "The ConnMan vpnc plugin uses vpnc client \ +to create a VPN connection to Cisco3000 VPN Concentrator." +FILES_${PN}-plugin-vpn-vpnc += "${libdir}/connman/scripts/openconnect-script \ + ${libdir}/connman/plugins-vpn/vpnc.so" +RDEPENDS_${PN}-plugin-vpn-vpnc += "${PN}-vpn" +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','vpnc','${PN}-plugin-vpn-vpnc', '', d)}" + +SUMMARY_${PN}-plugin-vpn-l2tp = "A L2TP plugin for ConnMan VPN" +DESCRIPTION_${PN}-plugin-vpn-l2tp = "The ConnMan L2TP plugin uses xl2tpd daemon \ +to create a VPN connection to L2TP server." +FILES_${PN}-plugin-vpn-l2tp += "${libdir}/connman/scripts/libppp-plugin.so* \ + ${libdir}/connman/plugins-vpn/l2tp.so" +RDEPENDS_${PN}-plugin-vpn-l2tp += "${PN}-vpn" +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','l2tp','${PN}-plugin-vpn-l2tp', '', d)}" + +SUMMARY_${PN}-plugin-vpn-pptp = "A PPTP plugin for ConnMan VPN" +DESCRIPTION_${PN}-plugin-vpn-pptp = "The ConnMan PPTP plugin uses pptp-linux client \ +to create a VPN connection to PPTP server." +FILES_${PN}-plugin-vpn-pptp += "${libdir}/connman/scripts/libppp-plugin.so* \ + ${libdir}/connman/plugins-vpn/pptp.so" +RDEPENDS_${PN}-plugin-vpn-pptp += "${PN}-vpn" +RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','pptp','${PN}-plugin-vpn-pptp', '', d)}" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch new file mode 100644 index 00000000..f344fea1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-Fix-various-issues-which-cause-problems-under-musl.patch @@ -0,0 +1,362 @@ +From 181ff3439783c6920f5211730672685a210c318f Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Mon, 8 Oct 2018 22:12:56 +0200 +Subject: [PATCH] Fix various issues which cause problems under musl + +Instead of using #define _GNU_SOURCE in some source files which causes +problems when building with musl as more files need the define, simply +use AC_USE_SYSTEM_EXTENSIONS in configure.ac to get it defined globally. + +Signed-off-by: Ross Burton +Upstream-Status: Backport [bd1326ba7d68df38c5ccaafd2403a5fb30bd452b] +--- + configure.ac | 3 +++ + gdhcp/client.c | 1 - + gdhcp/common.h | 5 +++-- + gweb/gresolv.c | 1 + + plugins/tist.c | 1 - + plugins/wifi.c | 3 +-- + src/backtrace.c | 1 - + src/inet.c | 1 - + src/ippool.c | 1 - + src/iptables.c | 2 +- + src/log.c | 1 - + src/ntp.c | 1 - + src/resolver.c | 1 - + src/rfkill.c | 1 - + src/stats.c | 1 - + src/tethering.c | 2 -- + src/timezone.c | 1 - + tools/dhcp-test.c | 1 - + tools/dnsproxy-test.c | 1 + + tools/private-network-test.c | 2 +- + tools/stats-tool.c | 1 - + tools/tap-test.c | 3 +-- + tools/wispr.c | 1 - + vpn/plugins/vpn.c | 1 - + 24 files changed, 12 insertions(+), 25 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 39745f76..984126c2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,6 +20,7 @@ AC_SUBST(abs_top_srcdir) + AC_SUBST(abs_top_builddir) + + AC_LANG_C ++AC_USE_SYSTEM_EXTENSIONS + + AC_PROG_CC + AM_PROG_CC_C_O +@@ -185,6 +186,8 @@ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [ + AC_CHECK_HEADERS([execinfo.h]) + AM_CONDITIONAL([BACKTRACE], [test "${ac_cv_header_execinfo_h}" = "yes"]) + ++AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include ]]) ++ + AC_CHECK_FUNC(signalfd, dummy=yes, + AC_MSG_ERROR(signalfd support is required)) + +diff --git a/gdhcp/client.c b/gdhcp/client.c +index 67357782..c7db76f0 100644 +--- a/gdhcp/client.c ++++ b/gdhcp/client.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/gdhcp/common.h b/gdhcp/common.h +index 75abc183..6899499e 100644 +--- a/gdhcp/common.h ++++ b/gdhcp/common.h +@@ -19,6 +19,7 @@ + * + */ + ++#include + #include + #include + +@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths[] = { + [OPTION_U32] = 4, + }; + +-/* already defined within netinet/in.h if using GNU compiler */ +-#ifndef __USE_GNU ++/* already defined within netinet/in.h if using glibc or musl */ ++#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR + struct in6_pktinfo { + struct in6_addr ipi6_addr; /* src/dst IPv6 address */ + unsigned int ipi6_ifindex; /* send/recv interface index */ +diff --git a/gweb/gresolv.c b/gweb/gresolv.c +index 81c79b6c..b06f8932 100644 +--- a/gweb/gresolv.c ++++ b/gweb/gresolv.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/plugins/tist.c b/plugins/tist.c +index ad5ef79e..cc2800a1 100644 +--- a/plugins/tist.c ++++ b/plugins/tist.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/plugins/wifi.c b/plugins/wifi.c +index dc08c6af..46e4cca4 100644 +--- a/plugins/wifi.c ++++ b/plugins/wifi.c +@@ -30,9 +30,8 @@ + #include + #include + #include +-#include +-#include + #include ++#include + + #ifndef IFF_LOWER_UP + #define IFF_LOWER_UP 0x10000 +diff --git a/src/backtrace.c b/src/backtrace.c +index e8d7f432..bede6698 100644 +--- a/src/backtrace.c ++++ b/src/backtrace.c +@@ -24,7 +24,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/inet.c b/src/inet.c +index a31372b5..a58ce7c1 100644 +--- a/src/inet.c ++++ b/src/inet.c +@@ -25,7 +25,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/ippool.c b/src/ippool.c +index cea1dccd..8a645da2 100644 +--- a/src/ippool.c ++++ b/src/ippool.c +@@ -28,7 +28,6 @@ + #include + #include + #include +-#include + #include + + #include "connman.h" +diff --git a/src/iptables.c b/src/iptables.c +index f3670e77..469effed 100644 +--- a/src/iptables.c ++++ b/src/iptables.c +@@ -28,7 +28,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/src/log.c b/src/log.c +index 9bae4a3d..f7e82e5d 100644 +--- a/src/log.c ++++ b/src/log.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/ntp.c b/src/ntp.c +index 51ba9aac..724ca188 100644 +--- a/src/ntp.c ++++ b/src/ntp.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/resolver.c b/src/resolver.c +index 76f0a8e1..10121aa5 100644 +--- a/src/resolver.c ++++ b/src/resolver.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/rfkill.c b/src/rfkill.c +index d9bed4d2..b2514c41 100644 +--- a/src/rfkill.c ++++ b/src/rfkill.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/stats.c b/src/stats.c +index 663bc382..c9ddc2e8 100644 +--- a/src/stats.c ++++ b/src/stats.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/tethering.c b/src/tethering.c +index 4b202369..f3cb36f4 100644 +--- a/src/tethering.c ++++ b/src/tethering.c +@@ -34,8 +34,6 @@ + #include + #include + #include +-#include +-#include + #include + + #include "connman.h" +diff --git a/src/timezone.c b/src/timezone.c +index e346b11a..8e912670 100644 +--- a/src/timezone.c ++++ b/src/timezone.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c +index c34e10a8..eae66fc2 100644 +--- a/tools/dhcp-test.c ++++ b/tools/dhcp-test.c +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + + #include + +diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c +index 551cae91..371e2e23 100644 +--- a/tools/dnsproxy-test.c ++++ b/tools/dnsproxy-test.c +@@ -24,6 +24,7 @@ + #endif + + #include ++#include + #include + #include + #include +diff --git a/tools/private-network-test.c b/tools/private-network-test.c +index 3dd115ba..2828bb30 100644 +--- a/tools/private-network-test.c ++++ b/tools/private-network-test.c +@@ -32,7 +32,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/tools/stats-tool.c b/tools/stats-tool.c +index efa39de2..5695048f 100644 +--- a/tools/stats-tool.c ++++ b/tools/stats-tool.c +@@ -22,7 +22,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/tools/tap-test.c b/tools/tap-test.c +index fdc098aa..cb3ee622 100644 +--- a/tools/tap-test.c ++++ b/tools/tap-test.c +@@ -23,13 +23,12 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include + #include + #include +-#include ++#include + #include + + #include +diff --git a/tools/wispr.c b/tools/wispr.c +index d5f9341f..e56dfc16 100644 +--- a/tools/wispr.c ++++ b/tools/wispr.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c +index 10548aaf..6e3f640c 100644 +--- a/vpn/plugins/vpn.c ++++ b/vpn/plugins/vpn.c +@@ -23,7 +23,6 @@ + #include + #endif + +-#define _GNU_SOURCE + #include + #include + #include +-- +2.17.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch new file mode 100644 index 00000000..8e2e0bd0 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch @@ -0,0 +1,29 @@ +From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001 +From: "Maxin B. John" +Date: Mon, 12 Jun 2017 16:52:39 +0300 +Subject: [PATCH] connman.service: stop systemd-resolved when we use connman + +Stop systemd-resolved service when we use connman as network manager. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Maxin B. John +--- + src/connman.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/connman.service.in b/src/connman.service.in +index 9f5c10f..dab48bc 100644 +--- a/src/connman.service.in ++++ b/src/connman.service.in +@@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman + After=dbus.service network-pre.target systemd-sysusers.service + Before=network.target multi-user.target shutdown.target + Wants=network.target ++Conflicts=systemd-resolved.service + + [Service] + Type=dbus +-- +2.4.0 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch new file mode 100644 index 00000000..e6f03e63 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch @@ -0,0 +1,35 @@ +From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 7 Apr 2012 18:52:12 -0700 +Subject: [PATCH] plugin.h: Change visibility to default for debug symbols + +gold refuses to link in undefined weak symbols which +have hidden visibility + +Signed-off-by: Khem Raj + + +Upstream-Status: Pending +--- + include/plugin.h | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/plugin.h b/include/plugin.h +index 692a4e5..a9361c3 100644 +--- a/include/plugin.h ++++ b/include/plugin.h +@@ -89,9 +89,9 @@ struct connman_plugin_desc { + #else + #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \ + extern struct connman_debug_desc __start___debug[] \ +- __attribute__ ((weak, visibility("hidden"))); \ ++ __attribute__ ((weak, visibility("default"))); \ + extern struct connman_debug_desc __stop___debug[] \ +- __attribute__ ((weak, visibility("hidden"))); \ ++ __attribute__ ((weak, visibility("default"))); \ + extern struct connman_plugin_desc connman_plugin_desc \ + __attribute__ ((visibility("default"))); \ + struct connman_plugin_desc connman_plugin_desc = { \ +-- +1.7.5.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch new file mode 100644 index 00000000..639ccfa2 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch @@ -0,0 +1,85 @@ +From 10b0d16d04b811b1ccd1f9b0cfe757bce8d876a1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 6 Apr 2015 23:02:21 -0700 +Subject: [PATCH 2/3] resolve: musl does not implement res_ninit + +ported from +http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + gweb/gresolv.c | 33 ++++++++++++--------------------- + 1 file changed, 12 insertions(+), 21 deletions(-) + +diff --git a/gweb/gresolv.c b/gweb/gresolv.c +index 5cf7a9a..3ad8e70 100644 +--- a/gweb/gresolv.c ++++ b/gweb/gresolv.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include "gresolv.h" + +@@ -875,8 +875,6 @@ GResolv *g_resolv_new(int index) + resolv->index = index; + resolv->nameserver_list = NULL; + +- res_ninit(&resolv->res); +- + return resolv; + } + +@@ -916,8 +914,6 @@ void g_resolv_unref(GResolv *resolv) + + flush_nameservers(resolv); + +- res_nclose(&resolv->res); +- + g_free(resolv); + } + +@@ -1020,24 +1016,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, + debug(resolv, "hostname %s", hostname); + + if (!resolv->nameserver_list) { +- int i; +- +- for (i = 0; i < resolv->res.nscount; i++) { +- char buf[100]; +- int family = resolv->res.nsaddr_list[i].sin_family; +- void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr; +- +- if (family != AF_INET && +- resolv->res._u._ext.nsaddrs[i]) { +- family = AF_INET6; +- sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr; ++ FILE *f = fopen("/etc/resolv.conf", "r"); ++ if (f) { ++ char line[256], *s; ++ int i; ++ while (fgets(line, sizeof(line), f)) { ++ if (strncmp(line, "nameserver", 10) || !isspace(line[10])) ++ continue; ++ for (s = &line[11]; isspace(s[0]); s++); ++ for (i = 0; s[i] && !isspace(s[i]); i++); ++ s[i] = 0; ++ g_resolv_add_nameserver(resolv, s, 53, 0); + } +- +- if (family != AF_INET && family != AF_INET6) +- continue; +- +- if (inet_ntop(family, sa_addr, buf, sizeof(buf))) +- g_resolv_add_nameserver(resolv, buf, 53, 0); ++ fclose(f); + } + + if (!resolv->nameserver_list) +-- +2.5.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/connman b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/connman new file mode 100644 index 00000000..c64fa0d7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/connman @@ -0,0 +1,83 @@ +#!/bin/sh + +DAEMON=/usr/sbin/connmand +PIDFILE=/var/run/connmand.pid +DESC="Connection Manager" + +if [ -f /etc/default/connman ] ; then + . /etc/default/connman +fi + +set -e + +nfsroot=0 + +exec 9<&0 < /proc/mounts +while read dev mtpt fstype rest; do + if test $mtpt = "/" ; then + case $fstype in + nfs | nfs4) + nfsroot=1 + break + ;; + *) + ;; + esac + fi +done + +do_start() { + EXTRA_PARAM="" + if test $nfsroot -eq 1 ; then + NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` + NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` + + if [ ! -z "$NET_ADDR" ]; then + if [ "$NET_ADDR" = dhcp ]; then + ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` + if [ ! -z "$ethn" ]; then + EXTRA_PARAM="-I $ethn" + fi + else + for i in $NET_DEVS; do + ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` + if [ "$NET_ADDR" = "$ADDR" ]; then + EXTRA_PARAM="-I $i" + break + fi + done + fi + fi + fi + if [ -f @DATADIR@/connman/wired-setup ] ; then + . @DATADIR@/connman/wired-setup + fi + $DAEMON $EXTRA_PARAM +} + +do_stop() { + start-stop-daemon --stop --name connmand --quiet +} + +case "$1" in + start) + echo "Starting $DESC" + do_start + ;; + stop) + echo "Stopping $DESC" + do_stop + ;; + restart|force-reload) + echo "Restarting $DESC" + do_stop + sleep 1 + do_start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch new file mode 100644 index 00000000..e96e38bc --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman/no-version-scripts.patch @@ -0,0 +1,27 @@ +With binutils 2.27 on at least MIPS, connmand will crash on startup. This +appears to be due to the symbol visibilty scripts hiding symbols that stdio +looks up at runtime, resulting in it segfaulting. + +This certainly appears to be a bug in binutils 2.27 although the problem has +been known about for some time: + +https://sourceware.org/bugzilla/show_bug.cgi?id=17908 + +As the version scripts are only used to hide symbols from plugins we can safely +remove the scripts to work around the problem until binutils is fixed. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/Makefile.am b/Makefile.am +index d70725c..76ae432 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -132,2 +132 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \ +-src_connmand_LDFLAGS = -Wl,--export-dynamic \ +- -Wl,--version-script=$(srcdir)/src/connman.ver ++src_connmand_LDFLAGS = -Wl,--export-dynamic +@@ -166,2 +165 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \ +-vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \ +- -Wl,--version-script=$(srcdir)/vpn/vpn.ver ++vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_%.bbappend new file mode 100644 index 00000000..8057fbbc --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_%.bbappend @@ -0,0 +1,17 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://0001-disable-when-booting-over-nfs.patch \ + file://main.conf \ +" + +FILES_${PN} += "${sysconfdir}/connman/main.conf" + +do_install_append() { + install -d ${D}${sysconfdir}/connman + install -m 0644 ${WORKDIR}/main.conf ${D}${sysconfdir}/connman + + # Need to ignore eth1 in cluster demo setup + if ${@bb.utils.contains('DISTRO_FEATURES', 'agl-cluster-demo-support', 'true', 'false', d)}; then + sed -i 's/^\(NetworkInterfaceBlacklist=.*\)/\1,eth1/' ${D}${sysconfdir}/connman/main.conf + fi +} diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_1.36.bb b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_1.36.bb new file mode 100644 index 00000000..6e4dbdfd --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/connman_1.36.bb @@ -0,0 +1,16 @@ +require connman.inc + +SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ + file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ + file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ + file://connman \ + file://no-version-scripts.patch \ + file://0001-Fix-various-issues-which-cause-problems-under-musl.patch \ +" + +SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" + +SRC_URI[md5sum] = "dae77d9c904d2c223ae849e32079d57e" +SRC_URI[sha256sum] = "c789db41cc443fa41e661217ea321492ad59a004bebcd1aa013f3bc10a6e0074" + +RRECOMMENDS_${PN} = "connman-conf" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch new file mode 100644 index 00000000..f129a658 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch @@ -0,0 +1,10 @@ +--- connman-1.36.orig/src/connman.service.in 2019-02-18 18:02:07.034947373 -0500 ++++ connman-1.36/src/connman.service.in 2019-02-18 18:07:24.689959219 -0500 +@@ -7,6 +7,7 @@ + Before=network.target multi-user.target shutdown.target + Wants=network.target + Conflicts=systemd-resolved.service ++ConditionKernelCommandLine=!root=/dev/nfs + + [Service] + Type=dbus diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/main.conf b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/main.conf new file mode 100644 index 00000000..4dba25b7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/connman/files/main.conf @@ -0,0 +1,3 @@ +[General] +FallbackTimeservers=pool.ntp.org +NetworkInterfaceBlacklist=vmnet,vboxnet,virbr,ifb,meth diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/libnfc/libnfc_git.bb b/meta-agl/meta-agl-profile-core/recipes-connectivity/libnfc/libnfc_git.bb new file mode 100644 index 00000000..bd216f81 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/libnfc/libnfc_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "libnfc" +DESCRIPTION = "Platform independent Near Field Communication (NFC) library" +HOMEPAGE = "https://github.com/nfc-tools/libnfc" +SECTION = "apps" + +DEPENDS = "libusb" + +LICENSE = "LGPLv3" +LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=b52f2d57d10c4f7ee67a7eb9615d5d24" + +inherit cmake pkgconfig + +SRC_URI = "git://github.com/nfc-tools/libnfc;protocol=https;branch=master" +SRCREV = "2d4543673e9b76c02679ca8b89259659f1afd932" + +PV = "1.7.1+git${SRCPV}" +S = "${WORKDIR}/git" + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch new file mode 100644 index 00000000..c3295169 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0001-systemd-neard-add-multi-user.target-to-neard.service.patch @@ -0,0 +1,25 @@ +From d8c03a31e2734e59af43dd50cbd7f5a94d798ab1 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Tue, 10 Jul 2018 21:18:26 -0700 +Subject: [PATCH] systemd: neard: add multi-user.target to neard.service + +Allowing a service to be system level requires a WantedBy= target + +Signed-off-by: Matt Ranostay +--- + src/neard.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/neard.service.in b/src/neard.service.in +index dfa238c..540da7e 100644 +--- a/src/neard.service.in ++++ b/src/neard.service.in +@@ -9,4 +9,5 @@ ExecStart=@pkglibexecdir@/neard -n + LimitNPROC=1 + + [Install] ++WantedBy=multi-user.target + Alias=dbus-org.neard.service +-- +2.17.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch new file mode 100644 index 00000000..49c11a50 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/files/0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch @@ -0,0 +1,33 @@ +From d7ea2a00e00795ad24897e3481b015a27d37d60f Mon Sep 17 00:00:00 2001 +From: Raquel Medina +Date: Tue, 22 Jan 2019 09:00:05 -0500 +Subject: [PATCH] ndef: avoid dbus property_get_type method on empty record + +Signed-off-by: Raquel Medina +--- + src/ndef.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/ndef.c b/src/ndef.c +index 5656baf..883c6f4 100644 +--- a/src/ndef.c ++++ b/src/ndef.c +@@ -2832,10 +2832,14 @@ GList *near_ndef_parse_msg(uint8_t *ndef_data, size_t ndef_length, + case RECORD_TYPE_WKT_ALTERNATIVE_CARRIER: + case RECORD_TYPE_WKT_COLLISION_RESOLUTION: + case RECORD_TYPE_WKT_ERROR: +- case RECORD_TYPE_UNKNOWN: + case RECORD_TYPE_ERROR: + break; + ++ case RECORD_TYPE_UNKNOWN: ++ if (record->header->tnf == RECORD_TNF_EMPTY) ++ goto fail; ++ break; ++ + case RECORD_TYPE_WKT_HANDOVER_REQUEST: + case RECORD_TYPE_WKT_HANDOVER_SELECT: + /* +-- +2.17.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/neard_0.16.bbappend b/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/neard_0.16.bbappend new file mode 100644 index 00000000..64a044cb --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neard/neard_0.16.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = "\ + file://0001-systemd-neard-add-multi-user.target-to-neard.service.patch \ + file://0002-ndef-avoid-dbus-property_get_type-method-on-empty-re.patch \ + " +SYSTEMD_SERVICE_${PN} = "neard.service" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal.inc b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal.inc new file mode 100644 index 00000000..3bb6b24e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal.inc @@ -0,0 +1,22 @@ +SUMMARY = "Neard Abstraction Library (NeardAL)" + +DESCRIPTION = "NeardAL is a library that provides a simple C API \ +to exchange data with NFC daemon (Neard)." + +HOMEPAGE = "https://github.com/connectivity/neardal" +SECTION = "libs" +LICENSE = "LGPLv2" + +DEPENDS = "glib-2.0 readline glib-2.0-native" + +LIC_FILES_CHKSUM = "file://COPYING;md5=6a6e689d19255cf0557f3fe7d7068212 \ + file://lib/neardal.h;endline=20;md5=a53e93aea9357387078ed217565c0a99" + +inherit autotools pkgconfig + +PACKAGES =+ "${PN}-tools ${PN}-tools-dbg" + +FILES_${PN}-tools = "${libexecdir}/ncl" +FILES_${PN}-tools-dbg += "${libexecdir}/.debug" + +RDEPENDS_${PN}-tools = "bash" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch new file mode 100644 index 00000000..596fe057 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch @@ -0,0 +1,27 @@ +From 795308b2452ee617da4096914b53ba3a1142e3db Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Fri, 6 Jul 2018 17:19:09 -0700 +Subject: [PATCH] neardal: ncl: fix segfault on help page being displayed + +LISTCMD_NAME is declared as a const char due to being defined in a +macro so g_strdup it to stop proceeding operations from segfaulting. + +Signed-off-by: Matt Ranostay + +--- + ncl/ncl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ncl/ncl.c b/ncl/ncl.c +index 590d13b..f4165b7 100644 +--- a/ncl/ncl.c ++++ b/ncl/ncl.c +@@ -329,7 +329,7 @@ int main(int argc, char *argv[]) + g_io_channel_unref(gNclCtx.channel); + + if (show_help) +- ncl_exec(LISTCMD_NAME); ++ ncl_exec(g_strdup(LISTCMD_NAME)); + + rl_callback_handler_install(NCL_PROMPT, ncl_parse_line); + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch new file mode 100644 index 00000000..d40d9a4f --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0002-neardal-lib-fix-memory-corruption.patch @@ -0,0 +1,58 @@ +From ee6267f357b3d158f0a0e88460782e8b9d44274a Mon Sep 17 00:00:00 2001 +From: Raquel Medina +Date: Fri, 4 Jan 2019 07:43:03 -0500 +Subject: [PATCH] neardal: lib: fix memory corruption + + The current commit fixes an invalid memory access + which manifests as a random segfault when executing + continuous tag read operations. + + The corruption happens when releasing the memory allocated to a + record: in the time between the memory being g_free'd and the + subsequent memset operation, the memory could have been reused by + some other process. And since memory allocation depends on + system-wide factors, it makes this bug hard to track. + + Tested using ACR122U reader and NTAG213 + tags on Automotive Grade Linux (flounder, + guppy and master branches) + +Signed-off-by: Raquel Medina +--- + lib/neardal_record.c | 1 - + lib/neardal_tools.c | 5 ++++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/neardal_record.c b/lib/neardal_record.c +index 669012c..cfed5e8 100644 +--- a/lib/neardal_record.c ++++ b/lib/neardal_record.c +@@ -31,7 +31,6 @@ void neardal_record_free(neardal_record *r) + { + g_return_if_fail(r); + neardal_g_strfreev((void **) r, &r->uriObjSize); +- memset(r, 0, sizeof(*r)); + } + + void neardal_free_record(neardal_record *record) \ +diff --git a/lib/neardal_tools.c b/lib/neardal_tools.c +index f0d6157..f307df6 100644 +--- a/lib/neardal_tools.c ++++ b/lib/neardal_tools.c +@@ -32,9 +32,12 @@ + void neardal_g_strfreev(void **array, void *end) + { + void **p = array; +- for (; (void *) p < end; p++) ++ for (; (void *) p < end; p++) { + g_free(*p); ++ *p = NULL; ++ } + g_free(array); ++ array = NULL; + } + + void neardal_g_variant_add_parsed(GVariant **v, const char *format, ...) +-- +2.17.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/ncl.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/ncl.patch new file mode 100644 index 00000000..baef6cca --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal/ncl.patch @@ -0,0 +1,25 @@ +From eab402bae42c3ea5caa8d540b6702d39e56c84c1 Mon Sep 17 00:00:00 2001 +From: Oleg Zhurakivskyy +Date: Tue, 10 Feb 2015 12:58:39 +0200 +Subject: [PATCH] build: Install ncl + +Signed-off-by: Oleg Zhurakivskyy +--- + ncl/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ncl/Makefile.am b/ncl/Makefile.am +index beda75b..c06742f 100644 +--- a/ncl/Makefile.am ++++ b/ncl/Makefile.am +@@ -1,6 +1,6 @@ + AM_CPPFLAGS = @gio_CFLAGS@ -I$(top_builddir)/lib -I$(top_srcdir)/lib + +-noinst_PROGRAMS=ncl ++libexec_PROGRAMS = ncl + + ncl_SOURCES = \ + $(srcdir)/ncl.c $(srcdir)/ncl.h \ +-- +2.1.0 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal_0.14.bb b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal_0.14.bb new file mode 100644 index 00000000..8bec79e6 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/neardal/neardal_0.14.bb @@ -0,0 +1,9 @@ +require neardal.inc + +SRC_URI = "https://github.com/connectivity/neardal/archive/${PV}.tar.gz \ + file://ncl.patch \ + file://0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch \ + file://0002-neardal-lib-fix-memory-corruption.patch \ + " +SRC_URI[md5sum] = "3dbda58253ca30ee6a7a7573eaa68f40" +SRC_URI[sha256sum] = "157d320bd831d91a82203d9697d2d2a2cebdb515d6e1c4ce04fe8ef27d1da615" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch new file mode 100644 index 00000000..7b44e483 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch @@ -0,0 +1,27 @@ +From 7782f8f9d9634ebeddafefedab10ba254f9cc34a Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Fri, 1 Mar 2019 17:53:17 +0900 +Subject: [PATCH] provision: allow duplicate entries from mbpi_lookup_apn() + results + +Signed-off-by: Matt Ranostay +--- + plugins/provision.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/provision.c b/plugins/provision.c +index 99c299eb..aa0b05e4 100644 +--- a/plugins/provision.c ++++ b/plugins/provision.c +@@ -50,7 +50,7 @@ static int provision_get_settings(const char *mcc, const char *mnc, + + DBG("Provisioning for MCC %s, MNC %s, SPN '%s'", mcc, mnc, spn); + +- apns = mbpi_lookup_apn(mcc, mnc, FALSE, &error); ++ apns = mbpi_lookup_apn(mcc, mnc, TRUE, &error); + if (apns == NULL) { + if (error != NULL) { + ofono_error("%s", error->message); +-- +2.20.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/ofono.conf b/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/ofono.conf new file mode 100644 index 00000000..e47214c7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/files/ofono.conf @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/ofono_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/ofono_%.bbappend new file mode 100644 index 00000000..b02d6ee2 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/ofono/ofono_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append = "\ + file://ofono.conf \ + file://0001-provision-allow-duplicate-entries-from-mbpi_lookup_a.patch \ + " + +do_install_append() { + install -m 0644 ${WORKDIR}/ofono.conf ${D}${sysconfdir}/dbus-1/system.d/ofono.conf +} + +SYSTEMD_AUTO_ENABLE = "enable" diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch b/meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch new file mode 100644 index 00000000..86b7392d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr/0001-remove-I-usr-include-in-pkg-config.patch @@ -0,0 +1,40 @@ +From 3aeaf8054fcb2617ca8f6196ca32be3e69337f77 Mon Sep 17 00:00:00 2001 +From: Martin Kelly +Date: Fri, 21 Apr 2017 10:29:19 -0700 +Subject: [PATCH] remove -I/usr/include in pkg-config + +This shouldn't be necessary as it's part of the default compiler include +paths anyway. Morever, it can cause GCC 6 C++ build failures in +downstream packages when combined with QMake (such as +qtmultimedia-rtlfm-radio-plugin). + +Fix these issues by removing it. + +Upstream-Status: Inappropriate [disable-feature] + +This patch should not go upstream because it breaks the ability to build +with --prefix. That's not a problem for Openembedded, but it is for +upstream more generally. See this mail thread for more information: + +http://lists.osmocom.org/pipermail/osmocom-sdr/2017-April/001580.html + +Signed-off-by: Martin Kelly +--- + librtlsdr.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/librtlsdr.pc.in b/librtlsdr.pc.in +index 5e55049..84b6d0c 100644 +--- a/librtlsdr.pc.in ++++ b/librtlsdr.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: RTL-SDR Library + Description: C Utility Library + Version: @VERSION@ +-Cflags: -I${includedir}/ @RTLSDR_PC_CFLAGS@ ++Cflags: @RTLSDR_PC_CFLAGS@ + Libs: -L${libdir} -lrtlsdr -lusb-1.0 + Libs.private: @RTLSDR_PC_LIBS@ +-- +2.1.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb b/meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb new file mode 100644 index 00000000..de6da5e8 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-connectivity/rtl-sdr/rtl-sdr_0.5.3.bb @@ -0,0 +1,32 @@ +SUMMARY = "Turns a Realtek RTL2832U-based DVB dongle into a SDR receiver" +DESCRIPTION = "DVB-T dongles based on the Realtek RTL2832U chipset can be used as Software Digital Radio adapters, since the chip allows transferring raw I/Q samples to the host, which is really used for DAB/DAB+/FM demodulation." +HOMEPAGE = "http://sdr.osmocom.org/trac/wiki/rtl-sdr" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://src/librtlsdr.c;endline=18;md5=1b05599c3ebd4d74857a0a7c45f3d4ef" + +DEPENDS = "libusb1" + +SRC_URI = "git://git.osmocom.org/rtl-sdr \ + file://0001-remove-I-usr-include-in-pkg-config.patch \ + " +SRCREV = "e3c03f738f5aef4dc51e2b741fbdb542b9cc1bb1" +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-driver-detach" + +do_configure_append() { + # remove included temporary path from pc file due to pass-through of OE CFLAGS + # debug-prefix-map + # See: http://lists.openembedded.org/pipermail/openembedded-devel/2016-May/107456.html + sed -i -e "s# -fdebug-prefix-map=.*##g" librtlsdr.pc +} + +do_install_append() { + install -D -m 0644 ${S}/rtl-sdr.rules ${D}${sysconfdir}/udev/rules.d/55-rtl-sdr.rules + sed -i 's/MODE:="0666"/GROUP="audio", MODE="0660", SECLABEL{smack}="*"/' \ + ${D}${sysconfdir}/udev/rules.d/55-rtl-sdr.rules +} diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/.appends.core b/meta-agl/meta-agl-profile-core/recipes-core/dbus/.appends.core new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.service b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.service new file mode 100644 index 00000000..dee6ad74 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.service @@ -0,0 +1,10 @@ +[Unit] +Description=D-Bus User Message Bus +Documentation=man:dbus-daemon(1) +Requires=dbus.socket + +[Service] +ExecStart=/usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation +ExecReload=/usr/bin/dbus-send --print-reply --session --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig +Restart=always +RestartSec=1 diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.socket b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.socket new file mode 100644 index 00000000..af76b2f1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus.socket @@ -0,0 +1,9 @@ +[Unit] +Description=D-Bus User Message Bus Socket +Before=sockets.target + +[Socket] +ListenStream=%t/bus + +[Install] +WantedBy=default.target diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus_env.conf b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus_env.conf new file mode 100644 index 00000000..f8f02669 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/dbus_env.conf @@ -0,0 +1,5 @@ +[Unit] +Wants=dbus.service + +[Service] +Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/bus diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/libdbus-c++/dbus-c++-threading.patch b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/libdbus-c++/dbus-c++-threading.patch new file mode 100644 index 00000000..c4fafef6 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus/libdbus-c++/dbus-c++-threading.patch @@ -0,0 +1,45 @@ +--- libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h.threading 2017-02-15 13:40:53.796004263 +0000 ++++ libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h 2017-02-15 13:40:46.907000493 +0000 +@@ -188,6 +188,7 @@ + /* classes for multithreading support + */ + ++#if 0 + class DXXAPI Mutex + { + public: +@@ -243,9 +244,11 @@ + typedef bool (*CondVarWaitTimeoutFn)(CondVar *cv, Mutex *mx, int timeout); + typedef void (*CondVarWakeOneFn)(CondVar *cv); + typedef void (*CondVarWakeAllFn)(CondVar *cv); ++#endif + + void DXXAPI _init_threading(); + ++#if 0 + void DXXAPI _init_threading( + MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn, + CondVarNewFn, CondVarFreeFn, CondVarWaitFn, CondVarWaitTimeoutFn, CondVarWakeOneFn, CondVarWakeAllFn +@@ -312,6 +315,7 @@ + cv->wake_all(); + } + }; ++#endif + + } /* namespace DBus */ + +--- libdbus-c++-0.9.0/src/dispatcher.cpp.threading 2017-02-15 13:48:22.627249868 +0000 ++++ libdbus-c++-0.9.0/src/dispatcher.cpp 2017-02-15 13:48:29.164253445 +0000 +@@ -253,6 +253,7 @@ + #endif//DBUS_HAS_THREADS_INIT_DEFAULT + } + ++#if 0 + void DBus::_init_threading( + MutexNewFn m1, + MutexFreeFn m2, +@@ -318,3 +319,4 @@ + #endif//DBUS_HAS_RECURSIVE_MUTEX + dbus_threads_init(&functions); + } ++#endif diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus_%.bbappend new file mode 100644 index 00000000..379c5435 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/dbus/dbus_%.bbappend @@ -0,0 +1,28 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/dbus" + +SRC_URI += "file://dbus.service \ + file://dbus.socket \ + file://dbus_env.conf \ + " + +inherit systemd + +do_install_append() { + if [ "${PN}" != "nativesdk-dbus" ]; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -m 644 -p -D ${WORKDIR}/dbus.service ${D}${systemd_user_unitdir}/dbus.service + install -m 644 -p -D ${WORKDIR}/dbus.socket ${D}${systemd_user_unitdir}/dbus.socket + install -m 644 -p -D ${WORKDIR}/dbus_env.conf ${D}${systemd_system_unitdir}/user@.service.d/dbus_env.conf + + # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb) + # because it does not support systemd's user mode. + mkdir -p ${D}/etc/systemd/user/default.target.wants/ + ln -sf ${systemd_user_unitdir}/dbus.socket ${D}/etc/systemd/user/default.target.wants/dbus.socket + fi + fi +} + +FILES_${PN} += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/dbus.*', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_system_unitdir}/user@.service.d/dbus_env.conf', '', d)} \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++/dbus-c++-threading.patch b/meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++/dbus-c++-threading.patch new file mode 100644 index 00000000..c4fafef6 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++/dbus-c++-threading.patch @@ -0,0 +1,45 @@ +--- libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h.threading 2017-02-15 13:40:53.796004263 +0000 ++++ libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h 2017-02-15 13:40:46.907000493 +0000 +@@ -188,6 +188,7 @@ + /* classes for multithreading support + */ + ++#if 0 + class DXXAPI Mutex + { + public: +@@ -243,9 +244,11 @@ + typedef bool (*CondVarWaitTimeoutFn)(CondVar *cv, Mutex *mx, int timeout); + typedef void (*CondVarWakeOneFn)(CondVar *cv); + typedef void (*CondVarWakeAllFn)(CondVar *cv); ++#endif + + void DXXAPI _init_threading(); + ++#if 0 + void DXXAPI _init_threading( + MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn, + CondVarNewFn, CondVarFreeFn, CondVarWaitFn, CondVarWaitTimeoutFn, CondVarWakeOneFn, CondVarWakeAllFn +@@ -312,6 +315,7 @@ + cv->wake_all(); + } + }; ++#endif + + } /* namespace DBus */ + +--- libdbus-c++-0.9.0/src/dispatcher.cpp.threading 2017-02-15 13:48:22.627249868 +0000 ++++ libdbus-c++-0.9.0/src/dispatcher.cpp 2017-02-15 13:48:29.164253445 +0000 +@@ -253,6 +253,7 @@ + #endif//DBUS_HAS_THREADS_INIT_DEFAULT + } + ++#if 0 + void DBus::_init_threading( + MutexNewFn m1, + MutexFreeFn m2, +@@ -318,3 +319,4 @@ + #endif//DBUS_HAS_RECURSIVE_MUTEX + dbus_threads_init(&functions); + } ++#endif diff --git a/meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++_0.9.0.bbappend b/meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++_0.9.0.bbappend new file mode 100644 index 00000000..dac44b5e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/dbus/libdbus-c++_0.9.0.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append = "file://dbus-c++-threading.patch" diff --git a/meta-agl/meta-agl-profile-core/recipes-core/distro-build-manifest/distro-build-manifest.bb b/meta-agl/meta-agl-profile-core/recipes-core/distro-build-manifest/distro-build-manifest.bb new file mode 100644 index 00000000..823cc28a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/distro-build-manifest/distro-build-manifest.bb @@ -0,0 +1,164 @@ +SUMMARY = "Distribution build manifest" +DESCRIPTION = "The folder /etc/platform-info contains build manifest (SPEC-720)." +LICENSE = "MIT" + +# information distributed by the package is machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# dependencies of ${DISTRO_MANIFEST_GENERATOR} +DEPENDS = "coreutils-native bash-native git-native gawk-native sed-native jq-native" + +# force a rebuild everytime a build is started +do_compile[nostamp] = "1" + +# borrowed to os-release.bb (output format is very close) +python do_compilestep1 () { + import shutil + with open(d.expand('${B}/bbinfo-deploy'),'w') as f: + allkeys=[] + for field in d.getVar('BUILD_MANIFEST_FIELDS_DEPLOY').split(): + key='DIST_BB_{0}'.format(field) + allkeys.append(key) + value=d.getVar(field) + if value: + f.write('{0}="{1}"\n'.format(key,value)) + f.write('declare -A BITBAKE_VARS\nBITBAKE_VARS[deploy]="%s"' % ' '.join(allkeys)) + + with open(d.expand('${B}/bbinfo-target'),'w') as f: + allkeys=[] + for field in d.getVar('BUILD_MANIFEST_FIELDS_TARGET').split(): + key='DIST_BB_{0}'.format(field) + allkeys.append(key) + value=d.getVar(field) + if value: + f.write('{0}="{1}"\n'.format(key,value)) + f.write('declare -A BITBAKE_VARS\nBITBAKE_VARS[target]="%s"' % ' '.join(allkeys)) + + with open(d.expand('${B}/bbinfo-sdk'),'w') as f: + allkeys=[] + for field in d.getVar('BUILD_MANIFEST_FIELDS_SDK').split(): + key='DIST_BB_{0}'.format(field) + allkeys.append(key) + value=d.getVar(field) + if value: + f.write('{0}="{1}"\n'.format(key,value)) + f.write('declare -A BITBAKE_VARS\nBITBAKE_VARS[sdk]="%s"' % ' '.join(allkeys)) +} + +do_compilestep2 () { + rc=99 + timestamp=${DATETIME} + outfile=${B}/build-info + if [ -x "${DISTRO_MANIFEST_GENERATOR}" -a -f "${DISTRO_SETUP_MANIFEST}" ]; then + rc=0 + for format in bash json; do + if [ "$format" = "json" ]; then + ext=".json" + else + ext="" + fi + for mode in deploy target sdk; do + ${DISTRO_MANIFEST_GENERATOR} -m $mode -f $format -t $timestamp -s ${B}/bbinfo-${mode} ${DISTRO_SETUP_MANIFEST} >${outfile}-${mode}${ext} + rc=$? + if [ $rc -ne 0 ]; then + break + fi + done + done + else + if [ -z "${DISTRO_MANIFEST_GENERATOR}" ]; then + echo "The name of the generation script is not defined." + elif [ ! -f "${DISTRO_MANIFEST_GENERATOR}" ]; then + echo "Generation script ${DISTRO_MANIFEST_GENERATOR} is missing." + elif [ ! -x "${DISTRO_MANIFEST_GENERATOR}" ]; then + echo "Generation script ${DISTRO_MANIFEST_GENERATOR} isn't executable." + fi + if [ -z "${DISTRO_SETUP_MANIFEST}" ]; then + echo "The name of the data file is not defined." + elif [ ! -f "${DISTRO_SETUP_MANIFEST}" ]; then + echo "Data file ${DISTRO_SETUP_MANIFEST} is missing." + fi + echo "You can try to rerun aglsetup.sh to solve that issue." + echo "You can also try to source agl-init-build-env instead of oe-init-build-env." + fi + + if [ "$rc" -ne 0 ]; then + echo "distro-build-manifest generation failed." + fi + return $rc +} + +do_compilestep1[vardeps] += " ${BUILD_MANIFEST_FIELDS_DEPLOY}" +do_compilestep1[vardeps] += " ${BUILD_MANIFEST_FIELDS_TARGET}" +do_compilestep1[vardeps] += " ${BUILD_MANIFEST_FIELDS_SDK}" + +# avoid errors "ERROR: When reparsing .../distro-build-manifest/distro-build-manifest.bb.do_compile, the basehash value changed from .... to .... . The metadata is not deterministic and this needs to be fixed." +do_compilestep2[vardepsexclude] = "DATETIME" + +# combine the two steps +python do_compile() { + bb.build.exec_func("do_compilestep1",d) + bb.build.exec_func("do_compilestep2",d) +} + +do_install () { + # install in target dir + install -d ${D}${sysconfdir}/platform-info + install -m 0644 build-info-target ${D}${sysconfdir}/platform-info/build + install -m 0644 build-info-target.json ${D}${sysconfdir}/platform-info/build.json + + # also copy in deploy dir + install -d ${DEPLOY_DIR_IMAGE} + install -m 0644 build-info-deploy ${DEPLOY_DIR_IMAGE}/build-info + install -m 0644 build-info-deploy.json ${DEPLOY_DIR_IMAGE}/build-info.json + + # copy into sdk deploy dir + install -d ${DEPLOY_DIR}/sdk + install -m 0644 build-info-sdk ${DEPLOY_DIR}/sdk/${SDK_NAME}.build-info + install -m 0644 build-info-sdk.json ${DEPLOY_DIR}/sdk/${SDK_NAME}.build-info.json + + # and copy to nativesdk package + # TODO +} + +# list of variables to add to the various manifests +# smalles one is 'target', then 'deploy' and finally 'sdk' +BUILD_MANIFEST_FIELDS_TARGET = "\ + MACHINE_ARCH \ + MACHINEOVERRIDES \ + MACHINE_FEATURES \ + DISTRO_CODENAME \ + DISTRO_FEATURES \ + DISTRO_BRANCH_VERSION_TAG \ + AGLVERSION \ + AGL_BRANCH \ + AGLRELEASETYPE \ +" + +BUILD_MANIFEST_FIELDS_DEPLOY = "\ + ${BUILD_MANIFEST_FIELDS_TARGET} \ + DISTRO \ + DISTRO_VERSION \ + DISTROOVERRIDES \ + TUNE_FEATURES \ + TUNE_PKGARCH \ + ALL_MULTILIB_PACKAGE_ARCHS \ +" + +BUILD_MANIFEST_FIELDS_SDK = "\ + ${BUILD_MANIFEST_FIELDS_DEPLOY} \ + HOST_SYS \ + TARGET_SYS \ + TARGET_VENDOR \ + SDK_ARCH \ + SDK_VENDOR \ + SDK_VERSION \ + SDK_OS \ +" + +# dont exec useless tasks +do_fetch[noexec] = "1" +do_unpack[noexec] = "1" +do_patch[noexec] = "1" +do_configure[noexec] = "1" + diff --git a/meta-agl/meta-agl-profile-core/recipes-core/glibc/.appends.core b/meta-agl/meta-agl-profile-core/recipes-core/glibc/.appends.core new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc/arm/local-arm-futex.diff b/meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc/arm/local-arm-futex.diff new file mode 100644 index 00000000..27d1144d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc/arm/local-arm-futex.diff @@ -0,0 +1,22 @@ +Description: Lie about futex_atomic_cmpxchg_inatomic kernel support. + In past versions of glibc, we incorrectly assumed all ARM kernels + in all configurations supported futex_atomic_cmpxchg_inatomic. This + was clearly a lie, however it was a lie that we relied on, because + the fallback implementation appears to not play nicely with certain + applications like pulseaudio. Restore the lie for kernels > 2.6.32 + and plug our ears and scream "LA LA LA" about how wrong this is. +Author: Adam Conrad +Bug-Ubuntu: https://launchpad.net/bugs/1436162 +Bug-Debian: https://bugs.debian.org/788799 +Last-Update: 2015-03-25 + +--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h ++++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h +@@ -22,7 +22,7 @@ + /* The ARM kernel before 3.14.3 may or may not support + futex_atomic_cmpxchg_inatomic, depending on kernel + configuration. */ +-#if __LINUX_KERNEL_VERSION < 0x030E03 ++#if __LINUX_KERNEL_VERSION < 0x020620 + # undef __ASSUME_SET_ROBUST_LIST + #endif diff --git a/meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc_2.2%.bbappend b/meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc_2.2%.bbappend new file mode 100644 index 00000000..0868a2c7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/glibc/glibc_2.2%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_arm = " file://arm/local-arm-futex.diff " diff --git a/meta-agl/meta-agl-profile-core/recipes-core/psplash/.appends.core b/meta-agl/meta-agl-profile-core/recipes-core/psplash/.appends.core new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-anim b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-anim new file mode 100755 index 00000000..ac9bf674 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-anim @@ -0,0 +1,11 @@ +#/bin/bash + +psplash-default "$@" & +sleep .2 +while :; do + for x in 0 1 2 3 4 5 6 7 8 9 10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 10 9 8 7 6 5 4 3 2 1; do + psplash-write "PROGRESS ${x}0" || exit 0 + psplash-write "MSG $(journalctl -n1 -ocat)" || exit 0 + sleep .1 + done +done diff --git a/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-colors.h b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-colors.h new file mode 100644 index 00000000..44749039 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-colors.h @@ -0,0 +1,34 @@ +/* + * pslash - a lightweight framebuffer splashscreen for embedded devices. + * + * Copyright (c) 2012 sleep(5) ltd + * Author: Tomas Frydrych + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef _HAVE_PSPLASH_COLORS_H +#define _HAVE_PSPLASH_COLORS_H + +/* This is the overall background color */ +#define PSPLASH_BACKGROUND_COLOR 0xff,0xff,0xff + +/* This is the color of any text output */ +#define PSPLASH_TEXT_COLOR 0x00,0x00,0x00 + +/* This is the color of the progress bar indicator */ +#define PSPLASH_BAR_COLOR 0x00,0x00,0x00 + +/* This is the color of the progress bar background */ +#define PSPLASH_BAR_BACKGROUND_COLOR 0xff,0xff,0xff + +#endif diff --git a/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-poky-img.h b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-poky-img.h new file mode 100644 index 00000000..c0e8b081 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-poky-img.h @@ -0,0 +1,5411 @@ +/* GdkPixbuf RGB C-Source image dump 1-byte-run-length-encoded */ + +#define POKY_IMG_ROWSTRIDE (1800) +#define POKY_IMG_WIDTH (600) +#define POKY_IMG_HEIGHT (400) +#define POKY_IMG_BYTES_PER_PIXEL (3) /* 3:RGB, 4:RGBA */ +#define POKY_IMG_RLE_PIXEL_DATA ((uint8*) \ + "\377\377\377\377\377\377\377\377\203\377\377\377\1\376\376\376\221\377" \ + "\377\377\1\376\376\376\215\377\377\377\1\376\376\376\203\377\377\377" \ + "\1\376\376\376\233\377\377\377\1\376\376\376\203\377\377\377\1\376\376" \ + "\376\202\377\377\377\5\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\376\376\376\206\377\377\377\1\376\376\376\203\377\377\377\1\376\376" \ + "\376\204\377\377\377\1\376\376\376\203\377\377\377\5\376\376\376\377" \ + "\377\377\376\376\376\377\377\377\376\376\376\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\202\376\376\376\207\377\377" \ + "\377\1\376\376\376\205\377\377\377\1\376\376\376\211\377\377\377\3\376" \ + "\376\376\377\377\377\376\376\376\235\377\377\377\1\376\376\376\203\377" \ + "\377\377\1\376\376\376\213\377\377\377\3\376\376\376\377\377\377\376" \ + "\376\376\216\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\365\377\377\377\1\376" \ + "\376\376\203\377\377\377\1\376\376\376\207\377\377\377\1\376\376\376" \ + "\203\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\205\377" \ + "\377\377\1\376\376\376\203\377\377\377\12\376\376\376\377\377\377\346" \ + "\346\346\315\315\315\316\316\316\265\265\265\235\235\235\234\234\234" \ + "\233\233\233\204\204\204\203kkm\202lln\2EEG;;=\215::<\204kkm\3kkkxxx" \ + "\235\235\235\202\234\234\234\1\265\265\265\202\316\316\316\1\332\332" \ + "\332\207\377\377\377\202\376\376\376\2\377\377\377\376\376\376\211\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\203\377\377\377\5\376" \ + "\376\376\377\377\377\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\366\377\377\377\1\376\376\376\205" \ + "\377\377\377\1\376\376\376\214\377\377\377\11\376\376\376\332\332\332" \ + "\316\316\320\247\247\251\236\236\240\204\204\206kkm__a<<>\202::<\11;" \ + ";=99;;;=99;::<;;=::<;;=99;\203::<\1<<>\213::<\13;;=::<;;=::<;;=::<;;" \ + "=::<;;=::<;;=\207::<\3SSUllnxxz\202\234\234\236\202\316\316\316\2\377" \ + "\377\377\376\376\376\214\377\377\377\1\376\376\376\203\377\377\377\1" \ + "\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\376\377" \ + "\377\377\1\376\376\376\203\377\377\377\1\376\376\376\203\377\377\377" \ + "\7\332\332\334\302\302\304\234\234\236\203\203\205llnEEG;;=\202::<\6" \ + ";;=::<;;=::<;;=99;\204::<\1""99;\202;;=\1""99;\205::<\1;;=\213::<\11" \ + ";;=::<;;=::<;;=::<;;=::<;;=\202::<\1""99;\206::<\1;;=\203::<\13;;=99" \ + ";;;=::<;;=::\202::<\7llnkkm\233" \ + "\233\235\235\235\237\302\302\304\316\316\320\347\347\351\241\377\377" \ + "\377\202\376\376\376\203\377\377\377\17\376\376\376\377\377\377\376\376" \ + "\376\377\377\377\376\376\376\363\363\363\316\316\316\315\315\315\234" \ + "\234\234\235\235\235xxxllnFFH::<;;=\205::<\5;;=99;;;=::<;;=\212::<\202" \ + ";;=\212::<\5;;=99;;;=::<99;\202::<\5__a\250\250\252\346\346\346\377\377" \ + "\377\376\376\376\202\377\377\377\1\376\376\376\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\271\377\377\377\202\376\376\376\2\377\377\377" \ + "\376\376\376\203\377\377\377\3\363\363\363\266\266\266wwy\202;;=\210" \ + "::<\1<<>\203::<\2<<>99;\215::<\1;;=\205::<\11;;=::<;;;___xxx\235\235" \ + "\235\266\266\266\315\315\315\364\364\364\207\377\377\377\1\376\376\376" \ + "\213\377\377\377\1\376\376\376\231\377\377\377\5\376\376\376\377\377" \ + "\377\376\376\376\377\377\377\376\376\376\202\377\377\377\1\376\376\376" \ + "\204\377\377\377\1\376\376\376\202\377\377\377\5\316\316\316\302\302" \ + "\302\233\233\233yyykkk\202::<\6;;=::<;;=::<99;;;=\211::<\1;;=\202::<" \ + "\1;;=\206::<\1""99;\202;;=\202::<\203;;=\1""99;\202::<\3__a\251\251\253" \ + "\346\346\346\204\377\377\377\3\376\376\376\377\377\377\376\376\376\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\266\377\377\377\1\376\376" \ + "\376\202\377\377\377\2\302\302\302xxx\203::<\3;;=::<;;=\232::<\1;;=\202" \ + "::<\6RRTkkm\235\235\237\301\301\303\332\332\334\376\376\376\222\377\377" \ + "\377\1\376\376\376\260\377\377\377\3\376\376\376\377\377\377\376\376" \ + "\376\202\377\377\377\5\345\345\347\316\316\320\235\235\237xxzSSU\215" \ + "::<\202;;=\202::<\203;;=\2::<;;=\203::<\1;;=\204::<\10;;=::<;;=::<;;" \ + "=kkm\266\266\266\363\363\363\202\377\377\377\1\376\376\376\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\245\377\377\377\1\376\376\376\214" \ + "\377\377\377\1\376\376\376\202\377\377\377\5\376\376\376\377\377\377" \ + "\332\332\332\205\205\207GGI\202::<\1;;=\211::<\202;;=\205::<\2;;=::<" \ + "\202;;=\203::<\14;;=99;::<;;=99;;;=FFFxxx\234\234\234\315\315\315\364" \ + "\364\364\376\376\376\323\377\377\377\4\317\317\317\250\250\250xxxSSS" \ + "\202::<\1;;=\206::<\2;;=::<\203;;=\202::<\2;;=99;\204::<\7;;=::<;;=:" \ + ":<;;=::<;;=\204::<\3\204\204\206\301\301\301\376\376\376\220\377\377" \ + "\377\1\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\225" \ + "\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\206\377\377" \ + "\377\1\376\376\376\202\377\377\377\4\363\363\363\251\251\251___;;=\202" \ + "::<\1;;=\202::<\202;;=\204::<\1;;=\202::<\7;;=::<;;=::<;;=::<;;=\203" \ + "::<\3""99;::<;;=\202::<\5;;=__a\221\221\223\265\265\267\346\346\346\323" \ + "\377\377\377\1\376\376\376\211\377\377\377\5\363\363\363\301\301\303" \ + "\235\235\237lln::<\202;;=\203::<\1;;=\204::<\1;;=\202::<\2""99;;;=\205" \ + "::<\2;;=99;\203::<\1""99;\204::<\3TTT\233\233\233\346\346\346\207\377" \ + "\377\377\1\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\250\377\377\377\3\316\316\316\204\204\204;;=\203::<\1;;=\203::<\1;;" \ + "=\202::<\1;;=\205::<\3;;=::<;;=\202::<\4""99;;;=::<;;=\202::<\202;;=" \ + "\4___\221\221\221\301\301\303\363\363\365\203\377\377\377\1\376\376\376" \ + "\203\377\377\377\202\376\376\376\321\377\377\377\1\376\376\376\210\377" \ + "\377\377\1\376\376\376\202\377\377\377\4\316\316\316\235\235\235kkk;" \ + ";=\202::<\202;;=\203::<\5;;=::<;;=99;;;=\204::<\202;;=\7::<;;=99;::<" \ + ";;=::<;;=\202::<\202;;=\2xxz\302\302\304\213\377\377\377\1\376\376\376" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\224\377\377\377\1\376" \ + "\376\376\212\377\377\377\3\363\363\363\266\266\266TTV\203::<\3;;=::<" \ + ";;=\202::<\203;;=\202::<\202;;=\205::<\1;;=\202::<\1;;=\204::<\4SSU\221" \ + "\221\223\301\301\301\363\363\363\206\377\377\377\1\376\376\376\203\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\315\377\377\377" \ + "\202\376\376\376\202\377\377\377\1\376\376\376\210\377\377\377\1\376" \ + "\376\376\202\377\377\377\1\376\376\376\202\377\377\377\3\316\316\316" \ + "\221\221\223__a\203::<\1;;=\203::<\3;;=::<;;=\203::<\5;;=99;;;=::<;;" \ + "=\204::<\1""99;\205::<\3SSU\234\234\236\346\346\346\207\377\377\377\3" \ + "\376\376\376\377\377\377\376\376\376\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\233\377\377\377\4\376\376\376\347\347\347\221\221\221" \ + "FFH\207::<\4""99;;;=::<;;=\20299;\202;;=\202::<\1;;=\203::<\2;;=::<\202" \ + ";;=\202::<\3xxz\250\250\252\346\346\350\215\377\377\377\203\376\376\376" \ + "\316\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\211\377" \ + "\377\377\1\376\376\376\211\377\377\377\4\363\363\363\265\265\267\205" \ + "\205\207FFH\210::<\3;;=::<;;=\204::<\1;;=\207::<\2;;=::<\202;;=\2\203" \ + "\203\205\317\317\321\206\377\377\377\1\376\376\376\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\233\377\377\377\3\316\316\316yy{99;\206" \ + "::<\2;;=99;\202;;=\205::<\5""99;::<;;=::<;;=\202::<\6;;=::<;;=SSU\204" \ + "\204\204\301\301\301\226\377\377\377\1\376\376\376\317\377\377\377\1" \ + "\376\376\376\203\377\377\377\1\376\376\376\204\377\377\377\1\376\376" \ + "\376\204\377\377\377\1\376\376\376\205\377\377\377\1\376\376\376\202" \ + "\377\377\377\3\316\316\316\221\221\221SSU\203::<\3;;=::<99;\204::<\1" \ + ";;=\203::<\2""99;;;=\202::<\1;;=\204::<\5""99;<<>::99;\202::<\4""99;;;=F" \ + "FF\234\234\234\377\377\377\377\377\377\377\377\375\377\377\377\11\316" \ + "\316\320kkm::<;;=::<;;=99;::<;;=\203::<\202;;=\2::<99;\205::<\13;;=F" \ + "FH\221\221\221\346\346\346\376\376\376\377\377\377\376\376\376\377\377" \ + "\377\376\376\376\377\377\377\376\376\376\204\377\377\377\1\376\376\376" \ + "\273\377\377\377\2\376\376\376\317\317\317\212::<\6;;=;;;\316\316\316" \ + "\376\376\376\377\377\377\376\376\376\304\377\377\377\1\376\376\376\206" \ + "\377\377\377\5\376\376\376\377\377\377\376\376\376\377\377\377\376\376" \ + "\376\204\377\377\377\4\363\363\363\235\235\235RRT;;=\202::<\202;;=\7" \ + "::<;;=99;::<;;=::<;;=\203::<\1;;=\202::<\6;;=::\202::<\2FFH\331\331\333\377\377\377\377\205\377" \ + "\377\377\1\316\316\316\214::<\1\316\316\316\377\377\377\377\216\377\377" \ + "\377\1\376\376\376\203\377\377\377\4\376\376\376\377\377\377\363\363" \ + "\363__a\204::<\2;;=99;\206::<\2;;=\204\204\204\203\377\377\377\1\376" \ + "\376\376\377\377\377\377\377\377\377\377\220\377\377\377\1\204\204\204" \ + "\205::<\1;;=\203::<\1;;=\203::<\4__a\363\363\363\377\377\377\376\376" \ + "\376\377\377\377\377\204\377\377\377\1\316\316\316\214::<\1\316\316\316" \ + "\377\377\377\377\224\377\377\377\4\376\376\376\363\363\363xxx::<\202" \ + ";;=\202::<\1;;=\203::<\1;;=\203::<\1\205\205\207\204\377\377\377\1\376" \ + "\376\376\377\377\377\377\377\377\377\377\215\377\377\377\1\250\250\250" \ + "\205::<\1;;=\203::<\12;;=99;;;=::<__a\363\363\365\377\377\377\376\376" \ + "\376\377\377\377\376\376\376\377\377\377\377\203\377\377\377\1\316\316" \ + "\316\214::<\1\316\316\316\377\377\377\377\227\377\377\377\5\204\204\204" \ + "::<;;=::<;;=\204::<\1""99;\204::<\1\204\204\204\377\377\377\377\377\377" \ + "\377\377\213\377\377\377\1\376\376\376\202\377\377\377\4\376\376\376" \ + "\377\377\377\265\265\267;;=\212::<\4;;=::<__a\363\363\363\217\377\377" \ + "\377\1\376\376\376\367\377\377\377\1\316\316\316\214::<\1\316\316\316" \ + "\376\377\377\377\202\377\377\375\3\377\376\377\377\377\377\376\377\375" \ + "\224\377\377\377\3\204\204\206::<;;=\211::<\7""99;::<\203\203\205\377" \ + "\377\377\376\376\376\377\377\377\376\376\376\205\377\377\377\1\376\376" \ + "\376\202\377\377\377\202\376\376\376\377\377\377\377\377\377\377\377" \ + "\2\264\264\266;;=\202::<\202;;=\1""99;\207::<\2__a\363\363\365\217\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\366\377\377\377\1\316" \ + "\316\316\214::<\1\316\316\316\375\377\377\377\5\377\377\375\377\376\377" \ + "\377\375\377\377\377\375\377\377\377\202\377\376\377\221\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\204\204\206\203::<\1;;=\202::<\2;;=" \ + "::<\202;;=\202::<\3;;=\204\204\204\376\376\376\211\377\377\377\3\376" \ + "\376\376\377\377\377\376\376\376\377\377\377\377\375\377\377\377\7\376" \ + "\376\376\264\264\266;;=99;::<;;=99;\204::<\1;;=\203::<\2aac\363\363\363" \ + "\221\377\377\377\1\376\376\376\367\377\377\377\1\316\316\316\214::<\1" \ + "\316\316\316\375\377\377\377\202\376\376\376\203\377\377\377\202\376" \ + "\377\377\222\377\377\377\10\376\376\376\377\377\377\376\376\376\204\204" \ + "\206::<;;=::<;;=\203::<\202;;=\202::<\6""99;;;=\205\205\207\376\376\376" \ + "\377\377\377\376\376\376\203\377\377\377\202\376\376\376\202\377\377" \ + "\377\1\376\376\376\377\377\377\377\375\377\377\377\3\376\376\376\302" \ + "\302\304;;=\203::<\1;;=\204::<\6;;=99;;;=::\202::<\2__a\363\363\365\202\377\377\377\1" \ + "\376\376\376\213\377\377\377\1\376\376\376\375\377\377\377\1\316\316" \ + "\316\214::<\1\316\316\316\374\377\377\377\7\377\376\377\376\377\377\376" \ + "\376\374\377\376\377\377\377\375\376\377\377\377\377\375\226\377\377" \ + "\377\1\376\376\376\202\377\377\377\1\203\203\203\214::<\2;;=\265\265" \ + "\265\206\377\377\377\1\376\376\376\377\377\377\377\374\377\377\377\4" \ + "\364\364\364GGI99;;;=\206::<\1;;=\203::<\2__a\363\363\363\205\377\377" \ + "\377\1\376\376\376\212\377\377\377\1\363\363\363\203\377\377\377\1\376" \ + "\376\376\370\377\377\377\1\316\316\316\214::<\1\316\316\316\374\377\377" \ + "\377\10\377\377\375\377\376\377\377\377\377\377\377\375\377\376\377\370" \ + "\373\362\370\373\364\377\376\377\220\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\202\377\377\377" \ + "\1\204\204\204\203::<\1;;=\210::<\2FFH\332\332\334\204\377\377\377\1" \ + "\376\376\376\377\377\377\377\374\377\377\377\3\363\363\363___;;=\202" \ + "::<\1;;=\204::<\6;;=99;;;=::<__a\363\363\365\220\377\377\377\3\265\265" \ + "\265FFF\333\333\333\373\377\377\377\1\316\316\316\214::<\1\316\316\316" \ + "\376\377\377\377\6\374\377\377\377\377\375\371\374\365\242\320c\240\322" \ + "c\371\372\362\221\377\377\377\1\376\376\376\210\377\377\377\2\203\203" \ + "\203;;=\202::<\1;;=\203::<\1;;=\203::<\3;;=FFH\333\333\333\202\377\377" \ + "\377\1\376\376\376\377\377\377\377\371\377\377\377\1\376\376\376\203" \ + "\377\377\377\2kkm::<\202;;=\1""99;\205::<\202;;=\3::<__a\363\363\363" \ + "\220\377\377\377\5\265\265\267::<;;=FFH\332\332\332\206\377\377\377\3" \ + "\376\376\376\377\377\377\376\376\376\361\377\377\377\1\316\316\316\213" \ + "::<\2;;=\316\316\316\365\377\377\377\22\376\376\377\377\377\375\377\377" \ + "\377\377\377\375\377\377\377\377\376\377\377\377\375\377\377\377\376" \ + "\376\377\377\377\377\371\374\365\242\320c\215\307\77\215\305@\242\322" \ + "e\372\373\365\376\377\375\377\376\377\230\377\377\377\3\205\205\207:" \ + ":<;;=\206::<\1;;=\202::<\4;;=SSU\363\363\365\376\376\376\377\377\377" \ + "\377\374\377\377\377\13\376\376\376\204\204\204::<;;=99;::<;;=::<;;=" \ + "::<;;=\203::<\3__a\364\364\366\376\376\376\217\377\377\377\1\265\265" \ + "\267\203::<\3;;=FFF\332\332\332\206\377\377\377\1\376\376\376\361\377" \ + "\377\377\2\376\376\376\317\317\317\212::<\6;;=;;;\316\316\316\376\376" \ + "\376\377\377\377\376\376\376\361\377\377\377\6\376\376\377\377\376\377" \ + "\375\376\377\376\377\377\377\377\375\375\377\376\202\377\377\377\17\376" \ + "\376\376\377\377\377\371\372\364\240\322a\215\305@\212\307>\215\307\77" \ + "\215\305>\242\320c\370\372\365\377\377\377\377\376\377\376\377\375\377" \ + "\377\375\377\376\377\225\377\377\377\5kkm::<;;=99;;;=\210::<\4__a\364" \ + "\364\364\376\376\376\377\377\377\202\376\376\376\377\377\377\377\363" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\202\377\377\377\4" \ + "\250\250\252::<;;=99;\202;;=\205::<\202;;=\3FFH\345\345\345\376\376\376" \ + "\217\377\377\377\4\264\264\266;;=::<;;=\203::<\2GGI\332\332\332\203\377" \ + "\377\377\1\376\376\376\356\377\377\377\1\376\376\376\205\377\377\377" \ + "\2\315\315\315;;;\211::<\3;;;:::\315\315\315\202\377\377\377\1\376\376" \ + "\376\361\377\377\377\23\377\377\375\375\376\377\376\377\377\376\377\375" \ + "\377\374\377\377\377\375\375\377\376\377\377\377\377\377\375\371\372" \ + "\364\242\321g\215\306A\212\307>\215\306A\212\306@\214\305@\212\306B\241" \ + "\322_\367\372\361\204\377\377\377\1\377\377\375\220\377\377\377\1\376" \ + "\376\376\203\377\377\377\3\363\363\363__a99;\202::<\6;;=::<99;;;=99;" \ + ";;=\203::<\1\205\205\207\204\377\377\377\1\376\376\376\377\377\377\377" \ + "\362\377\377\377\1\376\376\376\202\377\377\377\22\376\376\376\265\265" \ + "\267::<99;;;=::<;;=99;;;=::<;;=::<;;=::\214\305@\214" \ + "\306>\202\214\305@\4\241\321a\371\374\365\376\376\377\377\377\375\202" \ + "\376\377\377\221\377\377\377\1\376\376\376\203\377\377\377\3\362\362" \ + "\362``b99;\205::<\1;;=\203::<\6;;=99;\235\235\237\376\376\376\377\377" \ + "\377\376\376\376\377\377\377\377\366\377\377\377\2\332\332\332FFH\202" \ + ";;=\4""99;;;=::<;;=\205::<\2FFH\332\332\334\202\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\213\377\377\377\4\266\266\26699;::<;;=\202" \ + "::<\1;;=\202::<\4;;=::\215\305" \ + "@\212\306@\213\310=\214\306<\216\306\77\214\304=\214\306>\241\321c\372" \ + "\375\362\376\376\376\377\376\377\376\376\374\220\377\377\377\2\376\376" \ + "\376\377\377\377\203\376\376\376\4\377\377\377\364\364\364FFH;;=\202" \ + "::<\1;;=\202::<\1;;=\203::<\3;;=::<\265\265\265\377\377\377\377\367\377" \ + "\377\377\4\362\362\362SSU::<;;=\205::<\1""99;\202;;=\3::<;;=\265\265" \ + "\267\216\377\377\377\3\376\376\376\377\377\377\265\265\265\202::<\5;" \ + ";=99;;;=::<;;=\204::<\4;;=FFH\332\332\332\376\376\376\205\377\377\377" \ + "\1\376\376\376\355\377\377\377\1\376\376\376\214\377\377\377\1\376\376" \ + "\376\366\377\377\377\1\375\377\376\202\377\377\375\24\377\377\377\376" \ + "\376\376\373\373\363\243\322b\213\307A\214\306>\215\305@\214\305@\212" \ + "\307>\214\306>\215\305>\213\307A\214\305@\216\310@\214\306>\215\305>" \ + "\242\320c\366\373\364\375\377\376\377\376\377\221\377\377\377\1\376\376" \ + "\376\204\377\377\377\3\376\376\376\333\333\333EEG\202;;=\2::<;;=\207" \ + "::<\3GGI\332\332\332\376\376\376\377\377\377\377\365\377\377\377\1__" \ + "a\205::<\10;;=::<;;=::<;;=::<;;=\265\265\265\202\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\213\377\377\377\1\266\266\266\203::<\5""9" \ + "9;<<>::<;;=::<\202;;=\203::<\4;;=FFH\333\333\333\376\376\376\202\377" \ + "\377\377\1\376\376\376\355\377\377\377\1\376\376\376\202\377\377\377" \ + "\1\376\376\376\215\377\377\377\1\376\376\376\363\377\377\377\3\377\376" \ + "\377\377\377\377\375\377\376\202\377\377\377\2\373\373\363\241\321d\202" \ + "\214\306>\17\216\306=\215\305@\215\307\77\214\306>\217\304>\214\306>" \ + "\214\305B\215\307\77\211\305A\215\306A\216\306\77\214\305@\242\322e\370" \ + "\373\364\377\377\375\230\377\377\377\1\333\333\335\203::<\202;;=\206" \ + "::<\3;;=FFH\363\363\363\377\377\377\377\364\377\377\377\1\204\204\206" \ + "\203::<\1;;=\207::<\2;;=\204\204\206\220\377\377\377\1\346\346\346\204" \ + "::<\1;;=\203::<\1;;=\202::<\202;;=\203::<\2FFH\332\332\332\357\377\377" \ + "\377\3\376\376\376\377\377\377\376\376\376\377\377\377\377\204\377\377" \ + "\377\1\377\377\375\202\377\377\377\17\377\376\377\370\373\364\243\322" \ + "b\214\306>\213\310\77\212\307>\214\306>\215\306C\212\307>\214\306<\213" \ + "\310\77\214\305@\214\306<\214\306>\216\306\77\203\214\306>\3\214\306" \ + "<\265\334\211\376\376\376\222\377\377\377\1\376\376\376\205\377\377\377" \ + "\4\376\376\377\265\265\267::<;;=\212::<\1___\377\377\377\377\363\377" \ + "\377\377\1\265\265\267\204::<\1;;=\206::<\2;;=\203\203\203\222\377\377" \ + "\377\2\265\265\265;;=\203::<\1;;=\205::<\1;;=\204::<\3;;=FFH\332\332" \ + "\332\206\377\377\377\3\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\377\345\377\377\377\10\376\376\377\377\377\375\377\377\377\377\377\375" \ + "\377\377\377\377\376\377\377\377\375\376\377\377\202\377\377\377\6\370" \ + "\373\362\243\322b\211\307B\213\310=\214\305@\214\306<\202\215\305@\4" \ + "\214\306<\214\305@\214\306<\215\307\77\202\214\306>\6\212\307>\214\306" \ + ">\215\307\77\214\305@\244\317c\367\375\361\233\377\377\377\3\234\234" \ + "\236::<99;\211::<\2;;=\204\204\206\377\377\377\377\360\377\377\377\13" \ + "\376\376\376\332\332\33299;::<99;;;=::<99;;;=::<;;=\202::<\3;;=^^`\364" \ + "\364\364\223\377\377\377\12\265\265\267;;=::<;;=99;;;=::<;;=::<;;=\202" \ + "::<\1;;=\203::<\3;;=FFF\332\332\332\206\377\377\377\1\376\376\376\377" \ + "\377\377\377\345\377\377\377\6\376\376\377\377\376\377\375\376\377\376" \ + "\377\377\377\377\375\375\377\376\203\377\377\377\27\377\377\375\372\373" \ + "\366\241\321a\217\304@\212\307<\214\306>\215\305>\215\305@\213\310=\212" \ + "\306@\214\306>\214\305B\215\307\77\215\305>\215\306A\212\307>\214\306" \ + ">\215\307\77\214\306>\242\322b\370\373\362\376\376\377\377\375\376\233" \ + "\377\377\377\1\204\204\206\203::<\13;;=::<;;=::<;;=::<;;=::<;;=\266\266" \ + "\266\376\376\376\203\377\377\377\1\376\376\376\377\377\377\377\352\377" \ + "\377\377\2\363\363\363TTV\202::<\3;;=99;;;=\204::<\4;;=99;FFH\363\363" \ + "\363\224\377\377\377\7\376\376\376\265\265\265;;=::<;;=::<;;=\203::<" \ + "\1;;=\203::<\1;;=\203::<\2GGI\332\332\332\203\377\377\377\1\376\376\376" \ + "\377\377\377\377\347\377\377\377\7\377\377\375\375\376\377\376\377\377" \ + "\376\377\375\377\374\377\377\377\375\375\377\376\202\377\377\377\5\372" \ + "\373\366\240\320b\215\307\77\212\306@\215\305>\202\214\305@\20\215\305" \ + "@\212\306@\214\305D\216\306\77\214\306>\215\307\77\214\306>\212\306@" \ + "\214\306>\215\307\77\215\305@\242\320c\370\373\362\377\377\373\377\376" \ + "\377\377\377\375\232\377\377\377\3\376\376\376\377\377\377^^`\202;;=" \ + "\205::<\1""99;\202;;=\5::<;;=\332\332\332\377\377\377\376\376\376\377" \ + "\377\377\377\347\377\377\377\1\376\376\376\204\377\377\377\1lln\204:" \ + ":<\202;;=\203::<\6;;=99;GGI\332\332\332\377\377\377\376\376\376\225\377" \ + "\377\377\2\264\264\264;;=\202::<\2""99;;;=\202::<\3""99;;;=::<\202;;" \ + "=\202::<\4;;=::\212\307<\214\306>\214\306<\214\306>\216" \ + "\306\77\215\305<\212\307>\213\307A\215\305>\212\307>\215\307\77\214\306" \ + ">\242\321a\373\374\364\377\377\377\376\377\377\376\376\376\376\377\377" \ + "\234\377\377\377\2\364\364\364RRT\202::<\4""99;;;=::<;;=\205::<\3SSU" \ + "\362\362\362\377\377\377\202\376\376\376\377\377\377\377\351\377\377" \ + "\377\1\234\234\236\204::<\1;;=\203::<\1;;=\203::<\1\265\265\267\231\377" \ + "\377\377\2\265\265\267;;=\203::<\2""99;;;=\202::<\1;;=\202::<\1;;=\202" \ + "::<\4;;=::\212\307>\212\306@\214\305B" \ + "\214\305@\214\305B\214\306>\212\307>\212\310\77\214\306>\217\304@\214" \ + "\306>\214\305@\242\322b\370\373\362\377\377\377\202\377\376\377\1\377" \ + "\377\375\235\377\377\377\3\376\376\376\332\332\334GGI\202;;=\6::<;;=" \ + "99;;;=::<;;=\203::<\1yyy\202\376\376\376\202\377\377\377\1\376\376\376" \ + "\377\377\377\377\345\377\377\377\4\376\376\376\317\317\317::<;;=\202" \ + "::<\3;;=99;;;=\204::<\6;;=\221\221\223\377\377\377\376\376\376\377\377" \ + "\377\376\376\376\226\377\377\377\3\376\376\376\265\265\267;;=\202::<" \ + "\2;;=99;\205::<\1;;=\204::<\4;;=FFH\332\332\332\376\376\376\205\377\377" \ + "\377\1\376\376\376\377\377\377\377\342\377\377\377\1\375\377\376\202" \ + "\377\377\375\34\377\377\377\376\376\376\373\373\363\243\322b\211\307" \ + "B\212\307<\215\305>\214\306>\212\307>\214\305@\217\304>\212\307<\214" \ + "\306<\214\306>\215\307\77\213\307A\214\306>\215\305@\215\307\77\212\307" \ + ">\244\317c\370\373\362\377\377\373\376\377\377\377\376\377\375\376\377" \ + "\377\377\375\377\376\377\236\377\377\377\4\265\265\267::<;;=99;\202;" \ + ";=\205::<\202;;=\1\250\250\250\202\377\377\377\1\376\376\376\377\377" \ + "\377\377\343\377\377\377\1\376\376\376\202\377\377\377\3\363\363\363" \ + "FFH;;=\202::<\5;;=::<;;=::<99;\202;;=\2::\213\310=\214\306>\214" \ + "\305@\213\310=\212\306@\217\304>\202\215\307=\14\214\306>\215\305>\214" \ + "\306>\215\305>\217\304@\215\307\77\215\307=\242\320c\367\375\361\376" \ + "\376\377\377\376\377\376\376\376\202\377\377\375\2\374\377\377\377\376" \ + "\377\234\377\377\377\1\376\376\376\202\377\377\377\10\221\221\221::<" \ + ";;=99;::<;;=::<;;=\205::<\2\333\333\333\376\376\376\377\377\377\377\347" \ + "\377\377\377\1kkk\202::<\1;;=\205::<\1;;=\202::<\2RRT\363\363\365\236" \ + "\377\377\377\1\265\265\267\203::<\2""99;;;=\203::<\1;;=\202::<\202;;" \ + "=\203::<\2FFH\332\332\332\377\377\377\377\346\377\377\377\1\377\377\375" \ + "\202\377\377\377\32\377\376\377\370\373\364\243\322b\214\306>\213\310" \ + "\77\214\305@\215\305>\215\305@\214\306>\214\305B\212\307<\215\307=\214" \ + "\305B\214\306>\215\306A\212\306@\212\307>\214\306>\212\307<\244\317c" \ + "\370\373\364\377\377\377\377\375\376\377\377\375\376\377\377\377\377" \ + "\377\202\377\376\377\241\377\377\377\2kkm::<\202;;=\1""99;\204::<\203" \ + ";;=\2SSU\364\364\364\377\377\377\377\336\377\377\377\3\376\376\376\377" \ + "\377\377\376\376\376\204\377\377\377\2\376\376\376\250\250\252\202::" \ + "<\1;;=\210::<\2FFH\333\333\333\202\377\377\377\1\376\376\376\235\377" \ + "\377\377\2\265\265\265;;=\203::<\1;;=\205::<\1;;=\204::<\3;;=FFH\332" \ + "\332\332\206\377\377\377\3\376\376\376\377\377\377\376\376\376\243\377" \ + "\377\377\4\376\377\377\377\377\375\377\376\377\376\376\377\202\377\377" \ + "\377\2\376\377\375\376\377\377\230\377\377\377\10\376\377\377\377\376" \ + "\377\376\377\377\376\377\375\376\376\376\376\377\377\377\377\377\377" \ + "\376\377\231\377\377\377\7\377\376\377\376\376\374\376\377\377\377\377" \ + "\375\374\377\377\376\377\377\377\376\377\231\377\377\377\17\375\377\374" \ + "\377\377\375\377\377\377\377\376\377\376\377\377\377\376\377\377\377" \ + "\377\376\377\377\376\376\374\377\377\377\377\377\373\377\377\377\376" \ + "\377\377\377\377\377\377\377\375\220\377\377\377\4\377\377\373\377\377" \ + "\377\377\377\375\377\377\377\202\376\377\377\2\377\377\375\377\377\373" \ + "\251\377\377\377\10\376\376\377\377\377\375\377\377\377\377\377\375\377" \ + "\377\377\377\376\377\377\377\375\376\377\377\202\377\377\377\6\370\373" \ + "\362\243\322b\211\307B\213\310=\214\305@\214\306<\202\215\305@\4\214" \ + "\306<\214\305@\214\306<\215\307\77\202\214\306>\6\212\307>\214\306>\215" \ + "\307\77\214\305@\244\317c\367\375\361\251\377\377\377\6\363\363\363T" \ + "TT::<;;=::<;;=\206::<\2;;=www\204\377\377\377\1\376\376\376\377\377\377" \ + "\377\340\377\377\377\2\332\332\332;;=\203::<\3;;=99;;;=\203::<\3;;=:" \ + ":<\265\265\267\204\377\377\377\1\376\376\376\235\377\377\377\12\265\265" \ + "\267;;=::<;;=99;;;=::<;;=::<;;=\202::<\1;;=\203::<\3;;=FFF\332\332\332" \ + "\206\377\377\377\1\376\376\376\244\377\377\377\202\377\377\375\1\377" \ + "\377\377\202\376\377\375\3\376\376\377\377\377\377\377\376\377\230\377" \ + "\377\377\3\376\377\375\377\377\377\377\377\373\202\377\376\377\2\377" \ + "\377\377\376\376\376\231\377\377\377\10\376\377\373\376\375\377\377\377" \ + "\375\377\376\377\377\375\377\377\377\373\377\376\377\377\377\375\230" \ + "\377\377\377\12\377\376\377\377\377\377\377\375\376\376\377\377\376\377" \ + "\372\376\377\377\377\377\377\376\377\375\377\376\377\377\377\375\203" \ + "\377\377\377\202\376\377\375\1\375\376\377\227\377\377\377\1\377\374" \ + "\377\250\377\377\377\6\376\376\377\377\376\377\375\376\377\376\377\377" \ + "\377\377\375\375\377\376\203\377\377\377\27\377\377\375\372\373\366\241" \ + "\321a\217\304@\212\307<\214\306>\215\305>\215\305@\213\310=\212\306@" \ + "\214\306>\214\305B\215\307\77\215\305>\215\306A\212\307>\214\306>\215" \ + "\307\77\214\306>\242\322b\370\373\362\376\376\377\377\375\376\251\377" \ + "\377\377\2\331\331\331;;=\206::<\1;;=\203::<\2;;=\265\265\265\204\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\377\377\377\377" \ + "\322\377\377\377\1\376\376\376\203\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\202\377\377\377\2\363\363\363SSU\203::<\2;;=::<\202" \ + ";;=\2""99;;;=\202::<\1\204\204\204\206\377\377\377\1\376\376\376\234" \ + "\377\377\377\7\376\376\376\265\265\265;;=::<;;=::<;;=\203::<\1;;=\203" \ + "::<\1;;=\203::<\2GGI\332\332\332\203\377\377\377\1\376\376\376\247\377" \ + "\377\377\1\377\377\375\202\377\376\377\1\377\375\377\202\377\377\377" \ + "\1\377\376\377\232\377\377\377\6\377\377\375\377\377\377\375\377\376" \ + "\376\377\375\377\377\375\377\375\377\230\377\377\377\202\377\377\375" \ + "\2\377\377\377\376\376\376\202\377\377\377\2\376\377\377\374\377\377" \ + "\230\377\377\377\1\377\377\375\202\377\376\377\1\375\376\377\203\377" \ + "\377\377\1\377\377\375\202\377\377\377\6\376\376\377\377\377\375\377" \ + "\377\377\377\375\377\377\376\377\377\377\375\220\377\377\377\1\376\377" \ + "\377\202\377\377\377\3\376\377\375\376\376\376\377\376\377\252\377\377" \ + "\377\7\377\377\375\375\376\377\376\377\377\376\377\375\377\374\377\377" \ + "\377\375\375\377\376\202\377\377\377\5\372\373\366\240\320b\215\307\77" \ + "\212\306@\215\305>\202\214\305@\20\215\305@\212\306@\214\305D\216\306" \ + "\77\214\306>\215\307\77\214\306>\212\306@\214\306>\215\307\77\215\305" \ + "@\242\320c\370\373\362\377\377\373\377\376\377\377\377\375\252\377\377" \ + "\377\2\250\250\25099;\204::<\12;;=99;::<;;=99;::\212\307<\214\306" \ + ">\214\306<\214\306>\216\306\77\215\305<\212\307>\213\307A\215\305>\212" \ + "\307>\215\307\77\214\306>\242\321a\373\374\364\377\377\377\376\377\377" \ + "\376\376\376\376\377\377\253\377\377\377\1yyy\205::<\3;;=::<99;\202;" \ + ";=\3::<__a\376\376\376\377\377\377\377\335\377\377\377\1\376\376\376" \ + "\202\377\377\377\5\301\301\301::<;;=99;;;=\207::<\2GGI\332\332\332\203" \ + "\377\377\377\1\376\376\376\243\377\377\377\2\265\265\267;;=\203::<\2" \ + "99;;;=\202::<\1;;=\202::<\1;;=\202::<\4;;=::\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>" \ + "\212\307>\212\310\77\214\306>\217\304@\214\306>\214\305@\242\322b\370" \ + "\373\362\377\377\377\202\377\376\377\1\377\377\375\254\377\377\377\4" \ + "\363\363\363SSU;;=99;\202;;=\1""99;\204::<\3;;=::<\235\235\237\377\377" \ + "\377\377\334\377\377\377\1\376\376\376\202\377\377\377\2\363\363\363" \ + "GGI\202::<\7;;=::<99;::<;;=::<;;=\202::<\2\266\266\266\376\376\376\204" \ + "\377\377\377\202\376\376\376\202\377\377\377\1\376\376\376\236\377\377" \ + "\377\3\376\376\376\265\265\267;;=\202::<\2;;=99;\205::<\1;;=\204::<\4" \ + ";;=FFH\332\332\332\376\376\376\205\377\377\377\1\376\376\376\240\377" \ + "\377\377\10\376\377\375\377\375\377\377\377\375\376\377\375\377\377\377" \ + "\377\376\377\377\377\377\376\376\374\230\377\377\377\10\374\377\377\377" \ + "\376\374\377\377\377\376\376\374\377\376\377\376\377\377\377\377\377" \ + "\377\376\377\230\377\377\377\3\377\377\375\377\377\377\376\377\375\203" \ + "\377\377\377\1\377\376\377\231\377\377\377\6\377\375\377\376\376\374" \ + "\377\377\377\377\376\377\376\377\375\377\376\377\202\377\377\377\2\377" \ + "\376\377\377\377\377\202\376\377\377\2\376\376\377\376\377\377\222\377" \ + "\377\377\2\377\377\375\377\375\377\202\376\377\377\4\376\376\376\376" \ + "\377\377\375\377\374\377\375\377\251\377\377\377\1\375\377\376\202\377" \ + "\377\375\34\377\377\377\376\376\376\373\373\363\243\322b\211\307B\212" \ + "\307<\215\305>\214\306>\212\307>\214\305@\217\304>\212\307<\214\306<" \ + "\214\306>\215\307\77\213\307A\214\306>\215\305@\215\307\77\212\307>\244" \ + "\317c\370\373\362\377\377\373\376\377\377\377\376\377\375\376\377\377" \ + "\377\375\377\376\377\252\377\377\377\5\376\376\376\377\377\377\333\333" \ + "\33399;;;=\202::<\5;;=99;;;=99;;;=\203::<\1\332\332\334\377\377\377\377" \ + "\330\377\377\377\1\376\376\376\205\377\377\377\1xxx\202::<\1;;=\202:" \ + ":<\1;;=\204::<\4:::xxx\376\376\376\377\377\377\202\376\376\376\205\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\237\377\377\377\1\265" \ + "\265\265\204::<\6;;=::<;;=::<;;=::<\202;;=\203::<\4;;=FFH\333\333\333" \ + "\376\376\376\202\377\377\377\1\376\376\376\242\377\377\377\7\376\376" \ + "\376\377\376\377\326\352\267\247\324o\247\324m\252\324r\247\324o\231" \ + "\252\324p\10\323\353\271\377\376\377\377\377\377\376\377\377\350\365" \ + "\333\253\323p\250\324r\251\324k\230\252\324p\10\250\325n\252\324p\277" \ + "\337\223\376\377\377\377\377\377\375\377\376\376\377\377\276\336\222" \ + "\230\252\324p\7\250\325p\250\324r\247\324o\253\324n\251\323m\346\364" \ + "\332\377\376\377\202\377\377\377\7\323\352\266\253\323p\251\323m\253" \ + "\323r\251\323o\247\324m\252\324r\220\252\324p\10\252\324n\253\324n\247" \ + "\324k\252\324p\254\325o\247\324m\252\324p\324\353\267\250\377\377\377" \ + "\3\377\376\377\377\377\377\375\377\376\202\377\377\377\11\373\373\363" \ + "\241\321d\214\306>\213\310=\214\306>\214\305@\213\310=\212\306@\217\304" \ + ">\202\215\307=\14\214\306>\215\305>\214\306>\215\305>\217\304@\215\307" \ + "\77\215\307=\242\320c\367\375\361\376\376\377\377\376\377\376\376\376" \ + "\202\377\377\375\2\374\377\377\377\376\377\254\377\377\377\2\376\376" \ + "\376\251\251\251\202::<\5;;=::<;;=99;;;=\204::<\1``b\377\377\377\377" \ + "\334\377\377\377\3\376\376\376\301\301\301:::\205::<\1""99;\202::<\4" \ + ";;=::\10\304\341\237\377\374\377\377\376\377\377\377\377" \ + "\341\362\322\215\305>\212\307>\215\305>\230\214\306>\4\215\305<\214\305" \ + "@\252\324r\376\377\377\202\377\377\377\2\377\377\375\250\324r\230\214" \ + "\306>\20\215\307\77\214\306>\214\306<\214\305B\212\307>\337\363\320\377" \ + "\376\377\376\377\377\376\376\374\305\342\240\214\305@\213\310=\215\305" \ + "@\214\306>\212\307<\214\305@\220\214\306>\10\214\305@\215\306C\212\307" \ + "<\214\306>\215\305>\212\306@\215\305>\304\343\237\250\377\377\377\1\377" \ + "\377\375\202\377\377\377\32\377\376\377\370\373\364\243\322b\214\306" \ + ">\213\310\77\214\305@\215\305>\215\305@\214\306>\214\305B\212\307<\215" \ + "\307=\214\305B\214\306>\215\306A\212\306@\212\307>\214\306>\212\307<" \ + "\244\317c\370\373\364\377\377\377\377\375\376\377\377\375\376\377\377" \ + "\377\377\377\202\377\376\377\257\377\377\377\1kkm\202::<\2;;=::<\202" \ + ";;=\3::<;;=::<\202;;=\1\233\233\233\377\377\377\377\330\377\377\377\1" \ + "\376\376\376\202\377\377\377\3\364\364\366FFH;;=\205::<\3;;=::<;;=\202" \ + "::<\1\316\316\316\256\377\377\377\2\265\265\265;;=\203::<\1;;=\205::" \ + "<\1;;=\204::<\3;;=FFH\332\332\332\206\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\235\377\377\377\1\304\343\240\235\214\306>\1\305\342" \ + "\237\203\377\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377" \ + "\377\1\252\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377" \ + "\3\305\342\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306" \ + ">\1\214\305@\205\214\306>\1\305\342\237\241\377\377\377\10\376\376\377" \ + "\377\377\375\377\377\377\377\377\375\377\377\377\377\376\377\377\377" \ + "\375\376\377\377\202\377\377\377\6\370\373\362\243\322b\211\307B\213" \ + "\310=\214\305@\214\306<\202\215\305@\4\214\306<\214\305@\214\306<\215" \ + "\307\77\202\214\306>\6\212\307>\214\306>\215\307\77\214\305@\244\317" \ + "c\367\375\361\267\377\377\377\2\363\363\363FFF\204::<\1;;=\203::<\4:" \ + "9>::<;;=\332\332\332\377\377\377\377\332\377\377\377\1yy{\202::<\2""9" \ + "9;;;=\202::<\6;;=99;::<;;=::<\234\234\236\260\377\377\377\12\265\265" \ + "\267;;=::<;;=99;;;=::<;;=::<;;=\202::<\1;;=\203::<\3;;=FFF\332\332\332" \ + "\206\377\377\377\1\376\376\376\236\377\377\377\1\304\343\240\235\214" \ + "\306>\1\305\342\237\203\377\377\377\1\342\362\316\235\214\306>\1\250" \ + "\325p\204\377\377\377\1\252\324p\234\214\306>\2\215\307\77\342\362\316" \ + "\203\377\377\377\3\305\342\237\214\305@\215\305>\202\214\306>\1\214\305" \ + "@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237\240\377\377\377" \ + "\6\376\376\377\377\376\377\375\376\377\376\377\377\377\377\375\375\377" \ + "\376\203\377\377\377\27\377\377\375\372\373\366\241\321a\217\304@\212" \ + "\307<\214\306>\215\305>\215\305@\213\310=\212\306@\214\306>\214\305B" \ + "\215\307\77\215\305>\215\306A\212\307>\214\306>\215\307\77\214\306>\242" \ + "\322b\370\373\362\376\376\377\377\375\376\267\377\377\377\1\301\301\301" \ + "\205::<\3;;=::<;;=\202::<\2""99;```\377\377\377\377\331\377\377\377\1" \ + "\301\301\301\202::<\1;;=\203::<\1;;=\202::<\3<<>::<__a\261\377\377\377" \ + "\7\376\376\376\265\265\265;;=::<;;=::<;;=\203::<\1;;=\203::<\1;;=\203" \ + "::<\2GGI\332\332\332\203\377\377\377\1\376\376\376\240\377\377\377\1" \ + "\304\343\240\235\214\306>\1\305\342\237\203\377\377\377\1\342\362\316" \ + "\235\214\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215" \ + "\307\77\342\362\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202" \ + "\214\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237" \ + "\240\377\377\377\7\377\377\375\375\376\377\376\377\377\376\377\375\377" \ + "\374\377\377\377\375\375\377\376\202\377\377\377\5\372\373\366\240\320" \ + "b\215\307\77\212\306@\215\305>\202\214\305@\20\215\305@\212\306@\214" \ + "\305D\216\306\77\214\306>\215\307\77\214\306>\212\306@\214\306>\215\307" \ + "\77\215\305@\242\320c\370\373\362\377\377\373\377\376\377\377\377\375" \ + "\270\377\377\377\3\204\204\204::<;;=\206::<\4;;=::<;;=\234\234\236\377" \ + "\377\377\377\325\377\377\377\4\376\376\376\377\377\377\363\363\363SS" \ + "U\211::<\4""99;::<\332\332\334\376\376\376\202\377\377\377\1\376\376" \ + "\376\257\377\377\377\2\264\264\264;;=\202::<\2""99;;;=\202::<\3""99;" \ + ";;=::<\202;;=\202::<\4;;=::\1\305\342\237\203\377" \ + "\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377\1\252" \ + "\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305\342" \ + "\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305" \ + "@\205\214\306>\1\305\342\237\241\377\377\377\37\376\377\377\376\377\375" \ + "\377\375\376\375\377\376\377\377\375\377\377\377\377\376\377\370\373" \ + "\362\241\321a\215\307\77\215\307=\214\305@\214\306>\212\307<\214\306" \ + ">\214\306<\214\306>\216\306\77\215\305<\212\307>\213\307A\215\305>\212" \ + "\307>\215\307\77\214\306>\242\321a\373\374\364\377\377\377\376\377\377" \ + "\376\376\376\376\377\377\270\377\377\377\3\363\363\363TTT;;=\202::<\1" \ + ";;=\203::<\5""99;;;=::<;;=\332\332\332\377\377\377\377\323\377\377\377" \ + "\1\376\376\376\202\377\377\377\4\221\221\221;;=99;;;=\202::<\1;;=\202" \ + "::<\1;;=\202::<\1\233\233\233\202\377\377\377\1\376\376\376\262\377\377" \ + "\377\2\265\265\267;;=\203::<\2""99;;;=\202::<\1;;=\202::<\1;;=\202::" \ + "<\4;;=::\1\305\342\237" \ + "\203\377\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377" \ + "\1\252\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305" \ + "\342\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214" \ + "\305@\205\214\306>\1\305\342\237\240\377\377\377\202\377\377\375\3\377" \ + "\374\377\375\377\376\376\377\377\202\377\377\377\25\370\373\364\243\322" \ + "b\217\304@\212\306@\214\305@\215\305>\212\307>\212\306@\214\305B\214" \ + "\305@\214\305B\214\306>\212\307>\212\310\77\214\306>\217\304@\214\306" \ + ">\214\305@\242\322b\370\373\362\377\377\377\202\377\376\377\1\377\377" \ + "\375\272\377\377\377\7\316\316\316::<;;=::<99;::<;;=\205::<\1kkm\377" \ + "\377\377\377\325\377\377\377\1\315\315\315\206::<\6""99;::<99;;;=::<" \ + "```\206\377\377\377\1\376\376\376\257\377\377\377\3\376\376\376\265\265" \ + "\267;;=\202::<\2;;=99;\205::<\1;;=\204::<\4;;=FFH\332\332\332\376\376" \ + "\376\205\377\377\377\1\376\376\376\232\377\377\377\1\304\343\240\235" \ + "\214\306>\1\305\342\237\203\377\377\377\1\342\362\316\235\214\306>\1" \ + "\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215\307\77\342\362" \ + "\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202\214\306>\1\214" \ + "\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237\241\377\377" \ + "\377\1\375\377\376\202\377\377\375\34\377\377\377\376\376\376\373\373" \ + "\363\243\322b\211\307B\212\307<\215\305>\214\306>\212\307>\214\305@\217" \ + "\304>\212\307<\214\306<\214\306>\215\307\77\213\307A\214\306>\215\305" \ + "@\215\307\77\212\307>\244\317c\370\373\362\377\377\373\376\377\377\377" \ + "\376\377\375\376\377\377\377\375\377\376\377\272\377\377\377\2\222\222" \ + "\22299;\205::<\1;;=\203::<\2;;=\250\250\250\377\377\377\377\324\377\377" \ + "\377\4```;;=99;;;=\204::<\5;;=::<;;=::<\331\331\331\207\377\377\377\1" \ + "\376\376\376\260\377\377\377\1\265\265\265\204::<\6;;=::<;;=::<;;=::" \ + "<\202;;=\203::<\4;;=FFH\333\333\333\376\376\376\202\377\377\377\1\376" \ + "\376\376\234\377\377\377\1\304\343\240\235\214\306>\1\305\342\237\203" \ + "\377\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377\1" \ + "\252\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305" \ + "\342\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214" \ + "\305@\205\214\306>\1\305\342\237\240\377\377\377\3\377\376\377\377\377" \ + "\377\375\377\376\202\377\377\377\11\373\373\363\241\321d\214\306>\213" \ + "\310=\214\306>\214\305@\213\310=\212\306@\217\304>\202\215\307=\14\214" \ + "\306>\215\305>\214\306>\215\305>\217\304@\215\307\77\215\307=\242\320" \ + "c\367\375\361\376\376\377\377\376\377\376\376\376\202\377\377\375\2\374" \ + "\377\377\377\376\377\262\377\377\377\2\376\376\376\377\377\377\202\376" \ + "\376\376\204\377\377\377\5\363\363\363SSU99;::<;;=\207::<\2GGG\363\363" \ + "\363\377\377\377\377\322\377\377\377\4\234\234\234:::::<;;=\202::<\1" \ + ";;=\203::<\202;;=\1\234\234\236\207\377\377\377\1\376\376\376\262\377" \ + "\377\377\1\265\265\267\203::<\2""99;;;=\203::<\1;;=\202::<\202;;=\203" \ + "::<\2FFH\332\332\332\237\377\377\377\1\304\343\240\235\214\306>\1\305" \ + "\342\237\203\377\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377" \ + "\377\377\1\252\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377" \ + "\377\3\305\342\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214" \ + "\306>\1\214\305@\205\214\306>\1\305\342\237\240\377\377\377\1\377\377" \ + "\375\202\377\377\377\32\377\376\377\370\373\364\243\322b\214\306>\213" \ + "\310\77\214\305@\215\305>\215\305@\214\306>\214\305B\212\307<\215\307" \ + "=\214\305B\214\306>\215\306A\212\306@\212\307>\214\306>\212\307<\244" \ + "\317c\370\373\364\377\377\377\377\375\376\377\377\375\376\377\377\377" \ + "\377\377\202\377\376\377\273\377\377\377\2\376\376\376\316\316\316\206" \ + "::<\202;;=\4::<;;=::\1\305\342\237\203\377" \ + "\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377\1\252" \ + "\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305\342" \ + "\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305" \ + "@\205\214\306>\1\305\342\237\231\377\377\377\10\376\376\377\377\377\375" \ + "\377\377\377\377\377\375\377\377\377\377\376\377\377\377\375\376\377" \ + "\377\202\377\377\377\6\370\373\362\243\322b\211\307B\213\310=\214\305" \ + "@\214\306<\202\215\305@\4\214\306<\214\305@\214\306<\215\307\77\202\214" \ + "\306>\6\212\307>\214\306>\215\307\77\214\305@\244\317c\367\375\361\305" \ + "\377\377\377\2xxz;;=\203::<\3;;=::<;;=\203::<\2;;=\315\315\315\377\377" \ + "\377\377\313\377\377\377\203\376\376\376\202\377\377\377\3xxz;;=::<\202" \ + ";;=\1""99;\202;;=\202::<\4;;=::<\333\333\335\376\376\376\274\377\377" \ + "\377\12\265\265\267;;=::<;;=99;;;=::<;;=::<;;=\202::<\1;;=\202::<\4;" \ + ";=99;GGI\332\332\332\235\377\377\377\1\304\343\240\235\214\306>\1\305" \ + "\342\237\203\377\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377" \ + "\377\377\1\252\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377" \ + "\377\3\305\342\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214" \ + "\306>\1\214\305@\205\214\306>\1\305\342\237\230\377\377\377\6\376\376" \ + "\377\377\376\377\375\376\377\376\377\377\377\377\375\375\377\376\203" \ + "\377\377\377\27\377\377\375\372\373\366\241\321a\217\304@\212\307<\214" \ + "\306>\215\305>\215\305@\213\310=\212\306@\214\306>\214\305B\215\307\77" \ + "\215\305>\215\306A\212\307>\214\306>\215\307\77\214\306>\242\322b\370" \ + "\373\362\376\376\377\377\375\376\304\377\377\377\2\364\364\364FFH\203" \ + "::<\2""99;;;=\203::<\4<<>99;TTT\376\376\376\377\377\377\377\310\377\377" \ + "\377\1\376\376\376\205\377\377\377\3\316\316\316::<99;\206::<\1;;=\202" \ + "::<\1\221\221\221\203\377\377\377\1\376\376\376\272\377\377\377\7\376" \ + "\376\376\265\265\265;;=::<;;=::<;;=\203::<\1;;=\203::<\6;;=::<;;=::<" \ + "FFH\332\332\332\234\377\377\377\1\304\343\240\235\214\306>\1\305\342" \ + "\237\203\377\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377" \ + "\377\1\252\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377" \ + "\3\305\342\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306" \ + ">\1\214\305@\205\214\306>\1\305\342\237\230\377\377\377\7\377\377\375" \ + "\375\376\377\376\377\377\376\377\375\377\374\377\377\377\375\375\377" \ + "\376\202\377\377\377\5\372\373\366\240\320b\215\307\77\212\306@\215\305" \ + ">\202\214\305@\20\215\305@\212\306@\214\305D\216\306\77\214\306>\215" \ + "\307\77\214\306>\212\306@\214\306>\215\307\77\215\305@\242\320c\370\373" \ + "\362\377\377\373\377\376\377\377\377\375\304\377\377\377\3\376\376\376" \ + "\265\265\267;;=\204::<\1""99;\203::<\3;;=::<\234\234\234\203\377\377" \ + "\377\1\376\376\376\377\377\377\377\306\377\377\377\7\376\376\376\377" \ + "\377\377\376\376\376\377\377\377__a::<;;=\203::<\7;;=::<;;=::<;;=SSU" \ + "\363\363\363\300\377\377\377\2\264\264\264;;=\202::<\2""99;;;=\202::" \ + "<\3""99;;;=::<\202;;=\204::<\2FFH\332\332\332\233\377\377\377\1\304\343" \ + "\240\235\214\306>\1\305\342\237\203\377\377\377\1\342\362\316\235\214" \ + "\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215\307\77" \ + "\342\362\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202\214" \ + "\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237\231" \ + "\377\377\377\37\376\377\377\376\377\375\377\375\376\375\377\376\377\377" \ + "\375\377\377\377\377\376\377\370\373\362\241\321a\215\307\77\215\307" \ + "=\214\305@\214\306>\212\307<\214\306>\214\306<\214\306>\216\306\77\215" \ + "\305<\212\307>\213\307A\215\305>\212\307>\215\307\77\214\306>\242\321" \ + "a\373\374\364\377\377\377\376\377\377\376\376\376\376\377\377\301\377" \ + "\377\377\1\376\376\376\204\377\377\377\2kkm99;\203::<\202;;=\1""99;\203" \ + "::<\2FFH\363\363\363\377\377\377\377\310\377\377\377\1\376\376\376\203" \ + "\377\377\377\3\250\250\252::<;;=\203::<\1;;=\202::<\5;;=::<;;=\301\301" \ + "\301\376\376\376\301\377\377\377\2\265\265\267;;=\203::<\2""99;;;=\202" \ + "::<\1;;=\202::<\2;;=::<\202;;=\3::\1\305\342\237\203\377\377\377\1\342\362\316" \ + "\235\214\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215" \ + "\307\77\342\362\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202" \ + "\214\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237" \ + "\230\377\377\377\202\377\377\375\3\377\374\377\375\377\376\376\377\377" \ + "\202\377\377\377\25\370\373\364\243\322b\217\304@\212\306@\214\305@\215" \ + "\305>\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>\212\307>" \ + "\212\310\77\214\306>\217\304@\214\306>\214\305@\242\322b\370\373\362" \ + "\377\377\377\202\377\376\377\1\377\377\375\301\377\377\377\1\376\376" \ + "\376\204\377\377\377\2\376\376\376\346\346\350\203::<\4;;=99;::<;;=\204" \ + "::<\3\203\203\203\377\377\377\376\376\376\377\377\377\377\311\377\377" \ + "\377\2\364\364\364FFH\202::<\5;;=::<;;=::<;;=\202::<\2;;=kkm\202\377" \ + "\377\377\1\376\376\376\300\377\377\377\3\376\376\376\265\265\267;;=\202" \ + "::<\2;;=99;\204::<\3;;=99;;;=\202::<\3;;=::<\265\265\265\232\377\377" \ + "\377\1\304\343\240\235\214\306>\1\305\342\237\203\377\377\377\1\342\362" \ + "\316\235\214\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>" \ + "\2\215\307\77\342\362\316\203\377\377\377\3\305\342\237\214\305@\215" \ + "\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1" \ + "\305\342\237\231\377\377\377\1\375\377\376\202\377\377\375\34\377\377" \ + "\377\376\376\376\373\373\363\243\322b\211\307B\212\307<\215\305>\214" \ + "\306>\212\307>\214\305@\217\304>\212\307<\214\306<\214\306>\215\307\77" \ + "\213\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370\373\362" \ + "\377\377\373\376\377\377\377\376\377\375\376\377\377\377\375\377\376" \ + "\377\301\377\377\377\202\376\376\376\2\377\377\377\376\376\376\202\377" \ + "\377\377\1\234\234\236\203::<\1;;=\206::<\2;;=\331\331\331\377\377\377" \ + "\377\306\377\377\377\1\376\376\376\203\377\377\377\4\233\233\233;;=:" \ + ":<;;=\202::<\3;;=99;;;=\203::<\1\346\346\350\305\377\377\377\1\265\265" \ + "\265\204::<\3;;=::<;;=\203::<\5;;=99;;;=::<\265\265\267\233\377\377\377" \ + "\1\304\343\240\235\214\306>\1\305\342\237\203\377\377\377\1\342\362\316" \ + "\235\214\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215" \ + "\307\77\342\362\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202" \ + "\214\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237" \ + "\230\377\377\377\3\377\376\377\377\377\377\375\377\376\202\377\377\377" \ + "\11\373\373\363\241\321d\214\306>\213\310=\214\306>\214\305@\213\310" \ + "=\212\306@\217\304>\202\215\307=\14\214\306>\215\305>\214\306>\215\305" \ + ">\217\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377\376" \ + "\377\376\376\376\202\377\377\375\2\374\377\377\377\376\377\301\377\377" \ + "\377\1\376\376\376\202\377\377\377\1\376\376\376\202\377\377\377\6\364" \ + "\364\364SSU::<;;=::<;;=\205::<\4""99;kkk\377\377\377\376\376\376\377" \ + "\377\377\377\307\377\377\377\2\346\346\346;;;\204::<\3;;=99;;;=\203:" \ + ":<\1\234\234\236\205\377\377\377\1\376\376\376\301\377\377\377\1\265" \ + "\265\267\203::<\2""99;;;=\202::<\1;;;\204::<\1\265\265\267\234\377\377" \ + "\377\1\304\343\240\235\214\306>\1\305\342\237\203\377\377\377\1\342\362" \ + "\316\235\214\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>" \ + "\2\215\307\77\342\362\316\203\377\377\377\3\305\342\237\214\305@\215" \ + "\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1" \ + "\305\342\237\230\377\377\377\1\377\377\375\202\377\377\377\32\377\376" \ + "\377\370\373\364\243\322b\214\306>\213\310\77\214\305@\215\305>\215\305" \ + "@\214\306>\214\305B\212\307<\215\307=\214\305B\214\306>\215\306A\212" \ + "\306@\212\307>\214\306>\212\307<\244\317c\370\373\364\377\377\377\377" \ + "\375\376\377\377\375\376\377\377\377\377\377\202\377\376\377\306\377" \ + "\377\377\1\376\376\376\202\377\377\377\2\301\301\303::<\202;;=\11::<" \ + ";;=::<;;=::<99;;;=::<\301\301\301\377\377\377\377\306\377\377\377\12" \ + "\376\376\376\377\377\377\204\204\204;;=::<:9>;;=::<99;;;=\203::<\5SS" \ + "U\363\363\363\376\376\376\377\377\377\376\376\376\305\377\377\377\5\265" \ + "\265\26599;;;=::<;;=\206::<\1\266\266\270\235\377\377\377\1\304\343\240" \ + "\235\214\306>\1\305\342\237\203\377\377\377\1\342\362\316\235\214\306" \ + ">\1\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215\307\77\342" \ + "\362\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202\214\306" \ + ">\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237\221\377" \ + "\377\377\10\376\376\377\377\377\375\377\377\377\377\377\375\377\377\377" \ + "\377\376\377\377\377\375\376\377\377\202\377\377\377\6\370\373\362\243" \ + "\322b\211\307B\213\310=\214\305@\214\306<\202\215\305@\4\214\306<\214" \ + "\305@\214\306<\215\307\77\202\214\306>\6\212\307>\214\306>\215\307\77" \ + "\214\305@\244\317c\367\375\361\322\377\377\377\1kkk\203::<\4;;=99;::" \ + "<;;=\203::<\1SSU\210\377\377\377\1\376\376\376\377\377\377\377\276\377" \ + "\377\377\1\316\316\316\202::<\1;;=\202::<\202;;=\202::<\4;;=::<\265\265" \ + "\267\376\376\376\307\377\377\377\3\376\376\376\377\377\377\265\265\267" \ + "\207::<\3""99;\266\266\270\376\376\377\202\377\377\377\1\376\376\376" \ + "\232\377\377\377\1\304\343\240\235\214\306>\1\305\342\237\203\377\377" \ + "\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377\1\252\324" \ + "p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305\342\237" \ + "\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305@\205" \ + "\214\306>\1\305\342\237\220\377\377\377\6\376\376\377\377\376\377\375" \ + "\376\377\376\377\377\377\377\375\375\377\376\203\377\377\377\27\377\377" \ + "\375\372\373\366\241\321a\217\304@\212\307<\214\306>\215\305>\215\305" \ + "@\213\310=\212\306@\214\306>\214\305B\215\307\77\215\305>\215\306A\212" \ + "\307>\214\306>\215\307\77\214\306>\242\322b\370\373\362\376\376\377\377" \ + "\375\376\321\377\377\377\1\346\346\346\204::<\1;;=\202::<\5;;=99;;;=" \ + "::<\266\266\266\205\377\377\377\202\376\376\376\2\377\377\377\376\376" \ + "\376\377\377\377\377\273\377\377\377\5\376\376\376\377\377\377kkm::<" \ + ";;=\202::<\1;;=\203::<\3;;=::\1\305\342\237" \ + "\203\377\377\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377" \ + "\1\252\324p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305" \ + "\342\237\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214" \ + "\305@\205\214\306>\1\305\342\237\220\377\377\377\7\377\377\375\375\376" \ + "\377\376\377\377\376\377\375\377\374\377\377\377\375\375\377\376\202" \ + "\377\377\377\5\372\373\366\240\320b\215\307\77\212\306@\215\305>\202" \ + "\214\305@\20\215\305@\212\306@\214\305D\216\306\77\214\306>\215\307\77" \ + "\214\306>\212\306@\214\306>\215\307\77\215\305@\242\320c\370\373\362" \ + "\377\377\373\377\376\377\377\377\375\322\377\377\377\1\221\221\223\202" \ + "::<\12;;=99;::<;;=::<;;=99;;;=EEG\364\364\364\203\377\377\377\1\376\376" \ + "\376\202\377\377\377\1\376\376\376\377\377\377\377\275\377\377\377\2" \ + "\316\316\320;;=\205::<\2""99;;;=\203::<\3\316\316\316\377\377\377\376" \ + "\376\376\313\377\377\377\3\265\265\265;;=99;\202::<\1\266\266\270\203" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\232\377\377\377\1" \ + "\304\343\240\235\214\306>\1\305\342\237\203\377\377\377\1\342\362\316" \ + "\235\214\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215" \ + "\307\77\342\362\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202" \ + "\214\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237" \ + "\221\377\377\377\37\376\377\377\376\377\375\377\375\376\375\377\376\377" \ + "\377\375\377\377\377\377\376\377\370\373\362\241\321a\215\307\77\215" \ + "\307=\214\305@\214\306>\212\307<\214\306>\214\306<\214\306>\216\306\77" \ + "\215\305<\212\307>\213\307A\215\305>\212\307>\215\307\77\214\306>\242" \ + "\321a\373\374\364\377\377\377\376\377\377\376\376\376\376\377\377\322" \ + "\377\377\377\2\363\363\363FFH\203::<\202;;=\203::<\3;;=::<\235\235\235" \ + "\204\377\377\377\1\376\376\376\377\377\377\377\277\377\377\377\1__a\202" \ + "::<\1;;=\203::<\5;;=::<;;=::<\204\204\206\312\377\377\377\1\376\376\376" \ + "\202\377\377\377\7\376\376\376\377\377\377\265\265\267;;=99;\266\266" \ + "\270\376\376\377\203\377\377\377\202\376\376\376\233\377\377\377\1\304" \ + "\343\240\235\214\306>\1\305\342\237\203\377\377\377\1\342\362\316\235" \ + "\214\306>\1\250\325p\204\377\377\377\1\252\324p\234\214\306>\2\215\307" \ + "\77\342\362\316\203\377\377\377\3\305\342\237\214\305@\215\305>\202\214" \ + "\306>\1\214\305@\222\214\306>\1\214\305@\205\214\306>\1\305\342\237\220" \ + "\377\377\377\202\377\377\375\3\377\374\377\375\377\376\376\377\377\202" \ + "\377\377\377\25\370\373\364\243\322b\217\304@\212\306@\214\305@\215\305" \ + ">\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>\212\307>\212" \ + "\310\77\214\306>\217\304@\214\306>\214\305@\242\322b\370\373\362\377" \ + "\377\377\202\377\376\377\1\377\377\375\324\377\377\377\4\234\234\234" \ + ";;=::<<<>\204::<\1;;=\202::<\2FFH\363\363\363\204\377\377\377\1\376\376" \ + "\376\202\377\377\377\1\376\376\376\377\377\377\377\272\377\377\377\1" \ + "\265\265\265\202::<\5;;=99;::<;;=::<\202;;=\3""99;;;=\346\346\346\320" \ + "\377\377\377\2\264\264\266\265\265\267\203\377\377\377\202\376\376\376" \ + "\235\377\377\377\1\304\343\240\235\214\306>\1\305\342\237\203\377\377" \ + "\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377\1\252\324" \ + "p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305\342\237" \ + "\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305@\205" \ + "\214\306>\1\305\342\237\221\377\377\377\1\375\377\376\202\377\377\375" \ + "\34\377\377\377\376\376\376\373\373\363\243\322b\211\307B\212\307<\215" \ + "\305>\214\306>\212\307>\214\305@\217\304>\212\307<\214\306<\214\306>" \ + "\215\307\77\213\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370" \ + "\373\362\377\377\373\376\377\377\377\376\377\375\376\377\377\377\375" \ + "\377\376\377\320\377\377\377\1\376\376\376\203\377\377\377\2SSU;;=\203" \ + "::<\1;;=\203::<\3""99;::<\234\234\236\203\377\377\377\1\376\376\376\377" \ + "\377\377\377\276\377\377\377\5RRT99;;;=99;;;=\203::<\4""99;;;=::<\234" \ + "\234\236\314\377\377\377\1\376\376\376\212\377\377\377\1\376\376\376" \ + "\235\377\377\377\1\304\343\240\235\214\306>\1\305\342\237\203\377\377" \ + "\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377\1\252\324" \ + "p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305\342\237" \ + "\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305@\205" \ + "\214\306>\1\305\342\237\220\377\377\377\3\377\376\377\377\377\377\375" \ + "\377\376\202\377\377\377\11\373\373\363\241\321d\214\306>\213\310=\214" \ + "\306>\214\305@\213\310=\212\306@\217\304>\202\215\307=\14\214\306>\215" \ + "\305>\214\306>\215\305>\217\304@\215\307\77\215\307=\242\320c\367\375" \ + "\361\376\376\377\377\376\377\376\376\376\202\377\377\375\2\374\377\377" \ + "\377\376\377\324\377\377\377\3\265\265\265;;=99;\202;;=\1""99;\202;;" \ + "=\5::<;;=::\1\305\342\237\203\377\377" \ + "\377\1\342\362\316\235\214\306>\1\250\325p\204\377\377\377\1\252\324" \ + "p\234\214\306>\2\215\307\77\342\362\316\203\377\377\377\3\305\342\237" \ + "\214\305@\215\305>\202\214\306>\1\214\305@\222\214\306>\1\214\305@\205" \ + "\214\306>\1\305\342\237\220\377\377\377\1\377\377\375\202\377\377\377" \ + "\32\377\376\377\370\373\364\243\322b\214\306>\213\310\77\214\305@\215" \ + "\305>\215\305@\214\306>\214\305B\212\307<\215\307=\214\305B\214\306>" \ + "\215\306A\212\306@\212\307>\214\306>\212\307<\244\317c\370\373\364\377" \ + "\377\377\377\375\376\377\377\375\376\377\377\377\377\377\202\377\376" \ + "\377\326\377\377\377\1__a\203::<\1;;=\203::<\1;;=\202::<\1\234\234\234" \ + "\377\377\377\377\274\377\377\377\1\376\376\376\203\377\377\377\3SSU;" \ + ";=99;\210::<\1\234\234\234\365\377\377\377\7\376\377\375\304\341\236" \ + "\215\306A\214\305B\215\307=\212\307>\212\306@\230\214\305@\1\304\341" \ + "\236\203\377\377\377\4\341\362\320\214\306>\213\310\77\215\305@\231\214" \ + "\305@\2\215\307\77\252\322q\202\377\376\377\202\377\377\377\1\250\325" \ + "n\230\214\305@\3\215\305>\215\306A\215\307\77\202\214\306<\10\342\360" \ + "\317\376\377\377\377\377\375\376\377\377\305\342\240\215\305@\212\306" \ + "@\215\305>\202\214\305@\1\215\307=\220\214\305@\10\214\306>\212\306@" \ + "\216\306A\212\307>\215\305>\215\305@\214\305@\304\343\237\211\377\377" \ + "\377\10\376\376\377\377\377\375\377\377\377\377\377\375\377\377\377\377" \ + "\376\377\377\377\375\376\377\377\202\377\377\377\6\370\373\362\243\322" \ + "b\211\307B\213\310=\214\305@\214\306<\202\215\305@\4\214\306<\214\305" \ + "@\214\306<\215\307\77\202\214\306>\6\212\307>\214\306>\215\307\77\214" \ + "\305@\244\317c\367\375\361\335\377\377\377\2\376\376\376\316\316\316" \ + "\211::<\3;;=GGI\363\363\365\203\377\377\377\1\376\376\376\377\377\377" \ + "\377\266\377\377\377\10\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\265\265\265;;=::<;;=\207::<\2GGI\363\363\363\364\377\377\377\7\377\376" \ + "\377\377\377\375\304\341\236\215\305>\215\307\77\214\306>\214\305@\231" \ + "\214\306>\7\304\343\237\377\377\377\375\376\377\377\377\375\341\360\321" \ + "\215\306A\214\305@\233\214\306>\6\252\324n\376\376\376\377\377\377\376" \ + "\377\377\377\376\377\252\324p\230\214\306>\7\215\306A\212\307>\214\306" \ + ">\212\307>\214\306>\343\361\320\376\377\377\202\377\377\377\7\305\342" \ + "\237\215\305>\213\310\77\214\306>\214\305@\212\306@\215\307\77\222\214" \ + "\306>\6\215\305>\212\307>\214\306>\215\307=\215\305@\305\342\237\210" \ + "\377\377\377\6\376\376\377\377\376\377\375\376\377\376\377\377\377\377" \ + "\375\375\377\376\203\377\377\377\27\377\377\375\372\373\366\241\321a" \ + "\217\304@\212\307<\214\306>\215\305>\215\305@\213\310=\212\306@\214\306" \ + ">\214\305B\215\307\77\215\305>\215\306A\212\307>\214\306>\215\307\77" \ + "\214\306>\242\322b\370\373\362\376\376\377\377\375\376\336\377\377\377" \ + "\1kkm\202::<\1;;=\205::<\202;;=\3\233\233\235\377\377\377\376\376\376" \ + "\377\377\377\377\274\377\377\377\3SSU99;;;=\20299;\1;;=\203::<\3;;=:" \ + ":<\234\234\236\366\377\377\377\7\376\377\375\305\342\240\213\304\77\213" \ + "\310\77\214\305@\215\306A\216\306=\230\214\306>\10\305\342\240\377\377" \ + "\375\376\377\377\377\376\377\341\360\317\214\306<\214\305@\212\306@\231" \ + "\214\306>\7\215\305@\252\324p\377\377\377\377\377\375\376\377\377\377" \ + "\376\374\252\324p\230\214\306>\7\212\307>\215\307\77\216\306A\212\307" \ + ">\213\304\77\343\361\320\377\377\375\202\377\377\377\3\307\342\237\214" \ + "\304\77\213\310\77\203\214\306>\1\215\307\77\220\214\306>\4\214\305@" \ + "\214\306<\215\304B\213\310\77\202\212\307>\2\215\305@\305\342\240\210" \ + "\377\377\377\7\377\377\375\375\376\377\376\377\377\376\377\375\377\374" \ + "\377\377\377\375\375\377\376\202\377\377\377\5\372\373\366\240\320b\215" \ + "\307\77\212\306@\215\305>\202\214\305@\20\215\305@\212\306@\214\305D" \ + "\216\306\77\214\306>\215\307\77\214\306>\212\306@\214\306>\215\307\77" \ + "\215\305@\242\320c\370\373\362\377\377\373\377\376\377\377\377\375\331" \ + "\377\377\377\1\376\376\376\203\377\377\377\4\376\376\376\317\317\321" \ + "::<;;=\203::<\3;;=::<;;=\202::<\4FFH\363\363\363\377\377\377\376\376" \ + "\376\377\377\377\377\264\377\377\377\1\376\376\376\205\377\377\377\1" \ + "\265\265\267\202;;=\3::<99;;;=\202::<\202;;=\2::\231\214\306>\2\305\342\240\377\377\377\202\377\376\377\3\341" \ + "\362\316\216\306\77\214\306<\231\214\306>\3\215\305@\212\307>\252\324" \ + "p\203\377\377\377\2\377\376\377\247\324o\230\214\306>\20\215\306A\214" \ + "\305B\215\307\77\211\305\77\214\304;\342\362\315\377\377\377\377\376" \ + "\377\376\376\376\305\342\237\215\306A\210\307;\215\306A\216\306A\214" \ + "\306>\212\306@\220\214\306>\202\214\305@\6\216\305C\213\305=\214\305" \ + "B\215\307\77\216\306\77\303\344\237\211\377\377\377\37\376\377\377\376" \ + "\377\375\377\375\376\375\377\376\377\377\375\377\377\377\377\376\377" \ + "\370\373\362\241\321a\215\307\77\215\307=\214\305@\214\306>\212\307<" \ + "\214\306>\214\306<\214\306>\216\306\77\215\305<\212\307>\213\307A\215" \ + "\305>\212\307>\215\307\77\214\306>\242\321a\373\374\364\377\377\377\376" \ + "\377\377\376\376\376\376\377\377\331\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\203\377\377\377\1kkm\202::<\6;;=::<;;=::<;;=::<\202" \ + ";;=\1\233\233\235\377\377\377\377\267\377\377\377\1\376\376\376\204\377" \ + "\377\377\2kkm;;=\202::<\2;;=::<\202;;=\203::<\5\265\265\267\377\377\377" \ + "\376\376\376\377\377\377\376\376\376\362\377\377\377\2\376\377\377\377" \ + "\376\377\202\377\377\377\202\377\376\377\2\377\377\377\377\377\375\231" \ + "\377\377\377\4\377\376\377\376\377\377\375\377\376\377\377\377\202\376" \ + "\377\377\231\377\377\377\10\374\377\375\377\376\377\377\377\375\376\376" \ + "\376\377\377\377\376\377\377\376\376\374\377\376\377\230\377\377\377" \ + "\1\377\376\377\203\377\377\375\4\376\377\377\377\375\377\377\377\377" \ + "\376\377\377\202\377\377\377\3\376\376\376\377\376\377\377\377\375\202" \ + "\376\377\377\1\377\377\375\220\377\377\377\10\377\377\375\377\377\377" \ + "\376\376\376\377\377\377\377\377\375\377\377\377\376\377\377\377\375" \ + "\377\210\377\377\377\202\377\377\375\3\377\374\377\375\377\376\376\377" \ + "\377\202\377\377\377\25\370\373\364\243\322b\217\304@\212\306@\214\305" \ + "@\215\305>\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>\212" \ + "\307>\212\310\77\214\306>\217\304@\214\306>\214\305@\242\322b\370\373" \ + "\362\377\377\377\202\377\376\377\1\377\377\375\340\377\377\377\1\316" \ + "\316\316\203::<\3;;=99;;;=\204::<\2FFH\363\363\363\202\377\377\377\1" \ + "\376\376\376\377\377\377\377\264\377\377\377\1\376\376\376\202\377\377" \ + "\377\1\316\316\320\206::<\1;;=\203::<\2SSU\376\376\376\366\377\377\377" \ + "\1\377\377\375\202\377\376\377\202\377\377\377\3\377\377\375\377\377" \ + "\377\376\377\377\230\377\377\377\202\376\377\377\6\377\377\375\377\377" \ + "\377\376\377\375\377\377\377\376\377\375\377\377\375\231\377\377\377" \ + "\2\376\377\377\377\377\375\202\377\377\377\1\376\376\376\232\377\377" \ + "\377\5\377\376\377\377\377\377\376\377\375\377\377\377\377\377\375\204" \ + "\377\377\377\202\376\377\377\1\376\376\376\202\377\377\377\202\376\377" \ + "\377\220\377\377\377\1\377\377\375\202\377\377\377\4\376\376\374\377" \ + "\376\377\377\377\377\376\377\375\212\377\377\377\1\375\377\376\202\377" \ + "\377\375\34\377\377\377\376\376\376\373\373\363\243\322b\211\307B\212" \ + "\307<\215\305>\214\306>\212\307>\214\305@\217\304>\212\307<\214\306<" \ + "\214\306>\215\307\77\213\307A\214\306>\215\305@\215\307\77\212\307>\244" \ + "\317c\370\373\362\377\377\373\376\377\377\377\376\377\375\376\377\377" \ + "\377\375\377\376\377\334\377\377\377\1\376\376\376\202\377\377\377\10" \ + "\376\376\376kkm::<;;=99;;;=::<;;=\202::<\202;;=\1\234\234\236\203\377" \ + "\377\377\1\376\376\376\377\377\377\377\262\377\377\377\5\376\376\376" \ + "\377\377\377\376\376\376\377\377\377lln\210::<\3""99;;;=\265\265\265" \ + "\202\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\370\377" \ + "\377\377\1\376\377\377\230\377\377\377\7\377\376\377\377\377\375\377" \ + "\376\377\376\376\377\377\377\375\377\377\377\377\377\375\233\377\377" \ + "\377\1\377\376\377\203\377\377\377\1\376\377\375\231\377\377\377\5\377" \ + "\377\375\377\377\377\377\377\375\377\377\377\377\377\375\202\377\377" \ + "\377\1\377\377\375\203\377\377\377\2\376\376\376\377\376\377\226\377" \ + "\377\377\5\377\377\375\377\377\377\376\377\377\377\377\375\376\377\377" \ + "\210\377\377\377\3\377\376\377\377\377\377\375\377\376\202\377\377\377" \ + "\11\373\373\363\241\321d\214\306>\213\310=\214\306>\214\305@\213\310" \ + "=\212\306@\217\304>\202\215\307=\14\214\306>\215\305>\214\306>\215\305" \ + ">\217\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377\376" \ + "\377\376\376\376\202\377\377\375\2\374\377\377\377\376\377\333\377\377" \ + "\377\1\376\376\376\202\377\377\377\3\376\376\376\377\377\377\316\316" \ + "\320\203::<\1;;=\202::<\1;;=\203::<\2FFH\377\377\377\202\376\376\376" \ + "\377\377\377\377\262\377\377\377\5\376\376\376\377\377\377\376\376\376" \ + "\377\377\377\332\332\332\206::<\1;;=\202::<\5;;=FFH\363\363\363\377\377" \ + "\377\376\376\376\203\377\377\377\1\376\376\376\365\377\377\377\1\377" \ + "\377\375\202\377\377\377\1\377\377\375\230\377\377\377\2\376\377\377" \ + "\377\377\375\204\377\377\377\2\377\376\377\376\377\375\230\377\377\377" \ + "\4\377\377\375\377\377\377\377\377\373\376\377\377\203\377\377\377\1" \ + "\377\376\377\230\377\377\377\13\376\377\377\377\377\375\377\377\377\376" \ + "\377\377\377\375\376\377\377\377\377\377\375\376\377\377\377\376\377" \ + "\377\377\377\376\376\376\202\377\377\377\1\377\377\375\226\377\377\377" \ + "\202\376\377\377\2\377\377\375\377\376\377\210\377\377\377\1\377\377" \ + "\375\202\377\377\377\32\377\376\377\370\373\364\243\322b\214\306>\213" \ + "\310\77\214\305@\215\305>\215\305@\214\306>\214\305B\212\307<\215\307" \ + "=\214\305B\214\306>\215\306A\212\306@\212\307>\214\306>\212\307<\244" \ + "\317c\370\373\364\377\377\377\377\375\376\377\377\375\376\377\377\377" \ + "\377\377\202\377\376\377\333\377\377\377\1\376\376\376\204\377\377\377" \ + "\11\376\376\376\377\377\377kkm::<;;=99;;;=::<;;=\202::<\3;;=::<\264\264" \ + "\264\377\377\377\377\265\377\377\377\1\376\376\376\202\377\377\377\1" \ + "\204\204\204\203::<\1;;=\206::<\1\235\235\237\377\377\377\377\377\377" \ + "\377\377\203\377\377\377\10\376\376\377\377\377\375\377\377\377\377\377" \ + "\375\377\377\377\377\376\377\377\377\375\376\377\377\202\377\377\377" \ + "\6\370\373\362\243\322b\211\307B\213\310=\214\305@\214\306<\202\215\305" \ + "@\4\214\306<\214\305@\214\306<\215\307\77\202\214\306>\6\212\307>\214" \ + "\306>\215\307\77\214\305@\244\317c\367\375\361\352\377\377\377\1\316" \ + "\316\316\203::<\1;;=\203::<\202;;=\2::\215\305>\215" \ + "\305@\213\310=\212\306@\214\306>\214\305B\215\307\77\215\305>\215\306" \ + "A\212\307>\214\306>\215\307\77\214\306>\242\322b\370\373\362\376\376" \ + "\377\377\375\376\352\377\377\377\2kkm;;=\207::<\3;;=::<\301\301\301\377" \ + "\377\377\377\266\377\377\377\2\221\221\221;;=\202::<\202;;=\202::<\1" \ + ";;=\202::<\1\235\235\237\377\377\377\377\377\377\377\377\203\377\377" \ + "\377\7\377\377\375\375\376\377\376\377\377\376\377\375\377\374\377\377" \ + "\377\375\375\377\376\202\377\377\377\5\372\373\366\240\320b\215\307\77" \ + "\212\306@\215\305>\202\214\305@\20\215\305@\212\306@\214\305D\216\306" \ + "\77\214\306>\215\307\77\214\306>\212\306@\214\306>\215\307\77\215\305" \ + "@\242\320c\370\373\362\377\377\373\377\376\377\377\377\375\350\377\377" \ + "\377\4\376\376\376\377\377\377\265\265\26799;\203::<\3;;=::<;;=\203:" \ + ":<\2kkk\376\376\376\377\377\377\377\264\377\377\377\2\362\362\362FFH" \ + "\202::<\1;;=\203::<\5;;=::<;;=::<\363\363\363\377\377\377\377\377\377" \ + "\377\377\204\377\377\377\37\376\377\377\376\377\375\377\375\376\375\377" \ + "\376\377\377\375\377\377\377\377\376\377\370\373\362\241\321a\215\307" \ + "\77\215\307=\214\305@\214\306>\212\307<\214\306>\214\306<\214\306>\216" \ + "\306\77\215\305<\212\307>\213\307A\215\305>\212\307>\215\307\77\214\306" \ + ">\242\321a\373\374\364\377\377\377\376\377\377\376\376\376\376\377\377" \ + "\352\377\377\377\2\376\376\376TTV\204::<\7;;=99;::<;;=99;::<\332\332" \ + "\332\377\377\377\377\263\377\377\377\3\376\376\376\266\266\266;;=\203" \ + "::<\202;;=\204::<\1\205\205\207\377\377\377\377\377\377\377\377\204\377" \ + "\377\377\202\377\377\375\3\377\374\377\375\377\376\376\377\377\202\377" \ + "\377\377\25\370\373\364\243\322b\217\304@\212\306@\214\305@\215\305>" \ + "\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>\212\307>\212\310" \ + "\77\214\306>\217\304@\214\306>\214\305@\242\322b\370\373\362\377\377" \ + "\377\202\377\376\377\1\377\377\375\354\377\377\377\2\265\265\267::<\202" \ + ";;=\205::<\4;;=::<\204\204\204\376\376\376\377\377\377\377\263\377\377" \ + "\377\1SSU\202::<\1;;=\206::<\2;;=\346\346\346\377\377\377\377\377\377" \ + "\377\377\205\377\377\377\1\375\377\376\202\377\377\375\34\377\377\377" \ + "\376\376\376\373\373\363\243\322b\211\307B\212\307<\215\305>\214\306" \ + ">\212\307>\214\305@\217\304>\212\307<\214\306<\214\306>\215\307\77\213" \ + "\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370\373\362\377" \ + "\377\373\376\377\377\377\376\377\375\376\377\377\377\375\377\376\377" \ + "\354\377\377\377\4FFH;;=99;;;=\203::<\5;;=99;;;=99;\364\364\364\377\377" \ + "\377\377\262\377\377\377\1\316\316\316\202;;=\1""99;\203::<\1;;=\203" \ + "::<\1xxz\377\377\377\377\377\377\377\377\205\377\377\377\3\377\376\377" \ + "\377\377\377\375\377\376\202\377\377\377\11\373\373\363\241\321d\214" \ + "\306>\213\310=\214\306>\214\305@\213\310=\212\306@\217\304>\202\215\307" \ + "=\14\214\306>\215\305>\214\306>\215\305>\217\304@\215\307\77\215\307" \ + "=\242\320c\367\375\361\376\376\377\377\376\377\376\376\376\202\377\377" \ + "\375\2\374\377\377\377\376\377\354\377\377\377\1\235\235\237\204::<\1" \ + "<<>\202::<\4;;=::<;;=\247\247\251\377\377\377\377\262\377\377\377\4\204" \ + "\204\204;;=::<;;=\206::<\2;;=\316\316\316\377\377\377\377\377\377\377" \ + "\377\205\377\377\377\1\377\377\375\202\377\377\377\32\377\376\377\370" \ + "\373\364\243\322b\214\306>\213\310\77\214\305@\215\305>\215\305@\214" \ + "\306>\214\305B\212\307<\215\307=\214\305B\214\306>\215\306A\212\306@" \ + "\212\307>\214\306>\212\307<\244\317c\370\373\364\377\377\377\377\375" \ + "\376\377\377\375\376\377\377\377\377\377\202\377\376\377\355\377\377" \ + "\377\1\363\363\363\212::<\1TTV\377\377\377\377\261\377\377\377\5\347" \ + "\347\351::<;;=::<;;=\204::<\3;;=::\6\212\307>\214\306>\215\307\77\214\305" \ + "@\244\317c\367\375\361\361\377\377\377\1\376\376\376\204\377\377\377" \ + "\1\204\204\204\202;;=\203::<\1;;=\202::<\202;;=\1\302\302\302\203\377" \ + "\377\377\1\376\376\376\377\377\377\377\244\377\377\377\1\376\376\376" \ + "\203\377\377\377\1\376\376\376\203\377\377\377\1\234\234\236\202::<\1" \ + ";;=\204::<\6;;=::<;;=\264\264\264\377\377\377\376\376\376\377\377\377" \ + "\377\373\377\377\377\6\376\376\377\377\376\377\375\376\377\376\377\377" \ + "\377\377\375\375\377\376\203\377\377\377\27\377\377\375\372\373\366\241" \ + "\321a\217\304@\212\307<\214\306>\215\305>\215\305@\213\310=\212\306@" \ + "\214\306>\214\305B\215\307\77\215\305>\215\306A\212\307>\214\306>\215" \ + "\307\77\214\306>\242\322b\370\373\362\376\376\377\377\375\376\365\377" \ + "\377\377\1\332\332\332\202::<\1;;=\202::<\6""99;::<;;=99;;;=xxx\205\377" \ + "\377\377\1\376\376\376\377\377\377\377\243\377\377\377\1\376\376\376" \ + "\206\377\377\377\4SSU;;=::<;;=\202::<\1;;=\203::<\3GGI\362\362\362\376" \ + "\376\376\377\377\377\377\374\377\377\377\7\377\377\375\375\376\377\376" \ + "\377\377\376\377\375\377\374\377\377\377\375\375\377\376\202\377\377" \ + "\377\5\372\373\366\240\320b\215\307\77\212\306@\215\305>\202\214\305" \ + "@\20\215\305@\212\306@\214\305D\216\306\77\214\306>\215\307\77\214\306" \ + ">\212\306@\214\306>\215\307\77\215\305@\242\320c\370\373\362\377\377" \ + "\373\377\376\377\377\377\375\364\377\377\377\3\376\376\376\377\377\377" \ + "__a\203::<\202;;=\6::<99;;;=::<;;=\345\345\345\203\377\377\377\1\376" \ + "\376\376\377\377\377\377\245\377\377\377\3\376\376\376\377\377\377\376" \ + "\376\376\202\377\377\377\2\316\316\316::<\202;;=\205::<\202;;=\1\203" \ + "\203\205\204\377\377\377\1\376\376\376\377\377\377\377\372\377\377\377" \ + "\37\376\377\377\376\377\375\377\375\376\375\377\376\377\377\375\377\377" \ + "\377\377\376\377\370\373\362\241\321a\215\307\77\215\307=\214\305@\214" \ + "\306>\212\307<\214\306>\214\306<\214\306>\216\306\77\215\305<\212\307" \ + ">\213\307A\215\305>\212\307>\215\307\77\214\306>\242\321a\373\374\364" \ + "\377\377\377\376\377\377\376\376\376\376\377\377\362\377\377\377\202" \ + "\376\376\376\3\377\377\377\376\376\376\265\265\267\202::<\1;;=\207::" \ + "<\3\251\251\253\377\377\377\376\376\376\203\377\377\377\1\376\376\376" \ + "\377\377\377\377\247\377\377\377\2\376\376\376\204\204\206\207::<\1;" \ + ";=\202::<\3\346\346\346\377\377\377\376\376\376\377\377\377\377\374\377" \ + "\377\377\202\377\377\375\3\377\374\377\375\377\376\376\377\377\202\377" \ + "\377\377\25\370\373\364\243\322b\217\304@\212\306@\214\305@\215\305>" \ + "\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>\212\307>\212\310" \ + "\77\214\306>\217\304@\214\306>\214\305@\242\322b\370\373\362\377\377" \ + "\377\202\377\376\377\1\377\377\375\364\377\377\377\17\376\376\376\377" \ + "\377\377\376\376\376\377\377\377FFH;;=99;::<;;=::<;;=99;;;=::\214" \ + "\306>\212\307>\214\305@\217\304>\212\307<\214\306<\214\306>\215\307\77" \ + "\213\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370\373\362" \ + "\377\377\373\376\377\377\377\376\377\375\376\377\377\377\375\377\376" \ + "\377\361\377\377\377\202\376\376\376\2\377\377\377\376\376\376\202\377" \ + "\377\377\1\221\221\221\205::<\202;;=\5::<;;=99;\316\316\320\376\376\376" \ + "\377\377\377\377\250\377\377\377\1\376\376\376\202\377\377\377\4\266" \ + "\266\270::<99;;;=\203::<\1;;=\203::<\1\265\265\265\377\377\377\377\377" \ + "\377\377\377\3\377\376\377\377\377\377\375\377\376\202\377\377\377\11" \ + "\373\373\363\241\321d\214\306>\213\310=\214\306>\214\305@\213\310=\212" \ + "\306@\217\304>\202\215\307=\14\214\306>\215\305>\214\306>\215\305>\217" \ + "\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377\376\377" \ + "\376\376\376\202\377\377\375\2\374\377\377\377\376\377\360\377\377\377" \ + "\1\376\376\376\202\377\377\377\202\376\376\376\202\377\377\377\6\346" \ + "\346\346;;=99;::<99;;;=\204::<\2;;=\204\204\206\202\377\377\377\1\376" \ + "\376\376\377\377\377\377\251\377\377\377\1__a\203::<\3;;=::<;;=\203:" \ + ":<\4FFF\363\363\363\377\377\377\376\376\376\377\377\377\377\375\377\377" \ + "\377\1\377\377\375\202\377\377\377\32\377\376\377\370\373\364\243\322" \ + "b\214\306>\213\310\77\214\305@\215\305>\215\305@\214\306>\214\305B\212" \ + "\307<\215\307=\214\305B\214\306>\215\306A\212\306@\212\307>\214\306>" \ + "\212\307<\244\317c\370\373\364\377\377\377\377\375\376\377\377\375\376" \ + "\377\377\377\377\377\202\377\376\377\371\377\377\377\4^^`;;=::<;;=\202" \ + "::<\5;;=::<;;=::\6\212\307>\214\306" \ + ">\215\307\77\214\305@\244\317c\367\375\361\377\377\377\377\202\377\377" \ + "\377\3\265\265\267::<;;=\204::<\1;;=\202::<\2;;=\265\265\265\202\377" \ + "\377\377\1\376\376\376\377\377\377\377\246\377\377\377\2\376\376\376" \ + "\234\234\234\202;;=\203::<\1;;=\202::<\3""99;::<\332\332\332\377\377" \ + "\377\377\370\377\377\377\6\376\376\377\377\376\377\375\376\377\376\377" \ + "\377\377\377\375\375\377\376\203\377\377\377\27\377\377\375\372\373\366" \ + "\241\321a\217\304@\212\307<\214\306>\215\305>\215\305@\213\310=\212\306" \ + "@\214\306>\214\305B\215\307\77\215\305>\215\306A\212\307>\214\306>\215" \ + "\307\77\214\306>\242\322b\370\373\362\376\376\377\377\375\376\377\377" \ + "\377\377\5\377\377\377\363\363\365;;=::<;;=\202::<\3;;=::<;;=\202::<" \ + "\3xxz\377\377\377\376\376\376\377\377\377\377\246\377\377\377\3\376\376" \ + "\376\377\377\377SSS\202::<\1;;=\202::<\1;;=\202::<\6;;=SSU\377\377\377" \ + "\376\376\376\377\377\377\376\376\376\202\377\377\377\1\376\376\376\377" \ + "\377\377\377\362\377\377\377\7\377\377\375\375\376\377\376\377\377\376" \ + "\377\375\377\374\377\377\377\375\375\377\376\202\377\377\377\5\372\373" \ + "\366\240\320b\215\307\77\212\306@\215\305>\202\214\305@\20\215\305@\212" \ + "\306@\214\305D\216\306\77\214\306>\215\307\77\214\306>\212\306@\214\306" \ + ">\215\307\77\215\305@\242\320c\370\373\362\377\377\373\377\376\377\377" \ + "\377\375\377\377\377\377\11\377\377\377\376\376\376\204\204\206;;=::" \ + "<99;;;=::<;;=\204::<\3\362\362\362\377\377\377\376\376\376\377\377\377" \ + "\377\246\377\377\377\1\333\333\333\203::<\202;;=\202::<\5<<>99;::<\250" \ + "\250\252\376\376\376\203\377\377\377\1\376\376\376\377\377\377\377\365" \ + "\377\377\377\37\376\377\377\376\377\375\377\375\376\375\377\376\377\377" \ + "\375\377\377\377\377\376\377\370\373\362\241\321a\215\307\77\215\307" \ + "=\214\305@\214\306>\212\307<\214\306>\214\306<\214\306>\216\306\77\215" \ + "\305<\212\307>\213\307A\215\305>\212\307>\215\307\77\214\306>\242\321" \ + "a\373\374\364\377\377\377\376\377\377\376\376\376\376\377\377\377\377" \ + "\377\377\202\377\377\377\1\301\301\301\202::<\1;;=\203::<\1;;=\203::" \ + "<\1\266\266\270\377\377\377\377\250\377\377\377\2\220\220\220;;=\204" \ + "::<\6;;=::<99;;;=::<\346\346\346\205\377\377\377\1\376\376\376\377\377" \ + "\377\377\363\377\377\377\202\377\377\375\3\377\374\377\375\377\376\376" \ + "\377\377\202\377\377\377\25\370\373\364\243\322b\217\304@\212\306@\214" \ + "\305@\215\305>\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>" \ + "\212\307>\212\310\77\214\306>\217\304@\214\306>\214\305@\242\322b\370" \ + "\373\362\377\377\377\202\377\376\377\1\377\377\375\377\377\377\377\204" \ + "\377\377\377\2TTV99;\202::<\1;;=\202::<\6;;=::<;;=__a\377\377\377\376" \ + "\376\376\377\377\377\377\244\377\377\377\3\376\376\376\377\377\377TT" \ + "V\207::<\3;;=99;```\377\377\377\377\373\377\377\377\1\375\377\376\202" \ + "\377\377\375\34\377\377\377\376\376\376\373\373\363\243\322b\211\307" \ + "B\212\307<\215\305>\214\306>\212\307>\214\305@\217\304>\212\307<\214" \ + "\306<\214\306>\215\307\77\213\307A\214\306>\215\305@\215\307\77\212\307" \ + ">\244\317c\370\373\362\377\377\373\376\377\377\377\376\377\375\376\377" \ + "\377\377\375\377\376\377\377\377\377\377\203\377\377\377\3\221\221\221" \ + "::<;;=\202::<\202;;=\203::<\2;;=\345\345\347\377\377\377\377\246\377" \ + "\377\377\4\332\332\332;;=::<;;=\203::<\1;;=\203::<\1\265\265\265\203" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\377\377\377\377\364" \ + "\377\377\377\3\377\376\377\377\377\377\375\377\376\202\377\377\377\11" \ + "\373\373\363\241\321d\214\306>\213\310=\214\306>\214\305@\213\310=\212" \ + "\306@\217\304>\202\215\307=\14\214\306>\215\305>\214\306>\215\305>\217" \ + "\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377\376\377" \ + "\376\376\376\202\377\377\375\2\374\377\377\377\376\377\377\377\377\377" \ + "\202\377\377\377\5\376\376\376\332\332\332;;=::<;;=\202::<\6;;=::<;;" \ + "=99;::<\250\250\252\377\377\377\377\244\377\377\377\6\376\376\376\377" \ + "\377\377\221\221\223::<;;=99;\202::<\3;;=::<;;=\202::<\1\363\363\363" \ + "\377\377\377\377\372\377\377\377\1\377\377\375\202\377\377\377\32\377" \ + "\376\377\370\373\364\243\322b\214\306>\213\310\77\214\305@\215\305>\215" \ + "\305@\214\306>\214\305B\212\307<\215\307=\214\305B\214\306>\215\306A" \ + "\212\306@\212\307>\214\306>\212\307<\244\317c\370\373\364\377\377\377" \ + "\377\375\376\377\377\375\376\377\377\377\377\377\202\377\376\377\377" \ + "\377\377\377\204\377\377\377\2\376\376\376SSU\204::<\204;;=\2::<__a\377" \ + "\377\377\377\243\377\377\377\6\376\376\376\377\377\377\376\376\376TT" \ + "V99;;;=\204::<\4;;=99;<<>xxz\377\377\377\377\364\377\377\377\10\376\376" \ + "\377\377\377\375\377\377\377\377\377\375\377\377\377\377\376\377\377" \ + "\377\375\376\377\377\202\377\377\377\6\370\373\362\243\322b\211\307B" \ + "\213\310=\214\305@\214\306<\202\215\305@\4\214\306<\214\305@\214\306" \ + "<\215\307\77\202\214\306>\6\212\307>\214\306>\215\307\77\214\305@\244" \ + "\317c\367\375\361\377\377\377\377\213\377\377\377\5\376\376\376\377\377" \ + "\377\221\221\223::<;;=\204::<\5;;=::<;;=::<\363\363\363\204\377\377\377" \ + "\1\376\376\376\202\377\377\377\202\376\376\376\377\377\377\377\233\377" \ + "\377\377\5\332\332\332::<;;=99;<<>\202::<\1;;=\203::<\1\265\265\267\377" \ + "\377\377\377\363\377\377\377\6\376\376\377\377\376\377\375\376\377\376" \ + "\377\377\377\377\375\375\377\376\203\377\377\377\27\377\377\375\372\373" \ + "\366\241\321a\217\304@\212\307<\214\306>\215\305>\215\305@\213\310=\212" \ + "\306@\214\306>\214\305B\215\307\77\215\305>\215\306A\212\307>\214\306" \ + ">\215\307\77\214\306>\242\322b\370\373\362\376\376\377\377\375\376\377" \ + "\377\377\377\213\377\377\377\2\375\375\375\333\333\333\202::<\1;;=\202" \ + "::<\1;;=\202::<\3""99;::<\265\265\265\206\377\377\377\3\376\376\376\377" \ + "\377\377\376\376\376\377\377\377\377\233\377\377\377\2\235\235\23599" \ + ";\202;;=\1""99;\202;;=\202::<\3;;=::<\363\363\365\377\377\377\377\363" \ + "\377\377\377\7\377\377\375\375\376\377\376\377\377\376\377\375\377\374" \ + "\377\377\377\375\375\377\376\202\377\377\377\5\372\373\366\240\320b\215" \ + "\307\77\212\306@\215\305>\202\214\305@\20\215\305@\212\306@\214\305D" \ + "\216\306\77\214\306>\215\307\77\214\306>\212\306@\214\306>\215\307\77" \ + "\215\305@\242\320c\370\373\362\377\377\373\377\376\377\377\377\375\377" \ + "\377\377\377\214\377\377\377\2\376\376\376SSU\207::<\3;;=::\212\307<\214\306>\214\306<\214\306>\216\306" \ + "\77\215\305<\212\307>\213\307A\215\305>\212\307>\215\307\77\214\306>" \ + "\242\321a\373\374\364\377\377\377\376\377\377\376\376\376\376\377\377" \ + "\377\377\377\377\212\377\377\377\4\376\376\376\377\377\377\376\376\376" \ + "\222\222\222\205::<\1;;=\20299;\202::<\3\363\363\363\377\377\377\376" \ + "\376\376\377\377\377\377\240\377\377\377\1\346\346\346\202::<\1;;=\204" \ + "::<\1;;=\202::<\1\250\250\252\202\377\377\377\1\376\376\376\377\377\377" \ + "\377\361\377\377\377\202\377\377\375\3\377\374\377\375\377\376\376\377" \ + "\377\202\377\377\377\25\370\373\364\243\322b\217\304@\212\306@\214\305" \ + "@\215\305>\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>\212" \ + "\307>\212\310\77\214\306>\217\304@\214\306>\214\305@\242\322b\370\373" \ + "\362\377\377\377\202\377\376\377\1\377\377\375\377\377\377\377\212\377" \ + "\377\377\1\376\376\376\203\377\377\377\2\332\332\332<<>\203::<\3;;=:" \ + ":<<<>\203::<\2\301\301\303\376\376\376\202\377\377\377\5\376\376\376" \ + "\377\377\377\376\376\376\377\377\377\376\376\376\377\377\377\377\231" \ + "\377\377\377\4\376\376\376\251\251\253::<;;=\204::<\5;;=::<99;::<\346" \ + "\346\346\377\377\377\377\365\377\377\377\1\375\377\376\202\377\377\375" \ + "\34\377\377\377\376\376\376\373\373\363\243\322b\211\307B\212\307<\215" \ + "\305>\214\306>\212\307>\214\305@\217\304>\212\307<\214\306<\214\306>" \ + "\215\307\77\213\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370" \ + "\373\362\377\377\373\376\377\377\377\376\377\375\376\377\377\377\375" \ + "\377\376\377\377\377\377\377\212\377\377\377\1\376\376\376\203\377\377" \ + "\377\1SSS\207::<\3;;=::<\205\205\207\205\377\377\377\1\376\376\376\377" \ + "\377\377\377\234\377\377\377\3wwy::<;;=\206::<\2;;=__a\377\377\377\377" \ + "\365\377\377\377\3\377\376\377\377\377\377\375\377\376\202\377\377\377" \ + "\11\373\373\363\241\321d\214\306>\213\310=\214\306>\214\305@\213\310" \ + "=\212\306@\217\304>\202\215\307=\14\214\306>\215\305>\214\306>\215\305" \ + ">\217\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377\376" \ + "\377\376\376\376\202\377\377\375\2\374\377\377\377\376\377\377\377\377" \ + "\377\211\377\377\377\1\376\376\376\203\377\377\377\3\376\376\376\204" \ + "\204\204::<\202;;=\1::<\202;;=\203::<\1SSU\204\377\377\377\1\376\376" \ + "\376\377\377\377\377\235\377\377\377\1;;=\203::<\1;;=\202::<\1;;=\202" \ + "::<\1\234\234\234\202\377\377\377\1\376\376\376\377\377\377\377\362\377" \ + "\377\377\1\377\377\375\202\377\377\377\32\377\376\377\370\373\364\243" \ + "\322b\214\306>\213\310\77\214\305@\215\305>\215\305@\214\306>\214\305" \ + "B\212\307<\215\307=\214\305B\214\306>\215\306A\212\306@\212\307>\214" \ + "\306>\212\307<\244\317c\370\373\364\377\377\377\377\375\376\377\377\375" \ + "\376\377\377\377\377\377\202\377\376\377\377\377\377\377\212\377\377" \ + "\377\1\376\376\376\204\377\377\377\6\301\301\301;;=::<;;=::<;;=\205:" \ + ":<\1\333\333\333\202\377\377\377\1\376\376\376\377\377\377\377\231\377" \ + "\377\377\1\376\376\376\203\377\377\377\1\301\301\303\204::<\1;;=\202" \ + "::<\1:9>\202::<\1\332\332\332\377\377\377\377\356\377\377\377\10\376" \ + "\376\377\377\377\375\377\377\377\377\377\375\377\377\377\377\376\377" \ + "\377\377\375\376\377\377\202\377\377\377\6\370\373\362\243\322b\211\307" \ + "B\213\310=\214\305@\214\306<\202\215\305@\4\214\306<\214\305@\214\306" \ + "<\215\307\77\202\214\306>\6\212\307>\214\306>\215\307\77\214\305@\244" \ + "\317c\367\375\361\377\377\377\377\230\377\377\377\2""99;;;=\210::<\1" \ + "\250\250\250\377\377\377\377\240\377\377\377\3\221\221\223::<;;=\207" \ + "::<\2SSU\376\376\376\377\377\377\377\355\377\377\377\6\376\376\377\377" \ + "\376\377\375\376\377\376\377\377\377\377\375\375\377\376\203\377\377" \ + "\377\27\377\377\375\372\373\366\241\321a\217\304@\212\307<\214\306>\215" \ + "\305>\215\305@\213\310=\212\306@\214\306>\214\305B\215\307\77\215\305" \ + ">\215\306A\212\307>\214\306>\215\307\77\214\306>\242\322b\370\373\362" \ + "\376\376\377\377\375\376\377\377\377\377\227\377\377\377\1yy{\211::<" \ + "\6lll\376\376\376\377\377\377\376\376\376\377\377\377\376\376\376\377" \ + "\377\377\377\224\377\377\377\202\376\376\376\7\377\377\377\376\376\376" \ + "\377\377\377\376\376\376\377\377\377__a;;=\202::<\4<<>;;=::<;;=\202:" \ + ":<\1\204\204\206\203\377\377\377\1\376\376\376\377\377\377\377\352\377" \ + "\377\377\7\377\377\375\375\376\377\376\377\377\376\377\375\377\374\377" \ + "\377\377\375\375\377\376\202\377\377\377\5\372\373\366\240\320b\215\307" \ + "\77\212\306@\215\305>\202\214\305@\20\215\305@\212\306@\214\305D\216" \ + "\306\77\214\306>\215\307\77\214\306>\212\306@\214\306>\215\307\77\215" \ + "\305@\242\320c\370\373\362\377\377\373\377\376\377\377\377\375\377\377" \ + "\377\377\221\377\377\377\3\376\376\376\377\377\377\376\376\376\203\377" \ + "\377\377\1\265\265\267\212::<\1\363\363\363\377\377\377\377\227\377\377" \ + "\377\1\376\376\376\202\377\377\377\1\376\376\376\203\377\377\377\1\345" \ + "\345\345\202::<\202;;=\1""99;\203::<\4;;=::<\301\301\301\376\376\376" \ + "\203\377\377\377\1\376\376\376\377\377\377\377\352\377\377\377\37\376" \ + "\377\377\376\377\375\377\375\376\375\377\376\377\377\375\377\377\377" \ + "\377\376\377\370\373\362\241\321a\215\307\77\215\307=\214\305@\214\306" \ + ">\212\307<\214\306>\214\306<\214\306>\216\306\77\215\305<\212\307>\213" \ + "\307A\215\305>\212\307>\215\307\77\214\306>\242\321a\373\374\364\377" \ + "\377\377\376\377\377\376\376\376\376\377\377\377\377\377\377\222\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\202\377\377\377\1\347" \ + "\347\347\212::<\1\302\302\304\205\377\377\377\1\376\376\376\377\377\377" \ + "\377\222\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\202" \ + "\377\377\377\5\265\265\265::<;;=99;;;=\203::<\1;;=\202::<\1\363\363\363" \ + "\377\377\377\377\356\377\377\377\202\377\377\375\3\377\374\377\375\377" \ + "\376\376\377\377\202\377\377\377\25\370\373\364\243\322b\217\304@\212" \ + "\306@\214\305@\215\305>\212\307>\212\306@\214\305B\214\305@\214\305B" \ + "\214\306>\212\307>\212\310\77\214\306>\217\304@\214\306>\214\305@\242" \ + "\322b\370\373\362\377\377\377\202\377\376\377\1\377\377\375\377\377\377" \ + "\377\230\377\377\377\2\376\376\376TTT\211::<\3\221\221\223\377\377\377" \ + "\376\376\376\202\377\377\377\1\376\376\376\377\377\377\377\231\377\377" \ + "\377\2\204\204\204::<\202;;=\202::<\1;;=\203::<\2``b\376\376\376\377" \ + "\377\377\377\357\377\377\377\1\375\377\376\202\377\377\375\34\377\377" \ + "\377\376\376\376\373\373\363\243\322b\211\307B\212\307<\215\305>\214" \ + "\306>\212\307>\214\305@\217\304>\212\307<\214\306<\214\306>\215\307\77" \ + "\213\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370\373\362" \ + "\377\377\373\376\377\377\377\376\377\375\376\377\377\377\375\377\376" \ + "\377\377\377\377\377\225\377\377\377\1\376\376\376\202\377\377\377\1" \ + "\221\221\221\210::<\2;;=__a\202\377\377\377\1\376\376\376\377\377\377" \ + "\377\227\377\377\377\1\376\376\376\203\377\377\377\1SSU\202::<\1;;=\204" \ + "::<\202;;=\1\234\234\234\204\377\377\377\1\376\376\376\377\377\377\377" \ + "\352\377\377\377\3\377\376\377\377\377\377\375\377\376\202\377\377\377" \ + "\11\373\373\363\241\321d\214\306>\213\310=\214\306>\214\305@\213\310" \ + "=\212\306@\217\304>\202\215\307=\14\214\306>\215\305>\214\306>\215\305" \ + ">\217\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377\376" \ + "\377\376\376\376\202\377\377\375\2\374\377\377\377\376\377\377\377\377" \ + "\377\222\377\377\377\1\376\376\376\205\377\377\377\1\301\301\301\210" \ + "::<\4""99;;;=\364\364\366\376\376\376\377\377\377\377\233\377\377\377" \ + "\1\346\346\346\207::<\4;;=99;::<\316\316\316\203\377\377\377\1\376\376" \ + "\376\377\377\377\377\353\377\377\377\1\377\377\375\202\377\377\377\32" \ + "\377\376\377\370\373\364\243\322b\214\306>\213\310\77\214\305@\215\305" \ + ">\215\305@\214\306>\214\305B\212\307<\215\307=\214\305B\214\306>\215" \ + "\306A\212\306@\212\307>\214\306>\212\307<\244\317c\370\373\364\377\377" \ + "\377\377\375\376\377\377\375\376\377\377\377\377\377\202\377\376\377" \ + "\377\377\377\377\224\377\377\377\1\376\376\376\204\377\377\377\1\363" \ + "\363\363\210::<\3;;=::<\302\302\304\377\377\377\377\231\377\377\377\1" \ + "\376\376\376\202\377\377\377\1\266\266\270\203::<\203;;=\203::<\1:::" \ + "\377\377\377\377\351\377\377\377\10\376\376\377\377\377\375\377\377\377" \ + "\377\377\375\377\377\377\377\376\377\377\377\375\376\377\377\202\377" \ + "\377\377\6\370\373\362\243\322b\211\307B\213\310=\214\305@\214\306<\202" \ + "\215\305@\4\214\306<\214\305@\214\306<\215\307\77\202\214\306>\6\212" \ + "\307>\214\306>\215\307\77\214\305@\244\317c\367\375\361\377\377\377\377" \ + "\242\377\377\377\3__a::<;;=\207::<\1\221\221\221\377\377\377\377\234" \ + "\377\377\377\1\204\204\206\204::<\202;;=\203::<\1lll\203\377\377\377" \ + "\1\375\375\375\377\377\377\377\344\377\377\377\6\376\376\377\377\376" \ + "\377\375\376\377\376\377\377\377\377\375\375\377\376\203\377\377\377" \ + "\27\377\377\375\372\373\366\241\321a\217\304@\212\307<\214\306>\215\305" \ + ">\215\305@\213\310=\212\306@\214\306>\214\305B\215\307\77\215\305>\215" \ + "\306A\212\307>\214\306>\215\307\77\214\306>\242\322b\370\373\362\376" \ + "\376\377\377\375\376\377\377\377\377\241\377\377\377\2\221\221\223;;" \ + "=\202::<\202;;=\203::<\2;;=^^^\204\377\377\377\1\376\376\376\377\377" \ + "\377\377\224\377\377\377\1\376\376\376\202\377\377\377\1``b\202::<\1" \ + ";;=\206::<\1\234\234\234\205\377\377\377\1\376\376\376\377\377\377\377" \ + "\342\377\377\377\7\377\377\375\375\376\377\376\377\377\376\377\375\377" \ + "\374\377\377\377\375\375\377\376\202\377\377\377\5\372\373\366\240\320" \ + "b\215\307\77\212\306@\215\305>\202\214\305@\20\215\305@\212\306@\214" \ + "\305D\216\306\77\214\306>\215\307\77\214\306>\212\306@\214\306>\215\307" \ + "\77\215\305@\242\320c\370\373\362\377\377\373\377\376\377\377\377\375" \ + "\377\377\377\377\241\377\377\377\6\301\301\303::<;;=::<99;;;=\203::<" \ + "\6;;=:::\377\377\377\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\377\224\377\377\377\1\376\376\376\202\377\377\377\2\363\363\363;;=\211" \ + "::<\1\316\316\316\203\377\377\377\1\376\376\376\202\377\377\377\1\376" \ + "\376\376\377\377\377\377\342\377\377\377\37\376\377\377\376\377\375\377" \ + "\375\376\375\377\376\377\377\375\377\377\377\377\376\377\370\373\362" \ + "\241\321a\215\307\77\215\307=\214\305@\214\306>\212\307<\214\306>\214" \ + "\306<\214\306>\216\306\77\215\305<\212\307>\213\307A\215\305>\212\307" \ + ">\215\307\77\214\306>\242\321a\373\374\364\377\377\377\376\377\377\376" \ + "\376\376\376\377\377\377\377\377\377\241\377\377\377\1\363\363\365\202" \ + "::<\1;;=\202::<\2""99;;;=\202::<\2;;=\316\316\316\377\377\377\377\231" \ + "\377\377\377\10\376\376\376\316\316\316::<;;=::<;;=99;;;=\204::<\202" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\377\377\377\377\344" \ + "\377\377\377\202\377\377\375\3\377\374\377\375\377\376\376\377\377\202" \ + "\377\377\377\25\370\373\364\243\322b\217\304@\212\306@\214\305@\215\305" \ + ">\212\307>\212\306@\214\305B\214\305@\214\305B\214\306>\212\307>\212" \ + "\310\77\214\306>\217\304@\214\306>\214\305@\242\322b\370\373\362\377" \ + "\377\377\202\377\376\377\1\377\377\375\377\377\377\377\243\377\377\377" \ + "\1``b\203::<\203;;=\6::<<<>::<\234\234\234\377\377\377\376\376\376\377" \ + "\377\377\377\230\377\377\377\1\234\234\236\204::<\12;;=99;::<;;=::\214\306>\212\307>\214" \ + "\305@\217\304>\212\307<\214\306<\214\306>\215\307\77\213\307A\214\306" \ + ">\215\305@\215\307\77\212\307>\244\317c\370\373\362\377\377\373\376\377" \ + "\377\377\376\377\375\376\377\377\377\375\377\376\377\377\377\377\377" \ + "\242\377\377\377\2\222\222\222::<\202;;=\7""99;::<;;=::<99;;;=lln\202" \ + "\377\377\377\1\376\376\376\377\377\377\377\225\377\377\377\3\376\376" \ + "\376\377\377\377jjl\204;;=\2""99;;;=\202::<\2;;=\221\221\223\202\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\377\377\377\377" \ + "\343\377\377\377\3\377\376\377\377\377\377\375\377\376\202\377\377\377" \ + "\11\373\373\363\241\321d\214\306>\213\310=\214\306>\214\305@\213\310" \ + "=\212\306@\217\304>\202\215\307=\14\214\306>\215\305>\214\306>\215\305" \ + ">\217\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377\376" \ + "\377\376\376\376\202\377\377\375\2\374\377\377\377\376\377\377\377\377" \ + "\377\242\377\377\377\2\264\264\264;;=\206::<\6;;=::\213\310\77\214\305@\215\305>\215\305@\214\306" \ + ">\214\305B\212\307<\215\307=\214\305B\214\306>\215\306A\212\306@\212" \ + "\307>\214\306>\212\307<\244\317c\370\373\364\377\377\377\377\375\376" \ + "\377\377\375\376\377\377\377\377\377\202\377\376\377\377\377\377\377" \ + "\243\377\377\377\2\346\346\346;;=\211::<\1\346\346\350\377\377\377\377" \ + "\230\377\377\377\3\346\346\350::<;;=\202::<\1;;=\205::<\1\346\346\346" \ + "\302\377\377\377\5\376\376\376\377\377\377\376\376\376\377\377\377\376" \ + "\376\376\377\377\377\377\233\377\377\377\10\376\376\377\377\377\375\377" \ + "\377\377\377\377\375\377\377\377\377\376\377\377\377\375\376\377\377" \ + "\202\377\377\377\6\370\373\362\243\322b\211\307B\213\310=\214\305@\214" \ + "\306<\202\215\305@\4\214\306<\214\305@\214\306<\215\307\77\202\214\306" \ + ">\6\212\307>\214\306>\215\307\77\214\305@\244\317c\367\375\361\345\377" \ + "\377\377\1\376\376\376\305\377\377\377\3FFF::<;;=\202::<\3;;=::<;;=\202" \ + "::<\1\301\301\303\377\377\377\377\230\377\377\377\4\301\301\30399;::" \ + "<;;=\204::<\3;;=::\215\305>\215\305@\213\310=\212\306@\214\306>" \ + "\214\305B\215\307\77\215\305>\215\306A\212\307>\214\306>\215\307\77\214" \ + "\306>\242\322b\370\373\362\376\376\377\377\375\376\341\377\377\377\5" \ + "\376\376\376\377\377\377\376\376\376\377\377\377\376\376\376\265\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\212\377\377\377\3\376" \ + "\376\376\377\377\377lll\206::<\202;;=\2::<\234\234\236\377\377\377\377" \ + "\224\377\377\377\1\376\376\376\203\377\377\377\2\233\233\235;;=\203:" \ + ":<\2""99;;;=\202::<\2;;=xxz\213\377\377\377\1\376\376\376\265\377\377" \ + "\377\1\376\376\376\377\377\377\377\240\377\377\377\7\377\377\375\375" \ + "\376\377\376\377\377\376\377\375\377\374\377\377\377\375\375\377\376" \ + "\202\377\377\377\5\372\373\366\240\320b\215\307\77\212\306@\215\305>" \ + "\202\214\305@\20\215\305@\212\306@\214\305D\216\306\77\214\306>\215\307" \ + "\77\214\306>\212\306@\214\306>\215\307\77\215\305@\242\320c\370\373\362" \ + "\377\377\373\377\376\377\377\377\375\377\377\377\377\233\377\377\377" \ + "\3\376\376\376\377\377\377\376\376\376\213\377\377\377\6\376\376\376" \ + "\377\377\377\233\233\233;;=::<;;=\206::<\1lln\377\377\377\377\226\377" \ + "\377\377\3\376\376\376\377\377\377kkm\210::<\2;;=\234\234\236\214\377" \ + "\377\377\1\315\315\315\202\234\234\234\262\234\234\236\2\234\234\234" \ + "\265\265\265\377\377\377\377\240\377\377\377\37\376\377\377\376\377\375" \ + "\377\375\376\375\377\376\377\377\375\377\377\377\377\376\377\370\373" \ + "\362\241\321a\215\307\77\215\307=\214\305@\214\306>\212\307<\214\306" \ + ">\214\306<\214\306>\216\306\77\215\305<\212\307>\213\307A\215\305>\212" \ + "\307>\215\307\77\214\306>\242\321a\373\374\364\377\377\377\376\377\377" \ + "\376\376\376\376\377\377\344\377\377\377\4\376\376\376\347\347\347\234" \ + "\234\234\235\235\235\260\234\234\236\204\234\234\234\216\377\377\377" \ + "\1\301\301\301\202::<\1;;=\203::<\202;;=\2::\212\307>\212\306@\214\305B" \ + "\214\305@\214\305B\214\306>\212\307>\212\310\77\214\306>\217\304@\214" \ + "\306>\214\305@\242\322b\370\373\362\377\377\377\202\377\376\377\1\377" \ + "\377\375\346\377\377\377\2\316\316\316:::\263::<\4;;=:::\377\377\377" \ + "\376\376\376\214\377\377\377\3\346\346\346::<;;=\205::<\4;;=::<;;=\346" \ + "\346\346\377\377\377\377\226\377\377\377\2\362\362\362;;=\204::<\3""9" \ + "9;::<;;=\202::<\1\346\346\350\214\377\377\377\2\234\234\234;;=\264::" \ + "<\1kkm\377\377\377\377\240\377\377\377\1\375\377\376\202\377\377\375" \ + "\34\377\377\377\376\376\376\373\373\363\243\322b\211\307B\212\307<\215" \ + "\305>\214\306>\212\307>\214\305@\217\304>\212\307<\214\306<\214\306>" \ + "\215\307\77\213\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370" \ + "\373\362\377\377\373\376\377\377\377\376\377\375\376\377\377\377\375" \ + "\377\376\377\345\377\377\377\2\316\316\31699;\265::<\216\377\377\377" \ + "\2\376\376\376FFH\203::<\1;;=\203::<\3;;=99;\316\316\316\377\377\377" \ + "\377\226\377\377\377\1\317\317\317\206::<\202;;=\4""99;FFH\377\377\377" \ + "\376\376\376\213\377\377\377\1\234\234\236\202::<\1;;=\261::<\2;;=kk" \ + "m\205\377\377\377\1\376\376\376\377\377\377\377\231\377\377\377\3\377" \ + "\376\377\377\377\377\375\377\376\202\377\377\377\11\373\373\363\241\321" \ + "d\214\306>\213\310=\214\306>\214\305@\213\310=\212\306@\217\304>\202" \ + "\215\307=\14\214\306>\215\305>\214\306>\215\305>\217\304@\215\307\77" \ + "\215\307=\242\320c\367\375\361\376\376\377\377\376\377\376\376\376\202" \ + "\377\377\375\2\374\377\377\377\376\377\345\377\377\377\1\316\316\316" \ + "\264::<\202;;=\215\377\377\377\4\376\376\376\377\377\377lln99;\210::" \ + "<\2\234\234\234\376\376\376\377\377\377\377\225\377\377\377\5\234\234" \ + "\234::<;;=99;::<\202;;=\5::<;;=::\261::<\1kkm\377\377\377\377\237\377\377\377\1\377" \ + "\377\375\202\377\377\377\32\377\376\377\370\373\364\243\322b\214\306" \ + ">\213\310\77\214\305@\215\305>\215\305@\214\306>\214\305B\212\307<\215" \ + "\307=\214\305B\214\306>\215\306A\212\306@\212\307>\214\306>\212\307<" \ + "\244\317c\370\373\364\377\377\377\377\375\376\377\377\375\376\377\377" \ + "\377\377\377\202\377\376\377\346\377\377\377\1\316\316\316\266::<\217" \ + "\377\377\377\2\234\234\236;;=\206::<\3""99;;;=www\377\377\377\377\226" \ + "\377\377\377\3\204\204\206::<;;=\207::<\3\222\222\222\377\377\377\376" \ + "\376\376\213\377\377\377\1\234\234\236\265::<\1kkm\377\377\377\377\210" \ + "\377\377\377\7\376\376\376\377\377\377\377\377\375\376\377\375\376\377" \ + "\377\377\377\377\377\376\377\203\377\377\377\1\376\376\376\203\377\377" \ + "\377\1\376\377\377\203\377\377\377\16\377\377\375\377\377\377\377\376" \ + "\377\377\377\377\377\377\373\376\377\377\377\377\377\377\377\373\371" \ + "\372\364\242\322d\214\306<\215\307\77\214\305@\214\306<\202\215\305@" \ + "\4\214\306<\214\305@\214\306<\215\307\77\202\214\306>\6\212\307>\214" \ + "\306>\215\307\77\214\305@\244\317c\367\375\361\356\377\377\377\1\316" \ + "\316\316\266::<\214\377\377\377\1\376\376\376\202\377\377\377\1\266\266" \ + "\266\202::<\1;;=\203::<\1;;=\202::<\3__a\377\377\377\376\376\376\377" \ + "\377\377\377\224\377\377\377\2kkm;;=\202::<\202;;=\202::<\3;;=::<\265" \ + "\265\265\215\377\377\377\1\234\234\236\265::<\1kkm\377\377\377\377\214" \ + "\377\377\377\2\376\377\377\376\377\375\202\377\377\375\203\377\377\377" \ + "\204\377\377\375\205\377\377\377\1\376\376\377\202\377\377\377\6\377" \ + "\377\375\377\377\377\371\372\362\242\320c\214\305@\215\305@\202\214\306" \ + ">\20\215\305@\213\310=\212\306@\214\306>\214\305B\215\307\77\215\305" \ + ">\215\306A\212\307>\214\306>\215\307\77\214\306>\242\322b\370\373\362" \ + "\376\376\377\377\375\376\355\377\377\377\1\316\316\316\266::<\215\377" \ + "\377\377\4\376\376\376\377\377\377\315\315\315;;=\203::<\1;;=\203::<" \ + "\2;;=99;\377\377\377\377\226\377\377\377\203::<\1;;=\202::<\1;;=\203" \ + "::<\2\317\317\317\376\376\376\214\377\377\377\1\234\234\236\265::<\1" \ + "kkm\377\377\377\377\211\377\377\377\3\376\376\376\377\376\377\377\377" \ + "\377\203\377\376\377\204\377\377\377\1\376\376\376\202\377\377\377\1" \ + "\377\376\377\203\377\377\377\1\376\376\376\203\377\377\377\31\376\376" \ + "\377\377\376\377\371\372\365\241\322e\212\307<\216\306\77\212\311<\216" \ + "\303\77\212\307>\215\305@\212\306@\214\305D\216\306\77\214\306>\215\307" \ + "\77\214\306>\212\306@\214\306>\215\307\77\215\305@\242\320c\370\373\362" \ + "\377\377\373\377\376\377\377\377\375\355\377\377\377\1\316\316\316\266" \ + "::<\220\377\377\377\202::<\4;;=::<;;=::<\202;;=\3""99;;;=\346\346\346" \ + "\377\377\377\377\224\377\377\377\2\362\362\362;;=\202::<\7""99;::<;;" \ + "=88:;;=::<;;=\216\377\377\377\1\234\234\236\265::<\1kkm\377\377\377\377" \ + "\212\377\377\377\202\376\377\377\202\377\377\377\1\377\376\377\206\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\203\377\377\377" \ + "\1\376\376\376\202\377\377\377\6\370\373\364\242\322b\214\306>\214\305" \ + "@\215\305>\214\305@\202\215\306A\20\214\306<\214\306>\216\306\77\215" \ + "\305<\212\307>\213\307A\215\305>\212\307>\215\307\77\214\306>\242\321" \ + "a\373\374\364\377\377\377\376\377\377\376\376\376\376\377\377\355\377" \ + "\377\377\1\316\316\316\266::<\216\377\377\377\6\376\376\376\377\377\377" \ + "SSU;;=99;;;=\206::<\1\316\316\316\377\377\377\377\224\377\377\377\2\316" \ + "\316\31699;\205::<\1;;=\202::<\1FFH\216\377\377\377\1\234\234\236\265" \ + "::<\1kkm\377\377\377\377\207\377\377\377\202\377\376\377\2\377\377\377" \ + "\377\377\375\203\377\377\377\1\376\377\375\202\377\377\375\203\377\377" \ + "\377\202\377\377\375\2\377\377\377\377\377\375\205\377\377\377\26\377" \ + "\377\375\371\372\362\243\322b\211\305A\215\305>\215\307\77\214\305@\214" \ + "\306>\215\305@\212\307>\214\305@\214\305B\214\306>\212\307>\212\310\77" \ + "\214\306>\217\304@\214\306>\214\305@\242\322b\370\373\362\377\377\377" \ + "\202\377\376\377\1\377\377\375\356\377\377\377\1\316\316\316\266::<\220" \ + "\377\377\377\3kkm::<;;=\202::<\6;;=::<;;=::<;;=\233\233\233\377\377\377" \ + "\377\223\377\377\377\2\376\376\376\265\265\265\205::<\1;;=\202::<\2""9" \ + "9;lln\216\377\377\377\1\234\234\236\265::<\1kkm\377\377\377\377\207\377" \ + "\377\377\3\376\377\375\375\377\376\377\377\377\202\377\376\377\3\377" \ + "\376\374\377\377\377\376\377\377\202\377\377\377\1\377\377\375\204\377" \ + "\377\377\2\375\377\376\377\377\375\202\377\377\377\1\377\377\375\202" \ + "\377\377\377\32\376\376\374\365\367\354\223\312K\215\305>\214\306<\211" \ + "\305\77\214\306>\212\307>\215\307\77\214\306>\214\306<\214\306>\215\307" \ + "\77\213\307A\214\306>\215\305@\215\307\77\212\307>\244\317c\370\373\362" \ + "\377\377\373\376\377\377\377\376\377\375\376\377\377\377\375\377\376" \ + "\377\355\377\377\377\1\316\316\316\266::<\217\377\377\377\5\376\376\376" \ + "\234\234\236;;=::<;;=\202::<\2""99;::<\202;;=\1\221\221\221\377\377\377" \ + "\377\224\377\377\377\1\235\235\235\211::<\2\221\221\223\376\376\376\215" \ + "\377\377\377\1\234\234\236\265::<\1kkm\377\377\377\377\207\377\377\377" \ + "\1\377\376\377\202\377\377\375\202\377\377\377\202\377\377\375\1\377" \ + "\377\377\202\376\377\377\1\377\377\377\202\377\377\375\5\376\376\377" \ + "\377\377\377\377\377\373\377\377\377\376\376\376\203\377\377\377\27\376" \ + "\376\376\377\377\375\376\377\372\347\365\333\225\311K\217\304>\214\305" \ + "B\215\307\77\212\306B\214\306>\215\306A\214\306>\215\305>\214\306>\215" \ + "\305>\217\304@\215\307\77\215\307=\242\320c\367\375\361\376\376\377\377" \ + "\376\377\376\376\376\202\377\377\375\2\374\377\377\377\376\377\355\377" \ + "\377\377\1\316\316\316\266::<\214\377\377\377\1\376\376\376\203\377\377" \ + "\377\3\250\250\252::<;;=\203::<\202;;=\202::<\1kkk\377\377\377\377\224" \ + "\377\377\377\4www;;=::<;;=\202::<\202;;=\202::<\1\234\234\236\216\377" \ + "\377\377\1\234\234\236\265::<\1kkm\377\377\377\377\207\377\377\377\15" \ + "\367\374\365\343\361\316\316\346\254\305\342\240\304\343\240\303\342" \ + "\236\305\342\237\312\346\251\345\356\317\365\373\357\376\377\377\376" \ + "\376\377\377\377\375\214\377\377\377\24\350\365\333\223\312K\216\306" \ + "\77\212\307>\215\304B\214\306>\215\307=\214\306>\215\306A\212\306@\212" \ + "\307>\214\306>\212\307<\244\317c\370\373\364\377\377\377\377\375\376" \ + "\377\377\375\376\377\377\377\377\377\202\377\376\377\356\377\377\377" \ + "\1\316\316\316\266::<\217\377\377\377\2\376\376\376\316\316\320\207:" \ + ":<\3;;=::\10\212\306@\212\307>\232\315W\277\337\224" \ + "\352\364\333\377\377\377\377\376\377\377\377\375\202\376\377\377\202" \ + "\377\377\377\2\377\376\377\377\377\375\202\377\377\377\17\377\377\375" \ + "\377\376\377\347\365\333\226\312L\215\306A\213\310=\212\306@\217\304" \ + ">\216\307<\214\305@\215\305<\214\305@\215\307=\244\317c\366\373\364\377" \ + "\377\377\377\276\377\377\377\6\346\346\346;;=99;;;=::<;;=\205::<\377" \ + "\377\377\377\224\377\377\377\1::<\202;;=\2::<;;=\203::<\4;;=::<\316\316" \ + "\316\376\376\376\377\377\377\377\274\377\377\377\14\377\375\377\377\377" \ + "\377\376\376\374\377\377\375\377\376\377\377\377\375\376\377\377\377" \ + "\377\377\376\377\377\377\376\377\324\353\265\231\316Z\202\214\306<\1" \ + "\215\305>\210\214\306>\202\215\305>\16\214\306>\213\307A\211\306;\233" \ + "\314V\324\353\265\377\377\377\377\376\377\377\377\375\375\377\376\376" \ + "\377\377\377\377\377\377\376\377\376\377\377\377\377\373\202\377\377" \ + "\377\6\376\376\377\350\365\333\222\312K\215\306A\217\304>\212\306@\202" \ + "\214\305@\6\213\310\77\212\307>\242\322d\370\373\364\377\377\377\377" \ + "\377\375\377\377\377\377\276\377\377\377\203::<\3;;=::<99;\202;;=\202" \ + "::<\1\346\346\350\377\377\377\377\222\377\377\377\2\376\376\376;;=\202" \ + "::<\202;;=\205::<\377\377\377\377\275\377\377\377\4\377\377\375\377\377" \ + "\377\377\377\373\377\376\374\202\376\377\377\12\377\377\375\377\377\377" \ + "\376\377\375\342\360\317\232\315V\214\306<\220\306=\215\306A\215\306" \ + "C\215\306A\210\214\306>\202\215\307\77\7\215\306A\214\306>\214\305@\213" \ + "\307A\214\305@\230\315W\341\361\315\203\377\377\377\2\376\376\374\374" \ + "\377\375\202\377\377\377\2\377\377\375\377\376\377\202\377\377\377\13" \ + "\352\364\331\221\311J\215\306A\213\310=\216\306\77\214\305@\214\306<" \ + "\242\322e\370\373\364\376\376\377\377\377\375\377\377\377\377\277\377" \ + "\377\377\1``b\202::<\2;;=99;\202;;=\4::<;;=::<\316\316\320\377\377\377" \ + "\377\222\377\377\377\4\316\316\316;;=::<99;\202::<\2;;=::<\202;;=\3:" \ + ":<\376\376\376\377\377\377\202\376\376\376\377\377\377\377\271\377\377" \ + "\377\17\376\377\377\376\376\374\377\376\374\376\377\377\377\377\377\377" \ + "\377\375\376\377\377\370\373\364\277\336\222\215\305<\214\305@\215\307" \ + "\77\212\307>\215\307\77\213\307A\211\214\306>\16\216\306A\214\305B\213" \ + "\307A\214\306>\215\305<\213\305=\215\306A\214\306<\215\305>\300\337\223" \ + "\370\373\362\376\376\377\377\377\375\376\377\377\204\377\377\377\16\377" \ + "\376\377\376\376\377\376\377\377\352\364\331\222\312K\215\306A\214\306" \ + "<\214\305@\243\321d\371\373\360\376\376\377\376\377\377\377\377\377\376" \ + "\377\377\377\377\377\377\273\377\377\377\4\376\376\376\377\377\377\376" \ + "\376\376lln\203::<\1;;=\20299;\1;;=\202::<\1\266\266\270\377\377\377" \ + "\377\222\377\377\377\5\316\316\316::<;;=::<;;=\205::<\3kkm\377\377\377" \ + "\376\376\376\377\377\377\377\274\377\377\377\14\377\377\375\376\377\377" \ + "\377\377\377\377\377\375\376\376\376\367\374\365\244\317c\214\305@\215" \ + "\307=\211\306=\213\307A\215\306A\202\212\306@\1\213\310<\210\214\306" \ + ">\202\212\307>\3\212\307<\214\306>\216\306\77\202\214\306>\12\215\305" \ + "<\215\307\77\212\306@\242\322b\371\374\365\377\377\375\376\376\374\376" \ + "\377\377\377\376\377\376\377\377\202\377\377\377\13\376\377\375\376\376" \ + "\377\377\377\377\350\365\333\225\311K\214\305B\242\320c\371\374\361\377" \ + "\377\377\376\377\377\377\376\377\377\377\377\377\300\377\377\377\7\221" \ + "\221\223::<99;::<;;=::<;;=\203::<\1\234\234\236\377\377\377\377\222\377" \ + "\377\377\2\250\250\25099;\206::<\3;;=::\216\306" \ + "\77\215\305>\215\305@\210\214\306>\37\215\305@\215\307\77\212\306@\215" \ + "\307\77\214\304\77\215\306A\212\307;\212\306@\214\306>\216\307B\214\306" \ + ">\222\312K\354\364\334\377\376\377\377\377\377\377\377\373\376\377\377" \ + "\377\375\376\376\377\375\377\377\377\377\376\377\377\377\377\376\376" \ + "\377\347\365\333\260\327z\371\374\363\375\377\376\376\377\377\377\376" \ + "\377\377\377\377\377\377\375\377\377\377\377\276\377\377\377\3\376\376" \ + "\376\234\234\23699;\203;;=\205::<\1\221\221\223\377\377\377\377\222\377" \ + "\377\377\2\234\234\234;;=\204::<\202;;=\3::<;;=\235\235\237\377\377\377" \ + "\377\276\377\377\377\202\377\377\375\15\376\377\377\367\374\365\223\312" \ + "K\214\306>\213\310\77\215\305@\214\306<\215\307=\214\305@\213\307A\211" \ + "\305\77\215\307\77\215\305>\210\214\306>\20\215\306A\213\305=\215\307" \ + "=\214\305@\215\306A\214\306>\213\304A\220\305\77\216\306\77\212\306@" \ + "\215\305@\213\307A\221\311L\367\375\363\376\377\377\377\377\377\202\377" \ + "\377\373\1\377\375\376\202\377\377\377\4\377\376\377\376\377\377\377" \ + "\376\377\376\377\377\203\377\377\377\3\377\376\377\376\376\377\374\377" \ + "\375\377\377\377\377\277\377\377\377\2\265\265\267<<>\20299;\7::<;;=" \ + "::<99;;;=::\214\305" \ + "@\210\214\306>\22\216\306A\215\307\77\213\305=\216\306\77\214\306>\212" \ + "\307>\213\310\77\214\305@\215\306C\214\306<\215\307=\215\305>\213\310" \ + "=\242\320d\372\372\362\376\377\375\377\375\377\377\377\375\202\376\377" \ + "\377\5\377\377\377\377\377\375\377\377\377\377\377\375\377\377\377\202" \ + "\377\376\377\5\376\377\375\376\377\377\377\377\377\377\375\376\377\377" \ + "\375\377\377\377\377\274\377\377\377\5\376\376\376\377\377\377\316\316" \ + "\320::<;;=\202::<\1;;=\202::<\3""99;::\214" \ + "\306<\214\306>\211\307>\231\214\306>\1\216\306\77\203\214\306>\2\214" \ + "\305@\266\334\207\202\377\377\377\7\377\376\377\377\377\377\377\376\377" \ + "\377\377\375\377\377\377\377\377\375\376\377\377\377\377\377\377\303" \ + "\377\377\377\1\376\376\376\202\377\377\377\1\316\316\316\206::<\6;;=" \ + "::<;;=FFH\377\377\377\376\376\376\205\377\377\377\1\376\376\376\377\377" \ + "\377\377\212\377\377\377\1lln\202::<\3;;=99;;;=\204::<\3\317\317\317" \ + "\377\377\377\376\376\376\377\377\377\377\273\377\377\377\10\377\375\377" \ + "\374\377\375\343\361\320\214\306>\215\306A\214\304=\212\307>\215\305" \ + ">\230\214\306>\20\214\306<\213\304\77\212\307>\212\306B\214\306<\212" \ + "\307>\220\304>\337\363\316\377\376\377\377\377\377\376\377\377\377\377" \ + "\377\376\376\377\377\377\377\376\376\376\376\377\377\377\377\377\377" \ + "\302\377\377\377\1\376\376\376\202\377\377\377\2\376\376\376\377\377" \ + "\377\204::<\1;;=\202::<\3;;=99;;;=\203\377\377\377\1\376\376\376\202" \ + "\377\377\377\1\376\376\376\377\377\377\377\213\377\377\377\2SSU;;=\202" \ + "::<\2;;=99;\204::<\1\315\315\315\203\377\377\377\1\376\376\376\377\377" \ + "\377\377\271\377\377\377\10\376\376\376\377\377\377\233\316W\214\305" \ + "@\212\306@\216\306=\214\305@\215\305@\230\214\306>\17\214\306<\215\306" \ + "C\211\306=\213\307A\214\304\77\212\306@\214\305B\234\313W\376\377\375" \ + "\377\377\377\376\377\375\377\377\375\376\377\377\376\376\377\376\377" \ + "\375\377\377\377\377\302\377\377\377\1\376\376\376\202\377\377\377\4" \ + "\376\376\376\377\377\377\376\376\376;;=\206::<\202;;=\3::<\377\377\377" \ + "\376\376\376\203\377\377\377\3\376\376\376\377\377\377\376\376\376\377" \ + "\377\377\377\212\377\377\377\3::<99;;;=\202::<\10;;=::<;;=99;;;=\363" \ + "\363\363\377\377\377\376\376\376\377\377\377\377\274\377\377\377\7\323" \ + "\354\265\214\305@\215\307\77\215\306A\216\305C\213\304\77\212\307<\230" \ + "\214\306>\20\215\307\77\215\304B\214\305@\214\306>\215\305>\215\307=" \ + "\212\307<\215\307\77\323\351\270\377\376\377\377\377\377\376\376\376" \ + "\376\377\375\376\376\376\376\377\377\377\376\374\377\377\377\377\302" \ + "\377\377\377\202\376\376\376\202\377\377\377\2\376\376\376FFH\210::<" \ + "\2;;=\316\316\316\202\377\377\377\1\376\376\376\377\377\377\377\215\377" \ + "\377\377\1\376\376\376\202;;=\4""99;;;=::<;;=\202::<\2;;=::<\377\377" \ + "\377\377\277\377\377\377\7\231\316X\220\304>\214\305@\215\307\77\214" \ + "\306<\214\311>\214\305@\231\214\306>\11\215\304B\214\306>\215\306A\214" \ + "\306<\215\306A\214\305B\215\307\77\234\315X\375\377\374\204\377\377\377" \ + "\2\376\377\377\377\376\377\377\377\377\377\304\377\377\377\202\376\376" \ + "\376\4\377\377\377jjl::<99;\202;;=\205::<\7\316\316\316\377\377\377\376" \ + "\376\376\377\377\377\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\377\212\377\377\377\6\363\363\363::<99;;;=::<;;=\202::<\1;;=\202::<" \ + "\377\377\377\377\276\377\377\377\2\342\361\320\214\306<\202\215\305>" \ + "\4\212\307>\215\307=\211\306=\215\305>\230\214\306>\2\213\310=\214\306" \ + "<\202\214\305@\7\215\306A\214\306>\215\307=\214\304\77\211\310<\343\362" \ + "\321\377\377\375\202\377\376\377\2\377\377\375\376\376\376\377\377\377" \ + "\377\310\377\377\377\4kkm::<;;=::<\202;;=\202::<\3;;=::<\316\316\316" \ + "\202\377\377\377\1\376\376\376\377\377\377\377\215\377\377\377\3\316" \ + "\316\316::<;;=\202::<\1;;=\204::<\1__a\202\377\377\377\3\376\376\376" \ + "\377\377\377\376\376\376\377\377\377\377\271\377\377\377\4\270\333\207" \ + "\214\306>\214\305@\214\306>\203\214\305@\1\215\305>\230\214\306>\17\215" \ + "\306A\213\310=\212\307<\214\306>\214\306<\215\306A\214\306>\214\305@" \ + "\213\306E\267\332\206\377\377\375\376\377\377\377\377\375\377\377\377" \ + "\377\377\375\377\377\377\377\303\377\377\377\1\376\376\376\204\377\377" \ + "\377\6lln;;=::<99;::<;;=\204::<\1\250\250\250\204\377\377\377\1\376\376" \ + "\376\377\377\377\377\213\377\377\377\1\316\316\316\203::<\1;;=\205::" \ + "<\1lln\203\377\377\377\1\376\376\376\377\377\377\377\272\377\377\377" \ + "\10\232\315V\215\305@\212\306@\215\305>\214\306<\215\304D\215\305<\212" \ + "\306@\230\214\306>\3\217\304@\214\306<\215\306A\202\215\305@\7\214\306" \ + ">\214\305@\212\307>\215\305<\233\316W\376\376\377\376\377\375\203\377" \ + "\377\377\1\376\377\377\377\377\377\377\305\377\377\377\3\376\376\376" \ + "\377\377\377\234\234\236\203::<\2;;=99;\204::<\1\234\234\234\202\377" \ + "\377\377\1\376\376\376\377\377\377\377\215\377\377\377\5\316\316\320" \ + "::<;;=::<;;=\202::<\1;;=\202::<\1kkm\377\377\377\377\266\377\377\377" \ + "\10\375\377\374\376\377\377\376\376\376\377\377\375\377\377\377\376\377" \ + "\377\377\377\375\360\371\350\250\214\306>\4\214\305@\212\307>\360\371" \ + "\346\376\377\375\202\377\377\377\1\377\377\375\377\377\377\377\304\377" \ + "\377\377\1\376\376\376\203\377\377\377\1\234\234\234\211::<\1\234\234" \ + "\234\205\377\377\377\1\376\376\376\377\377\377\377\212\377\377\377\4" \ + "\316\316\320llnkkmlln\203kkm\1jjl\202kkm\1\221\221\223\377\377\377\377" \ + "\270\377\377\377\1\377\376\377\202\377\377\377\3\375\376\377\377\377" \ + "\375\341\361\315\251\214\306>\2\215\307\77\342\360\314\377\377\377\377" \ + "\310\377\377\377\202\376\376\376\202\377\377\377\2\266\266\266kkk\210" \ + "kkm\1\265\265\265\206\377\377\377\1\376\376\376\377\377\377\377\211\377" \ + "\377\377\1\376\376\376\203\377\377\377\3\376\376\376\377\377\377\376" \ + "\376\376\202\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376" \ + "\377\377\377\377\264\377\377\377\1\377\376\377\205\377\377\377\2\375" \ + "\377\374\310\340\246\252\214\306>\1\310\340\246\377\377\377\377\307\377" \ + "\377\377\1\376\376\376\202\377\377\377\3\375\375\375\377\377\377\376" \ + "\376\376\211\377\377\377\7\376\376\376\377\377\377\376\376\376\377\377" \ + "\377\376\376\376\377\377\377\376\376\376\377\377\377\377\213\377\377" \ + "\377\1\376\376\376\204\377\377\377\1\376\376\376\206\377\377\377\1\376" \ + "\376\376\377\377\377\377\263\377\377\377\1\377\376\377\204\377\377\377" \ + "\3\376\376\377\376\377\375\304\342\234\251\214\306>\7\215\305@\305\343" \ + "\235\376\376\377\377\377\377\376\376\377\377\376\377\377\377\375\377" \ + "\377\377\377\306\377\377\377\1\376\376\376\217\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\377\377\377\377\214\377\377\377\5\376\376" \ + "\376\377\377\377\376\376\376\377\377\377\376\376\376\203\377\377\377" \ + "\1\376\376\376\377\377\377\377\267\377\377\377\1\377\377\375\202\377" \ + "\377\377\3\377\376\377\376\377\375\305\342\237\251\214\306>\3\215\305" \ + "@\303\344\235\376\376\376\202\377\377\377\1\377\376\377\377\377\377\377" \ + "\305\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\214\377" \ + "\377\377\1\376\376\376\377\377\377\377\216\377\377\377\1\376\376\376" \ + "\203\377\377\377\1\376\376\376\206\377\377\377\1\376\376\376\377\377" \ + "\377\377\266\377\377\377\5\376\377\377\376\376\377\377\376\377\377\377" \ + "\377\305\342\242\251\214\306>\4\215\306A\302\341\236\377\377\375\376" \ + "\376\376\377\377\377\377\305\377\377\377\1\376\376\376\203\377\377\377" \ + "\1\376\376\376\214\377\377\377\1\376\376\376\377\377\377\377\231\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\377\377\377\377\264\377" \ + "\377\377\2\376\376\376\377\376\377\202\376\377\377\202\377\377\377\1" \ + "\305\342\240\251\214\306>\7\214\305@\306\343\240\377\376\374\377\377" \ + "\377\376\377\377\377\377\377\376\376\376\377\377\377\377\325\377\377" \ + "\377\1\376\376\376\377\377\377\377\222\377\377\377\1\376\376\376\205" \ + "\377\377\377\1\376\376\376\377\377\377\377\265\377\377\377\4\377\377" \ + "\375\377\376\377\375\377\376\376\377\375\202\377\377\377\1\305\343\235" \ + "\251\214\306>\4\213\310\77\306\341\234\377\376\377\377\377\377\202\376" \ + "\377\375\377\377\377\377\311\377\377\377\1\377\377\375\215\377\377\377" \ + "\1\376\376\376\377\377\377\377\377\377\377\377\314\377\377\377\3\377" \ + "\377\375\377\377\377\376\377\375\203\377\377\377\11\376\377\377\345\360" \ + "\320\214\305@\214\306>\214\305@\214\304\77\214\306<\215\305>\212\307" \ + ">\231\214\306>\1\214\305@\202\215\307\77\205\214\306>\5\212\307>\214" \ + "\306>\342\360\315\377\377\377\376\376\376\202\377\377\377\1\377\377\375" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\244" \ + "\377\377\377\3\377\376\377\377\377\377\376\377\375\203\377\377\377\11" \ + "\376\377\377\362\371\347\214\306>\214\305B\215\310<\215\306A\214\305" \ + "@\215\307\77\214\305@\231\214\306>\4\215\307\77\213\305=\214\306>\215" \ + "\307\77\202\214\306>\5\215\307\77\214\306>\216\306\77\215\306A\360\367" \ + "\345\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\251\377\377\377\2\377\376\377\377\377\375\203\377\377\377\13\377\377" \ + "\375\377\377\377\375\377\374\233\316W\214\305@\213\304\77\212\306@\215" \ + "\307\77\214\305@\215\306A\214\305@\230\214\306>\3\215\307\77\214\306" \ + ">\215\306A\203\214\305@\7\215\306A\214\305@\215\304B\232\315T\377\377" \ + "\375\376\377\377\377\377\375\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\250\377\377\377\1\377\377\375\205\377\377\377" \ + "\11\377\376\377\267\333\204\213\307A\213\307C\215\307\77\213\304\77\215" \ + "\307\77\215\305<\212\306@\231\214\306>\1\215\307\77\203\214\305@\202" \ + "\214\306>\7\215\307\77\212\306@\267\333\204\377\376\377\376\377\377\377" \ + "\377\375\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\247\377\377\377\17\377\377\375\377\377\377\377\377\375" \ + "\376\376\376\377\377\377\377\377\375\376\376\377\334\354\305\211\306" \ + "=\213\307A\213\305;\215\306A\214\306<\215\305>\213\307A\232\214\306>" \ + "\202\214\305@\11\214\306>\214\306<\214\306>\215\307\77\212\311=\333\355" \ + "\305\377\376\377\377\377\377\376\376\376\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\252\377\377\377\3\377\377\375\377" \ + "\377\377\377\376\377\203\377\377\375\7\233\314V\215\307\77\215\305>\214" \ + "\306>\215\307\77\214\305@\212\307>\232\214\306>\14\214\305@\214\306>" \ + "\214\306<\215\307=\215\307\77\214\305@\232\315V\374\377\373\376\376\377" \ + "\377\377\375\377\377\377\376\376\376\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\255\377\377\377\10\377\377\375\377\376" \ + "\377\324\353\267\214\304\77\215\305>\214\305@\212\307<\214\305@\232\214" \ + "\306>\2\215\307\77\215\306A\202\214\306>\4\215\307\77\213\304\77\215" \ + "\306E\316\346\254\202\377\377\377\3\377\377\375\376\376\377\376\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\247" \ + "\377\377\377\1\376\376\376\206\377\377\377\10\377\377\373\375\376\377" \ + "\232\315W\214\306>\215\307=\211\307>\215\306A\215\305>\232\214\306>\1" \ + "\214\305@\202\215\307\77\13\214\305@\215\306E\227\317P\377\377\377\377" \ + "\377\375\376\377\377\377\377\377\377\377\375\375\377\376\377\377\377" \ + "\377\377\375\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\254\377\377\377\20\376\377\377\377\375\377\331\356\303\215\305" \ + "@\213\310\77\215\305>\216\306\77\213\307A\215\306A\214\306<\214\306>" \ + "\216\306\77\213\304\77\212\307<\214\306>\215\305@\210\214\306>\1\214" \ + "\305@\202\215\307\77\205\214\306>\10\214\305@\212\307>\215\305>\214\305" \ + "@\215\305>\214\305@\215\305>\331\356\305\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\264\377\377\377\20\376\376\374\377" \ + "\377\375\376\376\374\261\330{\214\306>\216\306A\214\306>\213\307A\215" \ + "\305>\215\306A\215\307\77\213\304A\215\307\77\214\305@\214\306<\216\306" \ + "A\210\214\306>\4\215\307\77\213\305=\214\306>\215\307\77\202\214\306" \ + ">\12\215\307\77\214\306>\212\307>\220\305\77\212\307>\214\306>\213\310" \ + "=\214\306<\262\327z\376\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\265\377\377\377\17\374\377\377\377\377\377\370" \ + "\373\362\241\321d\211\310<\215\305>\215\305@\216\306=\214\305@\214\306" \ + ">\215\307\77\214\306>\212\307<\212\306@\212\307<\210\214\306>\3\215\307" \ + "\77\214\306>\215\306A\203\214\305@\12\215\306A\214\305@\215\305>\212" \ + "\307>\213\307A\216\305C\215\307=\242\322e\371\372\364\375\377\376\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\264\377" \ + "\377\377\1\375\377\374\203\377\377\377\4\352\364\333\223\311O\212\306" \ + "@\215\305@\202\213\310\77\202\214\306>\4\216\307F\213\305=\215\307\77" \ + "\215\305@\211\214\306>\1\215\307\77\203\214\305@\202\214\306>\1\215\307" \ + "\77\202\214\305@\6\216\305C\215\307\77\225\311K\351\363\332\377\377\377" \ + "\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\265\377\377\377\17\377\375\376\377\376\377\377\377\377\377\377" \ + "\375\352\365\327\223\313L\212\307<\215\305>\214\305@\215\307=\214\305" \ + "@\214\306<\213\310\77\213\304\77\220\305A\212\214\306>\202\214\305@\12" \ + "\214\306>\214\306<\214\306>\215\307\77\214\306>\213\310=\215\307=\225" \ + "\311K\347\365\334\377\377\375\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\267\377\377\377\1\377\377\375\202\377\377\377" \ + "\13\377\376\377\376\377\377\353\363\334\245\320d\214\305B\214\305@\215" \ + "\306A\213\305=\214\306>\213\307A\213\310=\213\214\306>\5\214\305@\214" \ + "\306>\214\306<\215\307=\215\307\77\202\214\305@\5\214\306<\242\322e\351" \ + "\363\332\377\377\375\376\376\376\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\267\377\377\377\1\376\376\374\202\377\377" \ + "\375\6\376\377\377\377\376\377\377\377\375\371\372\364\255\330|\217\304" \ + ">\202\212\306@\2\215\306A\214\303A\202\214\305@\211\214\306>\2\215\307" \ + "\77\215\306A\202\214\306>\6\215\307\77\213\304\77\215\306E\215\305>\262" \ + "\327z\371\372\364\203\377\377\377\2\376\377\377\377\377\375\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\264\377\377\377" \ + "\1\376\376\376\202\377\377\377\2\377\377\375\377\376\377\203\377\377" \ + "\377\6\377\377\375\331\356\303\233\314W\215\310<\214\305@\215\307\77" \ + "\214\214\306>\1\214\305@\202\215\307\77\7\214\305@\215\306E\227\317P" \ + "\331\356\305\376\377\377\375\377\376\376\377\377\202\377\377\377\2\377" \ + "\377\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\274\377\377\377\10\377\377\375\377\376\377\365\375\362" \ + "\307\342\237\234\315Z\212\306@\212\307>\214\305@\202\215\307\77\16\214" \ + "\306>\215\307\77\214\306>\215\306A\214\306>\213\310\77\214\306>\215\305" \ + "<\216\306A\213\310\77\212\307>\232\315T\307\341\242\370\373\362\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\304\377\377" \ + "\377\1\377\377\375\202\377\377\377\10\377\376\377\376\376\374\335\354" \ + "\303\270\333\207\222\311J\214\305@\215\306A\213\305=\202\214\306>\13" \ + "\215\307\77\216\306\77\215\305>\212\306@\212\307>\226\312K\270\333\211" \ + "\334\354\307\376\377\377\376\376\376\377\377\375\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\306\377\377\377\2\376\377" \ + "\375\376\377\377\204\377\377\377\16\350\366\334\332\354\302\311\341\245" \ + "\306\341\234\305\342\237\304\341\237\305\342\240\305\342\237\334\355" \ + "\303\352\364\333\377\377\375\377\375\376\377\376\377\377\377\375\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\307\377" \ + "\377\377\15\376\376\376\377\376\377\377\377\375\377\377\373\376\377\377" \ + "\376\377\375\376\377\377\377\377\375\377\377\377\376\376\376\376\377" \ + "\377\376\377\375\377\377\377\202\377\376\377\204\377\377\377\1\376\376" \ + "\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\307\377\377\377\3\376\377\377\377\377\377\376\376\376\202\377\377\377" \ + "\1\376\376\376\210\377\377\377\3\375\377\376\376\377\377\377\377\377" \ + "\203\377\376\377\4\376\377\375\376\377\377\377\377\377\377\376\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\304\377" \ + "\377\377\10\377\377\375\377\376\377\377\377\373\377\377\377\375\377\376" \ + "\376\377\377\376\376\376\377\376\377\202\376\377\377\1\377\377\377\202" \ + "\376\376\376\202\377\377\377\202\376\377\377\5\376\377\375\377\377\377" \ + "\376\376\374\377\377\377\377\377\375\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\307\377\377\377\1\376\376\377\202\377" \ + "\377\377\2\377\377\375\376\376\377\202\377\377\377\2\376\377\375\377" \ + "\377\375\204\377\377\377\202\377\377\375\1\376\377\375\202\376\377\377" \ + "\202\377\377\375\202\377\377\377\1\377\376\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\310\377\377\377\5\377\377\375" \ + "\377\376\377\377\377\375\376\376\377\377\376\377\207\377\377\377\202" \ + "\377\376\377\1\376\376\376\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\377\261\377\377\377" \ + "\1\376\376\376\210\377\377\377\3\376\376\376\377\377\377\376\376\376" \ + "\331\377\377\377\1\376\376\376\204\377\377\377\1\376\376\376\257\377" \ + "\377\377\1\376\376\376\212\377\377\377\1\376\376\376\211\377\377\377" \ + "\1\376\376\376\221\377\377\377\1\376\376\376\203\377\377\377\1\376\376" \ + "\376\205\377\377\377\1\376\376\376\312\377\377\377\1\376\376\376\214" \ + "\377\377\377\1\376\376\376\202\377\377\377\6\377\376\375\377\377\377" \ + "\376\377\377\377\377\377\377\376\377\376\377\377\270\377\377\377\7\376" \ + "\377\377\377\376\377\376\377\377\377\377\375\377\377\377\377\375\377" \ + "\377\376\377\273\377\377\377\1\376\376\376\202\377\377\377\1\376\376" \ + "\376\302\377\377\377\1\376\376\376\305\377\377\377\1\376\376\376\241" \ + "\377\377\377\1\376\376\376\214\377\377\377\1\376\376\376\235\377\377" \ + "\377\1\376\376\376\202\377\377\377\1\376\376\376\202\377\377\377\1\376" \ + "\376\376\202\377\377\377\1\376\376\376\252\377\377\377\1\376\376\376" \ + "\212\377\377\377\3\376\376\376\377\377\377\376\376\376\202\377\377\377" \ + "\1\376\376\376\251\377\377\377\202\376\376\376\215\377\377\377\1\376" \ + "\376\376\202\377\377\377\1\376\376\376\205\377\377\377\1\376\376\376" \ + "\224\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\376\376\376\232\377\377\377\1\376\376\376\202\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\376\376\376\206\377\377\377\1\376\376" \ + "\376\243\377\377\377\1\376\376\376\204\377\377\377\1\376\376\376\202" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\202\377\377\377\2" \ + "\376\376\376\377\377\377\202\377\377\375\3\377\377\377\376\377\377\377" \ + "\377\375\202\377\376\377\1\377\377\377\270\377\376\377\14\377\377\377" \ + "\377\376\377\377\376\374\377\377\375\375\376\377\376\377\377\377\377" \ + "\375\376\376\376\377\377\377\376\376\376\377\377\377\376\376\376\203" \ + "\377\377\377\1\376\376\376\266\377\377\377\1\376\376\376\203\377\377" \ + "\377\1\376\376\376\202\377\377\377\1\376\376\376\214\377\377\377\202" \ + "\376\376\376\207\377\377\377\1\376\376\376\272\377\377\377\1\376\376" \ + "\376\252\377\377\377\202\376\376\376\247\377\377\377\5\376\376\376\377" \ + "\377\377\376\376\376\377\377\377\376\376\376\202\377\377\377\1\376\376" \ + "\376\203\377\377\377\1\376\376\376\311\377\377\377\1\376\376\376\221" \ + "\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\302\377\377" \ + "\377\1\376\376\376\207\377\377\377\1\346\346\346\204\316\316\316\10\317" \ + "\317\317\315\315\315\316\316\316\363\363\365\377\377\377\376\376\376" \ + "\377\377\377\376\376\376\204\377\377\377\1\376\376\376\202\377\377\377" \ + "\1\376\376\376\234\377\377\377\1\376\376\376\262\377\377\377\1\376\376" \ + "\376\213\377\377\377\1\377\377\375\202\376\377\377\1\376\376\377\202" \ + "\377\377\377\2\377\376\377\377\377\375\270\276\317\331\1\377\376\377" \ + "\205\377\377\377\3\376\377\375\377\377\375\376\376\376\257\377\377\377" \ + "\1\376\376\376\210\377\377\377\202\376\376\376\210\377\377\377\1\376" \ + "\376\376\220\377\377\377\1\376\376\376\207\377\377\377\1\376\376\376" \ + "\243\377\377\377\1\376\376\376\203\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\207\377\377\377\1\376\376\376\331\377\377\377\12\376" \ + "\376\376\377\377\377\235\235\235kkmllnkkmllnjjlkkm\346\346\346\202\377" \ + "\377\377\1\376\376\376\237\377\377\377\2\346\346\346\317\317\317\204" \ + "\316\316\316\2\317\317\317\346\346\346\234\377\377\377\1\376\376\376" \ + "\203\377\377\377\1\376\376\376\202\377\377\377\1\332\332\332\203\316" \ + "\316\316\1\317\317\317\202\316\316\316\213\377\377\377\5\346\346\346" \ + "\317\317\317\315\315\315\316\316\316\315\315\315\252\316\316\316\1\363" \ + "\363\363\205\377\377\377\1\376\376\376\212\377\377\377\1\376\376\376" \ + "\211\377\377\377\4\346\346\346\250\250\250\204\204\206``b\202::<\1;;" \ + "=\202::<\3;;=99;;;=\203::<\4lln\220\220\222\266\266\266\363\363\363\202" \ + "\376\376\376\240\377\377\377\1\346\346\346\202\316\316\316\10\317\317" \ + "\317\315\315\315\317\317\317\316\316\316\332\332\332\376\376\376\377" \ + "\377\377\376\376\376\203\377\377\377\1\376\376\376\241\377\377\377\6" \ + "\376\376\376\377\377\377\346\346\346\316\316\320\317\317\321\316\316" \ + "\320\203\316\316\316\2\347\347\347\376\376\376\205\377\377\377\1\376" \ + "\376\376\202\377\377\375\5\376\377\377\377\377\375\377\377\377\317\334" \ + "\344\37V\177\270\0>i\12\37U{\317\334\344\377\376\374\377\377\375\376" \ + "\377\377\377\376\374\376\377\377\376\376\376\377\377\377\363\363\363" \ + "\202\316\316\316\1\315\315\315\202\317\317\317\251\316\316\316\1\332" \ + "\332\332\202\377\377\377\1\376\376\376\203\377\377\377\202\376\376\376" \ + "\204\377\377\377\3\346\346\346\316\316\316\316\316\320\204\316\316\316" \ + "\2\346\346\346\376\376\376\212\377\377\377\1\347\347\347\206\316\316" \ + "\316\2\317\317\317\363\363\363\250\377\377\377\2\376\376\376\331\331" \ + "\331\206\316\316\316\1\332\332\332\202\377\377\377\1\376\376\376\204" \ + "\377\377\377\1\376\376\376\203\377\377\377\3\332\332\332\316\316\316" \ + "\316\316\320\250\316\316\316\1\363\363\363\205\377\377\377\1\376\376" \ + "\376\242\377\377\377\4\346\346\346::<;;=99;\204::<\1\204\204\206\237" \ + "\377\377\377\1\376\376\376\202\377\377\377\3\235\235\235::<;;=\202::" \ + "<\3;;=::<\235\235\235\202\377\377\377\1\376\376\376\232\377\377\377\1" \ + "\376\376\376\205\377\377\377\4kkm;;;99;;;=\202::<\1;;;\213\377\377\377" \ + "\4\234\234\234:::::<;;=\202::<\1;;;\250::<\1\316\316\316\202\377\377" \ + "\377\1\376\376\376\203\377\377\377\1\376\376\376\212\377\377\377\203" \ + "\376\376\376\203\377\377\377\3\346\346\346\250\250\250```\204::<\202" \ + ";;=\202::<\3;;=::<;;=\203::<\1;;=\202::<\5;;=::<```\265\265\265\362\362" \ + "\362\203\377\377\377\1\376\376\376\233\377\377\377\1\234\234\236\204" \ + "::<\5""99;;;=::<\333\333\335\376\376\376\203\377\377\377\1\376\376\376" \ + "\241\377\377\377\4\376\376\376\377\377\377\363\363\363FFH\202::<\1;;" \ + "=\203::<\1\234\234\234\210\377\377\377\6\376\377\377\377\377\375\375" \ + "\376\377\356\363\366\40Vz\0\77h\270\0=i\20\0>i\22Ip\356\363\367\376\377" \ + "\377\377\377\375\377\377\377\376\376\377\377\376\377\377\377\377\315" \ + "\315\315:::::<;;=::<99;;;;\250::<\1kkm\205\377\377\377\1\376\376\376" \ + "\203\377\377\377\4\376\376\376\377\377\377\376\376\376\234\234\234\203" \ + "::<\6;;=::<:::\234\234\234\377\377\377\376\376\376\211\377\377\377\3" \ + "\332\332\332:::;;=\202::<\202;;=\2::<\204\204\206\250\377\377\377\2\364" \ + "\364\364FFF\204::<\202:::\1\234\234\234\206\377\377\377\1\376\376\376" \ + "\204\377\377\377\2kkk;;=\251::<\1\316\316\316\202\377\377\377\1\376\376" \ + "\376\203\377\377\377\1\376\376\376\240\377\377\377\6\376\376\376\234" \ + "\234\236::<;;=::<;;=\203::<\2FFH\362\362\362\235\377\377\377\1\376\376" \ + "\376\203\377\377\377\3\234\234\236::<;;=\202::<\3;;=::<\234\234\236\203" \ + "\377\377\377\1\376\376\376\233\377\377\377\1\376\376\376\203\377\377" \ + "\377\7kkm::<;;=::<;;=::<;;=\213\377\377\377\4\235\235\235::<;;=99;\202" \ + ";;=\251::<\1\315\315\315\203\377\377\377\202\376\376\376\213\377\377" \ + "\377\1\376\376\376\202\377\377\377\6\376\376\376\377\377\377\315\315" \ + "\315\205\205\205::<;;=\213::<\4;;=::<;;=::<\203;;=\204::<\4FFF\204\204" \ + "\204\346\346\346\376\376\376\234\377\377\377\3\234\234\236::<;;=\202" \ + "::<\4;;=99;::<``b\244\377\377\377\1\376\376\376\203\377\377\377\1xxz" \ + "\202::<\10;;=99;;;=::<;;=\233\233\235\377\377\377\376\376\376\202\377" \ + "\377\377\1\376\376\376\203\377\377\377\4\375\377\376\377\376\373\377" \ + "\377\375\235\267\310\202\0>i\271\0=i\4\0\77j\237\266\306\377\376\377" \ + "\377\375\374\202\376\377\377\4\377\377\377\376\376\376\316\316\31699" \ + ";\202;;=\2::<;;=\251::<\1kkm\203\377\377\377\1\376\376\376\210\377\377" \ + "\377\4\235\235\235::<99;;;=\203::<\1\235\235\235\214\377\377\377\2ll" \ + "n99;\202;;=\1::<\203;;=\2\362\362\364\376\376\376\245\377\377\377\2\376" \ + "\376\376\250\250\250\204::<\4;;=::<:::\346\346\346\203\377\377\377\1" \ + "\376\376\376\205\377\377\377\3\376\376\376\377\377\377jjl\252::<\1\315" \ + "\315\315\203\377\377\377\202\376\376\376\242\377\377\377\3\362\362\364" \ + "GGI::<\202;;=\2""99;;;=\202::<\2""99;\235\235\235\237\377\377\377\3\376" \ + "\376\376\377\377\377\235\235\237\202::<\202;;=\202::<\3\235\235\237\377" \ + "\377\377\376\376\376\233\377\377\377\1\376\376\376\203\377\377\377\4" \ + "\376\376\376\377\377\377kkm;;=\202::<\5""99;;;=99;\377\377\377\376\376" \ + "\376\211\377\377\377\1\233\233\233\202::<\3;;=::<99;\251::<\1\317\317" \ + "\317\205\377\377\377\1\376\376\376\214\377\377\377\3\376\376\376\347" \ + "\347\347xxz\203::<\1;;=\202::<\1;;=\204::<\1;;=\203::<\1;;=\205::<\1" \ + ";;=\203::<\1;;=\203::<\2\234\234\236\362\362\362\233\377\377\377\2\233" \ + "\233\235;;=\204::<\1;;=\202::<\1\234\234\236\245\377\377\377\4\376\376" \ + "\376\302\302\304::<;;=\206::<\1\235\235\237\202\377\377\377\1\376\376" \ + "\376\203\377\377\377\7\375\376\377\377\377\377\377\377\375\376\377\377" \ + "\377\377\377\177\235\265\0\77k\271\0\77j\7\0\77k\0\77j~\236\265\377\376" \ + "\377\376\377\377\375\377\374\377\377\375\202\377\377\377\5\315\315\315" \ + ";;=::<99;;;=\252::<\3kkm\377\377\377\376\376\376\203\377\377\377\1\376" \ + "\376\376\203\377\377\377\1\376\376\376\202\377\377\377\3\233\233\233" \ + "::<;;=\202::<\3;;=::<\234\234\234\202\377\377\377\1\376\376\376\211\377" \ + "\377\377\4\264\264\264;;=::<;;=\204::<\3\247\247\251\377\377\377\376" \ + "\376\376\245\377\377\377\1SSS\203::<\1;;=\202::<\1\204\204\204\213\377" \ + "\377\377\4\376\376\376lln::<:9>\250::<\1\317\317\317\205\377\377\377" \ + "\1\376\376\376\241\377\377\377\1\265\265\267\204::<\1;;=\204::<\1FFF" \ + "\241\377\377\377\2\234\234\236;;=\204::<\2;;=\234\234\236\234\377\377" \ + "\377\3\376\376\376\377\377\377\376\376\376\204\377\377\377\1kkm\203:" \ + ":<\4;;=::<;;=\376\376\376\212\377\377\377\1\234\234\234\204::<\1;;=\251" \ + "::<\1\316\316\316\203\377\377\377\202\376\376\376\215\377\377\377\4\234" \ + "\234\234;;=::<;;=\202::<\1""99;\204::<\1;;=\203::<\1;;=\211::<\1""99" \ + ";\207::<\2FFF\301\301\301\232\377\377\377\2\234\234\23699;\210::<\1\333" \ + "\333\333\241\377\377\377\6\376\376\376\377\377\377\376\376\376\363\363" \ + "\363FFH;;=\205::<\3;;=::<\234\234\236\206\377\377\377\7\377\376\377\377" \ + "\377\377\377\377\375\375\376\377\377\376\377\201\235\263\0>g\272\0>i" \ + "\13\0>e\177\236\263\377\375\374\377\377\377\377\377\375\376\376\376\377" \ + "\376\377\377\377\377\316\316\316::<;;=\202::<\2""99;;;=\250::<\1kkm\204" \ + "\377\377\377\5\376\376\376\377\377\377\376\376\376\377\377\377\376\376" \ + "\376\202\377\377\377\2\376\376\376\234\234\234\206::<\1\234\234\234\215" \ + "\377\377\377\2RRT;;=\205::<\1SSU\246\377\377\377\2\316\316\316999\206" \ + "::<\1\316\316\316\202\377\377\377\3\376\376\376\377\377\377\376\376\376" \ + "\207\377\377\377\3jjl::<:9>\250::<\1\316\316\316\203\377\377\377\202" \ + "\376\376\376\242\377\377\377\2SSU99;\202;;=\204::<\4;;=99;::<\264\264" \ + "\266\240\377\377\377\1\234\234\234\206::<\1\234\234\234\243\377\377\377" \ + "\1kkm\206::<\213\377\377\377\2\234\234\236;;=\216::<\4""99;;;=::<;;=" \ + "\206::<\3;;=::<;;=\222::<\1\316\316\316\205\377\377\377\1\376\376\376" \ + "\207\377\377\377\1\376\376\376\202\377\377\377\2\346\346\350__a\202:" \ + ":<\3;;=::<;;=\204::<\1;;=\202::<\3;;=::<;;=\203::<\1;;=\202::<\2""99" \ + ";;;=\202::<\1;;=\204::<\7;;=::<;;=::<;;=\204\204\206\363\363\363\203" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\222\377\377\377\4" \ + "\234\234\236::<;;=99;\204::<\3;;=::<__a\244\377\377\377\1xxx\205::<\1" \ + ";;=\203::<\1\234\234\236\213\377\377\377\3\177\236\263\0=i\0>i\211\0" \ + "=i\2\0>j\0=i\202\1>j\2\0\77k\0>j\232\0>i\2\0>j\0\77k\202\1>j\2\0=i\0" \ + ">j\211\0=i\3\0>i\0=i\177\236\263\206\377\377\377\6\316\316\316:::::<" \ + ";;=::<;;=\217::<\1;;=\203::<\1;;=\202::<\1;;=\222::<\1kkk\205\377\377" \ + "\377\1\376\376\376\206\377\377\377\1\234\234\236\206::<\1\234\234\236" \ + "\215\377\377\377\3\234\234\234;;=::<\202;;=\203::<\3\316\316\320\377" \ + "\377\377\376\376\376\240\377\377\377\1\376\376\376\202\377\377\377\3" \ + "xxz::<;;=\202::<\3;;=::<__a\215\377\377\377\1kkm\204::<\1;;=\202::<\1" \ + ";;=\242::<\1\316\316\316\205\377\377\377\1\376\376\376\240\377\377\377" \ + "\1\265\265\265\202::<\5;;=::<;;=::<;;=\204::<\2TTV\376\376\376\237\377" \ + "\377\377\1\234\234\234\206::<\1\234\234\234\243\377\377\377\1kkm\206" \ + "::<\213\377\377\377\3\234\234\23499;;;=\214::<\1""99;\207::<\1;;=\227" \ + "::<\1\316\316\316\204\377\377\377\3\376\376\376\377\377\377\376\376\376" \ + "\203\377\377\377\1\376\376\376\204\377\377\377\2\333\333\335FFH\214:" \ + ":<\16``b\221\221\223\251\251\251\315\315\315\316\316\316\363\363\363" \ + "\377\377\377\332\332\332\316\316\316\301\301\301\235\235\237jjlFFH;;" \ + "=\207::<\1;;=\202::<\3;;=__a\363\363\363\227\377\377\377\4\234\234\236" \ + "99;::<;;=\205::<\3;;=::<\233\233\233\240\377\377\377\12\376\376\376\377" \ + "\377\377\301\301\301;;=::<;;=::<;;=::<99;\203::<\1\234\234\236\213\377" \ + "\377\377\3\177\236\263\0=i\0>i\211\0=i\7\1>j\0=i\1>j\0=i\0>g\3>h\2=g" \ + "\230\0=i\7\2=g\3>h\0>g\0=i\1>j\0=i\1>j\211\0=i\3\0>i\0=i\177\236\263" \ + "\206\377\377\377\2\317\317\317:::\221::<\202;;=\202::<\3;;=::<99;\203" \ + "::<\2;;=99;\220::<\1kkk\214\377\377\377\1\234\234\236\206::<\1\234\234" \ + "\236\213\377\377\377\3\376\376\376\377\377\377\363\363\363\204::<\4;" \ + ";=::<;;=xxz\202\377\377\377\1\376\376\376\236\377\377\377\1\376\376\376" \ + "\202\377\377\377\3\346\346\346::<;;=\202::<\4;;=99;;;=\266\266\270\215" \ + "\377\377\377\1kkm\203::<\1;;=\202::<\1;;=\243::<\1\316\316\316\204\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\232\377\377\377\1\376" \ + "\376\376\204\377\377\377\1kkm\202;;=\202::<\202;;=\2::<;;=\204::<\3\317" \ + "\317\317\377\377\377\376\376\376\235\377\377\377\1\234\234\234\206::" \ + "<\1\234\234\234\243\377\377\377\1kkm\206::<\212\377\377\377\1\376\376" \ + "\376\224\377\377\377\1lln\203::<\1;;=\202::<\1\234\234\236\234\377\377" \ + "\377\1\376\376\376\204\377\377\377\4\376\376\376\265\265\267::<;;=\202" \ + "::<\1;;=\202::<\1;;=\203::<\5__a\266\266\270\363\363\363\377\377\377" \ + "\376\376\376\204\377\377\377\1\376\376\376\203\377\377\377\1\376\376" \ + "\376\202\377\377\377\4\301\301\303\204\204\206;;=::<\203;;=\202::<\2" \ + ";;=::<\202;;=\3GGI\332\332\334\376\376\376\203\377\377\377\1\376\376" \ + "\376\221\377\377\377\2\235\235\237::<\202;;=\202::<\1;;=\202::<\4""9" \ + "9;::<;;=\331\331\331\240\377\377\377\2\363\363\363GGI\203::<\2;;=::<" \ + "\203;;=\202::<\1\234\234\236\213\377\377\377\3\177\236\263\0=i\0>i\210" \ + "\0=i\10\0\77k\0=i\1>j\0>i\0\77j\0=i\0>i\0>j\230\0>i\10\0>j\0>i\0=i\0" \ + "\77j\0>i\1>j\0=i\0\77k\210\0=i\3\0>i\0=i\177\236\263\206\377\377\377" \ + "\1\376\376\376\217\377\377\377\1\376\376\376\203\377\377\377\1\315\315" \ + "\317\204::<\3;;=::i\211\0=i\202\0>i\5\0j\0=i\1>j" \ + "\0>i\230\0=i\5\0>i\1>j\0=i\1>j\0i\211\0=i\3\0>i\0=i\177\236" \ + "\263\212\377\377\377\3\376\376\376\377\377\377\376\376\376\212\377\377" \ + "\377\1\376\376\376\202\377\377\377\10\316\316\320::<;;=::<;;=99;::::<99;::<99;\202;;=\203::<\1" \ + "\234\234\236\213\377\377\377\3\177\236\263\0=i\0>i\210\0=i\7\2=g\0>i" \ + "\0>j\0\77j\0=i\0\77j\0=h\232\1>j\7\0=h\0\77j\0=i\0\77j\0>j\0>i\2=g\210" \ + "\0=i\3\0>i\0=i\177\236\263\213\377\377\377\1\376\376\376\216\377\377" \ + "\377\1\317\317\321\202::<\6;;=::<;;=::i\210\0=i\10\0\77j\0>j\0\77k\0=i\3>h\2=" \ + "g\1>j\0\77k\230\0=i\10\0\77k\1>j\2=g\3>h\0=i\0\77k\0>j\0\77j\210\0=i" \ + "\3\0>i\0=i\177\236\263\232\377\377\377\12\316\316\316;;=::<;;=::<;;=" \ + "::i\210\0=i\10\0>i\0=i\0>i\0\77k\0>j\2=g\1\77h\0>l\230\0>i\10\0>l\1\77" \ + "h\2=g\0>j\0\77k\0>i\0=i\0>i\210\0=i\3\0>i\0=i\177\236\263\205\377\377" \ + "\377\1\376\376\376\202\377\377\377\1\376\376\376\221\377\377\377\3\316" \ + "\316\316::<;;=\204::<\1kkm\225\377\377\377\202\376\376\376\211\377\377" \ + "\377\1\234\234\236\206::<\1\234\234\236\217\377\377\377\3\376\376\376" \ + "TTV99;\202::<\4""99;;;=::i\210\0=i\7\0>j\2=g\0>g\0>j\40V|o\224\256\177\236\262\232" \ + "\177\236\263\7\177\236\262o\224\256\40V|\0>j\0>g\2=g\0>j\210\0=i\3\0" \ + ">i\0=i\177\236\263\232\377\377\377\3\316\316\316::<;;=\203::<\2;;=kk" \ + "m\232\377\377\377\1\376\376\376\205\377\377\377\1\234\234\236\206::<" \ + "\1\234\234\236\220\377\377\377\2\233\233\235;;=\202::<\1<<>\203::<\1" \ + "\346\346\346\237\377\377\377\1\204\204\204\206::<\2SSU\376\376\376\217" \ + "\377\377\377\1kkm\203::<\4;;=::<;;=\316\316\320\304\377\377\377\1\376" \ + "\376\376\202\377\377\377\2\234\234\236;;=\202::<\4;;=::<;;=\234\234\234" \ + "\203\377\377\377\1\346\346\346\205::<\3;;=FFH\363\363\365\203\377\377" \ + "\377\1\376\376\376\230\377\377\377\1\234\234\234\206::<\1\234\234\234" \ + "\243\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236" \ + "\235\377\377\377\2\316\316\316;;=\202::<\6;;=::<;;=::<:::\265\265\265" \ + "\237\377\377\377\7\376\376\376\363\363\363___::<;;=::<;;=\203::<\2GG" \ + "I\363\363\363\204\377\377\377\1\376\376\376\214\377\377\377\1\234\234" \ + "\234\203::<\202;;=\5::<\266\266\266GGI99;;;=\202::<\1;;=\202::<\1\332" \ + "\332\332\206\377\377\377\1\376\376\376\211\377\377\377\1\376\376\376" \ + "\207\377\377\377\2\363\363\363FFH\206::<\3FFH\301\301\30399;\202::<\202" \ + ";;=\2::<\234\234\236\206\377\377\377\7\377\377\375\377\377\377\377\377" \ + "\375\376\377\377\376\376\376\200\237\263\0\77i\211\0>i\7\0>g\1>j\0>g" \ + "_\210\236\377\377\377\376\377\377\377\376\377\231\377\377\377\10\377" \ + "\377\375\376\377\375\377\377\377\377\377\375`\210\242\3>h\0\77j\1\77" \ + "h\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<" \ + "\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\220\377\377" \ + "\377\1\363\363\363\204::<\202;;=\2""99;\205\205\207\207\377\377\377\1" \ + "\376\376\376\224\377\377\377\4\376\376\376\377\377\377\363\363\363FF" \ + "H\202::<\5;;=99;;;=::<\265\265\265\220\377\377\377\1kkm\206::<\1\316" \ + "\316\316\305\377\377\377\5\376\376\376\364\364\364FFH::<;;=\202::<\4" \ + ";;=FFH\363\363\363\377\377\377\202\376\376\376\6\377\377\377xxz::<;;" \ + "=::<;;=\202::<\1\234\234\236\206\377\377\377\202\376\376\376\224\377" \ + "\377\377\1\234\234\234\206::<\1\234\234\234\243\377\377\377\1kkm\206" \ + "::<\237\377\377\377\1kkm\206::<\1\234\234\236\225\377\377\377\1\376\376" \ + "\376\207\377\377\377\2SSS;;=\202::<\1;;=\203::<\1\234\234\234\202\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\232\377\377\377\1\376" \ + "\376\376\202\377\377\377\4\332\332\332FFH::<;;=\202::<\1;;=\202::<\1" \ + "\222\222\224\205\377\377\377\1\376\376\376\213\377\377\377\3\234\234" \ + "\234::<;;=\202::<\5""99;;;=\315\315\315\250\250\252;;=\206::<\2``b\376" \ + "\376\376\202\377\377\377\1\376\376\376\216\377\377\377\1\376\376\376" \ + "\205\377\377\377\2xxx;;=\202::<\1;;=\203::<\2\300\300\300\317\317\321" \ + "\203::<\1;;=\202::<\1\234\234\236\207\377\377\377\1\377\376\377\202\377" \ + "\377\377\4\377\376\377\201\235\263\0=j\3>j\210\0=i\5\1>j\0=j\37V\177" \ + "\377\376\377\376\376\376\202\377\377\377\1\376\377\377\230\377\377\377" \ + "\10\376\377\377\377\377\375\374\377\377\377\376\374\376\377\377#W\177" \ + "\0>g\0\77i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316" \ + "\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\220\377" \ + "\377\377\2\376\376\376\204\204\206\205::<\3;;=FFH\362\362\362\204\377" \ + "\377\377\202\376\376\376\2\377\377\377\376\376\376\224\377\377\377\3" \ + "\376\376\376\265\265\265;;=\203::<\4;;=99;FFH\363\363\363\220\377\377" \ + "\377\1kkm\206::<\1\316\316\316\306\377\377\377\4\265\265\26599;;;=::" \ + "<\202;;=\2""99;\222\222\224\204\377\377\377\12\376\376\376\316\316\320" \ + ";;=::<;;=99;;;=99;SSU\376\376\376\202\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\226\377\377\377\1\234\234\234\206::<\1\234\234\234\243" \ + "\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\234" \ + "\377\377\377\11\234\234\234::<;;=99;;;=99;::<;;=kkm\241\377\377\377\1" \ + "\376\376\376\202\377\377\377\1\301\301\303\203::<\6;;=99;::<;;=::<\346" \ + "\346\350\203\377\377\377\1\376\376\376\214\377\377\377\1\234\234\234" \ + "\203::<\202;;=\10""99;\316\316\316\377\377\377kkm::<;;=::<;;=\203::<" \ + "\1\235\235\237\203\377\377\377\1\376\376\376\214\377\377\377\1\376\376" \ + "\376\205\377\377\377\3\302\302\304::<;;=\202::<\7""99;;;=99;xxz\377\377" \ + "\377\315\315\315;;=\203::<\3:9>::<\234\234\236\206\377\377\377\3\376" \ + "\377\377\377\377\375\377\377\377\202\377\377\375\3|\237\265\0\77k\0>" \ + "g\210\0=i\10\0@h\3j\210\0=i\3\0>i\0=i\177" \ + "\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1" \ + "\234\234\236\206::<\1\234\234\236\215\377\377\377\1\376\376\376\203\377" \ + "\377\377\2\332\332\334;;=\206::<\2\266\266\266\376\376\376\202\377\377" \ + "\377\1\376\376\376\202\377\377\377\1\376\376\376\222\377\377\377\1\376" \ + "\376\376\203\377\377\377\1SSS\203::<\4""99;::<;;=\221\221\223\221\377" \ + "\377\377\1kkm\206::<\1\316\316\316\306\377\377\377\4RRT;;=::<;;=\202" \ + "::<\2;;=\345\345\345\202\377\377\377\1\376\376\376\203\377\377\377\2" \ + "__a;;=\202::<\1;;=\202::<\1\264\264\264\206\377\377\377\1\376\376\376" \ + "\224\377\377\377\1\234\234\234\206::<\1\234\234\234\243\377\377\377\1" \ + "kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\226\377\377\377" \ + "\1\376\376\376\204\377\377\377\2\363\363\363FFH\203::<\1;;=\202::<\2" \ + "FFH\346\346\346\204\377\377\377\1\376\376\376\233\377\377\377\1\376\376" \ + "\376\203\377\377\377\3\376\376\376xxz99;\202::<\1""99;\202::<\4;;=\204" \ + "\204\206\377\377\377\376\376\376\202\377\377\377\1\376\376\376\213\377" \ + "\377\377\1\234\234\234\202::<\10;;=99;;;=::<\317\317\317\376\376\376" \ + "\363\363\363GGI\203::<\1;;=\203::<\3\331\331\331\377\377\377\376\376" \ + "\376\202\377\377\377\1\376\376\376\217\377\377\377\5\363\363\363GGI;" \ + ";=::<;;=\202::<\7""99;FFH\363\363\363\377\377\377\316\316\316::<;;=\202" \ + "::<\3:9>::<\234\234\236\207\377\377\377\7\376\377\377\376\376\376\377" \ + "\377\377\377\377\375\377\377\377\377\375\374\376\377\377\210\377\377" \ + "\377\10\376\376\374\376\377\377\354\364\366\377\377\375\376\377\377\377" \ + "\376\374\377\377\375\376\377\377\230\377\377\377\10\377\377\375\376\377" \ + "\377\377\376\375\375\376\377\376\377\377\301\317\330\0>g\0>j\210\0=i" \ + "\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240" \ + "\377\377\377\1\234\234\236\206::<\1\234\234\236\220\377\377\377\5\376" \ + "\376\376\377\377\377kkm::<;;=\202::<\3""99;::<^^`\204\377\377\377\1\376" \ + "\376\376\227\377\377\377\1\316\316\316\202::<\203;;=\202::<\1\347\347" \ + "\347\221\377\377\377\1kkm\206::<\1\316\316\316\303\377\377\377\12\376" \ + "\376\376\377\377\377\301\301\301;;=::<;;=::<99;::<\204\204\206\204\377" \ + "\377\377\4\376\376\376\377\377\377\376\376\376\266\266\266\202::<\5;" \ + ";=::<;;=::<``b\203\377\377\377\1\376\376\376\227\377\377\377\1\234\234" \ + "\234\206::<\1\234\234\234\243\377\377\377\1kkm\206::<\237\377\377\377" \ + "\1kkm\206::<\1\234\234\236\233\377\377\377\1\265\265\267\204::<\4""9" \ + "9;;;=::<\234\234\234\203\377\377\377\3\376\376\376\377\377\377\376\376" \ + "\376\231\377\377\377\5\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\376\376\376\202\377\377\377\5\363\363\363GGI99;::<;;=\202::<\3;;=::" \ + "<\346\346\346\204\377\377\377\1\376\376\376\212\377\377\377\3\234\234" \ + "\234::<99;\202;;=\202::<\1\315\315\315\202\377\377\377\3\301\301\303" \ + ";;=99;\202;;=\5::<;;=::<``b\376\376\376\202\377\377\377\1\376\376\376" \ + "\215\377\377\377\6\376\376\376\377\377\377\376\376\376xxz::<;;=\203:" \ + ":<\202;;=\1\300\300\302\202\377\377\377\3\316\316\316;;=99;\202::<\3" \ + ";:\77::<\234\234\236\206\377\377\377\2\377\377\375\376\377\375\202\376" \ + "\377\377\4\377\377\375\377\377\377\377\376\377\377\377\375\211\377\377" \ + "\377\1\376\376\374\202\377\377\377\3\377\376\377\377\377\377\375\376" \ + "\377\231\377\377\377\202\376\377\377\5\377\376\377\376\377\377\377\377" \ + "\375\277\320\332\0\77j\211\0=i\3\0>i\0=i\177\236\263\232\377\377\377" \ + "\1\316\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234" \ + "\234\236\213\377\377\377\3\376\376\376\377\377\377\376\376\376\204\377" \ + "\377\377\1\265\265\265\202::<\1;;=\204::<\1\315\315\317\204\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\376\376\376\220\377\377\377\1\376\376" \ + "\376\202\377\377\377\3\204\204\204::<;;=\204::<\2yy{\376\376\376\221" \ + "\377\377\377\1kkm\206::<\1\316\316\316\305\377\377\377\4kkm;;=::<;;=" \ + "\203::<\1\316\316\316\210\377\377\377\1TTV\206::<\2\317\317\321\376\376" \ + "\376\231\377\377\377\1\234\234\234\206::<\1\234\234\234\243\377\377\377" \ + "\1kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\233\377\377\377" \ + "\1TTV\202::<\7;;=::<;;=::i\0=i\177\236\263\232\377\377" \ + "\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1" \ + "\234\234\236\221\377\377\377\4\376\376\376\377\377\377SSU;;=\202::<\4" \ + ";;=99;;;=\204\204\206\203\377\377\377\1\376\376\376\226\377\377\377\11" \ + "\363\363\36399;;;=::<;;=::<;;=::<\316\316\316\202\377\377\377\1\376\376" \ + "\376\217\377\377\377\1kkm\206::<\1\316\316\316\304\377\377\377\1\316" \ + "\316\316\206::<\1kkk\211\377\377\377\2\235\235\23599;\202;;=\6::<;;=" \ + "::99;\202::<\3;;" \ + "=::<\234\234\236\211\377\377\377\4\377\375\376\376\377\377\254\334\363" \ + "Z\266\347\211[\267\350\6\\\266\350X\267\347\326\354\367\377\376\377\376" \ + "\377\377\377\377\375\232\377\377\377\3\377\377\373\375\377\376\376\377" \ + "\377\202\377\377\375\3\276\320\336\0>g\0>i\210\0=i\3\0>i\0=i\177\236" \ + "\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234" \ + "\234\236\206::<\1\234\234\236\223\377\377\377\1\235\235\237\204::<\4" \ + "<<>::<;;=\363\363\363\206\377\377\377\1\376\376\376\222\377\377\377\2" \ + "\234\234\234;;=\205::<\1SSU\204\377\377\377\1\376\376\376\216\377\377" \ + "\377\1kkm\206::<\1\316\316\316\304\377\377\377\1\204\204\204\203::<\1" \ + "99;\202::<\1\265\265\265\211\377\377\377\2\363\363\363FFH\205::<\2;;" \ + "=\346\346\346\231\377\377\377\1\234\234\234\206::<\1\234\234\234\243" \ + "\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\232" \ + "\377\377\377\1\222\222\222\202::<\1;;=\202::<\3;;=FFH\362\362\364\251" \ + "\377\377\377\1\235\235\235\203::<\7;;=::<;;=;;;\331\331\331\377\377\377" \ + "\376\376\376\214\377\377\377\2\234\234\234;;=\205::<\1\316\316\316\202" \ + "\377\377\377\3\376\376\376\377\377\377\301\301\301\205::<\4;;=::<__a" \ + "\376\376\376\216\377\377\377\4\376\376\376yyy::<;;=\205::<\1\316\316" \ + "\320\204\377\377\377\2\316\316\31699;\203::<\3""99;::<\234\234\236\207" \ + "\377\377\377\2\376\377\377\376\376\374\202\377\376\377\3\254\332\362" \ + "Y\267\352[\267\350\210Y\270\350\7[\267\350Y\267\352\326\356\370\376\376" \ + "\377\377\376\377\377\375\377\376\377\377\231\377\377\377\10\377\377\375" \ + "\376\377\377\377\377\377\377\376\377\377\377\375\276\317\331\1>j\0>j" \ + "\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1" \ + "kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\220\377\377\377" \ + "\1\376\376\376\202\377\377\377\4\363\363\365;;=::<;;=\204::<\1\234\234" \ + "\234\231\377\377\377\1SSS\202::<\1;;=\203::<\1\265\265\267\223\377\377" \ + "\377\1kkm\206::<\1\316\316\316\300\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\346\346\350\203::<\4;;=::<;;=SSU\213\377\377\377\1\204\204" \ + "\204\203::<\1;;=\202::<\1\204\204\206\202\377\377\377\1\376\376\376\226" \ + "\377\377\377\1\234\234\234\206::<\1\234\234\234\243\377\377\377\1kkm" \ + "\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\227\377\377\377\1\376" \ + "\376\376\202\377\377\377\3TTV::<;;=\203::<\2;;=\205\205\205\252\377\377" \ + "\377\1\347\347\347\202::<\202;;=\203::<\1\235\235\237\204\377\377\377" \ + "\1\376\376\376\211\377\377\377\1\234\234\234\206::<\1\316\316\316\205" \ + "\377\377\377\1\205\205\205\202::<\6;;=::<;;=::<;;=\234\234\236\213\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\302\302\302\202;;=\203::<\3" \ + ";;=::<\221\221\221\202\377\377\377\1\376\376\376\202\377\377\377\1\316" \ + "\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270\350" \ + "\211[\267\350\3Y\270\350[\267\350\326\354\371\242\377\377\377\3\276\317" \ + "\331\0=i\0>i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316" \ + "\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\224" \ + "\377\377\377\4\204\204\204;;=::<;;=\203::<\1TTT\204\377\377\377\1\376" \ + "\376\376\223\377\377\377\1\300\300\300\203::<\5;;=::<;;=FFF\363\363\363" \ + "\223\377\377\377\1kkm\203::<\4;;=::<;;=\316\316\320\277\377\377\377\14" \ + "\376\376\376\377\377\377\376\376\376\377\377\377\204\204\206::<;;=::" \ + "<99;<<>99;\265\265\267\213\377\377\377\3\346\346\346::<;;=\202::<\1;" \ + ";=\202::<\2\347\347\347\376\376\376\227\377\377\377\1\234\234\234\206" \ + "::<\1\234\234\234\243\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206" \ + "::<\1\234\234\236\226\377\377\377\4\376\376\376\377\377\377\376\376\376" \ + "\346\346\350\202;;=\203::<\3""99;<<>\301\301\301\253\377\377\377\1aa" \ + "c\202::<\1;;=\202::<\2;;=jjl\205\377\377\377\1\376\376\376\210\377\377" \ + "\377\1\234\234\234\206::<\1\316\316\316\202\377\377\377\1\376\376\376" \ + "\202\377\377\377\3\362\362\362SSU;;=\205::<\2;;=\332\332\332\210\377" \ + "\377\377\1\376\376\376\203\377\377\377\2\363\363\363FFH\202::<\202;;" \ + "=\5::<;;=SSS\363\363\363\376\376\376\204\377\377\377\1\316\316\316\206" \ + "::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270\350\211[\267\350" \ + "\3Y\270\350[\267\350\326\354\371\242\377\377\377\3\276\317\331\0=i\0" \ + ">i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::" \ + "<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\224\377\377" \ + "\377\1\332\332\332\207::<\1\301\301\301\227\377\377\377\1lll\204::<\3" \ + ";;=::<\221\221\221\202\377\377\377\3\376\376\376\377\377\377\376\376" \ + "\376\217\377\377\377\1kkm\204::<\3;;=99;\316\316\316\241\377\377\377" \ + "\1\376\376\376\234\377\377\377\10\376\376\376\377\377\377\376\376\376" \ + "\377\377\377\363\363\363FFH;;=::<\202;;=\3::i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316" \ + "\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236" \ + "\225\377\377\377\1__a\204;;=\5""99;::99;\202::<\4;;=::<;;=\331\331\331\215\377\377\377\1\234\234\234" \ + "\206::<\1\316\316\316\207\377\377\377\1\222\222\224\202::<\3;;=99;<<" \ + ">\202::<\4\234\234\236\376\376\376\377\377\377\376\376\376\203\377\377" \ + "\377\1\376\376\376\203\377\377\377\6\302\302\304;;=99;;;=::<;;=\202:" \ + ":<\1\234\234\234\202\377\377\377\1\376\376\376\204\377\377\377\1\316" \ + "\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270\350" \ + "\211[\267\350\3Y\270\350[\267\350\326\354\371\242\377\377\377\3\276\317" \ + "\331\0=i\0>i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316" \ + "\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\225" \ + "\377\377\377\2\265\265\265;;=\202::<\2""99;;;=\202::<\2\347\347\347\376" \ + "\376\376\215\377\377\377\3\376\376\376\377\377\377\376\376\376\204\377" \ + "\377\377\3\221\221\223;;=99;\204::<\3xxz\377\377\377\376\376\376\202" \ + "\377\377\377\202\376\376\376\217\377\377\377\1kkm\202::<\5;;=99;;;=9" \ + "9;\317\317\317\233\377\377\377\1\376\376\376\237\377\377\377\1\376\376" \ + "\376\204\377\377\377\3\376\376\376\377\377\377GGI\202::<\5;;=::<;;=:" \ + ":<\346\346\346\213\377\377\377\1\376\376\376\202\377\377\377\2``b99;" \ + "\202;;=\203::<\3\247\247\247\377\377\377\376\376\376\225\377\377\377" \ + "\1\234\234\234\206::<\1\234\234\234\243\377\377\377\1kkm\206::<\237\377" \ + "\377\377\1kkm\206::<\1\234\234\236\231\377\377\377\10kkm::<;;=::<;;=" \ + "99;::<\235\235\237\255\377\377\377\202::<\1;;=\204::<\1\301\301\301\215" \ + "\377\377\377\1\234\234\234\206::<\1\316\316\316\206\377\377\377\5\376" \ + "\376\376\364\364\364TTV::<99;\202;;=\203::<\4\332\332\334\376\376\376" \ + "\377\377\377\376\376\376\203\377\377\377\6\376\376\376\377\377\377\363" \ + "\363\363FFH::<;;=\204::<\1__a\210\377\377\377\1\316\316\316\206::<\1" \ + "\234\234\236\213\377\377\377\2\255\333\363Y\270\350\211[\267\350\3Y\270" \ + "\350[\267\350\326\354\371\242\377\377\377\3\276\317\331\0=i\0>i\210\0" \ + "=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240" \ + "\377\377\377\1\234\234\236\206::<\1\234\234\236\224\377\377\377\5\376" \ + "\376\376\377\377\377GGI::<;;=\203::<\4;;=\220\220\222\377\377\377\376" \ + "\376\376\214\377\377\377\1\376\376\376\203\377\377\377\10\376\376\376" \ + "\377\377\377\363\363\363FFH::<;;=99;;;=\202::<\1\316\316\320\202\377" \ + "\377\377\1\376\376\376\204\377\377\377\1\376\376\376\215\377\377\377" \ + "\1kkm\206::<\1\316\316\316\277\377\377\377\3\376\376\376\377\377\377" \ + "\265\265\267\204::<\3;;=::<\205\205\205\213\377\377\377\1\376\376\376" \ + "\202\377\377\377\2\376\376\376\265\265\265\202::<\5""99;<<>::<;;=SSU" \ + "\202\377\377\377\1\376\376\376\224\377\377\377\1\234\234\234\206::<\1" \ + "\234\234\234\243\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206::<" \ + "\1\234\234\236\230\377\377\377\2\376\376\376SSU\204::<\3;;=::<\266\266" \ + "\266\253\377\377\377\3\376\376\376\377\377\377^^`\206::<\1\234\234\234" \ + "\202\377\377\377\1\376\376\376\212\377\377\377\1\234\234\234\206::<\1" \ + "\316\316\316\205\377\377\377\6\376\376\376\377\377\377\376\376\376\315" \ + "\315\317::<;;=\202::<\4;;=99;::<``b\210\377\377\377\4xxz99;<<>::<\202" \ + ";;=\202::<\1\332\332\332\203\377\377\377\1\376\376\376\204\377\377\377" \ + "\1\316\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270" \ + "\350\211[\267\350\3Y\270\350[\267\350\326\354\371\242\377\377\377\3\276" \ + "\317\331\0=i\0>i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316" \ + "\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236" \ + "\226\377\377\377\1\234\234\234\206::<\2FFH\376\376\376\214\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\376\376\376\203\377\377\377\3\265\265" \ + "\265;;=99;\202;;=\202::<\1SSU\202\377\377\377\1\376\376\376\223\377\377" \ + "\377\1kkm\203::<\4""99;::<;;=\316\316\320\275\377\377\377\202\376\376" \ + "\376\4\377\377\377\376\376\376SSU;;=\202::<\4;;=::<;;=\332\332\332\215" \ + "\377\377\377\5\376\376\376\377\377\377\376\376\376SSU;;=\204::<\2;;=" \ + "\264\264\264\226\377\377\377\1\234\234\234\206::<\1\234\234\234\243\377" \ + "\377\377\1kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\231\377" \ + "\377\377\207::<\1\316\316\316\254\377\377\377\2\376\376\376lln\202::" \ + "<\1;;=\202::<\4;;=\233\233\233\377\377\377\376\376\376\202\377\377\377" \ + "\1\376\376\376\210\377\377\377\1\234\234\234\206::<\1\316\316\316\203" \ + "\377\377\377\202\376\376\376\204\377\377\377\1\234\234\234\207::<\1\234" \ + "\234\236\205\377\377\377\4\376\376\376\300\300\302::<;;=\205::<\2\234" \ + "\234\234\376\376\376\202\377\377\377\1\376\376\376\205\377\377\377\1" \ + "\316\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270" \ + "\350\211[\267\350\3Y\270\350[\267\350\326\354\371\242\377\377\377\3\276" \ + "\317\331\0=i\0>i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316" \ + "\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236" \ + "\226\377\377\377\1\347\347\347\204::<\5;;=99;;;=\265\265\265\376\376" \ + "\376\222\377\377\377\2___99;\202::<\4;;=::<;;=\265\265\265\207\377\377" \ + "\377\1\376\376\376\216\377\377\377\1kkm\203::<\1;;=\202::<\1;;=\233:" \ + ":<\5""99;;;=::<:::\234\234\234\240\377\377\377\2\316\316\316;;=\204:" \ + ":<\2;;=kkm\221\377\377\377\1\234\234\236\203::<\1;;=\202::<\3kkk\377" \ + "\377\377\376\376\376\224\377\377\377\1\234\234\234\206::<\1\234\234\234" \ + "\243\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236" \ + "\231\377\377\377\207::<\1\316\316\316\255\377\377\377\2\221\221\221;" \ + ";=\205::<\1\204\204\204\203\377\377\377\1\376\376\376\211\377\377\377" \ + "\1\234\234\234\206::<\1\316\316\316\210\377\377\377\3\376\376\376\377" \ + "\377\377``b\202::<\7;;=::<;;=::<;;=\332\332\332\376\376\376\202\377\377" \ + "\377\3\376\376\376\363\363\363GGI\203::<\4;;=::<;;=__a\206\377\377\377" \ + "\1\376\376\376\203\377\377\377\1\316\316\316\206::<\1\234\234\236\213" \ + "\377\377\377\2\255\333\363Y\270\350\211[\267\350\3Y\270\350[\267\350" \ + "\326\354\371\242\377\377\377\3\276\317\331\0=i\0>i\210\0=i\3\0>i\0=i" \ + "\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377" \ + "\1\234\234\236\206::<\1\234\234\236\227\377\377\377\1\204\204\206\204" \ + "::<\3;;=::i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316" \ + "\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\227\377" \ + "\377\377\1\315\315\315\205::<\3;;=::<\332\332\334\221\377\377\377\1\204" \ + "\204\206\205::<\2;;=\205\205\205\227\377\377\377\1kkm\203::<\3;;=::<" \ + ";;=\234::<\1:9>\203::<\1\234\234\236\237\377\377\377\1\331\331\331\202" \ + ";;=\204::<\1SSU\217\377\377\377\5\376\376\376\377\377\377\376\376\376" \ + "\377\377\377\204\204\204\204::<\3;;=99;yyy\203\377\377\377\1\376\376" \ + "\376\221\377\377\377\1\234\234\234\206::<\1\234\234\234\235\377\377\377" \ + "\1\376\376\376\205\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206:" \ + ":<\1\234\234\236\231\377\377\377\203::<\1;;=\203::<\202\377\377\377\1" \ + "\376\376\376\253\377\377\377\2\233\233\235;;=\205::<\3kkm\377\377\377" \ + "\376\376\376\202\377\377\377\1\376\376\376\210\377\377\377\1\234\234" \ + "\234\206::<\1\316\316\316\213\377\377\377\1\234\234\236\202;;=\1""99" \ + ";\203::<\5;;=\235\235\235\377\377\377\376\376\376\302\302\302\207::<" \ + "\1\251\251\251\213\377\377\377\1\316\316\316\206::<\1\234\234\236\213" \ + "\377\377\377\2\255\333\363Y\270\350\211[\267\350\3Y\270\350[\267\350" \ + "\326\354\371\242\377\377\377\3\276\317\331\0=i\0>i\210\0=i\3\0>i\0=i" \ + "\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377" \ + "\1\234\234\236\206::<\1\234\234\236\223\377\377\377\1\376\376\376\204" \ + "\377\377\377\1^^`\202::<\202;;=\3::<<<>\204\204\206\213\377\377\377\1" \ + "\376\376\376\204\377\377\377\1\363\363\363\205::<\3;;=::<\346\346\346" \ + "\227\377\377\377\1kkm\204::<\3;;=::<;;=\234::<\1;;=\202::<\1\234\234" \ + "\236\237\377\377\377\4\204\204\20499;::<;;=\203::<\3\266\266\270\377" \ + "\377\377\376\376\376\221\377\377\377\5\346\346\346;;=::<;;=::<\202;;" \ + "=\4::<\346\346\350\377\377\377\376\376\376\202\377\377\377\1\376\376" \ + "\376\217\377\377\377\1\234\234\234\206::<\1\234\234\234\237\377\377\377" \ + "\202\376\376\376\202\377\377\377\1kkm\206::<\237\377\377\377\1kkm\206" \ + "::<\1\234\234\236\224\377\377\377\6\376\376\376\377\377\377\376\376\376" \ + "\377\377\377\376\376\376;;=\206::<\1\331\331\331\255\377\377\377\1\234" \ + "\234\236\202::<\1;;=\203::<\2kkm\376\376\376\202\377\377\377\1\376\376" \ + "\376\211\377\377\377\1\234\234\234\206::<\1\316\316\316\212\377\377\377" \ + "\3\376\376\376\377\377\377___\204::<\7;;=99;::<\332\332\332\363\363\365" \ + "FFH;;=\204::<\3;;=kkm\376\376\376\213\377\377\377\1\316\316\316\206:" \ + ":<\1\234\234\236\213\377\377\377\2\255\333\363Y\270\350\211[\267\350" \ + "\3Y\270\350[\267\350\326\354\371\242\377\377\377\3\276\317\331\0=i\0" \ + ">i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::" \ + "<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\224\377\377" \ + "\377\1\376\376\376\203\377\377\377\4\265\265\267::<;;=::<\202;;=\3::" \ + "i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206" \ + "::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\231\377\377" \ + "\377\10FFH::<;;=99;;;=::<;;=\265\265\265\216\377\377\377\4\376\376\376" \ + "TTV99;;;=\202::<\202;;=\1\301\301\301\230\377\377\377\1kkm\202::<\1;" \ + ";=\204::<\3;;=::<;;=\232::<\5;;=::<\234\234\234\377\377\377\376\376\376" \ + "\232\377\377\377\3\376\376\376\377\377\377\221\221\221\202::<\1""99;" \ + "\203::<\5\234\234\236\377\377\377\376\376\376\377\377\377\376\376\376" \ + "\216\377\377\377\1\376\376\376\202\377\377\377\2\316\316\320::<\202;" \ + ";=\204::<\2\363\363\363\376\376\376\202\377\377\377\1\376\376\376\217" \ + "\377\377\377\1\234\234\234\206::<\1\234\234\234\243\377\377\377\1kkm" \ + "\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\224\377\377\377\1\376" \ + "\376\376\204\377\377\377\1""99;\202::<\1;;=\203::<\1\316\316\316\252" \ + "\377\377\377\10\376\376\376\377\377\377\376\376\376kkm;;=::<;;=99;\202" \ + "::<\1\234\234\236\215\377\377\377\1\234\234\234\206::<\1\316\316\316" \ + "\215\377\377\377\5\247\247\247;;=99;::<;;=\210::<\5""99;::<\250\250\252" \ + "\377\377\377\376\376\376\213\377\377\377\1\316\316\316\206::<\1\234\234" \ + "\236\213\377\377\377\2\255\333\363Y\270\350\211[\267\350\3Y\270\350[" \ + "\267\350\326\354\371\242\377\377\377\3\276\317\331\0=i\0>i\210\0=i\3" \ + "\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377" \ + "\377\377\1\234\234\236\206::<\1\234\234\236\223\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\203\377\377\377\1\234\234\236\202::<\1;" \ + ";=\202::<\2""99;SSU\214\377\377\377\5\376\376\376\377\377\377\301\301" \ + "\301;;=<<>\202::<\3;;=::i\210\0=i\3\0>i\0=i\177\236\263" \ + "\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234\234" \ + "\236\206::<\1\234\234\236\224\377\377\377\1\376\376\376\204\377\377\377" \ + "\2\346\346\34699;\202::<\2;;=::<\202;;=\1\315\315\315\212\377\377\377" \ + "\1\376\376\376\202\377\377\377\1yy{\203::<\4;;=99;;;=\250\250\250\202" \ + "\377\377\377\1\376\376\376\226\377\377\377\1kkm\206::<\1\317\317\317" \ + "\240\377\377\377\1\376\376\376\234\377\377\377\1\234\234\234\202::<\2" \ + "99;;;=\202::<\1\204\204\206\203\377\377\377\1\376\376\376\220\377\377" \ + "\377\1\376\376\376\202\377\377\377\2\264\264\264::<\202;;=\203::<\3G" \ + "GI\364\364\364\376\376\376\202\377\377\377\1\376\376\376\216\377\377" \ + "\377\1\234\234\234\206::<\1\234\234\234\241\377\377\377\3\376\376\376" \ + "\377\377\377kkm\206::<\237\377\377\377\1kkm\206::<\1\234\234\236\225" \ + "\377\377\377\202\376\376\376\202\377\377\377\12kkm::<;;=99;::<;;=::<" \ + "\204\204\204\377\377\377\376\376\376\251\377\377\377\4\376\376\376\377" \ + "\377\377::<99;\202;;=\203::<\1\316\316\320\215\377\377\377\1\234\234" \ + "\234\206::<\1\316\316\316\216\377\377\377\5\346\346\350GGI;;=::<;;=\202" \ + "::<\2""99;;;=\202::<\3;;=GGI\346\346\350\216\377\377\377\1\316\316\316" \ + "\206::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270\350\211[\267" \ + "\350\3Y\270\350[\267\350\326\354\371\242\377\377\377\3\276\317\331\0" \ + "=i\0>i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206" \ + "::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\231\377\377" \ + "\377\2\376\376\376\205\205\205\202::<\5""99;;;=::<;;=\205\205\207\213" \ + "\377\377\377\12\376\376\376\346\346\346::<;;=99;::<99;;;=FFH\363\363" \ + "\363\231\377\377\377\1kkm\202::<\2;;=::<\202;;=\3\316\316\316\377\377" \ + "\377\376\376\376\234\377\377\377\1\376\376\376\236\377\377\377\1SSS\204" \ + "::<\3;;=99;\347\347\351\204\377\377\377\1\376\376\376\215\377\377\377" \ + "\1\376\376\376\205\377\377\377\1SSU\203::<\4;;=99;::<\265\265\265\202" \ + "\377\377\377\1\376\376\376\217\377\377\377\1\234\234\234\206::<\1\234" \ + "\234\234\242\377\377\377\2\376\376\376SSU\206::<\237\377\377\377\1kk" \ + "m\206::<\1\234\234\236\231\377\377\377\4\221\221\223;;=::<;;=\202::<" \ + "\3;;=___\376\376\376\253\377\377\377\1\332\332\332\204::<\1;;=\202::" \ + "<\1\346\346\350\203\377\377\377\1\376\376\376\211\377\377\377\1\234\234" \ + "\234\206::<\1\316\316\316\217\377\377\377\1\250\250\252\204::<\202;;" \ + "=\2::<;;=\202::<\1\265\265\267\217\377\377\377\1\316\316\316\206::<\1" \ + "\234\234\236\213\377\377\377\2\255\333\363Y\270\350\211[\267\350\3Y\270" \ + "\350[\267\350\326\354\371\242\377\377\377\3\276\317\331\0=i\0>i\210\0" \ + "=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240" \ + "\377\377\377\1\234\234\236\206::<\1\234\234\236\232\377\377\377\1\316" \ + "\316\316\203::<\2""99;<<>\202::<\1\346\346\350\213\377\377\377\4\221" \ + "\221\223;;=::<;;=\203::<\1\204\204\206\232\377\377\377\1kkm\203::<\1" \ + ";;=\202::<\1\316\316\316\274\377\377\377\2\265\265\267;;=\205::<\1xx" \ + "x\231\377\377\377\1\250\250\250\206::<\1TTV\222\377\377\377\1\234\234" \ + "\234\204::<\3;;=::<\235\235\235\203\377\377\377\1\376\376\376\237\377" \ + "\377\377\202;;=\203::<\3;;=::<\376\376\376\236\377\377\377\1kkm\206:" \ + ":<\1\234\234\236\225\377\377\377\1\376\376\376\203\377\377\377\1\265" \ + "\265\267\204::<\1;;=\202::<\1\363\363\363\253\377\377\377\1\250\250\250" \ + "\204::<\3;;=::j\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316" \ + "\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\233\377" \ + "\377\377\1``b\205::<\2;;=\235\235\237\210\377\377\377\1\376\376\376\202" \ + "\377\377\377\2FFH;;=\205::<\1\346\346\346\202\377\377\377\1\376\376\376" \ + "\227\377\377\377\1kkm\206::<\1\316\316\316\266\377\377\377\1\376\376" \ + "\376\205\377\377\377\5__a::<;;=::<;;=\202::<\1SSU\202kkm\1lln\203kkm" \ + "\1lln\222kkm\4__a;;=99;;;=\204::<\3\301\301\301\377\377\377\376\376\376" \ + "\215\377\377\377\202\376\376\376\1\235\235\235\204::<\3""99;;;=\221\221" \ + "\221\243\377\377\377\203::<\1;;=\202::<\1""99;\237\377\377\377\1kkm\206" \ + "::<\1\234\234\236\231\377\377\377\1\332\332\332\202::<\3;;=::<99;\202" \ + ";;=\1\264\264\264\210\377\377\377\1\376\376\376\232\377\377\377\1\376" \ + "\376\376\206\377\377\377\2\376\376\376xxx\202::<\1;;=\203::<\1xxz\216" \ + "\377\377\377\1\234\234\234\206::<\1\316\316\316\220\377\377\377\3\363" \ + "\363\365FFH;;=\202::<\1;;=\202::<\2FFH\363\363\363\220\377\377\377\1" \ + "\316\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270" \ + "\350\211[\267\350\10X\267\347Y\267\352\326\354\371\377\377\377\376\376" \ + "\376\377\376\377\377\377\377\377\376\377\234\377\377\377\2\376\376\374" \ + "\277\320\330\212\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316" \ + "\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\233" \ + "\377\377\377\1\265\265\267\203::<\4""99;;;=::9" \ + "9;::<;;=::<99;\203::<\2;;=99;\202::<\1;;=\224::<\1;;=\202::<\1;;=\203" \ + "::<\1kkm\203\377\377\377\1\376\376\376\215\377\377\377\1\300\300\300" \ + "\202::<\11;;=::<99;;;=jjl\377\377\377\376\376\376\377\377\377\376\376" \ + "\376\236\377\377\377\1\346\346\350\206::<\1__a\237\377\377\377\1kkm\206" \ + "::<\1\234\234\236\231\377\377\377\2\376\376\376SSU\206::<\2yy{\376\376" \ + "\376\206\377\377\377\1\376\376\376\234\377\377\377\1\376\376\376\205" \ + "\377\377\377\4\363\363\363::<<<>99;\202::<\3;;=::<\265\265\267\203\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\210\377\377\377\1\234" \ + "\234\234\206::<\1\316\316\316\221\377\377\377\4\301\301\30199;::<;;=" \ + "\202::<\6;;=\301\301\301\377\377\377\376\376\376\377\377\377\376\376" \ + "\376\215\377\377\377\1\316\316\316\206::<\1\234\234\236\213\377\377\377" \ + "\2\255\333\363Y\270\350\211[\267\350\6Y\270\350Y\267\352\325\353\370" \ + "\377\377\377\376\377\375\377\375\377\234\377\377\377\5\376\376\376\377" \ + "\377\377\377\377\375\276\317\327\2\77k\211\0=i\3\0>i\0=i\177\236\263" \ + "\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234\234" \ + "\236\206::<\1\234\234\236\234\377\377\377\1GGI\203::<\1;;=\202::<\2\301" \ + "\301\301\376\376\376\204\377\377\377\1\376\376\376\203\377\377\377\3" \ + "lln::<;;=\202::<\202;;=\4\301\301\303\376\376\376\377\377\377\376\376" \ + "\376\230\377\377\377\1kkm\206::<\1\316\316\316\265\377\377\377\1\376" \ + "\376\376\205\377\377\377\3kkm::<;;=\202::<\2""99;<<>\202::<\3;;=::<;" \ + ";=\202::<\1;;=\222::<\4""99;;;=::<;;=\203::<\1;;=\202::<\3\316\316\316" \ + "\377\377\377\376\376\376\215\377\377\377\3\376\376\376\316\316\316;;" \ + "=\203::<\3;;=::\204::<\3\346" \ + "\346\346\377\377\377\376\376\376\202\377\377\377\1\376\376\376\211\377" \ + "\377\377\1\234\234\234\206::<\1\316\316\316\220\377\377\377\14\376\376" \ + "\376\377\377\377yy{::<99;;;=::j\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316" \ + "\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\234" \ + "\377\377\377\1\234\234\234\206::<\3jjj\377\377\377\376\376\376\204\377" \ + "\377\377\4\376\376\376\377\377\377\332\332\33299;\203::<\3;;=::j\210\0=i\3\0>i\0=i\177" \ + "\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1" \ + "\234\234\236\206::<\1\234\234\236\233\377\377\377\2\376\376\376\347\347" \ + "\347\202::<\2;;=::<\203;;=\1\346\346\346\207\377\377\377\5\204\204\204" \ + "<<>99;::<;;=\202::<\2\251\251\251\376\376\376\205\377\377\377\1\376\376" \ + "\376\225\377\377\377\1kkm\206::<\1\316\316\316\264\377\377\377\1\376" \ + "\376\376\205\377\377\377\3\204\204\206::<;;=\203::<\1;;=\205::<\1;;=" \ + "\225::<\3;;=::<;;=\202::<\1;;=\202::<\1;;=\202::<\1\347\347\347\220\377" \ + "\377\377\2SSU;;=\203::<\3;;=::<\265\265\265\237\377\377\377\7\376\376" \ + "\376\377\377\377lln99;::<;;=99;\202::<\1\265\265\267\237\377\377\377" \ + "\1kkm\206::<\1\234\234\236\225\377\377\377\1\376\376\376\204\377\377" \ + "\377\3\376\376\376SSU;;=\204::<\3;;=FFH\346\346\346\202\377\377\377\1" \ + "\376\376\376\237\377\377\377\1\376\376\376\204\377\377\377\2\265\265" \ + "\267;;=\202::<\1;;=\203::<\1\265\265\265\217\377\377\377\1\234\234\234" \ + "\206::<\1\316\316\316\223\377\377\377\4\301\301\301::<:::\302\302\302" \ + "\223\377\377\377\1\316\316\316\206::<\1\234\234\236\213\377\377\377\2" \ + "\255\333\363Y\270\350\212[\267\350\2Y\270\350\332\354\370\202\377\377" \ + "\377\3\376\376\376\376\377\377\377\376\373\235\377\377\377\1\276\317" \ + "\331\202\0>i\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316" \ + "\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236\235" \ + "\377\377\377\1\204\204\204\206::<\1\221\221\223\206\377\377\377\2\363" \ + "\363\363GGI\202::<\5""99;;;=::i\210\0=i\3\0>i\0=i\177\236" \ + "\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234" \ + "\234\236\206::<\1\234\234\236\235\377\377\377\1\316\316\316\206::<\1" \ + "FFH\203\377\377\377\1\376\376\376\202\377\377\377\1\250\250\250\203:" \ + ":<\1;;=\202::<\1\204\204\206\203\377\377\377\1\376\376\376\231\377\377" \ + "\377\1kkm\206::<\1\316\316\316\271\377\377\377\1\234\234\236\204::<\4" \ + ";;=::j\0>i\210\0=i\3\0>i\0=i\177\236\263\232" \ + "\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234\234\236" \ + "\206::<\1\234\234\236\236\377\377\377\2__a;;=\204::<\5;;=\265\265\265" \ + "\376\376\376\377\377\377\376\376\376\202\377\377\377\1SSU\204::<\3;;" \ + "=::<\346\346\350\235\377\377\377\1kkm\206::<\1\316\316\316\270\377\377" \ + "\377\2\363\363\365GGI\205::<\3;;=\333\333\333\376\376\376\237\377\377" \ + "\377\10FFH::<;;=::<;;=99;;;=\233\233\235\217\377\377\377\5\346\346\346" \ + "::<;;=::<;;=\203::<\1\234\234\234\210\377\377\377\1\376\376\376\217\377" \ + "\377\377\1\376\376\376\206\377\377\377\1TTT\205::<\3;;=\221\221\221\376" \ + "\376\376\237\377\377\377\1kkm\206::<\1\234\234\236\234\377\377\377\12" \ + "\233\233\233::<;;=::<;;=::<;;=::l\0\77j\210\0=i\3\0>i\0=" \ + "i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377" \ + "\1\234\234\236\206::<\1\234\234\236\236\377\377\377\1\265\265\265\204" \ + "::<\3;;=::<__a\204\377\377\377\1\317\317\321\206::<\1kkk\236\377\377" \ + "\377\1kkm\206::<\1\316\316\316\267\377\377\377\3\376\376\376\250\250" \ + "\25299;\202;;=\203::<\1kkm\233\377\377\377\1\376\376\376\205\377\377" \ + "\377\10\234\234\236;;=::<;;=::<;;=99;GGI\204\377\377\377\3\376\376\376" \ + "\377\377\377\376\376\376\210\377\377\377\5\376\376\376__a::<;;=99;\203" \ + ";;=\2FFH\363\363\363\204\377\377\377\3\376\376\376\377\377\377\376\376" \ + "\376\224\377\377\377\5\376\376\376\377\377\377\301\301\301:::;;=\202" \ + "::<\202;;=\4::<\332\332\332\377\377\377\376\376\376\236\377\377\377\1" \ + "kkm\206::<\1\234\234\236\233\377\377\377\3\376\376\376\364\364\364FF" \ + "H\205::<\4;;=99;xxx\376\376\376\203\377\377\377\1\376\376\376\203\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\224\377\377\377" \ + "\4\376\376\376\377\377\377\362\362\362GGI\202::<\6;;=::<;;=::<99;\250" \ + "\250\252\221\377\377\377\1\234\234\234\206::<\1\316\316\316\252\377\377" \ + "\377\1\316\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363" \ + "Y\270\350\211[\267\350\7Y\267\352X\267\347[\266\353\301\344\367\377\377" \ + "\377\376\376\376\376\377\377\211\377\377\377\6\377\376\377\377\377\377" \ + "\377\375\376\377\377\377\377\377\375\377\376\377\202\377\377\377\210" \ + "\377\376\377\10\377\377\375\376\377\377\377\377\377\376\377\375\237\266" \ + "\306\0=i\2=g\0>e\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316" \ + "\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234\236" \ + "\237\377\377\377\1EEG\202::<\202;;=\11""99;;;=\332\332\332\377\377\377" \ + "\376\376\376\377\377\377xxz::<;;=\204::<\1\302\302\302\236\377\377\377" \ + "\1kkm\206::<\1\316\316\316\266\377\377\377\4\376\376\376\377\377\377" \ + "SSU;;=\202::<\1;;=\202::<\1\316\316\320\235\377\377\377\15\376\376\376" \ + "\377\377\377\376\376\376\377\377\377\363\363\365::<;;=99;;;=::<;;=::" \ + "<\265\265\265\215\377\377\377\3\376\376\376\377\377\377\266\266\270\202" \ + "::<\1;;=\203::<\2;;=\204\204\206\205\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\213\377\377\377\1\376\376\376\205\377\377\377\1\376" \ + "\376\376\202\377\377\377\2\363\363\363SSU\203::<\4;;=99;;;=SSU\241\377" \ + "\377\377\1kkm\206::<\1\234\234\236\235\377\377\377\3\265\265\265;;=9" \ + "9;\202::<\1;;=\203::<\1\204\204\206\206\377\377\377\1\376\376\376\216" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\206\377\377\377\6" \ + "\376\376\376\377\377\377\362\362\364``b::<;;=\202::<\1;;=\202::<\2aa" \ + "c\376\376\376\221\377\377\377\1\234\234\234\206::<\1\316\316\316\252" \ + "\377\377\377\1\316\316\316\206::<\1\234\234\236\213\377\377\377\2\255" \ + "\333\363Y\270\350\211[\267\350\10X\267\347[\267\346[\265\347[\267\346" \ + "\230\320\361\327\360\367\325\356\365\331\355\370\210\326\354\371\10\325" \ + "\355\367\323\355\372\366\373\377\377\376\374\376\377\375\276\320\332" \ + "\277\320\330\301\317\330\210\276\317\331\10\276\317\327\276\320\334\301" \ + "\316\327_\207\241\0>i\0=l\0\77k\0>i\210\0=i\3\0>i\0=i\177\236\263\232" \ + "\377\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234\234\236" \ + "\206::<\1\234\234\236\237\377\377\377\3\222\222\224::<;;=\202::<\3;;" \ + "=99;\205\205\207\202\377\377\377\2\346\346\346;;=\202::<\1;;=\202::<" \ + "\1SSU\237\377\377\377\1kkm\206::<\1\316\316\316\267\377\377\377\5\265" \ + "\265\26799;;;=::<;;=\202::<\1TTV\243\377\377\377\1\204\204\206\205::" \ + "<\2;;=SSU\206\377\377\377\1\376\376\376\210\377\377\377\3\376\376\376" \ + "GGI;;=\202::<\5;;=::<;;=::<\301\301\303\203\377\377\377\1\376\376\376" \ + "\214\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\376\376\376\204\377\377\377\3\204\204\206;;=::<\202;;=\203" \ + "::<\1\265\265\265\241\377\377\377\1kkm\206::<\1\234\234\236\236\377\377" \ + "\377\12kkk::<99;;;=::<99;;;=::<;;=\204\204\206\210\377\377\377\202\376" \ + "\376\376\213\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376" \ + "\202\377\377\377\1\376\376\376\202\377\377\377\2\364\364\366__a\206:" \ + ":<\3;;=::<\332\332\332\222\377\377\377\1\234\234\234\206::<\1\316\316" \ + "\316\252\377\377\377\1\316\316\316\206::<\1\234\234\236\213\377\377\377" \ + "\2\255\333\363Y\270\350\211[\267\350\3\\\266\350X\270\352\\\266\352\202" \ + "[\267\350\3X\267\347Y\270\350Z\266\347\210Y\270\350\10[\267\350[\265" \ + "\351\327\355\372\376\377\377\377\377\375\0>j\0>i\1\77h\210\0>i\10\0\77" \ + "k\0>g\2=g\0=i\0\77j\0j\210\0=i\3\0>i\0=i\177\236\263\232\377" \ + "\377\377\1\316\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206" \ + "::<\1\234\234\236\236\377\377\377\2\376\376\376\346\346\346\202::<\10" \ + ";;=::<99;;;=::<\363\363\363\377\377\377\234\234\236\202::<\6;;=::<;;" \ + "=::<\250\250\250\376\376\376\236\377\377\377\1kkm\206::<\1\316\316\316" \ + "\267\377\377\377\10kkm;;=::<;;=99;::<;;=\264\264\266\236\377\377\377" \ + "\1\376\376\376\204\377\377\377\2\346\346\346;;=\202::<\202;;=\202::<" \ + "\2\316\316\320\376\376\376\203\377\377\377\1\376\376\376\205\377\377" \ + "\377\3\376\376\376\377\377\377\376\376\376\202\377\377\377\3\234\234" \ + "\234::<;;=\202::<\6;;=::<;;=GGI\332\332\332\376\376\376\224\377\377\377" \ + "\1\376\376\376\203\377\377\377\2\266\266\266;;=\202::<\6;;=::<;;=::<" \ + "SSU\376\376\376\241\377\377\377\1kkm\206::<\1\234\234\236\236\377\377" \ + "\377\2\363\363\363GGI\203::<\1;;=\203::<\3""99;\204\204\204\363\363\363" \ + "\225\377\377\377\1\376\376\376\204\377\377\377\4\376\376\376\346\346" \ + "\346``b::<\202;;=\3::<99;<<>\202::<\1\250\250\250\223\377\377\377\1\234" \ + "\234\234\206::<\1\316\316\316\252\377\377\377\1\316\316\316\206::<\1" \ + "\234\234\236\213\377\377\377\2\255\333\363Y\270\350\211[\267\350\10Y" \ + "\270\350X\270\353Y\267\352X\266\351X\271\346[\267\350\\\266\353[\267" \ + "\350\210Y\270\350\7X\267\345]\267\351\323\355\372\377\376\377\376\377" \ + "\377\4=h\0>g\211\0=i\10\2=i\0@j\0>i\1>j\0>i\1\77h\0>g\0>j\210\0=i\3\0" \ + ">i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377" \ + "\377\377\1\234\234\236\206::<\1\234\234\236\237\377\377\377\6\376\376" \ + "\376yy{::<;;=::<;;=\202::<\4\251\251\251\376\376\376SSU;;=\203::<\3;" \ + ";=FFH\363\363\363\237\377\377\377\1kkm\206::<\1\316\316\316\264\377\377" \ + "\377\5\376\376\376\377\377\377\315\315\317::<;;=\204::<\2FFH\376\376" \ + "\376\237\377\377\377\1\376\376\376\203\377\377\377\3\376\376\376kkm;" \ + ";=\204::<\6""99;lln\377\377\377\376\376\376\377\377\377\376\376\376\202" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\205\377\377\377\10" \ + "\376\376\376\377\377\377SSU::<99;;;=99;;;=\202::<\2FFF\332\332\332\203" \ + "\377\377\377\1\376\376\376\212\377\377\377\1\376\376\376\210\377\377" \ + "\377\1\265\265\265\206::<\3""99;::<\265\265\265\203\377\377\377\1\376" \ + "\376\376\236\377\377\377\1kkm\206::<\1\234\234\236\233\377\377\377\1" \ + "\376\376\376\203\377\377\377\1\331\331\331\204::<\3""99;;;=99;\202;;" \ + "=\2^^^\332\332\332\202\377\377\377\1\376\376\376\216\377\377\377\1\376" \ + "\376\376\206\377\377\377\5\376\376\376\316\316\316FFH::<;;=\204::<\7" \ + "99;::<\204\204\204\377\377\377\376\376\376\377\377\377\376\376\376\220" \ + "\377\377\377\1\234\234\234\206::<\1\316\316\316\252\377\377\377\1\316" \ + "\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363Y\270\350" \ + "\213[\267\350\6Y\270\350[\266\353[\267\350]\267\351X\266\351X\270\350" \ + "\210[\267\350\10X\266\351Z\266\351\326\354\367\377\376\377\376\377\372" \ + "\0>j\0>i\1>j\210\0=i\10\1\77h\0=h\0>i\1\77h\0>j\0=i\0>i\1>j\210\0=i\3" \ + "\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm\240\377" \ + "\377\377\1\234\234\236\206::<\1\234\234\236\237\377\377\377\2\376\376" \ + "\376\316\316\316\203::<\1;;=\202::<\4SSU\265\265\267;;=99;\202::<\5;" \ + ";=99;\204\204\204\377\377\377\376\376\376\236\377\377\377\1kkm\206::" \ + "<\1\316\316\316\263\377\377\377\1\376\376\376\202\377\377\377\1xxz\202" \ + "::<\1;;=\202::<\3""99;\234\234\236\376\376\376\236\377\377\377\1\375" \ + "\375\375\202\377\377\377\1\376\376\376\202\377\377\377\5\317\317\317" \ + "99;::<;;=::<\202;;=\2::<\332\332\332\210\377\377\377\3\376\376\376\377" \ + "\377\377\376\376\376\204\377\377\377\2\316\316\316;;=\206::<\3;;=::<" \ + "\250\250\252\217\377\377\377\1\376\376\376\204\377\377\377\2\363\363" \ + "\363\222\222\224\202::<\2;;=::<\202;;=\3""99;;;=kkm\205\377\377\377\1" \ + "\376\376\376\235\377\377\377\1kkm\206::<\1\234\234\236\235\377\377\377" \ + "\1\376\376\376\202\377\377\377\2\266\266\26699;\202::<\3;;=::<;;=\202" \ + "::<\3;;=FFH\234\234\234\202\377\377\377\1\376\376\376\223\377\377\377" \ + "\2\364\364\364\204\204\206\202::<\1;;=\202::<\1;;=\202::<\3""99;``b\376" \ + "\376\376\224\377\377\377\1\234\234\234\206::<\1\316\316\316\252\377\377" \ + "\377\1\316\316\316\206::<\1\234\234\236\213\377\377\377\2\255\333\363" \ + "Y\270\350\211[\267\350\10Y\271\353Z\266\347\\\267\344[\267\346X\267\347" \ + "[\267\350X\270\353Z\266\347\210Y\270\350\10Y\267\352\\\267\346\325\355" \ + "\371\377\377\377\376\377\377\0>g\0\77k\0>i\210\0\77j\10\0>i\3>h\0=i\0" \ + "\77i\0=j\0>g\0=j\0=f\210\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1" \ + "\316\316\316\206::<\1kkm\240\377\377\377\1\234\234\236\206::<\1\234\234" \ + "\236\234\377\377\377\3\376\376\376\377\377\377\376\376\376\202\377\377" \ + "\377\2SSU;;=\202::<\202;;=\3::j\0=i\1>j\210\0>i\10\0\77j\1\77h\0>j\0>g\3>j\0\77i\0=j\0>i\210" \ + "\0=i\3\0>i\0=i\177\236\263\232\377\377\377\1\316\316\316\206::<\1kkm" \ + "\240\377\377\377\1\234\234\236\206::<\1\234\234\236\241\377\377\377\6" \ + "\266\266\270::<;;=::<99;::<\202;;=\205::<\2kkm\376\376\376\240\377\377" \ + "\377\1kkm\206::<\1\316\316\316\265\377\377\377\4\205\205\205;;=::<;;" \ + "=\203::<\3\204\204\206\377\377\377\376\376\376\245\377\377\377\1\265" \ + "\265\267\207::<\2\346\346\346\376\376\376\216\377\377\377\4\376\376\376" \ + "lll::<;;=\202::<\13;;=::<;;=::<;;=::g\1\1>k\220\0=i\15\0>g\1>j\0>" \ + "i\0\77j\1>j\0=i\0\77j\0>j\0=i\199;\203::<\1;;=\202::<\2""99;;;=\203::<\1\204\204\206" \ + "\206\377\377\377\1\376\376\376\221\377\377\377\10\234\234\234;;=::<9" \ + "9;;;=::<99;\316\316\316\252\377\377\377\4\317\317\317;;=88:;;=\202::" \ + "<\3;;=\234\234\234\376\376\376\205\377\377\377\1\377\375\377\202\377" \ + "\377\375\6\377\376\377\377\377\375\253\333\362Y\270\350X\267\347Z\266" \ + "\347\202Y\270\350\1[\267\350\202Z\266\347\2[\267\350Z\266\347\220[\267" \ + "\350\5[\267\352Z\266\351\327\355\372\377\375\376\377\376\377\202\1>j" \ + "\1\1>k\220\0>i\202\0=i\14\0\77k\0>i\0=i\1>j\0=i\0=j\0\77k\0=i\177\236" \ + "\263\377\377\377\376\377\377\375\376\377\224\377\377\377\1\376\376\376" \ + "\202\377\377\377\1\316\316\316\203::<\202;;=\3""99;kkm\376\376\376\234" \ + "\377\377\377\1\376\376\376\202\377\377\377\1\233\233\233\202::<\7;;=" \ + "::<;;=::<\234\234\236\377\377\377\376\376\376\233\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\202\377\377\377\4\221\221\221;;=99;;;=\202" \ + "::<\202;;=\203::<\1SSU\203\377\377\377\1\376\376\376\233\377\377\377" \ + "\10\376\376\376\377\377\377\376\376\376kkm::<;;=::<;;=\202::<\1;;=\202" \ + "::<\1;;=\240::<\1kkk\207\377\377\377\1\376\376\376\203\377\377\377\3" \ + "\375\375\375\377\377\377\376\376\376\202\377\377\377\2\233\233\235::" \ + "<\202;;=\203::<\1xxz\251\377\377\377\1\235\235\237\202::<\1;;=\203::" \ + "<\3GGI\363\363\363\376\376\376\217\377\377\377\2\363\363\363yyy\204:" \ + ":<\1;;=\203::<\1;;=\206::<\1""99;\203::<\1;;=\203::<\6;;=99;;;=::<;;" \ + "=99;\202;;=\3""99;GGI\301\301\301\206\377\377\377\1\376\376\376\232\377" \ + "\377\377\1\376\376\376\204\377\377\377\1lln\202::<\1;;=\202::<\2;;=\234" \ + "\234\236\241\377\377\377\1\376\376\376\202\377\377\377\2\332\332\334" \ + "__a\211::<\1;;=\205::<\1;;=\202::<\1;;=\202::<\4;;=::<99;;;=\202::<\1" \ + ";;=\202::<\1;;=\203::<\2FFH\265\265\267\206\377\377\377\3\376\376\376" \ + "\377\377\377\376\376\376\220\377\377\377\3\234\234\236::<;;=\203::<\2" \ + ";;=\316\316\316\252\377\377\377\2\315\315\31599;\203::<\5;;=::<\234\234" \ + "\234\377\377\377\376\376\376\205\377\377\377\7\377\377\375\375\377\376" \ + "\377\377\377\375\376\377\255\333\365Z\266\345[\267\350\202Y\270\350\1" \ + "X\267\347\202Y\267\352\3Z\266\351Z\266\347Y\270\350\221[\267\350\2[\267" \ + "\352\323\355\372\202\376\377\377\1\0=j\222\0=i\204\0>i\14\1\77h\0>g\0" \ + "=f\1>j\0\77i\0>i\177\237\266\377\377\375\377\376\375\377\377\377\376" \ + "\377\377\377\376\377\225\377\377\377\2\316\316\316::<\202;;=\202::<\4" \ + ";;=kkm\377\377\377\376\376\376\235\377\377\377\2\376\376\376\235\235" \ + "\235\202::<\1;;=\202::<\2;;=\234\234\236\242\377\377\377\3\346\346\346" \ + "::<;;=\210::<\2\235\235\237\376\376\376\234\377\377\377\1\376\376\376" \ + "\204\377\377\377\1lln\202::<\3;;=::<;;=\203::<\2;;=99;\240::<\1kkk\210" \ + "\377\377\377\11\376\376\376\377\377\377\376\376\376\377\377\377\376\376" \ + "\376\377\377\377\376\376\376\364\364\366GGI\205::<\6;;=\316\316\316\377" \ + "\377\377\376\376\376\377\377\377\376\376\376\245\377\377\377\11\345\345" \ + "\345;;=::<;;=::<;;=::<;;=\234\234\236\222\377\377\377\7\234\234\234;" \ + ";=::<;;=99;;;=99;\203::<\1;;=\202::<\203;;=\2::<;;=\202::<\1;;=\202:" \ + ":<\1;;=\202::<\12;;=::<;;=99;::<``b\332\332\332\376\376\376\377\377\377" \ + "\376\376\376\202\377\377\377\5\376\376\376\377\377\377\376\376\376\377" \ + "\377\377\376\376\376\232\377\377\377\5\376\376\376\377\377\377\376\376" \ + "\376kkm;;=\202::<\1;;=\202::<\1\234\234\236\236\377\377\377\1\376\376" \ + "\376\207\377\377\377\2\234\234\236;;=\202::<\1;;=\204::<\1;;=\211::<" \ + "\1;;=\202::<\1;;=\202::<\1;;=\202::<\1;;=\203::<\3;;=kkm\346\346\346" \ + "\203\377\377\377\1\376\376\376\204\377\377\377\1\376\376\376\221\377" \ + "\377\377\2\234\234\236;;=\202::<\1;;=\202::<\1\316\316\316\252\377\377" \ + "\377\4\316\316\316;;=99;;;=\203::<\1\234\234\234\210\377\377\377\7\376" \ + "\377\377\377\375\376\377\377\375\256\332\363Y\270\350Y\267\352[\267\352" \ + "\202[\267\350\5X\270\350X\270\352Y\267\352Y\270\350X\267\347\220[\267" \ + "\350\5X\267\347[\267\350\325\355\367\377\377\373\377\377\375\202\0\77" \ + "j\1\0>g\220\0>i\1\0\77j\203\0>i\202\0=i\6\1>j\0>i\0\77h\0>g\177\236\263" \ + "\377\377\375\203\377\377\377\1\377\376\377\222\377\377\377\1\376\376" \ + "\376\202\377\377\377\1\316\316\316\203::<\1;;=\202::<\2kkm\376\376\376" \ + "\233\377\377\377\1\376\376\376\203\377\377\377\5\234\234\234::<;;=::" \ + "<;;=\202::<\1\234\234\236\235\377\377\377\202\376\376\376\202\377\377" \ + "\377\5\376\376\376\377\377\377xxz99;;;=\204::<\4;;=::<;;=\362\362\362" \ + "\237\377\377\377\5\376\376\376\377\377\377\376\376\376kkm;;=\207::<\2" \ + "99;;;=\240::<\1lll\205\377\377\377\1\376\376\376\203\377\377\377\1\376" \ + "\376\376\202\377\377\377\1\376\376\376\202\377\377\377\4\265\265\267" \ + ";;=::<;;=\202::<\2;;=__a\205\377\377\377\1\376\376\376\245\377\377\377" \ + "\3\204\204\206::<;;=\204::<\2SSU\376\376\376\215\377\377\377\1\376\376" \ + "\376\204\377\377\377\2\316\316\316__a\206::<\1;;=\214::<\5;;=::<;;=:" \ + ":<;;=\203::<\2\234\234\234\363\363\363\204\377\377\377\1\376\376\376" \ + "\243\377\377\377\1lln\206::<\2\233\233\235\376\376\376\233\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\376\376\376\207\377\377\377\3\345\345" \ + "\345lln;;=\204::<\5;;=99;::<99;;;=\205::<\1;;=\203::<\3""99;;;=99;\206" \ + "::<\2TTV\265\265\265\234\377\377\377\10\234\234\234;;=::<;;=::<;;=::" \ + "<\316\316\316\252\377\377\377\1\315\315\315\206::<\4\235\235\235\376" \ + "\376\376\377\377\377\376\376\376\205\377\377\377\12\377\377\373\377\377" \ + "\377\377\377\375\267\340\366[\270\344Z\266\351[\267\352Z\266\351[\265" \ + "\347[\267\350\202Y\270\350\2\\\270\351Z\266\347\220[\267\350\10X\267" \ + "\347X\266\351\325\355\371\377\376\377\377\377\377\0\77k\0=h\3>j\220\0" \ + "\77j\16\1>j\0=i\1>j\0=i\0\77j\0>i\0=h\0\77j\0\77h\1g\0\77h\221\0=i\1\0>g\202\1\77h\1\0=i\202\0>i\11\0\77j\0>g\0>" \ + "j\0\77m\336\347\354\376\377\377\377\376\377\376\377\377\377\377\375\222" \ + "\377\377\377\1\376\376\376\203\377\377\377\1\316\316\316\202::<\1;;=" \ + "\203::<\2kkm\376\376\376\233\377\377\377\1\376\376\376\202\377\377\377" \ + "\3\376\376\376\234\234\234;;=\202::<\6""99;::<;;=\234\234\236\377\377" \ + "\377\376\376\376\237\377\377\377\1\376\376\376\202\377\377\377\1SSS\202" \ + ";;=\1""99;\204;;=\3\331\331\331\377\377\377\376\376\376\234\377\377\377" \ + "\3\376\376\376\377\377\377\376\376\376\202\377\377\377\3lll::<;;=\202" \ + "::<\202;;=\203::<\1;;=\240::<\1kkk\204\377\377\377\1\376\376\376\211" \ + "\377\377\377\3\302\302\302;;;999\202::<\3;;=::g\0" \ + "\77m\220\0=i\6\0\77j\0>i\0=h\0\77j\0=i\0\77j\202\0>g\2\1\77h\240\266" \ + "\304\204\377\377\377\2\376\376\376\377\377\375\223\377\377\377\14\376" \ + "\376\376\377\377\377\315\315\315;;=::<:::;;;:::;;;kkk\377\377\377\376" \ + "\376\376\233\377\377\377\1\376\376\376\202\377\377\377\10\235\235\235" \ + "99;::<999;;;:::;;;\233\233\233\234\377\377\377\1\376\376\376\207\377" \ + "\377\377\1\265\265\265\202::<\1;;=\203::<\1kkk\203\377\377\377\1\376" \ + "\376\376\240\377\377\377\2kkk:::\202::<\3;;=99;;;=\244::<\1kkk\205\377" \ + "\377\377\1\376\376\376\210\377\377\377\1\346\346\346\206\316\316\316" \ + "\3\332\332\332\377\377\377\377\377\375\253\377\377\377\2\346\346\346" \ + "\316\316\316\202\316\316\320\203\316\316\316\1\315\315\315\225\377\377" \ + "\377\202\376\376\376\202\377\377\377\4\316\316\320\234\234\236kkmSSU" \ + "\205::<\1;;=\203::<\5kkm\204\204\206\264\264\266\346\346\350\376\376" \ + "\376\214\377\377\377\1\376\376\376\202\377\377\377\202\376\376\376\231" \ + "\377\377\377\1\376\376\376\203\377\377\377\2\331\331\331\317\317\317" \ + "\205\316\316\316\1\347\347\347\243\377\377\377\1\376\376\376\211\377" \ + "\377\377\5\376\376\377\347\347\351\265\265\267\204\204\206lln\212::<" \ + "\4``bxxz\234\234\236\332\332\332\207\377\377\377\1\376\376\376\210\377" \ + "\377\377\1\376\376\376\222\377\377\377\1\346\346\346\203\316\316\320" \ + "\4\316\316\316\316\316\320\315\315\315\364\364\364\251\377\377\377\2" \ + "\376\376\376\364\364\364\205\316\316\316\2\316\316\320\346\346\346\210" \ + "\377\377\377\16\377\376\377\377\377\375\376\377\377\377\377\377\377\375" \ + "\377\326\354\371\241\326\366\206\310\352\200\312\357\202\312\362\204" \ + "\310\357\204\312\356\203\311\355\205\311\360\220\204\312\356\10\203\311" \ + "\355\201\311\361\342\360\371\376\377\377\377\377\375>n\222Bm\215@n\220" \ + "\220@n\217\3@l\217An\217Bo\220\202An\217\5@m\214Dm\213l\223\260\277\320" \ + "\332\376\377\377\202\377\377\377\1\377\377\375\202\377\377\377\1\376" \ + "\377\377\225\377\377\377\3\363\363\363\317\317\321\316\316\320\204\316" \ + "\316\316\1\332\332\332\240\377\377\377\1\346\346\346\202\316\316\320" \ + "\204\316\316\316\1\347\347\347\243\377\377\377\3\376\376\376\363\363" \ + "\363lln\202kkm\1lln\202kkm\1\301\301\301\240\377\377\377\1\376\376\376" \ + "\203\377\377\377\2\331\331\331\317\317\317\202\316\316\316\202\317\317" \ + "\317\245\316\316\316\2\332\332\332\376\376\376\351\377\377\377\5\332" \ + "\332\332\315\315\315\316\316\316\315\315\315\363\363\363\361\377\377" \ + "\377\202\316\316\316\1\317\317\317\202\316\316\316\2\315\315\315\363" \ + "\363\363\377\377\377\377\377\377\377\377\377\377\377\377\334\377\377" \ + "\377\1\376\376\376\375\377\377\377\1\376\376\376\377\377\377\377\377" \ + "\377\377\377\377\377\377\377\340\377\377\377\1\376\376\376\370\377\377" \ + "\377\1\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\342" \ + "\377\377\377\1\376\376\376\377\377\377\377\377\377\377\377\377\377\377" \ + "\377\377\377\377\377\334\377\377\377\1\376\376\376\362\377\377\377\1" \ + "\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\346\377" \ + "\377\377\1\376\376\376\363\377\377\377\1\376\376\376\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\342\377\377\377\1\376\376\376\373\377" \ + "\377\377\1\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377" \ + "\340\377\377\377\3\376\376\376\377\377\377\376\376\376\377\377\377\377" \ + "\377\377\377\377\377\377\377\377\377\377\377\377\243\377\377\377\3\376" \ + "\376\376\377\377\377\376\376\376\203\377\377\377\1\376\376\376\233\377" \ + "\377\377\1\376\376\376\205\377\377\377\1\376\376\376\214\377\377\377" \ + "\1\376\376\376\205\377\377\377\1\376\376\376\260\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\300\377\377\377\1\376\376\376\306\377\377" \ + "\377\1\376\376\376\233\377\377\377\4\376\377\377\376\376\376\377\376" \ + "\377\377\377\377\203\376\377\375\203\377\377\377\3\377\377\375\376\377" \ + "\375\376\377\377\265\377\377\377\4\377\377\375\377\376\377\376\377\377" \ + "\377\377\375\202\377\376\377\210\377\377\377\7\377\377\375\376\377\377" \ + "\377\377\377\375\377\376\376\377\377\377\376\377\376\377\377\211\377" \ + "\377\377\4\376\377\375\377\377\377\376\376\376\377\377\375\202\377\377" \ + "\377\2\377\377\375\376\376\376\220\377\377\377\1\376\377\375\202\377" \ + "\377\375\5\377\376\377\377\377\373\377\377\377\375\377\376\377\377\375" \ + "\210\377\377\377\1\377\376\377\202\377\377\375\202\377\377\377\3\376" \ + "\377\377\377\377\375\377\376\377\213\377\377\377\3\376\377\377\376\377" \ + "\375\377\377\375\203\377\377\377\203\376\377\375\4\377\377\377\377\376" \ + "\377\376\376\376\376\377\377\233\377\377\377\3\376\377\377\376\377\375" \ + "\377\377\375\203\377\377\377\203\376\377\375\4\377\377\377\377\376\377" \ + "\376\376\376\376\377\377\210\377\377\377\1\377\376\377\203\377\377\377" \ + "\4\376\377\377\377\377\375\377\376\377\376\377\373\211\377\377\377\4" \ + "\376\377\377\376\376\374\377\376\377\377\375\376\226\377\377\377\5\376" \ + "\377\377\375\377\374\377\377\375\376\375\377\377\377\375\210\377\377" \ + "\377\1\377\377\375\202\376\377\377\1\377\377\373\242\377\377\377\1\376" \ + "\376\376\212\377\377\377\1\376\376\376\207\377\377\377\1\376\376\376" \ + "\237\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\214\377" \ + "\377\377\1\376\376\376\204\377\377\377\202\376\376\376\257\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\376\376\376\202\377\377\377\1\376\376" \ + "\376\246\377\377\377\1\376\376\376\224\377\377\377\1\376\376\376\250" \ + "\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\236\377\377" \ + "\377\3\376\376\376\377\377\377\376\376\376\230\377\377\377\4\377\377" \ + "\373\376\377\377\376\376\376\377\376\377\203\377\377\377\1\377\377\375" \ + "\202\377\377\377\1\377\376\377\202\377\377\375\3\377\377\377\377\377" \ + "\375\376\376\374\260\377\377\377\2\377\377\375\376\376\376\203\377\376" \ + "\377\214\377\377\377\7\376\377\377\377\376\377\377\377\375\377\377\377" \ + "\377\376\377\375\377\376\377\377\375\210\377\377\377\7\377\376\374\377" \ + "\377\375\377\376\377\377\377\375\376\376\376\377\377\377\376\376\376" \ + "\221\377\377\377\1\377\376\377\203\377\377\377\202\377\377\375\212\377" \ + "\377\377\2\377\377\375\377\377\377\202\377\377\375\214\377\377\377\3" \ + "\376\376\374\377\377\375\377\377\377\202\377\377\375\1\377\376\377\202" \ + "\377\377\377\1\377\377\375\203\377\377\377\4\377\376\377\376\376\376" \ + "\376\377\377\377\377\373\230\377\377\377\3\376\376\374\377\377\375\377" \ + "\377\377\202\377\377\375\1\377\376\377\202\377\377\377\1\377\377\375" \ + "\203\377\377\377\4\377\376\377\376\376\376\376\377\377\377\377\373\213" \ + "\377\377\377\1\377\376\374\214\377\377\377\2\377\377\375\377\376\377" \ + "\202\377\377\375\3\376\377\377\377\377\377\377\377\373\221\377\377\377" \ + "\3\376\377\375\376\377\377\377\376\377\204\377\377\377\1\377\377\375" \ + "\212\377\377\377\5\377\376\377\377\377\375\377\377\377\376\377\375\376" \ + "\377\373\243\377\377\377\1\376\376\376\205\377\377\377\1\376\376\376" \ + "\204\377\377\377\1\376\376\376\242\377\377\377\1\376\376\376\205\377" \ + "\377\377\1\376\376\376\213\377\377\377\1\376\376\376\206\377\377\377" \ + "\1\376\376\376\263\377\377\377\3\376\376\376\377\377\377\376\376\376" \ + "\270\377\377\377\1\376\376\376\312\377\377\377\1\376\376\376\234\377" \ + "\377\377\1\377\377\375\202\376\377\377\7\377\376\377\377\377\377\376" \ + "\377\377\377\376\377\377\377\375\377\377\377\376\377\377\202\377\376" \ + "\377\2\376\377\375\376\377\377\262\377\377\377\10\377\377\375\376\377" \ + "\377\377\376\377\377\377\373\377\377\377\377\376\377\376\377\375\377" \ + "\377\375\211\377\377\377\3\376\377\377\377\376\377\377\377\375\202\377" \ + "\377\377\2\376\377\377\376\376\376\210\377\377\377\202\377\376\377\4" \ + "\374\377\377\376\377\377\377\376\377\377\377\375\222\377\377\377\4\377" \ + "\376\375\376\377\377\377\377\377\376\377\377\202\377\376\377\202\377" \ + "\377\375\210\377\377\377\4\377\377\375\377\377\377\377\377\375\377\377" \ + "\377\202\377\376\377\2\377\377\377\376\377\377\212\377\377\377\2\376" \ + "\377\377\376\377\375\202\377\376\377\7\376\377\377\377\377\377\377\377" \ + "\375\377\376\377\376\377\377\377\377\377\377\376\377\202\376\377\377" \ + "\1\377\377\375\232\377\377\377\2\376\377\377\376\377\375\202\377\376" \ + "\377\7\376\377\377\377\377\377\377\377\375\377\376\377\376\377\377\377" \ + "\377\377\377\376\377\202\376\377\377\1\377\377\375\210\377\377\377\1" \ + "\377\377\375\202\377\377\377\4\377\377\375\377\376\377\377\377\377\376" \ + "\377\377\211\377\377\377\7\375\376\377\377\377\375\377\376\377\376\376" \ + "\377\376\377\375\375\377\376\377\377\375\222\377\377\377\6\376\377\377" \ + "\377\376\377\377\377\377\377\377\375\377\376\377\376\377\377\213\377" \ + "\377\377\202\377\376\377\3\377\377\375\376\377\377\376\377\375\236\377" \ + "\377\377\1\376\376\376\203\377\377\377\1\376\376\376\202\377\377\377" \ + "\1\376\376\376\203\377\377\377\2\376\376\376\377\377\377\202\376\376" \ + "\376\202\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\204" \ + "\377\377\377\1\376\376\376\235\377\377\377\1\376\376\376\217\377\377" \ + "\377\1\376\376\376\206\377\377\377\1\376\376\376\260\377\377\377\3\376" \ + "\376\376\377\377\377\376\376\376\241\377\377\377\202\376\376\376\204" \ + "\377\377\377\1\376\376\376\222\377\377\377\1\376\376\376\205\377\377" \ + "\377\1\376\376\376\246\377\377\377\1\376\376\376\233\377\377\377\3\376" \ + "\376\376\377\377\377\376\376\376\234\377\377\377\15\376\376\376\377\377" \ + "\377\377\376\377\377\377\375\375\377\376\377\377\377\376\377\375\377" \ + "\377\377\375\376\377\377\377\377\377\377\375\376\377\377\377\377\377" \ + "\202\377\376\377\260\377\377\377\7\377\376\377\376\377\377\377\377\377" \ + "\376\377\377\377\377\377\377\377\375\376\377\377\212\377\377\377\1\376" \ + "\376\374\203\377\377\377\3\376\376\377\377\377\375\376\377\377\210\377" \ + "\377\377\10\376\377\377\377\376\377\374\377\373\376\377\373\377\376\377" \ + "\376\376\376\377\377\377\376\377\375\220\377\377\377\2\377\376\377\377" \ + "\377\377\202\377\377\375\202\377\377\377\2\376\376\374\376\377\377\210" \ + "\377\377\377\1\376\377\377\202\377\377\377\5\376\377\377\377\377\377" \ + "\376\376\376\377\377\377\376\377\375\210\377\377\377\202\377\376\377" \ + "\15\377\377\377\376\377\377\377\377\375\377\377\377\375\376\377\377\377" \ + "\377\376\377\375\377\377\377\375\377\376\377\377\375\377\376\377\377" \ + "\377\377\376\376\376\231\377\377\377\202\377\376\377\15\377\377\377\376" \ + "\377\377\377\377\375\377\377\377\375\376\377\377\377\377\376\377\375" \ + "\377\377\377\375\377\376\377\377\375\377\376\377\377\377\377\376\376" \ + "\376\211\377\377\377\4\377\376\377\377\377\377\376\377\375\376\377\377" \ + "\202\377\377\377\2\376\377\377\376\377\375\210\377\377\377\1\376\377" \ + "\375\202\376\376\376\202\377\377\377\2\377\377\375\375\376\377\221\377" \ + "\377\377\10\377\377\375\377\377\377\376\376\374\376\377\373\376\376\376" \ + "\377\376\377\376\377\377\377\377\375\210\377\377\377\6\376\376\376\377" \ + "\377\377\377\377\375\377\377\377\374\375\377\377\377\375\242\377\377" \ + "\377\1\376\376\376\214\377\377\377\1\376\376\376\204\377\377\377\3\376" \ + "\376\376\377\377\377\376\376\376\235\377\377\377\1\376\376\376\203\377" \ + "\377\377\202\376\376\376\212\377\377\377\1\376\376\376\202\377\377\377" \ + "\202\376\376\376\264\377\377\377\5\376\376\376\377\377\377\376\376\376" \ + "\377\377\377\376\376\376\242\377\377\377\3\376\376\376\377\377\377\376" \ + "\376\376\202\377\377\377\1\376\376\376\223\377\377\377\1\376\376\376" \ + "\244\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\233\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\234\377\377\377" \ + "\1\375\377\372\202\377\377\377\3\376\376\376\377\377\375\377\377\377" \ + "\202\376\377\377\204\377\377\377\4\376\377\377\377\377\377\377\376\377" \ + "\375\377\372\260\377\377\377\202\377\377\375\2\377\377\377\376\375\377" \ + "\202\377\377\377\1\375\377\376\212\377\377\377\6\377\377\375\377\377" \ + "\377\376\377\375\377\377\375\377\376\377\377\376\375\212\377\377\377" \ + "\1\377\376\377\202\377\377\377\4\377\375\376\377\377\377\377\377\373" \ + "\376\375\377\221\377\377\377\203\376\376\376\4\377\377\375\376\376\374" \ + "\377\376\377\376\376\374\210\377\377\377\5\377\376\377\377\377\375\377" \ + "\376\377\376\376\376\376\377\375\202\377\377\377\1\376\376\376\210\377" \ + "\377\377\4\375\377\372\377\376\377\377\377\377\376\377\377\204\377\377" \ + "\377\202\376\377\377\3\377\377\377\377\377\375\376\376\376\202\377\377" \ + "\377\1\375\377\372\230\377\377\377\4\375\377\372\377\376\377\377\377" \ + "\377\376\377\377\204\377\377\377\202\376\377\377\3\377\377\377\377\377" \ + "\375\376\376\376\202\377\377\377\1\375\377\372\210\377\377\377\3\376" \ + "\377\377\377\377\377\376\376\376\202\376\377\377\202\377\377\377\1\376" \ + "\377\375\210\377\377\377\7\376\376\377\377\377\375\376\377\375\376\376" \ + "\376\377\376\377\377\377\377\376\377\377\221\377\377\377\5\376\376\376" \ + "\376\377\377\377\377\377\375\375\375\377\376\377\202\377\377\377\1\377" \ + "\377\375\211\377\377\377\7\377\376\377\376\376\374\376\377\377\377\377" \ + "\377\377\376\377\377\377\375\377\377\373\233\377\377\377\1\376\376\376" \ + "\205\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\203\377" \ + "\377\377\1\376\376\376\204\377\377\377\3\376\376\376\377\377\377\376" \ + "\376\376\204\377\377\377\1\376\376\376\237\377\377\377\1\376\376\376" \ + "\212\377\377\377\1\376\376\376\213\377\377\377\1\376\376\376\255\377" \ + "\377\377\1\376\376\376\247\377\377\377\1\376\376\376\202\377\377\377" \ + "\1\376\376\376\224\377\377\377\1\376\376\376\247\377\377\377\1\376\376" \ + "\376\236\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\232" \ + "\377\377\377\10\377\376\377\377\377\375\377\377\377\376\377\377\376\376" \ + "\376\377\376\377\377\377\375\377\376\377\202\377\377\375\1\377\376\377" \ + "\202\377\377\377\3\377\376\377\377\375\376\377\376\377\260\377\377\377" \ + "\2\377\376\377\377\377\377\202\377\376\377\4\377\377\375\376\376\374" \ + "\377\375\377\377\376\377\210\377\377\377\3\376\376\374\377\376\377\376" \ + "\376\376\204\377\377\377\1\376\377\375\210\377\377\377\4\375\377\374" \ + "\377\377\377\377\375\376\377\376\377\203\377\377\377\1\377\377\375\220" \ + "\377\377\377\3\376\377\377\377\377\375\376\377\377\202\377\377\377\3" \ + "\377\376\377\373\377\377\376\377\377\211\377\377\377\202\376\377\375" \ + "\1\377\377\375\203\377\377\377\1\377\376\377\210\377\377\377\3\377\376" \ + "\377\377\375\376\377\376\377\202\377\377\377\1\377\376\377\202\377\377" \ + "\375\10\377\376\377\377\377\375\377\376\377\376\376\376\376\377\377\377" \ + "\377\377\377\377\375\377\376\377\230\377\377\377\3\377\376\377\377\375" \ + "\376\377\376\377\202\377\377\377\1\377\376\377\202\377\377\375\10\377" \ + "\376\377\377\377\375\377\376\377\376\376\376\376\377\377\377\377\377" \ + "\377\377\375\377\376\377\210\377\377\377\2\377\377\375\375\376\371\202" \ + "\377\376\377\3\377\377\377\377\377\375\377\376\377\212\377\377\377\1" \ + "\377\375\376\202\377\377\377\4\377\377\375\376\376\376\376\377\377\377" \ + "\376\377\220\377\377\377\2\376\377\377\376\376\377\202\377\377\377\2" \ + "\376\377\375\375\377\374\212\377\377\377\10\373\377\376\377\377\377\377" \ + "\377\375\376\376\374\377\377\375\377\376\377\377\377\377\376\377\377" \ + "\235\377\377\377\1\376\376\376\202\377\377\377\7\316\316\320\250\250" \ + "\252\221\221\223llnjjlGGI99;\204::<\7TTVkkmyy{\234\234\236\265\265\267" \ + "\332\332\332\376\376\376\237\377\377\377\3\376\376\376\377\377\377\376" \ + "\376\376\222\377\377\377\1\376\376\376\205\377\377\377\3\376\376\376" \ + "\377\377\377\376\376\376\255\377\377\377\1\376\376\376\246\377\377\377" \ + "\1\376\376\376\227\377\377\377\1\376\376\376\252\377\377\377\1\376\376" \ + "\376\233\377\377\377\1\376\376\376\236\377\377\377\17\305\344\240\303" \ + "\342\237\304\343\240\304\343\237\307\342\237\303\342\236\305\342\240" \ + "\303\342\236\305\342\237\304\343\240\304\343\237\304\341\237\304\343" \ + "\237\323\352\266\376\377\375\250\377\377\377\210\305\342\240\10\305\342" \ + "\237\303\342\234\304\343\237\306\341\236\304\343\240\322\352\270\376" \ + "\377\377\375\377\376\211\377\377\377\5\377\376\377\376\376\376\377\376" \ + "\377\360\371\350\305\342\237\202\304\341\236\210\305\342\240\5\304\341" \ + "\236\327\356\302\376\377\377\377\377\373\376\377\375\202\377\377\375" \ + "\1\377\376\377\220\377\377\377\202\377\377\375\2\376\377\377\377\377" \ + "\377\202\377\377\375\2\304\343\237\306\341\236\210\305\342\240\5\307" \ + "\342\237\303\342\236\304\341\236\341\357\314\377\377\375\213\377\377" \ + "\377\17\376\377\375\323\352\266\304\343\237\304\341\237\304\343\237\304" \ + "\343\240\305\342\237\303\342\236\305\342\240\303\342\236\307\342\237" \ + "\304\343\237\304\343\240\303\342\237\305\344\240\231\377\377\377\17\376" \ + "\377\375\323\352\266\304\343\237\304\341\237\304\343\237\304\343\240" \ + "\305\342\237\303\342\236\305\342\240\303\342\236\307\342\237\304\343" \ + "\237\304\343\240\303\342\237\305\344\240\211\377\377\377\10\360\367\347" \ + "\306\343\241\303\342\237\307\342\237\303\342\237\304\343\235\307\341" \ + "\240\304\343\240\210\305\342\240\7\315\347\252\376\377\375\377\375\376" \ + "\376\377\375\377\377\377\377\377\373\376\377\377\221\377\377\377\10\377" \ + "\377\375\376\377\375\323\352\266\307\341\240\307\342\237\305\342\240" \ + "\307\340\236\306\341\236\210\305\342\240\4\304\343\237\311\335\236\377" \ + "\377\377\377\376\377\203\377\377\377\1\376\377\377\230\377\377\377\1" \ + "\376\376\376\203\377\377\377\3\346\346\346\251\251\251jjl\202;;=\210" \ + "::<\1;;=\202::<\2;;=99;\203::<\5FFHxxx\265\265\265\363\363\363\376\376" \ + "\376\234\377\377\377\2\376\376\376\346\346\346\214\234\234\234\1\235" \ + "\235\235\203\234\234\234\3\235\235\235\234\234\234\250\250\250\203\316" \ + "\316\316\1\346\346\346\263\377\377\377\202\250\250\250\245\377\377\377" \ + "\1\316\316\316\222\234\234\234\1\302\302\302\203\316\316\316\1\363\363" \ + "\363\247\377\377\377\3\316\316\316\234\234\234\235\235\235\240\234\234" \ + "\234\1\316\316\316\231\377\377\377\6\215\305>\216\306A\215\305@\213\310" \ + "=\215\305>\212\307>\202\214\305@\6\214\306>\212\306@\214\306<\215\304" \ + "B\214\306>\252\323m\251\377\377\377\210\214\306>\10\215\305@\215\307" \ + "\77\212\307>\217\304@\214\305@\251\323m\377\377\377\377\377\375\213\377" \ + "\377\377\5\377\375\377\341\363\315\215\305>\212\307>\215\305@\210\214" \ + "\306>\6\215\306A\220\305\77\350\365\333\377\377\377\376\377\377\377\376" \ + "\377\202\376\377\377\225\377\377\377\3\377\376\377\214\306>\215\306A" \ + "\210\214\306>\6\215\305>\212\310\77\215\305@\307\341\240\376\377\377" \ + "\377\376\377\213\377\377\377\6\252\323m\214\306>\215\304B\214\306<\212" \ + "\306@\214\306>\202\214\305@\6\212\307>\215\305>\213\310=\215\305@\216" \ + "\306A\215\305>\232\377\377\377\6\252\323m\214\306>\215\304B\214\306<" \ + "\212\306@\214\306>\202\214\305@\6\212\307>\215\305>\213\310=\215\305" \ + "@\216\306A\215\305>\211\377\377\377\4\376\377\377\242\321a\213\307A\215" \ + "\305>\202\214\306>\2\215\305@\215\307\77\210\214\306>\7\215\305<\332" \ + "\354\304\377\377\377\376\377\375\376\376\376\377\376\377\376\376\376" \ + "\221\377\377\377\10\377\376\377\342\362\316\215\305>\213\310\77\212\305" \ + "D\212\307<\216\306\77\211\307>\211\214\306>\4\304\343\240\373\377\376" \ + "\377\377\377\375\377\376\202\377\377\377\1\377\377\375\225\377\377\377" \ + "\1\376\376\376\204\377\377\377\6\265\265\267__a99;;;=::<;;=\202::<\1" \ + ";;=\202::<\1;;=\202::<\1;;=\203::<\1;;=\203::<\3;;=::<99;\202::<\2xx" \ + "z\301\301\301\202\377\377\377\1\376\376\376\202\377\377\377\1\376\376" \ + "\376\206\377\377\377\1\376\376\376\217\377\377\377\1\316\316\316\205" \ + "::<\202;;=\221::<\4TTVwwy\250\250\252\346\346\350\255\377\377\377\1\316" \ + "\316\320\202::<\1\316\316\316\244\377\377\377\1\234\234\236\204::<\1" \ + ";;=\205::<\3;;=::<;;=\206::<\1;;=\204::<\6SSUkkm\204\204\206\250\250" \ + "\250\316\316\316\376\376\376\206\377\377\377\1\376\376\376\231\377\377" \ + "\377\1\234\234\234\206::<\3;;=::<;;=\222::<\1;;=\204::<\3;;=::<\234\234" \ + "\236\231\377\377\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214" \ + "\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325" \ + "p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210\214\306>" \ + "\15\212\306@\215\307\77\233\316W\365\374\364\377\376\375\376\377\377" \ + "\377\376\377\377\377\375\377\377\377\377\377\375\376\376\376\377\377" \ + "\377\376\376\374\202\377\377\377\1\376\376\376\216\377\377\377\213\214" \ + "\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232" \ + "\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214" \ + "\305@\214\306>\214\305@\212\377\377\377\7\350\364\334\215\305>\212\307" \ + "<\214\305@\215\304B\215\305@\213\310\77\210\214\306>\10\214\305@\225" \ + "\311J\370\373\362\377\376\377\376\377\377\377\377\375\377\377\377\376" \ + "\377\377\210\377\377\377\40\376\377\377\376\377\375\377\376\377\377\377" \ + "\377\375\376\377\377\377\375\377\376\377\376\377\377\370\373\364\233" \ + "\314W\215\307\77\214\304=\212\306@\215\307\77\213\305=\215\307\77\214" \ + "\306>\217\304@\215\306A\212\307>\214\306<\215\306A\214\306>\211\307@" \ + "\242\321a\377\377\377\377\376\377\376\377\377\377\376\377\377\377\377" \ + "\376\377\377\377\376\377\223\377\377\377\7\376\376\376\377\377\377\376" \ + "\376\376\377\377\377\363\363\365\234\234\236FFH\202::<\10;;=99;;;=::" \ + "<;;=::<99;;;=\203::<\1;;=\203::<\2;;=99;\204::<\11""99;;;=::<;;=::<;" \ + ";=TTV\265\265\265\363\363\363\203\377\377\377\1\376\376\376\207\377\377" \ + "\377\1\376\376\376\215\377\377\377\1\316\316\316\205::<\3;;=::<;;=\202" \ + "::<\1;;=\214::<\3;;=99;;;=\202::<\4lln\316\316\316\376\376\376\377\377" \ + "\377\202\376\376\376\246\377\377\377\2\376\376\376xxz\202::<\2xxx\376" \ + "\376\376\243\377\377\377\1\234\234\236\204::<\202;;=\205::<\1;;=\204" \ + "::<\1;;=\202::<\1""99;\206::<\1;;=\202::<\6;;=kkk\250\250\250\346\346" \ + "\346\377\377\377\376\376\376\205\377\377\377\1\376\376\376\225\377\377" \ + "\377\1\234\234\234\204::<\1;;=\202::<\4;;=::<99;;;=\225::<\3;;=::<\234" \ + "\234\236\231\377\377\377\3\214\305@\214\306>\214\305@\207\214\306>\4" \ + "\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250" \ + "\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210\214\306" \ + ">\4\215\306A\213\304\77\215\305@\262\327x\202\377\377\377\1\376\377\375" \ + "\203\377\377\375\204\377\377\377\1\376\376\376\217\377\377\377\213\214" \ + "\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232" \ + "\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214" \ + "\305@\214\306>\214\305@\212\377\377\377\7\376\376\376\305\342\237\212" \ + "\307>\214\306>\212\307<\214\306>\212\307>\210\214\306>\3\214\306<\215" \ + "\306A\300\337\221\202\377\377\377\3\377\376\377\376\376\376\377\377\375" \ + "\210\377\377\377\1\377\375\377\202\377\377\377\2\376\376\377\376\377" \ + "\375\202\377\376\377\30\377\377\377\277\340\221\215\306A\213\305=\215" \ + "\305>\212\306B\214\306>\216\306\77\214\306<\212\307>\215\307=\213\305" \ + ";\215\307\77\216\305C\214\306>\214\305@\216\306\77\347\365\333\377\376" \ + "\377\377\377\375\376\377\377\377\376\374\377\377\377\377\377\375\222" \ + "\377\377\377\1\376\376\376\204\377\377\377\12\265\265\267FFH;;=::<;;" \ + "=99;::<;;=::<;;=\202::<\4<<>99;::<;;=\202::<\1;;=\203::<\1<<>\204::<" \ + "\5<<>99;;;=99;;;=\202::<\4:::SSS\266\266\266\376\376\376\203\377\377" \ + "\377\1\376\376\376\204\377\377\377\1\376\376\376\216\377\377\377\1\316" \ + "\316\316\204::<\3;;=::<;;=\204::<\1;;=\214::<\1;;=\202::<\1;;=\202::" \ + "<\2yyy\363\363\363\202\377\377\377\1\376\376\376\245\377\377\377\3\346" \ + "\346\346::<;;=\202::<\1\347\347\347\202\377\377\377\1\376\376\376\240" \ + "\377\377\377\1\234\234\236\203::<\4;;=99;::<;;=\202::<\7;;=::<;;=99;" \ + ";;=::<;;=\203::<\202;;=\210::<\1""99;\202::<\4;;=xxz\317\317\317\376" \ + "\376\376\202\377\377\377\1\376\376\376\227\377\377\377\1\234\234\234" \ + "\204::<\1""99;\203;;=\224::<\1;;=\204::<\2<<>\234\234\236\231\377\377" \ + "\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214" \ + "\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377" \ + "\1\342\361\320\202\214\306>\1\214\305@\210\214\306>\10\215\305>\214\306" \ + ">\213\307A\214\306>\315\345\253\377\377\375\377\376\377\376\377\377\226" \ + "\377\377\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377" \ + "\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214" \ + "\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@" \ + "\207\214\306>\3\214\305@\214\306>\214\305@\211\377\377\377\7\377\377" \ + "\375\377\376\377\376\376\376\241\321a\212\307>\211\305\77\215\306A\211" \ + "\214\306>\4\213\310\77\214\305@\213\305=\342\361\320\202\377\376\377" \ + "\2\377\377\375\377\376\377\210\377\377\377\1\377\376\377\202\377\377" \ + "\377\30\377\377\375\376\377\377\377\377\375\376\377\377\351\366\334\214" \ + "\305B\211\306;\215\307\77\214\306>\212\306@\215\305>\215\305@\212\307" \ + ">\214\305@\212\306B\214\306>\213\305=\213\310\77\215\305>\215\307\77" \ + "\314\345\253\377\375\377\377\376\374\376\377\377\203\377\377\377\1\377" \ + "\376\374\225\377\377\377\2\345\345\345kkm\205::<\202;;=\203::<\1;;=\203" \ + "::<\1;;=\202::<\202;;=\202::<\1;;=\210::<\2;;=99;\205::<\2```\331\331" \ + "\331\211\377\377\377\1\376\376\376\214\377\377\377\1\316\316\316\206" \ + "::<\5""99;::<;;=::<99;\212::<\1;;=\202::<\1;;=\204::<\4;;=::\214\305@" \ + "\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215" \ + "\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214" \ + "\305@\210\214\306>\10\215\305@\212\307>\214\305@\215\306A\214\305@\352" \ + "\364\334\376\376\377\377\377\373\202\377\377\377\3\376\376\376\377\377" \ + "\377\377\377\375\202\377\377\377\1\376\376\374\216\377\377\377\213\214" \ + "\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232" \ + "\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214" \ + "\305@\214\306>\214\305@\211\377\377\377\1\376\377\377\202\377\377\375" \ + "\5\347\364\332\215\307\77\215\306C\214\307;\216\306\77\210\214\306>\10" \ + "\214\305@\214\305D\215\307\77\233\314V\371\374\363\376\377\377\377\377" \ + "\377\377\377\375\210\377\377\377\20\375\377\374\377\376\377\376\376\377" \ + "\376\377\377\377\376\377\376\377\375\376\377\377\244\317d\212\307>\215" \ + "\306A\215\305@\214\305@\211\306=\215\307=\215\306A\214\305@\204\214\306" \ + ">\14\211\305A\212\307>\251\324k\377\376\377\377\375\376\376\377\377\377" \ + "\377\377\377\377\375\377\377\377\377\377\375\377\377\377\377\377\375" \ + "\217\377\377\377\1\376\376\376\203\377\377\377\2\265\265\267FFH\205:" \ + ":<\1;;=\203::<\202;;=\7:::TTT\203\203\203\235\235\235\316\316\316\332" \ + "\332\332\377\377\377\202\376\376\376\202\377\377\377\5\316\316\316\317" \ + "\317\317\234\234\234yyyFFF\202::<\1;;=\202::<\3""99;;;=99;\204::<\2;" \ + ";=\233\233\233\206\377\377\377\1\376\376\376\216\377\377\377\1\316\316" \ + "\316\204::<\1;;=\205::<\1;;=\212::<\3""99;::<;;=\202::<\2;;=99;\204:" \ + ":<\2;;=\265\265\265\245\377\377\377\4\346\346\346::<99;;;=\202::<\4""9" \ + "9;\347\347\347\377\377\377\376\376\376\240\377\377\377\1\234\234\236" \ + "\205::<\1;;=\203::<\202;;=\1""99;\203;;=\2::<;;=\203::<\1;;=\202::<\2" \ + ";;=::<\202;;=\7::<;;=99;::<;;=99;;;=\202::<\3;;=xxx\362\362\362\227\377" \ + "\377\377\1\234\234\234\205::<\202;;=\4::<;;=::<;;=\223::<\2;;=99;\202" \ + ";;=\1\234\234\236\231\377\377\377\3\214\305@\214\306>\214\305@\207\214" \ + "\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306" \ + ">\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210" \ + "\214\306>\12\212\307>\215\306A\214\305@\215\307\77\213\306:\226\312N" \ + "\372\374\361\375\376\377\377\377\375\377\377\373\224\377\377\377\213" \ + "\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p" \ + "\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305" \ + "@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>" \ + "\3\214\305@\214\306>\214\305@\211\377\377\377\10\376\377\377\376\376" \ + "\377\376\377\377\377\375\376\307\342\237\214\306<\215\306A\214\305@\210" \ + "\214\306>\5\215\307\77\213\305=\216\306A\213\310\77\277\337\223\202\377" \ + "\377\375\1\377\376\377\210\377\377\377\14\376\377\375\376\376\376\377" \ + "\376\377\377\377\375\377\376\377\377\377\377\303\342\236\215\307\77\216" \ + "\306A\215\305>\214\306<\215\306A\203\214\306>\20\215\307\77\212\307>" \ + "\215\305@\216\306\77\214\305@\216\307<\223\312K\356\372\346\377\377\377" \ + "\376\377\377\375\377\376\377\377\377\377\376\377\377\377\375\377\377" \ + "\377\377\377\375\216\377\377\377\1\376\376\376\203\377\377\377\2\375" \ + "\375\375\205\205\207\202::<\202;;=\3::<;;=::<\202;;=\6::<:::SSS\250\250" \ + "\250\346\346\346\376\376\376\216\377\377\377\3\332\332\332\220\220\220" \ + "SSS\202::<\4;;=99;::<;;=\202::<\1""99;\202;;=\2__a\332\332\334\223\377" \ + "\377\377\1\316\316\316\204::<\6;;=RRT\235\235\237\235\235\235\233\233" \ + "\233\234\234\234\212\234\234\236\5xxzkkm__a99;;;=\204::<\202;;=\1""9" \ + "9;\202::<\1\316\316\316\244\377\377\377\4\204\204\206;;=::<;;=\202::" \ + "<\2;;=\220\220\222\203\377\377\377\1\376\376\376\236\377\377\377\1\234" \ + "\234\236\203::<\3;;=::\214\305" \ + "@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377" \ + "\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1" \ + "\214\305@\210\214\306>\7\212\306@\214\306<\217\307@\214\304\77\214\311" \ + ">\214\306>\251\323m\202\376\377\377\4\376\376\374\377\377\375\377\377" \ + "\377\376\376\376\202\377\377\377\1\376\376\376\216\377\377\377\213\214" \ + "\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232" \ + "\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214" \ + "\305@\214\306>\214\305@\212\377\377\377\7\377\377\375\377\376\377\376" \ + "\377\377\377\376\377\251\323o\211\307>\214\305@\210\214\306>\7\212\307" \ + ">\215\305>\214\305@\214\306>\215\307\77\347\365\334\377\376\377\211\377" \ + "\377\377\2\377\376\377\375\377\374\203\377\376\377\15\352\364\333\212" \ + "\306@\215\306A\214\306>\215\307\77\213\310\77\214\306>\216\306A\215\306" \ + "A\214\306<\212\307>\213\310=\212\307>\202\214\305@\4\214\306>\314\345" \ + "\253\377\376\377\376\377\377\202\377\377\375\6\377\376\377\375\376\377" \ + "\377\377\377\377\376\377\376\377\375\377\376\377\217\377\377\377\3\376" \ + "\376\376\362\362\362lln\20299;\1;;=\204::<\202;;=\6::<\204\204\204\317" \ + "\317\317\376\376\376\377\377\377\376\376\376\206\377\377\377\1\376\376" \ + "\376\213\377\377\377\2\301\301\301kkm\211::<\6;;=FFH\301\301\301\376" \ + "\376\376\377\377\377\376\376\376\217\377\377\377\1\316\316\316\204::" \ + "<\3;;=kkm\376\376\376\221\377\377\377\3\316\316\316\204\204\204FFF\202" \ + "::<\1;;=\202::<\202;;=\2FFH\363\363\363\242\377\377\377\5\364\364\364" \ + "::<;;=99;;;=\203::<\3GGI\363\363\363\376\376\376\240\377\377\377\1\234" \ + "\234\236\205::<\1\234\234\236\210\377\377\377\1\376\376\376\204\377\377" \ + "\377\1\376\376\376\202\377\377\377\6\362\362\362\316\316\316\265\265" \ + "\265\234\234\234kkmFFH\202::<\2;;=99;\205::<\1;;=\202::<\1\221\221\221" \ + "\225\377\377\377\1\234\234\234\205::<\1\234\234\236\202\377\377\377\1" \ + "\376\376\376\225\377\377\377\1\375\375\375\235\377\377\377\3\214\305" \ + "@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214\306>\252\324" \ + "p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320" \ + "\202\214\306>\1\214\305@\210\214\306>\4\215\307\77\214\306>\214\304\77" \ + "\214\306>\202\214\305@\6\215\307\77\307\341\240\376\377\375\376\377\377" \ + "\376\376\374\377\377\373\202\377\377\377\202\377\377\375\216\377\377" \ + "\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252" \ + "\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214" \ + "\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306" \ + ">\3\214\305@\214\306>\214\305@\212\377\377\377\7\377\376\377\376\376" \ + "\377\377\377\377\376\376\377\361\372\347\222\312K\215\305>\210\214\306" \ + ">\10\214\305@\215\306A\214\305@\214\306<\213\304A\243\322b\376\376\374" \ + "\376\377\375\211\377\377\377\24\377\377\373\377\377\377\376\377\377\377" \ + "\377\375\242\320c\215\307=\214\306>\213\310\77\213\304A\212\306@\215" \ + "\307\77\215\305@\214\306>\215\307\77\212\306@\215\305>\215\307\77\213" \ + "\310\77\213\306:\253\325q\202\377\377\377\11\377\377\375\377\376\377" \ + "\377\377\377\377\377\375\376\377\375\377\377\375\377\375\377\376\377" \ + "\377\377\377\375\214\377\377\377\7\376\376\376\377\377\377\376\376\376" \ + "\363\363\363__a::<;;=\203::<\202;;=\202::<\4xxz\347\347\351\377\377\377" \ + "\376\376\376\210\377\377\377\1\376\376\376\204\377\377\377\2\376\376" \ + "\376\377\377\377\203\376\376\376\205\377\377\377\2\316\316\320kkm\202" \ + "::<\3;;=::<;;=\202::<\202;;=\2:::\250\250\250\202\377\377\377\1\376\376" \ + "\376\216\377\377\377\1\316\316\316\205::<\1kkm\203\377\377\377\1\376" \ + "\376\376\215\377\377\377\1\376\376\376\202\377\377\377\3\363\363\363" \ + "xxx::<\202;;=\203::<\2;;=xxz\242\377\377\377\1\234\234\234\202::<\1;" \ + ";=\202::<\1;;=\202::<\1\234\234\234\241\377\377\377\1\234\234\236\202" \ + "::<\10;;=::<;;=\234\234\236\377\377\377\376\376\376\377\377\377\376\376" \ + "\376\216\377\377\377\1\376\376\376\203\377\377\377\3\332\332\332\221" \ + "\221\223FFH\205::<\2;;=::<\202;;=\2::<\204\204\204\224\377\377\377\1" \ + "\234\234\234\205::<\3\234\234\236\377\377\377\376\376\376\264\377\377" \ + "\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214" \ + "\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377" \ + "\1\342\361\320\202\214\306>\1\214\305@\210\214\306>\5\216\306\77\212" \ + "\307>\215\307=\212\306@\214\306>\202\215\305>\5\215\305@\345\356\317" \ + "\376\377\375\376\377\377\377\377\375\202\377\377\377\1\377\377\375\217" \ + "\377\377\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377" \ + "\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214" \ + "\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@" \ + "\207\214\306>\3\214\305@\214\306>\214\305@\211\377\377\377\4\376\377" \ + "\377\377\377\377\377\377\375\376\377\377\202\377\377\377\2\315\347\252" \ + "\212\306@\210\214\306>\10\216\306A\212\306@\212\307>\215\305<\213\310" \ + "\77\215\305>\307\341\240\376\377\377\212\377\377\377\10\375\377\374\377" \ + "\377\377\305\342\237\215\305@\212\306@\216\306\77\215\307=\215\305>\202" \ + "\214\306>\24\213\307A\213\310=\215\304B\214\306>\212\306@\215\304B\212" \ + "\307>\225\311K\370\373\362\377\377\377\376\377\375\377\377\375\377\377" \ + "\377\374\377\375\376\376\376\377\377\377\377\377\375\377\376\377\376" \ + "\377\377\377\377\375\211\377\377\377\1\376\376\376\205\377\377\377\1" \ + "___\204::<\1;;=\203::<\2SSS\316\316\316\235\377\377\377\2\317\317\317" \ + "``b\207::<\3;;=::<\204\204\206\220\377\377\377\1\316\316\316\205::<\1" \ + "kkm\226\377\377\377\3\204\204\206::<;;=\205::<\1\316\316\316\232\377" \ + "\377\377\1\376\376\376\205\377\377\377\2\364\364\364FFF\202;;=\202::" \ + "<\6;;=99;;;=::\214\305@\207\214\306>\4\214\305@\215" \ + "\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377" \ + "\377\377\1\342\361\320\202\214\306>\1\214\305@\220\214\306>\2\222\313" \ + "J\366\373\364\202\377\376\377\4\377\377\373\376\376\374\376\377\377\377" \ + "\376\377\216\377\377\377\213\214\306>\3\215\305>\214\306>\305\342\240" \ + "\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3" \ + "\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215\305" \ + ">\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\211\377\377\377" \ + "-\377\377\375\376\377\377\377\377\377\376\376\374\376\377\377\377\376" \ + "\377\376\377\377\252\324p\212\306@\215\305>\212\307<\215\305@\215\305" \ + "<\214\305B\215\305@\214\306<\212\307>\215\305>\214\306>\211\306=\215" \ + "\305>\212\307>\214\306<\350\364\334\374\377\377\377\376\377\376\376\376" \ + "\374\377\375\377\377\377\376\377\375\377\377\375\377\376\377\377\377" \ + "\375\377\377\377\377\376\377\357\367\350\223\312K\213\310\77\215\305" \ + ">\214\306>\215\305>\213\310\77\212\306@\214\306>\215\305@\202\214\306" \ + ">\10\214\305@\216\306=\212\307>\215\305>\333\355\303\376\376\374\377" \ + "\377\377\377\377\375\223\377\377\377\1\376\376\376\203\377\377\377\1" \ + "\203\203\203\206::<\4;;=::<\204\204\206\363\363\363\230\377\377\377\1" \ + "\376\376\376\207\377\377\377\1\235\235\237\202::<\1;;=\203::<\5;;=99" \ + ";;;=\204\204\204\376\376\376\216\377\377\377\1\316\316\316\205::<\1k" \ + "km\227\377\377\377\12\204\204\206::<;;=::<99;;;=::<\204\204\204\377\377" \ + "\377\376\376\376\232\377\377\377\1\376\376\376\203\377\377\377\2\234" \ + "\234\234;;=\203::<\1;;=\204::<\3<<>\250\250\250\376\376\376\237\377\377" \ + "\377\1\234\234\236\205::<\1\234\234\234\231\377\377\377\10\376\376\376" \ + "\377\377\377\265\265\265FFH::<;;=::<;;=\203::<\2;;=\204\204\204\222\377" \ + "\377\377\1\234\234\234\205::<\1\234\234\236\266\377\377\377\3\214\305" \ + "@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214\306>\252\324" \ + "p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320" \ + "\202\214\306>\1\214\305@\220\214\306>\4\216\306\77\250\322n\376\377\375" \ + "\376\377\373\222\377\377\377\213\214\306>\3\215\305>\214\306>\305\342" \ + "\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306" \ + ">\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215" \ + "\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\211\377\377" \ + "\377\13\376\376\377\376\377\377\377\376\377\376\376\374\374\377\377\377" \ + "\377\375\377\376\377\356\372\346\225\311K\214\306>\213\310=\203\214\306" \ + ">\2\213\310\77\214\306>\202\214\305@\7\214\306<\213\307A\214\304\77\214" \ + "\305B\212\307>\244\317d\377\376\377\202\377\377\377\1\377\375\377\202" \ + "\377\377\377\25\376\377\377\377\376\377\377\377\377\374\377\375\376\376" \ + "\374\253\324n\214\306<\215\307\77\215\305>\211\307@\216\305C\214\305" \ + "@\215\307\77\214\305@\214\306<\212\307<\211\306=\214\306>\214\305@\213" \ + "\307A\263\327}\202\376\377\377\3\377\377\377\377\375\376\377\377\375" \ + "\221\377\377\377\1\376\376\376\203\377\377\377\1\250\250\250\204::<\1" \ + ";;=\202::<\2;;=\264\264\264\202\377\377\377\1\376\376\376\232\377\377" \ + "\377\1\376\376\376\205\377\377\377\2\332\332\332SSS\202::<\1;;=\204:" \ + ":<\4xxx\364\364\364\377\377\377\376\376\376\214\377\377\377\1\316\316" \ + "\316\205::<\1kkm\227\377\377\377\2\363\363\363SSU\202::<\4;;=99;::<;" \ + ";;\202\377\377\377\1\376\376\376\226\377\377\377\1\376\376\376\204\377" \ + "\377\377\11\376\376\376\363\363\363FFH99;;;=::<;;=99;;;=\203::<\4""9" \ + "9;SSU\377\377\377\376\376\376\236\377\377\377\1\234\234\236\205::<\1" \ + "\234\234\234\225\377\377\377\1\376\376\376\204\377\377\377\10\376\376" \ + "\376\377\377\377\363\363\363yyy::<;;=99;;;=\204::<\1\266\266\266\221" \ + "\377\377\377\1\234\234\234\205::<\1\234\234\236\266\377\377\377\3\214" \ + "\305@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214\306>\252" \ + "\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361" \ + "\320\202\214\306>\1\214\305@\220\214\306>\4\214\306<\213\307A\275\335" \ + "\222\376\377\377\203\377\377\377\1\377\377\375\216\377\377\377\213\214" \ + "\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232" \ + "\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214" \ + "\305@\214\306>\214\305@\211\377\377\377\4\377\376\377\376\376\377\377" \ + "\377\377\377\377\375\202\376\377\377\5\377\375\376\377\376\377\315\346" \ + "\255\212\307>\214\305@\202\215\306A\22\214\305@\212\307<\214\305B\214" \ + "\306>\213\307A\214\306>\213\305=\214\306>\215\305>\213\307A\211\310<" \ + "\313\347\254\377\377\375\377\375\377\376\377\377\376\377\373\376\377" \ + "\377\377\376\377\202\376\377\377\10\377\377\377\315\346\254\212\307>" \ + "\212\306@\215\306A\216\306A\212\307>\214\306<\202\215\306A\10\215\306" \ + "C\214\305B\215\307\77\214\306<\214\305@\213\310<\222\310L\372\373\363" \ + "\225\377\377\377\1\376\376\376\202\377\377\377\6\376\376\376\333\333" \ + "\333::<;;=::<;;=\202::<\3;;=FFH\315\315\315\205\377\377\377\1\376\376" \ + "\376\225\377\377\377\202\376\376\376\202\377\377\377\1\376\376\376\202" \ + "\377\377\377\1\376\376\376\202\377\377\377\2\363\363\363xxx\204::<\2" \ + ";;=\203\203\203\220\377\377\377\1\316\316\316\205::<\1kkm\230\377\377" \ + "\377\3\266\266\27099;;;=\204::<\1\316\316\316\230\377\377\377\1\376\376" \ + "\376\202\377\377\377\1\376\376\376\202\377\377\377\3\265\265\267::<;" \ + ";=\204::<\202;;=\202::<\202;;=\1\265\265\265\237\377\377\377\1\234\234" \ + "\236\205::<\1\234\234\234\236\377\377\377\5\234\234\234::<;;=::<;;=\202" \ + "::<\3;;=FFH\332\332\332\220\377\377\377\1\234\234\234\205::<\1\234\234" \ + "\236\266\377\377\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214" \ + "\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325" \ + "p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\220\214\306>" \ + "\4\215\307\77\214\304\77\213\310\77\333\355\303\202\377\377\377\1\376" \ + "\377\375\217\377\377\377\213\214\306>\3\215\305>\214\306>\305\342\240" \ + "\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3" \ + "\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215\305" \ + ">\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\213\377\377\377" \ + "\5\377\377\373\377\376\377\377\377\377\375\377\374\376\377\377\202\376" \ + "\376\376\22\260\331{\212\307>\214\306>\215\305>\215\305@\215\307\77\215" \ + "\307=\214\305@\214\306>\215\306A\214\306>\213\307C\214\306>\214\304;" \ + "\213\307A\222\312K\357\370\345\377\377\375\202\377\377\377\15\377\375" \ + "\376\377\377\375\376\376\376\377\377\375\361\367\351\222\311J\213\310" \ + "\77\214\305B\215\310<\213\305=\216\306\77\212\307<\214\305B\202\214\306" \ + ">\6\216\306\77\215\305@\215\306A\214\305@\215\305<\333\356\301\202\377" \ + "\376\377\3\377\377\375\377\377\377\377\376\377\225\377\377\377\1``b\202" \ + "::<\6;;=::<;;=::\214\305@\207\214\306>\4\214\305@\215" \ + "\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377" \ + "\377\377\1\342\361\320\202\214\306>\1\214\305@\220\214\306>\10\216\306" \ + "\77\215\306A\214\305@\224\310J\360\371\350\377\377\377\377\376\377\376" \ + "\377\377\216\377\377\377\213\214\306>\3\215\305>\214\306>\305\342\240" \ + "\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3" \ + "\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215\305" \ + ">\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\212\377\377\377" \ + "\1\377\377\375\202\377\377\377\2\377\376\377\377\377\377\202\376\377" \ + "\377\25\377\377\375\370\373\362\223\312K\212\307>\215\305>\216\306A\212" \ + "\307<\214\305B\215\307\77\214\305@\214\306>\214\305@\212\306@\215\307" \ + "=\216\306A\215\305>\214\306<\252\324n\376\377\377\376\376\376\377\376" \ + "\377\202\377\377\375\4\377\376\377\376\376\377\252\324n\215\306A\202" \ + "\214\306>\21\214\305@\215\307\77\215\305>\212\307>\214\306<\213\304A" \ + "\215\307=\214\304=\215\307\77\212\307>\214\306>\277\337\226\377\376\377" \ + "\376\377\375\377\377\375\377\377\377\376\376\376\225\377\377\377\3\234" \ + "\234\236::<;;=\204::<\4;;=\265\265\267\377\377\377\376\376\376\204\377" \ + "\377\377\202\376\376\376\202\377\377\377\1\376\376\376\225\377\377\377" \ + "\1\376\376\376\203\377\377\377\1\376\376\376\202\377\377\377\1\376\376" \ + "\376\202\377\377\377\3\250\250\250::<\204\204\206\205\377\377\377\1\376" \ + "\376\376\214\377\377\377\1\316\316\316\205::<\1kkm\226\377\377\377\1" \ + "\376\376\376\202\377\377\377\2kkm99;\202::<\4;;=::<\204\204\206\376\376" \ + "\376\202\377\377\377\1\376\376\376\224\377\377\377\1\376\376\376\203" \ + "\377\377\377\2\376\376\376\265\265\265\202::<\1;;=\202::<\3;;=\316\316" \ + "\320\316\316\316\204::<\3;;=::<\266\266\266\236\377\377\377\1\234\234" \ + "\236\205::<\1\234\234\234\226\377\377\377\202\376\376\376\2\377\377\377" \ + "\376\376\376\205\377\377\377\4\376\376\376\251\251\253;;=99;\202::<\4" \ + "<<>99;::<\250\250\252\217\377\377\377\1\234\234\234\205::<\1\234\234" \ + "\236\266\377\377\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214" \ + "\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325" \ + "p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\220\214\306>" \ + "\202\214\305@\6\212\306@\215\307\77\243\321d\377\377\375\377\375\377" \ + "\376\377\377\216\377\377\377\213\214\306>\3\215\305>\214\306>\305\342" \ + "\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306" \ + ">\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215" \ + "\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\211\377\377" \ + "\377\2\376\377\377\377\377\375\202\377\377\377\1\376\376\376\202\377" \ + "\377\377\6\376\377\372\376\377\377\377\376\377\331\357\301\213\304\77" \ + "\215\307=\202\214\305@\25\214\305B\214\306<\215\305@\212\307<\214\306" \ + ">\216\306=\212\307>\212\306B\214\305@\215\306E\212\306@\313\347\255\376" \ + "\377\375\376\376\377\376\377\377\377\376\377\377\377\377\333\355\305" \ + "\212\307>\216\306\77\215\307\77\202\214\306>\1\215\307\77\202\214\306" \ + ">\13\215\305<\212\306@\212\307<\215\307\77\211\306=\213\307A\233\314" \ + "V\370\373\362\377\377\375\377\377\377\376\377\377\202\377\377\375\2\374" \ + "\377\377\377\375\376\222\377\377\377\3\363\363\363GGI::<\202;;=\202:" \ + ":<\2;;=\234\234\234\214\377\377\377\1\376\376\376\221\377\377\377\1\376" \ + "\376\376\202\377\377\377\3\376\376\376\377\377\377\376\376\376\206\377" \ + "\377\377\3\376\376\376\377\377\377\316\316\316\203\377\377\377\1\376" \ + "\376\376\203\377\377\377\1\376\376\376\213\377\377\377\1\316\316\316" \ + "\205::<\1kkm\227\377\377\377\5\376\376\376\377\377\377\235\235\237::" \ + "<;;=\203::<\2lln\376\376\376\203\377\377\377\1\376\376\376\224\377\377" \ + "\377\13\376\376\376\377\377\377\376\376\376\377\377\377RRR::<99;::<;" \ + ";=::\214\305@\207\214\306" \ + ">\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>" \ + "\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\221" \ + "\214\306>\5\213\307A\216\306\77\212\307<\214\306>\277\337\223\220\377" \ + "\377\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377" \ + "\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306" \ + ">\214\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207" \ + "\214\306>\3\214\305@\214\306>\214\305@\211\377\377\377\4\376\377\377" \ + "\377\377\375\377\375\377\377\377\377\202\377\377\375\202\377\376\377" \ + "\202\376\377\377\22\377\376\377\262\331~\213\304\77\213\310\77\216\306" \ + "A\212\307<\215\306A\214\304=\213\310\77\214\305@\215\304B\214\305B\214" \ + "\306<\212\307>\212\307<\216\306A\221\312I\370\373\362\203\377\377\377" \ + "\13\370\373\364\226\310K\214\306>\212\307>\215\304B\214\306>\215\306" \ + "A\213\304\77\215\306A\214\306>\215\305@\202\212\306@\13\215\307\77\213" \ + "\310=\220\303@\336\362\315\377\376\377\377\377\377\374\377\377\377\376" \ + "\377\377\377\377\376\376\374\376\377\375\223\377\377\377\1\204\204\206" \ + "\203::<\4""99;;;=::\214\305@\207\214\306>\4\214\305@\215\305>\214" \ + "\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377" \ + "\1\342\361\320\202\214\306>\1\214\305@\220\214\306>\10\215\304B\214\306" \ + "<\214\305@\215\305@\212\306@\215\305>\323\354\265\377\376\377\216\377" \ + "\377\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377" \ + "\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306" \ + ">\214\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207" \ + "\214\306>\3\214\305@\214\306>\214\305@\212\377\377\377\3\375\377\376" \ + "\377\377\377\377\377\375\202\377\377\377\26\377\377\375\375\377\374\376" \ + "\377\377\377\376\377\377\377\375\365\375\362\225\311K\212\306@\214\306" \ + ">\214\305@\212\306@\216\306=\211\306;\215\306A\214\306>\215\307\77\217" \ + "\304@\214\306>\212\307>\215\305@\214\305@\262\327z\203\377\377\377\13" \ + "\260\331{\213\310\77\214\305B\214\305@\215\305@\215\307\77\212\307<\216" \ + "\306A\213\305;\214\305@\215\305>\202\214\306>\11\215\305@\214\306<\276" \ + "\340\224\377\376\375\377\377\375\376\377\377\377\376\375\376\377\375" \ + "\377\376\377\202\377\377\377\1\376\377\375\221\377\377\377\1\346\346" \ + "\346\206::<\2:::\346\346\346\202\377\377\377\1\376\376\376\276\377\377" \ + "\377\1\316\316\316\205::<\1kkm\216\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\376\376\376\207\377\377\377\3\234\234\236::<;;=\203::<\1k" \ + "km\226\377\377\377\1\376\376\376\204\377\377\377\2\376\376\376lln\205" \ + "::<\1``b\204\377\377\377\1SSS\205::<\1kkm\235\377\377\377\1\234\234\236" \ + "\205::<\1\234\234\234\242\377\377\377\2\316\316\316:::\202::<\5;;=::" \ + "<;;=FFH\363\363\363\206\377\377\377\1\376\376\376\206\377\377\377\1\234" \ + "\234\234\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306>\214" \ + "\305@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377" \ + "\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306" \ + ">\1\214\305@\210\214\306>\27\215\306A\212\307>\215\305>\215\305@\215" \ + "\307=\217\304B\214\306<\214\305@\215\307\77\215\305@\215\307\77\214\305" \ + "@\216\306\77\211\310<\226\312L\347\364\332\377\377\377\377\376\377\377" \ + "\377\375\374\377\377\377\376\377\376\376\376\376\377\377\207\377\377" \ + "\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252" \ + "\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214" \ + "\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306" \ + ">\3\214\305@\214\306>\214\305@\221\377\377\377\1\377\377\375\203\377" \ + "\377\377\5\333\355\303\214\306>\212\307<\216\306A\214\305@\202\214\306" \ + ">\15\215\305@\214\306>\212\306@\213\310\77\215\305>\216\306A\211\306" \ + "=\212\306@\212\307<\334\354\305\377\377\375\335\354\303\212\307>\210" \ + "\214\306>\10\216\306A\212\307;\215\306A\216\306A\214\305@\241\321a\371" \ + "\374\361\375\376\377\223\377\377\377\1\376\376\376\204\377\377\377\2" \ + "\376\376\376\234\234\234\203::<\1""99;\202::<\1\234\234\234\302\377\377" \ + "\377\1\316\316\316\205::<\1kkm\217\377\377\377\1\376\376\376\202\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\202\377\377\377\3\376" \ + "\376\376\377\377\377xxz\202::<\5""99;::<;;=xxz\376\376\377\232\377\377" \ + "\377\3\317\317\31799;;;=\202::<\5;;=::<\265\265\265\377\377\377\376\376" \ + "\376\202\377\377\377\2\265\265\265;;=\202::<\203;;=\1\332\332\332\203" \ + "\377\377\377\1\376\376\376\230\377\377\377\1\234\234\236\205::<\1\234" \ + "\234\234\242\377\377\377\4\376\376\376\204\204\204::<;;=\202::<\3;;=" \ + "::<\266\266\266\207\377\377\377\1\376\376\376\205\377\377\377\1\234\234" \ + "\234\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306>\214\305" \ + "@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377" \ + "\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1" \ + "\214\305@\211\214\306>\27\216\306A\214\306>\212\306@\214\306<\213\310" \ + "\77\215\305@\215\307\77\213\305=\216\306\77\212\307;\212\306@\215\305" \ + ">\215\306A\212\307>\245\320d\367\375\361\376\377\377\377\376\377\377" \ + "\377\377\376\376\377\377\376\377\375\377\376\377\377\375\206\377\377" \ + "\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252" \ + "\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214" \ + "\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306" \ + ">\3\214\305@\214\306>\214\305@\221\377\377\377\6\376\376\376\377\376" \ + "\377\377\377\377\375\377\376\376\377\377\270\333\207\203\214\306>\17" \ + "\211\306=\212\307<\214\306<\214\305@\215\307\77\214\305@\216\305C\214" \ + "\306>\212\310A\215\305@\216\306\77\223\312K\360\371\346\222\311I\214" \ + "\305@\210\214\306>\10\214\305@\212\307>\214\305@\216\306A\215\307=\350" \ + "\364\334\375\377\376\377\376\377\225\377\377\377\7\376\376\376\377\377" \ + "\377\376\376\376\377\377\377SSS::<;;=\203::<\5FFH\364\364\364\376\376" \ + "\376\377\377\377\376\376\376\277\377\377\377\1\316\316\316\205::<\1k" \ + "km\222\377\377\377\1\376\376\376\204\377\377\377\3\376\376\376\377\377" \ + "\377SSU\205::<\1\234\234\236\202\377\377\377\1\376\376\376\202\377\377" \ + "\377\1\376\376\376\220\377\377\377\1\376\376\376\204\377\377\377\2kk" \ + "m;;=\202::<\5;;=::\214\305@\207\214\306>\4\214\305" \ + "@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p" \ + "\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\27" \ + "\214\304=\215\305>\213\307A\212\306@\214\305B\215\305<\213\310=\215\307" \ + "\77\215\304B\214\306<\213\307A\215\305>\216\306A\212\306@\212\307>\270" \ + "\332\204\377\376\377\377\377\377\377\376\377\376\376\374\377\377\373" \ + "\377\376\377\377\377\375\206\377\377\377\213\214\306>\3\215\305>\214" \ + "\306>\305\342\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305" \ + "@\207\214\306>\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324" \ + "p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305" \ + "@\223\377\377\377\1\377\377\375\202\377\377\377\2\371\372\364\232\315" \ + "W\202\214\305@\4\214\306<\215\307\77\214\305B\215\306C\202\215\306A\1" \ + "\214\306<\202\212\307>\6\215\305@\212\307>\215\305>\212\306B\216\306" \ + "A\212\307>\210\214\306>\10\214\305B\215\307\77\214\306<\214\306>\304" \ + "\341\237\377\377\377\377\376\377\377\377\375\220\377\377\377\1\376\376" \ + "\376\203\377\377\377\1\376\376\376\203\377\377\377\10\301\301\301::<" \ + ";;=99;;;=::<99;\234\234\236\207\377\377\377\1\376\376\376\273\377\377" \ + "\377\1\316\316\316\205::<\1kkm\216\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\376\376\376\204\377\377\377\3\376\376\376\377\377\377\315" \ + "\315\315\202;;=\203::<\6;;=\265\265\267\377\377\377\376\376\376\377\377" \ + "\377\376\376\376\225\377\377\377\2\376\376\376\317\317\317\203::<\4;" \ + ";=::<;;=\264\264\264\206\377\377\377\10\234\234\234;;=::<;;=99;;;=::" \ + "<\346\346\346\233\377\377\377\1\234\234\236\205::<\1\234\234\234\237" \ + "\377\377\377\1\376\376\376\204\377\377\377\1\204\204\206\202::<\6;;=" \ + "99;;;=::<\346\346\346\376\376\376\204\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\204\377\377\377\1\234\234\234\205::<\1\234\234\236\266" \ + "\377\377\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214\305@\215" \ + "\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377" \ + "\377\377\1\342\361\320\202\214\306>\1\214\305@\210\214\306>\22\215\307" \ + "\77\212\307>\216\306A\212\304<\215\307\77\215\305@\216\306\77\213\307" \ + "A\214\306>\214\305@\215\307\77\213\310=\212\307>\214\306>\214\306<\214" \ + "\306>\216\306\77\324\353\267\202\376\376\376\3\377\377\377\376\376\377" \ + "\376\377\375\207\377\377\377\213\214\306>\3\215\305>\214\306>\305\342" \ + "\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306" \ + ">\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215" \ + "\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\221\377\377" \ + "\377\3\376\377\377\377\377\377\376\377\375\202\377\377\377\7\377\376" \ + "\377\341\363\315\215\305@\214\305@\215\306A\215\305@\216\306\77\202\214" \ + "\306>\12\214\305B\212\307<\213\304A\213\310=\216\306A\211\306;\213\310" \ + "=\214\305@\212\307>\215\305>\210\214\306>\10\215\307\77\214\304=\212" \ + "\307>\243\322b\377\377\377\376\377\377\377\376\377\377\377\375\226\377" \ + "\377\377\4\376\376\376\377\377\377\204\204\206;;=\203::<\3""99;;;=\364" \ + "\364\364\205\377\377\377\1\376\376\376\275\377\377\377\1\316\316\316" \ + "\205::<\1kkm\217\377\377\377\202\376\376\376\202\377\377\377\1\376\376" \ + "\376\203\377\377\377\4\376\376\376xxz;;=99;\202;;=\4::<;;=\346\346\346" \ + "\376\376\376\204\377\377\377\1\376\376\376\224\377\377\377\1xxz\203:" \ + ":<\3;;=::\214\305" \ + "@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377" \ + "\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1" \ + "\214\305@\210\214\306>\7\213\305=\214\306<\210\306\77\216\306\77\215" \ + "\307=\214\306>\215\307\77\202\214\306>\14\215\307\77\214\305B\214\306" \ + "<\212\307<\214\305@\216\306\77\215\305>\214\305@\224\313L\352\364\331" \ + "\374\377\377\377\376\377\211\377\377\377\213\214\306>\3\215\305>\214" \ + "\306>\305\342\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305" \ + "@\207\214\306>\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324" \ + "p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305" \ + "@\222\377\377\377\1\376\377\377\202\377\377\377\24\376\376\374\376\377" \ + "\375\377\375\377\277\337\224\214\306>\212\307>\215\307\77\214\304=\215" \ + "\307=\213\304A\214\306<\212\307>\215\307\77\214\305@\213\304\77\215\307" \ + "\77\215\305@\214\304=\215\305<\215\306A\210\214\306>\1\212\307>\202\215" \ + "\306A\4\350\365\333\377\375\376\377\376\377\375\376\377\226\377\377\377" \ + "\1\376\376\376\202\377\377\377\3TTV::<99;\202;;=\4::<\203\203\203\377" \ + "\377\377\376\376\376\302\377\377\377\1\316\316\316\205::<\1kkm\222\377" \ + "\377\377\1\376\376\376\204\377\377\377\3\300\300\302;;=::<\202;;=\202" \ + "::<\2```\376\376\376\227\377\377\377\7\376\376\376\377\377\377\346\346" \ + "\346;;=99;::<;;=\202::<\3\251\251\251\377\377\377\376\376\376\206\377" \ + "\377\377\1\234\234\234\202::<\1;;=\202::<\2;;=\346\346\346\232\377\377" \ + "\377\1\234\234\236\205::<\1\234\234\234\235\377\377\377\1\376\376\376" \ + "\207\377\377\377\11SSU::<;;=99;<<>::\214\305@\207\214\306>\4\214\305@\215\305>\214\306>\252" \ + "\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361" \ + "\320\202\214\306>\1\214\305@\210\214\306>\25\213\307A\216\306A\232\315" \ + "W\215\306C\212\306@\214\305@\212\307;\216\306A\215\305>\215\307\77\214" \ + "\305@\215\307\77\214\306>\214\305@\212\306B\213\307C\214\306>\215\305" \ + "@\232\315V\372\374\367\376\376\376\202\377\377\375\1\376\376\376\206" \ + "\377\377\377\213\214\306>\3\215\305>\214\306>\305\342\240\215\377\377" \ + "\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214" \ + "\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@" \ + "\207\214\306>\3\214\305@\214\306>\214\305@\221\377\377\377\5\377\376" \ + "\377\376\377\377\377\375\376\377\376\377\376\377\377\202\377\377\377" \ + "\10\370\373\362\233\314V\213\307A\211\306=\215\307\77\212\307<\212\306" \ + "@\215\305<\202\214\306>\7\215\307=\215\306A\214\305@\212\307>\216\306" \ + "A\212\306@\215\307=\210\214\306>\10\212\307>\212\307<\313\347\254\376" \ + "\377\377\377\377\377\377\376\377\376\377\377\377\377\375\223\377\377" \ + "\377\1\376\376\376\203\377\377\377\1\332\332\332\202::<\1;;=\203::<\1" \ + "\302\302\302\203\377\377\377\5\376\376\376\377\377\377\376\376\376\377" \ + "\377\377\376\376\376\274\377\377\377\1\316\316\316\205::<\1kkm\217\377" \ + "\377\377\1\376\376\376\206\377\377\377\3\332\332\334FFH;;=\205::<\1\265" \ + "\265\265\202\377\377\377\1\376\376\376\224\377\377\377\1\376\376\376" \ + "\202\377\377\377\1\205\205\207\202::<\1;;=\202::<\2GGI\363\363\363\202" \ + "\377\377\377\1\376\376\376\205\377\377\377\1\363\363\363\202::<\1;;=" \ + "\202::<\2""99;\234\234\234\203\377\377\377\1\376\376\376\226\377\377" \ + "\377\1\234\234\236\205::<\1\234\234\234\234\377\377\377\1\376\376\376" \ + "\210\377\377\377\3\222\222\222::<99;\202;;=\5""99;GGI\376\376\376\377" \ + "\377\377\376\376\376\211\377\377\377\1\234\234\234\205::<\1\234\234\236" \ + "\266\377\377\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214\305" \ + "@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p" \ + "\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210\214\306>\10" \ + "\213\307A\214\306>\331\356\303\232\315W\215\305>\215\306A\214\305B\214" \ + "\306>\202\214\305@\7\213\310=\214\306>\215\304B\215\306A\211\306;\213" \ + "\310\77\214\305@\202\215\307\77\2\257\326{\376\377\373\202\377\377\377" \ + "\1\377\377\375\206\377\377\377\213\214\306>\3\215\305>\214\306>\305\342" \ + "\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306" \ + ">\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215" \ + "\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\221\377\377" \ + "\377\6\377\377\373\377\377\375\377\377\377\376\376\377\377\376\377\373" \ + "\377\374\202\377\376\377\4\336\362\315\220\303@\213\310=\215\307\77\202" \ + "\212\306@\1\215\305@\202\214\306>\7\213\305=\214\306>\213\305=\214\305" \ + "@\213\310\77\212\306@\213\307A\210\214\306>\10\215\307\77\252\324p\377" \ + "\377\375\376\377\377\377\377\375\377\377\377\377\376\377\377\377\375" \ + "\220\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\265\265\265\204::<\5;;=::<\363\363\363\377\377\377\376\376" \ + "\376\302\377\377\377\1\316\316\316\205::<\1kkm\225\377\377\377\2\317" \ + "\317\317FFH\206::<\1SSU\204\377\377\377\1\376\376\376\225\377\377\377" \ + "\2\346\346\346;;=\203::<\3;;=::<\234\234\236\202\377\377\377\1\376\376" \ + "\376\207\377\377\377\2\204\204\206;;=\204::<\2FFF\362\362\362\231\377" \ + "\377\377\1\234\234\236\205::<\1\234\234\234\245\377\377\377\1\301\301" \ + "\301\202::<\6;;=::<;;=::<\347\347\347\376\376\376\212\377\377\377\1\234" \ + "\234\234\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306>\214" \ + "\305@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377" \ + "\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306" \ + ">\1\214\305@\210\214\306>\27\214\305@\215\305<\342\362\315\353\365\334" \ + "\223\312K\215\305<\212\306@\215\305<\212\307>\215\306A\214\306>\212\307" \ + ">\215\307\77\215\304B\215\307\77\215\305@\214\306>\215\305>\214\305@" \ + "\215\305<\315\345\253\377\377\375\376\377\377\207\377\377\377\213\214" \ + "\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232" \ + "\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214" \ + "\305@\214\306>\214\305@\221\377\377\377\14\376\377\377\376\376\377\377" \ + "\377\377\377\377\373\376\377\375\377\376\377\376\377\377\377\377\377" \ + "\377\376\375\276\340\224\214\306<\215\305@\202\214\306>\12\215\305>\214" \ + "\305@\215\305@\214\305@\213\310\77\214\306>\216\306\77\211\305\77\215" \ + "\307=\214\305@\210\214\306>\4\223\312K\360\367\347\377\377\377\377\377" \ + "\375\232\377\377\377\2\376\376\376\234\234\236\204::<\2;;=___\234\377" \ + "\377\377\1\376\376\376\203\377\377\377\1\376\376\376\244\377\377\377" \ + "\1\316\316\316\205::<\1kkm\202\377\377\377\1\376\376\376\216\377\377" \ + "\377\4\376\376\376\377\377\377\347\347\347\204\204\204\203::<\6;;=::" \ + "<;;=::<;;=\301\301\303\226\377\377\377\1\376\376\376\203\377\377\377" \ + "\1\203\203\205\202;;=\5::<;;=::\214\305@\207\214\306>\4" \ + "\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250" \ + "\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210\214\306" \ + ">\40\213\307A\215\305>\341\360\317\377\375\376\324\353\267\215\304B\214" \ + "\306>\215\307=\214\305@\212\307>\212\307<\215\305<\215\306A\214\306>" \ + "\214\306<\212\306@\214\305@\215\307\77\216\306=\212\306B\214\306>\352" \ + "\364\333\377\376\377\377\377\377\377\376\377\377\377\377\377\377\375" \ + "\376\377\373\375\376\377\377\376\377\214\306>\215\307\77\211\214\306" \ + ">\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214\306" \ + ">\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232\377" \ + "\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305" \ + "@\214\306>\214\305@\232\377\377\377\7\374\377\375\242\321a\216\306A\212" \ + "\307>\214\306>\215\307\77\212\307<\210\214\306>\16\215\307\77\214\307" \ + ";\213\304\77\216\306A\214\305B\215\307\77\215\305>\212\307>\320\345\254" \ + "\374\377\377\377\376\377\377\377\375\377\376\377\375\377\372\223\377" \ + "\377\377\1\376\376\376\203\377\377\377\3\376\376\376\377\377\377kkm\203" \ + "::<\3<<>::<\221\221\221\305\377\377\377\1\316\316\316\204::<\2;;=jjl" \ + "\217\377\377\377\16\316\316\316\300\300\300\234\234\234__a::<;;=::<;" \ + ";=::<99;;;=::<;;=\204\204\206\232\377\377\377\1\362\362\362\202;;=\202" \ + "::<\3""99;::<\235\235\235\212\377\377\377\12\376\376\376\377\377\377" \ + "\205\205\20799;;;=::<;;=::\214\305" \ + "@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377" \ + "\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1" \ + "\214\305@\210\214\306>\202\214\306<\32\342\361\322\377\377\377\377\377" \ + "\375\266\334\205\212\306B\215\307\77\212\306@\220\306=\214\306>\215\307" \ + "\77\214\305B\213\305=\216\306\77\215\307\77\215\305<\212\306B\215\306" \ + "A\215\305@\216\306=\232\315V\371\373\360\377\377\375\377\377\377\375" \ + "\376\377\377\375\377\376\376\377\202\377\377\377\2\214\305@\212\307>" \ + "\211\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324" \ + "p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305" \ + "@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>" \ + "\3\214\305@\214\306>\214\305@\233\377\377\377\5\347\365\334\211\306=" \ + "\215\305>\216\306=\214\305@\211\214\306>\2\215\304B\212\307>\202\214" \ + "\306>\14\215\306A\214\306<\215\305@\252\324p\374\377\377\377\377\377" \ + "\377\375\376\377\376\377\376\376\377\377\377\375\377\377\377\377\375" \ + "\377\222\377\377\377\1\376\376\376\203\377\377\377\4\376\376\376lln:" \ + ":<;;=\203::<\2\235\235\235\376\376\376\304\377\377\377\1\316\316\316" \ + "\205::<\202;;=\2::<;;=\202::<\1;;=\211::<\202;;=\204::<\1""99;\202::" \ + "<\5;;=::<;;=__a\376\376\376\224\377\377\377\1\376\376\376\205\377\377" \ + "\377\1\235\235\235\206::<\3\346\346\346\377\377\377\376\376\376\207\377" \ + "\377\377\5\376\376\376\377\377\377\376\376\376\346\346\350;;=\203::<" \ + "\3;;=::<\265\265\265\230\377\377\377\1\234\234\236\205::<\1\234\234\234" \ + "\246\377\377\377\1lln\202::<\4""99;;;=99;\234\234\234\213\377\377\377" \ + "\1\234\234\234\203::<\7;;=::<;;=::<;;=::<;;=\222::<\7;;=99;;;=::<;;=" \ + "::<\316\316\316\231\377\377\377\3\214\305@\214\306>\214\305@\207\214" \ + "\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306" \ + ">\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210" \ + "\214\306>\13\216\306A\213\310\77\343\361\320\377\377\375\375\377\376" \ + "\371\374\361\242\320c\213\310\77\216\306\77\214\306>\215\306A\202\214" \ + "\305@\2\216\306A\213\305=\204\214\306>\11\213\307A\216\306A\212\307>" \ + "\260\331y\377\376\377\376\377\375\377\377\373\376\377\377\377\377\377" \ + "\202\377\376\377\2\212\311=\215\306A\211\214\306>\3\215\305>\214\306" \ + ">\305\342\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207" \ + "\214\306>\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\231" \ + "\377\377\377\6\377\376\377\377\377\373\377\376\377\305\342\240\212\310" \ + "\77\214\304=\202\215\305@\210\214\306>\4\215\305>\213\305=\212\306@\215" \ + "\306A\202\214\306>\10\222\312M\370\373\362\377\376\377\377\375\376\377" \ + "\376\377\377\377\377\376\377\375\377\377\377\202\377\376\377\221\377" \ + "\377\377\1\376\376\376\205\377\377\377\2::<;;=\202::<\202;;=\3\300\300" \ + "\300\377\377\377\376\376\376\235\377\377\377\1\376\376\376\245\377\377" \ + "\377\1\316\316\316\207::<\5;;=::<;;=::<;;=\210::<\202;;=\2""99;;;=\202" \ + "::<\3;;=::<;;=\202::<\3;;=xxz\363\363\363\225\377\377\377\3\376\376\376" \ + "\377\377\377\376\376\376\202\377\377\377\3\363\363\363FFH::<\202;;=\202" \ + "::<\1\204\204\206\205\377\377\377\1\376\376\376\205\377\377\377\1\376" \ + "\376\376\202\377\377\377\1kkm\202::<\1;;=\202::<\1SSU\230\377\377\377" \ + "\1\234\234\236\205::<\1\234\234\234\244\377\377\377\3\376\376\376\377" \ + "\377\377xxz\202::<\1;;=\202::<\3xxx\377\377\377\376\376\376\211\377\377" \ + "\377\1\234\234\234\203::<\1;;=\202::<\1;;=\224::<\5;;=99;;;=::<;;=\202" \ + "::<\1\316\316\316\231\377\377\377\3\214\305@\214\306>\214\305@\207\214" \ + "\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306" \ + ">\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210" \ + "\214\306>\3\214\305@\214\306<\343\361\316\202\377\377\377\26\377\376" \ + "\374\353\365\335\223\312K\211\305\77\215\307=\215\306C\211\306;\214\306" \ + ">\215\305@\215\307\77\214\305@\213\307A\214\306>\212\307<\216\306\77" \ + "\212\306B\215\305>\212\306@\304\341\236\377\376\377\375\377\376\377\377" \ + "\375\203\377\377\377\2\212\306@\214\306<\211\214\306>\3\215\305>\214" \ + "\306>\305\342\240\215\377\377\377\4\252\324p\214\306>\215\305>\214\305" \ + "@\207\214\306>\3\214\305@\214\306>\214\305@\232\377\377\377\4\252\324" \ + "p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305" \ + "@\231\377\377\377\2\377\377\373\376\377\377\202\377\377\377\4\241\321" \ + "c\215\306A\215\305>\213\310\77\210\214\306>\20\215\305@\215\307=\213" \ + "\310\77\214\304;\216\306\77\213\310\77\333\355\303\377\375\376\377\377" \ + "\375\377\376\377\377\377\377\375\377\374\376\377\377\377\377\377\377" \ + "\377\375\376\376\376\222\377\377\377\1\376\376\376\204\377\377\377\206" \ + "::<\2\316\316\316\376\376\376\234\377\377\377\1\376\376\376\247\377\377" \ + "\377\1\316\316\316\204::<\1;;=\205::<\1;;=\212::<\4""99;;;=::<;;=\203" \ + "::<\1;;=\202::<\1\233\233\233\234\377\377\377\3\235\235\23799;;;=\203" \ + "::<\2;;=\346\346\346\203\377\377\377\1\376\376\376\204\377\377\377\3" \ + "\376\376\376\377\377\377\376\376\376\203\377\377\377\4\316\316\320;;" \ + "=::<;;=\202::<\2;;=\264\264\264\227\377\377\377\1\234\234\236\205::<" \ + "\1\234\234\234\246\377\377\377\2\234\234\236;;=\203::<\2;;=kkk\213\377" \ + "\377\377\1\234\234\234\204::<\3;;=::<;;=\225::<\2;;=99;\202::<\3;;=:" \ + "::\316\316\316\231\377\377\377\3\214\305@\214\306>\214\305@\207\214\306" \ + ">\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214\306>" \ + "\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\210" \ + "\214\306>\14\215\307\77\215\305@\340\361\315\376\376\376\377\376\377" \ + "\377\377\375\377\377\377\323\353\267\212\307>\215\305@\214\305@\214\311" \ + "@\202\214\306>\22\212\307>\215\305@\214\306>\212\306@\214\305@\215\305" \ + ">\215\307=\214\306>\214\304=\215\307\77\341\362\316\377\376\377\377\377" \ + "\377\376\376\376\377\377\375\375\376\377\217\307@\212\306@\211\214\306" \ + ">\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214\306" \ + ">\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232\377" \ + "\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305" \ + "@\214\306>\214\305@\232\377\377\377\7\377\376\377\376\377\377\377\377" \ + "\377\352\364\331\212\307<\215\307=\212\307>\211\214\306>\13\212\306@" \ + "\214\306<\216\306A\214\305@\252\322q\376\376\377\376\377\373\377\376" \ + "\377\376\376\377\377\377\375\376\377\377\203\377\377\377\1\376\377\375" \ + "\227\377\377\377\202::<\202;;=\3::<;;=\316\316\316\233\377\377\377\1" \ + "\375\375\375\251\377\377\377\1\316\316\316\211::<\1;;=\213::<\3;;=::" \ + "<;;=\204::<\3""99;\205\205\207\346\346\346\233\377\377\377\4\376\376" \ + "\376\364\364\364FFH;;=\202::<\202;;=\1\204\204\204\215\377\377\377\1" \ + "\376\376\376\202\377\377\377\7kkm::<99;::<;;=99;TTV\227\377\377\377\1" \ + "\234\234\236\205::<\1\234\234\234\246\377\377\377\1\234\234\236\202:" \ + ":<\202;;=\2::\214\305@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251" \ + "\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202" \ + "\214\306>\1\214\305@\210\214\306>\202\214\305@\15\341\362\316\377\377" \ + "\375\376\377\375\377\377\377\373\377\374\377\376\377\271\332\211\212" \ + "\307>\212\307<\214\305B\214\305@\216\306\77\212\307>\202\215\307\77\11" \ + "\214\305B\215\306A\212\311=\214\303A\214\306>\215\306A\212\307>\225\311" \ + "K\371\372\362\202\377\377\375\202\377\377\377\2\214\305@\215\306A\211" \ + "\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p" \ + "\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305" \ + "@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>" \ + "\3\214\305@\214\306>\214\305@\231\377\377\377\10\376\377\377\377\376" \ + "\377\377\377\375\377\375\376\331\356\303\214\306>\214\305B\215\307\77" \ + "\210\214\306>\12\215\305>\212\306B\215\304B\214\306>\215\307=\224\310" \ + "J\364\370\351\376\376\374\375\377\372\377\377\375\203\377\377\377\3\377" \ + "\376\377\377\377\377\376\377\375\221\377\377\377\3\376\376\376\377\377" \ + "\377\376\376\376\203\377\377\377\7::<;;=99;::<;;=::<\315\315\315\232" \ + "\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\246\377\377" \ + "\377\1\316\316\316\204::<\1;;=\202::<\1;;=\203::<\1;;=\210::<\1;;=\202" \ + "::<\1;;=\202::<\4``b\233\233\235\347\347\351\376\376\376\235\377\377" \ + "\377\2\265\265\265;;=\202::<\1;;=\202::<\1\332\332\332\216\377\377\377" \ + "\3\376\376\376\377\377\377\302\302\302\206::<\1\315\315\315\226\377\377" \ + "\377\1\234\234\236\205::<\1\234\234\234\245\377\377\377\2\376\376\376" \ + "\235\235\237\205::<\1jjj\203\377\377\377\3\376\376\376\377\377\377\376" \ + "\376\376\205\377\377\377\1\234\234\234\204::<\2;;=kkm\202\234\234\236" \ + "\1\233\233\235\223\234\234\234\202\235\235\235\1\233\233\233\203\234" \ + "\234\234\1\346\346\346\231\377\377\377\3\214\305@\214\306>\214\305@\207" \ + "\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214" \ + "\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305" \ + "@\210\214\306>\17\212\307>\216\306A\342\360\315\376\377\377\376\376\374" \ + "\375\377\376\377\376\377\377\376\374\377\377\375\242\320d\215\307=\214" \ + "\306>\214\305@\215\305@\212\306@\202\214\305@\17\215\305@\212\307>\215" \ + "\307\77\214\306<\215\306A\213\304\77\215\306A\215\307\77\252\324n\377" \ + "\377\377\375\377\376\377\376\377\377\377\375\212\307<\215\305@\211\214" \ + "\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\4\252\324p\214" \ + "\306>\215\305>\214\305@\207\214\306>\3\214\305@\214\306>\214\305@\232" \ + "\377\377\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214" \ + "\305@\214\306>\214\305@\232\377\377\377\6\376\377\375\377\375\377\367" \ + "\375\363\223\312H\216\306\77\215\305>\212\214\306>\2\215\305@\214\306" \ + ">\202\212\307>\3\214\305@\247\324o\377\376\377\202\377\377\377\2\377" \ + "\376\377\377\377\375\233\377\377\377\2::<;;=\204::<\2\316\316\316\376" \ + "\376\376\236\377\377\377\3\316\316\316;;;:::\230::<\213\377\377\377\1" \ + "\316\316\316\224::<\6kkmlln\205\205\207\234\234\236\301\301\303\363\363" \ + "\363\202\377\377\377\1\376\376\376\202\377\377\377\3\376\376\376\377" \ + "\377\377\376\376\376\231\377\377\377\1SSS\204::<\2;;=lln\213\377\377" \ + "\377\1\376\376\376\205\377\377\377\2\376\376\376TTV\205::<\1lll\226\377" \ + "\377\377\1\234\234\236\205::<\1\234\234\234\246\377\377\377\2\233\233" \ + "\235;;=\204::<\2kkk\376\376\376\203\377\377\377\1\376\376\376\206\377" \ + "\377\377\1\234\234\234\205::<\1\234\234\236\266\377\377\377\3\214\305" \ + "@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214\306>\252\324" \ + "p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320" \ + "\202\214\306>\1\214\305@\210\214\306>\3\212\307>\215\305>\342\362\315" \ + "\202\377\377\377\22\377\376\377\376\377\377\377\377\375\376\377\377\363" \ + "\367\346\225\311K\211\307@\216\306\77\212\307>\215\305@\214\306<\212" \ + "\307>\214\305@\214\306>\212\306@\215\306C\214\304\77\215\307\77\202\214" \ + "\306>\7\212\306@\307\341\240\377\376\377\376\377\372\377\377\377\212" \ + "\307>\215\305>\211\214\306>\3\215\305>\214\306>\305\342\240\215\377\377" \ + "\377\4\252\324p\214\306>\215\305>\214\305@\207\214\306>\3\214\305@\214" \ + "\306>\214\305@\232\377\377\377\4\252\324p\214\306>\215\305>\214\305@" \ + "\207\214\306>\3\214\305@\214\306>\214\305@\231\377\377\377\4\377\376" \ + "\377\376\377\375\376\377\377\257\330z\202\214\305@\1\215\307\77\211\214" \ + "\306>\14\212\307>\215\307\77\214\305@\215\305@\212\307>\215\307=\214" \ + "\305B\313\347\252\377\377\377\377\375\377\377\376\377\376\376\376\202" \ + "\376\377\375\231\377\377\377\4GGI;;=::<;;=\202::<\1\233\233\235\237\377" \ + "\377\377\3\316\316\316::<;;=\230::<\213\377\377\377\1\316\316\316\205" \ + "::<\1kkm\202\377\377\377\2\376\376\376\250\250\250\206::<\2FFH\346\346" \ + "\346\210\377\377\377\1\376\376\376\237\377\377\377\1\264\264\266\203" \ + ";;=\4::<;;=;;;\316\316\316\222\377\377\377\1\265\265\265\204::<\3;;=" \ + "::<\316\316\316\203\377\377\377\1\376\376\376\221\377\377\377\1\234\234" \ + "\236\205::<\1\234\234\234\245\377\377\377\2\376\376\376\235\235\237\205" \ + "::<\1lll\213\377\377\377\1\234\234\234\205::<\1\234\234\236\266\377\377" \ + "\377\3\214\305@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214" \ + "\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377" \ + "\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361" \ + "\316\205\377\377\377\10\376\377\375\377\377\377\333\355\303\215\305@" \ + "\214\306>\214\306<\214\305@\215\305>\202\214\305@\207\214\306>\6\212" \ + "\306@\214\307;\330\355\304\377\376\377\377\377\377\215\305>\212\214\306" \ + ">\3\215\305>\214\306>\305\342\240\215\377\377\377\17\251\323q\214\306" \ + ">\215\307\77\214\305B\215\307\77\213\305=\215\307\77\214\305@\212\307" \ + ">\215\305@\213\310\77\214\305@\215\305<\214\306>\376\377\377\230\377" \ + "\377\377\6\376\377\377\253\323p\215\305@\213\307A\214\306<\212\306B\202" \ + "\214\306>\4\214\305@\214\306>\212\307>\214\305@\202\214\306>\2\214\305" \ + "@\376\377\375\220\377\377\377\1\377\377\375\202\377\377\377\16\376\377" \ + "\375\377\376\377\377\375\376\374\377\377\377\377\375\376\377\375\377" \ + "\377\377\336\355\304\214\306>\215\306A\214\306>\215\306A\212\306@\216" \ + "\306A\202\214\305@\4\215\307\77\214\306>\215\307\77\214\306>\202\214" \ + "\305@\16\214\306>\215\307\77\214\306>\215\307\77\214\305@\214\305B\222" \ + "\313H\361\370\346\376\377\377\377\377\377\377\376\377\377\377\377\374" \ + "\377\377\377\376\377\230\377\377\377\1kkm\202::<\1""99;\202::<\1\235" \ + "\235\237\233\377\377\377\1\376\376\376\203\377\377\377\1\316\316\316" \ + "\224::<\1;;=\205::<\213\377\377\377\1\316\316\316\205::<\1kkm\204\377" \ + "\377\377\3wwy::<;;=\202::<\4""99;;;=``b\363\363\363\206\377\377\377\1" \ + "\376\376\376\235\377\377\377\4\376\376\376\377\377\377\376\376\376TT" \ + "V\205::<\1lln\223\377\377\377\10\376\376\376SSU;;=::<;;=99;::\214\305@\207\214\306>\4\214\305@\215" \ + "\305>\214\306>\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377" \ + "\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305" \ + "@\343\361\316\205\377\377\377\7\377\375\377\377\377\375\376\377\377\276" \ + "\337\220\213\310\77\213\304A\216\306=\207\214\306>\3\215\307\77\214\306" \ + ">\212\307>\202\215\305>\5\223\312J\361\371\344\377\375\377\212\307<\214" \ + "\305@\211\214\306>\3\215\305>\214\306>\305\342\240\214\377\377\377\14" \ + "\376\376\374\252\324n\214\306>\213\305=\215\307\77\214\305@\215\306A" \ + "\214\306>\215\307\77\213\310\77\215\305@\212\307>\202\214\306>\1\214" \ + "\305@\232\377\377\377\3\247\324m\215\305>\214\305@\202\214\306>\1\215" \ + "\307=\202\214\305@\6\214\306<\215\307=\214\305B\215\307\77\214\306>\214" \ + "\305@\224\377\377\377\15\377\377\375\376\376\376\377\377\377\377\376" \ + "\377\376\377\375\377\377\375\372\373\366\222\312M\216\306A\215\305<\214" \ + "\306>\212\307>\215\305<\202\214\306>\2\215\307\77\213\305=\204\214\306" \ + ">\1\214\305@\203\214\306>\14\215\307\77\214\305@\213\304\77\214\305B" \ + "\253\324n\376\376\377\376\377\377\377\376\377\377\377\377\376\377\375" \ + "\377\377\375\376\377\375\227\377\377\377\3lln::<;;=\203::<\2kkm\376\376" \ + "\376\236\377\377\377\2\316\316\316;;=\226::<\3;;=::\214\305" \ + "@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377" \ + "\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1" \ + "\214\305@\211\214\306>\2\214\305@\343\361\316\205\377\377\377\2\377\377" \ + "\375\377\375\377\202\377\377\377\1\242\322b\202\214\305@\2\214\305B\215" \ + "\307\77\205\214\306>\12\215\307\77\214\306>\215\306A\214\306>\212\306" \ + "@\215\307=\241\321c\377\377\377\215\304B\212\307>\211\214\306>\3\215" \ + "\305>\214\306>\305\342\240\214\377\377\377\5\376\377\375\251\323o\215" \ + "\307\77\214\306>\215\307\77\202\214\305@\2\214\306>\215\307\77\202\214" \ + "\306>\5\213\310\77\215\305>\214\305@\214\306>\377\376\377\230\377\377" \ + "\377\12\377\376\377\247\326p\213\304\77\215\307\77\214\305B\214\306<" \ + "\214\306>\215\307\77\214\305@\214\306>\202\215\307\77\3\214\306>\215" \ + "\306A\216\306\77\223\377\377\377\5\376\377\372\377\377\375\376\376\376" \ + "\377\377\377\377\377\375\202\377\376\377\4\250\325p\212\307<\214\305" \ + "@\215\307\77\202\214\305@\3\214\307;\215\307=\214\306>\202\214\305@\202" \ + "\214\306>\1\215\307\77\207\214\306>\202\214\305@\5\212\307>\307\341\240" \ + "\376\376\374\377\377\377\377\376\377\202\377\377\377\1\376\376\374\227" \ + "\377\377\377\7\234\234\236;;=99;<<>99;::<;;=\237\377\377\377\1\316\316" \ + "\316\223::<\7;;=99;;;=99;::<;;=kkm\213\377\377\377\1\316\316\316\205" \ + "::<\2mmo\376\376\377\204\377\377\377\12\332\332\332FFH;;=::<;;=99;<<" \ + ">::<\266\266\270\376\376\376\203\377\377\377\1\376\376\376\202\377\377" \ + "\377\1\376\376\376\230\377\377\377\3\376\376\376\377\377\377\376\376" \ + "\376\202\377\377\377\1kkm\205::<\202;;=\224::<\10;;=::<;;=::<;;=88:;" \ + ";=\205\205\205\224\377\377\377\1\234\234\236\205::<\1\234\234\234\246" \ + "\377\377\377\3SSU;;=::<\203;;=\1\234\234\234\206\377\377\377\1\376\376" \ + "\376\204\377\377\377\1\234\234\234\205::<\1\234\234\236\266\377\377\377" \ + "\3\214\305@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214\306" \ + ">\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1" \ + "\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361" \ + "\316\205\377\377\377\10\376\376\374\376\377\375\377\375\377\377\377\377" \ + "\367\372\357\224\313L\214\305B\215\305<\203\214\306>\202\215\307\77\204" \ + "\214\306>\6\215\306A\213\307A\214\306>\212\306@\277\337\223\215\305>" \ + "\212\214\306>\3\215\305>\214\306>\305\342\240\214\377\377\377\2\376\377" \ + "\377\251\322r\202\215\307\77\1\214\305B\202\214\306>\202\215\307\77\7" \ + "\214\306>\215\307\77\214\306>\214\304\77\212\306@\215\307\77\377\376" \ + "\377\230\377\377\377\7\377\377\375\215\305@\214\306>\214\305@\214\306" \ + ">\216\306\77\214\306<\203\214\305@\6\215\306C\215\307=\214\305@\215\306" \ + "A\233\314V\377\377\375\220\377\377\377\5\376\376\376\377\377\377\377" \ + "\376\377\377\375\377\377\377\375\202\376\377\377\21\377\376\377\314\346" \ + "\251\212\306B\215\307=\212\307>\216\306\77\215\306C\212\307>\215\306" \ + "C\214\305@\215\307\77\213\304\77\215\306A\214\306>\214\305@\215\307\77" \ + "\215\306A\203\214\306>\1\215\307\77\202\214\306>\202\215\307\77\10\214" \ + "\306>\214\305@\350\364\334\377\377\375\377\376\377\377\377\377\376\376" \ + "\376\377\376\377\222\377\377\377\1\376\376\376\204\377\377\377\1\301" \ + "\301\301\202::<\2""99;;;=\202::<\1\316\316\316\233\377\377\377\1\376" \ + "\376\376\202\377\377\377\2\316\316\316;;;\222::<\7""99;;;=::<;;=::<9" \ + "9;\204\204\206\213\377\377\377\1\316\316\316\205::<\1jjl\202\377\377" \ + "\377\202\376\376\376\202\377\377\377\1\265\265\267\202::<\202;;=\202" \ + "::<\2FFH\332\332\332\205\377\377\377\1\376\376\376\234\377\377\377\2" \ + "\376\376\376\317\317\317\202::<\1;;=\204::<\3;;=::<;;=\222::<\2""99;" \ + ";;=\202::<\1;;=\203::<\3\346\346\346\377\377\377\376\376\376\221\377" \ + "\377\377\1\234\234\236\205::<\1\234\234\234\246\377\377\377\1;;=\203" \ + "::<\4;;=::<\316\316\316\376\376\376\203\377\377\377\1\376\376\376\206" \ + "\377\377\377\1\234\234\234\205::<\1\234\234\236\266\377\377\377\3\214" \ + "\305@\214\306>\214\305@\207\214\306>\4\214\305@\215\305>\214\306>\252" \ + "\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361" \ + "\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361\316\205" \ + "\377\377\377\203\376\377\377\202\377\376\377\2\341\361\315\214\305@\203" \ + "\215\307\77\202\214\306>\1\215\307\77\203\214\306>\10\214\305@\215\307" \ + "\77\214\306>\212\307>\216\306A\213\305;\214\305@\215\305<\211\214\306" \ + ">\3\215\305>\214\306>\305\342\240\214\377\377\377\2\376\377\377\252\324" \ + "p\202\214\306>\3\214\305B\214\306<\215\307\77\203\214\306>\6\214\306" \ + "<\214\307;\217\307@\212\307>\214\305@\376\377\377\231\377\377\377\10" \ + "\215\307=\214\305B\213\304A\216\310@\214\304\77\215\307=\214\305@\215" \ + "\307\77\203\214\306>\3\215\307\77\214\306>\247\324o\222\377\377\377\3" \ + "\377\377\375\377\377\377\377\375\376\203\377\377\377\20\360\371\346\223" \ + "\312K\216\306\77\213\304A\215\306A\213\305=\215\305@\212\307>\215\305" \ + "<\214\305B\214\305@\214\306>\214\306<\214\306>\215\307\77\213\305=\204" \ + "\214\306>\202\215\307\77\203\214\306>\10\215\306A\212\307<\243\321d\377" \ + "\377\373\375\377\376\377\376\377\377\377\377\376\376\374\223\377\377" \ + "\377\5\375\375\375\377\377\377\376\376\376\377\377\377\346\346\346\202" \ + "::<\1;;=\203::<\1\221\221\221\235\377\377\377\3\376\376\376\377\377\377" \ + "\376\376\376\222\377\377\377\1__a\204::<\2;;=\234\234\234\213\377\377" \ + "\377\1\316\316\316\205::<\3jjl\377\377\377\376\376\376\205\377\377\377" \ + "\2\204\204\206;;=\204::<\3;;=RRT\363\363\363\237\377\377\377\1\376\376" \ + "\376\202\377\377\377\2jjl;;=\206::<\4;;=::<99;;;=\223::<\1;;=\205::<" \ + "\1\204\204\206\203\377\377\377\1\376\376\376\217\377\377\377\1\234\234" \ + "\236\205::<\1\234\234\234\245\377\377\377\3\315\315\315;;=99;\202::<" \ + "\5""99;;;=\346\346\346\377\377\377\376\376\376\211\377\377\377\1\234" \ + "\234\234\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306>\214" \ + "\305@\207\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377" \ + "\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306" \ + ">\1\214\305@\211\214\306>\2\214\305@\343\361\316\207\377\377\377\202" \ + "\377\377\375\4\376\377\377\377\377\375\303\342\237\212\306@\202\214\305" \ + "@\206\214\306>\7\216\306\77\213\305;\214\305@\216\306A\214\306>\215\307" \ + "\77\213\307A\212\214\306>\3\215\305>\214\306>\305\342\240\215\377\377" \ + "\377\17\252\323k\215\306A\214\306>\215\307\77\214\306>\215\307\77\214" \ + "\305@\214\306>\213\304A\215\306C\214\305@\213\304A\213\310=\214\306<" \ + "\342\357\321\230\377\377\377\6\360\371\346\214\305B\212\307<\215\307" \ + "=\213\305=\215\307\77\202\214\305@\7\215\306A\214\306>\214\306<\214\305" \ + "@\214\306>\214\305@\252\324p\222\377\377\377\11\377\376\377\376\377\377" \ + "\377\377\377\377\377\375\376\376\374\377\377\377\253\323p\215\307\77" \ + "\211\306;\202\215\306A\6\214\306>\214\306<\215\305>\216\305C\215\307" \ + "\77\213\304\77\202\215\307\77\2\215\307=\213\305;\202\215\307\77\2\214" \ + "\306>\215\307\77\205\214\306>\5\215\307\77\212\306@\214\306>\215\307" \ + "\77\304\341\236\202\377\377\377\2\376\376\377\374\377\377\230\377\377" \ + "\377\7SSU;;=99;::<;;=::\214\305@\207\214\306>\4\214\305@\215\305>\214\306" \ + ">\252\324p\251\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1" \ + "\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361" \ + "\316\206\377\377\377\13\377\376\377\377\377\377\376\377\375\377\377\377" \ + "\377\376\377\376\377\377\253\324l\214\305B\213\304\77\214\305@\215\307" \ + "\77\203\214\306>\11\214\305@\214\306<\216\306=\214\306>\212\306@\215" \ + "\306C\214\304;\212\307>\214\305@\211\214\306>\3\215\305>\214\306>\305" \ + "\342\240\215\377\377\377\1\261\330\177\202\214\306>\2\214\306<\215\306" \ + "A\203\214\306>\7\215\307\77\214\306>\214\306<\215\307=\214\306>\215\306" \ + "C\323\353\267\230\377\377\377\4\340\361\315\215\305@\215\306A\214\305" \ + "@\202\214\306>\2\213\305=\215\306A\202\214\305@\5\214\306>\215\307\77" \ + "\214\306>\214\305@\260\330x\221\377\377\377\3\376\376\376\377\377\373" \ + "\375\377\376\202\377\377\377\25\376\377\377\314\345\253\214\305@\213" \ + "\304\77\216\306\77\212\307>\215\305@\214\306>\214\305@\215\305>\214\305" \ + "@\214\306>\214\306<\214\305@\215\306A\214\305@\215\306C\214\306>\214" \ + "\305@\214\306>\215\307\77\207\214\306>\7\212\306@\220\306=\215\306C\350" \ + "\364\336\376\377\373\377\377\375\376\377\377\230\377\377\377\1\221\221" \ + "\223\203::<\1;;=\202::<\1\265\265\265\230\377\377\377\1\376\376\376\227" \ + "\377\377\377\1\316\316\316\202::<\1;;=\203::<\1\363\363\363\213\377\377" \ + "\377\1\316\316\316\205::<\1kkm\204\377\377\377\1\376\376\376\203\377" \ + "\377\377\2\346\346\346FFH\206::<\2\234\234\236\376\376\376\237\377\377" \ + "\377\1\205\205\205\206::<\3;;=::<;;=\223::<\1;;=\203::<\202;;=\204::" \ + "<\2\234\234\234\376\376\376\221\377\377\377\1\234\234\236\205::<\1\234" \ + "\234\234\245\377\377\377\1RRR\204::<\2""99;yy{\203\377\377\377\1\376" \ + "\376\376\202\377\377\377\202\376\376\376\204\377\377\377\1\234\234\234" \ + "\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306>\214\305@\207" \ + "\214\306>\4\214\305@\215\305>\214\306>\252\324p\251\377\377\377\215\214" \ + "\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305" \ + "@\211\214\306>\2\214\305@\343\361\316\205\377\377\377\30\377\377\375" \ + "\377\377\377\375\377\376\377\377\377\377\376\377\377\377\377\376\377" \ + "\377\371\372\365\222\313H\214\305B\214\305@\215\307\77\214\306>\215\307" \ + "\77\214\306>\214\305@\212\306B\214\305@\212\307>\216\306\77\212\307>" \ + "\215\307\77\214\306<\214\305@\211\214\306>\3\215\305>\214\306>\305\342" \ + "\240\214\377\377\377\20\377\376\377\301\345\237\215\305>\215\306A\213" \ + "\304\77\215\306C\214\306>\214\306<\216\306\77\214\306>\214\305B\215\307" \ + "\77\214\306>\215\307\77\214\305@\271\332\211\230\377\377\377\10\307\341" \ + "\240\215\305>\214\305@\214\306>\215\305<\212\307>\214\305B\214\306<\202" \ + "\214\306>\5\215\305<\214\305B\215\307\77\214\306>\303\344\235\222\377" \ + "\377\377\6\376\376\377\377\377\375\376\377\377\377\376\377\352\364\333" \ + "\215\305@\202\215\307\77\16\214\306>\215\307\77\214\306>\215\307\77\214" \ + "\306<\216\306A\213\310\77\214\305D\215\3108\214\305@\215\305>\223\312" \ + "K\236\323a\215\307\77\207\214\306>\202\214\305@\10\214\306>\215\307\77" \ + "\212\307>\212\307<\241\321c\377\376\377\377\375\376\377\375\377\230\377" \ + "\377\377\3\332\332\332:::;;=\204::<\1SSU\203\377\377\377\1\376\376\376" \ + "\247\377\377\377\1\376\376\376\204\377\377\377\1\221\221\221\202::<\1" \ + ";:\77\202::<\1RRT\214\377\377\377\1\316\316\316\205::<\1kkm\211\377\377" \ + "\377\2\316\316\316;;=\202::<\5;;=::<;;=::<\316\316\316\210\377\377\377" \ + "\1\376\376\376\215\377\377\377\1\376\376\376\207\377\377\377\2\346\346" \ + "\350::<\202;;=\202::<\2:::xxx\230\234\234\234\3\235\235\235\234\234\234" \ + "kkm\203::<\4;;=::\214\305@\204\214\306>\2\213\307A\213\310\77\204\214\306>\1\252\324" \ + "p\232\377\377\377\1\377\377\375\216\377\377\377\215\214\306>\1\250\325" \ + "p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>" \ + "\2\214\305@\343\361\316\215\377\377\377\10\352\363\336\214\306>\212\306" \ + "B\215\307\77\212\307<\215\305>\214\305@\215\307\77\221\214\306>\3\215" \ + "\305>\214\306>\305\342\240\214\377\377\377\30\377\376\377\313\347\254" \ + "\215\307\77\214\304=\215\307\77\212\306@\215\307\77\215\306A\214\305" \ + "@\214\306>\215\307\77\214\306>\215\307\77\214\305@\214\305B\222\313H" \ + "\377\376\377\377\375\376\377\376\377\377\377\377\377\376\377\377\377" \ + "\373\376\377\377\377\376\377\211\377\377\377\26\377\377\375\377\376\377" \ + "\377\377\377\376\377\377\377\377\375\376\377\375\377\377\377\241\323" \ + "b\215\304D\214\307;\215\307\77\214\305B\215\307\77\214\306<\215\306A" \ + "\212\307>\215\305@\214\306>\213\310=\215\305@\215\306A\323\352\264\221" \ + "\377\377\377\11\376\377\377\376\376\374\376\377\377\377\376\374\377\376" \ + "\377\242\320c\215\307\77\215\306A\214\306>\202\214\305@\203\214\306>" \ + "\25\214\305@\215\306A\214\305@\215\307\77\214\306>\215\307=\315\345\253" \ + "\361\370\346\215\307\77\214\306>\212\306@\216\306A\214\306>\215\305>" \ + "\215\305@\214\305@\212\307>\215\305@\212\306@\215\305<\215\305@\202\214" \ + "\306>\12\277\337\223\377\377\377\376\377\375\377\376\377\377\377\375" \ + "\376\377\377\377\377\377\376\376\376\377\377\377\377\377\375\222\377" \ + "\377\377\1___\202::<\202;;=\202::<\1\266\266\266\250\377\377\377\1\376" \ + "\376\376\202\377\377\377\1\376\376\376\203\377\377\377\1SSU\203::<\3" \ + ";;=::<\221\221\223\214\377\377\377\1\316\316\316\205::<\1kkm\210\377" \ + "\377\377\3\376\376\376\377\377\377\233\233\233\203::<\5;;=::<;;=FFH\364" \ + "\364\364\210\377\377\377\1\376\376\376\213\377\377\377\2\376\376\376" \ + "\377\377\377\202\376\376\376\205\377\377\377\1\204\204\206\202::<\1;" \ + ";=\202::<\3FFF\363\363\363\376\376\376\231\377\377\377\3\346\346\346" \ + "::<;;=\204::<\3\234\234\234\377\377\377\376\376\376\217\377\377\377\1" \ + "\234\234\236\205::<\1\234\234\234\234\377\377\377\1\376\376\376\207\377" \ + "\377\377\3\205\205\207::<;;=\204::<\1\346\346\350\214\377\377\377\1\234" \ + "\234\234\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306>\214" \ + "\305@\205\214\306>\7\214\306<\214\306>\215\307\77\214\305@\214\306>\252" \ + "\324p\376\377\375\230\377\377\377\203\377\376\377\203\377\377\377\1\376" \ + "\376\377\211\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342" \ + "\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361\316" \ + "\215\377\377\377\2\376\377\375\313\347\254\203\214\306>\3\214\305@\216" \ + "\306\77\211\306=\221\214\306>\3\215\305>\214\306>\305\342\240\214\377" \ + "\377\377\11\375\376\377\343\361\316\215\305>\215\307\77\213\304A\215" \ + "\307\77\215\305>\214\306<\214\305@\203\214\306>\14\215\307\77\214\305" \ + "@\213\304\77\214\305B\322\353\264\377\377\377\377\377\375\377\377\377" \ + "\377\376\377\376\377\377\377\377\377\376\377\377\210\377\377\377\13\377" \ + "\377\375\377\377\377\376\377\375\377\376\377\376\376\374\377\377\375" \ + "\377\377\377\350\364\334\215\304D\215\305>\215\307\77\202\214\305@\202" \ + "\214\306>\10\214\305@\215\306A\214\306<\215\306C\214\304=\215\307=\212" \ + "\307<\351\366\332\222\377\377\377\14\377\377\375\377\377\377\377\377" \ + "\375\304\343\237\214\306>\212\307>\217\307@\214\305@\215\307\77\214\306" \ + ">\214\305@\215\306A\202\214\306>\5\214\306<\215\305>\211\307>\216\306" \ + "=\251\323o\202\376\377\377\31\304\341\241\212\306@\215\306A\212\307>" \ + "\215\307\77\214\306<\216\305C\212\307<\216\306A\214\306<\215\307\77\215" \ + "\305>\212\307>\216\306A\214\305@\216\306A\341\361\315\377\376\377\377" \ + "\377\375\376\377\377\377\376\377\376\376\376\377\377\377\377\376\377" \ + "\376\377\375\222\377\377\377\1\265\265\265\202;;=\204::<\2SSU\364\364" \ + "\364\203\377\377\377\1\376\376\376\245\377\377\377\1\376\376\376\203" \ + "\377\377\377\1\316\316\316\203::<\1;;=\202::<\1\302\302\302\214\377\377" \ + "\377\1\316\316\316\205::<\1kkm\213\377\377\377\1lln\204::<\3;;=::<__" \ + "a\202\377\377\377\1\376\376\376\206\377\377\377\1\376\376\376\213\377" \ + "\377\377\1\376\376\376\202\377\377\377\1\376\376\376\203\377\377\377" \ + "\3\346\346\346::<;;=\204::<\1\234\234\234\234\377\377\377\1\204\204\206" \ + "\202;;=\202::<\2;;=SSU\221\377\377\377\1\234\234\236\205::<\1\234\234" \ + "\234\235\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\202" \ + "\377\377\377\2\346\346\346::<\202;;=\4""99;;;=::\214\305@\204\214\306>\10\214\305@\215\306A\215\305@\213\305=\214\306" \ + ">\215\307\77\252\324p\376\377\377\230\377\377\377\1\376\376\376\205\377" \ + "\377\377\2\376\377\377\376\377\375\210\377\377\377\215\214\306>\1\250" \ + "\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306" \ + ">\2\214\305@\343\361\316\215\377\377\377\10\377\377\375\377\375\376\262" \ + "\331|\214\305@\215\306A\214\306>\214\305B\215\307\77\221\214\306>\3\215" \ + "\305>\214\306>\305\342\240\214\377\377\377\10\376\377\375\377\377\377" \ + "\214\304\77\212\307>\216\306A\214\306>\215\305@\215\307\77\206\214\306" \ + ">\202\214\305@\3\233\316X\376\376\377\376\377\373\202\377\377\377\3\377" \ + "\375\376\377\377\375\377\376\377\210\377\377\377\12\377\376\377\376\377" \ + "\375\377\375\376\376\376\374\377\377\377\377\377\375\377\377\377\257" \ + "\330x\214\307;\215\307\77\202\214\305@\2\215\307\77\213\305=\202\214" \ + "\306>\1\215\305>\202\214\306>\5\216\306\77\215\306A\215\305@\376\377" \ + "\375\377\376\377\220\377\377\377\11\377\377\375\377\377\377\376\377\377" \ + "\350\364\334\212\307>\213\310\77\216\306\77\212\307>\214\305@\202\214" \ + "\306>%\215\306A\214\306>\213\305=\214\306>\215\307\77\215\305@\211\307" \ + ">\223\311M\363\367\350\376\377\375\377\377\377\377\377\375\242\320d\212" \ + "\307<\215\306A\214\305@\212\306@\215\306A\214\306>\212\307>\215\307\77" \ + "\217\304@\211\310<\215\305>\213\310\77\212\307>\214\306>\234\315W\367" \ + "\372\363\376\377\377\377\376\377\377\377\375\377\377\377\376\376\376" \ + "\377\377\375\377\377\377\376\377\375\222\377\377\377\1RRR\202::<\203" \ + ";;=\2::<\234\234\236\204\377\377\377\1\376\376\376\246\377\377\377\3" \ + "\376\376\376\377\377\377kkk\202::<\4;;=99;;;=FFH\215\377\377\377\1\316" \ + "\316\316\205::<\1kkm\211\377\377\377\5\376\376\376\377\377\377\363\363" \ + "\363SSU;;=\202::<\202;;=\2""99;\222\222\222\207\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\214\377\377\377\1\376\376\376\204\377\377" \ + "\377\3\204\204\204;;=99;\202;;=\3::\214\305@\204\214\306>\2\214\305@\214\306>\203\215\306A\2\215\307\77" \ + "\251\323q\231\377\377\377\203\377\377\375\202\377\377\377\1\377\375\376" \ + "\202\377\376\377\210\377\377\377\215\214\306>\1\250\325p\216\377\377" \ + "\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343" \ + "\361\316\215\377\377\377\7\376\376\376\377\377\375\366\373\364\233\316" \ + "X\215\305@\215\307=\215\305>\222\214\306>\3\215\305>\214\306>\305\342" \ + "\240\216\377\377\377\6\243\322b\214\306>\215\305@\215\307\77\215\305" \ + "@\215\306A\203\214\306>\1\215\307\77\202\214\306>\202\215\307\77\2\214" \ + "\306>\315\346\254\202\377\377\377\4\377\376\375\376\377\375\376\376\377" \ + "\377\376\377\212\377\377\377\7\377\377\375\377\376\377\377\377\373\377" \ + "\377\375\327\356\304\214\306>\215\307\77\202\214\305@\203\214\306>\12" \ + "\215\307\77\214\306>\214\305@\216\306\77\214\306<\214\304\77\212\307" \ + ">\260\331{\376\377\375\377\376\377\220\377\377\377\13\376\377\377\377" \ + "\377\375\370\373\362\233\315Z\216\306A\214\305@\212\307>\215\306A\214" \ + "\306>\214\305@\215\306A\202\214\306>\6\215\307\77\214\305@\214\305B\214" \ + "\306>\215\307=\313\347\254\202\377\377\377\23\377\376\377\377\377\375" \ + "\350\364\334\212\307>\220\306=\214\305@\216\306=\214\306>\214\305@\214" \ + "\306>\212\306@\215\305>\212\306@\215\307\77\212\307>\215\307\77\214\305" \ + "@\212\306@\277\340\221\202\377\377\377\1\377\377\375\203\377\377\377" \ + "\2\377\376\377\377\377\375\220\377\377\377\4\376\376\376\377\377\377" \ + "\265\265\265::<\202;;=\5""99;::<;;=99;\317\317\317\250\377\377\377\1" \ + "\376\376\376\202\377\377\377\2\316\316\31699;\202::<\202;;=\2::<\221" \ + "\221\223\215\377\377\377\1\316\316\316\205::<\1kkm\207\377\377\377\1" \ + "\376\376\376\204\377\377\377\1\332\332\334\203::<\5;;=::<;;=99;\302\302" \ + "\302\202\377\377\377\1\376\376\376\216\377\377\377\1\376\376\376\202" \ + "\377\377\377\1\376\376\376\204\377\377\377\4\362\362\362FFH::<;;=\202" \ + "::<\2;;=\221\221\223\204\377\377\377\202\376\376\376\224\377\377\377" \ + "\1\376\376\376\203\377\377\377\1kkm\202;;=\203::<\1SSU\220\377\377\377" \ + "\1\234\234\236\205::<\1\234\234\234\240\377\377\377\3\376\376\376\377" \ + "\377\377\315\315\315\203::<\1;;=\202::<\1SSU\216\377\377\377\1\234\234" \ + "\234\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306>\214\305" \ + "@\204\214\306>\3\215\306A\214\306<\215\307=\202\214\305@\3\214\306>\253" \ + "\324n\377\377\375\230\377\377\377\2\375\376\377\376\376\376\203\377\377" \ + "\377\1\377\377\375\212\377\377\377\215\214\306>\1\250\325p\216\377\377" \ + "\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343" \ + "\361\316\220\377\377\377\5\350\365\333\214\306>\214\305@\214\306>\215" \ + "\306A\221\214\306>\3\215\305>\214\306>\305\342\240\215\377\377\377\7" \ + "\377\377\375\277\337\224\212\306@\215\305@\212\307>\215\306A\215\307" \ + "\77\203\214\306>\202\215\307\77\203\214\306>\3\214\306<\214\306>\351" \ + "\363\330\202\377\377\377\3\376\376\376\374\377\377\376\377\377\211\377" \ + "\377\377\1\376\377\377\202\377\377\377\7\375\376\377\351\365\337\223" \ + "\311M\215\307=\214\305B\214\305@\215\307\77\202\214\306>\12\215\306A" \ + "\214\305@\214\306>\212\307>\215\306A\214\306>\215\307=\213\310\77\316" \ + "\345\255\376\377\377\221\377\377\377\7\376\377\377\377\377\375\300\337" \ + "\223\216\306A\213\305=\215\307=\215\305>\202\214\306>\1\215\307\77\203" \ + "\214\306>\202\214\305@\5\215\307\77\213\307A\251\322r\377\377\377\377" \ + "\377\375\202\377\377\377\14\377\376\377\377\377\377\305\342\237\212\307" \ + "<\220\305\77\214\306>\212\306@\215\306A\214\306<\214\305@\214\306<\216" \ + "\305C\202\214\306>\7\215\305<\214\306>\215\305>\214\305@\342\362\316" \ + "\377\377\377\377\377\375\202\377\377\377\3\376\377\377\377\376\377\376" \ + "\376\376\221\377\377\377\3\376\376\376\377\377\377___\205::<\4;;=FFH" \ + "\363\363\363\377\377\377\202\376\376\376\246\377\377\377\3\363\363\363" \ + "SSU;;=\204::<\4;;=\345\345\345\377\377\377\376\376\376\213\377\377\377" \ + "\1\316\316\316\205::<\1kkm\211\377\377\377\1\376\376\376\203\377\377" \ + "\377\4\264\264\266;;=99;::<\202;;=\3::\214\305@\204\214\306>\2\212\306@\213\310" \ + "\77\202\214\305@\3\215\307\77\214\306<\251\323o\231\377\377\377\4\377" \ + "\376\377\377\377\375\377\377\377\376\376\377\214\377\377\377\215\214" \ + "\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305" \ + "@\211\214\306>\2\214\305@\343\361\316\215\377\377\377\1\377\377\375\203" \ + "\377\377\377\4\323\353\267\212\307<\214\306<\212\306B\221\214\306>\3" \ + "\215\305>\214\306>\305\342\240\214\377\377\377\7\376\377\377\377\376" \ + "\377\350\365\331\215\307\77\215\305>\214\306>\212\307>\202\214\306>\1" \ + "\215\307\77\205\214\306>\11\215\307\77\213\304A\212\307>\222\312M\343" \ + "\361\316\376\376\377\377\376\377\377\377\377\377\375\377\210\377\377" \ + "\377\1\377\376\377\202\377\377\375\12\377\376\377\350\364\334\220\313" \ + "K\216\306=\215\305<\215\307\77\214\306>\213\305=\214\306>\215\306A\202" \ + "\214\306>\1\214\305@\202\212\307>\6\214\305@\215\306C\215\305>\360\370" \ + "\351\377\377\373\376\377\377\221\377\377\377\7\345\360\322\215\305@\214" \ + "\305@\215\307=\214\304=\213\310=\215\305>\202\214\306>\2\213\305=\215" \ + "\307\77\202\214\305@\7\215\307\77\214\307;\214\305@\363\367\346\376\377" \ + "\377\377\377\373\377\376\377\202\377\377\377\30\376\377\375\377\376\377" \ + "\241\321a\216\306\77\212\306@\213\310=\215\305@\213\307A\217\304>\215" \ + "\305@\214\306<\216\306A\215\306A\212\307>\214\306<\214\306>\212\307<" \ + "\233\314W\366\373\365\377\377\375\377\377\377\377\376\377\373\377\377" \ + "\377\376\377\224\377\377\377\1\317\317\317\205::<\4;;=::<``b\362\362" \ + "\362\247\377\377\377\2\376\376\376\221\221\221\206::<\3\204\204\206\377" \ + "\377\377\376\376\376\214\377\377\377\1\316\316\316\205::<\1kkm\212\377" \ + "\377\377\6\376\376\376\377\377\377\376\376\376\377\377\377\203\203\203" \ + ";;=\205::<\3``b\363\363\363\376\376\376\216\377\377\377\1\376\376\376" \ + "\206\377\377\377\3\363\363\363FFH;;=\203::<\2;;=\203\203\203\203\377" \ + "\377\377\3\376\376\376\377\377\377\376\376\376\225\377\377\377\1\376" \ + "\376\376\204\377\377\377\3kkk::<<<>\202::<\2;;=kkm\217\377\377\377\1" \ + "\234\234\236\205::<\1\234\234\234\236\377\377\377\4\376\376\376\377\377" \ + "\377\376\376\376kkk\202::<\5;;=::<99;;;=TTV\202\377\377\377\1\376\376" \ + "\376\214\377\377\377\1\234\234\234\205::<\1\234\234\236\266\377\377\377" \ + "\3\214\305@\214\306>\214\305@\204\214\306>\10\214\306<\214\306>\214\305" \ + "@\214\306>\215\307\77\214\306>\252\324r\376\377\377\230\377\377\377\1" \ + "\377\377\375\202\377\377\377\2\377\377\375\376\376\374\203\377\376\377" \ + "\210\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320" \ + "\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361\316\215\377" \ + "\377\377\10\375\377\374\377\376\377\375\377\376\376\376\377\377\377\377" \ + "\270\333\207\214\305@\215\307\77\221\214\306>\3\215\305>\214\306>\305" \ + "\342\240\214\377\377\377\12\375\376\377\377\376\377\376\377\377\234\313" \ + "Y\215\306A\214\305@\212\307>\214\305@\214\306>\215\307\77\206\214\306" \ + ">\7\215\307\77\214\306>\215\305@\213\310\77\304\343\240\371\372\364\376" \ + "\377\377\212\377\377\377\10\376\377\377\377\376\377\315\345\251\223\311" \ + "M\214\306>\216\306\77\214\305B\214\306<\202\214\306>\15\215\306A\214" \ + "\305@\214\306>\215\307\77\214\305@\214\306<\214\305@\215\307\77\213\304" \ + "A\263\330{\377\377\377\376\376\376\377\377\375\220\377\377\377\7\370" \ + "\373\364\232\315V\216\306=\212\311=\214\306>\216\306A\213\307A\202\214" \ + "\305@\202\214\306>\202\214\305@\10\215\307\77\215\305>\215\304D\304\341" \ + "\237\376\377\377\377\376\377\376\376\377\377\377\375\202\377\376\377" \ + "\24\376\377\377\377\377\373\350\365\333\215\305>\214\306<\214\306>\212" \ + "\306@\215\307\77\213\305=\215\305@\215\307\77\214\306>\215\305>\215\306" \ + "A\211\305A\215\305@\214\305B\213\310=\262\327z\374\377\377\202\377\377" \ + "\377\2\377\377\375\373\377\376\225\377\377\377\1\221\221\223\203::<\6" \ + ";;=99;;;=::<``b\362\362\362\246\377\377\377\2\265\265\265:::\202::<\1" \ + ";;=\203::<\1\346\346\350\216\377\377\377\1\316\316\316\205::<\1kkm\216" \ + "\377\377\377\6\363\363\363__a::<;;=::<;;=\202::<\1\204\204\204\204\377" \ + "\377\377\1\376\376\376\221\377\377\377\1\234\234\234\204::<\3;;=::<\347" \ + "\347\347\202\377\377\377\1\376\376\376\205\377\377\377\1\376\376\376" \ + "\225\377\377\377\3\376\376\376\377\377\377\265\265\265\202::<\202;;=" \ + "\3::<;;=\316\316\316\216\377\377\377\1\234\234\236\205::<\1\234\234\234" \ + "\240\377\377\377\2\204\204\204:::\206::<\1\301\301\303\217\377\377\377" \ + "\1\234\234\234\205::<\1\234\234\236\266\377\377\377\3\214\305@\214\306" \ + ">\214\305@\205\214\306>\7\214\305@\216\306A\215\307=\213\304\77\213\307" \ + "A\242\321a\345\356\317\230\342\362\316\7\341\361\315\342\361\322\342" \ + "\361\320\343\361\315\345\360\322\365\373\357\376\377\377\211\377\377" \ + "\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214\306" \ + ">\1\214\305@\211\214\306>\2\214\305@\343\361\316\216\377\377\377\7\376" \ + "\377\375\377\377\375\377\377\377\377\376\377\371\374\365\242\322d\215" \ + "\306A\221\214\306>\3\215\305>\214\306>\305\342\240\214\377\377\377\10" \ + "\377\377\375\377\377\377\377\377\373\312\346\253\215\307=\212\307>\214" \ + "\305B\216\306=\206\214\306>\202\214\305@\10\214\306>\212\307>\216\306" \ + "\77\214\306>\212\307>\233\316W\306\340\237\361\370\346\210\377\377\377" \ + "\12\361\370\350\314\345\253\233\314W\214\306>\213\310\77\215\305<\214" \ + "\305@\212\307<\215\306A\214\305@\203\214\306>\202\214\305@\202\214\306" \ + ">\4\216\306A\212\306@\213\310\77\333\356\301\202\377\377\377\1\377\377" \ + "\375\220\377\377\377\26\270\332\204\215\306A\212\306B\214\306>\213\307" \ + "A\215\305@\214\306<\214\306>\215\306A\214\306<\215\307\77\214\305B\215" \ + "\307\77\214\307;\215\304D\241\323b\377\377\375\376\377\377\377\377\377" \ + "\377\377\373\377\377\377\376\377\377\202\377\377\375\16\377\377\377\376" \ + "\377\377\277\337\224\214\305@\215\306A\214\306>\215\305>\212\310\77\214" \ + "\305@\215\307\77\212\307>\214\305B\216\306=\215\306A\202\214\306<\6\214" \ + "\306>\213\307C\331\356\305\377\376\377\377\377\373\376\376\376\227\377" \ + "\377\377\3__a::<;:\77\205::<\2__a\363\363\363\203\377\377\377\1\376\376" \ + "\376\213\377\377\377\1\376\376\376\203\377\377\377\3\376\376\376\377" \ + "\377\377\376\376\376\213\377\377\377\1\376\376\376\202\377\377\377\1" \ + "\265\265\267\205::<\3;;=:::\234\234\234\217\377\377\377\1\316\316\316" \ + "\205::<\1kkm\217\377\377\377\4\332\332\332GGI::<;;=\204::<\1\250\250" \ + "\252\225\377\377\377\1FFH\205::<\1\204\204\204\242\377\377\377\1TTV\205" \ + "::<\4lln\376\376\376\377\377\377\376\376\376\203\377\377\377\1\376\376" \ + "\376\207\377\377\377\1\234\234\236\205::<\1\235\235\237\221\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\376\376\376\202\377\377\377\202\376" \ + "\376\376\205\377\377\377\3\363\363\365\204\204\206;;=\204::<\3;;=:::" \ + "xxx\220\377\377\377\1\234\234\234\203::<\3;;=::<\234\234\234\204\377" \ + "\377\377\1\376\376\376\261\377\377\377\3\214\305@\214\306>\214\305@\250" \ + "\214\306>\2\215\307\77\342\362\316\212\377\377\377\215\214\306>\1\250" \ + "\325p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306" \ + ">\2\214\305@\343\361\316\216\377\377\377\11\375\376\377\377\376\377\377" \ + "\377\375\376\377\377\377\376\377\351\365\335\223\311M\212\307<\214\306" \ + ">\202\216\306A\4\212\307<\215\306A\215\305>\215\307\77\211\214\306>\3" \ + "\215\305>\214\306>\305\342\240\214\377\377\377\20\377\376\377\377\377" \ + "\375\377\376\377\365\374\364\223\312J\217\304>\215\307\77\212\307;\215" \ + "\306A\214\305B\214\305@\215\307\77\214\306<\213\310\77\214\305@\215\305" \ + ">\210\214\306>\10\234\315Z\257\327~\304\343\235\306\340\237\307\341\240" \ + "\304\343\237\257\327\177\241\321a\210\214\306>\20\217\304>\215\306A\212" \ + "\306@\212\307>\213\305;\216\306A\213\305=\215\306C\211\310<\216\306A" \ + "\214\306>\234\314V\377\377\377\375\377\374\376\377\377\377\376\377\211" \ + "\377\377\377\7\377\376\377\376\377\375\376\377\377\376\377\375\377\376" \ + "\377\377\377\377\333\355\303\210\214\306>\10\215\306A\214\305@\216\306" \ + "=\214\306>\215\307\77\214\305@\215\307\77\352\364\334\211\377\377\377" \ + "\6\377\376\377\367\375\363\232\315V\215\307\77\214\306>\214\305@\212" \ + "\214\306>\6\212\307>\223\311M\366\373\364\377\376\377\377\377\377\376" \ + "\377\373\221\377\377\377\1\376\376\376\204\377\377\377\2\346\346\346" \ + "FFH\203::<\1""99;\203::<\2__a\332\332\332\211\377\377\377\1\376\376\376" \ + "\203\377\377\377\1\376\376\376\205\377\377\377\1\376\376\376\206\377" \ + "\377\377\1\376\376\376\207\377\377\377\1\265\265\267\202::<\1;;=\204" \ + "::<\2```\376\376\376\217\377\377\377\1\316\316\316\205::<\1kkm\216\377" \ + "\377\377\4\376\376\376\377\377\377\301\301\301;;=\205::<\2;;=\331\331" \ + "\331\202\377\377\377\3\376\376\376\377\377\377\376\376\376\216\377\377" \ + "\377\1\265\265\267\205::<\3;;=\332\332\332\376\376\376\241\377\377\377" \ + "\1\266\266\270\205::<\2""99;\316\316\320\215\377\377\377\1\234\234\236" \ + "\203::<\5;;=::<\234\234\234\377\377\377\376\376\376\220\377\377\377\1" \ + "\376\376\376\206\377\377\377\1\376\376\376\203\377\377\377\2\346\346" \ + "\346``b\202::<\2""99;;;=\203::<\4FFF\363\363\363\377\377\377\376\376" \ + "\376\216\377\377\377\1\234\234\234\204::<\3;;=\234\234\234\376\376\376" \ + "\265\377\377\377\3\214\305@\214\306>\214\305@\250\214\306>\2\215\307" \ + "\77\342\362\316\212\377\377\377\215\214\306>\1\250\325p\216\377\377\377" \ + "\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361" \ + "\316\215\377\377\377\16\377\376\377\376\377\377\377\376\377\377\377\377" \ + "\376\377\377\377\376\377\375\377\374\323\353\267\215\305<\215\306C\215" \ + "\305<\213\306:\213\310\77\212\306@\202\214\305@\211\214\306>\3\215\305" \ + ">\214\306>\305\342\240\215\377\377\377\4\376\377\377\377\377\375\377" \ + "\376\377\305\342\242\202\214\305@\5\216\306A\214\306>\215\307=\215\307" \ + "\77\213\304A\202\214\305@\2\214\306>\212\306@\210\214\306>\7\214\306" \ + "<\215\307=\215\307\77\213\305=\214\306>\215\307\77\213\305=\211\214\306" \ + ">\11\215\306A\215\305>\212\307;\213\304\77\215\306A\211\306=\215\306" \ + "A\212\307<\216\306A\202\215\307\77\4\343\361\320\376\377\375\377\377" \ + "\375\376\376\377\212\377\377\377\1\377\376\377\202\377\377\377\4\377" \ + "\376\377\376\377\377\367\375\363\225\311J\210\214\306>\10\215\307=\213" \ + "\310\77\214\305@\216\306\77\214\305@\212\307>\307\341\240\376\377\375" \ + "\210\377\377\377\5\377\376\377\374\377\375\377\376\377\343\361\320\212" \ + "\306@\202\214\306>\1\213\310\77\210\214\306>\10\215\306A\215\305>\214" \ + "\305@\260\327z\377\376\374\374\377\377\377\377\377\377\376\377\226\377" \ + "\377\377\1\332\332\332\210::<\2GGI\250\250\250\223\377\377\377\3\376" \ + "\376\376\377\377\377\376\376\376\202\377\377\377\1\376\376\376\202\377" \ + "\377\377\1\376\376\376\204\377\377\377\2\250\250\252;;=\204::<\202;;" \ + "=\2EEG\331\331\331\220\377\377\377\1\316\316\316\205::<\1kkm\221\377" \ + "\377\377\5\222\222\224::<;;=::<;;=\202::<\5SSU\364\364\364\376\376\376" \ + "\377\377\377\376\376\376\216\377\377\377\2\376\376\376TTV\203::<\4;;" \ + "=99;lln\376\376\376\243\377\377\377\1TTV\204::<\5;;=\204\204\206\376" \ + "\376\376\377\377\377\376\376\376\212\377\377\377\1\234\234\236\202::" \ + "<\1;;=\202::<\1\234\234\234\215\377\377\377\1\376\376\376\202\377\377" \ + "\377\1\376\376\376\212\377\377\377\6\376\376\376\250\250\252FFH99;::" \ + "<;;=\205::<\1\316\316\316\221\377\377\377\1\234\234\234\203::<\3;;=:" \ + ":<\234\234\236\266\377\377\377\3\214\305@\214\306>\214\305@\250\214\306" \ + ">\2\215\307\77\342\362\316\212\377\377\377\215\214\306>\1\250\325p\216" \ + "\377\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214" \ + "\305@\343\361\316\215\377\377\377\3\377\376\377\376\377\375\376\377\377" \ + "\202\377\377\377\13\377\377\375\377\376\377\376\376\374\271\332\211\215" \ + "\306A\211\306;\216\306A\212\307>\213\307A\215\306A\212\307>\211\214\306" \ + ">\3\215\305>\214\306>\305\342\240\214\377\377\377\20\376\377\375\377" \ + "\377\377\377\377\375\377\377\377\371\370\364\233\316U\214\306>\214\305" \ + "@\215\306A\214\306>\214\305@\215\307=\214\306>\215\305@\215\304B\213" \ + "\310=\210\214\306>\3\215\305@\214\306>\213\305=\202\213\310\77\3\214" \ + "\306>\215\307\77\215\305@\210\214\306>\20\212\306@\212\307;\216\306\77" \ + "\215\307\77\212\306@\214\306<\215\305>\215\307\77\220\305\77\211\307" \ + ">\263\330{\377\376\377\377\377\375\376\377\377\377\377\377\376\376\376" \ + "\211\377\377\377\7\377\377\373\377\377\377\377\375\376\377\377\377\377" \ + "\377\375\257\330|\213\310\77\211\214\306>\6\215\306C\211\306=\214\305" \ + "@\214\306>\242\322e\377\377\375\212\377\377\377\7\376\377\377\377\377" \ + "\375\377\375\376\277\337\224\216\307B\212\307>\214\305@\210\214\306>" \ + "\2\214\305@\216\306\77\202\212\307>\4\332\360\302\376\376\374\376\376" \ + "\376\377\376\377\227\377\377\377\1\266\266\266\202::<\1;;=\202::<\2;" \ + ";=::<\202;;=\2kkm\346\346\350\202\377\377\377\1\376\376\376\207\377\377" \ + "\377\1\376\376\376\203\377\377\377\5\376\376\376\377\377\377\376\376" \ + "\376\377\377\377\376\376\376\202\377\377\377\3\376\376\376\377\377\377" \ + "\376\376\376\204\377\377\377\2\364\364\364yy{\203::<\2;;=99;\203::<\3" \ + "\265\265\267\377\377\377\376\376\376\217\377\377\377\1\316\316\316\205" \ + "::<\1kkm\222\377\377\377\1kkm\203::<\1;;=\202::<\5kkm\377\377\377\376" \ + "\376\376\377\377\377\376\376\376\212\377\377\377\5\376\376\376\377\377" \ + "\377\376\376\376\265\265\267;;=\204::<\2;;=\315\315\315\244\377\377\377" \ + "\11\234\234\234::<99;;;=::<;;=::<\347\347\347\376\376\376\213\377\377" \ + "\377\1\234\234\236\204::<\2;;=\233\233\233\217\377\377\377\1\376\376" \ + "\376\206\377\377\377\6\376\376\376\377\377\377\376\376\376\377\377\377" \ + "\265\265\265TTT\202::<\202;;=\203::<\3;;=::<\266\266\270\202\377\377" \ + "\377\1\376\376\376\217\377\377\377\1\234\234\234\204::<\4;;=\235\235" \ + "\237\377\377\377\376\376\376\224\377\377\377\1\376\376\376\203\377\377" \ + "\377\1\376\376\376\233\377\377\377\3\214\305@\214\306>\214\305@\250\214" \ + "\306>\2\215\307\77\342\362\316\212\377\377\377\215\214\306>\1\250\325" \ + "p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>" \ + "\2\214\305@\343\361\316\215\377\377\377\202\377\377\375\16\377\377\377" \ + "\377\377\375\377\377\377\376\377\375\376\376\374\377\376\377\375\377" \ + "\376\241\322_\215\306A\212\306B\215\305>\215\307\77\214\306<\214\305" \ + "B\211\214\306>\3\215\305>\214\306>\305\342\240\214\377\377\377\1\377" \ + "\376\377\202\377\377\375\15\376\377\377\377\375\376\340\361\317\214\306" \ + ">\212\307>\214\306>\215\307\77\214\306>\212\307<\215\307\77\215\305>" \ + "\216\306=\213\305=\210\214\306>\1\212\307>\202\214\305@\202\214\306>" \ + "\3\214\305@\215\306A\212\307>\210\214\306>\20\212\307>\213\304\77\214" \ + "\306>\211\310<\214\306>\216\306A\212\306@\215\305@\214\306>\223\313N" \ + "\367\372\363\376\377\377\377\377\377\377\376\377\376\377\373\377\376" \ + "\377\212\377\377\377\202\376\377\377\3\377\375\376\324\353\265\215\306" \ + "A\211\214\306>\7\215\305>\213\305=\215\307\77\215\306A\212\307>\351\363" \ + "\333\377\377\375\211\377\377\377\10\377\376\377\375\377\376\376\377\377" \ + "\377\376\377\370\373\362\233\314W\215\307\77\215\305<\210\214\306>\1" \ + "\215\307\77\202\214\306>\4\214\306<\225\310O\360\366\350\377\376\377" \ + "\221\377\377\377\3\376\376\376\377\377\377\376\376\376\205\377\377\377" \ + "\1\266\266\266\202::<\4;;=99;::<;;=\202::<\4;;=::<\204\204\206\346\346" \ + "\350\207\377\377\377\1\376\376\376\206\377\377\377\202\376\376\376\202" \ + "\377\377\377\1\376\376\376\203\377\377\377\1\376\376\376\202\377\377" \ + "\377\3\251\251\251FFF99;\202::<\1""99;\202::<\5;;=::<\234\234\236\377" \ + "\377\377\376\376\376\220\377\377\377\1\316\316\316\205::<\1kkm\222\377" \ + "\377\377\11\363\363\363GGI99;::<99;;;=::<;;=\234\234\234\214\377\377" \ + "\377\1\376\376\376\203\377\377\377\1SSU\202::<\1;;=\202::<\1kkm\245\377" \ + "\377\377\5\362\362\362GGI;;=::<;;=\202::<\1\204\204\206\206\377\377\377" \ + "\1\376\376\376\205\377\377\377\1\234\234\236\203::<\3""99;::<\234\234" \ + "\234\223\377\377\377\1\376\376\376\203\377\377\377\3\331\331\331\222" \ + "\222\222SSU\203::<\2;;=::<\202;;=\4::<;;=::<\265\265\267\202\377\377" \ + "\377\1\376\376\376\203\377\377\377\1\376\376\376\214\377\377\377\1\234" \ + "\234\234\205::<\1\234\234\236\203\377\377\377\1\376\376\376\223\377\377" \ + "\377\1\376\376\376\236\377\377\377\3\214\305@\214\306>\214\305@\250\214" \ + "\306>\2\215\307\77\342\362\316\212\377\377\377\215\214\306>\1\250\325" \ + "p\216\377\377\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>" \ + "\2\214\305@\343\361\316\216\377\377\377\17\377\376\377\377\377\377\376" \ + "\376\376\377\376\377\377\377\375\376\377\377\375\377\376\377\377\377" \ + "\363\367\350\222\312K\214\305@\213\310\77\214\304\77\215\307\77\216\306" \ + "A\211\214\306>\3\215\305>\214\306>\305\342\240\214\377\377\377\14\377" \ + "\376\377\376\377\375\376\377\377\377\376\377\376\377\377\376\377\375" \ + "\307\342\237\214\305@\214\306<\215\304D\214\306>\214\305D\202\212\307" \ + "<\2\212\307>\213\307A\210\214\306>\3\215\307\77\214\306>\215\307\77\202" \ + "\214\305@\213\214\306>\12\213\305;\215\306A\212\306@\214\306>\213\307" \ + "C\212\307>\215\305>\212\307>\215\305>\333\356\301\202\377\377\377\3\377" \ + "\377\375\377\377\377\377\376\377\211\377\377\377\10\376\377\375\377\377" \ + "\375\376\377\375\374\377\375\362\371\347\225\311M\215\307\77\215\305" \ + "<\210\214\306>\2\214\305@\216\306=\202\212\306@\2\305\342\237\377\375" \ + "\376\212\377\377\377\1\376\376\374\203\377\377\377\4\376\376\376\337" \ + "\363\316\215\306C\215\305<\211\214\306>\1\215\307\77\202\214\305@\4\214" \ + "\306<\253\324n\375\377\374\377\377\375\224\377\377\377\1\376\376\376" \ + "\204\377\377\377\2\301\301\301FFH\202::<\2;;=99;\202;;=\2::<;;=\202:" \ + ":<\2\204\204\206\316\316\320\207\377\377\377\1\376\376\376\203\377\377" \ + "\377\1\376\376\376\206\377\377\377\6\376\376\376\377\377\377\364\364" \ + "\364\265\265\267SSU::<\202;;=\202::<\5;;=::<;;=::<\204\204\204\223\377" \ + "\377\377\1\316\316\316\205::<\1kkm\223\377\377\377\11\315\315\315;;=" \ + "::<;;=::<;;=::<99;\302\302\302\216\377\377\377\5\301\301\303::<;;=::" \ + "<;;=\202::<\2\316\316\316\377\377\377\202\376\376\376\241\377\377\377" \ + "\14\376\376\376\377\377\377\234\234\234;;=::<;;=::<;;=::<\347\347\351" \ + "\377\377\377\376\376\376\211\377\377\377\1\234\234\236\203::<\3;;=::" \ + "<\234\234\236\216\377\377\377\202\376\376\376\1\377\377\377\202\316\316" \ + "\316\6\250\250\250\234\234\234jjjFFF;;=99;\202;;=\2::<;;=\202::<\5<<" \ + ">99;;;=::<\265\265\267\204\377\377\377\1\376\376\376\217\377\377\377" \ + "\1\234\234\234\204::<\2;;=\234\234\236\202\377\377\377\1\376\376\376" \ + "\223\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\234\377" \ + "\377\377\3\214\305@\214\306>\214\305@\250\214\306>\2\215\307\77\342\362" \ + "\316\212\377\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361" \ + "\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343\361\316\215" \ + "\377\377\377\202\377\376\377\16\377\377\375\376\377\377\377\377\377\377" \ + "\377\375\377\376\377\376\376\376\377\376\377\377\377\377\333\354\302" \ + "\212\307>\213\310\77\214\306<\213\310=\215\305@\211\214\306>\3\215\305" \ + ">\214\306>\305\342\240\214\377\377\377\1\377\376\377\202\376\377\377" \ + "\202\377\377\375\13\376\377\377\377\375\376\271\333\205\215\305>\214" \ + "\306>\212\307>\214\306>\215\306A\214\306>\212\306@\214\305@\210\214\306" \ + ">\3\214\305@\215\307\77\214\306>\202\212\307>\3\214\306>\215\307\77\215" \ + "\306A\210\214\306>\4\216\306A\211\306=\214\306<\216\306A\202\212\307" \ + ">\202\215\306A\10\322\352\270\377\377\375\376\376\374\377\377\377\376" \ + "\377\377\377\376\377\377\377\375\376\377\377\210\377\377\377\10\377\377" \ + "\375\377\377\377\377\376\377\374\376\373\250\325n\216\306\77\212\307" \ + ">\214\305B\210\214\306>\202\212\307>\6\214\305@\242\322d\376\376\374" \ + "\377\377\375\375\377\376\377\376\377\210\377\377\377\10\376\377\377\377" \ + "\377\375\377\375\376\377\377\375\375\376\377\376\377\375\270\333\207" \ + "\211\310<\210\214\306>\10\214\304=\216\307B\214\306>\212\307>\216\306" \ + "A\215\307\77\313\350\250\376\376\377\221\377\377\377\1\376\376\376\203" \ + "\377\377\377\1\376\376\376\204\377\377\377\7\332\332\332RRT;;=::<;;=" \ + "::<;;=\202::<\1;;=\203::<\3RRT\221\221\223\317\317\321\214\377\377\377" \ + "\11\376\376\376\377\377\377\364\364\364\301\301\301\204\204\206EEG;;" \ + "=99;;;=\204::<\1""99;\202::<\1\251\251\251\207\377\377\377\1\376\376" \ + "\376\214\377\377\377\1\316\316\316\205::<\1kkm\224\377\377\377\1\247" \ + "\247\247\203::<\5;;=::<;;=FFH\345\345\345\214\377\377\377\2\376\376\376" \ + "kkm\205::<\1SSU\202\377\377\377\1\376\376\376\244\377\377\377\2\363\363" \ + "\363FFH\204::<\2;;=\221\221\223\213\377\377\377\1\234\234\236\204::<" \ + "\4;;=SSUkkmlln\213kkm\5;;=::<;;=::<;;=\204::<\2;;=99;\202;;=\2::<;;=" \ + "\202::<\7;;=99;::\214\305@\250\214\306>\2\215" \ + "\307\77\342\362\316\212\377\377\377\215\214\306>\1\250\325p\216\377\377" \ + "\377\1\342\361\320\202\214\306>\1\214\305@\211\214\306>\2\214\305@\343" \ + "\361\316\215\377\377\377\1\377\376\377\202\377\377\375\202\377\377\377" \ + "\202\377\376\377\11\377\377\375\377\377\377\376\377\377\377\376\377\276" \ + "\336\223\214\306<\213\310\77\214\304=\215\306A\211\214\306>\3\215\305" \ + ">\214\306>\305\342\240\214\377\377\377\20\377\377\375\376\377\375\376" \ + "\376\376\377\376\377\375\377\376\377\375\377\376\377\377\376\377\375" \ + "\270\333\207\217\305<\212\307>\214\305@\216\306\77\213\305=\214\305@" \ + "\216\306=\211\214\306>\2\215\306A\215\305@\202\216\306\77\3\215\305@" \ + "\214\305@\215\307\77\210\214\306>\13\213\305=\215\306A\215\305>\212\306" \ + "@\215\305>\215\306A\220\305A\323\352\266\376\377\375\377\376\377\377" \ + "\377\375\202\377\377\377\3\376\377\377\377\375\377\376\377\375\213\377" \ + "\377\377\5\316\347\256\212\307>\213\305;\216\306A\212\307<\210\214\306" \ + ">\10\212\307>\216\306\77\215\305>\350\364\336\377\376\377\376\376\374" \ + "\377\377\377\377\376\377\210\377\377\377\1\377\376\377\202\377\377\377" \ + "\5\377\376\377\376\377\375\377\376\377\370\373\360\225\311K\210\214\306" \ + ">\10\216\306=\214\305@\215\310<\212\307>\214\306>\214\305@\223\312J\356" \ + "\371\350\231\377\377\377\4\376\376\376\377\377\377\363\363\363xxz\202" \ + "::<\1""99;\202::<\1;;=\203::<\202;;=\203::<\4__a\205\205\205\234\234" \ + "\234\250\250\250\205\316\316\316\4\250\250\250\234\234\234xxx___\202" \ + "::<\3""99;;;=99;\203::<\1;;=\203::<\2FFH\265\265\265\205\377\377\377" \ + "\1\376\376\376\217\377\377\377\1\316\316\316\205::<\1kkm\225\377\377" \ + "\377\3xxx::<;;=\204::<\1```\213\377\377\377\4\376\376\376\317\317\317" \ + "::<;;=\204::<\1\266\266\270\203\377\377\377\1\376\376\376\241\377\377" \ + "\377\1\377\377\375\202\377\377\377\1\204\204\206\202::<\1;;=\202::<\2" \ + "GGI\363\363\363\212\377\377\377\1\234\234\236\203::<\1;;=\202::<\1;;" \ + "=\221::<\1;;=\207::<\1;;=\202::<\1;;=\202::<\2``b\346\346\350\210\377" \ + "\377\377\1\376\376\376\215\377\377\377\1\234\234\234\207::<\3;;=::<;" \ + ";=\221::<\1;;=\203::<\1;;=\202::<\1\316\316\320\231\377\377\377\3\214" \ + "\305@\214\306>\214\305@\250\214\306>\2\215\307\77\342\362\316\212\377" \ + "\377\377\215\214\306>\1\250\325p\216\377\377\377\1\342\361\320\202\214" \ + "\306>\1\214\305@\211\214\306>\2\214\305@\343\361\316\215\377\377\377" \ + "\7\377\377\375\376\377\375\377\377\377\377\376\377\376\376\374\376\377" \ + "\377\377\377\377\202\376\377\377\202\377\377\375\4\377\377\377\242\320" \ + "d\211\306=\215\305@\212\214\306>\3\215\305>\214\306>\305\342\240\214" \ + "\377\377\377\6\377\376\377\377\377\377\377\377\375\377\375\377\376\377" \ + "\372\375\376\377\202\377\377\377\10\376\377\377\304\343\240\215\305@" \ + "\214\306>\216\306A\215\307\77\212\307>\215\307\77\212\214\306>\3\215" \ + "\307\77\214\306>\214\305@\202\215\307\77\211\214\306>\12\215\306C\212" \ + "\307<\215\307\77\215\305@\213\310\77\215\306A\323\352\266\377\376\377" \ + "\377\377\377\376\377\377\204\377\377\377\2\377\377\375\377\376\377\210" \ + "\377\377\377\10\376\377\377\377\376\377\361\370\346\225\311K\212\307" \ + ">\215\306A\214\305@\215\305>\210\214\306>\3\214\305@\214\306>\307\341" \ + "\240\203\376\377\377\2\377\377\375\376\377\377\210\377\377\377\5\376" \ + "\377\377\377\376\372\376\377\375\376\376\376\377\377\377\202\377\376" \ + "\377\1\334\355\301\210\214\306>\10\215\306A\213\310\77\215\305@\214\306" \ + ">\214\306<\215\306A\214\306>\254\322o\232\377\377\377\6\376\376\376\377" \ + "\377\377\376\376\376\302\302\302FFH;;=\206::<\1;;=\202::<\202;;=\203" \ + "::<\1;;=\204::<\3;;=::<;;=\202::<\1;;=\202::<\1;;=\203::<\2;;=::<\202" \ + ";;=\2__a\332\332\332\226\377\377\377\3\316\316\316::<;;=\203::<\1kkm" \ + "\222\377\377\377\7\376\376\376\377\377\377\376\376\376\363\363\363__" \ + "a::<;;=\204::<\1\203\203\203\202\377\377\377\2\376\376\376\377\377\377" \ + "\202\376\376\376\205\377\377\377\1kkm\202::<\1;;=\202::<\5TTV\377\377" \ + "\377\376\376\376\377\377\377\376\376\376\245\377\377\377\2\347\347\347" \ + "99;\202::<\1;;=\202::<\1\235\235\237\206\377\377\377\1\376\376\376\202" \ + "\377\377\377\2\376\376\376\234\234\234\224::<\1;;=\202::<\3""99;::<;" \ + ";=\204::<\1;;=\204::<\3;;=GGI\250\250\252\230\377\377\377\2\234\234\236" \ + ";;=\232::<\10;;=99;;;=::<;;=::<:::\316\316\316\230\377\377\377\10\377" \ + "\376\377\212\306@\214\305@\213\310=\214\306<\215\306A\214\307;\215\306" \ + "A\240\214\306>\10\214\305@\212\307<\214\306<\214\305@\212\306@\342\360" \ + "\315\376\377\377\377\376\377\210\377\377\377\212\214\306>\4\216\306\77" \ + "\212\306B\214\306>\250\325n\202\377\376\377\210\377\377\377\1\377\376" \ + "\377\202\377\377\377\5\376\377\375\342\362\316\214\305B\215\305@\214" \ + "\306<\210\214\306>\202\212\307>\5\343\361\320\377\377\377\377\377\375" \ + "\376\377\377\377\376\377\223\377\377\377\6\377\376\377\377\377\375\371" \ + "\372\364\223\312J\212\306@\215\305@\210\214\306>\10\214\305@\215\305" \ + ">\212\307>\304\343\240\377\377\375\377\377\377\377\377\375\377\376\377" \ + "\220\377\377\377\11\376\377\377\377\377\377\333\355\303\226\310K\213" \ + "\310\77\214\306>\215\305@\215\306A\214\305@\203\214\306>\7\215\305>\215" \ + "\305@\214\305@\212\307>\215\305>\215\307\77\215\306A\202\214\306<\5\215" \ + "\306A\213\305=\215\305@\215\307\77\213\305;\202\215\305@\13\215\307\77" \ + "\213\310\77\214\305@\215\307\77\212\307>\215\305>\214\306>\212\306@\235" \ + "\315U\347\365\334\377\376\377\220\377\377\377\15\376\376\376\377\377" \ + "\375\377\377\377\244\317c\213\307A\214\306<\213\307A\215\305>\215\305" \ + "<\215\307\77\214\306<\215\307\77\214\305@\202\215\307\77\12\214\305@" \ + "\215\306A\215\305@\234\315W\367\375\363\377\376\377\376\377\377\377\377" \ + "\375\376\377\377\377\376\377\220\377\377\377\10\260\331{\215\307=\212" \ + "\307>\213\307A\214\306>\215\305@\215\307\77\215\305>\210\214\306>\3\314" \ + "\345\253\377\377\377\376\377\375\202\377\376\377\2\377\377\377\376\377" \ + "\377\222\377\377\377\3\376\376\376\377\377\377\376\376\376\202\377\377" \ + "\377\3\364\364\364\220\220\220;;=\211::<\2;;=::<\202;;=\2::<;;=\202:" \ + ":<\4;;=::<;;=99;\203::<\2;;=99;\206::<\2GGI\247\247\251\203\377\377\377" \ + "\1\376\376\376\222\377\377\377\6\376\376\376\377\377\377\316\316\316" \ + ";;=99;;;=\202::<\2lln\376\376\376\202\377\377\377\1\376\376\376\221\377" \ + "\377\377\4\376\376\376\333\333\333FFH;;=\202::<\1;;=\202::<\1\265\265" \ + "\265\202\377\377\377\1\376\376\376\202\377\377\377\5\376\376\376\377" \ + "\377\377\376\376\376\377\377\377\316\316\320\202::<\2;;=99;\202;;=\1" \ + "\264\264\266\202\377\377\377\1\376\376\376\244\377\377\377\1\376\376" \ + "\376\202\377\377\377\1\205\205\207\204::<\3;;=FFH\363\363\363\206\377" \ + "\377\377\1\376\376\376\202\377\377\377\3\233\233\233::<;;=\220::<\3""9" \ + "9;;;=99;\202::<\1;;=\203::<\1;;=\204::<\7;;=::\215\307\77" \ + "\214\306>\215\306A\240\214\306>\7\214\306<\214\306>\216\306\77\214\306" \ + ">\214\305@\343\361\320\377\377\375\211\377\377\377\210\214\306>\10\213" \ + "\307A\212\306@\215\305@\212\307<\215\307\77\247\324o\375\377\376\376" \ + "\377\377\211\377\377\377\7\376\377\375\377\377\377\377\377\375\342\360" \ + "\315\214\305@\213\305=\215\307\77\210\214\306>\10\215\305>\215\307\77" \ + "\343\361\316\376\376\376\377\376\377\376\377\377\377\377\375\376\377" \ + "\372\220\377\377\377\10\376\377\377\377\376\377\377\377\375\377\376\374" \ + "\376\377\375\343\362\321\212\307>\214\307;\210\214\306>\4\215\307=\215" \ + "\304B\213\307A\305\342\240\203\377\377\377\1\376\377\377\222\377\377" \ + "\377\21\377\376\377\367\374\365\267\332\206\215\306A\212\306@\214\306" \ + "<\214\306>\215\306A\215\307\77\214\306>\214\305@\212\306B\212\306@\212" \ + "\307<\215\307\77\214\306>\214\305@\202\215\305@\5\214\305@\214\306>\214" \ + "\305@\212\307>\215\306A\202\214\305@\11\214\307;\214\306>\215\306A\214" \ + "\305@\215\305>\212\306@\222\311I\306\343\240\366\373\364\224\377\377" \ + "\377\6\303\342\237\217\304@\214\306<\214\306>\215\306C\212\306B\204\214" \ + "\305@\1\215\306A\202\214\305@\11\215\306A\214\306<\214\306>\341\361\314" \ + "\377\377\377\376\377\375\377\377\377\377\375\377\377\377\375\221\377" \ + "\377\377\10\370\373\364\224\307N\215\305@\215\305>\212\307<\215\306A" \ + "\212\307<\215\306A\210\214\306>\10\215\307=\346\364\332\376\377\375\376" \ + "\377\373\377\377\377\376\376\377\377\376\377\377\377\375\230\377\377" \ + "\377\5\346\346\350\204\204\206GGI::<;;=\202::<\5;;=::<;;=::<;;=\202:" \ + ":<\3;;=::<;;=\202::<\5;;=99;;;=::<;;=\207::<\3FFH\234\234\234\363\363" \ + "\363\203\377\377\377\1\376\376\376\222\377\377\377\1\376\376\376\202" \ + "\377\377\377\4\316\316\316::<;;=99;\202;;=\1kkm\202\377\377\377\1\376" \ + "\376\376\220\377\377\377\1\376\376\376\202\377\377\377\5\376\376\376" \ + "\266\266\26699;;;=::<\202;;=\3::\215\307\77\212\307>\216\306\77\241\214\306" \ + ">\1\215\306C\202\215\305@\5\212\306@\215\307=\343\361\320\377\377\377" \ + "\377\376\377\210\377\377\377\210\214\306>\10\215\305<\215\307\77\216" \ + "\306\77\214\306>\216\305C\252\324r\377\377\377\377\377\373\211\377\377" \ + "\377\7\375\377\376\377\377\377\377\375\376\343\361\316\215\307=\212\307" \ + ">\215\305>\210\214\306>\10\214\305@\215\305<\342\362\316\377\377\375" \ + "\377\376\377\375\377\374\376\376\377\376\377\377\222\377\377\377\1\375" \ + "\377\372\202\377\377\377\3\377\376\377\304\341\237\215\307\77\210\214" \ + "\306>\10\212\307;\215\307\77\213\305=\305\342\240\377\377\377\377\376" \ + "\374\377\377\375\376\377\377\221\377\377\377\22\377\376\377\377\377\375" \ + "\376\377\377\377\375\376\361\367\351\270\334\204\214\306>\215\307\77" \ + "\214\305@\212\306@\213\307A\212\306@\213\310\77\214\306>\215\304B\214" \ + "\306>\212\307<\214\306>\202\216\306A\6\214\306>\213\310\77\214\305@\215" \ + "\305<\215\305>\215\307=\202\213\310\77\10\215\306A\214\306>\215\306A" \ + "\222\311I\300\336\226\361\370\346\376\376\376\377\377\377\202\377\376" \ + "\377\1\376\377\373\217\377\377\377\10\377\377\375\347\365\333\214\307" \ + ";\211\305A\213\304\77\215\307\77\215\305<\213\310\77\202\214\306>\1\215" \ + "\307\77\203\214\306>\4\215\307\77\214\306>\215\306A\275\337\223\202\377" \ + "\377\377\5\377\376\377\377\377\377\376\377\375\377\376\377\376\377\377" \ + "\220\377\377\377\10\375\377\376\331\357\301\215\307\77\215\305>\216\305" \ + "C\211\306=\220\305A\211\307@\210\214\306>\10\214\305@\246\321e\377\377" \ + "\377\377\376\377\376\377\377\377\377\375\376\377\377\377\376\377\227" \ + "\377\377\377\1\376\376\376\202\377\377\377\3\363\363\363\266\266\270" \ + "__a\207::<\202;;=\203::<\2;;=99;\202;;=\2""99;::<\202;;=\1::<\203;;=" \ + "\3^^^\250\250\250\363\363\363\203\377\377\377\1\376\376\376\202\377\377" \ + "\377\1\376\376\376\224\377\377\377\4\316\316\316999::<;;=\202::<\1ll" \ + "l\205\377\377\377\1\376\376\376\217\377\377\377\6\376\376\376\377\377" \ + "\377\376\376\376\204\204\204::<;;=\203::<\3:::TTT\363\363\363\206\377" \ + "\377\377\10\347\347\347;;;99;::<;;=::<:::\234\234\236\253\377\377\377" \ + "\3\376\376\376lln;;=\202::<\3;;=999SSS\202\377\377\377\1\376\376\376" \ + "\203\377\377\377\4\376\376\376\377\377\377\376\376\376\234\234\234\223" \ + "::<\1""99;\202::<\1;;=\203::<\5kkmxxz\235\235\237\301\301\301\346\346" \ + "\346\207\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\221" \ + "\377\377\377\1\376\376\376\202\377\377\377\3\235\235\235::<;;=\232::" \ + "<\2;;=99;\202::<\3;;=::<\316\316\316\230\377\377\377\10\373\377\376\216" \ + "\306A\214\306<\213\304A\212\306@\214\305@\214\304\77\215\307\77\240\214" \ + "\306>\6\214\306<\215\306A\215\305@\216\310@\217\304@\341\361\314\212" \ + "\377\377\377\210\214\306>\7\215\307\77\213\310\77\213\305=\215\307\77" \ + "\214\304\77\253\323r\374\377\373\211\377\377\377\1\377\376\377\203\377" \ + "\377\377\3\342\362\315\215\305@\215\307=\211\214\306>\10\214\306<\215" \ + "\304B\341\363\313\374\377\375\376\376\377\377\377\377\377\375\376\377" \ + "\377\375\221\377\377\377\7\376\377\375\376\376\377\377\377\377\375\377" \ + "\374\377\377\377\377\377\375\253\323p\210\214\306>\5\215\307\77\215\305" \ + ">\217\304@\305\342\237\376\377\375\202\377\377\377\1\377\377\375\220" \ + "\377\377\377\1\376\377\377\202\377\376\377\202\376\377\375\202\377\377" \ + "\377\5\360\370\351\311\347\247\245\320e\215\305>\212\307>\202\214\306" \ + ">\5\215\306A\212\307>\215\305@\214\306>\214\306<\202\214\306>\2\214\306" \ + "<\214\306>\202\216\306A\14\214\306>\215\306A\215\305<\214\306>\213\305" \ + "=\255\331x\323\353\267\366\374\362\377\377\377\377\377\375\377\377\377" \ + "\376\377\377\217\377\377\377\2\376\376\376\377\377\377\202\377\377\375" \ + "\11\244\317d\214\306>\213\307A\214\306>\214\305@\214\306>\215\306A\214" \ + "\306<\215\307\77\202\214\306>\202\214\305@\13\215\305<\215\305@\230\316" \ + "V\370\373\360\376\377\375\377\377\377\377\376\377\376\376\376\377\377" \ + "\375\377\376\377\376\377\377\220\377\377\377\10\376\376\376\377\376\377" \ + "\262\327x\214\306>\216\306A\215\307=\215\305<\215\306A\211\214\306>\6" \ + "\215\306C\307\341\240\376\377\373\376\377\377\376\377\375\376\376\374" \ + "\236\377\377\377\4\346\346\350\266\266\270\204\204\206SSU\202::<\1;;" \ + "=\202::<\1;;=\202::<\202;;=\3""99;::<;;=\203::<\4GGIxxz\247\247\247\347" \ + "\347\347\212\377\377\377\1\376\376\376\223\377\377\377\1\364\364\364" \ + "\205\316\316\316\1\332\332\332\203\377\377\377\202\376\376\376\221\377" \ + "\377\377\1\376\376\376\202\377\377\377\202\316\316\316\203\316\316\320" \ + "\3\316\316\316\317\317\317\346\346\346\206\377\377\377\5\346\346\346" \ + "\316\316\316\317\317\317\316\316\316\315\315\315\202\316\316\316\1\363" \ + "\363\363\250\377\377\377\1\376\376\376\203\377\377\377\3\346\346\346" \ + "\315\315\315\317\317\317\202\316\316\320\3\317\317\317\315\315\315\363" \ + "\363\363\202\377\377\377\202\376\376\376\204\377\377\377\3\346\346\346" \ + "\316\316\316\316\316\320\224\316\316\316\1\315\315\315\203\377\377\377" \ + "\1\376\376\376\215\377\377\377\1\376\376\376\225\377\377\377\2\346\346" \ + "\346\317\317\317\232\316\316\316\1\317\317\317\203\316\316\316\4\317" \ + "\317\317\315\315\315\316\316\316\363\363\363\231\377\377\377\3\340\361" \ + "\317\342\360\317\342\362\316\202\343\361\316\2\342\360\315\343\361\316" \ + "\240\342\361\320\10\342\362\316\342\361\320\343\363\317\341\360\317\342" \ + "\361\320\370\373\364\376\377\375\376\377\377\210\377\377\377\210\342" \ + "\361\320\7\341\360\317\342\362\316\343\361\316\342\360\314\342\361\320" \ + "\350\364\336\377\376\374\211\377\377\377\10\377\376\377\377\377\375\377" \ + "\377\377\377\377\375\370\373\362\341\360\321\340\357\316\342\362\316" \ + "\210\342\361\320\3\342\362\316\342\361\320\371\373\360\203\377\377\377" \ + "\202\377\376\377\220\377\377\377\4\377\377\375\376\376\376\377\376\377" \ + "\376\377\375\203\377\377\377\1\365\375\362\210\342\361\320\4\341\360" \ + "\321\342\361\322\343\363\317\360\367\345\224\377\377\377\7\376\377\377" \ + "\376\377\375\377\377\375\377\376\377\377\377\375\377\375\376\377\376" \ + "\377\202\377\377\377\30\376\376\377\364\370\351\333\354\277\277\337\224" \ + "\247\324k\224\313K\214\305@\214\306>\212\306@\214\306>\214\305B\215\306" \ + "C\215\307\77\212\306@\214\306>\215\307\77\241\321c\257\330|\304\342\242" \ + "\341\361\315\377\377\377\377\376\377\376\377\373\377\377\377\202\377" \ + "\377\375\1\377\376\377\203\377\377\377\1\376\377\377\212\377\377\377" \ + "\1\376\376\376\203\377\377\377\13\376\376\374\372\372\370\342\361\320" \ + "\343\361\316\342\362\316\341\360\317\342\361\320\341\360\317\342\362" \ + "\316\342\361\322\342\361\320\202\341\361\315\6\342\361\320\341\360\317" \ + "\343\361\315\343\361\320\356\371\350\377\376\377\203\377\377\377\1\376" \ + "\377\375\202\377\377\377\1\376\377\375\222\377\377\377\6\366\373\364" \ + "\342\361\320\342\362\316\342\360\317\341\362\316\343\361\320\210\342" \ + "\361\320\10\341\362\316\341\361\315\352\364\334\377\377\377\377\376\377" \ + "\377\377\377\376\377\377\376\377\375\222\377\377\377\202\376\376\376" \ + "\202\377\377\377\1\376\376\376\202\377\377\377\1\376\376\376\202\377" \ + "\377\377\3\376\376\376\377\377\377\375\375\375\202\377\377\377\5\363" \ + "\363\363\316\316\316\264\264\264\235\235\235\233\233\233\202kkk\202k" \ + "km\3llnkkmyy{\202\234\234\236\6\316\316\320\346\346\346\377\377\377\376" \ + "\376\376\377\377\377\376\376\376\204\377\377\377\1\376\376\376\204\377" \ + "\377\377\1\376\376\376\240\377\377\377\1\376\376\376\231\377\377\377" \ + "\1\375\375\375\203\377\377\377\1\376\376\376\214\377\377\377\1\376\376" \ + "\376\202\377\377\377\1\376\376\376\242\377\377\377\1\376\376\376\206" \ + "\377\377\377\3\376\376\376\377\377\377\376\376\376\204\377\377\377\1" \ + "\376\376\376\202\377\377\377\202\376\376\376\225\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\202\377\377\377\3\376\376\376\377\377\377" \ + "\376\376\376\214\377\377\377\3\376\376\376\377\377\377\376\376\376\265" \ + "\377\377\377\1\375\375\375\234\377\377\377\7\376\377\377\377\376\377" \ + "\376\377\377\376\376\374\377\376\377\377\377\377\377\377\375\240\377" \ + "\377\377\1\377\377\375\202\377\377\377\5\377\376\377\376\376\376\377" \ + "\376\377\376\376\377\377\377\375\221\377\377\377\7\375\376\377\377\377" \ + "\377\377\376\377\377\377\375\376\377\377\377\377\373\377\376\377\210" \ + "\377\377\377\5\377\376\377\377\377\377\376\376\374\376\377\377\377\377" \ + "\377\202\377\377\375\1\376\377\377\210\377\377\377\6\376\377\377\375" \ + "\376\377\377\376\377\377\377\377\376\377\377\377\377\377\202\377\377" \ + "\375\224\377\377\377\202\377\376\377\2\374\377\377\377\376\377\210\377" \ + "\377\377\3\376\377\377\376\376\376\376\377\377\202\377\377\377\3\375" \ + "\377\376\377\377\377\377\376\377\220\377\377\377\202\377\376\377\2\376" \ + "\377\377\375\376\377\202\377\377\377\4\377\377\375\377\376\377\377\377" \ + "\377\377\377\375\202\376\377\377\7\377\377\377\377\376\377\377\377\377" \ + "\376\377\375\370\373\364\344\357\315\342\361\320\202\342\362\315\14\340" \ + "\357\316\345\360\316\376\377\373\376\376\376\377\377\377\377\375\376" \ + "\377\377\375\377\377\377\375\377\376\377\377\377\377\376\377\377\377" \ + "\375\202\376\377\375\5\376\377\377\377\377\377\377\377\375\376\376\376" \ + "\377\376\377\214\377\377\377\1\376\376\376\202\377\377\377\5\377\377" \ + "\375\376\375\377\377\377\377\376\376\377\377\377\375\204\377\377\377" \ + "\1\377\377\375\205\377\377\377\202\377\376\377\2\377\377\377\377\377" \ + "\375\202\377\377\377\202\376\377\377\222\377\377\377\5\377\377\375\377" \ + "\377\377\377\377\375\377\377\377\377\377\375\202\377\377\377\1\377\376" \ + "\372\212\377\377\377\1\377\375\377\202\377\377\377\3\377\376\377\377" \ + "\377\377\377\377\375\225\377\377\377\1\376\376\376\211\377\377\377\1" \ + "\376\376\376\204\377\377\377\1\376\376\376\205\377\377\377\1\376\376" \ + "\376\206\377\377\377\3\376\376\376\377\377\377\376\376\376\206\377\377" \ + "\377\1\376\376\376\233\377\377\377\1\376\376\376\203\377\377\377\5\376" \ + "\376\376\377\377\377\376\376\376\377\377\377\376\376\376\223\377\377" \ + "\377\3\376\376\376\377\377\377\376\376\376\205\377\377\377\3\376\376" \ + "\376\377\377\377\376\376\376\203\377\377\377\3\376\376\376\377\377\377" \ + "\376\376\376\203\377\377\377\1\376\376\376\205\377\377\377\1\376\376" \ + "\376\246\377\377\377\3\376\376\376\377\377\377\376\376\376\220\377\377" \ + "\377\1\376\376\376\246\377\377\377\1\376\376\376\225\377\377\377\1\376" \ + "\376\376\202\377\377\377\1\376\376\376\240\377\377\377\1\376\376\376" \ + "\230\377\377\377\6\377\377\375\377\377\377\377\376\377\376\377\375\374" \ + "\377\377\376\375\377\242\377\377\377\202\377\376\377\6\376\376\376\375" \ + "\376\377\377\377\377\377\377\375\377\377\377\376\377\375\220\377\377" \ + "\377\7\377\377\375\377\377\377\377\377\375\377\375\376\376\377\375\376" \ + "\377\377\376\376\376\212\377\377\377\4\377\376\377\377\377\375\377\377" \ + "\377\377\377\375\203\377\376\377\210\377\377\377\5\377\377\375\377\377" \ + "\377\377\375\376\377\376\377\377\377\375\202\377\377\377\1\376\377\377" \ + "\221\377\377\377\1\375\376\377\203\377\377\375\2\376\377\375\377\375" \ + "\376\211\377\377\377\204\377\376\377\4\377\377\377\376\377\375\377\377" \ + "\375\377\376\377\221\377\377\377\5\376\377\377\376\376\376\377\377\373" \ + "\376\376\377\376\377\377\202\377\377\377\2\377\376\377\377\377\375\202" \ + "\377\377\377\7\377\377\375\377\376\377\376\376\377\377\377\377\376\377" \ + "\377\376\377\375\376\377\377\202\377\377\377\203\376\377\377\2\377\377" \ + "\377\376\376\374\202\377\376\377\13\376\376\376\377\377\375\377\377\377" \ + "\377\375\376\376\377\377\377\377\377\376\376\377\377\376\377\376\376" \ + "\374\376\377\377\377\377\375\221\377\377\377\203\377\377\375\4\377\377" \ + "\377\377\377\375\377\376\377\376\376\376\210\377\377\377\1\377\377\373" \ + "\203\377\377\377\1\377\377\375\202\376\377\377\222\377\377\377\1\377" \ + "\377\375\202\377\376\377\3\377\377\377\377\376\377\377\376\374\202\376" \ + "\377\377\210\377\377\377\4\377\377\375\377\377\377\376\377\375\377\375" \ + "\377\202\376\377\377\1\377\376\375\227\377\377\377\1\376\376\376\207" \ + "\377\377\377\1\376\376\376\217\377\377\377\1\376\376\376\205\377\377" \ + "\377\1\376\376\376\204\377\377\377\1\376\376\376\233\377\377\377\1\376" \ + "\376\376\211\377\377\377\1\376\376\376\222\377\377\377\1\376\376\376" \ + "\206\377\377\377\1\376\376\376\207\377\377\377\1\376\376\376\262\377" \ + "\377\377\1\376\376\376\212\377\377\377\1\376\376\376\202\377\377\377" \ + "\1\376\376\376\202\377\377\377\1\376\376\376\225\377\377\377\1\376\376" \ + "\376\306\377\377\377\1\376\376\376\235\377\377\377\7\377\376\377\376" \ + "\377\377\377\377\377\377\377\375\376\375\377\377\377\375\377\376\377" \ + "\241\377\377\377\1\376\377\377\203\377\377\377\3\377\377\375\377\375" \ + "\376\377\376\377\221\377\377\377\202\376\377\377\5\377\377\377\377\377" \ + "\375\377\377\377\377\376\377\377\377\375\211\377\377\377\203\377\377" \ + "\375\202\377\377\377\202\376\377\377\1\377\377\375\212\377\377\377\202" \ + "\376\377\375\3\376\377\377\377\377\375\377\376\377\223\377\377\377\6" \ + "\377\377\375\377\376\377\374\377\377\377\377\377\377\376\377\376\377" \ + "\375\210\377\377\377\3\377\377\375\376\377\377\377\377\375\202\377\377" \ + "\377\1\377\377\375\223\377\377\377\4\376\376\376\377\377\375\376\376" \ + "\376\377\376\377\202\377\377\375\1\376\376\376\206\377\377\377\1\377" \ + "\377\375\215\377\377\377\1\377\377\375\202\377\377\377\5\376\377\377" \ + "\377\377\377\376\376\374\377\377\377\377\376\377\202\377\377\377\1\376" \ + "\376\376\221\377\377\377\7\376\377\375\377\375\377\377\377\377\376\377" \ + "\377\377\377\377\377\377\373\377\376\377\202\377\377\377\1\377\377\375" \ + "\202\377\377\377\1\377\377\375\204\377\377\377\6\376\376\377\377\377" \ + "\375\376\377\377\377\377\375\377\376\377\375\377\374\222\377\377\377" \ + "\3\376\377\375\377\377\377\376\377\375\203\376\377\377\1\377\376\377" \ + "\211\377\377\377\7\377\377\373\377\376\377\377\377\375\377\377\377\377" \ + "\376\377\376\376\376\376\377\377") + + diff --git a/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-quit.service b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-quit.service new file mode 100644 index 00000000..14bd4994 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-quit.service @@ -0,0 +1,11 @@ +[Unit] +Description=Terminate Psplash Boot Screen +After=psplash-start.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/psplash-write QUIT +TimeoutSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-start.service b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-start.service new file mode 100644 index 00000000..d3b6940d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/psplash/files/psplash-start.service @@ -0,0 +1,12 @@ +[Unit] +Description=Start Psplash Boot Screen +Wants=systemd-vconsole-setup.service +After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service +DefaultDependencies=no + +[Service] +ExecStartPre=/bin/sh -c "if [ -e /sys/class/graphics/fbcon/cursor_blink ]; then echo 0 > /sys/class/graphics/fbcon/cursor_blink; fi" +ExecStart=/bin/bash -c "/usr/bin/psplash-anim -n -a 90" + +[Install] +WantedBy=sysinit.target diff --git a/meta-agl/meta-agl-profile-core/recipes-core/psplash/psplash_git.bbappend b/meta-agl/meta-agl-profile-core/recipes-core/psplash/psplash_git.bbappend new file mode 100644 index 00000000..bdc196b6 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/psplash/psplash_git.bbappend @@ -0,0 +1,27 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://psplash-colors.h \ + file://psplash-start.service \ + file://psplash-quit.service \ + file://psplash-anim \ + " + +SPLASH_IMAGES="file://psplash-poky-img.h;outsuffix=default" + +inherit systemd + +SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${PN}', '', d)}" +SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'psplash-start.service psplash-quit.service', '', d)}" + +do_configure_append () { + cd ${S} + cp ../psplash-colors.h ./ +} + +do_install_append () { + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/*.service ${D}/${systemd_unitdir}/system + fi + install -m 755 ${WORKDIR}/psplash-anim ${D}/${bindir} +} diff --git a/meta-agl/meta-agl-profile-core/recipes-core/systemd/.appends.core b/meta-agl/meta-agl-profile-core/recipes-core/systemd/.appends.core new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/canbus-can.network b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/canbus-can.network new file mode 100644 index 00000000..9768c4bf --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/canbus-can.network @@ -0,0 +1,5 @@ +[Match] +Name=can* + +[CAN] +BitRate=500K diff --git a/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/e2fsck.conf b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/e2fsck.conf new file mode 100644 index 00000000..b774f9eb --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/e2fsck.conf @@ -0,0 +1,3 @@ +[options] +# This will prevent e2fsck from stopping boot just because the clock is wrong +broken_system_clock = 1 diff --git a/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/wired.network b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/wired.network new file mode 100644 index 00000000..3559b015 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd/wired.network @@ -0,0 +1,5 @@ +[Match] +Name=eth* en* + +[Network] +DHCP=yes diff --git a/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd_%.bbappend new file mode 100644 index 00000000..8c7da439 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-core/systemd/systemd_%.bbappend @@ -0,0 +1,33 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "\ + file://e2fsck.conf \ + file://canbus-can.network \ + ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','file://wired.network','',d)} \ +" + +# enable networkd/resolved support +PACKAGECONFIG_append_pn-systemd = " \ + ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','networkd resolved','',d)} \ +" + +do_install_append() { + # Install /etc/e2fsck.conf to avoid boot stuck by wrong clock time + install -m 644 -p -D ${WORKDIR}/e2fsck.conf ${D}${sysconfdir}/e2fsck.conf + + # Install canbus network script + install -m 0644 ${WORKDIR}/canbus-can.network ${D}${base_libdir}/systemd/network/60-canbus-can.network + + if ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','true','false',d)}; then + # Install DHCP configuration for Ethernet adapters + install -m 644 ${WORKDIR}/wired.network ${D}${sysconfdir}/systemd/network + fi +} + +FILES_${PN} += "${sysconfdir}/e2fsck.conf " + +# SPEC-737: connmand also has a NTP client which races with systemd-timesyncd +PACKAGECONFIG_remove = "timesyncd" + +# Enable systemd-coredump when agl-devel is set on +PACKAGECONFIG_append_agl-devel = " coredump" diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/cmake-apps-module/cmake-apps-module_git.bb b/meta-agl/meta-agl-profile-core/recipes-devtools/cmake-apps-module/cmake-apps-module_git.bb new file mode 100644 index 00000000..941b8033 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/cmake-apps-module/cmake-apps-module_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "CMake module to ease development of apps" +DESCRIPTION = "This is a migration of former app-templates git submodule which let you \ +ease the development of apps and widget building." +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/cmake-apps-module" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +SECTION = "apps" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/cmake-apps-module;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "bd9e1c988ec7237964c466c65792d4c77960625e" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + +inherit cmake + +FILES_${PN} += " ${datadir}/*/Modules/CMakeAfbTemplates*" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend new file mode 100644 index 00000000..2de1e683 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/files" + +SRC_URI_append_class-nativesdk = " \ + file://environment.d-cmake-agl.sh \ +" + +do_install_append_class-nativesdk() { + install -m 644 ${WORKDIR}/environment.d-cmake-agl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake-agl.sh +} diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh b/meta-agl/meta-agl-profile-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh new file mode 100644 index 00000000..64b6cf3c --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/cmake/files/environment.d-cmake-agl.sh @@ -0,0 +1 @@ +export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake" diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/gdb/.appends.core b/meta-agl/meta-agl-profile-core/recipes-devtools/gdb/.appends.core new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/gdb/gdb_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-devtools/gdb/gdb_%.bbappend new file mode 100644 index 00000000..7cba933a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/gdb/gdb_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG_remove = "readline" diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.bb b/meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.bb new file mode 100644 index 00000000..1174ac4d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.bb @@ -0,0 +1,8 @@ +require libafb-helpers_git.inc + +inherit cmake + +RDEPENDS_${PN}_append = " af-binder" + +ALLOW_EMPTY_${PN} = "1" + diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.inc b/meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.inc new file mode 100644 index 00000000..abb5452d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/libafb-helpers/libafb-helpers_git.inc @@ -0,0 +1,14 @@ +SUMMARY = "AFB helpers library" +DESCRIPTION = "AFB helpers library to ease JSON object manipulation and binding interaction" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libafb-helpers;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "547374849a76225b1a6a0dd8bb84ae27a601f19d" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + +DEPENDS_append = " af-binder jq" + diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/libappcontroller/libappcontroller_git.bb b/meta-agl/meta-agl-profile-core/recipes-devtools/libappcontroller/libappcontroller_git.bb new file mode 100644 index 00000000..7dbbb5e3 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/libappcontroller/libappcontroller_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Controller library for an Application Framework" +DESCRIPTION = "Controller library to be used to easily create a binding for AGL App Framework" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libappcontroller;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "baaa5116b2299b2b01b9fa3199ba95786c2d8a77" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + +DEPENDS_append = " af-binder libafb-helpers lua" +RDEPENDS_${PN}_append = " af-binder lua" + +inherit cmake + +ALLOW_EMPTY_${PN} = "1" + diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/low-level-can-generator/low-level-can-generator_git.bb b/meta-agl/meta-agl-profile-core/recipes-devtools/low-level-can-generator/low-level-can-generator_git.bb new file mode 100644 index 00000000..59e64ce6 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/low-level-can-generator/low-level-can-generator_git.bb @@ -0,0 +1,17 @@ +SUMMARY = "Low level CAN generator" +DESCRIPTION = "Generator used to customize low level CAN service with customs signals" +SECTION = "devel" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit cmake pkgconfig +BBCLASSEXTEND = "nativesdk" +DEPENDS = " cmake-apps-module" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/src/low-level-can-generator;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "b7d44a2d155a1199c25b783b915fd8ba3ce42a69" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/nativesdk-packagegroup-sdk-host.bbappend new file mode 100644 index 00000000..a6c70934 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -0,0 +1,3 @@ +RDEPENDS_${PN} += "nativesdk-low-level-can-generator \ + nativesdk-cmake-apps-module \ +" diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb b/meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb new file mode 100644 index 00000000..09f65203 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb @@ -0,0 +1,28 @@ +SUMMARY = "Provides a set of tools for development for AGL DISTRO" +LICENSE = "MIT" + +inherit packagegroup + +RDEPENDS_${PN} = "\ + afb-test \ + strace \ + ldd \ + less \ + vim \ + lsof \ + gdb \ + valgrind \ + perf \ + htop \ + powertop \ + systemtap \ + screen \ + usbutils \ + rsync \ + tree \ + pstree \ + procps \ + jq \ + libxslt-bin \ + agl-service-network-tools \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/qemu/qemu_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-devtools/qemu/qemu_%.bbappend new file mode 100644 index 00000000..1a6a98b7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/qemu/qemu_%.bbappend @@ -0,0 +1 @@ +QEMU_TARGETS_class-target_aglegvirt = " aarch64 x86_64" diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts b/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts new file mode 100755 index 00000000..1d1a5a05 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Copyright 2017 IoT.bzh. + +# Author: Ronan Le Martret +# + +# The following script will run all the scriptlets found in #SYSCONFDIR#/agl-postinsts. + +agl_pi_dir="#SYSCONFDIR#/agl-postinsts" + +POSTINST_LOGGING=1 +LOGFILE=/var/log/agl-postinstall.log + +[ -e $LOGFILE ] && mv ${LOGFILE} ${LOGFILE}.old.$(date +%F--%H%M.%S) + +append_log=">>$LOGFILE 2>&1" + +exec_postinst_scriptlets() { + for i in `ls $agl_pi_dir`; do + i=$agl_pi_dir/$i + echo "Running postinst $i..." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log + if [ -x $i ]; then + eval sh -c $i $append_log + if [ $? -eq 0 ]; then + rm $i + else + echo "ERROR: postinst $i failed." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log + remove_agl_pi_dir=0 + fi + else + echo "ERROR: postinst $i do not exists or do not have execute permission." + [ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i do not exists or do not have execute permission." $append_log + remove_agl_pi_dir=0 + fi + done +} + +remove_agl_pi_dir=1 +exec_postinst_scriptlets +systemctl daemon-reload + +# since all postinstalls executed successfully, remove the postinstalls directory +if [ $remove_agl_pi_dir = 1 ]; then + rm -rf $agl_pi_dir +fi diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service b/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service new file mode 100644 index 00000000..8f8667db --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service @@ -0,0 +1,17 @@ +[Unit] +Description=Run pending agl postinsts +DefaultDependencies=no +After=#SYSTEMD_SERVICE_AFTER# +Before=#SYSTEMD_SERVICE_BEFORE# +ConditionPathExists=#SYSCONFDIR#/agl-postinsts + +[Service] +Type=oneshot +StandardOutput=journal+console +ExecStart=#SBINDIR#/run-agl-postinsts +ExecStartPost=#BASE_BINDIR#/systemctl disable run-agl-postinsts.service +RemainAfterExit=No +TimeoutSec=0 + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb b/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb new file mode 100644 index 00000000..b1ecccf8 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/run-agl-postinsts/run-agl-postinsts_1.0.bb @@ -0,0 +1,46 @@ +SUMMARY = "Runs AGL postinstall scripts on first boot of the target device" +SECTION = "devel" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://run-agl-postinsts \ + file://run-agl-postinsts.service" + +S = "${WORKDIR}" + +inherit allarch systemd + +SYSTEMD_SERVICE_${PN} = "run-agl-postinsts.service" + +SYSTEMD_SERVICE_AFTER ?= "dbus.service cynara.service" + +SYSTEMD_SERVICE_BEFORE ?= "systemd-user-sessions.service" + +do_configure() { + : +} + +do_compile () { + : +} + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/run-agl-postinsts ${D}${sbindir}/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/run-agl-postinsts.service ${D}${systemd_unitdir}/system/ + + sed -i -e 's:#SYSCONFDIR#:${sysconfdir}:g' \ + -e 's:#SBINDIR#:${sbindir}:g' \ + -e 's:#BASE_BINDIR#:${base_bindir}:g' \ + -e 's:#LOCALSTATEDIR#:${localstatedir}:g' \ + ${D}${sbindir}/run-agl-postinsts \ + ${D}${systemd_unitdir}/system/run-agl-postinsts.service + + sed -i -e 's:#SYSTEMD_SERVICE_AFTER#:${SYSTEMD_SERVICE_AFTER}:g' \ + -e 's:#SYSTEMD_SERVICE_BEFORE#:${SYSTEMD_SERVICE_BEFORE}:g' \ + ${D}${systemd_unitdir}/system/run-agl-postinsts.service +} + diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf b/meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf new file mode 100644 index 00000000..d706cc5f --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf @@ -0,0 +1,2 @@ +[Unit] +After=ldconfig.service diff --git a/meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend new file mode 100644 index 00000000..4cc2edf8 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend @@ -0,0 +1,14 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://ldconfig-wait.conf" + +do_configure_append() { + if ! grep -q StandardOutput= ${WORKDIR}/run-postinsts.service; then + sed -i '/ExecStart=/iStandardOutput=journal+console' ${WORKDIR}/run-postinsts.service + fi +} + +do_install_append() { + install -d ${D}${sysconfdir}/systemd/system/run-postinsts.service.d + install -m 0644 ${WORKDIR}/ldconfig-wait.conf ${D}${sysconfdir}/systemd/system/run-postinsts.service.d +} diff --git a/meta-agl/meta-agl-profile-core/recipes-extended/gperf/.appends.core b/meta-agl/meta-agl-profile-core/recipes-extended/gperf/.appends.core new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-extended/gperf/gperf_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-extended/gperf/gperf_%.bbappend new file mode 100644 index 00000000..2a590838 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-extended/gperf/gperf_%.bbappend @@ -0,0 +1 @@ +BBCLASSEXTEND += "nativesdk" diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch new file mode 100644 index 00000000..d43b132f --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch @@ -0,0 +1,43 @@ +From 383ffadd33f484ab4aaeb14fa109b61143d27d58 Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Thu, 7 Jun 2018 12:15:38 +0200 +Subject: [PATCH] most: aim-network: backport Kernel API + +This patch replaces the function calls skb_put_data with memcpy. It is +needed to have the module compiled for kernels prior to 4.13. + +Signed-off-by: Christian Gromm +--- + aim-network/networking.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/aim-network/networking.c b/aim-network/networking.c +index 936f013..4c259c2 100644 +--- a/aim-network/networking.c ++++ b/aim-network/networking.c +@@ -470,11 +470,11 @@ static int aim_rx_data(struct mbo *mbo) + ether_addr_copy(skb_put(skb, ETH_ALEN), dev->dev_addr); + + /* src */ +- skb_put_data(skb, &zero, 4); +- skb_put_data(skb, buf + 5, 2); ++ memcpy(skb_put(skb, 4), &zero, 4); ++ memcpy(skb_put(skb, 2), buf + 5, 2); + + /* eth type */ +- skb_put_data(skb, buf + 10, 2); ++ memcpy(skb_put(skb, 2), buf + 10, 2); + + buf += MDP_HDR_LEN; + len -= MDP_HDR_LEN; +@@ -483,7 +483,7 @@ static int aim_rx_data(struct mbo *mbo) + len -= MEP_HDR_LEN; + } + +- skb_put_data(skb, buf, len); ++ memcpy(skb_put(skb, len), buf, len); + skb->protocol = eth_type_trans(skb, dev); + skb_len = skb->len; + if (netif_rx(skb) == NET_RX_SUCCESS) { +-- +2.11.0 diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0002-src-most-add-auto-conf-feature.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0002-src-most-add-auto-conf-feature.patch new file mode 100644 index 00000000..dd811c81 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0002-src-most-add-auto-conf-feature.patch @@ -0,0 +1,472 @@ +From 9cb7cb85f59509ac445116e9458c502cf6cb74e6 Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Thu, 9 Nov 2017 13:20:23 +0100 +Subject: [PATCH 2/2] src: most: add auto conf feature + +This patch adds the auto configuration feature to the driver +sources. It is needed to have the driver configured automatically +upon start up w/o the need for userspace to set up sysfs. + +Signed-off-by: Christian Gromm +--- + driver/Makefile | 3 + + driver/default_conf.c | 162 ++++++++++++++++++++++++++++++++++++++++++++++ + driver/include/mostcore.h | 64 ++++++++++++++++++ + driver/mostcore/core.c | 120 ++++++++++++++++++++++++++++------ + 4 files changed, 331 insertions(+), 18 deletions(-) + create mode 100644 driver/default_conf.c + +diff --git a/Makefile b/Makefile +index e77a4b6..6d74ebe 100644 +--- a/Makefile ++++ b/Makefile +@@ -6,6 +6,9 @@ obj-m := mostcore.o + mostcore-y := mostcore/core.o + CFLAGS_core.o := -I$(src)/include/ + ++obj-m += default_conf.o ++CFLAGL_default_conf.o := -I$(src)/include ++ + obj-m += aim_cdev.o + aim_cdev-y := aim-cdev/cdev.o + CFLAGS_cdev.o := -I$(src)/include/ +diff --git a/default_conf.c b/default_conf.c +new file mode 100644 +index 0000000..adb1786 +--- /dev/null ++++ b/default_conf.c +@@ -0,0 +1,162 @@ ++/* ++ * default_conf.c - Default configuration for the MOST channels. ++ * ++ * Copyright (C) 2017, Microchip Technology Germany II GmbH & Co. KG ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * This file is licensed under GPLv2. ++ */ ++ ++#include "include/mostcore.h" ++#include ++ ++static struct most_config_probe config_probes[] = { ++ ++ /* OS81118 Control */ ++ { ++ .ch_name = "ep8f", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-crx", ++ }, ++ { ++ .ch_name = "ep0f", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-ctx", ++ }, ++ /* OS81118 Async */ ++ { ++ .ch_name = "ep8e", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-arx", ++ }, ++ { ++ .ch_name = "ep0e", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-atx", ++ }, ++ /* OS81210 Control */ ++ { ++ .ch_name = "ep87", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-crx", ++ }, ++ { ++ .ch_name = "ep07", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_CONTROL, ++ .num_buffers = 16, ++ .buffer_size = 64, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-ctx", ++ }, ++ /* OS81210 Async */ ++ { ++ .ch_name = "ep86", ++ .cfg = { ++ .direction = MOST_CH_RX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-arx", ++ }, ++ { ++ .ch_name = "ep06", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_ASYNC, ++ .num_buffers = 20, ++ .buffer_size = 1522, ++ }, ++ .aim_name = "networking", ++ .aim_param = "inic-usb-atx", ++ }, ++ /* Streaming channels (common for all INICs) */ ++ { ++ .ch_name = "ep01", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_SYNC, ++ .num_buffers = 8, ++ .buffer_size = 2 * 12 * 42, ++ .subbuffer_size = 12, ++ .packets_per_xact = 42, ++ }, ++ .aim_name = "sound", ++ .aim_param = "ep01-6ch.6x16", ++ }, ++ { ++ .ch_name = "ep02", ++ .cfg = { ++ .direction = MOST_CH_TX, ++ .data_type = MOST_CH_ISOC, ++ .num_buffers = 8, ++ .buffer_size = 40 * 188, ++ .subbuffer_size = 188, ++ .packets_per_xact = 2, ++ }, ++ .aim_name = "cdev", ++ .aim_param = "inic-usb-itx1", ++ }, ++ ++ /* sentinel */ ++ {} ++}; ++ ++static struct most_config_set config_set = { ++ .probes = config_probes ++}; ++ ++static int __init mod_init(void) ++{ ++ most_register_config_set(&config_set); ++ return 0; ++} ++ ++static void __exit mod_exit(void) ++{ ++ most_deregister_config_set(&config_set); ++} ++ ++module_init(mod_init); ++module_exit(mod_exit); ++MODULE_LICENSE("GPL"); ++MODULE_AUTHOR("Andrey Shvetsov "); ++MODULE_DESCRIPTION("Default configuration for the MOST channels"); +diff --git a/include/mostcore.h b/include/mostcore.h +index dc87121..3c00efb 100644 +--- a/include/mostcore.h ++++ b/include/mostcore.h +@@ -145,6 +145,39 @@ struct most_channel_config { + u16 dbr_size; + }; + ++/** ++ * struct most_config_probe - matching rule, channel configuration and ++ * the optional AIM name used for the automatic configuration and linking ++ * of the channel ++ * @dev_name: optional matching device id ++ * ("usb_device 1-1:1.0," "dim2-12345678", etc.) ++ * @ch_name: matching channel name ("ep8f", "ca2", etc.) ++ * @cfg: configuration that will be applied for the found channel ++ * @aim_name: optional name of the AIM that will be linked to the channel ++ * ("cdev", "networking", "v4l", "sound") ++ * @aim_param: AIM dependent parameter (it is the character device name ++ * for the cdev AIM, PCM format for the audio AIM, etc.) ++ */ ++struct most_config_probe { ++ const char *dev_name; ++ const char *ch_name; ++ struct most_channel_config cfg; ++ const char *aim_name; ++ const char *aim_param; ++}; ++ ++/** ++ * struct most_config_set - the configuration set containing ++ * several automatic configurations for the different channels ++ * @probes: list of the matching rules and the configurations, ++ * that must be ended with the empty structure ++ * @list: list head used by the MostCore ++ */ ++struct most_config_set { ++ const struct most_config_probe *probes; ++ struct list_head list; ++}; ++ + /* + * struct mbo - MOST Buffer Object. + * @context: context for core completion handler +@@ -285,6 +318,37 @@ struct most_aim { + }; + + /** ++ * most_register_config_set - registers the configuration set ++ * ++ * @cfg_set: configuration set to be registered for the future probes ++ * ++ * The function registers the given configuration set. ++ * ++ * It is possible to register or deregister several configuration sets ++ * independently. Different configuration sets may contain the ++ * overlapped matching rules but later registered configuration set has ++ * the higher priority over the prior registered set. ++ * ++ * The only the first matched configuration is applied for each ++ * channel. ++ * ++ * The configuration for the channel is applied at the time of ++ * registration of the parent most_interface. ++ */ ++void most_register_config_set(struct most_config_set *cfg_set); ++ ++/** ++ * most_deregister_config_set - deregisters the prior registered ++ * configuration set ++ * ++ * @cfg_set: configuration set to be deregistered ++ * ++ * The calling of this function does not change the current ++ * configuration of the channels. ++ */ ++void most_deregister_config_set(struct most_config_set *cfg_set); ++ ++/** + * most_register_interface - Registers instance of the interface. + * @iface: Pointer to the interface instance description. + * +diff --git a/mostcore/core.c b/mostcore/core.c +index 9e0a352..6035cf0 100644 +--- a/mostcore/core.c ++++ b/mostcore/core.c +@@ -36,6 +36,8 @@ static struct class *most_class; + static struct device *core_dev; + static struct ida mdev_id; + static int dummy_num_buffers; ++static struct list_head config_probes; ++struct mutex config_probes_mt; /* config_probes */ + + struct most_c_aim_obj { + struct most_aim *ptr; +@@ -918,6 +920,30 @@ most_c_obj *get_channel_by_name(char *mdev, char *mdev_ch) + return c; + } + ++static int link_channel_to_aim(struct most_c_obj *c, struct most_aim *aim, ++ char *aim_param) ++{ ++ int ret; ++ struct most_aim **aim_ptr; ++ ++ if (!c->aim0.ptr) ++ aim_ptr = &c->aim0.ptr; ++ else if (!c->aim1.ptr) ++ aim_ptr = &c->aim1.ptr; ++ else ++ return -ENOSPC; ++ ++ *aim_ptr = aim; ++ ret = aim->probe_channel(c->iface, c->channel_id, ++ &c->cfg, &c->kobj, aim_param); ++ if (ret) { ++ *aim_ptr = NULL; ++ return ret; ++ } ++ ++ return 0; ++} ++ + /** + * add_link_store - store() function for add_link attribute + * @aim_obj: pointer to AIM object +@@ -946,45 +972,33 @@ static ssize_t add_link_store(struct most_aim_obj *aim_obj, + size_t len) + { + struct most_c_obj *c; +- struct most_aim **aim_ptr; + char buffer[STRING_SIZE]; + char *mdev; + char *mdev_ch; +- char *mdev_devnod; ++ char *aim_param; + char devnod_buf[STRING_SIZE]; + int ret; + size_t max_len = min_t(size_t, len + 1, STRING_SIZE); + + strlcpy(buffer, buf, max_len); + +- ret = split_string(buffer, &mdev, &mdev_ch, &mdev_devnod); ++ ret = split_string(buffer, &mdev, &mdev_ch, &aim_param); + if (ret) + return ret; + +- if (!mdev_devnod || *mdev_devnod == 0) { ++ if (!aim_param || *aim_param == 0) { + snprintf(devnod_buf, sizeof(devnod_buf), "%s-%s", mdev, + mdev_ch); +- mdev_devnod = devnod_buf; ++ aim_param = devnod_buf; + } + + c = get_channel_by_name(mdev, mdev_ch); + if (IS_ERR(c)) + return -ENODEV; + +- if (!c->aim0.ptr) +- aim_ptr = &c->aim0.ptr; +- else if (!c->aim1.ptr) +- aim_ptr = &c->aim1.ptr; +- else +- return -ENOSPC; +- +- *aim_ptr = aim_obj->driver; +- ret = aim_obj->driver->probe_channel(c->iface, c->channel_id, +- &c->cfg, &c->kobj, mdev_devnod); +- if (ret) { +- *aim_ptr = NULL; ++ ret = link_channel_to_aim(c, aim_obj->driver, aim_param); ++ if (ret) + return ret; +- } + + return len; + } +@@ -1679,6 +1693,73 @@ int most_deregister_aim(struct most_aim *aim) + } + EXPORT_SYMBOL_GPL(most_deregister_aim); + ++void most_register_config_set(struct most_config_set *cfg_set) ++{ ++ mutex_lock(&config_probes_mt); ++ list_add(&cfg_set->list, &config_probes); ++ mutex_unlock(&config_probes_mt); ++} ++EXPORT_SYMBOL(most_register_config_set); ++ ++void most_deregister_config_set(struct most_config_set *cfg_set) ++{ ++ mutex_lock(&config_probes_mt); ++ list_del(&cfg_set->list); ++ mutex_unlock(&config_probes_mt); ++} ++EXPORT_SYMBOL(most_deregister_config_set); ++ ++static int probe_aim(struct most_c_obj *c, ++ const char *aim_name, const char *aim_param) ++{ ++ struct most_aim_obj *aim_obj; ++ char buf[STRING_SIZE]; ++ ++ list_for_each_entry(aim_obj, &aim_list, list) { ++ if (!strcmp(aim_obj->driver->name, aim_name)) { ++ strlcpy(buf, aim_param ? aim_param : "", sizeof(buf)); ++ return link_channel_to_aim(c, aim_obj->driver, buf); ++ } ++ } ++ return 0; ++} ++ ++static bool probe_config_set(struct most_c_obj *c, ++ const char *dev_name, const char *ch_name, ++ const struct most_config_probe *p) ++{ ++ int err; ++ ++ for (; p->ch_name; p++) { ++ if ((p->dev_name && strcmp(dev_name, p->dev_name)) || ++ strcmp(ch_name, p->ch_name)) ++ continue; ++ ++ c->cfg = p->cfg; ++ if (p->aim_name) { ++ err = probe_aim(c, p->aim_name, p->aim_param); ++ if (err) ++ pr_err("failed to autolink %s to %s: %d\n", ++ ch_name, p->aim_name, err); ++ } ++ return true; ++ } ++ return false; ++} ++ ++static void find_configuration(struct most_c_obj *c, const char *dev_name, ++ const char *ch_name) ++{ ++ struct most_config_set *plist; ++ ++ mutex_lock(&config_probes_mt); ++ list_for_each_entry(plist, &config_probes, list) { ++ if (probe_config_set(c, dev_name, ch_name, plist->probes)) ++ break; ++ } ++ mutex_unlock(&config_probes_mt); ++} ++ + /** + * most_register_interface - registers an interface with core + * @iface: pointer to the instance of the interface description. +@@ -1777,6 +1858,7 @@ struct kobject *most_register_interface(struct most_interface *iface) + mutex_init(&c->start_mutex); + mutex_init(&c->nq_mutex); + list_add_tail(&c->list, &inst->channel_list); ++ find_configuration(c, iface->description, channel_name); + } + pr_info("registered new MOST device mdev%d (%s)\n", + inst->dev_id, iface->description); +@@ -1880,6 +1962,8 @@ static int __init most_init(void) + pr_info("init()\n"); + INIT_LIST_HEAD(&instance_list); + INIT_LIST_HEAD(&aim_list); ++ INIT_LIST_HEAD(&config_probes); ++ mutex_init(&config_probes_mt); + ida_init(&mdev_id); + + err = bus_register(&most_bus); +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0003-core-remove-kernel-log-for-MBO-status.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0003-core-remove-kernel-log-for-MBO-status.patch new file mode 100644 index 00000000..4703844a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0003-core-remove-kernel-log-for-MBO-status.patch @@ -0,0 +1,26 @@ +From b269994be937cbb31c0d73ecc899ca8a545a6a4a Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Mon, 4 Sep 2017 11:09:17 +0200 +Subject: [PATCH 3/5] core: remove kernel log for MBO status + +Signed-off-by: Christian Gromm +--- + driver/mostcore/core.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/mostcore/core.c b/mostcore/core.c +index 931efb9..595becc 100644 +--- a/mostcore/core.c ++++ b/mostcore/core.c +@@ -1348,8 +1348,6 @@ static void most_write_completion(struct mbo *mbo) + BUG_ON((!mbo) || (!mbo->context)); + + c = mbo->context; +- if (mbo->status == MBO_E_INVAL) +- pr_info("WARN: Tx MBO status: invalid\n"); + if (unlikely(c->is_poisoned || (mbo->status == MBO_E_CLOSE))) + trash_mbo(mbo); + else +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0004-most-video-set-device_caps.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0004-most-video-set-device_caps.patch new file mode 100644 index 00000000..010d4b0d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0004-most-video-set-device_caps.patch @@ -0,0 +1,25 @@ +From a5fd2ae8d4a3b2a8f7a33a4ea469ea7ee0d946ef Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Mon, 4 Sep 2017 15:36:38 +0200 +Subject: [PATCH 4/5] most: video: set device_caps + +Signed-off-by: Christian Gromm +--- + driver/aim-v4l2/video.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/aim-v4l2/video.c b/aim-v4l2/video.c +index e074841..6405a03 100644 +--- a/aim-v4l2/video.c ++++ b/aim-v4l2/video.c +@@ -263,6 +263,7 @@ static int vidioc_querycap(struct file *file, void *priv, + snprintf(cap->bus_info, sizeof(cap->bus_info), + "%s", mdev->iface->description); + ++ cap->device_caps = + cap->capabilities = + V4L2_CAP_READWRITE | + V4L2_CAP_TUNER | +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch new file mode 100644 index 00000000..ebaee9e1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch @@ -0,0 +1,25 @@ +From 7518453386ad3e82008186a6c9ca86ed8c136801 Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Mon, 4 Sep 2017 16:08:38 +0200 +Subject: [PATCH 5/5] most: video: set V4L2_CAP_DEVICE_CAPS flag + +Signed-off-by: Christian Gromm +--- + driver/aim-v4l2/video.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/aim-v4l2/video.c b/aim-v4l2/video.c +index 6405a03..db75d4d 100644 +--- a/aim-v4l2/video.c ++++ b/aim-v4l2/video.c +@@ -265,6 +265,7 @@ static int vidioc_querycap(struct file *file, void *priv, + + cap->device_caps = + cap->capabilities = ++ V4L2_CAP_DEVICE_CAPS | + V4L2_CAP_READWRITE | + V4L2_CAP_TUNER | + V4L2_CAP_VIDEO_CAPTURE; +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0006-dim2-fix-startup-sequence.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0006-dim2-fix-startup-sequence.patch new file mode 100644 index 00000000..59c6ae67 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0006-dim2-fix-startup-sequence.patch @@ -0,0 +1,186 @@ +From 63bcd9b421ae7927948bffec9566db47f40ea290 Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov +Date: Tue, 30 Jan 2018 17:34:09 +0100 +Subject: [PATCH] staging: most: dim2: fix startup sequence + +Platform specific initializations (pdata->init) must be done before DIM2 +IP module startup (dim_startup). + +Signed-off-by: Andrey Shvetsov +--- + hdm-dim2/dim2_hdm.c | 90 +++++++++++++++++++++++++++++++++++++++--------------------------------------------------- + 1 file changed, 39 insertions(+), 51 deletions(-) + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index 893b8e4..e4629a5 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -155,38 +155,6 @@ void dimcb_on_error(u8 error_id, const char *error_message) + } + + /** +- * startup_dim - initialize the dim2 interface +- * @pdev: platform device +- */ +-static int startup_dim(struct platform_device *pdev) +-{ +- struct dim2_hdm *dev = platform_get_drvdata(pdev); +- struct dim2_platform_data *pdata = pdev->dev.platform_data; +- u8 hal_ret; +- int ret; +- +- if (!pdata) { +- pr_err("missing platform data\n"); +- return -EINVAL; +- } +- +- ret = pdata->init ? pdata->init(pdata, dev->io_base) : 0; +- if (ret) +- return ret; +- +- pr_info("sync: num of frames per sub-buffer: %u\n", fcnt); +- hal_ret = dim_startup(dev->io_base, pdata->clk_speed, fcnt); +- if (hal_ret != DIM_NO_ERROR) { +- pr_err("dim_startup failed: %d\n", hal_ret); +- if (pdata && pdata->destroy) +- pdata->destroy(pdata); +- return -ENODEV; +- } +- +- return 0; +-} +- +-/** + * try_start_dim_transfer - try to transfer a buffer on a channel + * @hdm_ch: channel specific data + * +@@ -727,10 +695,12 @@ static void dma_free(struct mbo *mbo, u32 size) + */ + static int dim2_probe(struct platform_device *pdev) + { ++ struct dim2_platform_data *pdata = pdev->dev.platform_data; + struct dim2_hdm *dev; + struct resource *res; + int ret, i; + struct kobject *kobj; ++ u8 hal_ret; + int irq; + + dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); +@@ -745,38 +715,59 @@ static int dim2_probe(struct platform_device *pdev) + if (IS_ERR(dev->io_base)) + return PTR_ERR(dev->io_base); + ++ if (!pdata) { ++ dev_err(&pdev->dev, "missing platform data\n"); ++ return -EINVAL; ++ } ++ ++ ret = pdata->init ? pdata->init(pdata, dev->io_base) : 0; ++ if (ret) ++ return ret; ++ ++ dev_info(&pdev->dev, "sync: num of frames per sub-buffer: %u\n", fcnt); ++ hal_ret = dim_startup(dev->io_base, pdata->clk_speed, fcnt); ++ if (hal_ret != DIM_NO_ERROR) { ++ dev_err(&pdev->dev, "dim_startup failed: %d\n", hal_ret); ++ ret = -ENODEV; ++ goto err_bsp_destroy; ++ } ++ + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get ahb0_int irq: %d\n", irq); +- return irq; ++ ret = irq; ++ goto err_shutdown_dim; + } + + ret = devm_request_irq(&pdev->dev, irq, dim2_ahb_isr, 0, + "dim2_ahb0_int", dev); + if (ret) { + dev_err(&pdev->dev, "failed to request ahb0_int irq %d\n", irq); +- return ret; ++ goto err_shutdown_dim; + } + + irq = platform_get_irq(pdev, 1); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get mlb_int irq: %d\n", irq); +- return irq; ++ ret = irq; ++ goto err_shutdown_dim; + } + + ret = devm_request_irq(&pdev->dev, irq, dim2_mlb_isr, 0, + "dim2_mlb_int", dev); + if (ret) { + dev_err(&pdev->dev, "failed to request mlb_int irq %d\n", irq); +- return ret; ++ goto err_shutdown_dim; + } + + init_waitqueue_head(&dev->netinfo_waitq); + dev->deliver_netinfo = 0; +- dev->netinfo_task = kthread_run(&deliver_netinfo_thread, (void *)dev, ++ dev->netinfo_task = kthread_run(&deliver_netinfo_thread, dev, + "dim2_netinfo"); +- if (IS_ERR(dev->netinfo_task)) +- return PTR_ERR(dev->netinfo_task); ++ if (IS_ERR(dev->netinfo_task)) { ++ ret = PTR_ERR(dev->netinfo_task); ++ goto err_shutdown_dim; ++ } + + for (i = 0; i < DMA_CHANNELS; i++) { + struct most_channel_capability *cap = dev->capabilities + i; +@@ -833,20 +824,17 @@ static int dim2_probe(struct platform_device *pdev) + if (ret) + goto err_unreg_iface; + +- ret = startup_dim(pdev); +- if (ret) { +- dev_err(&pdev->dev, "failed to initialize DIM2\n"); +- goto err_destroy_bus; +- } +- + return 0; + +-err_destroy_bus: +- dim2_sysfs_destroy(&dev->bus); + err_unreg_iface: + most_deregister_interface(&dev->most_iface); + err_stop_thread: + kthread_stop(dev->netinfo_task); ++err_shutdown_dim: ++ dim_shutdown(); ++err_bsp_destroy: ++ if (pdata && pdata->destroy) ++ pdata->destroy(pdata); + + return ret; + } +@@ -863,6 +851,10 @@ static int dim2_remove(struct platform_device *pdev) + struct dim2_platform_data *pdata = pdev->dev.platform_data; + unsigned long flags; + ++ dim2_sysfs_destroy(&dev->bus); ++ most_deregister_interface(&dev->most_iface); ++ kthread_stop(dev->netinfo_task); ++ + spin_lock_irqsave(&dim_lock, flags); + dim_shutdown(); + spin_unlock_irqrestore(&dim_lock, flags); +@@ -870,10 +862,6 @@ static int dim2_remove(struct platform_device *pdev) + if (pdata && pdata->destroy) + pdata->destroy(pdata); + +- dim2_sysfs_destroy(&dev->bus); +- most_deregister_interface(&dev->most_iface); +- kthread_stop(dev->netinfo_task); +- + /* + * break link to local platform_device_id struct + * to prevent crash by unload platform device module +-- +libgit2 0.26.0 diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0007-dim2-use-device-tree.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0007-dim2-use-device-tree.patch new file mode 100644 index 00000000..679fab79 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0007-dim2-use-device-tree.patch @@ -0,0 +1,378 @@ +From 8e16207392cd715ea88f6780981a3d55ab005588 Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov +Date: Mon, 12 Feb 2018 12:23:37 +0100 +Subject: [PATCH] staging: most: dim2: use device tree + +Current dim2 driver expects the existence of a platform driver that +implements the platform specific initialization and delivery of the irq +numbers. + +This patch integrates the device tree activity and platform specific +code into the driver. + +Signed-off-by: Andrey Shvetsov +--- + hdm-dim2/dim2_hdm.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------- + hdm-dim2/dim2_hdm.h | 28 ---------------------------- + hdm-dim2/platform/dim2_arwen_mlb3.c | 165 --------------------------------------------------------------------------------------------------------------------------------------------------------------------- + hdm-dim2/platform/dim2_arwen_mlb6.c | 169 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + hdm-dim2/platform/dim2_h2_dt.c | 227 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + hdm-dim2/platform/dim2_mx6q.c | 192 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + hdm-dim2/platform/dim2_mx6q_dt.c | 224 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 7 files changed, 193 insertions(+), 1034 deletions(-) + delete mode 100644 hdm-dim2/dim2_hdm.h + delete mode 100644 hdm-dim2/platform/dim2_arwen_mlb3.c + delete mode 100644 hdm-dim2/platform/dim2_arwen_mlb6.c + delete mode 100644 hdm-dim2/platform/dim2_h2_dt.c + delete mode 100644 hdm-dim2/platform/dim2_mx6q.c + delete mode 100644 hdm-dim2/platform/dim2_mx6q_dt.c + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index e4629a5..2dba917 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -14,6 +14,7 @@ + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + + #include ++#include + #include + #include + #include +@@ -21,13 +22,13 @@ + #include + #include + #include ++#include + #include + #include + #include + + #include + #include "dim2_hal.h" +-#include "dim2_hdm.h" + #include "dim2_errors.h" + #include "dim2_sysfs.h" + +@@ -93,6 +94,9 @@ struct dim2_hdm { + struct most_interface most_iface; + char name[16 + sizeof "dim2-"]; + void __iomem *io_base; ++ u8 clk_speed; ++ struct clk *clk; ++ struct clk *clk_pll; + struct task_struct *netinfo_task; + wait_queue_head_t netinfo_waitq; + int deliver_netinfo; +@@ -102,6 +106,12 @@ struct dim2_hdm { + struct medialb_bus bus; + void (*on_netinfo)(struct most_interface *, + unsigned char, unsigned char *); ++ void (*disable_platform)(struct platform_device *); ++}; ++ ++struct dim2_platform_data { ++ int (*enable)(struct platform_device *); ++ void (*disable)(struct platform_device *); + }; + + #define iface_to_hdm(iface) container_of(iface, struct dim2_hdm, most_iface) +@@ -686,6 +696,8 @@ static void dma_free(struct mbo *mbo, u32 size) + dma_free_coherent(NULL, size, mbo->virt_address, mbo->bus_address); + } + ++static const struct of_device_id dim2_of_match[]; ++ + /* + * dim2_probe - dim2 probe handler + * @pdev: platform device structure +@@ -695,7 +707,7 @@ static void dma_free(struct mbo *mbo, u32 size) + */ + static int dim2_probe(struct platform_device *pdev) + { +- struct dim2_platform_data *pdata = pdev->dev.platform_data; ++ const struct dim2_platform_data *pdata; + struct dim2_hdm *dev; + struct resource *res; + int ret, i; +@@ -703,6 +715,8 @@ static int dim2_probe(struct platform_device *pdev) + u8 hal_ret; + int irq; + ++ enum { MLB_INT_IDX, AHB0_INT_IDX }; ++ + dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); + if (!dev) + return -ENOMEM; +@@ -710,29 +724,30 @@ static int dim2_probe(struct platform_device *pdev) + dev->atx_idx = -1; + + platform_set_drvdata(pdev, dev); ++ ++ dev->clk_speed = CLK_4096FS; ++ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + dev->io_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(dev->io_base)) + return PTR_ERR(dev->io_base); + +- if (!pdata) { +- dev_err(&pdev->dev, "missing platform data\n"); +- return -EINVAL; +- } +- +- ret = pdata->init ? pdata->init(pdata, dev->io_base) : 0; ++ pdata = of_match_node(dim2_of_match, pdev->dev.of_node)->data; ++ ret = pdata && pdata->enable ? pdata->enable(pdev) : 0; + if (ret) + return ret; + ++ dev->disable_platform = pdata ? pdata->disable : 0; ++ + dev_info(&pdev->dev, "sync: num of frames per sub-buffer: %u\n", fcnt); +- hal_ret = dim_startup(dev->io_base, pdata->clk_speed, fcnt); ++ hal_ret = dim_startup(dev->io_base, dev->clk_speed, fcnt); + if (hal_ret != DIM_NO_ERROR) { + dev_err(&pdev->dev, "dim_startup failed: %d\n", hal_ret); + ret = -ENODEV; +- goto err_bsp_destroy; ++ goto err_disable_platform; + } + +- irq = platform_get_irq(pdev, 0); ++ irq = platform_get_irq(pdev, AHB0_INT_IDX); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get ahb0_int irq: %d\n", irq); + ret = irq; +@@ -746,7 +761,7 @@ static int dim2_probe(struct platform_device *pdev) + goto err_shutdown_dim; + } + +- irq = platform_get_irq(pdev, 1); ++ irq = platform_get_irq(pdev, MLB_INT_IDX); + if (irq < 0) { + dev_err(&pdev->dev, "failed to get mlb_int irq: %d\n", irq); + ret = irq; +@@ -832,9 +847,9 @@ static int dim2_probe(struct platform_device *pdev) + kthread_stop(dev->netinfo_task); + err_shutdown_dim: + dim_shutdown(); +-err_bsp_destroy: +- if (pdata && pdata->destroy) +- pdata->destroy(pdata); ++err_disable_platform: ++ if (dev->disable_platform) ++ dev->disable_platform(pdev); + + return ret; + } +@@ -848,7 +863,6 @@ static int dim2_probe(struct platform_device *pdev) + static int dim2_remove(struct platform_device *pdev) + { + struct dim2_hdm *dev = platform_get_drvdata(pdev); +- struct dim2_platform_data *pdata = pdev->dev.platform_data; + unsigned long flags; + + dim2_sysfs_destroy(&dev->bus); +@@ -859,37 +873,187 @@ static int dim2_remove(struct platform_device *pdev) + dim_shutdown(); + spin_unlock_irqrestore(&dim_lock, flags); + +- if (pdata && pdata->destroy) +- pdata->destroy(pdata); ++ if (dev->disable_platform) ++ dev->disable_platform(pdev); ++ ++ return 0; ++} ++ ++/* platform specific functions [[ */ ++ ++static int fsl_mx6_enable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ int ret; ++ ++ dev->clk = devm_clk_get(&pdev->dev, "mlb"); ++ if (IS_ERR_OR_NULL(dev->clk)) { ++ dev_err(&pdev->dev, "unable to get mlb clock\n"); ++ return -EFAULT; ++ } ++ ++ ret = clk_prepare_enable(dev->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "%s\n", "clk_prepare_enable failed"); ++ return ret; ++ } ++ ++ if (dev->clk_speed >= CLK_2048FS) { ++ /* enable pll */ ++ dev->clk_pll = devm_clk_get(&pdev->dev, "pll8_mlb"); ++ if (IS_ERR_OR_NULL(dev->clk_pll)) { ++ dev_err(&pdev->dev, "unable to get mlb pll clock\n"); ++ clk_disable_unprepare(dev->clk); ++ return -EFAULT; ++ } ++ ++ writel(0x888, dev->io_base + 0x38); ++ clk_prepare_enable(dev->clk_pll); ++ } ++ ++ return 0; ++} ++ ++static void fsl_mx6_disable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ ++ if (dev->clk_speed >= CLK_2048FS) ++ clk_disable_unprepare(dev->clk_pll); ++ ++ clk_disable_unprepare(dev->clk); ++} ++ ++static int rcar_h2_enable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ int ret; ++ ++ dev->clk = devm_clk_get(&pdev->dev, NULL); ++ if (IS_ERR(dev->clk)) { ++ dev_err(&pdev->dev, "cannot get clock\n"); ++ return PTR_ERR(dev->clk); ++ } ++ ++ ret = clk_prepare_enable(dev->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "%s\n", "clk_prepare_enable failed"); ++ return ret; ++ } ++ ++ if (dev->clk_speed >= CLK_2048FS) { ++ /* enable MLP pll and LVDS drivers */ ++ writel(0x03, dev->io_base + 0x600); ++ /* set bias */ ++ writel(0x888, dev->io_base + 0x38); ++ } else { ++ /* PLL */ ++ writel(0x04, dev->io_base + 0x600); ++ } ++ + +- /* +- * break link to local platform_device_id struct +- * to prevent crash by unload platform device module +- */ +- pdev->id_entry = NULL; ++ /* BBCR = 0b11 */ ++ writel(0x03, dev->io_base + 0x500); ++ writel(0x0002FF02, dev->io_base + 0x508); + + return 0; + } + +-static const struct platform_device_id dim2_id[] = { +- { "medialb_dim2" }, +- { }, /* Terminating entry */ ++static void rcar_h2_disable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ ++ clk_disable_unprepare(dev->clk); ++ ++ /* disable PLLs and LVDS drivers */ ++ writel(0x0, dev->io_base + 0x600); ++} ++ ++static int rcar_m3_enable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ u32 enable_512fs = dev->clk_speed == CLK_512FS; ++ int ret; ++ ++ dev->clk = devm_clk_get(&pdev->dev, NULL); ++ if (IS_ERR(dev->clk)) { ++ dev_err(&pdev->dev, "cannot get clock\n"); ++ return PTR_ERR(dev->clk); ++ } ++ ++ ret = clk_prepare_enable(dev->clk); ++ if (ret) { ++ dev_err(&pdev->dev, "%s\n", "clk_prepare_enable failed"); ++ return ret; ++ } ++ ++ /* PLL */ ++ writel(0x04, dev->io_base + 0x600); ++ ++ writel(enable_512fs, dev->io_base + 0x604); ++ ++ /* BBCR = 0b11 */ ++ writel(0x03, dev->io_base + 0x500); ++ writel(0x0002FF02, dev->io_base + 0x508); ++ ++ return 0; ++} ++ ++static void rcar_m3_disable(struct platform_device *pdev) ++{ ++ struct dim2_hdm *dev = platform_get_drvdata(pdev); ++ ++ clk_disable_unprepare(dev->clk); ++ ++ /* disable PLLs and LVDS drivers */ ++ writel(0x0, dev->io_base + 0x600); ++} ++ ++/* ]] platform specific functions */ ++ ++enum dim2_platforms { FSL_MX6, RCAR_H2, RCAR_M3 }; ++ ++static struct dim2_platform_data plat_data[] = { ++ [FSL_MX6] = { .enable = fsl_mx6_enable, .disable = fsl_mx6_disable }, ++ [RCAR_H2] = { .enable = rcar_h2_enable, .disable = rcar_h2_disable }, ++ [RCAR_M3] = { .enable = rcar_m3_enable, .disable = rcar_m3_disable }, ++}; ++ ++static const struct of_device_id dim2_of_match[] = { ++ { ++ .compatible = "fsl,imx6q-mlb150", ++ .data = plat_data + FSL_MX6 ++ }, ++ { ++ .compatible = "renesas,mlp", ++ .data = plat_data + RCAR_H2 ++ }, ++ { ++ .compatible = "rcar,medialb-dim2", ++ .data = plat_data + RCAR_M3 ++ }, ++ { ++ .compatible = "xlnx,axi4-os62420_3pin-1.00.a", ++ }, ++ { ++ .compatible = "xlnx,axi4-os62420_6pin-1.00.a", ++ }, ++ {}, + }; + +-MODULE_DEVICE_TABLE(platform, dim2_id); ++MODULE_DEVICE_TABLE(of, dim2_of_match); + + static struct platform_driver dim2_driver = { + .probe = dim2_probe, + .remove = dim2_remove, +- .id_table = dim2_id, + .driver = { + .name = "hdm_dim2", ++ .of_match_table = dim2_of_match, + }, + }; + + module_platform_driver(dim2_driver); + +-MODULE_AUTHOR("Jain Roy Ambi "); + MODULE_AUTHOR("Andrey Shvetsov "); + MODULE_DESCRIPTION("MediaLB DIM2 Hardware Dependent Module"); + MODULE_LICENSE("GPL"); +libgit2 0.26.0 diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0008-dim2-read-clock-speed-from-the-device-tree.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0008-dim2-read-clock-speed-from-the-device-tree.patch new file mode 100644 index 00000000..1b01fb15 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0008-dim2-read-clock-speed-from-the-device-tree.patch @@ -0,0 +1,92 @@ +From 839ad403a2d8081a6c15f6fc2836b01919338f3c Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov +Date: Mon, 12 Feb 2018 12:24:37 +0100 +Subject: [PATCH] staging: most: dim2: read clock speed from the device tree + +This implements reading of the clock speed parameter from the device +tree. + +Signed-off-by: Andrey Shvetsov +--- + Documentation/devicetree/bindings/inic/microchip,inic-dim2.txt | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + hdm-dim2/dim2_hdm.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 113 insertions(+), 1 deletion(-) + create mode 100644 Documentation/devicetree/bindings/inic/microchip,inic-dim2.txt + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index 2dba917..05e1896 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -698,6 +698,42 @@ static void dma_free(struct mbo *mbo, u32 size) + + static const struct of_device_id dim2_of_match[]; + ++static struct { ++ const char *clock_speed; ++ u8 clk_speed; ++} clk_mt[] = { ++ { "256fs", CLK_256FS }, ++ { "512fs", CLK_512FS }, ++ { "1024fs", CLK_1024FS }, ++ { "2048fs", CLK_2048FS }, ++ { "3072fs", CLK_3072FS }, ++ { "4096fs", CLK_4096FS }, ++ { "6144fs", CLK_6144FS }, ++ { "8192fs", CLK_8192FS }, ++}; ++ ++/** ++ * get_dim2_clk_speed - converts string to DIM2 clock speed value ++ * ++ * @clock_speed: string in the format "{NUMBER}fs" ++ * @val: pointer to get one of the CLK_{NUMBER}FS values ++ * ++ * By success stores one of the CLK_{NUMBER}FS in the *val and returns 0, ++ * otherwise returns -EINVAL. ++ */ ++static int get_dim2_clk_speed(const char *clock_speed, u8 *val) ++{ ++ int i; ++ ++ for (i = 0; i < ARRAY_SIZE(clk_mt); i++) { ++ if (!strcmp(clock_speed, clk_mt[i].clock_speed)) { ++ *val = clk_mt[i].clk_speed; ++ return 0; ++ } ++ } ++ return -EINVAL; ++} ++ + /* + * dim2_probe - dim2 probe handler + * @pdev: platform device structure +@@ -708,6 +744,7 @@ static const struct of_device_id dim2_of_match[]; + static int dim2_probe(struct platform_device *pdev) + { + const struct dim2_platform_data *pdata; ++ const char *clock_speed; + struct dim2_hdm *dev; + struct resource *res; + int ret, i; +@@ -725,7 +762,18 @@ static int dim2_probe(struct platform_device *pdev) + + platform_set_drvdata(pdev, dev); + +- dev->clk_speed = CLK_4096FS; ++ ret = of_property_read_string(pdev->dev.of_node, ++ "microchip,clock-speed", &clock_speed); ++ if (ret) { ++ dev_err(&pdev->dev, "missing dt property clock-speed\n"); ++ return ret; ++ } ++ ++ ret = get_dim2_clk_speed(clock_speed, &dev->clk_speed); ++ if (ret) { ++ dev_err(&pdev->dev, "bad dt property clock-speed\n"); ++ return ret; ++ } + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + dev->io_base = devm_ioremap_resource(&pdev->dev, res); +-- +libgit2 0.26.0 diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0009-dim2-use-device-for-coherent-memory-allocation.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0009-dim2-use-device-for-coherent-memory-allocation.patch new file mode 100644 index 00000000..08cd6f99 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0009-dim2-use-device-for-coherent-memory-allocation.patch @@ -0,0 +1,47 @@ +From 756f2f1f90524c2620ed7951e436d13bdb929a6b Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov +Date: Mon, 12 Feb 2018 12:25:37 +0100 +Subject: [PATCH] staging: most: dim2: use device for coherent memory allocation + +On several modern architectures the allocation of coherent memory needs +a device that has the dma_ops properly set. This patch enables use of +the DIM2 platform device for the allocation process. + +Signed-off-by: Andrey Shvetsov +--- + hdm-dim2/dim2_hdm.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/hdm-dim2/dim2_hdm.c b/hdm-dim2/dim2_hdm.c +index 05e1896..1847091 100644 +--- a/hdm-dim2/dim2_hdm.c ++++ b/hdm-dim2/dim2_hdm.c +@@ -688,12 +688,16 @@ static int poison_channel(struct most_interface *most_iface, int ch_idx) + + static void *dma_alloc(struct mbo *mbo, u32 size) + { +- return dma_alloc_coherent(NULL, size, &mbo->bus_address, GFP_KERNEL); ++ struct device *dev = mbo->ifp->dev; ++ ++ return dma_alloc_coherent(dev, size, &mbo->bus_address, GFP_KERNEL); + } + + static void dma_free(struct mbo *mbo, u32 size) + { +- dma_free_coherent(NULL, size, mbo->virt_address, mbo->bus_address); ++ struct device *dev = mbo->ifp->dev; ++ ++ dma_free_coherent(dev, size, mbo->virt_address, mbo->bus_address); + } + + static const struct of_device_id dim2_of_match[]; +@@ -875,6 +879,7 @@ static int dim2_probe(struct platform_device *pdev) + dev->most_iface.poison_channel = poison_channel; + dev->most_iface.request_netinfo = request_netinfo; + dev->most_iface.extra_attrs = DBR_ATTRS; ++ dev->most_iface.dev = &pdev->dev; + + kobj = most_register_interface(&dev->most_iface); + if (IS_ERR(kobj)) { +-- +libgit2 0.26.0 diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch new file mode 100644 index 00000000..ff21b213 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch @@ -0,0 +1,35 @@ +From 8eaec876f732c7e4b238ada5f9304c6da2380eb1 Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov +Date: Fri, 8 Feb 2019 22:44:32 +0000 +Subject: [PATCH] backport: usb: setup_timer + +--- + driver/hdm-usb/hdm_usb.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/hdm-usb/hdm_usb.c b/hdm-usb/hdm_usb.c +index 5b0af88..9896835 100644 +--- a/hdm-usb/hdm_usb.c ++++ b/hdm-usb/hdm_usb.c +@@ -760,9 +760,9 @@ static void hdm_request_netinfo(struct most_interface *iface, int channel, + * The handler runs in interrupt context. That's why we need to defer the + * tasks to a work queue. + */ +-static void link_stat_timer_handler(unsigned long data) ++static void link_stat_timer_handler(struct timer_list *t) + { +- struct most_dev *mdev = (struct most_dev *)data; ++ struct most_dev *mdev = from_timer(mdev, t, link_stat_timer); + + schedule_work(&mdev->poll_work_obj); + mdev->link_stat_timer.expires = jiffies + (2 * HZ); +@@ -1154,8 +1154,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) + num_endpoints = usb_iface_desc->desc.bNumEndpoints; + mutex_init(&mdev->io_mutex); + INIT_WORK(&mdev->poll_work_obj, wq_netinfo); +- setup_timer(&mdev->link_stat_timer, link_stat_timer_handler, +- (unsigned long)mdev); ++ timer_setup(&mdev->link_stat_timer, link_stat_timer_handler, 0); + + mdev->usb_device = usb_dev; + mdev->link_stat_timer.expires = jiffies + (2 * HZ); diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch new file mode 100644 index 00000000..8f83dbab --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch @@ -0,0 +1,18 @@ +Handle snd_pcm_lib_mmap_vmalloc removal in 4.19 + +Upstream-Status: Pending + +Signed-off-by: Scott Murray + +diff --git a/driver/aim-sound/sound.c b/driver/aim-sound/sound.c +index 6a290ff..4b3329b 100644 +--- a/aim-sound/sound.c ++++ b/aim-sound/sound.c +@@ -463,7 +463,6 @@ static const struct snd_pcm_ops pcm_ops = { + .trigger = pcm_trigger, + .pointer = pcm_pointer, + .page = snd_pcm_lib_get_vmalloc_page, +- .mmap = snd_pcm_lib_mmap_vmalloc, + }; + + static int split_arg_list(char *buf, char **card_name, u16 *ch_num, diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bb b/meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bb new file mode 100644 index 00000000..4ec7e3c2 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Build MOST driver" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +inherit module + +PV = "0.1" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/most;protocol=https;branch=${AGL_BRANCH}" + +S = "${WORKDIR}/git/driver" +SRCREV = "dcc04c5efe2058a5796f45b7a99f1c53082dd2ca" + +KERNEL_MODULE_AUTOLOAD += "aim_cdev aim_sound aim_network aim_v4l2 hdm_i2c hdm_dim2 hdm_usb mostcore" diff --git a/meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bbappend b/meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bbappend new file mode 100644 index 00000000..a90210d8 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-kernel/most/most.bbappend @@ -0,0 +1,31 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +def prep_version (d) : + KV = d.getVar('KERNEL_VERSION', True) + if not KV : + return "4.12" + else: + return KV + +ORIG_KERN_VER = "${@prep_version(d)}" + +VANILLA_KERNEL_VERSION = "${@str(ORIG_KERN_VER.split("-")[0].split(".")[0]+ORIG_KERN_VER.split("-")[0].split(".")[1])}" + +APPLY = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 412 else 'yes')}" +APPLY_419 = "${@str('no' if ${VANILLA_KERNEL_VERSION} < 419 else 'yes')}" + +SRC_URI_append = " \ + file://0001-most-aim-network-backport-Kernel-API.patch;apply=${APPLY} \ + file://0002-src-most-add-auto-conf-feature.patch \ + file://0003-core-remove-kernel-log-for-MBO-status.patch \ + file://0004-most-video-set-device_caps.patch \ + file://0005-most-video-set-V4L2_CAP_DEVICE_CAPS-flag.patch \ + file://0006-dim2-fix-startup-sequence.patch \ + file://0007-dim2-use-device-tree.patch \ + file://0008-dim2-read-clock-speed-from-the-device-tree.patch \ + file://0009-dim2-use-device-for-coherent-memory-allocation.patch \ + file://0010-backport-usb-setup-timer.patch \ + file://0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch;apply=${APPLY_419} \ + " +# Make sure we can expose KERNEL_VERSION ... +do_patch[depends] += "virtual/kernel:do_populate_sysroot" diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/files/0001-add-a-configure-option-to-disable-build-of-man-pages.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/files/0001-add-a-configure-option-to-disable-build-of-man-pages.patch new file mode 100644 index 00000000..51896e8d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/files/0001-add-a-configure-option-to-disable-build-of-man-pages.patch @@ -0,0 +1,40 @@ +From 530a31e3eb24b2f1ed7b30859ed62a2d1b24bd91 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Tue, 7 Feb 2017 11:51:58 +0100 +Subject: [PATCH] add a configure option to disable build of man-pages +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8316c67..099fc0c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -67,6 +67,8 @@ AC_ARG_ENABLE([largefile], + [AS_HELP_STRING([--disable-largefile],[disable LFS (large file support)])]) + AC_ARG_ENABLE([util], + [AS_HELP_STRING([--disable-util],[disable build of command-line utilities])]) ++AC_ARG_ENABLE([man], ++ [AS_HELP_STRING([--disable-man],[disable build of man-pages])]) + AC_ARG_ENABLE([bi], + [AS_HELP_STRING([--enable-bi=ARCH],[enable -mARCH for bi-arch compilation])]) + AC_ARG_ENABLE([ub], +@@ -395,7 +397,7 @@ AM_CONDITIONAL([ADD_PLATFORM_POSIX],[test "$X_PLATFORM" = "posix"]) + AM_CONDITIONAL([ADD_PLATFORM_WIN32],[test "$X_PLATFORM" = "win32"]) + + AM_CONDITIONAL([ADD_UTIL],[test "$enable_util" != "no"]) +-AM_CONDITIONAL([ADD_MANS],[test "$X_PLATFORM" != "win32"]) ++AM_CONDITIONAL([ADD_MANS],[test "$enable_man" != "no"]) + + ############################################################################### + # declare common substitutions +-- +2.9.3 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/libmp4v2_git.bb b/meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/libmp4v2_git.bb new file mode 100644 index 00000000..dd1b3474 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/libmp4v2/libmp4v2_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "The MP4v2 library provides an API to create and modify mp4 files" +HOMEPAGE = "https://github.com/sergiomb2/libmp4v2/wiki" +LICENSE = "MPLv1.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb3014b036b6d2151d944aef6a84c36f" + +inherit autotools-brokensep pkgconfig + +SRC_URI = " \ + git://github.com/sergiomb2/${BPN}.git \ + file://0001-add-a-configure-option-to-disable-build-of-man-pages.patch \ +" +SRCREV = "855e9674232808ff3be7191b697dfb56917db21f" +S = "${WORKDIR}/git" +PV = "2.1.0+git${SRCPV}" + + +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" +EXTRA_OECONF = "--disable-man" diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/.appends.meta-efl b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/.appends.meta-efl new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0001-Define-comparison_fn_t-for-non-glibc-systems.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0001-Define-comparison_fn_t-for-non-glibc-systems.patch new file mode 100644 index 00000000..15d4b3f0 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0001-Define-comparison_fn_t-for-non-glibc-systems.patch @@ -0,0 +1,33 @@ +From 5bc5b8c5dad3edec6736fd7e7ce61250c4ce3725 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 12 Jul 2017 17:13:19 -0700 +Subject: [PATCH] Define comparison_fn_t for non-glibc systems + +lightmediascanner.c:324:12: error: 'comparison_fn_t' undeclared (first use in this function) + (comparison_fn_t)_plugin_sort); + ^~~~~~~~~~~~~~~ + +Signed-off-by: Khem Raj +--- + src/lib/lightmediascanner.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/lib/lightmediascanner.c b/src/lib/lightmediascanner.c +index 344b247..b866883 100644 +--- a/src/lib/lightmediascanner.c ++++ b/src/lib/lightmediascanner.c +@@ -37,6 +37,11 @@ + #define DEFAULT_SLAVE_TIMEOUT 1000 + #define DEFAULT_COMMIT_INTERVAL 100 + ++#if !defined(__GLIBC__) ++typedef int (*__compar_fn_t) (const void*, const void*); ++typedef __compar_fn_t comparison_fn_t; ++#endif ++ + #ifdef HAVE_MAGIC_H + static magic_t _magic_handle; + +-- +2.13.2 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0002-switch-from-G_BUS_TYPE_SESSION-to-G_BUS_TYPE_SYSTEM.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0002-switch-from-G_BUS_TYPE_SESSION-to-G_BUS_TYPE_SYSTEM.patch new file mode 100644 index 00000000..5abb980b --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/0002-switch-from-G_BUS_TYPE_SESSION-to-G_BUS_TYPE_SYSTEM.patch @@ -0,0 +1,49 @@ +From 5a618b444e424483c3a9d34dd9b196796cac8e3f Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Mon, 22 Jul 2019 13:29:52 -0700 +Subject: [PATCH] switch from G_BUS_TYPE_SESSION to G_BUS_TYPE_SYSTEM + +Signed-off-by: Matt Ranostay +--- + src/bin/lightmediascannerctl.c | 4 ++-- + src/bin/lightmediascannerd.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/bin/lightmediascannerctl.c b/src/bin/lightmediascannerctl.c +index 5764bc0..1d4d844 100644 +--- a/src/bin/lightmediascannerctl.c ++++ b/src/bin/lightmediascannerctl.c +@@ -11,7 +11,7 @@ start_service_by_name(void) + GVariant *var; + GDBusConnection *conn; + +- conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error); ++ conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error); + if (error) { + fprintf(stderr, "Could not get session bus connection: %s\n", + error->message); +@@ -526,7 +526,7 @@ main(int argc, char *argv[]) + + app.timer = NULL; + app.loop = g_main_loop_new(NULL, FALSE); +- app.proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SESSION, ++ app.proxy = g_dbus_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM, + G_DBUS_PROXY_FLAGS_NONE, + NULL, + "org.lightmediascanner", +diff --git a/src/bin/lightmediascannerd.c b/src/bin/lightmediascannerd.c +index 319db42..6db81cc 100644 +--- a/src/bin/lightmediascannerd.c ++++ b/src/bin/lightmediascannerd.c +@@ -1721,7 +1721,7 @@ main(int argc, char *argv[]) + introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, NULL); + g_assert(introspection_xml != NULL); + +- id = g_bus_own_name(G_BUS_TYPE_SESSION, "org.lightmediascanner", ++ id = g_bus_own_name(G_BUS_TYPE_SYSTEM, "org.lightmediascanner", + G_BUS_NAME_OWNER_FLAGS_NONE, + NULL, on_name_acquired, NULL, NULL, NULL); + +-- +2.20.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/dbus-lightmediascanner.conf b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/dbus-lightmediascanner.conf new file mode 100644 index 00000000..8a9e35b0 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/dbus-lightmediascanner.conf @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/id3-plugin-support-out-of-tree-build.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/id3-plugin-support-out-of-tree-build.patch new file mode 100644 index 00000000..9528bec7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/id3-plugin-support-out-of-tree-build.patch @@ -0,0 +1,11 @@ +--- a/src/plugins/Makefile.am 2015-10-25 16:12:29.331415823 +0000 ++++ b/src/plugins/Makefile.am 2015-10-25 16:14:37.593415808 +0000 +@@ -93,7 +93,7 @@ + id3_id3_la_SOURCES = id3/id3.c id3/id3v1_genres.c + id3_id3_la_LIBADD = $(PLUGINS_LIBADD) + +-id3/id3v1_genres.c: $(srcdir)/id3/id3v1_genres.def $(srcdir)/id3/id3v1_genres_gen.awk ++$(srcdir)/id3/id3v1_genres.c: $(srcdir)/id3/id3v1_genres.def $(srcdir)/id3/id3v1_genres_gen.awk + $(AWK) -f $(srcdir)/id3/id3v1_genres_gen.awk $(srcdir)/id3/id3v1_genres.def > $@ + + EXTRA_DIST += id3/id3v1_genres.def id3/id3v1_genres_gen.awk diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/lightmediascanner.service b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/lightmediascanner.service new file mode 100644 index 00000000..abd7be7e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/lightmediascanner.service @@ -0,0 +1,12 @@ +[Unit] +Description=Lightmediascanner (LMS) + +[Service] +Type=dbus +BusName=org.lightmediascanner +SmackProcessLabel=User::App::agl-service-mediascanner +ExecStart=/usr/bin/lightmediascannerd --startup-scan --db-path=/var/volatile/tmp/lightmediascannerd.db --directory=/media + +[Install] +WantedBy=multi-user.target +Alias=dbus-org.lightmediascanner.service diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/plugin-ogg-fix-chucksize-issue.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/plugin-ogg-fix-chucksize-issue.patch new file mode 100644 index 00000000..6a0b8ff9 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/files/plugin-ogg-fix-chucksize-issue.patch @@ -0,0 +1,53 @@ +From 3e66b97221440b17a184feb48692dce7e0561cac Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +Date: Wed, 8 Mar 2017 16:30:01 -0800 +Subject: [PATCH] plugin: ogg: fix chucksize issue + +There are some OGG files that have metadata chucks that go over the +hardcoded 10 * 4096 size due to album art. This patchset just parses +each chuck and continues till it runs out of valid chunks. + +Signed-off-by: Matt Ranostay +--- + src/plugins/ogg/ogg.c | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/src/plugins/ogg/ogg.c b/src/plugins/ogg/ogg.c +index 1c0818e..c94dc38 100644 +--- a/src/plugins/ogg/ogg.c ++++ b/src/plugins/ogg/ogg.c +@@ -47,8 +47,6 @@ + int CHUNKSIZE = 4096; + #endif + +-#define MAX_CHUNKS_PER_PAGE 10 +- + struct stream { + struct lms_stream base; + int serial; +@@ -122,10 +120,8 @@ _set_lms_info(struct lms_string_size *info, const char *tag) + + static bool _ogg_read_page(FILE *fp, ogg_sync_state *osync, ogg_page *page) + { +- int i; +- +- for (i = 0; i < MAX_CHUNKS_PER_PAGE && ogg_sync_pageout(osync, page) != 1; +- i++) { ++ while(ogg_sync_pageout(osync, page) != 1) ++ { + lms_ogg_buffer_t buffer = lms_get_ogg_sync_buffer(osync, CHUNKSIZE); + int bytes = fread(buffer, 1, CHUNKSIZE, fp); + +@@ -136,9 +132,6 @@ static bool _ogg_read_page(FILE *fp, ogg_sync_state *osync, ogg_page *page) + ogg_sync_wrote(osync, bytes); + } + +- if (i > MAX_CHUNKS_PER_PAGE) +- return false; +- + return true; + } + +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend new file mode 100644 index 00000000..b47b2796 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_%.bbappend @@ -0,0 +1,42 @@ +# Disable everything but the roygalty-free formats +PACKAGECONFIG = "ogg flac wave m3u pls jpeg png" + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://lightmediascanner.service \ + file://plugin-ogg-fix-chucksize-issue.patch \ + file://0002-switch-from-G_BUS_TYPE_SESSION-to-G_BUS_TYPE_SYSTEM.patch \ + file://dbus-lightmediascanner.conf \ + " + +CFLAGS_append = " -D_FILE_OFFSET_BITS=64" + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "lightmediascanner.service" +SYSTEMD_AUTO_ENABLE_${PN} = "enable" + +do_install_append() { + # Install LMS systemd service + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 644 -p -D ${WORKDIR}/lightmediascanner.service ${D}${systemd_system_unitdir}/lightmediascanner.service + fi + + install -d ${D}/etc/dbus-1/system.d + install -m 0644 ${WORKDIR}/dbus-lightmediascanner.conf ${D}/etc/dbus-1/system.d/org.lightmediascanner.conf +} + +FILES_${PN} += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_system_unitdir}/lightmediascanner.service', '', d)} \ + " + +EXTRA_OECONF = "--enable-static --with-dbus-services=${datadir}/dbus-1/system-services" +PACKAGECONFIG[mp4] = "--enable-mp4,--disable-mp4,libmp4v2" + +# add support MP3 because of the format of music files for AGL CES/ALS2017 Demo +PACKAGECONFIG_append = " id3 mp4" + +# add required character sets for id3 tag scanning +RDEPENDS_${PN}_append = " glibc-gconv-utf-16 glibc-gconv-iso8859-1" diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_0.5.1.bb b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_0.5.1.bb new file mode 100644 index 00000000..f2158760 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/lightmediascanner/lightmediascanner_0.5.1.bb @@ -0,0 +1,63 @@ +SUMMARY = "Lightweight media scanner" +DESCRIPTION = "Lightweight media scanner meant to be used in not-so-powerful devices, like embedded systems or old machines." +SECTION = "libs/multimedia" + +LICENSE = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://src/lib/lightmediascanner.c;endline=21;md5=6d8889bccb4c6c27e8b786342a3eb267" + +DEPENDS = "file gawk glib-2.0 sqlite3" + +PV = "0.5.1+git${SRCPV}" +SRCREV = "adfddb3486276a5ed2f5008c9e43a811e1271cc9" +SRC_URI = "git://github.com/profusion/lightmediascanner.git \ + file://id3-plugin-support-out-of-tree-build.patch \ + file://0001-Define-comparison_fn_t-for-non-glibc-systems.patch \ + " + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-static --disable-mp4" + +PACKAGECONFIG ??= "ogg flac wave id3 m3u pls asf rm jpeg png" +PACKAGECONFIG[generic] = "--enable-generic,--disable-generic,libav" +PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg libvorbis libtheora" +PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac" +PACKAGECONFIG[wave] = "--enable-wave,--disable-wave" +PACKAGECONFIG[id3] = "--enable-id3,--disable-id3" +PACKAGECONFIG[m3u] = "--enable-m3u,--disable-m3u" +PACKAGECONFIG[pls] = "--enable-pls,--disable-pls" +PACKAGECONFIG[asf] = "--enable-asf,--disable-asf" +PACKAGECONFIG[rm] = "--enable-rm,--disable-rm" +PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg" +PACKAGECONFIG[png] = "--enable-png,--disable-png" + +do_install_append() { + # Install "test" binary for corresponding package + install -d ${D}/${bindir} + install -m 755 ${B}/src/bin/.libs/test ${D}/${bindir}/test-lms + # Remove .la files for loadable modules + rm -f ${D}/${libdir}/${PN}/plugins/*.la +} + +FILES_${PN} += "${datadir}/dbus-1" +FILES_${PN}-dbg += "${libdir}/${PN}/plugins/.debug" + +PACKAGES_prepend = "${PN}-test " +FILES_${PN}-test_prepend = "${bindir}/test-lms " + +PACKAGES += "${PN}-meta" +ALLOW_EMPTY_${PN}-meta = "1" + +PACKAGES_DYNAMIC = "${PN}-plugin-*" + +python populate_packages_prepend () { + lms_libdir = d.expand('${libdir}/${PN}') + pkgs = [] + + pkgs += do_split_packages(d, oe.path.join(lms_libdir, "plugins"), '^(.*)\.so$', d.expand('${PN}-plugin-%s'), 'LightMediaScanner plugin for %s', prepend=True, extra_depends=d.expand('${PN}')) + metapkg = d.getVar('PN') + '-meta' + d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs)) +} diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/agl-audio-plugin_0.1.bb b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/agl-audio-plugin_0.1.bb new file mode 100644 index 00000000..633a3e24 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/agl-audio-plugin_0.1.bb @@ -0,0 +1,28 @@ +SUMMARY = "AGL Audio Policy Plugin" +DESCRIPTION = "AGL PulseAudio Routing plugin, forked from the Tizen IVI \ +PulseAudio Routing plugin, also known as module-murphy-ivi. This is a \ +stripped-down version of the former, not needing Murphy anymore and using \ +either a JSON configuration file or its own embedded configuration." +HOMEPAGE = "http://www.iot.bzh" + +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1" + +DEPENDS = "json-c pulseaudio" +RDEPENDS_${PN} = "pulseaudio-server pulseaudio-module-null-sink pulseaudio-module-loopback" + +SRCREV = "952d404e87ca6001e546fe9105bdb6760c468760" +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/agl-audio-plugin;protocol=https;branch=${AGL_BRANCH}" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +FULL_OPTIMIZATION = "-O1 -pipe ${DEBUG_FLAGS}" + +PULSE_PV="9.0" + +EXTRA_OECMAKE_append = " -DPULSE_PV:STRING=${PULSE_PV}" + +FILES_${PN} += "${libdir}/pulse-${PULSE_PV}/modules/* ${sysconfdir}/pulse/*" +FILES_${PN}-dbg += "${libdir}/pulse-${PULSE_PV}/modules/.debug/*" diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch new file mode 100644 index 00000000..f77249a2 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch @@ -0,0 +1,70 @@ +From 53281e2d11f84e2dae0704e0167369710ee2cb30 Mon Sep 17 00:00:00 2001 +From: Yannick Gicquel +Date: Fri, 23 Sep 2016 14:26:03 +0200 +Subject: [PATCH 1/6] install files for a module development + +Signed-off-by: Yannick Gicquel +--- + +diff --git a/Makefile.am b/Makefile.am +index 275ceea..77dd7a5 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -54,7 +54,16 @@ dist_vapi_DATA = \ + vala/libpulse-simple.deps vala/libpulse-simple.vapi + + pkgconfigdir = $(libdir)/pkgconfig +-pkgconfig_DATA = libpulse.pc libpulse-simple.pc ++pkgconfig_DATA = libpulse.pc libpulse-simple.pc pulseaudio-module-devel.pc ++ ++moduledev_DATA = pulsecore-config.h $(top_srcdir)/src/pulsecore/*.h ++moduledevdir = $(includedir)/pulsemodule/pulsecore ++ ++moduledevfilter_DATA = $(top_srcdir)/src/pulsecore/filter/*.h ++moduledevfilterdir = $(includedir)/pulsemodule/pulsecore/filter ++ ++moduledevinternal_DATA = src/pulse/internal.h src/pulse/client-conf.h src/pulse/fork-detect.h ++moduledevinternaldir = $(includedir)/pulsemodule/pulse + + if HAVE_GLIB20 + pkgconfig_DATA += \ +@@ -108,6 +117,9 @@ dist-hook: + check-daemon: + $(MAKE) -C src check-daemon + ++pulsecore-config.h: config.h ++ cp $< $@ ++ + .PHONY: homepage distcleancheck doxygen + + # see git-version-gen +diff --git a/configure.ac b/configure.ac +index c9c414f..87aa9b1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1548,6 +1548,7 @@ man/pulse-client.conf.5.xml + man/default.pa.5.xml + man/pulse-cli-syntax.5.xml + man/start-pulseaudio-x11.1.xml ++pulseaudio-module-devel.pc + ]) + + AS_IF([test "x$HAVE_ESOUND" = "x1"], +diff --git a/pulseaudio-module-devel.pc.in b/pulseaudio-module-devel.pc.in +new file mode 100644 +index 0000000..85aadbc +--- /dev/null ++++ b/pulseaudio-module-devel.pc.in +@@ -0,0 +1,12 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++modlibexecdir=@modlibexecdir@ ++ ++Name: pulseaudio-module-devel ++Description: PulseAudio Module Development Interface ++Version: @PACKAGE_VERSION@ ++Libs: -L${libdir} -L${libdir}/pulseaudio -L${modlibexecdir} -lpulsecommon-@PA_MAJORMINOR@ -lpulsecore-@PA_MAJORMINOR@ -lprotocol-native ++Libs.private: ++Cflags: -I${includedir}/pulsemodule -D_REENTRANT diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch new file mode 100644 index 00000000..5b2da69c --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch @@ -0,0 +1,564 @@ +From c28b5faa6745b525c11d1f54d8bf52386a90fcc1 Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:16 +0900 +Subject: [PATCH 2/6] volume ramp: additions to the low level infra + +The original patch is + - https://review.tizen.org/git/?p=platform/upstream/pulseaudio.git;a=commit;h=df1c4275ed79e0b708c75b92f9d247e0492bc1f0 + - by Jaska Uimonen helsinki.fi> + +Signed-off-by: Sangchul Lee + +--- + src/map-file | 4 + + src/pulse/def.h | 13 ++- + src/pulse/volume.c | 74 ++++++++++++- + src/pulse/volume.h | 33 ++++++ + src/pulsecore/mix.c | 310 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/pulsecore/mix.h | 27 +++++ + 6 files changed, 459 insertions(+), 2 deletions(-) + +diff --git a/src/map-file b/src/map-file +index 9b6cba2..946ab54 100644 +--- a/src/map-file ++++ b/src/map-file +@@ -138,6 +138,10 @@ pa_cvolume_max_mask; + pa_cvolume_merge; + pa_cvolume_min; + pa_cvolume_min_mask; ++pa_cvolume_ramp_equal; ++pa_cvolume_ramp_init; ++pa_cvolume_ramp_set; ++pa_cvolume_ramp_channel_ramp_set; + pa_cvolume_remap; + pa_cvolume_scale; + pa_cvolume_scale_mask; +diff --git a/src/pulse/def.h b/src/pulse/def.h +index 100df5b..b13eed7 100644 +--- a/src/pulse/def.h ++++ b/src/pulse/def.h +@@ -349,11 +349,15 @@ typedef enum pa_stream_flags { + * consider absolute when the sink is in flat volume mode, + * relative otherwise. \since 0.9.20 */ + +- PA_STREAM_PASSTHROUGH = 0x80000U ++ PA_STREAM_PASSTHROUGH = 0x80000U, + /**< Used to tag content that will be rendered by passthrough sinks. + * The data will be left as is and not reformatted, resampled. + * \since 1.0 */ + ++ PA_STREAM_START_RAMP_MUTED = 0x100000U ++ /**< Used to tag content that the stream will be started ramp volume ++ * muted so that you can nicely fade it in */ ++ + } pa_stream_flags_t; + + /** \cond fulldocs */ +@@ -382,6 +386,7 @@ typedef enum pa_stream_flags { + #define PA_STREAM_FAIL_ON_SUSPEND PA_STREAM_FAIL_ON_SUSPEND + #define PA_STREAM_RELATIVE_VOLUME PA_STREAM_RELATIVE_VOLUME + #define PA_STREAM_PASSTHROUGH PA_STREAM_PASSTHROUGH ++#define PA_STREAM_START_RAMP_MUTED PA_STREAM_START_RAMP_MUTED + + /** \endcond */ + +@@ -1070,6 +1075,12 @@ typedef enum pa_port_available { + /** \endcond */ + #endif + ++/** \cond fulldocs */ ++#define PA_VOLUMER_RAMP_TYPE_LINEAR PA_VOLUMER_RAMP_TYPE_LINEAR ++#define PA_VOLUMER_RAMP_TYPE_LOGARITHMIC PA_VOLUMER_RAMP_TYPE_LOGARITHMIC ++#define PA_VOLUMER_RAMP_TYPE_CUBIC PA_VOLUMER_RAMP_TYPE_CUBIC ++/** \endcond */ ++ + PA_C_DECL_END + + #endif +diff --git a/src/pulse/volume.c b/src/pulse/volume.c +index ead5415..83a1e05 100644 +--- a/src/pulse/volume.c ++++ b/src/pulse/volume.c +@@ -457,7 +457,10 @@ int pa_cvolume_channels_equal_to(const pa_cvolume *a, pa_volume_t v) { + unsigned c; + pa_assert(a); + +- pa_return_val_if_fail(pa_cvolume_valid(a), 0); ++ if (pa_cvolume_valid(a) == 0) ++ abort(); ++ ++ /* pa_return_val_if_fail(pa_cvolume_valid(a), 0); */ + pa_return_val_if_fail(PA_VOLUME_IS_VALID(v), 0); + + for (c = 0; c < a->channels; c++) +@@ -989,3 +992,72 @@ pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec) { + + return pa_cvolume_scale(v, m); + } ++ ++int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b) { ++ int i; ++ pa_assert(a); ++ pa_assert(b); ++ ++ if (PA_UNLIKELY(a == b)) ++ return 1; ++ ++ if (a->channels != b->channels) ++ return 0; ++ ++ for (i = 0; i < a->channels; i++) { ++ if (a->ramps[i].type != b->ramps[i].type || ++ a->ramps[i].length != b->ramps[i].length || ++ a->ramps[i].target != b->ramps[i].target) ++ return 0; ++ } ++ ++ return 1; ++} ++ ++pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp) { ++ unsigned c; ++ ++ pa_assert(ramp); ++ ++ ramp->channels = 0; ++ ++ for (c = 0; c < PA_CHANNELS_MAX; c++) { ++ ramp->ramps[c].type = PA_VOLUME_RAMP_TYPE_LINEAR; ++ ramp->ramps[c].length = 0; ++ ramp->ramps[c].target = PA_VOLUME_INVALID; ++ } ++ ++ return ramp; ++} ++ ++pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channels, pa_volume_ramp_type_t type, long time, pa_volume_t vol) { ++ int i; ++ ++ pa_assert(ramp); ++ pa_assert(channels > 0); ++ pa_assert(time >= 0); ++ pa_assert(channels <= PA_CHANNELS_MAX); ++ ++ ramp->channels = (uint8_t) channels; ++ ++ for (i = 0; i < ramp->channels; i++) { ++ ramp->ramps[i].type = type; ++ ramp->ramps[i].length = time; ++ ramp->ramps[i].target = PA_CLAMP_VOLUME(vol); ++ } ++ ++ return ramp; ++} ++ ++pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol) { ++ ++ pa_assert(ramp); ++ pa_assert(channel <= ramp->channels); ++ pa_assert(time >= 0); ++ ++ ramp->ramps[channel].type = type; ++ ramp->ramps[channel].length = time; ++ ramp->ramps[channel].target = PA_CLAMP_VOLUME(vol); ++ ++ return ramp; ++} +diff --git a/src/pulse/volume.h b/src/pulse/volume.h +index 2503c3f..0b74833 100644 +--- a/src/pulse/volume.h ++++ b/src/pulse/volume.h +@@ -437,6 +437,39 @@ pa_cvolume* pa_cvolume_inc(pa_cvolume *v, pa_volume_t inc); + * the channels are kept. Returns \a v, or NULL on error. \since 0.9.16 */ + pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec); + ++/** Volume ramp type ++*/ ++typedef enum pa_volume_ramp_type { ++ PA_VOLUME_RAMP_TYPE_LINEAR = 0, /**< linear */ ++ PA_VOLUME_RAMP_TYPE_LOGARITHMIC = 1, /**< logarithmic */ ++ PA_VOLUME_RAMP_TYPE_CUBIC = 2, ++} pa_volume_ramp_type_t; ++ ++/** A structure encapsulating a volume ramp */ ++typedef struct pa_volume_ramp_t { ++ pa_volume_ramp_type_t type; ++ long length; ++ pa_volume_t target; ++} pa_volume_ramp_t; ++ ++/** A structure encapsulating a multichannel volume ramp */ ++typedef struct pa_cvolume_ramp { ++ uint8_t channels; ++ pa_volume_ramp_t ramps[PA_CHANNELS_MAX]; ++} pa_cvolume_ramp; ++ ++/** Return non-zero when *a == *b */ ++int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); ++ ++/** Init volume ramp struct */ ++pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp); ++ ++/** Set first n channels of ramp struct to certain value */ ++pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); ++ ++/** Set individual channel in the channel struct */ ++pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); ++ + PA_C_DECL_END + + #endif +diff --git a/src/pulsecore/mix.c b/src/pulsecore/mix.c +index 59622d7..1e4cc1e 100644 +--- a/src/pulsecore/mix.c ++++ b/src/pulsecore/mix.c +@@ -724,3 +724,313 @@ void pa_volume_memchunk( + + pa_memblock_release(c->memblock); + } ++ ++static void calc_linear_integer_volume_no_mapping(int32_t linear[], float volume[], unsigned nchannels) { ++ unsigned channel, padding; ++ ++ pa_assert(linear); ++ pa_assert(volume); ++ ++ for (channel = 0; channel < nchannels; channel++) ++ linear[channel] = (int32_t) lrint(volume[channel] * 0x10000U); ++ ++ for (padding = 0; padding < VOLUME_PADDING; padding++, channel++) ++ linear[channel] = linear[padding]; ++} ++ ++static void calc_linear_float_volume_no_mapping(float linear[], float volume[], unsigned nchannels) { ++ unsigned channel, padding; ++ ++ pa_assert(linear); ++ pa_assert(volume); ++ ++ for (channel = 0; channel < nchannels; channel++) ++ linear[channel] = volume[channel]; ++ ++ for (padding = 0; padding < VOLUME_PADDING; padding++, channel++) ++ linear[channel] = linear[padding]; ++} ++ ++typedef void (*pa_calc_volume_no_mapping_func_t) (void *volumes, float *volume, int channels); ++ ++static const pa_calc_volume_no_mapping_func_t calc_volume_table_no_mapping[] = { ++ [PA_SAMPLE_U8] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_ALAW] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_ULAW] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S16LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S16BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_FLOAT32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_float_volume_no_mapping, ++ [PA_SAMPLE_FLOAT32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_float_volume_no_mapping, ++ [PA_SAMPLE_S32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24_32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24_32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping ++}; ++ ++static const unsigned format_sample_size_table[] = { ++ [PA_SAMPLE_U8] = 1, ++ [PA_SAMPLE_ALAW] = 1, ++ [PA_SAMPLE_ULAW] = 1, ++ [PA_SAMPLE_S16LE] = 2, ++ [PA_SAMPLE_S16BE] = 2, ++ [PA_SAMPLE_FLOAT32LE] = 4, ++ [PA_SAMPLE_FLOAT32BE] = 4, ++ [PA_SAMPLE_S32LE] = 4, ++ [PA_SAMPLE_S32BE] = 4, ++ [PA_SAMPLE_S24LE] = 3, ++ [PA_SAMPLE_S24BE] = 3, ++ [PA_SAMPLE_S24_32LE] = 4, ++ [PA_SAMPLE_S24_32BE] = 4 ++}; ++ ++static float calc_volume_ramp_linear(pa_volume_ramp_int_t *ramp) { ++ pa_assert(ramp); ++ pa_assert(ramp->length > 0); ++ ++ /* basic linear interpolation */ ++ return ramp->start + (ramp->length - ramp->left) * (ramp->end - ramp->start) / (float) ramp->length; ++} ++ ++static float calc_volume_ramp_logarithmic(pa_volume_ramp_int_t *ramp) { ++ float x_val, s, e; ++ long temp; ++ ++ pa_assert(ramp); ++ pa_assert(ramp->length > 0); ++ ++ if (ramp->end > ramp->start) { ++ temp = ramp->left; ++ s = ramp->end; ++ e = ramp->start; ++ } else { ++ temp = ramp->length - ramp->left; ++ s = ramp->start; ++ e = ramp->end; ++ } ++ ++ x_val = temp == 0 ? 0.0 : powf(temp, 10); ++ ++ /* base 10 logarithmic interpolation */ ++ return s + x_val * (e - s) / powf(ramp->length, 10); ++} ++ ++static float calc_volume_ramp_cubic(pa_volume_ramp_int_t *ramp) { ++ float x_val, s, e; ++ long temp; ++ ++ pa_assert(ramp); ++ pa_assert(ramp->length > 0); ++ ++ if (ramp->end > ramp->start) { ++ temp = ramp->left; ++ s = ramp->end; ++ e = ramp->start; ++ } else { ++ temp = ramp->length - ramp->left; ++ s = ramp->start; ++ e = ramp->end; ++ } ++ ++ x_val = temp == 0 ? 0.0 : cbrtf(temp); ++ ++ /* cubic interpolation */ ++ return s + x_val * (e - s) / cbrtf(ramp->length); ++} ++ ++typedef float (*pa_calc_volume_ramp_func_t) (pa_volume_ramp_int_t *); ++ ++static const pa_calc_volume_ramp_func_t calc_volume_ramp_table[] = { ++ [PA_VOLUME_RAMP_TYPE_LINEAR] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_linear, ++ [PA_VOLUME_RAMP_TYPE_LOGARITHMIC] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_logarithmic, ++ [PA_VOLUME_RAMP_TYPE_CUBIC] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_cubic ++}; ++ ++static void calc_volume_ramps(pa_cvolume_ramp_int *ram, float *vol) ++{ ++ int i; ++ ++ for (i = 0; i < ram->channels; i++) { ++ if (ram->ramps[i].left <= 0) { ++ if (ram->ramps[i].target == PA_VOLUME_NORM) { ++ vol[i] = 1.0; ++ } ++ } else { ++ vol[i] = ram->ramps[i].curr = calc_volume_ramp_table[ram->ramps[i].type] (&ram->ramps[i]); ++ ram->ramps[i].left--; ++ } ++ } ++} ++ ++void pa_volume_ramp_memchunk( ++ pa_memchunk *c, ++ const pa_sample_spec *spec, ++ pa_cvolume_ramp_int *ramp) { ++ ++ void *ptr; ++ volume_val linear[PA_CHANNELS_MAX + VOLUME_PADDING]; ++ float vol[PA_CHANNELS_MAX + VOLUME_PADDING]; ++ pa_do_volume_func_t do_volume; ++ long length_in_frames; ++ int i; ++ ++ pa_assert(c); ++ pa_assert(spec); ++ pa_assert(pa_frame_aligned(c->length, spec)); ++ pa_assert(ramp); ++ ++ length_in_frames = c->length / format_sample_size_table[spec->format] / spec->channels; ++ ++ if (pa_memblock_is_silence(c->memblock)) { ++ for (i = 0; i < ramp->channels; i++) { ++ if (ramp->ramps[i].length > 0) ++ ramp->ramps[i].length -= length_in_frames; ++ } ++ return; ++ } ++ ++ if (spec->format < 0 || spec->format >= PA_SAMPLE_MAX) { ++ pa_log_warn("Unable to change volume of format"); ++ return; ++ } ++ ++ do_volume = pa_get_volume_func(spec->format); ++ pa_assert(do_volume); ++ ++ ptr = (uint8_t*) pa_memblock_acquire(c->memblock) + c->index; ++ ++ for (i = 0; i < length_in_frames; i++) { ++ calc_volume_ramps(ramp, vol); ++ calc_volume_table_no_mapping[spec->format] ((void *)linear, vol, spec->channels); ++ ++ /* we only process one frame per iteration */ ++ do_volume (ptr, (void *)linear, spec->channels, format_sample_size_table[spec->format] * spec->channels); ++ ++ /* pa_log_debug("1: %d 2: %d", linear[0], linear[1]); */ ++ ++ ptr = (uint8_t*)ptr + format_sample_size_table[spec->format] * spec->channels; ++ } ++ ++ pa_memblock_release(c->memblock); ++} ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_convert(const pa_cvolume_ramp *src, pa_cvolume_ramp_int *dst, int sample_rate) { ++ ++ int i, j, channels, remaining_channels; ++ float temp; ++ ++ if (dst->channels < src->channels) { ++ channels = dst->channels; ++ remaining_channels = 0; ++ } ++ else { ++ channels = src->channels; ++ remaining_channels = dst->channels; ++ } ++ ++ for (i = 0; i < channels; i++) { ++ dst->ramps[i].type = src->ramps[i].type; ++ /* ms to samples */ ++ dst->ramps[i].length = src->ramps[i].length * sample_rate / 1000; ++ dst->ramps[i].left = dst->ramps[i].length; ++ dst->ramps[i].start = dst->ramps[i].end; ++ dst->ramps[i].target = src->ramps[i].target; ++ /* scale to pulse internal mapping so that when ramp is over there's no glitch in volume */ ++ temp = src->ramps[i].target / (float)0x10000U; ++ dst->ramps[i].end = temp * temp * temp; ++ } ++ ++ j = i; ++ ++ for (i--; j < remaining_channels; j++) { ++ dst->ramps[j].type = dst->ramps[i].type; ++ dst->ramps[j].length = dst->ramps[i].length; ++ dst->ramps[j].left = dst->ramps[i].left; ++ dst->ramps[j].start = dst->ramps[i].start; ++ dst->ramps[j].target = dst->ramps[i].target; ++ dst->ramps[j].end = dst->ramps[i].end; ++ } ++ ++ return dst; ++} ++ ++bool pa_cvolume_ramp_active(pa_cvolume_ramp_int *ramp) { ++ int i; ++ ++ for (i = 0; i < ramp->channels; i++) { ++ if (ramp->ramps[i].left > 0) ++ return true; ++ } ++ ++ return false; ++} ++ ++bool pa_cvolume_ramp_target_active(pa_cvolume_ramp_int *ramp) { ++ int i; ++ ++ for (i = 0; i < ramp->channels; i++) { ++ if (ramp->ramps[i].target != PA_VOLUME_NORM) ++ return true; ++ } ++ ++ return false; ++} ++ ++pa_cvolume * pa_cvolume_ramp_get_targets(pa_cvolume_ramp_int *ramp, pa_cvolume *volume) { ++ int i = 0; ++ ++ volume->channels = ramp->channels; ++ ++ for (i = 0; i < ramp->channels; i++) ++ volume->values[i] = ramp->ramps[i].target; ++ ++ return volume; ++} ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_start_from(pa_cvolume_ramp_int *src, pa_cvolume_ramp_int *dst) { ++ int i; ++ ++ for (i = 0; i < src->channels; i++) { ++ /* if new vols are invalid, copy old ramp i.e. no effect */ ++ if (dst->ramps[i].target == PA_VOLUME_INVALID) ++ dst->ramps[i] = src->ramps[i]; ++ /* if there's some old ramp still left */ ++ else if (src->ramps[i].left > 0) ++ dst->ramps[i].start = src->ramps[i].curr; ++ } ++ ++ return dst; ++} ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_int_init(pa_cvolume_ramp_int *src, pa_volume_t vol, int channels) { ++ int i; ++ float temp; ++ ++ src->channels = channels; ++ ++ for (i = 0; i < channels; i++) { ++ src->ramps[i].type = PA_VOLUME_RAMP_TYPE_LINEAR; ++ src->ramps[i].length = 0; ++ src->ramps[i].left = 0; ++ if (vol == PA_VOLUME_NORM) { ++ src->ramps[i].start = 1.0; ++ src->ramps[i].end = 1.0; ++ src->ramps[i].curr = 1.0; ++ } ++ else if (vol == PA_VOLUME_MUTED) { ++ src->ramps[i].start = 0.0; ++ src->ramps[i].end = 0.0; ++ src->ramps[i].curr = 0.0; ++ } ++ else { ++ temp = vol / (float)0x10000U; ++ src->ramps[i].start = temp * temp * temp; ++ src->ramps[i].end = src->ramps[i].start; ++ src->ramps[i].curr = src->ramps[i].start; ++ } ++ src->ramps[i].target = vol; ++ } ++ ++ return src; ++} +diff --git a/src/pulsecore/mix.h b/src/pulsecore/mix.h +index 8102bcd..0f86b6f 100644 +--- a/src/pulsecore/mix.h ++++ b/src/pulsecore/mix.h +@@ -59,4 +59,31 @@ void pa_volume_memchunk( + const pa_sample_spec *spec, + const pa_cvolume *volume); + ++typedef struct pa_volume_ramp_int_t { ++ pa_volume_ramp_type_t type; ++ long length; ++ long left; ++ float start; ++ float end; ++ float curr; ++ pa_volume_t target; ++} pa_volume_ramp_int_t; ++ ++typedef struct pa_cvolume_ramp_int { ++ uint8_t channels; ++ pa_volume_ramp_int_t ramps[PA_CHANNELS_MAX]; ++} pa_cvolume_ramp_int; ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_convert(const pa_cvolume_ramp *src, pa_cvolume_ramp_int *dst, int sample_rate); ++bool pa_cvolume_ramp_active(pa_cvolume_ramp_int *ramp); ++bool pa_cvolume_ramp_target_active(pa_cvolume_ramp_int *ramp); ++pa_cvolume_ramp_int* pa_cvolume_ramp_start_from(pa_cvolume_ramp_int *src, pa_cvolume_ramp_int *dst); ++pa_cvolume_ramp_int* pa_cvolume_ramp_int_init(pa_cvolume_ramp_int *src, pa_volume_t vol, int channels); ++pa_cvolume * pa_cvolume_ramp_get_targets(pa_cvolume_ramp_int *ramp, pa_cvolume *volume); ++ ++void pa_volume_ramp_memchunk( ++ pa_memchunk *c, ++ const pa_sample_spec *spec, ++ pa_cvolume_ramp_int *ramp); ++ + #endif diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch new file mode 100644 index 00000000..eb485ca7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch @@ -0,0 +1,189 @@ +From e4469df7c69316b49cad93dd288badc98fa1cad5 Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:17 +0900 +Subject: [PATCH 3/6] volume ramp: adding volume ramping to sink-input + +The original patch is + - https://review.tizen.org/git/?p=platform/upstream/pulseaudio.git;a=commit;h=98042248fd67ce0ab3807c5c472c0d5d8b0f99d3 + - by Jaska Uimonen helsinki.fi> + +Signed-off-by: Sangchul Lee +--- + src/pulsecore/sink-input.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ + src/pulsecore/sink-input.h | 11 ++++++++- + 2 files changed, 71 insertions(+), 1 deletion(-) + +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index 8ec63b5..cc8953f 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -526,6 +526,11 @@ int pa_sink_input_new( + reset_callbacks(i); + i->userdata = NULL; + ++ if (data->flags & PA_SINK_INPUT_START_RAMP_MUTED) ++ pa_cvolume_ramp_int_init(&i->ramp, PA_VOLUME_MUTED, data->sample_spec.channels); ++ else ++ pa_cvolume_ramp_int_init(&i->ramp, PA_VOLUME_NORM, data->sample_spec.channels); ++ + i->thread_info.state = i->state; + i->thread_info.attached = false; + pa_atomic_store(&i->thread_info.drained, 1); +@@ -542,6 +547,8 @@ int pa_sink_input_new( + i->thread_info.playing_for = 0; + i->thread_info.direct_outputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); + ++ i->thread_info.ramp = i->ramp; ++ + pa_assert_se(pa_idxset_put(core->sink_inputs, i, &i->index) == 0); + pa_assert_se(pa_idxset_put(i->sink->inputs, pa_sink_input_ref(i), NULL) == 0); + +@@ -923,6 +930,8 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + while (tchunk.length > 0) { + pa_memchunk wchunk; + bool nvfs = need_volume_factor_sink; ++ pa_cvolume target; ++ pa_bool_t tmp; + + wchunk = tchunk; + pa_memblock_ref(wchunk.memblock); +@@ -959,6 +968,16 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &i->volume_factor_sink); + } + ++ /* check for possible volume ramp */ ++ if (pa_cvolume_ramp_active(&i->thread_info.ramp)) { ++ pa_memchunk_make_writable(&wchunk, 0); ++ pa_volume_ramp_memchunk(&wchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); ++ } else if ((tmp = pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { ++ pa_memchunk_make_writable(&wchunk, 0); ++ pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); ++ pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &target); ++ } ++ + pa_memblockq_push_align(i->thread_info.render_memblockq, &wchunk); + } else { + pa_memchunk rchunk; +@@ -975,6 +994,16 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink); + } + ++ /* check for possible volume ramp */ ++ if (pa_cvolume_ramp_active(&(i->thread_info.ramp))) { ++ pa_memchunk_make_writable(&rchunk, 0); ++ pa_volume_ramp_memchunk(&rchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); ++ } else if (pa_cvolume_ramp_target_active(&(i->thread_info.ramp))) { ++ pa_memchunk_make_writable(&rchunk, 0); ++ pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); ++ pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &target); ++ } ++ + pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk); + pa_memblock_unref(rchunk.memblock); + } +@@ -1339,6 +1368,31 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { + return 0; + } + ++/* Called from main thread */ ++void pa_sink_input_set_volume_ramp( ++ pa_sink_input *i, ++ const pa_cvolume_ramp *ramp, ++ pa_bool_t send_msg, ++ pa_bool_t save) { ++ ++ pa_sink_input_assert_ref(i); ++ pa_assert_ctl_context(); ++ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); ++ pa_assert(ramp); ++ ++ pa_cvolume_ramp_convert(ramp, &i->ramp, i->sample_spec.rate); ++ ++ pa_log_debug("setting volume ramp with target vol:%d and length:%ld", ++ i->ramp.ramps[0].target, ++ i->ramp.ramps[0].length); ++ ++ ++ /* This tells the sink that volume ramp changed */ ++ if (send_msg) ++ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, ++ NULL, 0, NULL) == 0); ++} ++ + /* Called from main context */ + static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v) { + pa_sink_input_assert_ref(i); +@@ -1932,6 +1986,13 @@ int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t + } + return 0; + ++ case PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP: ++ /* we have ongoing ramp where we take current start values */ ++ pa_cvolume_ramp_start_from(&i->thread_info.ramp, &i->ramp); ++ i->thread_info.ramp = i->ramp; ++ pa_sink_input_request_rewind(i, 0, true, false, false); ++ return 0; ++ + case PA_SINK_INPUT_MESSAGE_SET_SOFT_MUTE: + if (i->thread_info.muted != i->muted) { + i->thread_info.muted = i->muted; +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 86deab2..6e1b211 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + typedef enum pa_sink_input_state { + PA_SINK_INPUT_INIT, /*< The stream is not active yet, because pa_sink_input_put() has not been called yet */ +@@ -58,7 +59,8 @@ typedef enum pa_sink_input_flags { + PA_SINK_INPUT_DONT_INHIBIT_AUTO_SUSPEND = 256, + PA_SINK_INPUT_NO_CREATE_ON_SUSPEND = 512, + PA_SINK_INPUT_KILL_ON_SUSPEND = 1024, +- PA_SINK_INPUT_PASSTHROUGH = 2048 ++ PA_SINK_INPUT_PASSTHROUGH = 2048, ++ PA_SINK_INPUT_START_RAMP_MUTED = 4096, + } pa_sink_input_flags_t; + + struct pa_sink_input { +@@ -121,6 +123,9 @@ struct pa_sink_input { + * this.*/ + bool save_sink:1, save_volume:1, save_muted:1; + ++ /* for volume ramps */ ++ pa_cvolume_ramp_int ramp; ++ + pa_resample_method_t requested_resample_method, actual_resample_method; + + /* Returns the chunk of audio data and drops it from the +@@ -249,6 +254,8 @@ struct pa_sink_input { + pa_usec_t requested_sink_latency; + + pa_hashmap *direct_outputs; ++ ++ pa_cvolume_ramp_int ramp; + } thread_info; + + void *userdata; +@@ -265,6 +272,7 @@ enum { + PA_SINK_INPUT_MESSAGE_SET_STATE, + PA_SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY, + PA_SINK_INPUT_MESSAGE_GET_REQUESTED_LATENCY, ++ PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, + PA_SINK_INPUT_MESSAGE_MAX + }; + +@@ -370,6 +378,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s + void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); ++void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, pa_bool_t send_msg, pa_bool_t save); + + void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); + +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch new file mode 100644 index 00000000..64d7b141 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch @@ -0,0 +1,62 @@ +From 49d8943b151a73be3dd726561a720c0f4bfdccac Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:18 +0900 +Subject: [PATCH 4/6] sink-input: Code cleanup regarding volume ramping + +Remove unused parameter of pa_sink_input_set_volume_ramp(). +Use bool instead of pa_bool_t. + +Signed-off-by: Sangchul Lee +--- + src/pulsecore/sink-input.c | 7 ++----- + src/pulsecore/sink-input.h | 2 +- + 2 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index cc8953f..e1968e0 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -931,7 +931,6 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + pa_memchunk wchunk; + bool nvfs = need_volume_factor_sink; + pa_cvolume target; +- pa_bool_t tmp; + + wchunk = tchunk; + pa_memblock_ref(wchunk.memblock); +@@ -972,7 +971,7 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + if (pa_cvolume_ramp_active(&i->thread_info.ramp)) { + pa_memchunk_make_writable(&wchunk, 0); + pa_volume_ramp_memchunk(&wchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); +- } else if ((tmp = pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { ++ } else if ((pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { + pa_memchunk_make_writable(&wchunk, 0); + pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); + pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &target); +@@ -1372,9 +1371,7 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { + void pa_sink_input_set_volume_ramp( + pa_sink_input *i, + const pa_cvolume_ramp *ramp, +- pa_bool_t send_msg, +- pa_bool_t save) { +- ++ bool send_msg) { + pa_sink_input_assert_ref(i); + pa_assert_ctl_context(); + pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 6e1b211..92f61c3 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -378,7 +378,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s + void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); +-void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, pa_bool_t send_msg, pa_bool_t save); ++void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); + + void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); + +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch new file mode 100644 index 00000000..e371b7ec --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch @@ -0,0 +1,299 @@ +From a98e78ccc4f12d6efad2832a09202651e2a8b6cd Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:19 +0900 +Subject: [PATCH 5/6] sink-input, volume: Add support for volume ramp factor + +Previously, using pa_sink_input_set_volume_ramp() is hard to manage +if there are several callers. These new volume ramp factor APIs make it +easy for caller to use and to set more than one volume ramp factor. +New volume ramp factor will be applied by the multiplication of the other +ramp factors that have been already set. + +APIs are added as below. + - pa_sink_input_add_volume_ramp_factor() + - pa_sink_input_remove_volume_ramp_factor() + - pa_cvolume_ramp_compatible() + - pa_sw_cvolume_ramp_multiply() + - pa_cvolume_ramp_valid() + +Signed-off-by: Sangchul Lee +--- + src/map-file | 3 ++ + src/pulse/volume.c | 44 ++++++++++++++++++ + src/pulse/volume.h | 9 ++++ + src/pulsecore/sink-input.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ + src/pulsecore/sink-input.h | 5 +++ + 5 files changed, 169 insertions(+) + +diff --git a/src/map-file b/src/map-file +index ef9b57d..7577c14 100644 +--- a/src/map-file ++++ b/src/map-file +@@ -142,6 +142,8 @@ pa_cvolume_ramp_equal; + pa_cvolume_ramp_init; + pa_cvolume_ramp_set; + pa_cvolume_ramp_channel_ramp_set; ++pa_cvolume_ramp_compatible; ++pa_cvolume_ramp_valid; + pa_cvolume_remap; + pa_cvolume_scale; + pa_cvolume_scale_mask; +@@ -344,6 +346,7 @@ pa_sw_cvolume_divide_scalar; + pa_sw_cvolume_multiply; + pa_sw_cvolume_multiply_scalar; + pa_sw_cvolume_snprint_dB; ++pa_sw_cvolume_ramp_multiply; + pa_sw_volume_divide; + pa_sw_volume_from_dB; + pa_sw_volume_from_linear; +diff --git a/src/pulse/volume.c b/src/pulse/volume.c +index 85072c1..8d99150 100644 +--- a/src/pulse/volume.c ++++ b/src/pulse/volume.c +@@ -1049,3 +1049,47 @@ pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigne + + return ramp; + } ++ ++int pa_cvolume_ramp_compatible(const pa_cvolume_ramp *ramp, const pa_sample_spec *ss) { ++ ++ pa_assert(ramp); ++ pa_assert(ss); ++ ++ pa_return_val_if_fail(pa_cvolume_ramp_valid(ramp), 0); ++ pa_return_val_if_fail(pa_sample_spec_valid(ss), 0); ++ ++ return ramp->channels == ss->channels; ++} ++ ++pa_cvolume_ramp *pa_sw_cvolume_ramp_multiply(pa_cvolume_ramp *dest, const pa_cvolume_ramp *a, const pa_cvolume_ramp *b) { ++ unsigned i; ++ ++ pa_assert(dest); ++ pa_assert(a); ++ pa_assert(b); ++ ++ pa_return_val_if_fail(pa_cvolume_ramp_valid(a), NULL); ++ pa_return_val_if_fail(pa_cvolume_ramp_valid(b), NULL); ++ ++ for (i = 0; i < a->channels && i < b->channels; i++) ++ dest->ramps[i].target = pa_sw_volume_multiply(a->ramps[i].target, b->ramps[i].target); ++ ++ dest->channels = (uint8_t) i; ++ ++ return dest; ++} ++ ++int pa_cvolume_ramp_valid(const pa_cvolume_ramp *ramp) { ++ unsigned c; ++ ++ pa_assert(ramp); ++ ++ if (!pa_channels_valid(ramp->channels)) ++ return 0; ++ ++ for (c = 0; c < ramp->channels; c++) ++ if (!PA_VOLUME_IS_VALID(ramp->ramps[c].target)) ++ return 0; ++ ++ return 1; ++} +diff --git a/src/pulse/volume.h b/src/pulse/volume.h +index 2ae3451..65fcb08 100644 +--- a/src/pulse/volume.h ++++ b/src/pulse/volume.h +@@ -458,12 +458,21 @@ int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); + /** Init volume ramp struct */ + pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp); + ++/** Set the volume ramp of the first n channels to PA_VOLUME_NORM */ ++#define pa_cvolume_ramp_reset(a, n, t, l) pa_cvolume_ramp_set((a), (n), (t), (l), PA_VOLUME_NORM) ++ + /** Set first n channels of ramp struct to certain value */ + pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); + + /** Set individual channel in the channel struct */ + pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); + ++int pa_cvolume_ramp_compatible(const pa_cvolume_ramp *ramp, const pa_sample_spec *ss); ++ ++int pa_cvolume_ramp_valid(const pa_cvolume_ramp *ramp); ++ ++pa_cvolume_ramp *pa_sw_cvolume_ramp_multiply(pa_cvolume_ramp *dest, const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); ++ + PA_C_DECL_END + + #endif +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index e1968e0..6f89aa1 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -53,6 +53,11 @@ struct volume_factor_entry { + pa_cvolume volume; + }; + ++struct volume_ramp_factor_entry { ++ char *key; ++ pa_cvolume_ramp ramp; ++}; ++ + static struct volume_factor_entry *volume_factor_entry_new(const char *key, const pa_cvolume *volume) { + struct volume_factor_entry *entry; + +@@ -83,6 +88,37 @@ static void volume_factor_from_hashmap(pa_cvolume *v, pa_hashmap *items, uint8_t + pa_sw_cvolume_multiply(v, v, &entry->volume); + } + ++static struct volume_ramp_factor_entry *volume_ramp_factor_entry_new(const char *key, const pa_cvolume_ramp *ramp) { ++ struct volume_ramp_factor_entry *entry; ++ ++ pa_assert(key); ++ pa_assert(ramp); ++ ++ entry = pa_xnew(struct volume_ramp_factor_entry, 1); ++ entry->key = pa_xstrdup(key); ++ ++ entry->ramp = *ramp; ++ ++ return entry; ++} ++ ++static void volume_ramp_factor_entry_free(struct volume_ramp_factor_entry *ramp_entry) { ++ pa_assert(ramp_entry); ++ ++ pa_xfree(ramp_entry->key); ++ pa_xfree(ramp_entry); ++} ++ ++static void volume_ramp_factor_from_hashmap(pa_cvolume_ramp *r, pa_hashmap *items, uint8_t channels, pa_volume_ramp_type_t type, long length) { ++ struct volume_ramp_factor_entry *entry; ++ void *state = NULL; ++ ++ pa_cvolume_ramp_reset(r, channels, type, length); ++ PA_HASHMAP_FOREACH(entry, items, state) ++ pa_sw_cvolume_ramp_multiply(r, r, &entry->ramp); ++ ++} ++ + static void sink_input_free(pa_object *o); + static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v); + +@@ -500,6 +536,8 @@ int pa_sink_input_new( + i->volume_factor_sink_items = data->volume_factor_sink_items; + data->volume_factor_sink_items = NULL; + volume_factor_from_hashmap(&i->volume_factor_sink, i->volume_factor_sink_items, i->sink->sample_spec.channels); ++ i->ramp_factor_items = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, ++ (pa_free_cb_t) volume_ramp_factor_entry_free); + + i->real_ratio = i->reference_ratio = data->volume; + pa_cvolume_reset(&i->soft_volume, i->sample_spec.channels); +@@ -764,6 +802,9 @@ static void sink_input_free(pa_object *o) { + if (i->volume_factor_sink_items) + pa_hashmap_free(i->volume_factor_sink_items); + ++ if (i->ramp_factor_items) ++ pa_hashmap_free(i->ramp_factor_items); ++ + pa_xfree(i->driver); + pa_xfree(i); + } +@@ -1367,6 +1408,73 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { + return 0; + } + ++void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg) { ++ struct volume_ramp_factor_entry *r; ++ ++ pa_sink_input_assert_ref(i); ++ pa_assert_ctl_context(); ++ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); ++ pa_assert(ramp_factor); ++ pa_assert(key); ++ pa_assert(pa_cvolume_ramp_valid(ramp_factor)); ++ pa_assert(ramp_factor->channels == 1 || pa_cvolume_ramp_compatible(ramp_factor, &i->sample_spec)); ++ ++ r = volume_ramp_factor_entry_new(key, ramp_factor); ++ if (!pa_cvolume_ramp_compatible(ramp_factor, &i->sample_spec)) ++ pa_cvolume_ramp_set(&r->ramp, i->sample_spec.channels, ramp_factor->ramps[0].type, ramp_factor->ramps[0].length, ramp_factor->ramps[0].target); ++ ++ pa_assert_se(pa_hashmap_put(i->ramp_factor_items, r->key, r) >= 0); ++ if (pa_hashmap_size(i->ramp_factor_items) == 1) ++ pa_cvolume_ramp_set(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length, r->ramp.ramps[0].target); ++ else ++ pa_sw_cvolume_ramp_multiply(&i->ramp_factor, &i->ramp_factor, &r->ramp); ++ ++ pa_cvolume_ramp_convert(&i->ramp_factor, &i->ramp, i->sample_spec.rate); ++ ++ if (send_msg) ++ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, NULL, 0, NULL) == 0); ++ ++ return 0; ++} ++ ++/* Returns 0 if an entry was removed and -1 if no entry for the given key was ++ * found. */ ++int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg) { ++ struct volume_ramp_factor_entry *r; ++ ++ pa_sink_input_assert_ref(i); ++ pa_assert(key); ++ pa_assert_ctl_context(); ++ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); ++ ++ r = pa_hashmap_remove(i->ramp_factor_items, key); ++ if (!r) ++ return -1; ++ ++ switch (pa_hashmap_size(i->ramp_factor_items)) { ++ case 0: ++ pa_cvolume_ramp_reset(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length); ++ break; ++ case 1: { ++ struct volume_ramp_factor_entry *rf; ++ rf = pa_hashmap_first(i->ramp_factor_items); ++ pa_cvolume_ramp_set(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length, rf->ramp.ramps[0].target); ++ break; ++ } ++ default: ++ volume_ramp_factor_from_hashmap(&i->ramp_factor, i->ramp_factor_items, i->ramp_factor.channels, i->ramp_factor.ramps[0].type, i->ramp_factor.ramps[0].length); ++ } ++ ++ volume_ramp_factor_entry_free(r); ++ ++ pa_cvolume_ramp_convert(&i->ramp_factor, &i->ramp, i->sample_spec.rate); ++ ++ if (send_msg) ++ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, NULL, 0, NULL) == 0); ++ ++ return 0; ++} ++ + /* Called from main thread */ + void pa_sink_input_set_volume_ramp( + pa_sink_input *i, +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 92f61c3..5430d53 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -113,6 +113,9 @@ struct pa_sink_input { + pa_cvolume volume_factor_sink; /* A second volume factor in format of the sink this stream is connected to. */ + pa_hashmap *volume_factor_sink_items; + ++ pa_cvolume_ramp ramp_factor; ++ pa_hashmap *ramp_factor_items; ++ + bool volume_writable:1; + + bool muted:1; +@@ -379,6 +382,8 @@ void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); + void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); ++void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg); ++int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg); + + void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); + +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch new file mode 100644 index 00000000..50110bd1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch @@ -0,0 +1,63 @@ +From ac9a99505fd768b66dd92e9091e80b576cabc00d Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:20 +0900 +Subject: [PATCH 6/6] sink-input: Remove pa_sink_input_set_volume_ramp() + +Please use pa_sink_input_add_volume_ramp_factor() or +pa_sink_input_remove_volume_ramp_factor() instead of it. + +Signed-off-by: Sangchul Lee +--- + src/pulsecore/sink-input.c | 23 ----------------------- + src/pulsecore/sink-input.h | 1 - + 2 files changed, 24 deletions(-) + +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index 6f89aa1..4c7c568 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -1475,29 +1475,6 @@ int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, b + return 0; + } + +-/* Called from main thread */ +-void pa_sink_input_set_volume_ramp( +- pa_sink_input *i, +- const pa_cvolume_ramp *ramp, +- bool send_msg) { +- pa_sink_input_assert_ref(i); +- pa_assert_ctl_context(); +- pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); +- pa_assert(ramp); +- +- pa_cvolume_ramp_convert(ramp, &i->ramp, i->sample_spec.rate); +- +- pa_log_debug("setting volume ramp with target vol:%d and length:%ld", +- i->ramp.ramps[0].target, +- i->ramp.ramps[0].length); +- +- +- /* This tells the sink that volume ramp changed */ +- if (send_msg) +- pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, +- NULL, 0, NULL) == 0); +-} +- + /* Called from main context */ + static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v) { + pa_sink_input_assert_ref(i); +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 5430d53..5fef3d5 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -381,7 +381,6 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s + void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); +-void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); + void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg); + int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg); + +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch new file mode 100644 index 00000000..85b1ae03 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch @@ -0,0 +1,11 @@ +--- pulseaudio-9.0/src/daemon/default.pa.in.orig 2017-05-17 17:26:20.415369638 +0000 ++++ pulseaudio-9.0/src/daemon/default.pa.in 2017-05-17 17:26:49.995316383 +0000 +@@ -82,7 +82,7 @@ + .endif + + .ifexists module-bluetooth-discover@PA_SOEXT@ +-load-module module-bluetooth-discover ++load-module module-bluetooth-discover headset=ofono + .endif + ])dnl + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend new file mode 100644 index 00000000..6d7347d9 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -0,0 +1,29 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +inherit systemd + +do_install_append() { + # Install pulseaudio systemd service + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -m 644 -p -D ${WORKDIR}/build/src/pulseaudio.service ${D}${systemd_user_unitdir}/pulseaudio.service + install -m 644 -p -D ${WORKDIR}/pulseaudio-${PV}/src/daemon/systemd/user/pulseaudio.socket ${D}${systemd_user_unitdir}/pulseaudio.socket + + # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb) + # because it does not support systemd's user mode. + install -d ${D}${systemd_user_unitdir}/sockets.target.wants/ + ln -sf ${systemd_user_unitdir}/pulseaudio.socket ${D}${systemd_user_unitdir}/sockets.target.wants/ + + install -d ${D}${systemd_user_unitdir}/default.target.wants/ + ln -sf ${systemd_user_unitdir}/pulseaudio.service ${D}${systemd_user_unitdir}/default.target.wants/ + fi + mkdir -p ${D}/${bindir} + install -m 755 -p -D ${WORKDIR}/build/src/.libs/pacat ${D}/${bindir}/ +} + +FILES_${PN}-server += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/pulseaudio.socket', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/sockets.target.wants/pulseaudio.socket', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/pulseaudio.service', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/default.target.wants/pulseaudio.service', '', d)} \ +" + diff --git a/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend new file mode 100644 index 00000000..74610040 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend @@ -0,0 +1,15 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}-${PV}:" + +SRC_URI += " \ + file://0001-install-files-for-a-module-development.patch \ + file://0002-volume-ramp-additions-to-the-low-level-infra.patch \ + file://0003-volume-ramp-adding-volume-ramping-to-sink-input.patch \ + file://0004-sink-input-Code-cleanup-regarding-volume-ramping.patch \ + file://0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch \ + file://0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch;apply=no \ + file://enable-ofono-hfp-backend.patch \ +" + +PACKAGES =+ " pulseaudio-module-dev" + +FILES_pulseaudio-module-dev = "${includedir}/pulsemodule/* ${libdir}/pkgconfig/pulseaudio-module-devel.pc" diff --git a/meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/files/org.freedesktop.GeoClue2.Client.conf b/meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/files/org.freedesktop.GeoClue2.Client.conf new file mode 100644 index 00000000..a7486d05 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/files/org.freedesktop.GeoClue2.Client.conf @@ -0,0 +1,8 @@ + + + + + + diff --git a/meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/geoclue_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/geoclue_%.bbappend new file mode 100644 index 00000000..40a3b46a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-navigation/geoclue/geoclue_%.bbappend @@ -0,0 +1,11 @@ +inherit gobject-introspection + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append = "file://org.freedesktop.GeoClue2.Client.conf" + +PACKAGECONFIG = "nmea lib" + +do_install_append() { + install -d ${D}/etc/dbus-1/system.d + install -m 0644 ${WORKDIR}/org.freedesktop.GeoClue2.Client.conf ${D}/etc/dbus-1/system.d/org.freedesktop.GeoClue2.Client.conf +} diff --git a/meta-agl/meta-agl-profile-core/recipes-navigation/gpsd/gpsd_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-navigation/gpsd/gpsd_%.bbappend new file mode 100644 index 00000000..da434e08 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-navigation/gpsd/gpsd_%.bbappend @@ -0,0 +1,16 @@ +SYSTEMD_SERVICE_${PN} += " gpsdctl@.service" + +RPROVIDES_${PN}-conf += "virtual/gpsd-conf" + +do_install_append() { + # use the systemd compatible gpsd.rules + install -d ${D}/${sysconfdir}/udev/rules.d + install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d/60-gpsd.rules + + #support for systemd + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/systemd/gpsdctl@.service ${D}${systemd_unitdir}/system + + #autoprobe usb gps devices + echo 'USBAUTO="true"' >> ${D}${sysconfdir}/default/gpsd.default +} diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.bb b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.bb new file mode 100644 index 00000000..84cdbcf3 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.bb @@ -0,0 +1,9 @@ +SUMMARY = "An AGL small image just capable of allowing a device to boot." + +require agl-image-boot.inc + +LICENSE = "MIT" + +IMAGE_INSTALL_append = "\ + packagegroup-agl-image-boot \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.inc b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.inc new file mode 100644 index 00000000..82539397 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-boot.inc @@ -0,0 +1,10 @@ +IMAGE_LINGUAS = " " + +inherit core-image + +IMAGE_INSTALL = "${CORE_IMAGE_EXTRA_INSTALL}" + +IMAGE_ROOTFS_SIZE ?= "8192" + +# Allow extra IMAGE_FSTYPES to be added by boards configs +IMAGE_FSTYPES += "${AGL_EXTRA_IMAGE_FSTYPES}" diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-ivi-crosssdk.bb b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-ivi-crosssdk.bb new file mode 100644 index 00000000..65529877 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-ivi-crosssdk.bb @@ -0,0 +1,2 @@ +# just for backward compatibility +require agl-image-minimal-crosssdk.bb diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-crosssdk.bb b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-crosssdk.bb new file mode 100755 index 00000000..27c1ee6d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-crosssdk.bb @@ -0,0 +1,35 @@ +SUMMARY = "Cross SDK of Full AGL Distribution for core profile" + +DESCRIPTION = "SDK image for full AGL Distribution for IVI profile. \ +It includes the full meta-toolchain, plus developement headers and libraries \ +to form a standalone cross SDK." + +require agl-image-minimal.bb + +LICENSE = "MIT" + +IMAGE_FEATURES_append = " dev-pkgs" +IMAGE_INSTALL_append = " kernel-dev kernel-devsrc" + +# required dependencies for app and test builds +# also in the minimal image (SPEC-1678) +TOOLCHAIN_HOST_TASK += " \ + nativesdk-lua \ + " + +# required dependencies for app and test builds +# also in the minimal image (SPEC-1678) +TOOLCHAIN_TARGET_TASK += " \ + lua-dev \ + lua-staticdev \ + libafb-helpers-staticdev \ + libappcontroller-staticdev \ + " + +inherit populate_sdk + +# Task do_populate_sdk and do_rootfs can't be exec simultaneously. +# Both exec "createrepo" on the same directory, and so one of them +# can failed (randomly). +addtask do_populate_sdk after do_rootfs + diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-qa.bb b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-qa.bb new file mode 100644 index 00000000..b162f290 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal-qa.bb @@ -0,0 +1,12 @@ +SUMMARY = "An AGL small image just capable of allowing a device to boot and run tests." + +DESCRIPTION = "A minimal set of AGL Distribution. This image also has additional \ +packages (e.g. commandline tools) for Quality Assurance(QA)." + +require agl-image-minimal.bb + +LICENSE = "MIT" + +IMAGE_INSTALL_append = " \ + packagegroup-ivi-common-test \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.bb b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.bb new file mode 100644 index 00000000..1fd213d0 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.bb @@ -0,0 +1,9 @@ +SUMMARY = "An AGL small image just capable of allowing a device to boot." + +require agl-image-minimal.inc + +LICENSE = "MIT" + +IMAGE_INSTALL_append = "\ + packagegroup-agl-image-minimal \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.inc b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.inc new file mode 100644 index 00000000..82539397 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/images/agl-image-minimal.inc @@ -0,0 +1,10 @@ +IMAGE_LINGUAS = " " + +inherit core-image + +IMAGE_INSTALL = "${CORE_IMAGE_EXTRA_INSTALL}" + +IMAGE_ROOTFS_SIZE ?= "8192" + +# Allow extra IMAGE_FSTYPES to be added by boards configs +IMAGE_FSTYPES += "${AGL_EXTRA_IMAGE_FSTYPES}" diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb new file mode 100644 index 00000000..690dc9e1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb @@ -0,0 +1,52 @@ +# +# Copyright (C) 2007 OpenedHand Ltd. +# +# derived from oe-core: meta/recipes-core/packagegroups/packagegroup-core-boot.bb + +SUMMARY = "Minimal boot requirements" +DESCRIPTION = "The minimal set of packages required to boot the system" +LICENSE = "MIT" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit packagegroup + +# +# Set by the machine configuration with packages essential for device bootup +# +MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= "" +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" + +# Distro can override the following VIRTUAL-RUNTIME providers: +VIRTUAL-RUNTIME_dev_manager ?= "udev" +VIRTUAL-RUNTIME_login_manager ?= "busybox" +VIRTUAL-RUNTIME_init_manager ?= "sysvinit" +VIRTUAL-RUNTIME_initscripts ?= "initscripts" +VIRTUAL-RUNTIME_keymaps ?= "keymaps" + +SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \ + modutils-initscripts \ + init-ifupdown \ + ${VIRTUAL-RUNTIME_initscripts} \ + " + +RDEPENDS_${PN} = "\ + base-files \ + base-passwd \ + busybox \ + distro-build-manifest \ + rng-tools \ + run-agl-postinsts \ + ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \ + netbase \ + ${VIRTUAL-RUNTIME_login_manager} \ + ${VIRTUAL-RUNTIME_init_manager} \ + ${VIRTUAL-RUNTIME_dev_manager} \ + ${VIRTUAL-RUNTIME_update-alternatives} \ + ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}" + +RRECOMMENDS_${PN} = "\ + tzdata \ + ${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}" + diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb new file mode 100644 index 00000000..03f7e40c --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "The minimal set of packages for Connectivity Subsystem" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-core-connectivity \ + " + +ALLOW_EMPTY_${PN} = "1" + +PKGGROUP_ZEROCONF = "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'packagegroup-base-zeroconf', '', d)}" + +RDEPENDS_${PN} += "\ + bluez5-obex \ + dhcp-server \ + ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','connman','connman connman-client connman-tests connman-tools connman-ncurses','',d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "3g", "libqmi", "", d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '${PKGGROUP_ZEROCONF}', '', d)} \ + neard \ + neardal-tools \ + rtl-sdr \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-navigation.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-navigation.bb new file mode 100644 index 00000000..473bac75 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-navigation.bb @@ -0,0 +1,17 @@ +SUMMARY = "The software for application framework of AGL IVI profile" +DESCRIPTION = "A set of packages belong to AGL application framework which required by \ +Navigation and Location-Based Services Subsystem" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-core-navigation \ + " + +RDEPENDS_${PN} += "\ + gpsd \ + virtual/gpsd-conf \ + geoclue \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb new file mode 100644 index 00000000..aef73283 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb @@ -0,0 +1,14 @@ +SUMMARY = "The packages of middlewares for AGL IVI profile" +DESCRIPTION = "The set of packages required by Operating System and Common libraries Subsystem" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-core-os-commonlibs \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb new file mode 100644 index 00000000..0ae5c77a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb @@ -0,0 +1,14 @@ +SUMMARY = "The packages of middlewares for AGL IVI profile" +DESCRIPTION = "The set of packages required by Operating System and Common libraries Subsystem" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-core-security \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-services.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-services.bb new file mode 100644 index 00000000..82cfb3a1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-core-services.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "The minimal set of packages for Connectivity Subsystem" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-core-services \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ +agl-service-bluetooth \ +agl-service-bluetooth-map \ +agl-service-bluetooth-pbap \ +agl-service-can-low-level \ +agl-service-data-persistence \ +agl-service-geoclue \ +agl-service-geofence \ +agl-service-gps \ +agl-service-identity-agent \ +agl-service-iiodevices \ +agl-service-mediascanner \ +agl-service-navigation \ +agl-service-network \ +agl-service-nfc \ +agl-service-signal-composer \ +agl-service-steering-wheel \ +agl-service-unicens \ +agl-service-weather \ +agl-service-platform-info \ +high-level-viwi-service \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb new file mode 100644 index 00000000..afa04e7a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "The minimal set of packages required by AGL" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-image-boot \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-core-boot \ + packagegroup-machine-base \ + " + +RDEPENDS_${PN} += "\ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb new file mode 100644 index 00000000..383b1441 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "The minimal set of packages required by AGL" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-image-minimal \ + profile-agl-minimal \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-core-boot \ + packagegroup-machine-base \ + " + + +RDEPENDS_${PN} += "\ + packagegroup-agl-core-connectivity \ + packagegroup-agl-core-navigation \ + packagegroup-agl-core-os-commonlibs \ + packagegroup-agl-core-services \ + packagegroup-agl-core-security \ + " + +RDEPENDS_profile-agl-minimal = "${PN}" diff --git a/meta-agl/meta-agl-profile-core/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/meta-agl/meta-agl-profile-core/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch new file mode 100644 index 00000000..a7db1b3c --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch @@ -0,0 +1,44 @@ +From ed70f0623708b8a6c1f58a5d243d87c5ff45b24d Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Tue, 26 Apr 2016 13:13:01 +0800 +Subject: [PATCH] replace krb5-config with pkg-config + +Upstream-Status: Pending + +Signed-off-by: Roy Li + +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5569a26..56b0380 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -1290,7 +1290,7 @@ AC_ARG_WITH(gssapi, + fi + ]) + +-: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"} ++KRB5CONFIG=`which pkg-config` + + save_CPPFLAGS="$CPPFLAGS" + AC_MSG_CHECKING([if GSS-API support is requested]) +@@ -1301,7 +1301,7 @@ if test x"$want_gss" = xyes; then + if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then + GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi` + elif test -f "$KRB5CONFIG"; then +- GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi` ++ GSSAPI_INCS=`$KRB5CONFIG --cflags mit-krb5-gssapi` + elif test "$GSSAPI_ROOT" != "yes"; then + GSSAPI_INCS="-I$GSSAPI_ROOT/include" + fi +@@ -1394,7 +1394,7 @@ if test x"$want_gss" = xyes; then + elif test -f "$KRB5CONFIG"; then + dnl krb5-config doesn't have --libs-only-L or similar, put everything + dnl into LIBS +- gss_libs=`$KRB5CONFIG --libs gssapi` ++ gss_libs=`$KRB5CONFIG --libs mit-krb5-gssapi` + LIBS="$gss_libs $LIBS" + else + case $host in diff --git a/meta-agl/meta-agl-profile-core/recipes-support/curl/curl_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-support/curl/curl_%.bbappend new file mode 100644 index 00000000..fc24cea1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/curl/curl_%.bbappend @@ -0,0 +1,5 @@ +# Cannot just append to PACKAGECONFIG, as nghttp2's dependencies do not build +# for native/nativesdk, and appending class-target does not work because of +# the weak definition of PACKAGECONFIG in the recipe, so need to copy the +# definition to add nghttp2... +PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib nghttp2" diff --git a/meta-agl/meta-agl-profile-core/recipes-support/curl/curl_7.66.0.bb b/meta-agl/meta-agl-profile-core/recipes-support/curl/curl_7.66.0.bb new file mode 100644 index 00000000..d1975f24 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/curl/curl_7.66.0.bb @@ -0,0 +1,80 @@ +SUMMARY = "Command line tool and library for client-side URL transfers" +HOMEPAGE = "http://curl.haxx.se/" +BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker" +SECTION = "console/network" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=be5d9e1419c4363f4b32037a2d3b7ffa" + +SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ + file://0001-replace-krb5-config-with-pkg-config.patch \ +" + +SRC_URI[md5sum] = "c238aa394e3aa47ca4fcb0491774149f" +SRC_URI[sha256sum] = "6618234e0235c420a21f4cb4c2dd0badde76e6139668739085a70c4e2fe7a141" + +CVE_PRODUCT = "curl libcurl" +inherit autotools pkgconfig binconfig multilib_header + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls libidn proxy threaded-resolver verbose zlib" +PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib" +PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver verbose zlib" + +# 'ares' and 'threaded-resolver' are mutually exclusive +PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares" +PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli" +PACKAGECONFIG[builtinmanual] = "--enable-manual,--disable-manual" +PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," +PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" +PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher," +PACKAGECONFIG[imap] = "--enable-imap,--disable-imap," +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" +PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap," +PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps," +PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2" +PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2" +PACKAGECONFIG[mbedtls] = "--with-mbedtls=${STAGING_DIR_TARGET},--without-mbedtls,mbedtls" +PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2" +PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3," +PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy," +PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump" +PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp," +PACKAGECONFIG[smb] = "--enable-smb,--disable-smb," +PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," +PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" +PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss" +PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," +PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," +PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver" +PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose" +PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" + +EXTRA_OECONF = " \ + --disable-libcurl-option \ + --disable-ntlm-wb \ + --enable-crypto-auth \ + --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ + --without-libmetalink \ + --without-libpsl \ +" + +do_install_append_class-target() { + # cleanup buildpaths from curl-config + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + ${D}${bindir}/curl-config +} + +PACKAGES =+ "lib${BPN}" + +FILES_lib${BPN} = "${libdir}/lib*.so.*" +RRECOMMENDS_lib${BPN} += "ca-certificates" + +FILES_${PN} += "${datadir}/zsh" + +inherit multilib_script +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-agl/meta-agl-profile-core/recipes-support/libmicrohttpd/libmicrohttpd_0.9.63.bb b/meta-agl/meta-agl-profile-core/recipes-support/libmicrohttpd/libmicrohttpd_0.9.63.bb new file mode 100644 index 00000000..ab6f681d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/libmicrohttpd/libmicrohttpd_0.9.63.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "A small C library that is supposed to make it easy to run an HTTP server as part of another application" +HOMEPAGE = "http://www.gnu.org/software/libmicrohttpd/" +LICENSE = "LGPL-2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=9331186f4f80db7da0e724bdd6554ee5" +SECTION = "net" +DEPENDS = "file" + +SRC_URI = "http://ftp.gnu.org/gnu/libmicrohttpd/${BPN}-${PV}.tar.gz" +SRC_URI[md5sum] = "1c10de049608fca46941cbc790e3ab00" +SRC_URI[sha256sum] = "37c36f1be177f0e37ef181a645cd3baac1000bd322a01c2eff70f3cc8c91749c" + +inherit autotools lib_package pkgconfig gettext + +CFLAGS += "-pthread -D_REENTRANT" + +EXTRA_OECONF += "--disable-static --with-gnutls=${STAGING_LIBDIR}/../" + +PACKAGECONFIG ?= "curl https" +PACKAGECONFIG_append_class-target = "\ + ${@bb.utils.filter('DISTRO_FEATURES', 'largefile', d)} \ +" +PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,," +PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl," +PACKAGECONFIG[https] = "--enable-https,--disable-https,libgcrypt gnutls," + +do_compile_append() { + sed -i s:-L${STAGING_LIBDIR}::g libmicrohttpd.pc +} diff --git a/meta-agl/meta-agl-profile-core/recipes-support/libsoup/libsoup-2.4_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-support/libsoup/libsoup-2.4_%.bbappend new file mode 100644 index 00000000..06651fc1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/libsoup/libsoup-2.4_%.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_append_class-native = " --disable-tls-check" diff --git a/meta-agl/meta-agl-profile-core/recipes-support/nghttp2/nghttp2_1.39.1.bb b/meta-agl/meta-agl-profile-core/recipes-support/nghttp2/nghttp2_1.39.1.bb new file mode 100644 index 00000000..6077daf7 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/nghttp2/nghttp2_1.39.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "HTTP/2 C Library and tools" +HOMEPAGE = "https://nghttp2.org/" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=764abdf30b2eadd37ce47dcbce0ea1ec" + ++UPSTREAM_CHECK_URI = "https://github.com/nghttp2/nghttp2/releases" + +SRC_URI = "https://github.com/nghttp2/nghttp2/releases/download/v${PV}/nghttp2-${PV}.tar.xz" +SRC_URI[md5sum] = "02b015cb178c46f27dd87228e33db35f" +SRC_URI[sha256sum] = "679160766401f474731fd60c3aca095f88451e3cc4709b72306e4c34cf981448" + +DEPENDS = "libxml2 openssl zlib jansson cunit c-ares" + +inherit cmake pythonnative python-dir diff --git a/meta-agl/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend b/meta-agl/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend new file mode 100644 index 00000000..8656abf0 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG ?= "jpeg png v4l libv4l gstreamer" diff --git a/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.service b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.service new file mode 100644 index 00000000..64c36e76 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.service @@ -0,0 +1,9 @@ +[Unit] +Description=Automount Disk Manager +After=udisks.service + +[Service] +ExecStart=/usr/libexec/automount.sh + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.sh b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.sh new file mode 100644 index 00000000..23679191 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/automount.sh @@ -0,0 +1,93 @@ +#!/bin/sh + +MOUNT_OPTIONS_DEFAULT="ro,noexec" +MOUNT_OPTIONS_VFAT="umask=0022" +MOUNT_OPTIONS_EXT="" +MOUNT_OPTIONS_NTFS="" +MOUNT_OPTIONS_ISO9660="" + +VERBOSE=false + +# Source a configuration file that can override mount options if exists +[ -f /etc/automount.conf ] && . /etc/automount.conf + +mount_device() { + MOUNT_OPTIONS="" + FSTYPE="$( udevadm info "${1}" "${2}" | awk -v FS== '/ID_FS_TYPE/ {print $2}' )" + DEVNAME="$( udevadm info "${1}" "${2}" | awk -v FS== '/DEVNAME/ {print $2}' )" + case $FSTYPE in + vfat) + MOUNT_OPTIONS="${MOUNT_OPTIONS_VFAT}" + ;; + ext[2-4]) + MOUNT_OPTIONS="${MOUNT_OPTIONS_EXT}" + ;; + ntfs) + MOUNT_OPTIONS="${MOUNT_OPTIONS_NTFS}" + ;; + iso9660) + MOUNT_OPTIONS="${MOUNT_OPTIONS_ISO9660}" + ;; + "") + if $VERBOSE; then + echo "[INFO][${DEVNAME}] Not a partition with a filesystem!" + fi + return + ;; + *) + echo "[WARNING][${DEVNAME}] The filesystem '${FSTYPE}' is not supported!" + return + ;; + esac + + if [ -n "${MOUNT_OPTIONS_DEFAULT}" ]; then + if [ -z "${MOUNT_OPTIONS}" ]; then + MOUNT_OPTIONS="${MOUNT_OPTIONS_DEFAULT}" + else + MOUNT_OPTIONS="${MOUNT_OPTIONS_DEFAULT},${MOUNT_OPTIONS}" + fi + fi + if $VERBOSE; then + echo "[INFO][${DEVNAME}] Mounting a ${FSTYPE}'s filesystem with options: ${MOUNT_OPTIONS}" + fi + + if command -v udisksctl > /dev/null 2>&1; then + if [ -n "${MOUNT_OPTIONS}" ]; then + MOUNT_OPTIONS="-o ${MOUNT_OPTIONS}" + fi + udisksctl mount -t "${FSTYPE}" -b "${DEVNAME}" ${MOUNT_OPTIONS} + elif command -v udisks >/dev/null 2>&1; then + if [ -n "${MOUNT_OPTIONS}" ]; then + MOUNT_OPTIONS="--mount-options ${MOUNT_OPTIONS}" + fi + udisks --mount-fstype "${FSTYPE}" --mount "${DEVNAME}" ${MOUNT_OPTIONS} + else + echo "[ERROR] Unable to find binary for mounting ${DEVNAME}" >&2 + return + fi + if [ "$?" -ne "0" ]; then + echo "[ERROR] Failed to mount the device ${DEVNAME} of type ${FSTYPE} with options ${MOUNT_OPTIONS}" >&2 + fi +} + +# At startup, remove empty directories that may exists +rmdir /media/* > /dev/null 2>&1 + +# Mount already plugged devices +for DEVICE in $( lsblk -dn | cut -d' ' -f1 ); do + REMOVABLE=$( cat "/sys/block/${DEVICE}/removable" ) + if [ "${REMOVABLE}" -eq "1" ]; then + for PART in "/dev/${DEVICE}"*; do + mount_device -n "${PART}" + done + fi +done + +# Wait for plug events and mount devices +stdbuf -oL -- udevadm monitor --udev -s block | +while read -r -- _ _ EVENT DEVPATH _ +do + if [ "${EVENT}" = "add" ]; then + mount_device -p "/sys/${DEVPATH}" + fi +done diff --git a/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/org.freedesktop.UDisks.conf b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/org.freedesktop.UDisks.conf new file mode 100644 index 00000000..0098b94e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/org.freedesktop.UDisks.conf @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/udisks.service b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/udisks.service new file mode 100644 index 00000000..4bd55844 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/udisks/files/udisks.service @@ -0,0 +1,11 @@ +[Unit] +Description=Disk Manager (legacy version) +Documentation=man:udisks(7) + +[Service] +Type=dbus +BusName=org.freedesktop.UDisks +ExecStart=/usr/libexec/udisks-daemon --no-debug + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-profile-core/recipes-support/udisks/udisks_1.0.5.bbappend b/meta-agl/meta-agl-profile-core/recipes-support/udisks/udisks_1.0.5.bbappend new file mode 100644 index 00000000..d55a167a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-support/udisks/udisks_1.0.5.bbappend @@ -0,0 +1,28 @@ +SRC_URI += "file://org.freedesktop.UDisks.conf \ + file://udisks.service \ + file://automount.service \ + file://automount.sh \ + " +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +FILES_${PN} += "${base_libdir}/systemd/system/automount.service \ + ${base_libdir}/systemd/system/udisks.service \ + ${libexecdir}/automount.sh \ + " + +SYSTEMD_AUTO_ENABLE = "enable" +SYSTEMD_SERVICE_${PN} = "udisks.service automount.service" + +do_install_append () { + install -d ${D}${sysconfdir}/dbus-1/system.d + install -m 644 ${WORKDIR}/org.freedesktop.UDisks.conf ${D}${sysconfdir}/dbus-1/system.d/ + + install -d ${D}${base_libdir}/systemd/system + install -m 0644 ${WORKDIR}/udisks.service ${D}${base_libdir}/systemd/system + + install -d ${D}${base_libdir}/systemd/system + install -m 0644 ${WORKDIR}/automount.service ${D}${base_libdir}/systemd/system + + install -d ${D}${libexecdir} + install -m 0755 ${WORKDIR}/automount.sh ${D}${libexecdir}/automount.sh +} diff --git a/meta-agl/meta-agl-profile-core/recipes-test/afb-test/afb-test_git.bb b/meta-agl/meta-agl-profile-core/recipes-test/afb-test/afb-test_git.bb new file mode 100644 index 00000000..15fbb6f1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/afb-test/afb-test_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "Binding embedding test framework to test others binding" +DESCRIPTION = "This make testing binding running with Application Framework binder \ +easier by simply test verb return as well as event reception." +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/app-afb-test" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" +SECTION = "apps" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/app-afb-test;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "3605fd31f04a9198402a687b1a3242835b27cff0" + +DEPENDS += "lua libafb-helpers libappcontroller" +RDEPENDS_${PN} += "lua bash" +RDEPENDS_${PN}-ptest += "af-binder" + +PV = "${AGLVERSION}" +S = "${WORKDIR}/git" + +inherit cmake aglwgt pkgconfig ptest + +do_install_append() { + install -d ${D}${bindir} + install -m 775 ${S}/afm-test.target.sh ${D}${bindir}/afm-test +} + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/afb-test/files/run-ptest b/meta-agl/meta-agl-profile-core/recipes-test/afb-test/files/run-ptest new file mode 100644 index 00000000..883939a8 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/afb-test/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +afm-test /usr/AGL/apps/testwgt/aftest-test.wgt diff --git a/meta-agl/meta-agl-profile-core/recipes-test/aiostress/aiostress_0.22.bb b/meta-agl/meta-agl-profile-core/recipes-test/aiostress/aiostress_0.22.bb new file mode 100644 index 00000000..7803d74e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/aiostress/aiostress_0.22.bb @@ -0,0 +1,24 @@ +SUMMARY = "Async IO testing utility" +DESCRIPTION = "aio-stress will open or create each file on the command line, and start a series of aio to it.\ +aio is done in a rotating loop. first file1 gets 8 requests, then file2, then file3 etc.\ +As each file finishes writing, it is switched to reads io buffers are aligned in case you want to do raw io" +HOMEPAGE = "https://oss.oracle.com/~mason/aio-stress/" +LICENSE = "GPLv2" + +S="${WORKDIR}" + +LIC_FILES_CHKSUM = "file://${S}/aio-stress.c;md5=ccb5d196a3736bbd835d582a4e2329c3" + +SRC_URI = "https://oss.oracle.com/~mason/aio-stress/aio-stress.c" +SRC_URI[md5sum] = "ccb5d196a3736bbd835d582a4e2329c3" +SRC_URI[sha256sum] = "3f4cffcc946fb717fff9d8fe932c7c2ee606efff198408d9fbe16955151445f7" + +do_compile () { + ${CC} -Wall -Wshadow -o aio-stress -lpthread -laio aio-stress.c +} + +do_install () { + install -d ${D}${bindir} + install -m 0755 aio-stress ${D}${bindir} +} + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0001-Makefile.patch b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0001-Makefile.patch new file mode 100644 index 00000000..0ae56cee --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0001-Makefile.patch @@ -0,0 +1,53 @@ +--- a/Makefile.orig 2016-04-01 15:50:20.636358716 +0200 ++++ b/Makefile 2016-04-01 15:51:58.916361191 +0200 +@@ -1,3 +1,9 @@ ++INCDIR = $(SDKROOT)/usr/include ++LIBDIR = $(SDKROOT)/usr/lib ++ ++EXTRA_CFLAGS=-I$(INCDIR) ++EXTRA_LDFLAGS=-Wl,-rpath-link=$(LIBDIR) -L$(LIBDIR) ++ + OBJECTS = bs_main.o \ + bs_vector.o \ + bs_pointmass.o \ +@@ -15,21 +21,21 @@ + bs_profiler.o \ + bs_rubberband.o + +-CC = gcc ++#CC = gcc + + DISTDIR = blobsallad-src + +-CFLAGS = `pkg-config --cflags cairo; sdl-config --cflags` +-LIBS = `pkg-config --libs cairo; sdl-config --libs` -lm -lGL -lGLU ++EXTRA_CFLAGS += -I$(INCDIR)/cairo -I$(INCDIR)/SDL -D_GNU_SOURCE=1 -D_REENTRANT ++EXTRA_LDFLAGS += -lcairo -lSDL -lpthread -lm + + all: $(OBJECTS) +- $(CC) -g -o blobsallad $(OBJECTS) $(LIBS) ++ $(CC) -g -o blobsallad $(OBJECTS) $(EXTRA_LDFLAGS) + + map: +- gcc -o createmap create_testdata.c -Wall -g -lm ++ $(CC) -o createmap create_testdata.c -Wall -g -lm + + octree: +- gcc -o test_octree test_octree.c bs_octree.c bs_list.c bs_vector.c bs_vector_util.c bs_timer.c bs_array.c -Wall -O2 $(LIBS) $(CFLAGS) ++ $(CC) -o test_octree test_octree.c bs_octree.c bs_list.c bs_vector.c bs_vector_util.c bs_timer.c bs_array.c -Wall -O2 $(EXTRA_LDFLAGS) $(EXTRA_CFLAGS) + + GFX_OBJECTS = gfx_main.o \ + bs_gfx.o \ +@@ -41,10 +47,10 @@ + bs_list.o + + gfx: $(GFX_OBJECTS) +- gcc -o gfx_main -Wall -g $(GFX_OBJECTS) $(LIBS) ++ $(CC) -o gfx_main -Wall -g $(GFX_OBJECTS) $(EXTRA_LDFLAGS) + + .c.o: +- $(CC) -g -Wall $(CFLAGS) $ -c $< ++ $(CC) -g -Wall $(EXTRA_CFLAGS) $ -c $< + + clean: + rm -f *.o; rm -f blobsallad; diff --git a/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0002-auto.patch b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0002-auto.patch new file mode 100644 index 00000000..b61da2c1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0002-auto.patch @@ -0,0 +1,95 @@ +--- a/bs_main.c ++++ b/bs_main.c +@@ -11,6 +11,9 @@ + #include "bs_profiler.h" + #include "bs_rubberband.h" + ++static struct timeval beginTime; /* Time of the benchmark start */ ++static int cur_step; /* Current benchmark phase. Used to subsequently increase number of objects each 10 seconds */ ++ + typedef struct bs_main_data_st + { + bs_cairo_sdl_t *pCairoSdl; +@@ -113,7 +116,9 @@ + SDL_Event event; + SDL_UserEvent userevent; + bs_main_data_t *pMainData; +- ++ struct timeval curTime; ++ int hunsec; ++ + pMainData = (bs_main_data_t*) pUserData; + + userevent.type = SDL_USEREVENT; +@@ -121,6 +126,20 @@ + userevent.data1 = NULL; + userevent.data2 = NULL; + ++ gettimeofday(&curTime, NULL); ++ hunsec = curTime.tv_sec - beginTime.tv_sec; ++ ++ /* increase cur_step each 10 seconds */ ++ if (cur_step < hunsec / 10) { ++ printf("%d objects = %.2f fps\n", 1 << (cur_step + 1), pMainData->fps); ++ userevent.code = 2; /* add more objects */ ++ cur_step++; ++ } ++ ++ /* exit if requested number of objects is reached */ ++ if (cur_step == 4) ++ userevent.code = 3; ++ + event.type = SDL_USEREVENT; + event.user = userevent; + +@@ -152,14 +171,19 @@ + pMainData->newTimerInterval = 50; + pMainData->fps = 20.0; + pMainData->running = TRUE; +- ++ ++ cur_step = 0; ++ + bs_profiler_init(); + ++ gettimeofday(&beginTime, NULL); + gettimeofday(&startTime, NULL); + pMainData->lastFrameTimeStamp = startTime.tv_sec * 1000 + startTime.tv_usec / 1000; + + SDL_AddTimer(50, bs_main_sdl_timer_callback, pMainData); + ++ bs_blob_collective_split(pMainData->pCollective); ++ + for(;;) + { + SDL_WaitEvent(&event); +@@ -253,8 +277,7 @@ + break; + + case SDL_USEREVENT: +- if(event.user.code == 1) +- { ++ if (event.user.code == 1) { + gettimeofday(&startTime, NULL); + bs_main_update_simulation(pMainData); + bs_main_redraw(pMainData); +@@ -268,10 +291,15 @@ + usedTime = 50; + } + +- pMainData->newTimerInterval = usedTime; +- } +- break; +- ++ pMainData->newTimerInterval = usedTime; ++ } else if (event.user.code == 2) { ++ int i; ++ for (i = 0; i < (1 << cur_step); i++) ++ bs_blob_collective_split(pMainData->pCollective); ++ } else if (event.user.code == 3) { ++ exit(0); ++ } ++ break; + case SDL_QUIT: + exit(0); + break; diff --git a/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0003-printcleanup.patch b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0003-printcleanup.patch new file mode 100644 index 00000000..630871df --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0003-printcleanup.patch @@ -0,0 +1,11 @@ +--- a/bs_blob_collective.c ++++ b/bs_blob_collective.c +@@ -152,7 +152,7 @@ + + bs_list_unlink_p_cont(pCollective->pBlobs, bs_blob_collective_remove_blob_cb, findData.pMotherBlob); + +- printf("number of blobs: %d\n", bs_list_get_length(pCollective->pBlobs)); ++/* printf("number of blobs: %d\n", bs_list_get_length(pCollective->pBlobs)); */ + } + + typedef struct bs_blob_collective_join_find_smallest_st diff --git a/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0004-bs_main.c.patch b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0004-bs_main.c.patch new file mode 100644 index 00000000..ae15408d --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad/0004-bs_main.c.patch @@ -0,0 +1,15 @@ +--- a/bs_main.c ++++ b/bs_main.c +@@ -165,9 +165,9 @@ + //pMainData->pRubberband = bs_rubberband_create(2.5f, 3.0f); + pMainData->pEnv = bs_env_create(0.0f, 0.0f, 6.0f, 4.0f); + pMainData->pGravity = bs_vector_create(0.0f, 10.0f); +- pMainData->pCairoSdl = bs_cairo_sdl_create(600, 400); +- pMainData->width = 600.0; +- pMainData->height = 400.0; ++ pMainData->pCairoSdl = bs_cairo_sdl_create(1600, 1024); ++ pMainData->width = 1600.0; ++ pMainData->height = 1024.0; + pMainData->newTimerInterval = 50; + pMainData->fps = 20.0; + pMainData->running = TRUE; diff --git a/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad_2006-11-14-23-57.bb b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad_2006-11-14-23-57.bb new file mode 100644 index 00000000..373d4ddc --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/blobsallad/blobsallad_2006-11-14-23-57.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "" +HOMEPAGE = "http://blobsallad.se/" +LICENSE = "CLOSED" +LIC_FILES_CHKSUM = "" + +SRC_URI = " \ + http://blobsallad.se/src/blobsallad-src-${PV}.tar.gz \ + file://0001-Makefile.patch \ + file://0002-auto.patch \ + file://0003-printcleanup.patch \ + file://0004-bs_main.c.patch" + +SRC_URI[md5sum] = "a2e3342cbf0f3a4a9b110af2663bed36" +SRC_URI[sha256sum] = "cd6309df1929d3e6b7bce1dbecc751849aeaafe17c01e05fd2567dc4267faaa2" + +DEPENDS = "cairo virtual/libsdl" + +INSANE_SKIP_${PN} = "ldflags" + +S = "${WORKDIR}/blobsallad-src" + +do_configure () { + # Specify any needed configure commands here + : +} + +do_compile () { + # You will almost certainly need to add additional arguments here + oe_runmake SDKROOT=${STAGING_DIR_HOST} +} + +do_install () { + install -d ${D}${bindir} + install -m 0755 blobsallad ${D}${bindir} +} + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/dung/dung_3.4.25-m2.bb b/meta-agl/meta-agl-profile-core/recipes-test/dung/dung_3.4.25-m2.bb new file mode 100644 index 00000000..28bf858a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/dung/dung_3.4.25-m2.bb @@ -0,0 +1,18 @@ +SUMMARY = "Kernel test scripts" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/qa-test-misc;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "e2472c7b1d061aef8bb05a4d7940fd8159c4a329" + +inherit allarch + +S = "${WORKDIR}/git/${PN}-${PV}" + +do_install () { + for subdir in arch_timer cmt common scifab sdhi.0; do + install -d -m 0755 ${D}/${datadir}/${PN}/$subdir + install -m 0755 -t ${D}/${datadir}/${PN}/$subdir ${S}/$subdir/* + done +} + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/ebizzy/ebizzy_0.3.bb b/meta-agl/meta-agl-profile-core/recipes-test/ebizzy/ebizzy_0.3.bb new file mode 100644 index 00000000..08b0425c --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/ebizzy/ebizzy_0.3.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Benchmark tool that generates a workload resembling common web application server workloads" +HOMEPAGE = "http://ebizzy.sourceforge.net/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a" + +SRC_URI = "http://downloads.sourceforge.net/project/ebizzy/ebizzy/${PV}/ebizzy-${PV}.tar.gz" +SRC_URI[md5sum] = "af038bc506066bb3d28db08aba62bc38" +SRC_URI[sha256sum] = "77286029d6348f3d9b3f04eae1feadb5ad1ad07b9f688f4d9f002960862467f2" + +INSANE_SKIP_${PN} = "ldflags" + +do_compile () { + ${CC} -Wall -Wshadow -lpthread -o ebizzy ebizzy.c +} + +do_install () { + install -d ${D}${bindir} + install -m 0755 ebizzy ${D}${bindir} +} + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/ffsb/ffsb_6.0-rc2.bb b/meta-agl/meta-agl-profile-core/recipes-test/ffsb/ffsb_6.0-rc2.bb new file mode 100644 index 00000000..66db133e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/ffsb/ffsb_6.0-rc2.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Flexible File System Benchmark" +HOMEPAGE = "https://sourceforge.net/projects/ffsb/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fd5d9bcabd8ed5a54a01ce8d183d592a" + +SRC_URI = "http://downloads.sourceforge.net/project/ffsb/ffsb/ffsb-${PV}/ffsb-${PV}.tar.bz2" +SRC_URI[md5sum] = "cabfc1021c2ec6c6b168fefc84210891" +SRC_URI[sha256sum] = "e5867692aae8c9bfbcdc774599022289c4d89c1d90f4dd7101fb9865ac773c71" + +inherit autotools + +# extra args to configure +EXTRA_OECONF = "" + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/fontconfig/fontconfig_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-test/fontconfig/fontconfig_%.bbappend new file mode 100644 index 00000000..c4bebdc1 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/fontconfig/fontconfig_%.bbappend @@ -0,0 +1,17 @@ +PACKAGES =+ "fontconfig-test" + +do_install_append() { + install -m 755 -d ${D}/${datadir}/fontconfig-test + install -m 755 ${S}/test/run-test.sh ${D}/${datadir}/fontconfig-test/ + + sed -i -e "s/FCLIST=\.\.\/fc\-list\/fc\-list/FCLIST=\/usr\/bin\/fc\-list/g" -e "s/FCCACHE=\.\.\/fc\-cache\/fc\-cache/FCCACHE=\/usr\/bin\/fc\-cache/g" ${D}/${datadir}/fontconfig-test/run-test.sh + + for x in 4x6.pcf 8x16.pcf out.expected fonts.conf.in; do + install -m 644 ${S}/test/$x ${D}/${datadir}/fontconfig-test/ + done +} + +DEBIAN_NOAUTONAME_fontconfig-test = "1" +FILES_fontconfig-test = "${datadir}/fontconfig-test/*" + + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch b/meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch new file mode 100644 index 00000000..4d0d09ae --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch @@ -0,0 +1,32 @@ +diff -ur ft2demos-2.9.1.orig/Makefile ft2demos-2.9.1/Makefile +--- ft2demos-2.9.1.orig/Makefile 2018-04-22 05:41:50.000000000 -0400 ++++ ft2demos-2.9.1/Makefile 2019-02-18 23:28:59.794678736 -0500 +@@ -163,7 +163,8 @@ + + ifeq ($(PLATFORM),unix) + CC = $(CCraw) +- LINK_CMD = $(subst /,$(SEP),$(OBJ_BUILD)/libtool) \ ++ LIBTOOL = $(OBJ_BUILD)/libtool ++ LINK_CMD = $(subst /,$(SEP),$(LIBTOOL)) \ + --mode=link $(CC) \ + $(subst /,$(COMPILER_SEP),$(LDFLAGS)) + LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) $(LIB_CLOCK_GETTIME) +@@ -289,12 +290,12 @@ + ttdebug + + # Comment out the next line if you don't have a graphics subsystem. +- EXES += ftdiff \ +- ftgamma \ +- ftgrid \ +- ftmulti \ +- ftstring \ +- ftview ++ # EXES += ftdiff \ ++ # ftgamma \ ++ # ftgrid \ ++ # ftmulti \ ++ # ftstring \ ++ # ftview + + # ftvalid requires ftgxval.c and ftotval.c + # diff --git a/meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch b/meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch new file mode 100644 index 00000000..7803ad7e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/freetype/files/0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch @@ -0,0 +1,30 @@ +From 8c4f135619de929f9348b830a07a46a0c2c38e51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= +Date: Fri, 7 Oct 2016 15:26:20 +0200 +Subject: [PATCH] Do not hardcode libtool path +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It is already known and imported through config.mk. + +Signed-off-by: Jan-Simon Möller +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index a5d34bd..254aad4 100644 +--- a/Makefile ++++ b/Makefile +@@ -153,7 +153,6 @@ else + + ifeq ($(PLATFORM),unix) + CC = $(CCraw) +- LIBTOOL = $(OBJ_BUILD)/libtool + LINK_CMD = $(subst /,$(SEP),$(LIBTOOL)) \ + --mode=link $(CC) \ + $(subst /,$(COMPILER_SEP),$(LDFLAGS)) +-- +2.1.4 + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend b/meta-agl/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend new file mode 100644 index 00000000..19499e2b --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend @@ -0,0 +1,35 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI =+ "${SOURCEFORGE_MIRROR}/freetype/ft2demos-${PV}.tar.bz2;name=ft2demos \ + file://0001-Makefile-dont-build-gfx-demos.patch;patchdir=../ft2demos-${PV} \ + file://0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch;patchdir=../ft2demos-${PV} \ + " +SRC_URI[ft2demos.md5sum] = "178827156d90e07bce8f354c9565d84b" +SRC_URI[ft2demos.sha256sum] = "806eb6363ee5963174a6740f9b7893377912165899c2c1f6372c422aab818c6a" + +PACKAGES =+ "${PN}-demos" + +B = "${S}" + +do_compile_append () { + + oe_runmake -C ${WORKDIR}/ft2demos-${PV} TOP_DIR=${WORKDIR}/${BPN}-${PV}/ +} + +do_install_append () { + install -d -m 0755 ${D}/${bindir} + for x in ftbench ftdump ftlint ftvalid ttdebug; do + install -m 0755 ${WORKDIR}/ft2demos-${PV}/bin/.libs/$x ${D}/${bindir} + done +} + +FILES_${PN}-demos = "\ + ${bindir}/ftbench \ + ${bindir}/ftdump \ + ${bindir}/ftlint \ + ${bindir}/ftvalid \ + ${bindir}/ttdebug \ +" + +# enable pixmap/libpng support to allow color emojis +PACKAGECONFIG_append = " pixmap" diff --git a/meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/files/0001-fix_missing_header_sys_stat.patch b/meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/files/0001-fix_missing_header_sys_stat.patch new file mode 100644 index 00000000..e834becf --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/files/0001-fix_missing_header_sys_stat.patch @@ -0,0 +1,11 @@ +diff -urN fsfuzzer-0.7.orig/fstest.c fsfuzzer-0.7/fstest.c +--- fsfuzzer-0.7.orig/fstest.c 2009-01-25 14:50:06.000000000 +0000 ++++ fsfuzzer-0.7/fstest.c 2016-06-16 17:49:27.264565819 +0000 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #define LOGGIT 1 + #define CHECK_XATTR 1 diff --git a/meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/fsfuzzer_0.7.bb b/meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/fsfuzzer_0.7.bb new file mode 100644 index 00000000..d2ddb59b --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/fsfuzzer/fsfuzzer_0.7.bb @@ -0,0 +1,18 @@ +SUMMARY = "The fsfuzzer is a filesystem fuzzer tool that does stress tests of various filesystems in a reproducible and logged way." +DESCRIPTION = "This tool creates initial (valid) filesystem images and then manipulates their binary format and structure for detecting flaws/bugs/design problems in the parsing/handling code for that particular filesystem. The program expects that you have a /media directory. It uses that one for mounting test images in." +HOMEPAGE = "https://www.ee.oulu.fi/research/ouspg/fsfuzzer" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "http://people.redhat.com/sgrubb/files/fsfuzzer-${PV}.tar.gz \ + file://0001-fix_missing_header_sys_stat.patch \ + " +SRC_URI[md5sum] = "d69ac4b67aaba52a889c9188eb456c15" +SRC_URI[sha256sum] = "094aa17c4f66c525a04e5db5ad444b4a561b6f8e310d0bd70b9ca421cdf0a434" + +inherit autotools + +# Specify any options you want to pass to the configure script using EXTRA_OECONF: +EXTRA_OECONF = "" + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/glmark2/glmark2_%.bbappend b/meta-agl/meta-agl-profile-core/recipes-test/glmark2/glmark2_%.bbappend new file mode 100644 index 00000000..a64e0506 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/glmark2/glmark2_%.bbappend @@ -0,0 +1,2 @@ +PACKAGECONFIG = "wayland-gles2" +PACKAGECONFIG[wayland-gles2] = ",,virtual/egl virtual/libgles2 wayland" diff --git a/meta-agl/meta-agl-profile-core/recipes-test/himeno/himeno_2.0.bb b/meta-agl/meta-agl-profile-core/recipes-test/himeno/himeno_2.0.bb new file mode 100644 index 00000000..f890e23a --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/himeno/himeno_2.0.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "Himeno Benchmark" +LICENSE = "LGPL-2.0" +URL = "http://accc.riken.jp/en/supercom/himenobmt/" + +SRC_URI = "http://accc.riken.jp/en/wp-content/uploads/sites/2/2015/07/himenobmt.c.zip" +SRC_URI[md5sum] = "8d8e837dfc3e00a3b322eb4ae3edd551" +SRC_URI[sha256sum] = "8780bfbdacb0d4dcab2931e65cadd69411731e3f2afcc1231d0743a036298077" + +LIC_FILES_CHKSUM = "file://himenoBMT.c;md5=8e8771ddc01c6d1a795e088e2d6dee78" + +# Upstream ZIP file contains an LZH archive, thus a 2 steps "unpack" is required. +# The LZH archive is unpacked after native tools dependency resolution, +# thus. after "configure" task in our case: + +DEPENDS = "p7zip-native" + +do_configure_append() { + 7z x -y -o${S} ${WORKDIR}/himenobmt.c.lzh + cd ${S} + sed -i -e 's/CC= gcc/#CC= gcc/' Makefile + sed -i -e 's/CFLAGS = /#CFLAGS = /' Makefile +} + +do_install () { + install -d ${D}${bindir} + install -m 0755 bmt ${D}${bindir} +} diff --git a/meta-agl/meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch b/meta-agl/meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch new file mode 100644 index 00000000..c882739b --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/interbench/files/interbench.c.patch @@ -0,0 +1,68 @@ +--- interbench.c.orig 2009-10-30 23:14:59.000000000 -0500 ++++ interbench.c 2012-07-10 19:06:00.000000000 -0500 +@@ -71,6 +71,7 @@ struct user_data { + char datestamp[13]; + FILE *logfile; + } ud = { ++ .ram = 0, + .duration = 30, + .cpu_load = 4, + .log = 1, +@@ -652,6 +653,8 @@ void emulate_write(struct thread *th) + terminal_error("fopen"); + if (stat(name, &statbuf) == -1) + terminal_fileopen_error(fp, "stat"); ++ if (statbuf.st_blksize < MIN_BLK_SIZE) ++ statbuf.st_blksize = MIN_BLK_SIZE; + for (i = 0 ; i < mem; i++) { + if (fwrite(buf, statbuf.st_blksize, 1, fp) != 1) + terminal_fileopen_error(fp, "fwrite"); +@@ -1136,14 +1139,17 @@ void get_ram(void) + if(!(meminfo = fopen("/proc/meminfo", "r"))) + terminal_error("fopen"); + +- ud.ram = ud.swap = 0; +- while( !feof(meminfo) && !fscanf(meminfo, "MemTotal: %lu kB", &ud.ram) ) +- fgets(aux,sizeof(aux),meminfo); ++ if (!ud.ram) ++ { ++ while( !feof(meminfo) && !fscanf(meminfo, "MemTotal: %lu kB", &ud.ram) ) ++ fgets(aux,sizeof(aux),meminfo); ++ } ++ ud.swap = 0; + while( !feof(meminfo) && !fscanf(meminfo, "SwapTotal: %lu kB", &ud.swap) ) + fgets(aux,sizeof(aux),meminfo); + if (fclose(meminfo) == -1) + terminal_error("fclose"); +- ++ + if( !ud.ram || !ud.swap ) { + unsigned long i; + fprintf(stderr, "\nCould not get memory or swap size. "); +@@ -1399,6 +1405,7 @@ void usage(void) + fprintf(stderr, "\t[-h]\n\n"); + fprintf(stderr, " -l\tUse loops per sec (default: use saved benchmark)\n"); + fprintf(stderr, " -L\tUse cpu load of with burn load (default: 4)\n"); ++ fprintf(stderr, " -M\tForce RAM size to . Useful when disk is smaller than RAM.\n"); + fprintf(stderr, " -t\tSeconds to run each benchmark (default: 30)\n"); + fprintf(stderr, " -B\tNice the benchmarked thread to (default: 0)\n"); + fprintf(stderr, " -N\tNice the load thread to (default: 0)\n"); +@@ -1482,7 +1489,7 @@ int main(int argc, char **argv) + terminal_error("signal"); + #endif + +- while ((q = getopt(argc, argv, "hl:L:B:N:ut:bcnrC:I:m:w:x:W:X:")) != -1) { ++ while ((q = getopt(argc, argv, "hl:L:M:B:N:ut:bcnrC:I:m:w:x:W:X:")) != -1) { + switch (q) { + case 'h': + usage(); +@@ -1496,6 +1503,9 @@ int main(int argc, char **argv) + case 'L': + ud.cpu_load = atoi(optarg); + break; ++ case 'M': ++ ud.ram = atoi(optarg); ++ break; + case 'B': + ud.bench_nice = atoi(optarg); + break; diff --git a/meta-agl/meta-agl-profile-core/recipes-test/interbench/interbench_0.31.bb b/meta-agl/meta-agl-profile-core/recipes-test/interbench/interbench_0.31.bb new file mode 100644 index 00000000..3e649037 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/interbench/interbench_0.31.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "The Linux interactivity benchmark" +HOMEPAGE = "http://users.tpg.com.au/ckolivas/interbench/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" +SRC_URI = "http://ck.kolivas.org/apps/interbench/interbench-${PV}.tar.bz2" + +SRC_URI += "file://interbench.c.patch;striplevel=0" + +inherit autotools + +INSANE_SKIP_${PN} = "ldflags" + +B = "${S}" +EXTRA_OEMAKE = "CC='${CC}'" + +# upstream tarball contains x86_64 binaries, we need a clean source tree +do_compile() { + oe_runmake clean + oe_runmake +} + +do_install() { + install -d ${D}${bindir} ${D}${datadir}/doc/${PN}/ ${D}${mandir}/man8/ + install -m 0755 ${B}/interbench ${D}${bindir} + install -m 0644 ${S}/readme* ${D}${datadir}/doc/${PN}/ + install -m 0644 ${S}/interbench.8 ${D}${mandir}/man8/ +} + +SRC_URI[md5sum] = "832254d7fd1255c548ebea7b97f01015" +SRC_URI[sha256sum] = "89d438b28aef22d26e79812762a57a9f9344a8dd8826edebfe60dad48ee1c784" + diff --git a/meta-agl/meta-agl-profile-core/recipes-test/ipv6connect/ipv6connect.bb b/meta-agl/meta-agl-profile-core/recipes-test/ipv6connect/ipv6connect.bb new file mode 100644 index 00000000..a8b93716 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/ipv6connect/ipv6connect.bb @@ -0,0 +1,24 @@ +SUMMARY = "ipv6connect test" +HOMEPAGE = "https://chromium.googlesource.com/chromiumos/third_party/autotest/+/0.12.369.B/client/tests/ipv6connect" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${S}/${PN}/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/qa-test-misc;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "b355b7e1f43a19938895964f314484ffd8a39542" + +inherit autotools + +INSANE_SKIP_${PN} = "ldflags" + +B = "${WORKDIR}/git/ipv6connect" +S = "${WORKDIR}/git" + +# configure script is not delivered, only a makefile. +do_configure() { + : +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/ipv6connect ${D}${bindir} +} diff --git a/meta-agl/meta-agl-profile-core/recipes-test/linpack/linpack.bb b/meta-agl/meta-agl-profile-core/recipes-test/linpack/linpack.bb new file mode 100644 index 00000000..84bed0ff --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/linpack/linpack.bb @@ -0,0 +1,23 @@ +SUMMARY = "Linpack benchmark" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://${S}/${PN}/linpack.c;md5=076f1fd8d313056103f98d4253862eae" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/qa-test-misc;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "920cae73a918d1f516113b0ae967be3ecaba86ef" + +DEPENDS += "rsync-native" + +inherit autotools + +S = "${WORKDIR}/git" + +# configure script is not delivered, only a makefile. +do_configure() { + mkdir -p ${B} + rsync -a ${S}/${PN}/* ${B} +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/linpack ${D}${bindir} +} diff --git a/meta-agl/meta-agl-profile-core/recipes-test/linus-stress/linus-stress.bb b/meta-agl/meta-agl-profile-core/recipes-test/linus-stress/linus-stress.bb new file mode 100644 index 00000000..01b3cfce --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/linus-stress/linus-stress.bb @@ -0,0 +1,23 @@ +SUMMARY = "linus_stress test" +HOMEPAGE = "https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/tests/linus_stress" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${S}/linus_stress/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/qa-test-misc;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "87cdfd4626c0cb47fc22f328867e49d6268df85c" + +inherit autotools +INSANE_SKIP_${PN} = "ldflags" + +B = "${WORKDIR}/git/linus_stress" +S = "${WORKDIR}/git" + +# configure script is not delivered, only a makefile. +do_configure() { + : +} + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${B}/linus_stress ${D}${bindir} +} diff --git a/meta-agl/meta-agl-profile-core/recipes-test/packagegroups/packagegroup-agl-test.bb b/meta-agl/meta-agl-profile-core/recipes-test/packagegroups/packagegroup-agl-test.bb new file mode 100644 index 00000000..4591591e --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/packagegroups/packagegroup-agl-test.bb @@ -0,0 +1,57 @@ +SUMMARY = "Utilities for testing of AGL" +DESCRIPTION = "A set of common packages required by testing AGL for Quality Assurance" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-test \ + packagegroup-agl-test-ltp \ + packagegroup-ivi-common-test \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + bc \ + blobsallad \ + dbench \ + ebizzy \ + ffsb \ + interbench \ + iozone3 \ + iperf3 \ + ipv6connect \ + linpack \ + linus-stress \ + lmbench \ + nbench-byte \ + rt-tests \ + stress \ + " +# to be added, but needs LICENSE_FLAGS_WHITELIST="non-commercial" +# netperf + +# FTBS, SPEC-316 +# himeno +# FTBS, SPEC-1384 +# trinity + +# packagegroup-agl-test-ltp \ +# ltp \ +# + +# Packages for shell commands which are required by LTP +# readelf, logrotate, vsftpd, crontab, sar, arp, ftp, +# host, rcp, rlogin, rsh, tcpdump, expect, iptables, dnsmasq, +# pgrep +RDEPENDS_packagegroup-agl-test-ltp += " \ + initscripts-functions bind-utils binutils \ + cronie dnsmasq expect inetutils-ftp inetutils-rsh \ + iptables logrotate net-tools sysstat tcpdump vsftpd \ + " + +RDEPENDS_packagegroup-ivi-common-test = " \ + packagegroup-agl-test \ + " diff --git a/meta-agl/meta-agl-profile-core/recipes-test/trinity/trinity_git.bb b/meta-agl/meta-agl-profile-core/recipes-test/trinity/trinity_git.bb new file mode 100644 index 00000000..f0f09a85 --- /dev/null +++ b/meta-agl/meta-agl-profile-core/recipes-test/trinity/trinity_git.bb @@ -0,0 +1,42 @@ +SUMMARY = "a Linux System call fuzz teste." +DESCRIPTION = "Trinity, a Linux System call fuzz tester." +HOMEPAGE = "http://codemonkey.org.uk/projects/trinity/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=96094d47cfbd2cc45eb46ce0fc423c04" + +COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" + +PV = "1.5" +SRCREV = "edc2e693e298e0372010a361354c4a79a3cd93f3" +SRC_URI = "git://github.com/kernelslacker/trinity.git;protocol=https;nobranch=1 \ + " + +S = "${WORKDIR}/git" + +inherit useradd + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --create-home --shell /bin/sh ${PN} " + +do_configure () { + ./configure.sh +} + +# workaround random build failures +do_compile () { + ${MAKE} +} + +do_install () { + oe_runmake install DESTDIR=${D}/usr + install -o ${PN} -d -m 0755 ${D}/${datadir}/${PN} + install -o ${PN} -m 0755 ${S}/scripts/test-all-syscalls-parallel.sh ${D}/${datadir}/${PN} + install -o ${PN} -m 0755 ${S}/scripts/test-all-syscalls-sequentially.sh ${D}/${datadir}/${PN} + install -o ${PN} -m 0755 ${S}/scripts/test-multi.sh ${D}/${datadir}/${PN} + install -o ${PN} -m 0755 ${S}/scripts/test-vm.sh ${D}/${datadir}/${PN} +} + +PACKAGES =+ "${PN}-example" + +FILES_${PN} = "${bindir}/trinity" +FILES_${PN}-example = "${datadir}/${PN}" diff --git a/meta-agl/meta-agl-profile-graphical-html5/conf/layer.conf b/meta-agl/meta-agl-profile-graphical-html5/conf/layer.conf new file mode 100644 index 00000000..69967b03 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofilegraphicalhtml5" +BBFILE_PATTERN_aglprofilegraphicalhtml5 = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofilegraphicalhtml5 = "70" + +LAYERSERIES_COMPAT_aglprofilegraphicalhtml5 = "thud" diff --git a/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service b/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service new file mode 100644 index 00000000..2c864847 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.service @@ -0,0 +1,16 @@ +[Unit] +Description=HTML5 runtime for OpenIVI Mobility applications +Requires=afm-user-daemon.service InputEventManager.service +After=afm-user-daemon.service InputEventManager.service +ConditionKernelCommandLine=!agl.nogfx + +[Service] +Type=dbus +BusName=org.agl.openivi +ExecStart=/usr/bin/openivi-html5.sh +Restart=on-failure +RestartSec=5 +TimeoutStopSec=1 + +[Install] +WantedBy=default.target diff --git a/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh b/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh new file mode 100644 index 00000000..a318214a --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5/openivi-html5.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +if test -z "$XDG_CONFIG_DIRS"; then + export XDG_CONFIG_DIRS=/etc/xdg/ +fi + +if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/$UID + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR +fi + +# Default homescreen +HOMESCREEN=/usr/share/openivi/example/cluster/index.html + +# Read configuration +HOMESCREEN_CONFIG=$XDG_CONFIG_DIRS/openivi-html5/openivi-html5.ini +if [ -e "$HOMESCREEN_CONFIG" ] ; then + HTML=`sed -n '/^homescreen=\(.*\)$/s//\1/p' < $HOMESCREEN_CONFIG` + if [ -n "$HTML" ] ; then + HOMESCREEN=$HTML + fi +fi + +#the following value shall be modified for your display side +SCREEN_W=1080 +SCREEN_H=1920 + +# Demo is configured to FullHD +QT_W=1080 +QT_H=1920 + +QT_IVI_SURFACE_ID=4194304 QT_WAYLAND_SHELL_INTEGRATION=ivi-shell /usr/bin/openivi-html5 -f -u $HOMESCREEN & + +# qmlscene create 2 surfaces +# 0x80000000 : for off screen buffer ? +# 0x80000001 : visible +# +SURFACE_ID_QML=0x80000001 + +# +# layer-add-surfaces wait till 2 surfaces are created. +# +layer-add-surfaces 1000 2 + +/usr/bin/LayerManagerControl set surface $SURFACE_ID_QML destination region 0 0 $SCREEN_W $SCREEN_H +/usr/bin/LayerManagerControl set surface $SURFACE_ID_QML source region 0 0 $QT_W $QT_H +/usr/bin/LayerManagerControl set layer 1000 render order $SURFACE_ID_QML +/usr/bin/LayerManagerControl set surfaces $SURFACE_ID_QML input focus keyboard +/usr/bin/LayerManagerControl set screen 0 render order 1000 diff --git a/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5_git.bb b/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5_git.bb new file mode 100644 index 00000000..168b98c7 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/recipes-openivi/openivi-html5/openivi-html5_git.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "OpenIVI Mobility HTML5 environment" +HOMEPAGE = "https://openivimobility.github.io/" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4641e94ec96f98fabc56ff9cc48be14b" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI = " \ + git://github.com/openivimobility/openivi-html5.git;branch=master;tag=0b370eea8c7c852365bd717013a523b678abbdba \ + file://openivi-html5.sh \ + file://openivi-html5.service \ +" + +inherit pkgconfig cmake_qt5 externalsrc systemd +PV = "0.1" + +S = "${WORKDIR}/git" + +RDEPENDS_${PN} = "qtbase qtwebkit inputeventmanager windowmanager" +DEPENDS = "qtbase-native qtbase qtwebkit" + +EXTRA_OECMAKE = " -DCMAKE_DISABLE_FIND_PACKAGE_X11=TRUE " + +FILES_${PN} = "/usr/bin/openivi-html5 /usr/share/openivi/*" + +do_install() { + install -d ${D}${bindir} + install -m 0755 openivi-html5 ${D}${bindir} + + install -d ${D}${datadir}/openivi/ + cp -r ${S}/example ${D}${datadir}/openivi/ + + install -p -D ${WORKDIR}/openivi-html5.sh ${D}${bindir}/openivi-html5.sh + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_user_unitdir} + install -p -D ${WORKDIR}/openivi-html5.service ${D}${systemd_user_unitdir}/openivi-html5.service + install -d ${D}${sysconfdir}/systemd/user/default.target.wants + ln -sf ${systemd_user_unitdir}/openivi-html5.service ${D}${sysconfdir}/systemd/user/default.target.wants + fi +} + +FILES_${PN} += " ${prefix}/bin/openivi-html5.sh ${systemd_user_unitdir} ${sysconfdir}" diff --git a/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb new file mode 100755 index 00000000..2d811205 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5-crosssdk.bb @@ -0,0 +1,55 @@ +SUMMARY = "Cross SDK of Full AGL Distribution for IVI profile" + +DESCRIPTION = "SDK image for full AGL Distribution for IVI profile. \ +It includes the full meta-toolchain, plus developement headers and libraries \ +to form a standalone cross SDK." + +require agl-demo-platform-html5.bb + +LICENSE = "MIT" + +IMAGE_FEATURES_append = " dev-pkgs" +IMAGE_INSTALL_append = " kernel-dev kernel-devsrc" + +inherit populate_sdk populate_sdk_qt5 + +# Task do_populate_sdk and do_rootfs can't be exec simultaneously. +# Both exec "createrepo" on the same directory, and so one of them +# can failed (randomly). +addtask do_populate_sdk after do_rootfs + +# native tools to support Chromium build inside SDK (SPEC-942) +TOOLCHAIN_HOST_TASK += " \ + nativesdk-gn \ + nativesdk-ninja \ + nativesdk-gperf \ + nativesdk-zlib \ + nativesdk-xz \ + nativesdk-nspr-dev \ + nativesdk-nss-dev \ + nativesdk-lua \ + " + +# required dependencies for Chromium build inside SDK (SPEC-942) +TOOLCHAIN_TARGET_TASK += " \ + pciutils-dev \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-dev' , '', d)} \ + cairo-dev \ + nss-dev \ + cups-dev \ + gconf-dev \ + libexif-dev \ + pango-dev \ + libdrm-dev \ + lua-dev \ + lua-staticdev \ + ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'ffmpeg-dev', '', d)} \ + " + +# Add wayland-scanner to SDK (SPEC-945) +# Use TOOLCHAIN_HOST_TASK instead of adding to the packagegroup +# wayland-scanner is in nativesdk-wayland-dev ! +# option: add also nativesdk-qtwayland-tools +TOOLCHAIN_HOST_TASK_append = " nativesdk-wayland nativesdk-wayland-dev" + +TOOLCHAIN_HOST_TASK_append = " nativesdk-perl-modules " diff --git a/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.bb b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.bb new file mode 100644 index 00000000..c9247a85 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.bb @@ -0,0 +1,10 @@ +DESCRIPTION = "AGL Demo Platform image currently contains a simple HMI and \ +demos." + +LICENSE = "MIT" + +require agl-demo-platform-html5.inc + +IMAGE_INSTALL_append = "\ + packagegroup-agl-demo-platform-html5 \ + " diff --git a/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.inc b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.inc new file mode 100644 index 00000000..f2f28861 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/images/agl-demo-platform-html5.inc @@ -0,0 +1,2 @@ +# Base image +require recipes-platform/images/agl-image-minimal.inc diff --git a/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/packagegroups/packagegroup-agl-demo-platform-html5.bb b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/packagegroups/packagegroup-agl-demo-platform-html5.bb new file mode 100644 index 00000000..ee5c1f70 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-html5/recipes-platform/packagegroups/packagegroup-agl-demo-platform-html5.bb @@ -0,0 +1,26 @@ +SUMMARY = "The software for DEMO platform of AGL IVI profile" +DESCRIPTION = "A set of packages belong to AGL Demo Platform" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-demo-platform-html5 \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-image-ivi \ + " + +# add packages for demo platform (include demo apps) here +#RDEPENDS_${PN} += " \ +# packagegroup-agl-demo \ +# " + +# add packages for OpenIVI-HTML5 demo +RDEPENDS_${PN} += " \ + openivi-html5 \ + " diff --git a/meta-agl/meta-agl-profile-graphical-qt5/conf/layer.conf b/meta-agl/meta-agl-profile-graphical-qt5/conf/layer.conf new file mode 100644 index 00000000..d73b8aa6 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofilegraphicalqt5" +BBFILE_PATTERN_aglprofilegraphicalqt5 = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofilegraphicalqt5 = "70" + +LAYERSERIES_COMPAT_aglprofilegraphicalqt5 = "thud" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-native.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-native.bb new file mode 100644 index 00000000..a31c666c --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-native.bb @@ -0,0 +1,17 @@ +SUMMARY = "The software for application framework of AGL IVI profile" +DESCRIPTION = "A set of packages belong to AGL application framework which required by \ +Native App Fw Subsystem" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-appfw-native \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-appfw-native-qt5 \ + " diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-qt5.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-qt5.bb new file mode 100644 index 00000000..2f0f01fe --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-appfw/packagegroups/packagegroup-agl-appfw-qt5.bb @@ -0,0 +1,16 @@ +SUMMARY = "The software for application framework of AGL IVI profile" +DESCRIPTION = "A set of packages belong to AGL application framework" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-appfw-qt5 \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-appfw-native \ +" \ No newline at end of file diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-devtools/libafb-helpers-qt/libafb-helpers-qt_git.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-devtools/libafb-helpers-qt/libafb-helpers-qt_git.bb new file mode 100644 index 00000000..802167b2 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-devtools/libafb-helpers-qt/libafb-helpers-qt_git.bb @@ -0,0 +1,11 @@ +require recipes-devtools/libafb-helpers/libafb-helpers_git.inc + +DEPENDS_append = " qtwebsockets" +RDEPENDS_${PN}_append = " af-binder" + +inherit cmake_qt5 + +EXTRA_OECMAKE_append = " -DAFB_HELPERS_QT=ON -DAFB_HELPERS=OFF" + +ALLOW_EMPTY_${PN} = "1" + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb new file mode 100755 index 00000000..8477b394 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5-crosssdk.bb @@ -0,0 +1,55 @@ +SUMMARY = "Cross SDK of Full AGL Distribution for IVI profile" + +DESCRIPTION = "SDK image for full AGL Distribution for IVI profile. \ +It includes the full meta-toolchain, plus developement headers and libraries \ +to form a standalone cross SDK." + +require agl-image-graphical-qt5.bb + +LICENSE = "MIT" + +IMAGE_FEATURES_append = " dev-pkgs" +IMAGE_INSTALL_append = " kernel-dev kernel-devsrc" + +inherit populate_sdk populate_sdk_qt5 + +# Task do_populate_sdk and do_rootfs can't be exec simultaneously. +# Both exec "createrepo" on the same directory, and so one of them +# can failed (randomly). +addtask do_populate_sdk after do_rootfs + +# native tools to support Chromium build inside SDK (SPEC-942) +TOOLCHAIN_HOST_TASK += " \ + nativesdk-gn \ + nativesdk-ninja \ + nativesdk-gperf \ + nativesdk-zlib \ + nativesdk-xz \ + nativesdk-nspr-dev \ + nativesdk-nss-dev \ + nativesdk-lua \ + " + +# required dependencies for Chromium build inside SDK (SPEC-942) +TOOLCHAIN_TARGET_TASK += " \ + pciutils-dev \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-dev' , '', d)} \ + cairo-dev \ + nss-dev \ + cups-dev \ + gconf-dev \ + libexif-dev \ + pango-dev \ + libdrm-dev \ + lua-dev \ + lua-staticdev \ + ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'ffmpeg-dev', '', d)} \ + " + +# Add wayland-scanner to SDK (SPEC-945) +# Use TOOLCHAIN_HOST_TASK instead of adding to the packagegroup +# wayland-scanner is in nativesdk-wayland-dev ! +# option: add also nativesdk-qtwayland-tools +TOOLCHAIN_HOST_TASK_append = " nativesdk-wayland nativesdk-wayland-dev" + +TOOLCHAIN_HOST_TASK_append = " nativesdk-perl-modules " diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.bb new file mode 100644 index 00000000..35989819 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.bb @@ -0,0 +1,10 @@ +SUMMARY = "A very basic Wayland image with a terminal" + +require agl-image-graphical-qt5.inc + +LICENSE = "MIT" + +IMAGE_INSTALL_append = "\ + packagegroup-agl-image-weston \ + " + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.inc b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.inc new file mode 100644 index 00000000..ed1634fc --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/images/agl-image-graphical-qt5.inc @@ -0,0 +1,7 @@ +require recipes-platform/images/agl-image-minimal.inc + +IMAGE_FEATURES += "splash package-management ssh-server-dropbear" + +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES = "wayland" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-appfw-native-qt5.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-appfw-native-qt5.bb new file mode 100644 index 00000000..a05d69f5 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-appfw-native-qt5.bb @@ -0,0 +1,29 @@ +SUMMARY = "Qt5 for native GUI framework of AGL IVI profile" +DESCRIPTION = "A set of Qt5 packages which required by Native App Fw Subsystem" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-appfw-native-qt5 \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + qtbase \ + qtbase-dev \ + qtbase-plugins \ + qtbase-staticdev \ + qtbase-tools \ + qtdeclarative \ + qtdeclarative-qmlplugins \ + qtdeclarative-tools \ + qtcharts \ + qtwayland \ + qtwayland-plugins \ + qtwayland-tools \ + qtgraphicaleffects-qmlplugins \ + qtvirtualkeyboard \ + " diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-demo-qt-examples.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-demo-qt-examples.bb new file mode 100644 index 00000000..adebabe7 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-demo-qt-examples.bb @@ -0,0 +1,26 @@ +SUMMARY = "The examples to test Qt5 on AGL Demo Platform" +DESCRIPTION = "A set of packages which contains Qt5 examples" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-demo-qt-examples \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + qt3d-examples \ + qtbase-examples \ + qtconnectivity-examples \ + qtdeclarative-examples \ + qtlocation-examples \ + qtmultimedia-examples \ + qtsensors-examples \ + qtsystems-examples \ + qttools-examples \ + qtwayland-examples \ + qtxmlpatterns-examples \ + " diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-graphical-qt5.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-graphical-qt5.bb new file mode 100644 index 00000000..74b35f70 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-agl-profile-graphical-qt5.bb @@ -0,0 +1,23 @@ +SUMMARY = "The middlewares for AGL IVI profile" +DESCRIPTION = "The set of packages required for AGL Distribution" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-profile-graphical-qt5 \ + profile-graphical-qt5 \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-profile-graphical \ + packagegroup-agl-appfw-native-qt5 \ +" + +RDEPENDS_${PN} += "\ + agl-login-manager \ + " + +RDEPENDS_profile-graphical-qt5 = "${PN}" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-qt5-toolchain-target.bbappend b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-qt5-toolchain-target.bbappend new file mode 100644 index 00000000..300227e1 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-platform/packagegroups/packagegroup-qt5-toolchain-target.bbappend @@ -0,0 +1,23 @@ +# add missing dependencies for SDK + +RDEPENDS_${PN} += " \ + qttools-plugins \ + qtquickcontrols-dev \ + qtquickcontrols-qmlplugins \ + qtquickcontrols2-dev \ + qtquickcontrols2-mkspecs \ + qtquickcontrols2-qmlplugins \ +" + +# remove dependency on qtwebkit (still added to SDK by packagegroup-qt5-toolchain-target) +# see SPEC-1159 +RDEPENDS_${PN}_remove = " \ + qtwebkit-dev \ + qtwebkit-mkspecs \ + qtwebkit-qmlplugins \ +" + +# add QtAGLExtras +RDEPENDS_${PN} += " \ + ${@bb.utils.contains("DISTRO_FEATURES", "agl-hmi-framework", " qtaglextras-dev qtaglextras-mkspecs", "",d)} \ +" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibhomescreen/qlibhomescreen_git.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibhomescreen/qlibhomescreen_git.bb new file mode 100644 index 00000000..09a262eb --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibhomescreen/qlibhomescreen_git.bb @@ -0,0 +1,13 @@ +SUMMARY = "A wrapper library of libhomescreen for Qt Application in AGL" +SECTION = "libs" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +DEPENDS = "qtbase libhomescreen" +RDEPENDS_${PN} = "libhomescreen" + +inherit qmake5 + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libqthomescreen.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "b218476402bceda7eb42d41064552a7261ff3205" +S = "${WORKDIR}/git" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibwindowmanager/qlibwindowmanager_git.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibwindowmanager/qlibwindowmanager_git.bb new file mode 100644 index 00000000..883ab82d --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qlibwindowmanager/qlibwindowmanager_git.bb @@ -0,0 +1,14 @@ +SUMMARY = "A wrapper library of libwindowmanager for Qt Application in AGL" +SECTION = "graphics" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +DEPENDS = "qtbase libwindowmanager" +RDEPENDS_${PN} = "libwindowmanager" + +inherit qmake5 + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libqtwindowmanager.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "3ff07151af5040842dd1e56d8312ee39cc50f533" +S = "${WORKDIR}/git" +PV = "1.0+git${SRCPV}" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qml-execscript-plugin/qml-execscript-plugin_1.0.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qml-execscript-plugin/qml-execscript-plugin_1.0.bb new file mode 100644 index 00000000..dbeda2d1 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qml-execscript-plugin/qml-execscript-plugin_1.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "Execute Script QML plugin" +DESCRIPTION = "This provides a simple QML plugin able to execute script file." + +LICENSE = "CLOSED" + +DEPENDS = "qtbase-native qtdeclarative" + +SRC_URI = "git://github.com/ntanibata/qml-execscript-plugin.git;protocol=git;" +SRCREV = "1f05c44cccd8aef485d8df8206c8df4e5ad6f310" +S = "${WORKDIR}/git" + +inherit qmake5 + +EXTRA_OECONF = "--with-moc-dir=${STAGING_BINDIR_NATIVE}/qt5" +QML_LIBDIR = "${libdir}/qt5/qml" + +do_install() { + install -d ${D}${libdir}/qt5/qml/execScript/ + install -m 0755 execScript/*.so ${D}${libdir}/qt5/qml/execScript/ + install -m 0644 ../git/execScript/qmldir ${D}${libdir}/qt5/qml/execScript/ +} + +FILES_${PN} += "${QML_LIBDIR}/execScript/libexecscriptplugin.so" +FILES_${PN} += "${QML_LIBDIR}/execScript/qmldir" +FILES_${PN}-dbg += "${QML_LIBDIR}/execScript/.debug" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase-native_git.bbappend b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase-native_git.bbappend new file mode 100644 index 00000000..b7cfe8dc --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase-native_git.bbappend @@ -0,0 +1,3 @@ +# Backport this fix from meta-qt5: +# https://github.com/meta-qt5/meta-qt5/commit/bf7cdd963008f2d61bc4c324fff2bfafe511fb5f +SRC_URI_remove = "file://0012-qdbuscpp2xml.pro-do-not-build-with-bootstrapped-depe.patch" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase/0001-Force-qdbus-to-make-introspect-for-every-findMetaObj.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase/0001-Force-qdbus-to-make-introspect-for-every-findMetaObj.patch new file mode 100644 index 00000000..10a1ddd8 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase/0001-Force-qdbus-to-make-introspect-for-every-findMetaObj.patch @@ -0,0 +1,30 @@ +From a4943bb5c7fdf5eb297223d2c3bb02d2271bea48 Mon Sep 17 00:00:00 2001 +From: Risto Avila +Date: Thu, 17 Dec 2015 04:22:53 +0200 +Subject: [PATCH] Force qdbus to make introspect for every findMetaObject + +--- + src/dbus/qdbusintegrator.cpp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp +index cce8b9c..ae2a9dc 100644 +--- a/src/dbus/qdbusintegrator.cpp ++++ b/src/dbus/qdbusintegrator.cpp +@@ -2512,8 +2512,11 @@ QDBusConnectionPrivate::findMetaObject(const QString &service, const QString &pa + if (!interface.isEmpty()) { + QDBusReadLocker locker(FindMetaObject1Action, this); + QDBusMetaObject *mo = cachedMetaObjects.value(interface, 0); +- if (mo) +- return mo; ++ if (mo) { ++ // service is not unique. Remove cached object to force introspect ++ cachedMetaObjects.remove(interface); ++ delete mo; ++ } + } + + // introspect the target object +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase_%.bbappend b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase_%.bbappend new file mode 100644 index 00000000..e939fa35 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtbase_%.bbappend @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PACKAGECONFIG_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}" +PACKAGECONFIG_GL = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}" +PACKAGECONFIG_append = " ${PACKAGECONFIG_WAYLAND} icu accessibility" +PACKAGECONFIG_append = " fontconfig" +PACKAGECONFIG_append = " sql-sqlite" + +EXTRA_OECONF_append = "" + +# '-qpa wayland-egl' set wayland-egl as default of platform plagins +PACKAGECONFIG[wayland]="-qpa wayland-egl -no-qpa-platform-guard" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia/0001-metadata-image-support-with-the-data-URL-scheme-for-.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia/0001-metadata-image-support-with-the-data-URL-scheme-for-.patch new file mode 100644 index 00000000..007e4676 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia/0001-metadata-image-support-with-the-data-URL-scheme-for-.patch @@ -0,0 +1,80 @@ +From ed61f1d932c5c6d38458fcd2e1d5d154383f017e Mon Sep 17 00:00:00 2001 +From: Tasuku Suzuki +Date: Mon, 12 Dec 2016 16:32:47 +0900 +Subject: [PATCH] metadata image support with the "data" URL scheme for QtQuick + +add posterImage, coverArtImage and thumbnailImage to metadata + +Change-Id: I10b9bae10c219ffa41506d6e6b345020790217a6 +--- + .../multimedia/qdeclarativemediametadata_p.h | 33 ++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/src/imports/multimedia/qdeclarativemediametadata_p.h b/src/imports/multimedia/qdeclarativemediametadata_p.h +index ede7f87..6a6a815 100644 +--- a/src/imports/multimedia/qdeclarativemediametadata_p.h ++++ b/src/imports/multimedia/qdeclarativemediametadata_p.h +@@ -51,6 +51,9 @@ + // We mean it. + // + ++#include ++#include ++#include + #include + #include + #include +@@ -153,6 +156,9 @@ class QDeclarativeMediaMetaData : public QObject + Q_PROPERTY(QVariant gpsProcessingMethod READ gpsProcessingMethod WRITE setGPSProcessingMethod NOTIFY metaDataChanged) + Q_PROPERTY(QVariant gpsAreaInformation READ gpsAreaInformation WRITE setGPSAreaInformation NOTIFY metaDataChanged) + ++ Q_PROPERTY(QVariant posterImage READ posterImage NOTIFY metaDataChanged) ++ Q_PROPERTY(QVariant coverArtImage READ coverArtImage NOTIFY metaDataChanged) ++ Q_PROPERTY(QVariant thumbnailImage READ thumbnailImage NOTIFY metaDataChanged) + public: + QDeclarativeMediaMetaData(QMediaObject *player, QObject *parent = 0) + : QObject(parent) +@@ -425,6 +431,16 @@ QT_WARNING_POP + void setGPSAreaInformation(const QVariant &information) { + setMetaData(QMediaMetaData::GPSAreaInformation, information); } + ++ QVariant posterImage() const { ++ return convertImageToUrl(m_mediaObject->metaData(QMediaMetaData::PosterImage)); ++ } ++ QVariant coverArtImage() const { ++ return convertImageToUrl(m_mediaObject->metaData(QMediaMetaData::CoverArtImage)); ++ } ++ QVariant thumbnailImage() const { ++ return convertImageToUrl(m_mediaObject->metaData(QMediaMetaData::ThumbnailImage)); ++ } ++ + Q_SIGNALS: + void metaDataChanged(); + +@@ -440,6 +456,23 @@ private: + m_writerControl->setMetaData(key, value); + } + ++ QUrl convertImageToUrl(const QVariant &variant) const ++ { ++ if (variant.type() != QVariant::Image) ++ return QUrl(); ++ ++ QImage image = variant.value(); ++ QByteArray data; ++ QBuffer buffer(&data); ++ buffer.open(QBuffer::WriteOnly); ++ QImageWriter png(&buffer, "png"); ++ if (!png.write(image)) { ++ return QUrl(); ++ } ++ buffer.close(); ++ return QUrl(QStringLiteral("data:image/png;base64,") + data.toBase64()); ++ } ++ + QMediaObject *m_mediaObject; + QMetaDataWriterControl *m_writerControl; + bool m_requestedWriterControl; +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia_%.bbappend b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia_%.bbappend new file mode 100644 index 00000000..a06ac2d8 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtmultimedia_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +PACKAGECONFIG_append = " gstreamer" + +SRC_URI_append = " \ + file://0001-metadata-image-support-with-the-data-URL-scheme-for-.patch \ + " diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtsystems_%.bbappend b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtsystems_%.bbappend new file mode 100644 index 00000000..550c58d0 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtsystems_%.bbappend @@ -0,0 +1,3 @@ +DEPENDS_remove = "bluez4" +# currently Qt5 does not support bluez5 "Nothing PROVIDES 'gconfbluez5'" +#DEPENDS_append = "bluez5" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0001-protocol-update-3rd-party-ivi-application-protocol.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0001-protocol-update-3rd-party-ivi-application-protocol.patch new file mode 100644 index 00000000..c91e1170 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0001-protocol-update-3rd-party-ivi-application-protocol.patch @@ -0,0 +1,56 @@ +From 8caaf802a8b42e9bb1d74fc335a571882c75d73e Mon Sep 17 00:00:00 2001 +From: Holger Behrens +Date: Tue, 3 Feb 2015 09:52:52 +0100 +Subject: [meta-ivi-demo][PATCH 1/2] protocol: update 3rd party ivi-application + protocol + +Signed-off-by: Holger Behrens +--- + src/3rdparty/protocol/ivi-application.xml | 31 +++---------------------------- + 1 file changed, 3 insertions(+), 28 deletions(-) + +diff --git a/src/3rdparty/protocol/ivi-application.xml b/src/3rdparty/protocol/ivi-application.xml +index 833fd38..b06ae6c 100644 +--- a/src/3rdparty/protocol/ivi-application.xml ++++ b/src/3rdparty/protocol/ivi-application.xml +@@ -42,34 +42,9 @@ + + + +- +- +- These define all possible warning codes returned by ivi compositor on server-side warnings. +- invalid_wl_surface: +- - wl_surface already has a another role. +- - wl_surface is destroyed before the ivi_surface is destroyed. +- ivi_id_in_use: ivi_id is already assigned by another application. +- +- +- +- +- +- +- +- The ivi compositor encountered warning while processing a request by this +- application. The warning is defined by argument warning_code and optional +- warning_text. If the warning is detected, client shall destroy the ivi_surface +- object. +- +- When a warning event is sent, the compositor turns the ivi_surface object inert. +- The ivi_surface will not deliver further events, all requests on it are ignored +- except 'destroy', and the association to the ivi_id is removed. The client +- should destroy the ivi_surface object. If an inert ivi_surface object is used as +- an argument to any other object's request, that request will [produce a fatal +- error / produce a warning / be ignored]. +- +- +- ++ ++ ++ + + + +-- +2.2.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0002-qwaylandwindow-add-support-for-IVI-Surface-ID-proper.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0002-qwaylandwindow-add-support-for-IVI-Surface-ID-proper.patch new file mode 100644 index 00000000..591ef71c --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0002-qwaylandwindow-add-support-for-IVI-Surface-ID-proper.patch @@ -0,0 +1,34 @@ +From 31c60aedf415fd06b5c1aa16fdcef1504b67b96d Mon Sep 17 00:00:00 2001 +From: Holger Behrens +Date: Tue, 3 Feb 2015 09:53:43 +0100 +Subject: [meta-ivi-demo][PATCH 2/2] qwaylandwindow: add support for + IVI-Surface-ID property + +Signed-off-by: Holger Behrens +--- + src/client/qwaylandwindow.cpp | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 45a58f2..781081a 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -100,7 +100,14 @@ QWaylandWindow::QWaylandWindow(QWindow *window) + + if (!(window->flags() & Qt::BypassWindowManagerHint)) { + if (mDisplay->shellIvi()) { +- mShellSurface = new QWaylandIviSurface(mDisplay->shellIvi()->surface_create(IVI_SURFACE_ID + getpid(), object()), this); ++ unsigned int id = 0; ++ QVariant value = window->property("IVI-Surface-ID"); ++ if (value.isValid()) { ++ id = value.toUInt(); ++ } else { ++ id = IVI_SURFACE_ID + getpid(); ++ } ++ mShellSurface = new QWaylandIviSurface(mDisplay->shellIvi()->surface_create(id, object()), this); + } else if (mDisplay->shellXdg()) { + if (window->type() & Qt::Window) { + mShellSurface = new QWaylandXdgSurface(mDisplay->shellXdg()->get_xdg_surface(object()), this); +-- +2.2.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0010-Added-manifest-file-according-to-smack-3-domain-mode.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0010-Added-manifest-file-according-to-smack-3-domain-mode.patch new file mode 100644 index 00000000..39296c76 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0010-Added-manifest-file-according-to-smack-3-domain-mode.patch @@ -0,0 +1,33 @@ +Add qt5wayland.manifest. Removed specfile change from patch. + +Adapted from: + +From 424c23191d81b072255bd7f178ad0ee2c2ea091a Mon Sep 17 00:00:00 2001 +From: Tomasz Olszak +Date: Fri, 25 Apr 2014 14:32:22 +0200 +Subject: [PATCH 10/21] Added manifest file according to smack 3-domain model. + +Bug-Tizen:TIVI-2416 + +Change-Id: I414e245a5c8847bec32ef6a97569d0f06221e1db +Signed-off-by: Tomasz Olszak +--- + packaging/qt5-qtwayland.manifest | 5 +++++ + packaging/qt5-qtwayland.spec | 4 ++++ + 2 files changed, 9 insertions(+) + create mode 100644 packaging/qt5-qtwayland.manifest + +diff --git a/packaging/qt5-qtwayland.manifest b/packaging/qt5-qtwayland.manifest +new file mode 100644 +index 0000000..75b0fa5 +--- /dev/null ++++ b/packaging/qt5-qtwayland.manifest +@@ -0,0 +1,5 @@ ++ ++ ++ ++ ++ +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0016-xdg-shell-Add-xdg-shell-protocol-file-version-1.4.0.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0016-xdg-shell-Add-xdg-shell-protocol-file-version-1.4.0.patch new file mode 100644 index 00000000..6bea6262 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0016-xdg-shell-Add-xdg-shell-protocol-file-version-1.4.0.patch @@ -0,0 +1,468 @@ +From 5cd43dc7519f54f9786fb6c686a2ce1e682d4366 Mon Sep 17 00:00:00 2001 +From: Philippe Coval +Date: Fri, 25 Apr 2014 10:31:42 +0200 +Subject: [PATCH 16/21] xdg-shell: Add xdg-shell protocol file version 1.4.0 + +Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.4.0 + +This file will need to be refreshed on protocol update +until xdg-shell land in wayland's public headers + +Task-number: QTBUG-38633/part/1of2 +Change-Id: I397d863dcfc2223ac6eb234c37dbcd7449ecffff +Reviewed-by: Giulio Camuffo +Origin: https://www.qt.gitorious.org/qt/qtwayland/commit/c2a22eea6716e073875474adf624d8463eba836c +Bug-Tizen: TIVI-3113/part +Signed-off-by: Philippe Coval +--- + src/3rdparty/protocol/xdg-shell.xml | 438 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 438 insertions(+) + create mode 100644 src/3rdparty/protocol/xdg-shell.xml + +diff --git a/src/3rdparty/protocol/xdg-shell.xml b/src/3rdparty/protocol/xdg-shell.xml +new file mode 100644 +index 0000000..4e5cff8 +--- /dev/null ++++ b/src/3rdparty/protocol/xdg-shell.xml +@@ -0,0 +1,438 @@ ++ ++ ++ ++ ++ Copyright © 2008-2013 Kristian Høgsberg ++ Copyright © 2013 Rafael Antognolli ++ Copyright © 2013 Jasper St. Pierre ++ Copyright © 2010-2013 Intel Corporation ++ ++ Permission to use, copy, modify, distribute, and sell this ++ software and its documentation for any purpose is hereby granted ++ without fee, provided that the above copyright notice appear in ++ all copies and that both that copyright notice and this permission ++ notice appear in supporting documentation, and that the name of ++ the copyright holders not be used in advertising or publicity ++ pertaining to distribution of the software without specific, ++ written prior permission. The copyright holders make no ++ representations about the suitability of this software for any ++ purpose. It is provided "as is" without express or implied ++ warranty. ++ ++ THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS ++ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND ++ FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY ++ SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ++ AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ++ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ++ THIS SOFTWARE. ++ ++ ++ ++ ++ This interface is implemented by servers that provide ++ desktop-style user interfaces. ++ ++ It allows clients to associate a xdg_surface with ++ a basic surface. ++ ++ ++ ++ ++ Use this enum to check the protocol version, and it will be updated ++ automatically. ++ ++ ++ ++ ++ ++ ++ ++ Use this request in order to enable use of this interface. ++ ++ Understand and agree that one is using an unstable interface, ++ that will likely change in the future, breaking the API. ++ ++ ++ ++ ++ ++ ++ Create a shell surface for an existing surface. ++ ++ Only one shell or popup surface can be associated with a given ++ surface. ++ ++ ++ ++ ++ ++ ++ ++ Create a popup surface for an existing surface. ++ ++ Only one shell or popup surface can be associated with a given ++ surface. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ An interface that may be implemented by a wl_surface, for ++ implementations that provide a desktop-style user interface. ++ ++ It provides requests to treat surfaces like windows, allowing to set ++ properties like maximized, fullscreen, minimized, and to move and resize ++ them, and associate metadata like title and app id. ++ ++ On the server side the object is automatically destroyed when ++ the related wl_surface is destroyed. On client side, ++ xdg_surface.destroy() must be called before destroying ++ the wl_surface object. ++ ++ ++ ++ ++ The xdg_surface interface is removed from the wl_surface object ++ that was turned into a xdg_surface with ++ xdg_shell.get_xdg_surface request. The xdg_surface properties, ++ like maximized and fullscreen, are lost. The wl_surface loses ++ its role as a xdg_surface. The wl_surface is unmapped. ++ ++ ++ ++ ++ ++ Setting a surface as transient of another means that it is child ++ of another surface. ++ ++ Child surfaces are stacked above their parents, and will be ++ unmapped if the parent is unmapped too. They should not appear ++ on task bars and alt+tab. ++ ++ ++ ++ ++ ++ ++ Set a short title for the surface. ++ ++ This string may be used to identify the surface in a task bar, ++ window list, or other user interface elements provided by the ++ compositor. ++ ++ The string must be encoded in UTF-8. ++ ++ ++ ++ ++ ++ ++ Set an id for the surface. ++ ++ The app id identifies the general class of applications to which ++ the surface belongs. ++ ++ It should be the ID that appears in the new desktop entry ++ specification, the interface name. ++ ++ ++ ++ ++ ++ ++ A client must respond to a ping event with a pong request or ++ the client may be deemed unresponsive. ++ ++ ++ ++ ++ ++ ++ Ping a client to check if it is receiving events and sending ++ requests. A client is expected to reply with a pong request. ++ ++ ++ ++ ++ ++ ++ Start a pointer-driven move of the surface. ++ ++ This request must be used in response to a button press event. ++ The server may ignore move requests depending on the state of ++ the surface (e.g. fullscreen or maximized). ++ ++ ++ ++ ++ ++ ++ ++ These values are used to indicate which edge of a surface ++ is being dragged in a resize operation. The server may ++ use this information to adapt its behavior, e.g. choose ++ an appropriate cursor image. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Start a pointer-driven resizing of the surface. ++ ++ This request must be used in response to a button press event. ++ The server may ignore resize requests depending on the state of ++ the surface (e.g. fullscreen or maximized). ++ ++ ++ ++ ++ ++ ++ ++ ++ The configure event asks the client to resize its surface. ++ ++ The size is a hint, in the sense that the client is free to ++ ignore it if it doesn't resize, pick a smaller size (to ++ satisfy aspect ratio or resize in steps of NxM pixels). ++ ++ The edges parameter provides a hint about how the surface ++ was resized. The client may use this information to decide ++ how to adjust its content to the new size (e.g. a scrolling ++ area might adjust its content position to leave the viewable ++ content unmoved). Valid edge values are from resize_edge enum. ++ ++ The client is free to dismiss all but the last configure ++ event it received. ++ ++ The width and height arguments specify the size of the window ++ in surface local coordinates. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Set the default output used by this surface when it is first mapped. ++ ++ If this value is NULL (default), it's up to the compositor to choose ++ which display will be used to map this surface. ++ ++ When fullscreen or maximized state are set on this surface, and it ++ wasn't mapped yet, the output set with this method will be used. ++ Otherwise, the output where the surface is currently mapped will be ++ used. ++ ++ ++ ++ ++ ++ ++ Event sent from the compositor to the client requesting that the client ++ goes to a fullscreen state. It's the client job to call set_fullscreen ++ and really trigger the fullscreen state. ++ ++ ++ ++ ++ ++ Event sent from the compositor to the client requesting that the client ++ leaves the fullscreen state. It's the client job to call ++ unset_fullscreen and really leave the fullscreen state. ++ ++ ++ ++ ++ ++ Set the surface as fullscreen. ++ ++ After this request, the compositor should send a configure event ++ informing the output size. ++ ++ This request informs the compositor that the next attached buffer ++ committed will be in a fullscreen state. The buffer size should be the ++ same size as the size informed in the configure event, if the client ++ doesn't want to leave any empty area. ++ ++ In other words: the next attached buffer after set_maximized is the new ++ maximized buffer. And the surface will be positioned at the maximized ++ position on commit. ++ ++ A simple way to synchronize and wait for the correct configure event is ++ to use a wl_display.sync request right after the set_fullscreen ++ request. When the sync callback returns, the last configure event ++ received just before it will be the correct one, and should contain the ++ right size for the surface to maximize. ++ ++ Setting one state won't unset another state. Use ++ xdg_surface.unset_fullscreen for unsetting it. ++ ++ ++ ++ ++ ++ Unset the surface fullscreen state. ++ ++ Same negotiation as set_fullscreen must be used. ++ ++ ++ ++ ++ ++ Event sent from the compositor to the client requesting that the client ++ goes to a maximized state. It's the client job to call set_maximized ++ and really trigger the maximized state. ++ ++ ++ ++ ++ ++ Event sent from the compositor to the client requesting that the client ++ leaves the maximized state. It's the client job to call unset_maximized ++ and really leave the maximized state. ++ ++ ++ ++ ++ ++ Set the surface as maximized. ++ ++ After this request, the compositor will send a configure event ++ informing the output size minus panel and other MW decorations. ++ ++ This request informs the compositor that the next attached buffer ++ committed will be in a maximized state. The buffer size should be the ++ same size as the size informed in the configure event, if the client ++ doesn't want to leave any empty area. ++ ++ In other words: the next attached buffer after set_maximized is the new ++ maximized buffer. And the surface will be positioned at the maximized ++ position on commit. ++ ++ A simple way to synchronize and wait for the correct configure event is ++ to use a wl_display.sync request right after the set_maximized request. ++ When the sync callback returns, the last configure event received just ++ before it will be the correct one, and should contain the right size ++ for the surface to maximize. ++ ++ Setting one state won't unset another state. Use ++ xdg_surface.unset_maximized for unsetting it. ++ ++ ++ ++ ++ ++ Unset the surface maximized state. ++ ++ Same negotiation as set_maximized must be used. ++ ++ ++ ++ ++ ++ Set the surface minimized state. ++ ++ Setting one state won't unset another state. ++ ++ ++ ++ ++ ++ The focused_set event is sent when this surface has been ++ activated. Window decorations should be updated accordingly. ++ ++ ++ ++ ++ ++ The focused_unset event is sent when this surface has been ++ deactivated, because another surface has been activated. Window ++ decorations should be updated accordingly. ++ ++ ++ ++ ++ ++ ++ An interface that may be implemented by a wl_surface, for ++ implementations that provide a desktop-style popups/menus. A popup ++ surface is a transient surface with an added pointer grab. ++ ++ An existing implicit grab will be changed to owner-events mode, ++ and the popup grab will continue after the implicit grab ends ++ (i.e. releasing the mouse button does not cause the popup to be ++ unmapped). ++ ++ The popup grab continues until the window is destroyed or a mouse ++ button is pressed in any other clients window. A click in any of ++ the clients surfaces is reported as normal, however, clicks in ++ other clients surfaces will be discarded and trigger the callback. ++ ++ The x and y arguments specify the locations of the upper left ++ corner of the surface relative to the upper left corner of the ++ parent surface, in surface local coordinates. ++ ++ xdg_popup surfaces are always transient for another surface. ++ ++ ++ ++ ++ The xdg_surface interface is removed from the wl_surface object ++ that was turned into a xdg_surface with ++ xdg_shell.get_xdg_surface request. The xdg_surface properties, ++ like maximized and fullscreen, are lost. The wl_surface loses ++ its role as a xdg_surface. The wl_surface is unmapped. ++ ++ ++ ++ ++ ++ A client must respond to a ping event with a pong request or ++ the client may be deemed unresponsive. ++ ++ ++ ++ ++ ++ ++ Ping a client to check if it is receiving events and sending ++ requests. A client is expected to reply with a pong request. ++ ++ ++ ++ ++ ++ ++ The popup_done event is sent out when a popup grab is broken, ++ that is, when the users clicks a surface that doesn't belong ++ to the client owning the popup surface. ++ ++ ++ ++ ++ ++ +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0017-xdg-shell-Add-minimize-feature-to-QWindow-using-wayl.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0017-xdg-shell-Add-minimize-feature-to-QWindow-using-wayl.patch new file mode 100644 index 00000000..fe1bb50e --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0017-xdg-shell-Add-minimize-feature-to-QWindow-using-wayl.patch @@ -0,0 +1,1029 @@ +From 0edba039247ce888dbb7ff0a93c7b9ec01bac46e Mon Sep 17 00:00:00 2001 +From: Philippe Coval +Date: Wed, 26 Mar 2014 10:16:01 +0100 +Subject: [PATCH 17/21] xdg-shell: Add minimize feature to QWindow using + wayland's xdg-shell + +The feature is disabled by default, +and can be enabled at runtime +by exporting QT_WAYLAND_USE_XDG_SHELL env variable. + +This patch relies on presence of protocol file +which has been imported from weston-1.4.0 sources, +until the xdg-shell is merge into wayland itself. + +Because xdg-shell is experimental, +code fallback to WaylandShell if no XdgShell +but keep in mind those shells are exclusive. + +Since xdg-shell and wayland-shell share most of the API, +some factorization is done by an (empty) abstraction class +to keep the code more readable. + +Despite xdg-shell introduces new popups concept, +they're not used on this change for maitainance purpose. + +Notes: + +* This change depends on presence of xdg-shell protocol file. + +* You can check a demo video + (qt-tizen-cinematic-experience-20140430-rzr) + of the test case at : + https://www.youtube.com/watch?v=pY_XXvKc_0E# + +* Use Super+Tab to show window again if hidden + +Task-number: QTBUG-38633/part/2of2 +Change-Id: I2d7ed85bea1847d82439fdfc893a3dbb2581ffff +Reviewed-by: Giulio Camuffo +Origin: https://www.qt.gitorious.org/qt/qtwayland/commit/768484daaa64bea965bef981a16f59be8db0c190 +Bug-Tizen: TIVI-3113/part +Signed-off-by: Philippe Coval +--- + src/client/client.pro | 5 + + src/client/qwaylanddisplay.cpp | 5 + + src/client/qwaylanddisplay_p.h | 4 + + src/client/qwaylandshellsurface.cpp | 134 ------------------------ + src/client/qwaylandshellsurface_p.h | 40 +++----- + src/client/qwaylandwindow.cpp | 40 ++++++-- + src/client/qwaylandwlshellsurface.cpp | 186 ++++++++++++++++++++++++++++++++++ + src/client/qwaylandwlshellsurface_p.h | 101 ++++++++++++++++++ + src/client/qwaylandxdgsurface.cpp | 173 +++++++++++++++++++++++++++++++ + src/client/qwaylandxdgsurface_p.h | 105 +++++++++++++++++++ + 10 files changed, 625 insertions(+), 168 deletions(-) + create mode 100644 src/client/qwaylandwlshellsurface.cpp + create mode 100644 src/client/qwaylandwlshellsurface_p.h + create mode 100644 src/client/qwaylandxdgsurface.cpp + create mode 100644 src/client/qwaylandxdgsurface_p.h + +diff --git a/src/client/client.pro b/src/client/client.pro +index 10cbd31..9ecf82f 100644 +--- a/src/client/client.pro ++++ b/src/client/client.pro +@@ -41,6 +41,7 @@ WAYLANDCLIENTSOURCES += \ + ../extensions/qtkey-extension.xml \ + ../extensions/windowmanager.xml \ + ../3rdparty/protocol/text.xml \ ++ ../3rdparty/protocol/xdg-shell.xml \ + + SOURCES += qwaylandintegration.cpp \ + qwaylandnativeinterface.cpp \ +@@ -57,6 +58,8 @@ SOURCES += qwaylandintegration.cpp \ + qwaylanddatadevicemanager.cpp \ + qwaylanddatasource.cpp \ + qwaylandshellsurface.cpp \ ++ qwaylandwlshellsurface.cpp \ ++ qwaylandxdgsurface.cpp \ + qwaylandextendedoutput.cpp \ + qwaylandextendedsurface.cpp \ + qwaylandsubsurface.cpp \ +@@ -85,6 +88,8 @@ HEADERS += qwaylandintegration_p.h \ + qwaylanddatadevicemanager_p.h \ + qwaylanddatasource_p.h \ + qwaylandshellsurface_p.h \ ++ qwaylandwlshellsurface_p.h \ ++ qwaylandxdgsurface_p.h \ + qwaylandextendedoutput_p.h \ + qwaylandextendedsurface_p.h \ + qwaylandsubsurface_p.h \ +diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp +index 0b715c0..7f953ad 100644 +--- a/src/client/qwaylanddisplay.cpp ++++ b/src/client/qwaylanddisplay.cpp +@@ -61,6 +61,7 @@ + #include "qwaylandqtkey_p.h" + + #include ++#include + + #include + #include +@@ -206,6 +207,10 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin + mCompositor.init(registry, id); + } else if (interface == QStringLiteral("wl_shm")) { + mShm = static_cast(wl_registry_bind(registry, id, &wl_shm_interface,1)); ++ } else if (interface == QStringLiteral("xdg_shell") ++ && qEnvironmentVariableIsSet("QT_WAYLAND_USE_XDG_SHELL")) { ++ mShellXdg.reset(new QtWayland::xdg_shell(registry, id)); ++ mShellXdg->use_unstable_version(QtWayland::xdg_shell::version_current); + } else if (interface == QStringLiteral("wl_shell")){ + mShell.reset(new QtWayland::wl_shell(registry, id)); + } else if (interface == QStringLiteral("wl_seat")) { +diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h +index 40cb2b2..cf5dfc2 100644 +--- a/src/client/qwaylanddisplay_p.h ++++ b/src/client/qwaylanddisplay_p.h +@@ -51,6 +51,7 @@ + + #include + #include ++#include + + struct wl_cursor_image; + +@@ -78,6 +79,7 @@ namespace QtWayland { + class qt_sub_surface_extension; + class qt_surface_extension; + class wl_text_input_manager; ++ class xdg_shell; + } + + typedef void (*RegistryListener)(void *data, +@@ -113,6 +115,7 @@ public: + QtWayland::wl_compositor *compositor() { return &mCompositor; } + + QtWayland::wl_shell *shell() { return mShell.data(); } ++ QtWayland::xdg_shell *shellXdg() { return mShellXdg.data(); } + + QList inputDevices() const { return mInputDevices; } + QWaylandInputDevice *defaultInputDevice() const; +@@ -168,6 +171,7 @@ private: + QThread *mEventThread; + QWaylandEventThread *mEventThreadObject; + QScopedPointer mShell; ++ QScopedPointer mShellXdg; + QList mScreens; + QList mInputDevices; + QList mRegistryListeners; +diff --git a/src/client/qwaylandshellsurface.cpp b/src/client/qwaylandshellsurface.cpp +index b7a819f..80e509b 100644 +--- a/src/client/qwaylandshellsurface.cpp ++++ b/src/client/qwaylandshellsurface.cpp +@@ -40,137 +40,3 @@ + ****************************************************************************/ + + #include "qwaylandshellsurface_p.h" +- +-#include "qwaylanddisplay_p.h" +-#include "qwaylandwindow_p.h" +-#include "qwaylandinputdevice_p.h" +-#include "qwaylanddecoration_p.h" +-#include "qwaylandscreen_p.h" +- +-#include +- +-QT_BEGIN_NAMESPACE +- +-QWaylandShellSurface::QWaylandShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window) +- : QtWayland::wl_shell_surface(shell_surface) +- , m_window(window) +- , m_maximized(false) +- , m_fullscreen(false) +-{ +-} +- +-QWaylandShellSurface::~QWaylandShellSurface() +-{ +- wl_shell_surface_destroy(object()); +-} +- +-void QWaylandShellSurface::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) +-{ +- resize(inputDevice->wl_seat(), +- inputDevice->serial(), +- edges); +-} +- +-void QWaylandShellSurface::move(QWaylandInputDevice *inputDevice) +-{ +- move(inputDevice->wl_seat(), +- inputDevice->serial()); +-} +- +-void QWaylandShellSurface::setMaximized() +-{ +- m_maximized = true; +- m_size = m_window->window()->geometry().size(); +- set_maximized(0); +-} +- +-void QWaylandShellSurface::setFullscreen() +-{ +- m_fullscreen = true; +- m_size = m_window->window()->geometry().size(); +- set_fullscreen(WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, 0); +-} +- +-void QWaylandShellSurface::setNormal() +-{ +- if (m_fullscreen || m_maximized) { +- m_fullscreen = m_maximized = false; +- setTopLevel(); +- QMargins m = m_window->frameMargins(); +- m_window->configure(0, m_size.width() + m.left() + m.right(), m_size.height() + m.top() + m.bottom()); +- } +-} +- +-void QWaylandShellSurface::setMinimized() +-{ +- // TODO: There's no wl_shell_surface API for this +-} +- +-void QWaylandShellSurface::setTopLevel() +-{ +- set_toplevel(); +-} +- +-void QWaylandShellSurface::updateTransientParent(QWindow *parent) +-{ +- QWaylandWindow *parent_wayland_window = static_cast(parent->handle()); +- if (!parent_wayland_window) +- return; +- +- // set_transient expects a position relative to the parent +- QPoint transientPos = m_window->geometry().topLeft(); // this is absolute +- QWindow *parentWin = m_window->window()->transientParent(); +- transientPos -= parentWin->geometry().topLeft(); +- if (parent_wayland_window->decoration()) { +- transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left()); +- transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top()); +- } +- +- uint32_t flags = 0; +- Qt::WindowFlags wf = m_window->window()->flags(); +- if (wf.testFlag(Qt::ToolTip) +- || wf.testFlag(Qt::WindowTransparentForInput)) +- flags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE; +- +- set_transient(parent_wayland_window->object(), +- transientPos.x(), +- transientPos.y(), +- flags); +-} +- +-void QWaylandShellSurface::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial) +-{ +- QWaylandWindow *parent_wayland_window = parent; +- if (!parent_wayland_window) +- return; +- +- // set_popup expects a position relative to the parent +- QPoint transientPos = m_window->geometry().topLeft(); // this is absolute +- transientPos -= parent_wayland_window->geometry().topLeft(); +- if (parent_wayland_window->decoration()) { +- transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left()); +- transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top()); +- } +- +- set_popup(device->wl_seat(), serial, parent_wayland_window->object(), +- transientPos.x(), transientPos.y(), 0); +-} +- +-void QWaylandShellSurface::shell_surface_ping(uint32_t serial) +-{ +- pong(serial); +-} +- +-void QWaylandShellSurface::shell_surface_configure(uint32_t edges, +- int32_t width, +- int32_t height) +-{ +- m_window->configure(edges, width, height); +-} +- +-void QWaylandShellSurface::shell_surface_popup_done() +-{ +- QCoreApplication::postEvent(m_window->window(), new QCloseEvent()); +-} +- +-QT_END_NAMESPACE +diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h +index 2477c3f..2f59f60 100644 +--- a/src/client/qwaylandshellsurface_p.h ++++ b/src/client/qwaylandshellsurface_p.h +@@ -55,39 +55,25 @@ class QWaylandWindow; + class QWaylandInputDevice; + class QWindow; + +-class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface : public QtWayland::wl_shell_surface ++class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface + { + public: +- QWaylandShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window); +- ~QWaylandShellSurface(); ++ virtual ~QWaylandShellSurface() {} ++ virtual void resize(QWaylandInputDevice * /*inputDevice*/, enum wl_shell_surface_resize /*edges*/) ++ {} + +- using QtWayland::wl_shell_surface::resize; +- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges); +- +- using QtWayland::wl_shell_surface::move; +- void move(QWaylandInputDevice *inputDevice); ++ virtual void move(QWaylandInputDevice * /*inputDevice*/) {} ++ virtual void setTitle(const QString & /*title*/) {} ++ virtual void setAppId(const QString & /*appId*/) {} + + private: +- void setMaximized(); +- void setFullscreen(); +- void setNormal(); +- void setMinimized(); +- +- void setTopLevel(); +- void updateTransientParent(QWindow *parent); +- void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial); +- +- QWaylandWindow *m_window; +- bool m_maximized; +- bool m_fullscreen; +- QSize m_size; +- +- void shell_surface_ping(uint32_t serial) Q_DECL_OVERRIDE; +- void shell_surface_configure(uint32_t edges, +- int32_t width, +- int32_t height) Q_DECL_OVERRIDE; +- void shell_surface_popup_done() Q_DECL_OVERRIDE; ++ virtual void setMaximized() {} ++ virtual void setFullscreen() {} ++ virtual void setNormal() {} ++ virtual void setMinimized() {} + ++ virtual void setTopLevel() {} ++ virtual void updateTransientParent(QWindow * /*parent*/) {} + friend class QWaylandWindow; + }; + +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 920c977..3fb3a49 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -46,6 +46,8 @@ + #include "qwaylandinputdevice_p.h" + #include "qwaylandscreen_p.h" + #include "qwaylandshellsurface_p.h" ++#include "qwaylandwlshellsurface_p.h" ++#include "qwaylandxdgsurface_p.h" + #include "qwaylandextendedsurface_p.h" + #include "qwaylandsubsurface_p.h" + #include "qwaylanddecoration_p.h" +@@ -92,8 +94,16 @@ QWaylandWindow::QWaylandWindow(QWindow *window) + static WId id = 1; + mWindowId = id++; + +- if (mDisplay->shell() && window->type() & Qt::Window && !(window->flags() & Qt::BypassWindowManagerHint)) +- mShellSurface = new QWaylandShellSurface(mDisplay->shell()->get_shell_surface(object()), this); ++ if (!(window->flags() & Qt::BypassWindowManagerHint)) { ++ if (mDisplay->shellXdg()) { ++ if (window->type() & Qt::Window) { ++ mShellSurface = new QWaylandXdgSurface(mDisplay->shellXdg()->get_xdg_surface(object()), this); ++ } ++ } else if (mDisplay->shell() && window->type() & Qt::Window) { ++ mShellSurface = new QWaylandWlShellSurface(mDisplay->shell()->get_shell_surface(object()), this); ++ } ++ } ++ + if (mDisplay->windowExtension()) + mExtendedWindow = new QWaylandExtendedSurface(this, mDisplay->windowExtension()->get_extended_surface(object())); + if (mDisplay->subSurfaceExtension()) +@@ -101,12 +111,12 @@ QWaylandWindow::QWaylandWindow(QWindow *window) + + if (mShellSurface) { + // Set initial surface title +- mShellSurface->set_title(window->title()); ++ mShellSurface->setTitle(window->title()); + + // Set surface class to the .desktop file name (obtained from executable name) + QFileInfo exeFileInfo(qApp->applicationFilePath()); + QString className = exeFileInfo.baseName() + QLatin1String(".desktop"); +- mShellSurface->set_class(className); ++ mShellSurface->setAppId(className); + } + + if (QPlatformWindow::parent() && mSubSurfaceWindow) { +@@ -170,7 +180,7 @@ void QWaylandWindow::setParent(const QPlatformWindow *parent) + void QWaylandWindow::setWindowTitle(const QString &title) + { + if (mShellSurface) { +- mShellSurface->set_title(title); ++ mShellSurface->setTitle(title); + } + + if (mWindowDecoration && window()->isVisible()) +@@ -212,8 +222,10 @@ void QWaylandWindow::setVisible(bool visible) + mMouseDevice = parent->mMouseDevice; + mMouseSerial = parent->mMouseSerial; + +- if (mMouseDevice) +- mShellSurface->setPopup(transientParent(), mMouseDevice, mMouseSerial); ++ QWaylandWlShellSurface *wlshellSurface = dynamic_cast(mShellSurface); ++ if (mMouseDevice && wlshellSurface) { ++ wlshellSurface->setPopup(transientParent(), mMouseDevice, mMouseSerial); ++ } + } + + if (!mSentInitialResize) { +@@ -428,6 +440,20 @@ void QWaylandWindow::setWindowFlags(Qt::WindowFlags flags) + + bool QWaylandWindow::createDecoration() + { ++ // so far only xdg-shell support this "unminimize" trick, may be moved elsewhere ++ if (mState == Qt::WindowMinimized) { ++ QWaylandXdgSurface *xdgSurface = dynamic_cast(mShellSurface); ++ if ( xdgSurface ) { ++ if (xdgSurface->isFullscreen()) { ++ setWindowStateInternal(Qt::WindowFullScreen); ++ } else if (xdgSurface->isMaximized()) { ++ setWindowStateInternal(Qt::WindowMaximized); ++ } else { ++ setWindowStateInternal(Qt::WindowNoState); ++ } ++ } ++ } ++ + static bool disableWaylandDecorations = !qgetenv("QT_WAYLAND_DISABLE_WINDOWDECORATION").isEmpty(); + if (disableWaylandDecorations) + return false; +diff --git a/src/client/qwaylandwlshellsurface.cpp b/src/client/qwaylandwlshellsurface.cpp +new file mode 100644 +index 0000000..4b73ec2 +--- /dev/null ++++ b/src/client/qwaylandwlshellsurface.cpp +@@ -0,0 +1,186 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include "qwaylandwlshellsurface_p.h" ++ ++#include "qwaylanddisplay_p.h" ++#include "qwaylandwindow_p.h" ++#include "qwaylandinputdevice_p.h" ++#include "qwaylanddecoration_p.h" ++#include "qwaylandscreen_p.h" ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window) ++ : QtWayland::wl_shell_surface(shell_surface) ++ , m_window(window) ++ , m_maximized(false) ++ , m_fullscreen(false) ++{ ++} ++ ++QWaylandWlShellSurface::~QWaylandWlShellSurface() ++{ ++ wl_shell_surface_destroy(object()); ++} ++ ++void QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) ++{ ++ resize(inputDevice->wl_seat(), ++ inputDevice->serial(), ++ edges); ++} ++ ++void QWaylandWlShellSurface::move(QWaylandInputDevice *inputDevice) ++{ ++ move(inputDevice->wl_seat(), ++ inputDevice->serial()); ++} ++ ++void QWaylandWlShellSurface::setTitle(const QString & title) ++{ ++ return QtWayland::wl_shell_surface::set_title(title); ++} ++ ++void QWaylandWlShellSurface::setAppId(const QString & appId) ++{ ++ return QtWayland::wl_shell_surface::set_class(appId); ++} ++ ++void QWaylandWlShellSurface::setMaximized() ++{ ++ m_maximized = true; ++ m_size = m_window->window()->geometry().size(); ++ set_maximized(0); ++} ++ ++void QWaylandWlShellSurface::setFullscreen() ++{ ++ m_fullscreen = true; ++ m_size = m_window->window()->geometry().size(); ++ set_fullscreen(WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, 0); ++} ++ ++void QWaylandWlShellSurface::setNormal() ++{ ++ if (m_fullscreen || m_maximized) { ++ m_fullscreen = m_maximized = false; ++ setTopLevel(); ++ QMargins m = m_window->frameMargins(); ++ m_window->configure(0, m_size.width() + m.left() + m.right(), m_size.height() + m.top() + m.bottom()); ++ } ++} ++ ++void QWaylandWlShellSurface::setMinimized() ++{ ++ // TODO: There's no wl_shell_surface API for this ++} ++ ++void QWaylandWlShellSurface::setTopLevel() ++{ ++ set_toplevel(); ++} ++ ++void QWaylandWlShellSurface::updateTransientParent(QWindow *parent) ++{ ++ QWaylandWindow *parent_wayland_window = static_cast(parent->handle()); ++ if (!parent_wayland_window) ++ return; ++ ++ // set_transient expects a position relative to the parent ++ QPoint transientPos = m_window->geometry().topLeft(); // this is absolute ++ QWindow *parentWin = m_window->window()->transientParent(); ++ transientPos -= parentWin->geometry().topLeft(); ++ if (parent_wayland_window->decoration()) { ++ transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left()); ++ transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top()); ++ } ++ ++ uint32_t flags = 0; ++ Qt::WindowFlags wf = m_window->window()->flags(); ++ if (wf.testFlag(Qt::ToolTip) ++ || wf.testFlag(Qt::WindowTransparentForInput)) ++ flags |= WL_SHELL_SURFACE_TRANSIENT_INACTIVE; ++ ++ set_transient(parent_wayland_window->object(), ++ transientPos.x(), ++ transientPos.y(), ++ flags); ++} ++ ++void QWaylandWlShellSurface::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial) ++{ ++ QWaylandWindow *parent_wayland_window = parent; ++ if (!parent_wayland_window) ++ return; ++ ++ // set_popup expects a position relative to the parent ++ QPoint transientPos = m_window->geometry().topLeft(); // this is absolute ++ transientPos -= parent_wayland_window->geometry().topLeft(); ++ if (parent_wayland_window->decoration()) { ++ transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left()); ++ transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top()); ++ } ++ ++ set_popup(device->wl_seat(), serial, parent_wayland_window->object(), ++ transientPos.x(), transientPos.y(), 0); ++} ++ ++void QWaylandWlShellSurface::shell_surface_ping(uint32_t serial) ++{ ++ pong(serial); ++} ++ ++void QWaylandWlShellSurface::shell_surface_configure(uint32_t edges, ++ int32_t width, ++ int32_t height) ++{ ++ m_window->configure(edges, width, height); ++} ++ ++void QWaylandWlShellSurface::shell_surface_popup_done() ++{ ++ QCoreApplication::postEvent(m_window->window(), new QCloseEvent()); ++} ++ ++QT_END_NAMESPACE +diff --git a/src/client/qwaylandwlshellsurface_p.h b/src/client/qwaylandwlshellsurface_p.h +new file mode 100644 +index 0000000..d02bb7b +--- /dev/null ++++ b/src/client/qwaylandwlshellsurface_p.h +@@ -0,0 +1,101 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QWAYLANDWLSHELLSURFACE_H ++#define QWAYLANDWLSHELLSURFACE_H ++ ++#include ++ ++#include ++ ++#include ++#include ++#include "qwaylandshellsurface_p.h" ++ ++QT_BEGIN_NAMESPACE ++ ++class QWaylandWindow; ++class QWaylandInputDevice; ++class QWindow; ++ ++class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellSurface : public QtWayland::wl_shell_surface ++ , public QWaylandShellSurface ++{ ++public: ++ QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window); ++ virtual ~QWaylandWlShellSurface(); ++ ++ using QtWayland::wl_shell_surface::resize; ++ void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE; ++ ++ using QtWayland::wl_shell_surface::move; ++ void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE; ++ ++ void setTitle(const QString & title) Q_DECL_OVERRIDE; ++ void setAppId(const QString &appId) Q_DECL_OVERRIDE; ++ ++private: ++ void setMaximized() Q_DECL_OVERRIDE; ++ void setFullscreen() Q_DECL_OVERRIDE; ++ void setNormal() Q_DECL_OVERRIDE; ++ void setMinimized() Q_DECL_OVERRIDE; ++ ++ void setTopLevel() Q_DECL_OVERRIDE; ++ void updateTransientParent(QWindow *parent) Q_DECL_OVERRIDE; ++ void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial); ++ ++ QWaylandWindow *m_window; ++ bool m_maximized; ++ bool m_fullscreen; ++ QSize m_size; ++ ++ void shell_surface_ping(uint32_t serial) Q_DECL_OVERRIDE; ++ void shell_surface_configure(uint32_t edges, ++ int32_t width, ++ int32_t height) Q_DECL_OVERRIDE; ++ void shell_surface_popup_done() Q_DECL_OVERRIDE; ++ ++ friend class QWaylandWindow; ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QWAYLANDSHELLSURFACE_H +diff --git a/src/client/qwaylandxdgsurface.cpp b/src/client/qwaylandxdgsurface.cpp +new file mode 100644 +index 0000000..1b8affa +--- /dev/null ++++ b/src/client/qwaylandxdgsurface.cpp +@@ -0,0 +1,173 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include "qwaylandxdgsurface_p.h" ++ ++#include "qwaylanddisplay_p.h" ++#include "qwaylandwindow_p.h" ++#include "qwaylandinputdevice_p.h" ++#include "qwaylanddecoration_p.h" ++#include "qwaylandscreen_p.h" ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QWaylandXdgSurface::QWaylandXdgSurface(struct ::xdg_surface *xdg_surface, QWaylandWindow *window) ++ : QtWayland::xdg_surface(xdg_surface) ++ , m_window(window) ++ , m_maximized(false) ++ , m_minimized(false) ++ , m_fullscreen(false) ++{ ++} ++ ++QWaylandXdgSurface::~QWaylandXdgSurface() ++{ ++ xdg_surface_destroy(object()); ++} ++ ++void QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) ++{ ++ // May need some conversion if types get incompatibles, ATM they're identical ++ enum resize_edge const * const arg = reinterpret_cast(&edges); ++ resize(inputDevice, *arg); ++} ++ ++void QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, enum resize_edge edges) ++{ ++ resize(inputDevice->wl_seat(), ++ inputDevice->serial(), ++ edges); ++} ++ ++void QWaylandXdgSurface::move(QWaylandInputDevice *inputDevice) ++{ ++ move(inputDevice->wl_seat(), ++ inputDevice->serial()); ++} ++ ++void QWaylandXdgSurface::setMaximized() ++{ ++ m_maximized = true; ++ m_size = m_window->window()->geometry().size(); ++ set_maximized(); ++} ++ ++void QWaylandXdgSurface::setFullscreen() ++{ ++ m_fullscreen = true; ++ m_size = m_window->window()->geometry().size(); ++ set_fullscreen(); ++} ++ ++void QWaylandXdgSurface::setNormal() ++{ ++ if (m_fullscreen || m_maximized || m_minimized) { ++ if (m_maximized) { unset_maximized(); } ++ if (m_fullscreen) { unset_fullscreen(); } ++ ++ m_fullscreen = m_maximized = m_minimized = false; ++ setTopLevel(); ++ QMargins m = m_window->frameMargins(); ++ m_window->configure(0, m_size.width() + m.left() + m.right(), m_size.height() + m.top() + m.bottom()); ++ } ++} ++ ++void QWaylandXdgSurface::setMinimized() ++{ ++ m_minimized = true; ++ m_size = m_window->window()->geometry().size(); ++ set_minimized(); ++} ++ ++void QWaylandXdgSurface::setTopLevel() ++{ ++ // There's no xdg_shell_surface API for this, ignoring ++} ++ ++void QWaylandXdgSurface::updateTransientParent(QWindow *parent) ++{ ++ QWaylandWindow *parent_wayland_window = static_cast(parent->handle()); ++ if (!parent_wayland_window) ++ return; ++ ++ // set_transient expects a position relative to the parent ++ QPoint transientPos = m_window->geometry().topLeft(); // this is absolute ++ QWindow *parentWin = m_window->window()->transientParent(); ++ transientPos -= parentWin->geometry().topLeft(); ++ if (parent_wayland_window->decoration()) { ++ transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left()); ++ transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top()); ++ } ++ ++ uint32_t flags = 0; ++ Qt::WindowFlags wf = m_window->window()->flags(); ++ if (wf.testFlag(Qt::ToolTip) ++ || wf.testFlag(Qt::WindowTransparentForInput)) ++ flags |= XDG_SURFACE_SET_TRANSIENT_FOR; ++ ++ set_transient_for(parent_wayland_window->object()); ++} ++ ++void QWaylandXdgSurface::setTitle(const QString & title) ++{ ++ return QtWayland::xdg_surface::set_title(title); ++} ++ ++void QWaylandXdgSurface::setAppId(const QString & appId) ++{ ++ return QtWayland::xdg_surface::set_app_id(appId); ++} ++ ++void QWaylandXdgSurface::xdg_surface_ping(uint32_t serial) ++{ ++ pong(serial); ++} ++ ++void QWaylandXdgSurface::xdg_surface_configure(uint32_t edges, int32_t width, ++ int32_t height) ++{ ++ m_window->configure(edges, width, height); ++} ++ ++ ++QT_END_NAMESPACE +diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h +new file mode 100644 +index 0000000..744d3f3 +--- /dev/null ++++ b/src/client/qwaylandxdgsurface_p.h +@@ -0,0 +1,105 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QWAYLANDXDGSURFACE_H ++#define QWAYLANDXDGSURFACE_H ++ ++#include ++ ++#include ++ ++#include ++#include ++#include "qwaylandshellsurface_p.h" ++ ++QT_BEGIN_NAMESPACE ++ ++class QWaylandWindow; ++class QWaylandInputDevice; ++class QWindow; ++ ++class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgSurface : public QtWayland::xdg_surface ++ , public QWaylandShellSurface ++{ ++public: ++ QWaylandXdgSurface(struct ::xdg_surface *shell_surface, QWaylandWindow *window); ++ virtual ~QWaylandXdgSurface(); ++ ++ using QtWayland::xdg_surface::resize; ++ void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges); ++ ++ void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE; ++ ++ using QtWayland::xdg_surface::move; ++ void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE; ++ ++ void setTitle(const QString &title) Q_DECL_OVERRIDE; ++ void setAppId(const QString &appId) Q_DECL_OVERRIDE; ++ ++ bool isFullscreen() const { return m_fullscreen; } ++ bool isMaximized() const { return m_maximized; } ++ ++private: ++ void setMaximized() Q_DECL_OVERRIDE; ++ void setFullscreen() Q_DECL_OVERRIDE; ++ void setNormal() Q_DECL_OVERRIDE; ++ void setMinimized() Q_DECL_OVERRIDE; ++ ++ void setTopLevel() Q_DECL_OVERRIDE; ++ void updateTransientParent(QWindow *parent) Q_DECL_OVERRIDE; ++ ++private: ++ QWaylandWindow *m_window; ++ bool m_maximized; ++ bool m_minimized; ++ bool m_fullscreen; ++ QSize m_size; ++ ++ void xdg_surface_ping(uint32_t serial) Q_DECL_OVERRIDE; ++ void xdg_surface_configure(uint32_t edges, ++ int32_t width, ++ int32_t height) Q_DECL_OVERRIDE; ++ friend class QWaylandWindow; ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QWAYLANDXDGSURFACE_H +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0019-xdg-shell-upgrade-to-support-current-version-weston-.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0019-xdg-shell-upgrade-to-support-current-version-weston-.patch new file mode 100644 index 00000000..8f0425a7 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0019-xdg-shell-upgrade-to-support-current-version-weston-.patch @@ -0,0 +1,772 @@ +From c4219cca0febd7119e0bec776fdc2877b3448e0b Mon Sep 17 00:00:00 2001 +From: Philippe Coval +Date: Tue, 10 Jun 2014 16:22:17 +0200 +Subject: [PATCH 19/21] xdg-shell: upgrade to support current version + (weston-1.5.0) + +The protocol file is a raw copy of + +Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.5.0 + +Task-number: QTBUG-38633/related +Reviewed-by: Giulio Camuffo +Reviewed-by: Philippe Coval +Origin: https://www.qt.gitorious.org/qt/qtwayland/commit/4bac130b97fbaa565aa9883eb302557ef0185d50 +Change-Id: I41ca2f89c09a8b6348ce2fbf6d59f44b4c81ffff +--- + src/3rdparty/protocol/xdg-shell.xml | 288 ++++++++++++++++++------------------ + src/client/client.pro | 2 + + src/client/qwaylanddisplay.cpp | 10 +- + src/client/qwaylanddisplay_p.h | 5 +- + src/client/qwaylandxdgshell.cpp | 77 ++++++++++ + src/client/qwaylandxdgshell_p.h | 73 +++++++++ + src/client/qwaylandxdgsurface.cpp | 60 ++++++-- + src/client/qwaylandxdgsurface_p.h | 11 +- + 8 files changed, 364 insertions(+), 162 deletions(-) + create mode 100644 src/client/qwaylandxdgshell.cpp + create mode 100644 src/client/qwaylandxdgshell_p.h + +diff --git a/src/3rdparty/protocol/xdg-shell.xml b/src/3rdparty/protocol/xdg-shell.xml +index 4e5cff8..79a2831 100644 +--- a/src/3rdparty/protocol/xdg-shell.xml ++++ b/src/3rdparty/protocol/xdg-shell.xml +@@ -40,19 +40,22 @@ + + + +- Use this enum to check the protocol version, and it will be updated +- automatically. ++ The 'current' member of this enum gives the version of the ++ protocol. Implementations can compare this to the version ++ they implement using static_assert to ensure the protocol and ++ implementation versions match. + +- ++ + + + + + +- Use this request in order to enable use of this interface. +- +- Understand and agree that one is using an unstable interface, +- that will likely change in the future, breaking the API. ++ Negotiate the unstable version of the interface. This ++ mechanism is in place to ensure client and server agree on the ++ unstable versions of the protocol that they speak or exit ++ cleanly if they don't agree. This request will go away once ++ the xdg-shell protocol is stable. + + + +@@ -84,6 +87,28 @@ + + + ++ ++ ++ ++ The ping event asks the client if it's still alive. Pass the ++ serial specified in the event back to the compositor by sending ++ a "pong" request back with the specified serial. ++ ++ Compositors can use this to determine if the client is still ++ alive. It's unspecified what will happen if the client doesn't ++ respond to the ping request, or in what timeframe. Clients should ++ try to respond in a reasonable amount of time. ++ ++ ++ ++ ++ ++ ++ A client must respond to a ping event with a pong request or ++ the client may be deemed unresponsive. ++ ++ ++ + + + +@@ -124,6 +149,32 @@ + + + ++ ++ ++ This tells the compositor what the visible size of the window ++ should be, so it can use it to determine what borders to use for ++ constrainment and alignment. ++ ++ CSD often has invisible areas for decoration purposes, like drop ++ shadows. These "shadow" drawings need to be subtracted out of the ++ normal boundaries of the window when computing where to place ++ windows (e.g. to set this window so it's centered on top of another, ++ or to put it to the left or right of the screen.) ++ ++ This value should change as little as possible at runtime, to ++ prevent flicker. ++ ++ This value is also ignored when the window is maximized or ++ fullscreen, and assumed to be 0. ++ ++ If never called, this value is assumed to be 0. ++ ++ ++ ++ ++ ++ ++ + + + Set a short title for the surface. +@@ -150,22 +201,6 @@ + + + +- +- +- A client must respond to a ping event with a pong request or +- the client may be deemed unresponsive. +- +- +- +- +- +- +- Ping a client to check if it is receiving events and sending +- requests. A client is expected to reply with a pong request. +- +- +- +- + + + Start a pointer-driven move of the surface. +@@ -217,12 +252,6 @@ + ignore it if it doesn't resize, pick a smaller size (to + satisfy aspect ratio or resize in steps of NxM pixels). + +- The edges parameter provides a hint about how the surface +- was resized. The client may use this information to decide +- how to adjust its content to the new size (e.g. a scrolling +- area might adjust its content position to leave the viewable +- content unmoved). Valid edge values are from resize_edge enum. +- + The client is free to dismiss all but the last configure + event it received. + +@@ -230,7 +259,6 @@ + in surface local coordinates. + + +- + + + +@@ -250,128 +278,122 @@ + + + +- +- +- Event sent from the compositor to the client requesting that the client +- goes to a fullscreen state. It's the client job to call set_fullscreen +- and really trigger the fullscreen state. +- +- +- +- +- +- Event sent from the compositor to the client requesting that the client +- leaves the fullscreen state. It's the client job to call +- unset_fullscreen and really leave the fullscreen state. +- +- ++ ++ ++ The different state values used on the surface. This is designed for ++ state values like maximized, fullscreen. It is paired with the ++ request_change_state event to ensure that both the client and the ++ compositor setting the state can be synchronized. + +- +- +- Set the surface as fullscreen. ++ States set in this way are double-buffered. They will get applied on ++ the next commit. + +- After this request, the compositor should send a configure event +- informing the output size. ++ Desktop environments may extend this enum by taking up a range of ++ values and documenting the range they chose in this description. ++ They are not required to document the values for the range that they ++ chose. Ideally, any good extensions from a desktop environment should ++ make its way into standardization into this enum. + +- This request informs the compositor that the next attached buffer +- committed will be in a fullscreen state. The buffer size should be the +- same size as the size informed in the configure event, if the client +- doesn't want to leave any empty area. ++ The current reserved ranges are: + +- In other words: the next attached buffer after set_maximized is the new +- maximized buffer. And the surface will be positioned at the maximized +- position on commit. +- +- A simple way to synchronize and wait for the correct configure event is +- to use a wl_display.sync request right after the set_fullscreen +- request. When the sync callback returns, the last configure event +- received just before it will be the correct one, and should contain the +- right size for the surface to maximize. +- +- Setting one state won't unset another state. Use +- xdg_surface.unset_fullscreen for unsetting it. ++ 0x0000 - 0x0FFF: xdg-shell core values, documented below. ++ 0x1000 - 0x1FFF: GNOME + +- ++ ++ A non-zero value indicates the surface is maximized. Otherwise, ++ the surface is unmaximized. ++ ++ ++ A non-zero value indicates the surface is fullscreen. Otherwise, ++ the surface is not fullscreen. ++ ++ + +- +- +- Unset the surface fullscreen state. ++ ++ ++ This asks the compositor to change the state. If the compositor wants ++ to change the state, it will send a change_state event with the same ++ state_type, value, and serial, and the event flow continues as if it ++ it was initiated by the compositor. + +- Same negotiation as set_fullscreen must be used. ++ If the compositor does not want to change the state, it will send a ++ change_state to the client with the old value of the state. + ++ ++ ++ ++ This serial is so the client can know which change_state event corresponds ++ to which request_change_state request it sent out. ++ + + +- +- +- Event sent from the compositor to the client requesting that the client +- goes to a maximized state. It's the client job to call set_maximized +- and really trigger the maximized state. ++ ++ ++ This event tells the client to change a surface's state. The client ++ should respond with an ack_change_state request to the compositor to ++ guarantee that the compositor knows that the client has seen it. + +- + +- +- +- Event sent from the compositor to the client requesting that the client +- leaves the maximized state. It's the client job to call unset_maximized +- and really leave the maximized state. +- ++ ++ ++ + + +- +- +- Set the surface as maximized. +- +- After this request, the compositor will send a configure event +- informing the output size minus panel and other MW decorations. +- +- This request informs the compositor that the next attached buffer +- committed will be in a maximized state. The buffer size should be the +- same size as the size informed in the configure event, if the client +- doesn't want to leave any empty area. ++ ++ ++ When a change_state event is received, a client should then ack it ++ using the ack_change_state request to ensure that the compositor ++ knows the client has seen the event. + +- In other words: the next attached buffer after set_maximized is the new +- maximized buffer. And the surface will be positioned at the maximized +- position on commit. ++ By this point, the state is confirmed, and the next attach should ++ contain the buffer drawn for the new state value. + +- A simple way to synchronize and wait for the correct configure event is +- to use a wl_display.sync request right after the set_maximized request. +- When the sync callback returns, the last configure event received just +- before it will be the correct one, and should contain the right size +- for the surface to maximize. +- +- Setting one state won't unset another state. Use +- xdg_surface.unset_maximized for unsetting it. ++ The values here need to be the same as the values in the cooresponding ++ change_state event. + ++ ++ ++ + + +- +- +- Unset the surface maximized state. +- +- Same negotiation as set_maximized must be used. ++ ++ ++ Minimize the surface. + + + +- +- +- Set the surface minimized state. +- +- Setting one state won't unset another state. ++ ++ ++ The activated_set event is sent when this surface has been ++ activated, which means that the surface has user attention. ++ Window decorations should be updated accordingly. You should ++ not use this event for anything but the style of decorations ++ you display, use wl_keyboard.enter and wl_keyboard.leave for ++ determining keyboard focus. + +- ++ + +- +- +- The focused_set event is sent when this surface has been +- activated. Window decorations should be updated accordingly. ++ ++ ++ The deactivate event is sent when this surface has been ++ deactivated, which means that the surface lost user attention. ++ Window decorations should be updated accordingly. You should ++ not use this event for anything but the style of decorations ++ you display, use wl_keyboard.enter and wl_keyboard.leave for ++ determining keyboard focus. + + + +- +- +- The focused_unset event is sent when this surface has been +- deactivated, because another surface has been activated. Window +- decorations should be updated accordingly. ++ ++ ++ The close event is sent by the compositor when the user ++ wants the surface to be closed. This should be equivalent to ++ the user clicking the close button in client-side decorations, ++ if your application has any... ++ ++ This is only a request that the user intends to close your ++ window. The client may choose to ignore this request, or show ++ a dialog to ask the user to save their data... + + + +@@ -409,22 +431,6 @@ + + + +- +- +- A client must respond to a ping event with a pong request or +- the client may be deemed unresponsive. +- +- +- +- +- +- +- Ping a client to check if it is receiving events and sending +- requests. A client is expected to reply with a pong request. +- +- +- +- + + + The popup_done event is sent out when a popup grab is broken, +diff --git a/src/client/client.pro b/src/client/client.pro +index 9ecf82f..73e3b7f 100644 +--- a/src/client/client.pro ++++ b/src/client/client.pro +@@ -59,6 +59,7 @@ SOURCES += qwaylandintegration.cpp \ + qwaylanddatasource.cpp \ + qwaylandshellsurface.cpp \ + qwaylandwlshellsurface.cpp \ ++ qwaylandxdgshell.cpp \ + qwaylandxdgsurface.cpp \ + qwaylandextendedoutput.cpp \ + qwaylandextendedsurface.cpp \ +@@ -89,6 +90,7 @@ HEADERS += qwaylandintegration_p.h \ + qwaylanddatasource_p.h \ + qwaylandshellsurface_p.h \ + qwaylandwlshellsurface_p.h \ ++ qwaylandxdgshell_p.h \ + qwaylandxdgsurface_p.h \ + qwaylandextendedoutput_p.h \ + qwaylandextendedsurface_p.h \ +diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp +index 7f953ad..2e25672 100644 +--- a/src/client/qwaylanddisplay.cpp ++++ b/src/client/qwaylanddisplay.cpp +@@ -50,7 +50,7 @@ + #include "qwaylandclipboard_p.h" + #include "qwaylanddatadevicemanager_p.h" + #include "qwaylandhardwareintegration_p.h" +- ++#include "qwaylandxdgshell_p.h" + + #include "qwaylandwindowmanagerintegration_p.h" + +@@ -209,8 +209,7 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin + mShm = static_cast(wl_registry_bind(registry, id, &wl_shm_interface,1)); + } else if (interface == QStringLiteral("xdg_shell") + && qEnvironmentVariableIsSet("QT_WAYLAND_USE_XDG_SHELL")) { +- mShellXdg.reset(new QtWayland::xdg_shell(registry, id)); +- mShellXdg->use_unstable_version(QtWayland::xdg_shell::version_current); ++ mShellXdg.reset(new QWaylandXdgShell(registry,id)); + } else if (interface == QStringLiteral("wl_shell")){ + mShell.reset(new QtWayland::wl_shell(registry, id)); + } else if (interface == QStringLiteral("wl_seat")) { +@@ -275,4 +274,9 @@ void QWaylandDisplay::forceRoundTrip() + wl_display_roundtrip(mDisplay); + } + ++QtWayland::xdg_shell *QWaylandDisplay::shellXdg() ++{ ++ return mShellXdg.data(); ++} ++ + QT_END_NAMESPACE +diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h +index cf5dfc2..f1b35a7 100644 +--- a/src/client/qwaylanddisplay_p.h ++++ b/src/client/qwaylanddisplay_p.h +@@ -72,6 +72,7 @@ class QWaylandWindow; + class QWaylandEventThread; + class QWaylandIntegration; + class QWaylandHardwareIntegration; ++class QWaylandXdgShell; + + namespace QtWayland { + class qt_output_extension; +@@ -115,7 +116,7 @@ public: + QtWayland::wl_compositor *compositor() { return &mCompositor; } + + QtWayland::wl_shell *shell() { return mShell.data(); } +- QtWayland::xdg_shell *shellXdg() { return mShellXdg.data(); } ++ QtWayland::xdg_shell *shellXdg(); + + QList inputDevices() const { return mInputDevices; } + QWaylandInputDevice *defaultInputDevice() const; +@@ -171,7 +172,7 @@ private: + QThread *mEventThread; + QWaylandEventThread *mEventThreadObject; + QScopedPointer mShell; +- QScopedPointer mShellXdg; ++ QScopedPointer mShellXdg; + QList mScreens; + QList mInputDevices; + QList mRegistryListeners; +diff --git a/src/client/qwaylandxdgshell.cpp b/src/client/qwaylandxdgshell.cpp +new file mode 100644 +index 0000000..eb9f91c +--- /dev/null ++++ b/src/client/qwaylandxdgshell.cpp +@@ -0,0 +1,77 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Eurogiciel, author: ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include "qwaylandxdgshell_p.h" ++ ++#include "qwaylanddisplay_p.h" ++#include "qwaylandwindow_p.h" ++#include "qwaylandinputdevice_p.h" ++#include "qwaylanddecoration_p.h" ++#include "qwaylandscreen_p.h" ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QWaylandXdgShell::QWaylandXdgShell(struct ::xdg_shell *shell) ++ : QtWayland::xdg_shell(shell) ++{ ++} ++ ++QWaylandXdgShell::QWaylandXdgShell(struct ::wl_registry *registry, uint32_t id) ++ : QtWayland::xdg_shell(registry, id) ++{ ++ use_unstable_version(QtWayland::xdg_shell::version_current); ++} ++ ++QWaylandXdgShell::~QWaylandXdgShell() ++{ ++ xdg_shell_destroy(object()); ++} ++ ++ ++void QWaylandXdgShell::xdg_shell_ping(uint32_t serial) ++{ ++ pong(serial); ++} ++ ++ ++QT_END_NAMESPACE +diff --git a/src/client/qwaylandxdgshell_p.h b/src/client/qwaylandxdgshell_p.h +new file mode 100644 +index 0000000..6a396bd +--- /dev/null ++++ b/src/client/qwaylandxdgshell_p.h +@@ -0,0 +1,73 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Eurogiciel, author: ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QWAYLANDXDGSHELL_H ++#define QWAYLANDXDGSHELL_H ++ ++#include ++ ++#include ++ ++#include ++#include ++#include "qwaylandshellsurface_p.h" ++ ++QT_BEGIN_NAMESPACE ++ ++class QWaylandWindow; ++class QWaylandInputDevice; ++class QWindow; ++ ++class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShell : public QtWayland::xdg_shell ++{ ++public: ++ QWaylandXdgShell(struct ::xdg_shell *shell); ++ QWaylandXdgShell(struct ::wl_registry *registry, uint32_t id); ++ ++ virtual ~QWaylandXdgShell(); ++ ++private: ++ void xdg_shell_ping(uint32_t serial) Q_DECL_OVERRIDE; ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QWAYLANDXDGSHELL_H +diff --git a/src/client/qwaylandxdgsurface.cpp b/src/client/qwaylandxdgsurface.cpp +index 1b8affa..5fb74d2 100644 +--- a/src/client/qwaylandxdgsurface.cpp ++++ b/src/client/qwaylandxdgsurface.cpp +@@ -87,23 +87,25 @@ void QWaylandXdgSurface::move(QWaylandInputDevice *inputDevice) + + void QWaylandXdgSurface::setMaximized() + { +- m_maximized = true; +- m_size = m_window->window()->geometry().size(); +- set_maximized(); ++ if (!m_maximized) ++ request_change_state(XDG_SURFACE_STATE_MAXIMIZED, true, 0); + } + + void QWaylandXdgSurface::setFullscreen() + { +- m_fullscreen = true; +- m_size = m_window->window()->geometry().size(); +- set_fullscreen(); ++ if (!m_fullscreen) ++ request_change_state(XDG_SURFACE_STATE_FULLSCREEN, true, 0); + } + + void QWaylandXdgSurface::setNormal() + { + if (m_fullscreen || m_maximized || m_minimized) { +- if (m_maximized) { unset_maximized(); } +- if (m_fullscreen) { unset_fullscreen(); } ++ if (m_maximized) { ++ request_change_state(XDG_SURFACE_STATE_MAXIMIZED, false, 0); ++ } ++ if (m_fullscreen) { ++ request_change_state(XDG_SURFACE_STATE_FULLSCREEN, false, 0); ++ } + + m_fullscreen = m_maximized = m_minimized = false; + setTopLevel(); +@@ -158,16 +160,48 @@ void QWaylandXdgSurface::setAppId(const QString & appId) + return QtWayland::xdg_surface::set_app_id(appId); + } + +-void QWaylandXdgSurface::xdg_surface_ping(uint32_t serial) ++void QWaylandXdgSurface::xdg_surface_configure(int32_t width, int32_t height) + { +- pong(serial); ++ m_window->configure(0 , width, height); + } + +-void QWaylandXdgSurface::xdg_surface_configure(uint32_t edges, int32_t width, +- int32_t height) ++void QWaylandXdgSurface::xdg_surface_change_state(uint32_t state, ++ uint32_t value, ++ uint32_t serial) + { +- m_window->configure(edges, width, height); ++ ++ if (state == XDG_SURFACE_STATE_MAXIMIZED ++ || state == XDG_SURFACE_STATE_FULLSCREEN) { ++ if (value) { ++ m_size = m_window->window()->geometry().size(); ++ } else { ++ QMargins m = m_window->frameMargins(); ++ m_window->configure(0, m_size.width() + m.left() + m.right(), m_size.height() + m.top() + m.bottom()); ++ } ++ } ++ ++ switch (state) { ++ case XDG_SURFACE_STATE_MAXIMIZED: ++ m_maximized = value; ++ break; ++ case XDG_SURFACE_STATE_FULLSCREEN: ++ m_fullscreen = value; ++ break; ++ } ++ ++ xdg_surface_ack_change_state(object(), state, value, serial); + } + ++void QWaylandXdgSurface::xdg_surface_activated() ++{ ++} ++ ++void QWaylandXdgSurface::xdg_surface_deactivated() ++{ ++} ++ ++void QWaylandXdgSurface::xdg_surface_close() ++{ ++} + + QT_END_NAMESPACE +diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h +index 744d3f3..d2a154e 100644 +--- a/src/client/qwaylandxdgsurface_p.h ++++ b/src/client/qwaylandxdgsurface_p.h +@@ -93,10 +93,15 @@ private: + bool m_fullscreen; + QSize m_size; + +- void xdg_surface_ping(uint32_t serial) Q_DECL_OVERRIDE; +- void xdg_surface_configure(uint32_t edges, +- int32_t width, ++ void xdg_surface_configure(int32_t width, + int32_t height) Q_DECL_OVERRIDE; ++ void xdg_surface_change_state(uint32_t state, ++ uint32_t value, ++ uint32_t serial) Q_DECL_OVERRIDE; ++ void xdg_surface_activated() Q_DECL_OVERRIDE; ++ void xdg_surface_deactivated() Q_DECL_OVERRIDE; ++ void xdg_surface_close() Q_DECL_OVERRIDE; ++ + friend class QWaylandWindow; + }; + +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0020-Add-IVI-Shell-protocol-file-version-patch-v6.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0020-Add-IVI-Shell-protocol-file-version-patch-v6.patch new file mode 100644 index 00000000..413459fb --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0020-Add-IVI-Shell-protocol-file-version-patch-v6.patch @@ -0,0 +1,128 @@ +From b4f032b13338ad6c21024177b031c75063ef7493 Mon Sep 17 00:00:00 2001 +From: Manuel Bachmann +Date: Sun, 7 Sep 2014 08:19:30 +0200 +Subject: [PATCH 20/21] Add IVI-Shell protocol file version patch v6 + +Source : http://lists.freedesktop.org/archives/wayland-devel/2014-June/015617.html + +This file comes from the last proposed definition of the IVI-Shell protocol, +and will need to be refreshed on protocol update. + +Task-number: QTBUG-XXXXX/part/1of2 + +Signed-off-by: Manuel Bachmann +--- + src/3rdparty/protocol/ivi-application.xml | 101 ++++++++++++++++++++++++++++++ + 1 file changed, 101 insertions(+) + create mode 100644 src/3rdparty/protocol/ivi-application.xml + +diff --git a/src/3rdparty/protocol/ivi-application.xml b/src/3rdparty/protocol/ivi-application.xml +new file mode 100644 +index 0000000..833fd38 +--- /dev/null ++++ b/src/3rdparty/protocol/ivi-application.xml +@@ -0,0 +1,101 @@ ++ ++ ++ ++ ++ Copyright (C) 2013 DENSO CORPORATION ++ Copyright (c) 2013 BMW Car IT GmbH ++ ++ Permission is hereby granted, free of charge, to any person obtaining a copy ++ of this software and associated documentation files (the "Software"), to deal ++ in the Software without restriction, including without limitation the rights ++ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++ copies of the Software, and to permit persons to whom the Software is ++ furnished to do so, subject to the following conditions: ++ ++ The above copyright notice and this permission notice shall be included in ++ all copies or substantial portions of the Software. ++ ++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ++ THE SOFTWARE. ++ ++ ++ ++ ++ ++ ++ ++ This removes link from ivi_id to wl_surface and destroys ivi_surface. ++ ++ ++ ++ ++ ++ The new visibility state is provided in argument visibility. ++ If visibility is 0, the surface has become invisible. ++ If visibility is not 0, the surface has become visible. ++ ++ ++ ++ ++ ++ ++ These define all possible warning codes returned by ivi compositor on server-side warnings. ++ invalid_wl_surface: ++ - wl_surface already has a another role. ++ - wl_surface is destroyed before the ivi_surface is destroyed. ++ ivi_id_in_use: ivi_id is already assigned by another application. ++ ++ ++ ++ ++ ++ ++ ++ The ivi compositor encountered warning while processing a request by this ++ application. The warning is defined by argument warning_code and optional ++ warning_text. If the warning is detected, client shall destroy the ivi_surface ++ object. ++ ++ When a warning event is sent, the compositor turns the ivi_surface object inert. ++ The ivi_surface will not deliver further events, all requests on it are ignored ++ except 'destroy', and the association to the ivi_id is removed. The client ++ should destroy the ivi_surface object. If an inert ivi_surface object is used as ++ an argument to any other object's request, that request will [produce a fatal ++ error / produce a warning / be ignored]. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ This interface is implemented by servers that provide desktop-style user interfaces. ++ It allows clients to associate a ivi_surface with a basic surface. ++ ++ ++ ++ ++ surface_create will create a interface:ivi_surface with numeric ID; ivi_id in ++ ivi compositor. These ivi_ids are defined as unique in the system to identify ++ it inside of ivi compositor. The ivi compositor implements business logic how to ++ set properties of the surface with ivi_id according to status of the system. ++ E.g. a unique ID for Car Navigation application is used for implementing special ++ logic of the application about where it shall be located. ++ if a wl_surface which already has another role is set, the server regards this as ++ error and disconnects the client. ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0021-Implement-initial-IVI-Shell-support.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0021-Implement-initial-IVI-Shell-support.patch new file mode 100644 index 00000000..8723def2 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0021-Implement-initial-IVI-Shell-support.patch @@ -0,0 +1,539 @@ +From 1ddfa43692cabae0f552351cfbc09377e479471e Mon Sep 17 00:00:00 2001 +From: Manuel Bachmann +Date: Mon, 8 Sep 2014 11:38:01 +0200 +Subject: [PATCH 21/21] Implement initial IVI-Shell support + +IVI-Shell provides a shell interface for Weston, which maps the GENIVI API (http://www.genivi.org) for In-Vehicle Infotainment. + +This patch enables detecting the IVI-Shell interface at runtime, and creating compatible surfaces if found. + +Task-number: QTBUG-XXXXX/part/2of2 + +Change-Id: I1f6c11bf56b727a54fb48faab9c076b61d635440 +Signed-off-by: Manuel Bachmann +--- + src/client/client.pro | 5 ++ + src/client/qwaylanddisplay.cpp | 9 ++++ + src/client/qwaylanddisplay_p.h | 5 ++ + src/client/qwaylandivishell.cpp | 69 +++++++++++++++++++++++++ + src/client/qwaylandivishell_p.h | 70 +++++++++++++++++++++++++ + src/client/qwaylandivisurface.cpp | 105 ++++++++++++++++++++++++++++++++++++++ + src/client/qwaylandivisurface_p.h | 90 ++++++++++++++++++++++++++++++++ + src/client/qwaylandwindow.cpp | 8 ++- + 8 files changed, 360 insertions(+), 1 deletion(-) + create mode 100644 src/client/qwaylandivishell.cpp + create mode 100644 src/client/qwaylandivishell_p.h + create mode 100644 src/client/qwaylandivisurface.cpp + create mode 100644 src/client/qwaylandivisurface_p.h + +diff --git a/src/client/client.pro b/src/client/client.pro +index 73e3b7f..adb526d 100644 +--- a/src/client/client.pro ++++ b/src/client/client.pro +@@ -42,6 +42,7 @@ WAYLANDCLIENTSOURCES += \ + ../extensions/windowmanager.xml \ + ../3rdparty/protocol/text.xml \ + ../3rdparty/protocol/xdg-shell.xml \ ++ ../3rdparty/protocol/ivi-application.xml \ + + SOURCES += qwaylandintegration.cpp \ + qwaylandnativeinterface.cpp \ +@@ -61,6 +62,8 @@ SOURCES += qwaylandintegration.cpp \ + qwaylandwlshellsurface.cpp \ + qwaylandxdgshell.cpp \ + qwaylandxdgsurface.cpp \ ++ qwaylandivishell.cpp \ ++ qwaylandivisurface.cpp \ + qwaylandextendedoutput.cpp \ + qwaylandextendedsurface.cpp \ + qwaylandsubsurface.cpp \ +@@ -92,6 +95,8 @@ HEADERS += qwaylandintegration_p.h \ + qwaylandwlshellsurface_p.h \ + qwaylandxdgshell_p.h \ + qwaylandxdgsurface_p.h \ ++ qwaylandivishell_p.h \ ++ qwaylandivisurface_p.h \ + qwaylandextendedoutput_p.h \ + qwaylandextendedsurface_p.h \ + qwaylandsubsurface_p.h \ +diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp +index 2e25672..2a93db7 100644 +--- a/src/client/qwaylanddisplay.cpp ++++ b/src/client/qwaylanddisplay.cpp +@@ -51,6 +51,7 @@ + #include "qwaylanddatadevicemanager_p.h" + #include "qwaylandhardwareintegration_p.h" + #include "qwaylandxdgshell_p.h" ++#include "qwaylandivishell_p.h" + + #include "qwaylandwindowmanagerintegration_p.h" + +@@ -62,6 +63,7 @@ + + #include + #include ++#include + + #include + #include +@@ -207,6 +209,8 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin + mCompositor.init(registry, id); + } else if (interface == QStringLiteral("wl_shm")) { + mShm = static_cast(wl_registry_bind(registry, id, &wl_shm_interface,1)); ++ } else if (interface == QStringLiteral("ivi_application")) { ++ mShellIvi.reset(new QWaylandIviShell(registry,id)); + } else if (interface == QStringLiteral("xdg_shell") + && qEnvironmentVariableIsSet("QT_WAYLAND_USE_XDG_SHELL")) { + mShellXdg.reset(new QWaylandXdgShell(registry,id)); +@@ -279,4 +283,9 @@ QtWayland::xdg_shell *QWaylandDisplay::shellXdg() + return mShellXdg.data(); + } + ++QtWayland::ivi_application *QWaylandDisplay::shellIvi() ++{ ++ return mShellIvi.data(); ++} ++ + QT_END_NAMESPACE +diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h +index f1b35a7..b9c686c 100644 +--- a/src/client/qwaylanddisplay_p.h ++++ b/src/client/qwaylanddisplay_p.h +@@ -52,6 +52,7 @@ + #include + #include + #include ++#include + + struct wl_cursor_image; + +@@ -72,6 +73,7 @@ class QWaylandWindow; + class QWaylandEventThread; + class QWaylandIntegration; + class QWaylandHardwareIntegration; ++class QWaylandIviShell; + class QWaylandXdgShell; + + namespace QtWayland { +@@ -81,6 +83,7 @@ namespace QtWayland { + class qt_surface_extension; + class wl_text_input_manager; + class xdg_shell; ++ class ivi_application; + } + + typedef void (*RegistryListener)(void *data, +@@ -117,6 +120,7 @@ public: + + QtWayland::wl_shell *shell() { return mShell.data(); } + QtWayland::xdg_shell *shellXdg(); ++ QtWayland::ivi_application *shellIvi(); + + QList inputDevices() const { return mInputDevices; } + QWaylandInputDevice *defaultInputDevice() const; +@@ -173,6 +177,7 @@ private: + QWaylandEventThread *mEventThreadObject; + QScopedPointer mShell; + QScopedPointer mShellXdg; ++ QScopedPointer mShellIvi; + QList mScreens; + QList mInputDevices; + QList mRegistryListeners; +diff --git a/src/client/qwaylandivishell.cpp b/src/client/qwaylandivishell.cpp +new file mode 100644 +index 0000000..9d63d0d +--- /dev/null ++++ b/src/client/qwaylandivishell.cpp +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Eurogiciel, author: ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include "qwaylandivishell_p.h" ++ ++#include "qwaylanddisplay_p.h" ++#include "qwaylandwindow_p.h" ++#include "qwaylandinputdevice_p.h" ++#include "qwaylanddecoration_p.h" ++#include "qwaylandscreen_p.h" ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QWaylandIviShell::QWaylandIviShell(struct ::ivi_application *shell) ++ : QtWayland::ivi_application(shell) ++{ ++} ++ ++QWaylandIviShell::QWaylandIviShell(struct ::wl_registry *registry, uint32_t id) ++ : QtWayland::ivi_application(registry, id) ++{ ++} ++ ++QWaylandIviShell::~QWaylandIviShell() ++{ ++ ivi_application_destroy(object()); ++} ++ ++QT_END_NAMESPACE +diff --git a/src/client/qwaylandivishell_p.h b/src/client/qwaylandivishell_p.h +new file mode 100644 +index 0000000..f9f6983 +--- /dev/null ++++ b/src/client/qwaylandivishell_p.h +@@ -0,0 +1,70 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2014 Eurogiciel, author: ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QWAYLANDIVISHELL_H ++#define QWAYLANDIVISHELL_H ++ ++#include ++ ++#include ++ ++#include ++#include ++#include "qwaylandshellsurface_p.h" ++ ++QT_BEGIN_NAMESPACE ++ ++class QWaylandWindow; ++class QWaylandInputDevice; ++class QWindow; ++ ++class Q_WAYLAND_CLIENT_EXPORT QWaylandIviShell : public QtWayland::ivi_application ++{ ++public: ++ QWaylandIviShell(struct ::ivi_application *shell); ++ QWaylandIviShell(struct ::wl_registry *registry, uint32_t id); ++ ++ virtual ~QWaylandIviShell(); ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QWAYLANDIVISHELL_H +diff --git a/src/client/qwaylandivisurface.cpp b/src/client/qwaylandivisurface.cpp +new file mode 100644 +index 0000000..a12309e +--- /dev/null ++++ b/src/client/qwaylandivisurface.cpp +@@ -0,0 +1,105 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include "qwaylandivisurface_p.h" ++ ++#include "qwaylanddisplay_p.h" ++#include "qwaylandwindow_p.h" ++#include "qwaylandinputdevice_p.h" ++#include "qwaylanddecoration_p.h" ++#include "qwaylandscreen_p.h" ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++QWaylandIviSurface::QWaylandIviSurface(struct ::ivi_surface *ivi_surface, QWaylandWindow *window) ++ : QtWayland::ivi_surface(ivi_surface) ++ , m_window(window) ++{ ++} ++ ++QWaylandIviSurface::~QWaylandIviSurface() ++{ ++ ivi_surface_destroy(object()); ++} ++ ++void QWaylandIviSurface::resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) ++{ ++} ++ ++void QWaylandIviSurface::move(QWaylandInputDevice *inputDevice) ++{ ++} ++ ++void QWaylandIviSurface::setMaximized() ++{ ++} ++ ++void QWaylandIviSurface::setFullscreen() ++{ ++} ++ ++void QWaylandIviSurface::setNormal() ++{ ++} ++ ++void QWaylandIviSurface::setMinimized() ++{ ++} ++ ++void QWaylandIviSurface::setTopLevel() ++{ ++} ++ ++void QWaylandIviSurface::updateTransientParent(QWindow *parent) ++{ ++} ++ ++void QWaylandIviSurface::setTitle(const QString & title) ++{ ++} ++ ++void QWaylandIviSurface::setAppId(const QString & appId) ++{ ++} ++ ++QT_END_NAMESPACE +diff --git a/src/client/qwaylandivisurface_p.h b/src/client/qwaylandivisurface_p.h +new file mode 100644 +index 0000000..c6a7ce6 +--- /dev/null ++++ b/src/client/qwaylandivisurface_p.h +@@ -0,0 +1,90 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ++** Contact: http://www.qt-project.org/legal ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and Digia. For licensing terms and ++** conditions see http://qt.digia.com/licensing. For further information ++** use the contact form at http://qt.digia.com/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Digia gives you certain additional ++** rights. These rights are described in the Digia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QWAYLANDIVISURFACE_H ++#define QWAYLANDIVISURFACE_H ++ ++#include ++ ++#include ++ ++#include ++#include ++#include "qwaylandshellsurface_p.h" ++ ++QT_BEGIN_NAMESPACE ++ ++class QWaylandWindow; ++class QWaylandInputDevice; ++class QWindow; ++class QWaylandExtendedSurface; ++ ++class Q_WAYLAND_CLIENT_EXPORT QWaylandIviSurface : public QtWayland::ivi_surface ++ , public QWaylandShellSurface ++{ ++public: ++ QWaylandIviSurface(struct ::ivi_surface *shell_surface, QWaylandWindow *window); ++ virtual ~QWaylandIviSurface(); ++ ++ void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE; ++ void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE; ++ ++ void setTitle(const QString &title) Q_DECL_OVERRIDE; ++ void setAppId(const QString &appId) Q_DECL_OVERRIDE; ++ ++private: ++ void setMaximized() Q_DECL_OVERRIDE; ++ void setFullscreen() Q_DECL_OVERRIDE; ++ void setNormal() Q_DECL_OVERRIDE; ++ void setMinimized() Q_DECL_OVERRIDE; ++ ++ void setTopLevel() Q_DECL_OVERRIDE; ++ void updateTransientParent(QWindow *parent) Q_DECL_OVERRIDE; ++ ++private: ++ QWaylandWindow *m_window; ++ ++ friend class QWaylandWindow; ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QWAYLANDIVISURFACE_H +diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp +index 3fb3a49..45a58f2 100644 +--- a/src/client/qwaylandwindow.cpp ++++ b/src/client/qwaylandwindow.cpp +@@ -39,6 +39,8 @@ + ** + ****************************************************************************/ + ++#include ++ + #include "qwaylandwindow_p.h" + + #include "qwaylandbuffer_p.h" +@@ -48,10 +50,12 @@ + #include "qwaylandshellsurface_p.h" + #include "qwaylandwlshellsurface_p.h" + #include "qwaylandxdgsurface_p.h" ++#include "qwaylandivisurface_p.h" + #include "qwaylandextendedsurface_p.h" + #include "qwaylandsubsurface_p.h" + #include "qwaylanddecoration_p.h" + #include "qwaylandwindowmanagerintegration_p.h" ++#define IVI_SURFACE_ID 8000 + + #include + #include +@@ -95,7 +99,9 @@ QWaylandWindow::QWaylandWindow(QWindow *window) + mWindowId = id++; + + if (!(window->flags() & Qt::BypassWindowManagerHint)) { +- if (mDisplay->shellXdg()) { ++ if (mDisplay->shellIvi()) { ++ mShellSurface = new QWaylandIviSurface(mDisplay->shellIvi()->surface_create(IVI_SURFACE_ID + getpid(), object()), this); ++ } else if (mDisplay->shellXdg()) { + if (window->type() & Qt::Window) { + mShellSurface = new QWaylandXdgSurface(mDisplay->shellXdg()->get_xdg_surface(object()), this); + } +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch new file mode 100644 index 00000000..984ae813 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/0099_qtwayland_no_evdev.patch @@ -0,0 +1,14 @@ +diff --git a/tests/auto/compositor/compositor/compositor.pro b/tests/auto/compositor/compositor/compositor.pro +index 2919fa4..d9acac3 100644 +--- a/tests/auto/compositor/compositor/compositor.pro ++++ b/tests/auto/compositor/compositor/compositor.pro +@@ -7,9 +7,6 @@ QT += core-private gui-private waylandcompositor waylandcompositor-private + + QMAKE_USE += wayland-client wayland-server + +-qtConfig(xkbcommon-evdev): \ +- QMAKE_USE += xkbcommon_evdev +- + WAYLANDCLIENTSOURCES += \ + ../../../../src/3rdparty/protocol/xdg-shell.xml \ + ../../../../src/3rdparty/protocol/ivi-application.xml \ diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/UNUSED_NEEDS_CHECK_YOCTO_0018-packaging-enable-xdg-shell-at-runtime.patch b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/UNUSED_NEEDS_CHECK_YOCTO_0018-packaging-enable-xdg-shell-at-runtime.patch new file mode 100644 index 00000000..bca61b5d --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland/UNUSED_NEEDS_CHECK_YOCTO_0018-packaging-enable-xdg-shell-at-runtime.patch @@ -0,0 +1,31 @@ +From 9617c349a212d5407087daf4f4a2386bce94ecc1 Mon Sep 17 00:00:00 2001 +From: Philippe Coval +Date: Thu, 12 Jun 2014 11:55:29 +0200 +Subject: [PATCH 18/21] packaging: enable xdg-shell at runtime + +Change-Id: Iffbae496f1e09c8fa44a28d4eb515678e3bbb297 +Bug-Tizen: TIVI-3113/part +Signed-off-by: Philippe Coval +--- + packaging/qt5-qtwayland.spec | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/packaging/qt5-qtwayland.spec b/packaging/qt5-qtwayland.spec +index cba18e2..ff32185 100644 +--- a/packaging/qt5-qtwayland.spec ++++ b/packaging/qt5-qtwayland.spec +@@ -97,6 +97,11 @@ rm -rf %{buildroot} + + %post + /sbin/ldconfig ++ ++f="/etc/profile.d/qt.sh" ++grep QT_WAYLAND_USE_XDG_SHELL $f \ ++ || echo "QT_WAYLAND_USE_XDG_SHELL='defined'; export QT_WAYLAND_USE_XDG_SHELL" >> $f ++ + %postun + /sbin/ldconfig + +-- +1.9.1 + diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland_%.bbappend b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland_%.bbappend new file mode 100644 index 00000000..33874cf4 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland_%.bbappend @@ -0,0 +1,27 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +# QT_MODULE_BRANCH = "5.4" + +# TODO: +# These patches for IVI-SHELL are tempolary disabled because of issues. And new +# patches are proposed. +# +# file://0020-Add-IVI-Shell-protocol-file-version-patch-v6.patch \ +# file://0021-Implement-initial-IVI-Shell-support.patch \ +# file://0001-protocol-update-3rd-party-ivi-application-protocol.patch \ +# file://0002-qwaylandwindow-add-support-for-IVI-Surface-ID-proper.patch \ +# +# The xdg-shell merged into upstream, so we don't need these patch anymore. +# But xdg-shell doesn't work well in current AGL Distro because of +# mismatch of protocol versions between server(weston) and client(Qt Apps). +# +# file://0016-xdg-shell-Add-xdg-shell-protocol-file-version-1.4.0.patch \ +# file://0017-xdg-shell-Add-minimize-feature-to-QWindow-using-wayl.patch \ +# file://0019-xdg-shell-upgrade-to-support-current-version-weston-.patch \ +# + +SRC_URI_append = "\ + file://0010-Added-manifest-file-according-to-smack-3-domain-mode.patch \ + " + +SRC_URI_append = " file://0099_qtwayland_no_evdev.patch " diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwebkit_%.bbappend b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwebkit_%.bbappend new file mode 100644 index 00000000..0420578e --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwebkit_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG = "gstreamer qtlocation qtmultimedia qtsensors" diff --git a/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qtaglextras/qtaglextras_git.bb b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qtaglextras/qtaglextras_git.bb new file mode 100644 index 00000000..84925a93 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical-qt5/recipes-qt/qtaglextras/qtaglextras_git.bb @@ -0,0 +1,28 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS += "qtbase qtdeclarative qtquickcontrols2 qlibwindowmanager libhomescreen" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/qtaglextras;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "a4d7197d3ccc411b98666a75126534849141acde" + +PV = "5.8.0+git${SRCPV}" +S = "${WORKDIR}/git/" + +inherit qmake5 + +PACKAGES += "${PN}-mkspecs" + +FILES_${PN}-mkspecs = "\ + ${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs \ +" + +FILES_${PN}-dev += " \ + ${OE_QMAKE_PATH_LIBS}/lib*${SOLIBSDEV} \ + ${OE_QMAKE_PATH_LIBS}/pkgconfig \ + ${OE_QMAKE_PATH_LIBS}/cmake/* \ + ${OE_QMAKE_PATH_LIBS}/*.prl \ + ${OE_QMAKE_PATH_LIBS}/*.la \ + ${OE_QMAKE_PATH_DATA}/* \ + ${OE_QMAKE_PATH_HEADERS}/* \ +" diff --git a/meta-agl/meta-agl-profile-graphical/classes/agl-graphical.bbclass b/meta-agl/meta-agl-profile-graphical/classes/agl-graphical.bbclass new file mode 100644 index 00000000..e99a441b --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/classes/agl-graphical.bbclass @@ -0,0 +1,7 @@ +WESTONTTY ??= "1" +WESTONUSER ??= "display" +WESTONGROUP ??= "display" +WESTONARGS ?= "--idle-time=0 --tty=${WESTONTTY}" +WESTONLAUNCHARGS ??= "--tty /dev/tty${WESTONTTY} --user ${WESTONUSER}" +DISPLAY_XDG_RUNTIME_DIR ??= "/run/platform/${WESTONUSER}" + diff --git a/meta-agl/meta-agl-profile-graphical/conf/layer.conf b/meta-agl/meta-agl-profile-graphical/conf/layer.conf new file mode 100644 index 00000000..a857b0c3 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofilegraphical" +BBFILE_PATTERN_aglprofilegraphical = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofilegraphical = "70" + +LAYERSERIES_COMPAT_aglprofilegraphical = "thud" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-homescreen/agl-service-homescreen_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-homescreen/agl-service-homescreen_git.bb new file mode 100644 index 00000000..6b250f83 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-homescreen/agl-service-homescreen_git.bb @@ -0,0 +1,14 @@ +SUMMARY = "Homescreen binding and client library for application" +DESCRIPTION = "agl-service-homescreen is the binding library" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/apps/agl-service-homescreen" +SECTION = "HMI" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "dbus glib-2.0 af-binder json-c" + +inherit cmake aglwgt + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-homescreen;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "6c3015a7607c45313fa10792b9914864f8c25831" +S = "${WORKDIR}/git" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-mediaplayer/agl-service-mediaplayer_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-mediaplayer/agl-service-mediaplayer_git.bb new file mode 100644 index 00000000..4f1757c7 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-mediaplayer/agl-service-mediaplayer_git.bb @@ -0,0 +1,18 @@ +SUMMARY = "Mediaplayer Service Binding" +DESCRIPTION = "AGL Mediaplayer Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-mediaplayer" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-mediaplayer;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c gstreamer1.0 gstreamer1.0-plugins-base" +RDEPENDS_${PN} = "agl-service-mediascanner agl-service-bluetooth gstreamer1.0-plugins-bad-waylandsink" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-radio/agl-service-radio_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-radio/agl-service-radio_git.bb new file mode 100644 index 00000000..b8f48ed7 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-radio/agl-service-radio_git.bb @@ -0,0 +1,19 @@ +SUMMARY = "Radio Service Binding" +DESCRIPTION = "AGL Radio Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-radio" +SECTION = "apps" +LICENSE = "Apache-2.0 & GPLv2+" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984 \ + file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +PV = "1.0+git${SRCPV}" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-radio;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +S = "${WORKDIR}/git" + +# build-time dependencies +DEPENDS = "rtl-sdr glib-2.0 gstreamer1.0 libusb-compat" + +inherit cmake aglwgt pkgconfig diff --git a/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-taskmanager/agl-service-taskmanager.bb b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-taskmanager/agl-service-taskmanager.bb new file mode 100644 index 00000000..7152144c --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-taskmanager/agl-service-taskmanager.bb @@ -0,0 +1,19 @@ +SUMMARY = "Task Manager Service Binding" +DESCRIPTION = "AGL Task Manager Service Binding" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/agl-service-taskmanager" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/agl-service-taskmanager;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "json-c procps" +RDEPENDS_${PN} = "qtwebsockets" + +inherit cmake aglwgt pkgconfig + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bb new file mode 100644 index 00000000..aacd9ccf --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/agl-service-windowmanager_git.bb @@ -0,0 +1,33 @@ +SUMMARY = "Window Manager service binding for applications" +DESCRIPTION = "Window Manager is the service binding for controlling \ + rendering rights. Applications request to render itself, \ + then Window Manager checks the policy and notifies the \ + layout to the respective applications \ + " +HOMEPAGE = "https://wiki.automotivelinux.org/windowmanager" +SECTION = "graphics" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +DEPENDS = "af-binder json-c wayland wayland-ivi-extension" + +inherit cmake aglwgt + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-windowmanager;protocol=https;branch=${AGL_BRANCH} \ + file://weston-ready.conf \ +" +SRCREV = "c850f10572d9252f7650065d5a305ca3739fea13" +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +do_install_append() { + # Install systemd over-ride that adds a dependency on weston-ready + # to ensure that the windowmanager and its dependencies start after + # weston is actually initialized. + install -d ${D}${sysconfdir}/systemd/system/afm-api-windowmanager@.service.d + install -m 0644 ${WORKDIR}/weston-ready.conf ${D}${sysconfdir}/systemd/system/afm-api-windowmanager@.service.d +} + +FILES_${PN} += "${systemd_system_unitdir}" + +RDEPENDS_${PN} += "weston-ready" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/files/weston-ready.conf b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/files/weston-ready.conf new file mode 100644 index 00000000..e90eed5f --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-apis/agl-service-windowmanager/files/weston-ready.conf @@ -0,0 +1,4 @@ +[Unit] +Requires=weston-ready.service +After=weston-ready.service + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb new file mode 100644 index 00000000..e0358d61 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb @@ -0,0 +1,21 @@ +SUMMARY = "AGL desktop config" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI += " \ + file://user-weston-term.service \ + file://user-weston-term.path \ +" + +do_install_append() { + install -d ${D}${systemd_user_unitdir} + install -m 0644 ${WORKDIR}/user-weston-term.service ${D}${systemd_user_unitdir} + install -m 0644 ${WORKDIR}/user-weston-term.path ${D}${systemd_user_unitdir} + + install -d ${D}${systemd_user_unitdir}/default.target.wants + ln -sf ${systemd_user_unitdir}/user-weston-term.path ${D}${libdir}/systemd/user/default.target.wants +} + +FILES_${PN} += "${systemd_user_unitdir}/*" +FILES_${PN} += "${systemd_user_unitdir}/default.target.wants/default.target.wants" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.path b/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.path new file mode 100644 index 00000000..9481840e --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.path @@ -0,0 +1,8 @@ +[Unit] +Description=Terminal for weston user unit path + +[Path] +PathExists=%t/wayland-0 + +[Install] +WantedBy=default.target diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.service b/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.service new file mode 100644 index 00000000..ad8b9583 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/agl-desktop-config/files/user-weston-term.service @@ -0,0 +1,12 @@ +[Unit] +Description=Terminal for weston user +After=user-config.service +Requires=user-config.service + +[Service] +Type=simple +ExecStart=/usr/bin/weston-terminal +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/files/hmi-debug b/meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/files/hmi-debug new file mode 100644 index 00000000..fee9573b --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/files/hmi-debug @@ -0,0 +1,8 @@ +#You can select log level of HMI framework +#1 ERROR +#2 WARNING +#3 NOTICE +#4 INFO +#5 DEBUG +#If you want to output debug log about hmi-framework, please uncomment the following. +#USE_HMI_DEBUG=5 diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/hmi-debug_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/hmi-debug_git.bb new file mode 100644 index 00000000..27fb60d6 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/hmi-debug/hmi-debug_git.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Configurations for HMI framework" + +SECTION = "HMI" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = " \ + file://hmi-debug \ +" + +FILES_${PN} = " \ + ${sysconfdir}/afm/unit.env.d \ +" + +do_install() { + install -d ${D}${sysconfdir}/afm/unit.env.d + install -m 644 ${WORKDIR}/hmi-debug ${D}${sysconfdir}/afm/unit.env.d +} diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen/org.agl.statusbar.conf b/meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen/org.agl.statusbar.conf new file mode 100644 index 00000000..dc3852ee --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen/org.agl.statusbar.conf @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen_git.bb new file mode 100644 index 00000000..1acd7af8 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/libhomescreen/libhomescreen_git.bb @@ -0,0 +1,26 @@ +SUMMARY = "AGL Home Screen Library" +DESCRIPTION = "libhomescreen" +HOMEPAGE = "http://docs.automotivelinux.org" +LICENSE = "Apache-2.0" +SECTION = "libs" + +BBCLASSEXTEND = " nativesdk" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +DEPENDS = "af-binder json-c" + +inherit cmake + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libhomescreen.git;protocol=https;branch=${AGL_BRANCH} \ + file://org.agl.statusbar.conf \ + " +SRCREV = "44290c49e08fe52d6e3ed80720473577131090f4" +S = "${WORKDIR}/git" + +do_install_append() { + mkdir -p ${D}${sysconfdir}/dbus-1/session.d + install -m 0644 ${WORKDIR}/org.agl.statusbar.conf ${D}${sysconfdir}/dbus-1/session.d +} + +RDEPENDS_${PN} = "agl-service-homescreen" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/libwindowmanager/libwindowmanager_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/libwindowmanager/libwindowmanager_git.bb new file mode 100644 index 00000000..04a83dd1 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/libwindowmanager/libwindowmanager_git.bb @@ -0,0 +1,15 @@ +SUMMARY = "Window Manager client library for applications" +DESCRIPTION = "Window Manager client library for application built with recipe" +SECTION = "graphics" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" + +DEPENDS = "af-binder json-c" +RDEPENDS_${PN} = "agl-service-windowmanager" + +inherit cmake + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libwindowmanager.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "003cdfb640b595345b0d4d09471872c9295d0bc7" +S = "${WORKDIR}/git" +PV = "1.0+git${SRCPV}" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/runxdg/runxdg_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/runxdg/runxdg_git.bb new file mode 100644 index 00000000..d5bd568b --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/runxdg/runxdg_git.bb @@ -0,0 +1,16 @@ +SUMMARY = "Launcher of XDG application on AGL HMI Framework (2017)" +DESCRIPTION = "The command 'runxdg' is a launcher to execute XDG application \ + on AGL HMI Framework which using wayland-ivi-extension" +HOMEPAGE = "https://git.automotivelinux.org/staging/xdg-launcher" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +DEPENDS = "json-c wayland wayland-ivi-extension libhomescreen libwindowmanager" + +inherit cmake + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/staging/xdg-launcher;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/Readme.weston-ini-conf b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/Readme.weston-ini-conf new file mode 100644 index 00000000..bbd5a80c --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/Readme.weston-ini-conf @@ -0,0 +1,34 @@ +##Generate a weston.ini file: + +To modify any of the default sections (core, shell, ivi-shell), add a +do_configure() function to your bbappend: + +''' +do_configure() { + echo repaint-window=34 >> ${WORKDIR}/core.cfg + + echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg + echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg +} +''' +or: +''' +do_configure() { + sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg +} +''' + +To change the display from the default assumption of an HDMI-1-A connected +screen that needs to be rotated 270 degrees: + +''' +SRC_URI_remove = "file://hdmi-a-1-270.cfg" +SRC_URI += "file://hdmi-a-1-90.cfg" +''' + +To add new sections just list them in SRC_URI: +''' +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://dsi.cfg" +''' diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb new file mode 100644 index 00000000..9f6684fc --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham-transmitter_git.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise" +HOMEPAGE = "https://github.com/waltham/waltham" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://waltham-transmitter/COPYING;md5=f21c9af4de068fb53b83f0b37d262ec3" + +DEPENDS += "libdrm virtual/kernel wayland wayland-native waltham weston gstreamer1.0 gstreamer gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad wayland-ivi-extension" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/weston-ivi-plugins.git;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "0fc0e974749f4ce35e14c23b050aa8fe693c3ce5" + +S = "${WORKDIR}/git/" + +WALTHAM_PIPELINE_TRANSMITTER ?= "waltham-transmitter/waltham-renderer/pipeline_example_general.cfg" +WALTHAM_PIPELINE_RECEIVER ?= "waltham-receiver/receiver_pipeline_example_general.cfg" +WALTHAM_RECIEVER_IP ?= "192.168.1.2" +WALTHAM_RECEIVER_PORT ?= "3440" + +inherit pkgconfig cmake + +do_install_append () { + install -d ${D}/etc/xdg/weston/ + install ${S}/${WALTHAM_PIPELINE_TRANSMITTER} ${D}/etc/xdg/weston/pipeline.cfg + install ${S}/${WALTHAM_PIPELINE_RECEIVER} ${D}/etc/xdg/weston/receiver_pipeline.cfg + + sed -i -e "s/YOUR_RECIEVER_IP/${WALTHAM_RECIEVER_IP}/g" ${D}/etc/xdg/weston/pipeline.cfg + sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/pipeline.cfg + sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/receiver_pipeline.cfg + +} + +FILES_${PN} += "/etc/xdg/weston/*.cfg" +FILES_${PN} += "${libdir}/*" +FILES_${PN} += "${bindir}/*" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_git.bb new file mode 100644 index 00000000..01023a1f --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/waltham_git.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise" +HOMEPAGE = "https://github.com/waltham/waltham" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=e8ad01a5182f2c1b3a2640e9ea268264 \ +" +SRCREV = "1de58c3ff746ddaba7584d760c5454243723d3ca" +SRC_URI = "git://github.com/wmizuno/waltham.git \ + " +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +DEPENDS += "libdrm virtual/kernel wayland" +RDEPENDS_${PN} += "libdrm" \ No newline at end of file diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch new file mode 100644 index 00000000..7ea0b6e9 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch @@ -0,0 +1,22 @@ +From 48977cb77410247df547063d9d7bcd381fb13cde Mon Sep 17 00:00:00 2001 +From: Michael Teyfel +Date: Fri, 12 Oct 2018 17:12:24 +0200 +Subject: [PATCH 1/3] Added ivi-id-agent to CMake + +Reworked for wayland-ivi-extension 2.2.0 by Scott Murray. + +Signed-off-by: Michael Teyfel +Signed-off-by: Scott Murray + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7d0044a..988fc89 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,6 +40,7 @@ add_subdirectory(ivi-layermanagement-api/test) + add_subdirectory(ivi-layermanagement-examples) + add_subdirectory(ivi-layermanagement-api/ilmInput) + add_subdirectory(ivi-input-modules/ivi-input-controller) ++add_subdirectory(ivi-id-agent-modules/ivi-id-agent) + + + #============================================================================================= diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-add-LayerManagerControl-error-status.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-add-LayerManagerControl-error-status.patch new file mode 100644 index 00000000..9f1ab47b --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-add-LayerManagerControl-error-status.patch @@ -0,0 +1,21 @@ +LayerManagerControl: add error exit status + +Tweak to add a non-zero exit status on errors. This is useful for +scripting, and allows writing a simple loop to detect Weston readiness. + +Upstream-Status: Pending + +Signed-off-by: Scott Murray + +diff --git a/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp b/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp +index 8ee0546..210e21e 100644 +--- a/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp ++++ b/ivi-layermanagement-examples/LayerManagerControl/src/main.cpp +@@ -45,6 +45,7 @@ int main(int argc, char* argv[]) + if (CommandSuccess != interpreter.interpretCommand(userCommand)) + { + cerr << "Interpreter error: " << interpreter.getLastError() << endl; ++ return 1; + } + + return 0; diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch new file mode 100644 index 00000000..7deb01e9 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch @@ -0,0 +1,530 @@ +From 42fc715a430068cdb4484e2cb119418da8ac4e6f Mon Sep 17 00:00:00 2001 +From: Michael Teyfel +Date: Fri, 12 Oct 2018 16:46:57 +0200 +Subject: [PATCH 2/3] ivi-id-agent: added ivi-id-agent + +This is a reference implementation of an ivi-id-agent plugin. It +creates surface-ids for desktop-surfaces depending on the configuration +provided in "weston.ini". For more please refer to the reference +implementation in this commit. + +The only public interface available is the "id_agent_module_init" +function. It is responsible for initialization of structs and reading +the configuration. + +In the reference "weston.ini" two types of configurations can be found: + +[desktop-app] is used to configure a particular application. Therefore +the desired surface-id must be provided. Moreover "app-title" is the +title that is provided by the desktop application (xdg-protocol). +"app-id" behaves accordingly. Although both parameters can be set, it +is not mandatory. Finally at least one has to be set. + +[desktop-app-default] enables the id-agent to generate generic +surface-ids for unconfigured applications, e.g. for development. This +tag is optional. To generate the id an interval starting from +"default-surface-id" to "default-surface-id-max" is used. The id is +incremented until the interval is exceeded. + +In the function "get_id" a surface-id is assigned by means of the +configuration. It can be adjusted, if another behavior is desired. +In this plugin the parameters, that are described above, are evaluated. + +To use these patches please also apply the dedicated patches for +weston: https://github.com/mtey/weston/tree/xdg_support_ivi_id_agent +Since libweston-desktop is used to introduce desktop-surface support, +xdg-protocol is supported. + +Reworked for wayland-ivi-extension 2.2.0 by Scott Murray. + +Signed-off-by: Michael Teyfel +Signed-off-by: Scott Murray + +diff --git a/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt +new file mode 100644 +index 0000000..7354a7e +--- /dev/null ++++ b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt +@@ -0,0 +1,69 @@ ++############################################################################### ++# ++# Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH ++# ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++############################################################################### ++ ++cmake_minimum_required (VERSION 2.6) ++ ++project(ivi-id-agent) ++ ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED) ++pkg_check_modules(WESTON weston>=5.0.0 REQUIRED) ++pkg_check_modules(PIXMAN pixman-1 REQUIRED) ++pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-6 REQUIRED) ++ ++find_package(Threads REQUIRED) ++ ++include_directories( ++ src ++ ${WAYLAND_SERVER_INCLUDE_DIRS} ++ ${WESTON_INCLUDE_DIRS} ++ ${PIXMAN_INCLUDE_DIRS} ++) ++ ++link_directories( ++ ${WAYLAND_SERVER_LIBRARY_DIRS} ++ ${PIXMAN_LIBRARY_DIRS} ++) ++ ++ ++add_library(${PROJECT_NAME} MODULE ++ src/ivi-id-agent.c ++) ++ ++set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") ++ ++add_dependencies(${PROJECT_NAME} ++ ${WAYLAND_SERVER_LIBRARIES} ++ ${PIXMAN_LIBRARIES} ++) ++ ++set(LIBS ++ ${LIBS} ++ ${WAYLAND_SERVER_LIBRARIES} ++ ${LIBWESTON_DESKTOP_LIBRARIES} ++) ++ ++set(CMAKE_C_LDFLAGS "-module -avoid-version") ++ ++target_link_libraries(${PROJECT_NAME} ${LIBS}) ++ ++install ( ++ TARGETS ${PROJECT_NAME} ++ LIBRARY DESTINATION lib${LIB_SUFFIX}/weston ++) +diff --git a/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c b/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c +new file mode 100644 +index 0000000..9bc115d +--- /dev/null ++++ b/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c +@@ -0,0 +1,381 @@ ++/* ++ * Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and ++ * its documentation for any purpose is hereby granted without fee, provided ++ * that the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of the copyright holders not be used in ++ * advertising or publicity pertaining to distribution of the software ++ * without specific, written prior permission. The copyright holders make ++ * no representations about the suitability of this software for any ++ * purpose. It is provided "as is" without express or implied warranty. ++ * ++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS ++ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND ++ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY ++ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ++ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF ++ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include "config-parser.h" ++#include ++ ++#ifndef INVALID_ID ++#define INVALID_ID 0xFFFFFFFF ++#endif ++ ++struct db_elem ++{ ++ struct wl_list link; ++ uint32_t surface_id; ++ char *cfg_app_id; ++ char *cfg_title; ++ struct ivi_layout_surface *layout_surface; ++}; ++ ++struct ivi_id_agent ++{ ++ uint32_t default_behavior_set; ++ uint32_t default_surface_id; ++ uint32_t default_surface_id_max; ++ struct wl_list app_list; ++ struct weston_compositor *compositor; ++ const struct ivi_layout_interface *interface; ++ ++ struct wl_listener desktop_surface_configured; ++ struct wl_listener destroy_listener; ++ struct wl_listener surface_removed; ++}; ++ ++static int32_t ++check_config_parameter(char *cfg_val, char *val) ++{ ++ if (cfg_val == NULL) ++ return IVI_SUCCEEDED; ++ else if (val == NULL || strcmp(cfg_val, val) != 0) ++ return IVI_FAILED; ++ ++ return IVI_SUCCEEDED; ++} ++ ++static int32_t ++get_id_from_config(struct ivi_id_agent *ida, struct ivi_layout_surface ++ *layout_surface) { ++ struct db_elem *db_elem; ++ char *temp_app_id = NULL; ++ char *temp_title = NULL; ++ int ret = IVI_FAILED; ++ ++ struct weston_surface *weston_surface = ++ ida->interface->surface_get_weston_surface(layout_surface); ++ ++ /* Get app id and title */ ++ struct weston_desktop_surface *wds = weston_surface_get_desktop_surface( ++ weston_surface); ++ ++ if (weston_desktop_surface_get_app_id(wds) != NULL) ++ temp_app_id = strdup(weston_desktop_surface_get_app_id(wds)); ++ ++ if (weston_desktop_surface_get_title(wds) != NULL) ++ temp_title = strdup(weston_desktop_surface_get_title(wds)); ++ ++ /* ++ * Check for every config parameter to be fulfilled. This part must be ++ * extended, if additional attributes are desired to be checked. ++ */ ++ wl_list_for_each(db_elem, &ida->app_list, link) ++ { ++ if (check_config_parameter(db_elem->cfg_app_id, temp_app_id) == 0) { ++ if (check_config_parameter(db_elem->cfg_title, temp_title) == 0) { ++ /* Found configuration for application. */ ++ int res = ida->interface->surface_set_id(layout_surface, ++ db_elem->surface_id); ++ if (res) ++ continue; ++ ++ db_elem->layout_surface = layout_surface; ++ ret = IVI_SUCCEEDED; ++ ++ break; ++ } ++ } ++ } ++ ++ free(temp_app_id); ++ free(temp_title); ++ ++ return ret; ++} ++ ++/* ++ * This function generates the id of a surface in regard to the desired ++ * parameters. For implementation of different behavior in id generation please ++ * adjust this function. ++ * In this implementation the app_id and/or title of the application is used for ++ * identification. It is also possible to use the pid, uid or gid for example. ++ */ ++static int32_t ++get_id(struct ivi_id_agent *ida, struct ivi_layout_surface *layout_surface) ++{ ++ if (get_id_from_config(ida, layout_surface) == IVI_SUCCEEDED) ++ return IVI_SUCCEEDED; ++ ++ /* No default layer available */ ++ if (ida->default_behavior_set == 0) { ++ weston_log("ivi-id-agent: Could not find configuration for application\n"); ++ goto ivi_failed; ++ ++ /* Default behavior for unknown applications */ ++ } else if (ida->default_surface_id < ida->default_surface_id_max) { ++ weston_log("ivi-id-agent: No configuration for application adding to " ++ "default layer\n"); ++ ++ /* ++ * Check if ivi-shell application already created an application with ++ * desired surface_id ++ */ ++ struct ivi_layout_surface *temp_layout_surf = ++ ida->interface->get_surface_from_id( ++ ida->default_surface_id); ++ if ((temp_layout_surf != NULL) && (temp_layout_surf != layout_surface)) { ++ weston_log("ivi-id-agent: surface_id already used by an ivi-shell " ++ "application\n"); ++ goto ivi_failed; ++ } ++ ++ ida->interface->surface_set_id(layout_surface, ++ ida->default_surface_id); ++ ida->default_surface_id++; ++ ++ } else { ++ weston_log("ivi-id-agent: Interval for default surface_id generation " ++ "exceeded\n"); ++ goto ivi_failed; ++ } ++ ++ return IVI_SUCCEEDED; ++ ++ivi_failed: ++ return IVI_FAILED; ++} ++ ++static void ++desktop_surface_event_configure(struct wl_listener *listener, ++ void *data) ++{ ++ struct ivi_id_agent *ida = wl_container_of(listener, ida, ++ desktop_surface_configured); ++ ++ struct ivi_layout_surface *layout_surface = ++ (struct ivi_layout_surface *) data; ++ ++ if (get_id(ida, layout_surface) == IVI_FAILED) ++ weston_log("ivi-id-agent: Could not create surface_id for application\n"); ++} ++ ++static void ++surface_event_remove(struct wl_listener *listener, void *data) { ++ struct ivi_id_agent *ida = wl_container_of(listener, ida, ++ surface_removed); ++ struct ivi_layout_surface *layout_surface = ++ (struct ivi_layout_surface *) data; ++ struct db_elem *db_elem = NULL; ++ ++ wl_list_for_each(db_elem, &ida->app_list, link) ++ { ++ if(db_elem->layout_surface == layout_surface) { ++ db_elem->layout_surface = NULL; ++ break; ++ } ++ } ++} ++ ++static int32_t deinit(struct ivi_id_agent *ida); ++ ++static void ++id_agent_module_deinit(struct wl_listener *listener, void *data) { ++ (void)data; ++ struct ivi_id_agent *ida = wl_container_of(listener, ida, destroy_listener); ++ ++ deinit(ida); ++} ++ ++static int32_t ++check_config(struct db_elem *curr_db_elem, struct ivi_id_agent *ida) ++{ ++ struct db_elem *db_elem; ++ ++ if (ida->default_surface_id <= curr_db_elem->surface_id ++ && curr_db_elem->surface_id <= ida->default_surface_id_max) { ++ weston_log("ivi-id-agent: surface_id: %d in default id interval " ++ "[%d, %d] (CONFIG ERROR)\n", curr_db_elem->surface_id, ++ ida->default_surface_id, ida->default_surface_id_max); ++ goto ivi_failed; ++ } ++ ++ wl_list_for_each(db_elem, &ida->app_list, link) ++ { ++ if(curr_db_elem == db_elem) ++ continue; ++ ++ if (db_elem->surface_id == curr_db_elem->surface_id) { ++ weston_log("ivi-id-agent: Duplicate surface_id: %d (CONFIG ERROR)\n", ++ curr_db_elem->surface_id); ++ goto ivi_failed; ++ } ++ } ++ ++ return IVI_SUCCEEDED; ++ ++ivi_failed: ++ return IVI_FAILED; ++} ++ ++static int32_t ++read_config(struct ivi_id_agent *ida) ++{ ++ struct weston_config *config = NULL; ++ struct weston_config_section *section = NULL; ++ const char *name = NULL; ++ ++ config = wet_get_config(ida->compositor); ++ if (!config) ++ goto ivi_failed; ++ ++ section = weston_config_get_section(config, "desktop-app-default", NULL, ++ NULL); ++ ++ if (section) { ++ weston_log("ivi-id-agent: Default behavior for unknown applications is " ++ "set\n"); ++ ida->default_behavior_set = 1; ++ ++ weston_config_section_get_uint(section, "default-surface-id", ++ &ida->default_surface_id, INVALID_ID); ++ weston_config_section_get_uint(section, "default-surface-id-max", ++ &ida->default_surface_id_max, INVALID_ID); ++ ++ if (ida->default_surface_id == INVALID_ID || ++ ida->default_surface_id_max == INVALID_ID) { ++ weston_log("ivi-id-agent: Missing configuration for default " ++ "behavior\n"); ++ ida->default_behavior_set = 0; ++ } ++ } else { ++ ida->default_behavior_set = 0; ++ } ++ ++ section = NULL; ++ while (weston_config_next_section(config, §ion, &name)) { ++ struct db_elem *db_elem = NULL; ++ ++ if (strcmp(name, "desktop-app") != 0) ++ continue; ++ ++ db_elem = calloc(1, sizeof *db_elem); ++ if (db_elem == NULL) { ++ weston_log("ivi-id-agent: No memory to allocate\n"); ++ goto ivi_failed; ++ } ++ ++ wl_list_insert(&ida->app_list, &db_elem->link); ++ ++ weston_config_section_get_uint(section, "surface-id", ++ &db_elem->surface_id, INVALID_ID); ++ ++ if (db_elem->surface_id == INVALID_ID) { ++ weston_log("ivi-id-agent: surface-id is not set in configuration\n"); ++ goto ivi_failed; ++ } ++ ++ weston_config_section_get_string(section, "app-id", ++ &db_elem->cfg_app_id, NULL); ++ weston_config_section_get_string(section, "app-title", ++ &db_elem->cfg_title, NULL); ++ ++ if (db_elem->cfg_app_id == NULL && db_elem->cfg_title == NULL) { ++ weston_log("ivi-id-agent: Every parameter is NULL in app " ++ "configuration\n"); ++ goto ivi_failed; ++ } ++ ++ if (check_config(db_elem, ida) == IVI_FAILED) { ++ weston_log("ivi-id-agent: No valid config found, deinit...\n"); ++ goto ivi_failed; ++ } ++ } ++ ++ if(ida->default_behavior_set == 0 && wl_list_empty(&ida->app_list)) { ++ weston_log("ivi-id-agent: No valid config found, deinit...\n"); ++ goto ivi_failed; ++ } ++ ++ return IVI_SUCCEEDED; ++ ++ivi_failed: ++ return IVI_FAILED; ++} ++ ++WL_EXPORT int32_t ++id_agent_module_init(struct weston_compositor *compositor, ++ const struct ivi_layout_interface *interface) ++{ ++ struct ivi_id_agent *ida = NULL; ++ ++ ida = calloc(1, sizeof *ida); ++ if (ida == NULL) { ++ weston_log("failed to allocate ivi_id_agent\n"); ++ goto ivi_failed; ++ } ++ ++ ida->compositor = compositor; ++ ida->interface = interface; ++ ida->desktop_surface_configured.notify = desktop_surface_event_configure; ++ ida->destroy_listener.notify = id_agent_module_deinit; ++ ida->surface_removed.notify = surface_event_remove; ++ ++ wl_signal_add(&compositor->destroy_signal, &ida->destroy_listener); ++ ida->interface->add_listener_configure_desktop_surface( ++ &ida->desktop_surface_configured); ++ interface->add_listener_remove_surface(&ida->surface_removed); ++ ++ wl_list_init(&ida->app_list); ++ if(read_config(ida) != 0) { ++ weston_log("ivi-id-agent: Read config failed\n"); ++ deinit(ida); ++ goto ivi_failed; ++ } ++ ++ return IVI_SUCCEEDED; ++ ++ivi_failed: ++ return IVI_FAILED; ++} ++ ++static int32_t ++deinit(struct ivi_id_agent *ida) ++{ ++ struct db_elem *db_elem; ++ wl_list_for_each(db_elem, &ida->app_list, link) { ++ free(db_elem->cfg_app_id); ++ free(db_elem->cfg_title); ++ free(db_elem); ++ } ++ ++ wl_list_remove(&ida->desktop_surface_configured.link); ++ wl_list_remove(&ida->destroy_listener.link); ++ wl_list_remove(&ida->surface_removed.link); ++ free(ida); ++ ++ return IVI_SUCCEEDED; ++} +diff --git a/ivi-id-agent-modules/ivi-id-agent/weston.ini.in b/ivi-id-agent-modules/ivi-id-agent/weston.ini.in +new file mode 100644 +index 0000000..48a196c +--- /dev/null ++++ b/ivi-id-agent-modules/ivi-id-agent/weston.ini.in +@@ -0,0 +1,20 @@ ++[core] ++shell=ivi-shell.so ++require-input=false ++ ++[ivi-shell] ++ivi-module=ivi-controller.so ++ivi-input-module=ivi-input-controller.so ++ivi-id-agent-module=ivi-id-agent.so ++ ++[desktop-app] ++surface-id=111 ++app-title=Flower ++ ++[desktop-app] ++surface-id=251 ++app-title=Flower ++ ++[desktop-app-default] ++default-surface-id=2000000 ++default-surface-id-max=2001000 diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch new file mode 100644 index 00000000..8985879b --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch @@ -0,0 +1,67 @@ +From 5fed5c51ca8c1574804362bfdea4930c16457d34 Mon Sep 17 00:00:00 2001 +From: Michael Teyfel +Date: Fri, 12 Oct 2018 16:57:24 +0200 +Subject: [PATCH 3/3] ivi-controller: load id-agent module + +Reworked for wayland-ivi-extension 2.2.0 by Scott Murray. + +Signed-off-by: Michael Teyfel +Signed-off-by: Scott Murray + +diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c +index 8faec2a..8fa51f4 100644 +--- a/weston-ivi-shell/src/ivi-controller.c ++++ b/weston-ivi-shell/src/ivi-controller.c +@@ -2154,6 +2154,41 @@ load_input_module(struct ivishell *shell) + return 0; + } + ++static int load_id_agent_module(struct ivishell *shell) ++{ ++ struct weston_config *config = wet_get_config(shell->compositor); ++ struct weston_config_section *section; ++ char *id_agent_module = NULL; ++ ++ int (*id_agent_module_init)(struct weston_compositor *compositor, ++ const struct ivi_layout_interface *interface); ++ ++ section = weston_config_get_section(config, "ivi-shell", NULL, NULL); ++ ++ if (weston_config_section_get_string(section, "ivi-id-agent-module", ++ &id_agent_module, NULL) < 0) { ++ /* input events are handled by weston's default grabs */ ++ weston_log("ivi-controller: No ivi-id-agent-module set\n"); ++ return 0; ++ } ++ ++ id_agent_module_init = wet_load_module_entrypoint(id_agent_module, "id_agent_module_init"); ++ if (!id_agent_module_init) { ++ free(id_agent_module); ++ return -1; ++ } ++ ++ if (id_agent_module_init(shell->compositor, shell->interface) != 0) { ++ weston_log("ivi-controller: Initialization of id-agent module failed\n"); ++ free(id_agent_module); ++ return -1; ++ } ++ ++ free(id_agent_module); ++ ++ return 0; ++} ++ + static void + launch_client_process(void *data) + { +@@ -2221,6 +2256,10 @@ wet_module_init(struct weston_compositor *compositor, + shell->destroy_listener.notify = ivi_shell_destroy; + wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener); + ++ if (load_id_agent_module(shell) < 0) { ++ weston_log("ivi-controller: id-agent module not loaded\n"); ++ } ++ + if (shell->bkgnd_surface_id && shell->ivi_client_name) { + loop = wl_display_get_event_loop(compositor->wl_display); + wl_event_loop_add_idle(loop, launch_client_process, shell); diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch new file mode 100644 index 00000000..05d1cc23 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0004-ivi-ilmcontrol-added-focus-notification.patch @@ -0,0 +1,29 @@ +diff --git a/ivi-layermanagement-api/ilmCommon/include/ilm_types.h b/ivi-layermanagement-api/ilmCommon/include/ilm_types.h +index a88f2b0..12a2017 100644 +--- a/ivi-layermanagement-api/ilmCommon/include/ilm_types.h ++++ b/ivi-layermanagement-api/ilmCommon/include/ilm_types.h +@@ -245,6 +245,7 @@ typedef enum + ILM_NOTIFICATION_CONTENT_AVAILABLE = ILM_BIT(6), + ILM_NOTIFICATION_CONTENT_REMOVED = ILM_BIT(7), + ILM_NOTIFICATION_CONFIGURED = ILM_BIT(8), ++ ILM_NOTIFICATION_FOCUS = ILM_BIT(9), + ILM_NOTIFICATION_ALL = 0xffff + } t_ilm_notification_mask; + +diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +index a912e50..5166839 100644 +--- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c ++++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +@@ -819,6 +819,12 @@ input_listener_input_focus(void *data, + surf_ctx->prop.focus |= device; + else + surf_ctx->prop.focus &= ~device; ++ ++ if (surf_ctx->notification != NULL) { ++ surf_ctx->notification(surf_ctx->id_surface, ++ &surf_ctx->prop, ++ ILM_NOTIFICATION_FOCUS); ++ } + } + } + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0005-disable-EGLWLMockNavigation-example-build.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0005-disable-EGLWLMockNavigation-example-build.patch new file mode 100644 index 00000000..21028d58 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/0005-disable-EGLWLMockNavigation-example-build.patch @@ -0,0 +1,22 @@ +Disable EGLWLMockNavigation example build + +The EGLWLMockNavigation example code has build issues on TI platforms. +To avoid needing to patch it just for those platforms, just disable +building it since there are no known users inside AGL. + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Scott Murray + +diff --git a/ivi-layermanagement-examples/CMakeLists.txt b/ivi-layermanagement-examples/CMakeLists.txt +index 1eab8e9..48bdffd 100644 +--- a/ivi-layermanagement-examples/CMakeLists.txt ++++ b/ivi-layermanagement-examples/CMakeLists.txt +@@ -24,7 +24,6 @@ project (ivi-layermanagement-examples) + # cmake configuration + #=========================================================================================================== + add_subdirectory(LayerManagerControl) +-add_subdirectory(EGLWLMockNavigation) + add_subdirectory(EGLWLInputEventExample) + add_subdirectory(layer-add-surfaces) + add_subdirectory(multi-touch-viewer) diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch new file mode 100644 index 00000000..86b448be --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3610fa9..8b4614d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,7 +34,7 @@ add_subdirectory(ivi-layermanagement-api/ilmCommon) + add_subdirectory(ivi-layermanagement-api/ilmClient) + add_subdirectory(ivi-layermanagement-api/ilmControl) + add_subdirectory(ivi-layermanagement-api/test) +-add_subdirectory(ivi-layermanagement-examples) ++#add_subdirectory(ivi-layermanagement-examples) + + if(WITH_ILM_INPUT) + add_subdirectory(ivi-input-api/ilmInput) diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb new file mode 100644 index 00000000..3935929a --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland-ivi-extension_git.bb @@ -0,0 +1,35 @@ +SUMMARY = "Wayland IVI Extension" +DESCRIPTION = "GENIVI Layer Management API based on Wayland IVI Extension" +HOMEPAGE = "http://projects.genivi.org/wayland-ivi-extension" +BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Extension" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1f1a56bb2dadf5f2be8eb342acf4ed79" + +SRC_URI = "git://github.com/GENIVI/${BPN}.git;protocol=http \ + file://0001-Added-ivi-id-agent-to-CMake.patch \ + file://0002-ivi-id-agent-added-ivi-id-agent.patch \ + file://0003-ivi-controller-load-id-agent-module.patch \ + file://0002-add-LayerManagerControl-error-status.patch \ + file://0004-ivi-ilmcontrol-added-focus-notification.patch \ + file://0005-disable-EGLWLMockNavigation-example-build.patch \ +" +SRC_URI_append_wandboard = " file://wandboard_fix_build.patch" +SRCREV = "736fb654ac81230cf4f9e51a5772d3a02d7639bf" + +PV = "2.2.0+git${SRCPV}" +S = "${WORKDIR}/git" + +DEPENDS = "weston virtual/libgles2 pixman wayland-native" + +FILESEXTRAPATHS_prepend := ":${THISDIR}/wayland-ivi-extension:" + +inherit cmake + +EXTRA_OECMAKE := "-DWITH_ILM_INPUT=1" + +FILES_${PN} += "${libdir}/weston/*" +FILES_${PN} += "${datadir}/wayland-protocols/stable/ivi-application/*" + +FILES_${PN}-dbg += "${libdir}/weston/.debug/*" + +EXTRA_OECMAKE += "-DLIB_SUFFIX=${@d.getVar('baselib', True).replace('lib', '')}" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch new file mode 100644 index 00000000..b04127b5 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0001-Change-socket-mode-add-rw-for-group.patch @@ -0,0 +1,29 @@ +From 9162f7d4cfeec7103474e8703218b3679ca9ed10 Mon Sep 17 00:00:00 2001 +From: Ronan Le Martret +Date: Tue, 18 Apr 2017 13:53:26 +0200 +Subject: [PATCH] Change socket mode:add rw for group + +Signed-off-by: Ronan Le Martret +--- + src/wayland-server.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/wayland-server.c b/src/wayland-server.c +index 64d1bec..313c5a0 100644 +--- a/src/wayland-server.c ++++ b/src/wayland-server.c +@@ -1189,7 +1189,10 @@ _wl_display_add_socket(struct wl_display *display, struct wl_socket *s) + wl_log("bind() failed with error: %m\n"); + return -1; + } +- ++ if (chmod(s->addr.sun_path, 0660) < 0) { ++ wl_log("chmod() failed with error: %m\n"); ++ return -1; ++ } + if (listen(s->fd, 128) < 0) { + wl_log("listen() failed with error: %m\n"); + return -1; +-- +2.6.6 + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch new file mode 100644 index 00000000..ea9dbd65 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland/0002-server-Fix-fake-Address-already-in-use-error.patch @@ -0,0 +1,35 @@ +From 152c9ed968124c253f0be25b76c2a083a21af37e Mon Sep 17 00:00:00 2001 +From: Liu Wenlong +Date: Mon, 26 Aug 2019 17:08:22 +0800 +Subject: [PATCH] server: Fix fake "Address already in use" error + +In the current workflow, socket file will be deleted if it already exists. +However, if the socket file is a symbolic link and the file that it refers +to doesn't exist, we will got "Address already in use" because bind() +thinks the socket file exists and won't create it. + +Now, use lstat() to determine whether the socket file exists. + +Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/35] + +Signed-off-by: Liu Wenlong +--- + src/wayland-server.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/wayland-server.c b/src/wayland-server.c +index 83b984f..3bc6ed7 100644 +--- a/src/wayland-server.c ++++ b/src/wayland-server.c +@@ -1393,7 +1393,7 @@ wl_socket_lock(struct wl_socket *socket) + goto err_fd; + } + +- if (stat(socket->addr.sun_path, &socket_stat) < 0 ) { ++ if (lstat(socket->addr.sun_path, &socket_stat) < 0 ) { + if (errno != ENOENT) { + wl_log("did not manage to stat file %s\n", + socket->addr.sun_path); +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend new file mode 100644 index 00000000..5677ed52 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/wayland_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = "\ + file://0001-Change-socket-mode-add-rw-for-group.patch \ + file://0002-server-Fix-fake-Address-already-in-use-error.patch \ + " diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 00000000..910cf5a6 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1,81 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +inherit agl-graphical + + +WESTONSTART ??= "/usr/bin/weston ${WESTONARGS}" +WESTONSTART_append = " ${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", " --log=${DISPLAY_XDG_RUNTIME_DIR}/weston.log", "",d)}" + +SRC_URI += " \ + file://weston_tmpfiles.conf \ + file://weston.service.add \ +" + +do_install_append() { + sed -i "/\[Unit\]/aConflicts=getty@tty${WESTONTTY}.service" \ + ${D}${systemd_system_unitdir}/weston.service + + sed -i "/\[Service\]/r ${S}/weston.service.add" \ + ${D}${systemd_system_unitdir}/weston.service + + if ! grep -q '^Group=' ${D}${systemd_system_unitdir}/weston.service; then + sed -i "/\[Service\]/aGroup=root" ${D}${systemd_system_unitdir}/weston.service + fi + if ! grep -q '^User=' ${D}${systemd_system_unitdir}/weston.service; then + sed -i "/\[Service\]/aUser=root" ${D}${systemd_system_unitdir}/weston.service + fi + + sed -e 's,User=root,User=${WESTONUSER},g' \ + -e 's,Group=root,Group=${WESTONGROUP},g' \ + -e 's,ExecStart=.*,ExecStart=${WESTONSTART},g' \ + -e 's,@WESTONTTY@,${WESTONTTY},g' \ + -e 's,@XDG_RUNTIME_DIR@,${DISPLAY_XDG_RUNTIME_DIR},g' \ + -e '/PAMName=/d' \ + -i ${D}${systemd_system_unitdir}/weston.service + + # Add a rule to ensure the 'display' user has permissions to + # open the graphics device + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/udev/rules.d + cat >${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF' +SUBSYSTEM=="drm", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service" +EOF + + # user 'display' must own /dev/tty${WESTONTTY} for weston to start correctly + cat >${D}${sysconfdir}/udev/rules.d/zz-tty.rules <<'EOF' +SUBSYSTEM=="tty", KERNEL=="tty${WESTONTTY}", OWNER="${WESTONUSER}", SECLABEL{smack}="^", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service" +EOF + + # user 'display' must also be able to access /dev/input/* + cat >${D}${sysconfdir}/udev/rules.d/zz-input.rules <<'EOF' +SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="^", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service" +EOF + + # user 'display' must also be able to access /dev/media*, etc. + cat >${D}${sysconfdir}/udev/rules.d/zz-remote-display.rules <<'EOF' +SUBSYSTEM=="media", MODE="0660", GROUP="display", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service" +SUBSYSTEM=="video4linux", MODE="0660", GROUP="display", SECLABEL{smack}="*", TAG+="systemd", ENV{SYSTEMD_WANTS}="weston.service" +KERNEL=="uvcs", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*" +KERNEL=="rgnmm", SUBSYSTEM=="misc", MODE="0660", GROUP="display", SECLABEL{smack}="*" +EOF + + install -d ${D}${sysconfdir}/tmpfiles.d + install -Dm755 ${WORKDIR}/weston_tmpfiles.conf ${D}/${libdir}/tmpfiles.d/weston.conf + + sed -e 's,@WESTONUSER@,${WESTONUSER},g' \ + -e 's,@WESTONGROUP@,${WESTONGROUP},g' \ + -i ${D}/${libdir}/tmpfiles.d/weston.conf +} + +do_install_append_imx() { + + install -d ${D}${sysconfdir}/udev/rules.d + cat >>${D}${sysconfdir}/udev/rules.d/zz-dri.rules <<'EOF' +SUBSYSTEM=="gpu_class", MODE="0660", GROUP="${WESTONGROUP}", SECLABEL{smack}="*" +EOF + +} + +FILES_${PN} += "${libdir}/tmpfiles.d/*.conf" + + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.service.add b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.service.add new file mode 100644 index 00000000..d24a8eb2 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston.service.add @@ -0,0 +1,11 @@ +Type=notify +Environment="XDG_RUNTIME_DIR=@XDG_RUNTIME_DIR@" +Environment="XDG_RUNTIMESHARE_DIR=@XDG_RUNTIME_DIR@/share" +ExecStartPre=/bin/mkdir -p @XDG_RUNTIME_DIR@/share +ExecStartPre=+/usr/bin/chsmack -a User::App-Shared -t @XDG_RUNTIME_DIR@/share +TTYPath=/dev/tty@WESTONTTY@ +StandardInput=tty +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes +UtmpIdentifier=tty@WESTONTTY@ diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston_tmpfiles.conf b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston_tmpfiles.conf new file mode 100644 index 00000000..c4b302fa --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-init/weston_tmpfiles.conf @@ -0,0 +1,6 @@ +# This file is distributed to create weston XDG_RUNTIME_DIR (/run/deamon/@WESTONUSER@) +# +# See tmpfiles.d(5) for details + +d /run/platform/ 0775 root root - +d /run/platform/@WESTONUSER@ 0770 @WESTONUSER@ @WESTONGROUP@ - diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready new file mode 100644 index 00000000..c7cba304 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready @@ -0,0 +1,56 @@ +#!/bin/bash +# +# Copyright (c) 2018, Konsulko Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Simple script to check if Weston+IVI shell is ready by calling +# LayerManagerControl, optionally waiting for a specified timeout. +# + +usage="Usage: weston-ready [-t timeout]" +timeout=0 + +function info() { echo "$@" >&2; } + +if [ $# -eq 2 ]; then + if [ $1 = "-t" ]; then + timeout=$(($2 * 10)) + else + echo $usage + exit 1 + fi +fi + +info "using timeout $timeout" + +time=0 +rc=1 +while true; do + if [ $time -gt $timeout ]; then + info "Timeout reached" + break + elif LayerManagerControl get screens >/dev/null 2>&1; then + info "Weston is now ready" + rc=0 + break + fi + info "waiting..." + if [ $timeout -gt 0 ]; then + usleep 500000 + fi + time=$(($time + 5)) +done +exit $rc diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready.service b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready.service new file mode 100644 index 00000000..603f5f36 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready/weston-ready.service @@ -0,0 +1,10 @@ +[Unit] +Description=Wait for Weston readiness +Requires=weston.service +After=weston.service + +[Service] +SupplementaryGroups=display +Environment="XDG_RUNTIME_DIR=/run/platform/display" +ExecStart=/usr/bin/weston-ready -t 10 +Type=oneshot diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready_1.0.bb b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready_1.0.bb new file mode 100644 index 00000000..a3d0bb24 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston-ready_1.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "Weston readiness checker" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +inherit systemd + +SRC_URI = "file://weston-ready \ + file://weston-ready.service \ +" + +do_install() { + install -D -m 0755 ${WORKDIR}/weston-ready ${D}${bindir}/weston-ready + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -D -m 0644 ${WORKDIR}/weston-ready.service ${D}${systemd_system_unitdir}/weston-ready.service + fi +} + +SYSTEMD_SERVICE_${PN} = "weston-ready.service" + +RDEPENDS_${PN} += "weston bash" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch new file mode 100644 index 00000000..3a59ba0c --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-Allow-regular-users-to-launch-Weston_2.0.0.patch @@ -0,0 +1,39 @@ +From 6c145cea35f0b77613d6e3f48679c976b9839d7c Mon Sep 17 00:00:00 2001 +From: Ronan Le Martret +Date: Wed, 31 May 2017 22:48:18 +0000 +Subject: [PATCH] Allow regular users to launch Weston + +Signed-off-by: Ronan Le Martret + +diff --git a/configure.ac b/configure.ac +index 50f8e013..2043b9b0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -156,6 +156,12 @@ PKG_CHECK_MODULES(XKBCOMMON_COMPOSE, [xkbcommon >= 0.5.0], + [AC_DEFINE(HAVE_XKBCOMMON_COMPOSE, 1, + [Define if xkbcommon is 0.5.0 or newer])],true) + ++AC_ARG_ENABLE(sys-uid, [ --enable-sys-uid],, ++ enable_sys_uid=no) ++if test x$enable_sys_uid = xyes; then ++ AC_DEFINE(ENABLE_SYS_UID, [1], [Allow regular users to launch Weston]) ++fi ++ + AC_ARG_ENABLE(setuid-install, [ --enable-setuid-install],, + enable_setuid_install=yes) + AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes) +diff --git a/libweston/launcher-direct.c b/libweston/launcher-direct.c +index e0ce6d63..d0db9bb5 100644 +--- a/libweston/launcher-direct.c ++++ b/libweston/launcher-direct.c +@@ -283,8 +283,10 @@ launcher_direct_connect(struct weston_launcher **out, struct weston_compositor * + { + struct launcher_direct *launcher; + ++#ifndef ENABLE_SYS_UID + if (geteuid() != 0) + return -EINVAL; ++#endif + + launcher = zalloc(sizeof(*launcher)); + if (launcher == NULL) diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch new file mode 100644 index 00000000..b1e0b8a5 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch @@ -0,0 +1,57 @@ +diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c +index 58f53bc5..34cdce27 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -484,13 +484,14 @@ wet_shell_init(struct weston_compositor *compositor, + int *argc, char *argv[]) + { + struct ivi_shell *shell; +- int retval = -1; + + shell = zalloc(sizeof *shell); + if (shell == NULL) +- return -1; ++ goto err_shell; + + init_ivi_shell(compositor, shell); ++ /* TODO deinit_ivi_shell should be implemented, since init_ivi_shell is ++ * initializing multiple lists. */ + + shell->destroy_listener.notify = shell_destroy; + wl_signal_add(&compositor->destroy_signal, &shell->destroy_listener); +@@ -499,22 +500,29 @@ wet_shell_init(struct weston_compositor *compositor, + wl_signal_add(&compositor->wake_signal, &shell->wake_listener); + + if (input_panel_setup(shell) < 0) +- goto out; ++ goto err_shell; + + shell->text_backend = text_backend_init(compositor); + if (!shell->text_backend) +- goto out; ++ goto err_shell; + + if (wl_global_create(compositor->wl_display, + &ivi_application_interface, 1, + shell, bind_ivi_application) == NULL) +- goto out; ++ goto err_text_backend; + + ivi_layout_init_with_compositor(compositor); ++ /* TODO ivi_layout_destroy should be implemented, since multiple lists ++ * and signals are initialized.*/ + shell_add_bindings(compositor, shell); + +- retval = 0; ++ return IVI_SUCCEEDED; + +-out: +- return retval; ++err_text_backend: ++ text_backend_destroy(shell->text_backend); ++ ++err_shell: ++ free(shell); ++ ++ return IVI_FAILED; + } diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch new file mode 100644 index 00000000..187bea50 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-compositor-add-output-type-to-weston_output.patch @@ -0,0 +1,202 @@ +From e31e63976aab7616319c10ad21c998c3b4c634e6 Mon Sep 17 00:00:00 2001 +From: Veeresh Kadasani +Date: Tue, 30 Jul 2019 20:22:15 +0900 +Subject: [PATCH 1/2] compositor: add output type to weston_output + +This enables weston to use multiple types of backend +Each backends have own output structure for each functions +To avoid invalid member access, type identifier is needed + +Signed-off-by: Veeresh Kadasani +--- + libweston/compositor-drm.c | 12 +++++++++++- + libweston/compositor-fbdev.c | 2 +- + libweston/compositor-headless.c | 2 +- + libweston/compositor-rdp.c | 2 +- + libweston/compositor-wayland.c | 2 +- + libweston/compositor-x11.c | 2 +- + libweston/compositor.h | 12 ++++++++++++ + 7 files changed, 28 insertions(+), 6 deletions(-) + +diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c +index c110110..b83459a 100644 +--- a/libweston/compositor-drm.c ++++ b/libweston/compositor-drm.c +@@ -923,6 +923,7 @@ drm_output_find_by_crtc(struct drm_backend *b, uint32_t crtc_id) + struct drm_output *output; + + wl_list_for_each(output, &b->compositor->output_list, base.link) { ++ if(output->base.output_type == OUTPUT_DRM) + if (output->crtc_id == crtc_id) + return output; + } +@@ -939,6 +940,7 @@ drm_head_find_by_connector(struct drm_backend *backend, uint32_t connector_id) + wl_list_for_each(base, + &backend->compositor->head_list, compositor_link) { + head = to_drm_head(base); ++ if(base->output->output_type == OUTPUT_DRM) + if (head->connector_id == connector_id) + return head; + } +@@ -6159,6 +6161,7 @@ drm_output_enable(struct weston_output *base) + + assert(!output->virtual); + ++ output->base.output_type = OUTPUT_DRM; + resources = drmModeGetResources(b->drm.fd); + if (!resources) { + weston_log("drmModeGetResources failed\n"); +@@ -6628,6 +6631,7 @@ drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device) + /* Remove connectors that have disappeared. */ + wl_list_for_each_safe(base, next, + &b->compositor->head_list, compositor_link) { ++ if (base->output->output_type == OUTPUT_DRM) { + bool removed = true; + + head = to_drm_head(base); +@@ -6646,6 +6650,7 @@ drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device) + head->base.name, head->connector_id); + drm_head_destroy(head); + } ++ } + + drm_backend_update_unused_outputs(b, resources); + +@@ -6751,12 +6756,14 @@ session_notify(struct wl_listener *listener, void *data) + * pending frame callbacks. */ + + wl_list_for_each(output, &compositor->output_list, base.link) { ++ if(output->base.output_type == OUTPUT_DRM) { + output->base.repaint_needed = false; + if (output->cursor_plane) + drmModeSetCursor(b->drm.fd, output->crtc_id, + 0, 0, 0); + } +- ++ } ++ if(output->base.output_type == OUTPUT_DRM) { + output = container_of(compositor->output_list.next, + struct drm_output, base.link); + +@@ -6768,6 +6775,7 @@ session_notify(struct wl_listener *listener, void *data) + plane->plane_id, + output->crtc_id, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0); ++ } + } + } + } +@@ -7094,6 +7102,7 @@ switch_to_gl_renderer(struct drm_backend *b) + } + + wl_list_for_each(output, &b->compositor->output_list, base.link) ++ if(output->base.output_type == OUTPUT_DRM) + pixman_renderer_output_destroy(&output->base); + + b->compositor->renderer->destroy(b->compositor); +@@ -7106,6 +7115,7 @@ switch_to_gl_renderer(struct drm_backend *b) + } + + wl_list_for_each(output, &b->compositor->output_list, base.link) ++ if(output->base.output_type == OUTPUT_DRM) + drm_output_init_egl(output, b); + + b->use_pixman = 0; +diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c +index 6031be5..97002e6 100644 +--- a/libweston/compositor-fbdev.c ++++ b/libweston/compositor-fbdev.c +@@ -526,7 +526,7 @@ fbdev_output_enable(struct weston_output *base) + struct fbdev_head *head; + int fb_fd; + struct wl_event_loop *loop; +- ++ output->base.output_type = OUTPUT_FBDEV; + head = fbdev_output_get_head(output); + + /* Create the frame buffer. */ +diff --git a/libweston/compositor-headless.c b/libweston/compositor-headless.c +index 5a0e46c..20b78b2 100644 +--- a/libweston/compositor-headless.c ++++ b/libweston/compositor-headless.c +@@ -160,7 +160,7 @@ headless_output_enable(struct weston_output *base) + loop = wl_display_get_event_loop(b->compositor->wl_display); + output->finish_frame_timer = + wl_event_loop_add_timer(loop, finish_frame_handler, output); +- ++ output->base.output_type = OUTPUT_HEADLESS; + if (b->use_pixman) { + output->image_buf = malloc(output->base.current_mode->width * + output->base.current_mode->height * 4); +diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c +index 871a0a3..b3064dd 100644 +--- a/libweston/compositor-rdp.c ++++ b/libweston/compositor-rdp.c +@@ -554,7 +554,7 @@ rdp_output_enable(struct weston_output *base) + struct rdp_output *output = to_rdp_output(base); + struct rdp_backend *b = to_rdp_backend(base->compositor); + struct wl_event_loop *loop; +- ++ output->base.output_type = OUTPUT_RDP; + output->shadow_surface = pixman_image_create_bits(PIXMAN_x8r8g8b8, + output->base.current_mode->width, + output->base.current_mode->height, +diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c +index e1485ca..75140b2 100644 +--- a/libweston/compositor-wayland.c ++++ b/libweston/compositor-wayland.c +@@ -1221,7 +1221,7 @@ wayland_output_enable(struct weston_output *base) + struct wayland_backend *b = to_wayland_backend(base->compositor); + enum mode_status mode_status; + int ret = 0; +- ++ output->base.output_type = OUTPUT_WAYLAND; + weston_log("Creating %dx%d wayland output at (%d, %d)\n", + output->base.current_mode->width, + output->base.current_mode->height, +diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c +index 922e3c8..8c20626 100644 +--- a/libweston/compositor-x11.c ++++ b/libweston/compositor-x11.c +@@ -934,7 +934,7 @@ x11_output_enable(struct weston_output *base) + XCB_EVENT_MASK_STRUCTURE_NOTIFY, + 0 + }; +- ++ output->base.output_type = OUTPUT_X11; + if (!b->no_input) + values[0] |= + XCB_EVENT_MASK_KEY_PRESS | +diff --git a/libweston/compositor.h b/libweston/compositor.h +index a5223c2..040917b 100644 +--- a/libweston/compositor.h ++++ b/libweston/compositor.h +@@ -169,6 +169,17 @@ enum dpms_enum { + WESTON_DPMS_OFF + }; + ++/* bit compatible with drm definitions. */ ++enum output_type { ++ OUTPUT_DRM, ++ OUTPUT_FBDEV, ++ OUTPUT_HEADLESS, ++ OUTPUT_RDP, ++ OUTPUT_WAYLAND, ++ OUTPUT_X11, ++ OUTPUT_WALTHAM ++}; ++ + /** Represents a monitor + * + * This object represents a monitor (hardware backends like DRM) or a window +@@ -202,6 +213,7 @@ struct weston_head { + struct weston_output { + uint32_t id; + char *name; ++ enum output_type output_type; + + /** Matches the lifetime from the user perspective */ + struct wl_signal user_destroy_signal; +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-removed-assert.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-removed-assert.patch new file mode 100644 index 00000000..4507e769 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0002-ivi-shell-removed-assert.patch @@ -0,0 +1,11 @@ +index e9ddf9a4..f3156d35 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -114,7 +114,6 @@ shell_surface_send_configure(struct weston_surface *surface, + struct ivi_shell_surface *shsurf; + + shsurf = get_ivi_shell_surface(surface); +- assert(shsurf); + if (!shsurf) + return; + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch new file mode 100644 index 00000000..388e430d --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch @@ -0,0 +1,111 @@ +From 2cb25adac6b968104bbfb276c684506607dfbff4 Mon Sep 17 00:00:00 2001 +From: Veeresh Kadasani +Date: Wed, 7 Aug 2019 21:05:11 +0900 +Subject: [PATCH 1/1] compositor-drm: introduce drm_get_dmafd_from_view + +This API enables to get dmafd from weston_view + +Signed-off-by: Veeresh Kadasani +--- + libweston/compositor-drm.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++ + libweston/compositor-drm.h | 7 ++++++ + 2 files changed, 66 insertions(+) + +diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c +index b83459a..98ad85c 100644 +--- a/libweston/compositor-drm.c ++++ b/libweston/compositor-drm.c +@@ -5848,6 +5848,64 @@ drm_output_set_seat(struct weston_output *base, + seat ? seat : ""); + } + ++ static int ++drm_get_dma_fd_from_view(struct weston_output *base, ++ struct weston_view *ev, int *buf_stride) ++{ ++ struct drm_backend *b = to_drm_backend(base->compositor); ++ struct weston_buffer *buffer = ev->surface->buffer_ref.buffer; ++ struct gbm_bo *bo; ++ struct drm_fb *current; ++ struct linux_dmabuf_buffer *dmabuf; ++ bool is_opaque = weston_view_is_opaque(ev,&ev->transform.boundingbox); ++ uint32_t format; ++ int fd, ret; ++ ++ if(!buffer) { ++ weston_log("buffer is NULL\n"); ++ return -1; ++ } ++ ++ if(dmabuf = linux_dmabuf_buffer_get(buffer->resource)) { ++ current = drm_fb_get_from_dmabuf(dmabuf, b, is_opaque); ++ if (!current) ++ { ++ fprintf(stderr, "failed to get drm_fb from dmabuf\n"); ++ return -1; ++ } ++ *buf_stride=current->strides[0]; ++ } ++ else if(ev->surface->buffer_ref.buffer->legacy_buffer) { ++ bo = gbm_bo_import(b->gbm, GBM_BO_IMPORT_WL_BUFFER, ++ buffer->resource, GBM_BO_USE_SCANOUT); ++ if (!bo) { ++ weston_log("failed to get gbm_bo\n"); ++ return -1; ++ } ++ current = drm_fb_get_from_bo(bo, b, is_opaque, BUFFER_CLIENT); ++ ++ if (!current) { ++ weston_log("failed to get drm_fb from bo\n"); ++ return -1; ++ } ++ *buf_stride=current->strides[0]; ++ } ++ else { ++ weston_log("Buffer is not supported\n"); ++ return -1; ++ } ++ ++ ret = drmPrimeHandleToFD(b->drm.fd, current->handles[0], ++ DRM_CLOEXEC, &fd); ++ free(current); ++ if (ret) { ++ weston_log("failed to create prime fd for front buffer\n"); ++ return -1; ++ } ++ ++ return fd; ++} ++ + static int + drm_output_init_gamma_size(struct drm_output *output) + { +@@ -7396,6 +7454,7 @@ static const struct weston_drm_output_api api = { + drm_output_set_mode, + drm_output_set_gbm_format, + drm_output_set_seat, ++ drm_get_dma_fd_from_view + }; + + static const struct weston_drm_virtual_output_api virt_api = { +diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h +index 71a306f..a9379e4 100644 +--- a/libweston/compositor-drm.h ++++ b/libweston/compositor-drm.h +@@ -78,6 +78,13 @@ struct weston_drm_output_api { + */ + void (*set_seat)(struct weston_output *output, + const char *seat); ++ ++ /** Get the dma fd from drm view. ++ * ++ * The dma fd is got from weston_view. ++ * Returns fd on success, -1 on failure. ++ */ ++ int (*get_dma_fd_from_view)(struct weston_output *output, struct weston_view *view, int *buf_stride); + }; + + static inline const struct weston_drm_output_api * +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch new file mode 100644 index 00000000..9f696d8a --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch @@ -0,0 +1,20 @@ +diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h +index 016d8b5c..02bfb2cb 100644 +--- a/ivi-shell/ivi-layout-export.h ++++ b/ivi-shell/ivi-layout-export.h +@@ -56,6 +56,7 @@ extern "C" { + #endif /* __cplusplus */ + + #include ++#include + + #include "stdbool.h" + #include "compositor.h" +@@ -63,6 +64,7 @@ extern "C" { + + #define IVI_SUCCEEDED (0) + #define IVI_FAILED (-1) ++#define IVI_INVALID_ID UINT_MAX + + struct ivi_layout_layer; + struct ivi_layout_screen; diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-layout-interface-added-interface-to-change-surface-id.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-layout-interface-added-interface-to-change-surface-id.patch new file mode 100644 index 00000000..6401c5b8 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-layout-interface-added-interface-to-change-surface-id.patch @@ -0,0 +1,73 @@ +index e1e897ed..5b1f12f0 100644 +--- a/ivi-shell/ivi-layout-export.h ++++ b/ivi-shell/ivi-layout-export.h +@@ -320,6 +320,12 @@ struct ivi_layout_interface { + struct ivi_layout_surface *ivisurf, + uint32_t duration); + ++ /** ++ * \brief set id of ivi_layout_surface ++ */ ++ int32_t (*surface_set_id)(struct ivi_layout_surface *ivisurf, ++ uint32_t id_surface); ++ + /** + * layer controller interface + */ +diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c +index 298e18ea..fa8e75f6 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -1901,6 +1901,44 @@ ivi_layout_surface_set_transition_duration(struct ivi_layout_surface *ivisurf, + return 0; + } + ++/* ++ * This interface enables e.g. an id agent to set the id of an ivi-layout ++ * surface, that has been created by a desktop application. This can only be ++ * done once as long as the initial surface id equals IVI_INVALID_ID. Afterwards ++ * two events are emitted, namely surface_created and surface_configured. ++ */ ++static int32_t ++ivi_layout_surface_set_id(struct ivi_layout_surface *ivisurf, ++ uint32_t id_surface) ++{ ++ struct ivi_layout *layout = get_instance(); ++ struct ivi_layout_surface *search_ivisurf = NULL; ++ ++ if (!ivisurf) { ++ weston_log("%s: invalid argument\n", __func__); ++ return IVI_FAILED; ++ } ++ ++ if (ivisurf->id_surface != IVI_INVALID_ID) { ++ weston_log("surface id can only be set once\n"); ++ return IVI_FAILED; ++ } ++ ++ search_ivisurf = get_surface(&layout->surface_list, id_surface); ++ if (search_ivisurf) { ++ weston_log("id_surface(%d) is already created\n", id_surface); ++ return IVI_FAILED; ++ } ++ ++ ivisurf->id_surface = id_surface; ++ ++ wl_signal_emit(&layout->surface_notification.created, ivisurf); ++ wl_signal_emit(&layout->surface_notification.configure_changed, ++ ivisurf); ++ ++ return IVI_SUCCEEDED; ++} ++ + static int32_t + ivi_layout_surface_set_transition(struct ivi_layout_surface *ivisurf, + enum ivi_layout_transition_type type, +@@ -2058,6 +2096,7 @@ static struct ivi_layout_interface ivi_layout_interface = { + .surface_get_weston_surface = ivi_layout_surface_get_weston_surface, + .surface_set_transition = ivi_layout_surface_set_transition, + .surface_set_transition_duration = ivi_layout_surface_set_transition_duration, ++ .surface_set_id = ivi_layout_surface_set_id, + + /** + * layer controller interfaces diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-ivi-layout-introcuded-configure_desktop_changed.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-ivi-layout-introcuded-configure_desktop_changed.patch new file mode 100644 index 00000000..ddd949e3 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0005-ivi-layout-introcuded-configure_desktop_changed.patch @@ -0,0 +1,74 @@ +index 5b1f12f0..dd0997aa 100644 +--- a/ivi-shell/ivi-layout-export.h ++++ b/ivi-shell/ivi-layout-export.h +@@ -187,6 +187,16 @@ struct ivi_layout_interface { + */ + int32_t (*add_listener_configure_surface)(struct wl_listener *listener); + ++ /** ++ * \brief add a listener for notification when desktop_surface is configured ++ * ++ * When an desktop_surface is configured, a signal is emitted ++ * to the listening controller plugins. ++ * The pointer of the configured desktop_surface is sent as the void *data argument ++ * to the wl_listener::notify callback function of the listener. ++ */ ++ int32_t (*add_listener_configure_desktop_surface)(struct wl_listener *listener); ++ + /** + * \brief Get all ivi_surfaces which are currently registered and managed + * by the services +diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h +index 2b8bd472..fe5be01a 100644 +--- a/ivi-shell/ivi-layout-private.h ++++ b/ivi-shell/ivi-layout-private.h +@@ -104,6 +104,7 @@ struct ivi_layout { + struct wl_signal created; + struct wl_signal removed; + struct wl_signal configure_changed; ++ struct wl_signal configure_desktop_changed; + } surface_notification; + + struct weston_layer layout_layer; +diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c +index fa8e75f6..690af742 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -1040,6 +1040,21 @@ ivi_layout_add_listener_configure_surface(struct wl_listener *listener) + return IVI_SUCCEEDED; + } + ++static int32_t ++ivi_layout_add_listener_configure_desktop_surface(struct wl_listener *listener) ++{ ++ struct ivi_layout *layout = get_instance(); ++ ++ if (!listener) { ++ weston_log("ivi_layout_add_listener_configure_desktop_surface: invalid argument\n"); ++ return IVI_FAILED; ++ } ++ ++ wl_signal_add(&layout->surface_notification.configure_desktop_changed, listener); ++ ++ return IVI_SUCCEEDED; ++} ++ + uint32_t + ivi_layout_get_id_of_surface(struct ivi_layout_surface *ivisurf) + { +@@ -2057,6 +2072,7 @@ ivi_layout_init_with_compositor(struct weston_compositor *ec) + wl_signal_init(&layout->surface_notification.created); + wl_signal_init(&layout->surface_notification.removed); + wl_signal_init(&layout->surface_notification.configure_changed); ++ wl_signal_init(&layout->surface_notification.configure_desktop_changed); + + /* Add layout_layer at the last of weston_compositor.layer_list */ + weston_layer_init(&layout->layout_layer, ec); +@@ -2081,6 +2097,7 @@ static struct ivi_layout_interface ivi_layout_interface = { + .add_listener_create_surface = ivi_layout_add_listener_create_surface, + .add_listener_remove_surface = ivi_layout_add_listener_remove_surface, + .add_listener_configure_surface = ivi_layout_add_listener_configure_surface, ++ .add_listener_configure_desktop_surface = ivi_layout_add_listener_configure_desktop_surface, + .get_surface = shell_get_ivi_layout_surface, + .get_surfaces = ivi_layout_get_surfaces, + .get_id_of_surface = ivi_layout_get_id_of_surface, diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch new file mode 100644 index 00000000..04461a1d --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch @@ -0,0 +1,117 @@ +index 68ca68ba..c86cbb11 100644 +--- a/ivi-shell/ivi-layout-shell.h ++++ b/ivi-shell/ivi-layout-shell.h +@@ -39,6 +39,14 @@ struct weston_view; + struct weston_surface; + struct ivi_layout_surface; + ++void ++ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf, ++ int32_t width, int32_t height); ++ ++struct ivi_layout_surface* ++ivi_layout_desktop_surface_create(struct weston_surface *wl_surface, ++ uint32_t id_surface); ++ + void + ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf, + int32_t width, int32_t height); +diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c +index 690af742..086d0fd2 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -1995,20 +1995,8 @@ ivi_layout_surface_dump(struct weston_surface *surface, + * methods of interaction between ivi-shell with ivi-layout + */ + +-void +-ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf, +- int32_t width, int32_t height) +-{ +- struct ivi_layout *layout = get_instance(); +- +- /* emit callback which is set by ivi-layout api user */ +- wl_signal_emit(&layout->surface_notification.configure_changed, +- ivisurf); +-} +- +-struct ivi_layout_surface* +-ivi_layout_surface_create(struct weston_surface *wl_surface, +- uint32_t id_surface) ++static struct ivi_layout_surface* ++surface_create(struct weston_surface *wl_surface, uint32_t id_surface) + { + struct ivi_layout *layout = get_instance(); + struct ivi_layout_surface *ivisurf = NULL; +@@ -2018,14 +2006,6 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, + return NULL; + } + +- ivisurf = get_surface(&layout->surface_list, id_surface); +- if (ivisurf != NULL) { +- if (ivisurf->surface != NULL) { +- weston_log("id_surface(%d) is already created\n", id_surface); +- return NULL; +- } +- } +- + ivisurf = calloc(1, sizeof *ivisurf); + if (ivisurf == NULL) { + weston_log("fails to allocate memory\n"); +@@ -2049,7 +2029,55 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, + + wl_list_insert(&layout->surface_list, &ivisurf->link); + +- wl_signal_emit(&layout->surface_notification.created, ivisurf); ++ return ivisurf; ++} ++ ++void ++ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf, ++ int32_t width, int32_t height) ++{ ++ struct ivi_layout *layout = get_instance(); ++ ++ /* emit callback which is set by ivi-layout api user */ ++ wl_signal_emit(&layout->surface_notification.configure_desktop_changed, ++ ivisurf); ++} ++ ++struct ivi_layout_surface* ++ivi_layout_desktop_surface_create(struct weston_surface *wl_surface, ++ uint32_t id_surface) ++{ ++ return surface_create(wl_surface, id_surface); ++} ++ ++void ++ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf, ++ int32_t width, int32_t height) ++{ ++ struct ivi_layout *layout = get_instance(); ++ ++ /* emit callback which is set by ivi-layout api user */ ++ wl_signal_emit(&layout->surface_notification.configure_changed, ++ ivisurf); ++} ++ ++struct ivi_layout_surface* ++ivi_layout_surface_create(struct weston_surface *wl_surface, ++ uint32_t id_surface) ++{ ++ struct ivi_layout *layout = get_instance(); ++ struct ivi_layout_surface *ivisurf = NULL; ++ ++ ivisurf = get_surface(&layout->surface_list, id_surface); ++ if (ivisurf) { ++ weston_log("id_surface(%d) is already created\n", id_surface); ++ return NULL; ++ } ++ ++ ivisurf = surface_create(wl_surface, id_surface); ++ ++ if (ivisurf) ++ wl_signal_emit(&layout->surface_notification.created, ivisurf); + + return ivisurf; + } diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0007-ivi-shell-linked-libweston-desktop-and-added-structs.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0007-ivi-shell-linked-libweston-desktop-and-added-structs.patch new file mode 100644 index 00000000..9286ba00 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0007-ivi-shell-linked-libweston-desktop-and-added-structs.patch @@ -0,0 +1,74 @@ +diff --git a/Makefile.am b/Makefile.am +index cdf82ab4..d990d400 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -993,6 +993,7 @@ ivi_shell_la_LDFLAGS = -module -avoid-version + ivi_shell_la_LIBADD = \ + libshared.la \ + libweston-@LIBWESTON_MAJOR@.la \ ++ libweston-desktop-@LIBWESTON_MAJOR@.la \ + $(COMPOSITOR_LIBS) + ivi_shell_la_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) + ivi_shell_la_SOURCES = \ +diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h +index fe5be01a..c054130b 100644 +--- a/ivi-shell/ivi-layout-private.h ++++ b/ivi-shell/ivi-layout-private.h +@@ -30,6 +30,7 @@ + + #include "compositor.h" + #include "ivi-layout-export.h" ++#include "libweston-desktop/libweston-desktop.h" + + struct ivi_layout_view { + struct wl_list link; /* ivi_layout::view_list */ +@@ -52,6 +53,7 @@ struct ivi_layout_surface { + + struct ivi_layout *layout; + struct weston_surface *surface; ++ struct weston_desktop_surface *weston_desktop_surface; + + struct ivi_layout_surface_properties prop; + +diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c +index f3156d35..84db2c97 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -44,7 +44,7 @@ + + #include "ivi-shell.h" + #include "ivi-application-server-protocol.h" +-#include "ivi-layout-export.h" ++#include "ivi-layout-private.h" + #include "ivi-layout-shell.h" + #include "shared/helpers.h" + #include "compositor/weston.h" +@@ -271,6 +271,8 @@ application_surface_create(struct wl_client *client, + return; + } + ++ layout_surface->weston_desktop_surface = NULL; ++ + ivisurf = zalloc(sizeof *ivisurf); + if (ivisurf == NULL) { + wl_resource_post_no_memory(resource); +diff --git a/ivi-shell/ivi-shell.h b/ivi-shell/ivi-shell.h +index e35f75f2..be430853 100644 +--- a/ivi-shell/ivi-shell.h ++++ b/ivi-shell/ivi-shell.h +@@ -30,6 +30,7 @@ + #include + + #include "compositor.h" ++#include "libweston-desktop/libweston-desktop.h" + + struct ivi_shell + { +@@ -37,6 +38,7 @@ struct ivi_shell + + struct weston_compositor *compositor; + ++ struct weston_desktop *desktop; + struct wl_list ivi_surface_list; /* struct ivi_shell_surface::link */ + + struct text_backend *text_backend; diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0008-ivi-layout-use-libweston-desktop-api-for-views.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0008-ivi-layout-use-libweston-desktop-api-for-views.patch new file mode 100644 index 00000000..e53a8c45 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0008-ivi-layout-use-libweston-desktop-api-for-views.patch @@ -0,0 +1,30 @@ +index 086d0fd2..6b854503 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -153,7 +153,10 @@ ivi_view_destroy(struct ivi_layout_view *ivi_view) + wl_list_remove(&ivi_view->pending_link); + wl_list_remove(&ivi_view->order_link); + +- weston_view_destroy(ivi_view->view); ++ if (weston_surface_is_desktop_surface(ivi_view->ivisurf->surface)) ++ weston_desktop_surface_unlink_view(ivi_view->view); ++ else ++ weston_view_destroy(ivi_view->view); + + free(ivi_view); + } +@@ -170,7 +173,13 @@ ivi_view_create(struct ivi_layout_layer *ivilayer, + return NULL; + } + +- ivi_view->view = weston_view_create(ivisurf->surface); ++ if (weston_surface_is_desktop_surface(ivisurf->surface)) { ++ ivi_view->view = weston_desktop_surface_create_view( ++ ivisurf->weston_desktop_surface); ++ } else { ++ ivi_view->view = weston_view_create(ivisurf->surface); ++ } ++ + if (ivi_view->view == NULL) { + weston_log("fails to allocate memory\n"); + free(ivi_view); diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch new file mode 100644 index 00000000..6a72f15d --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch @@ -0,0 +1,166 @@ +index 84db2c97..e797e4f9 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -489,6 +489,162 @@ shell_add_bindings(struct weston_compositor *compositor, + shell); + } + ++/* ++ * libweston-desktop ++ */ ++ ++static void ++desktop_surface_ping_timeout(struct weston_desktop_client *client, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_ping_timeout is not supported\n"); ++} ++ ++static void ++desktop_surface_pong(struct weston_desktop_client *client, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_pong is not supported\n"); ++} ++ ++static void ++desktop_surface_added(struct weston_desktop_surface *surface, ++ void *user_data) ++{ ++ struct ivi_shell *shell = (struct ivi_shell *) user_data; ++ struct ivi_layout_surface *layout_surface; ++ struct ivi_shell_surface *ivisurf; ++ struct weston_surface *weston_surf = ++ weston_desktop_surface_get_surface(surface); ++ ++ layout_surface = ivi_layout_desktop_surface_create(weston_surf, ++ IVI_INVALID_ID); ++ if (!layout_surface) { ++ return; ++ } ++ ++ layout_surface->weston_desktop_surface = surface; ++ ++ ivisurf = zalloc(sizeof *ivisurf); ++ if (!ivisurf) { ++ return; ++ } ++ ++ ivisurf->shell = shell; ++ ivisurf->id_surface = IVI_INVALID_ID; ++ ++ ivisurf->width = 0; ++ ivisurf->height = 0; ++ ivisurf->layout_surface = layout_surface; ++ ivisurf->surface = weston_surf; ++ ++ weston_desktop_surface_set_user_data(surface, ivisurf); ++} ++ ++static void ++desktop_surface_removed(struct weston_desktop_surface *surface, ++ void *user_data) ++{ ++ struct ivi_shell_surface *ivisurf = (struct ivi_shell_surface *) ++ weston_desktop_surface_get_user_data(surface); ++ ++ assert(ivisurf != NULL); ++ ++ if (ivisurf->layout_surface) ++ layout_surface_cleanup(ivisurf); ++} ++ ++static void ++desktop_surface_committed(struct weston_desktop_surface *surface, ++ int32_t sx, int32_t sy, void *user_data) ++{ ++ struct ivi_shell_surface *ivisurf = (struct ivi_shell_surface *) ++ weston_desktop_surface_get_user_data(surface); ++ struct weston_surface *weston_surf = ++ weston_desktop_surface_get_surface(surface); ++ ++ if(!ivisurf) ++ return; ++ ++ if (weston_surf->width == 0 || weston_surf->height == 0) ++ return; ++ ++ if (ivisurf->width != weston_surf->width || ++ ivisurf->height != weston_surf->height) { ++ ivisurf->width = weston_surf->width; ++ ivisurf->height = weston_surf->height; ++ ++ ivi_layout_desktop_surface_configure(ivisurf->layout_surface, ++ weston_surf->width, ++ weston_surf->height); ++ } ++} ++ ++static void ++desktop_surface_move(struct weston_desktop_surface *surface, ++ struct weston_seat *seat, uint32_t serial, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_move is not supported\n"); ++} ++ ++static void ++desktop_surface_resize(struct weston_desktop_surface *surface, ++ struct weston_seat *seat, uint32_t serial, ++ enum weston_desktop_surface_edge edges, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_resize is not supported\n"); ++} ++ ++static void ++desktop_surface_fullscreen_requested(struct weston_desktop_surface *surface, ++ bool fullscreen, ++ struct weston_output *output, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_fullscreen_requested is not supported\n"); ++} ++ ++static void ++desktop_surface_maximized_requested(struct weston_desktop_surface *surface, ++ bool maximized, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_maximized_requested is not supported\n"); ++} ++ ++static void ++desktop_surface_minimized_requested(struct weston_desktop_surface *surface, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_minimized_requested is not supported\n"); ++} ++ ++static void ++desktop_surface_set_xwayland_position(struct weston_desktop_surface *surface, ++ int32_t x, int32_t y, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_set_xwayland_position is not supported\n"); ++} ++ ++static const struct weston_desktop_api shell_desktop_api = { ++ .struct_size = sizeof(struct weston_desktop_api), ++ .ping_timeout = desktop_surface_ping_timeout, ++ .pong = desktop_surface_pong, ++ .surface_added = desktop_surface_added, ++ .surface_removed = desktop_surface_removed, ++ .committed = desktop_surface_committed, ++ ++ .move = desktop_surface_move, ++ .resize = desktop_surface_resize, ++ .fullscreen_requested = desktop_surface_fullscreen_requested, ++ .maximized_requested = desktop_surface_maximized_requested, ++ .minimized_requested = desktop_surface_minimized_requested, ++ .set_xwayland_position = desktop_surface_set_xwayland_position, ++}; ++ ++/* ++ * end of libweston-desktop ++ */ ++ + /* + * Initialization of ivi-shell. + */ diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0010-ivi-shell-remove-surface_destroy_listener.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0010-ivi-shell-remove-surface_destroy_listener.patch new file mode 100644 index 00000000..b76c35d4 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0010-ivi-shell-remove-surface_destroy_listener.patch @@ -0,0 +1,24 @@ +index e797e4f9..5f64e72d 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -162,6 +162,10 @@ layout_surface_cleanup(struct ivi_shell_surface *ivisurf) + { + assert(ivisurf->layout_surface != NULL); + ++ /* destroy weston_surface destroy signal. */ ++ if (!ivisurf->layout_surface->weston_desktop_surface) ++ wl_list_remove(&ivisurf->surface_destroy_listener.link); ++ + ivi_layout_surface_destroy(ivisurf->layout_surface); + ivisurf->layout_surface = NULL; + +@@ -169,9 +173,6 @@ layout_surface_cleanup(struct ivi_shell_surface *ivisurf) + ivisurf->surface->committed_private = NULL; + weston_surface_set_label_func(ivisurf->surface, NULL); + ivisurf->surface = NULL; +- +- // destroy weston_surface destroy signal. +- wl_list_remove(&ivisurf->surface_destroy_listener.link); + } + + /* diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch new file mode 100644 index 00000000..f6256f78 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch @@ -0,0 +1,30 @@ +diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c +index b0a2a2b9..a889afdb 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -664,10 +664,14 @@ wet_shell_init(struct weston_compositor *compositor, + if (!shell->text_backend) + goto err_shell; + ++ shell->desktop = weston_desktop_create(compositor, &shell_desktop_api, shell); ++ if (!shell->desktop) ++ goto err_text_backend; ++ + if (wl_global_create(compositor->wl_display, + &ivi_application_interface, 1, + shell, bind_ivi_application) == NULL) +- goto err_text_backend; ++ goto err_desktop; + + ivi_layout_init_with_compositor(compositor); + /* TODO ivi_layout_destroy should be implemented, since multiple lists +@@ -676,6 +680,9 @@ wet_shell_init(struct weston_compositor *compositor, + + return IVI_SUCCEEDED; + ++err_desktop: ++ weston_desktop_destroy(shell->desktop); ++ + err_text_backend: + text_backend_destroy(shell->text_backend); + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch new file mode 100644 index 00000000..447cff4f --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0012-hmi-controller-register-for-desktop_surface_configured.patch @@ -0,0 +1,133 @@ +diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c +index a0e49ba0..340d1915 100644 +--- a/ivi-shell/hmi-controller.c ++++ b/ivi-shell/hmi-controller.c +@@ -129,9 +129,9 @@ struct hmi_controller { + struct weston_compositor *compositor; + struct wl_listener destroy_listener; + +- struct wl_listener surface_created; + struct wl_listener surface_removed; + struct wl_listener surface_configured; ++ struct wl_listener desktop_surface_configured; + + struct wl_client *user_interface; + struct ui_setting ui_setting; +@@ -576,28 +576,6 @@ create_layer(struct weston_output *output, + /** + * Internal set notification + */ +-static void +-set_notification_create_surface(struct wl_listener *listener, void *data) +-{ +- struct hmi_controller *hmi_ctrl = +- wl_container_of(listener, hmi_ctrl, +- surface_created); +- struct ivi_layout_surface *ivisurf = data; +- struct hmi_controller_layer *layer_link = +- wl_container_of(hmi_ctrl->application_layer_list.prev, +- layer_link, +- link); +- struct ivi_layout_layer *application_layer = layer_link->ivilayer; +- int32_t ret = 0; +- +- /* skip ui widgets */ +- if (is_surf_in_ui_widget(hmi_ctrl, ivisurf)) +- return; +- +- ret = hmi_ctrl->interface->layer_add_surface(application_layer, ivisurf); +- assert(!ret); +-} +- + static void + set_notification_remove_surface(struct wl_listener *listener, void *data) + { +@@ -665,6 +643,42 @@ set_notification_configure_surface(struct wl_listener *listener, void *data) + switch_mode(hmi_ctrl, hmi_ctrl->layout_mode); + } + ++static void ++set_notification_configure_desktop_surface(struct wl_listener *listener, void *data) ++{ ++ struct hmi_controller *hmi_ctrl = ++ wl_container_of(listener, hmi_ctrl, ++ desktop_surface_configured); ++ struct ivi_layout_surface *ivisurf = data; ++ struct hmi_controller_layer *layer_link = ++ wl_container_of(hmi_ctrl->application_layer_list.prev, ++ layer_link, ++ link); ++ struct ivi_layout_layer *application_layer = layer_link->ivilayer; ++ struct weston_surface *surface; ++ int32_t ret = 0; ++ ++ /* skip ui widgets */ ++ if (is_surf_in_ui_widget(hmi_ctrl, ivisurf)) ++ return; ++ ++ ret = hmi_ctrl->interface->layer_add_surface(application_layer, ivisurf); ++ assert(!ret); ++ ++ /* ++ * if application changes size of wl_buffer. The source rectangle shall be ++ * fit to the size. ++ */ ++ surface = hmi_ctrl->interface->surface_get_weston_surface(ivisurf); ++ if (surface) { ++ hmi_ctrl->interface->surface_set_source_rectangle(ivisurf, 0, ++ 0, surface->width, surface->height); ++ } ++ ++ hmi_ctrl->interface->commit_changes(); ++ switch_mode(hmi_ctrl, hmi_ctrl->layout_mode); ++} ++ + /** + * A hmi_controller used 4 ivi_layers to manage ivi_surfaces. The IDs of + * corresponding ivi_layer are defined in weston.ini. Default scene graph +@@ -868,6 +882,9 @@ hmi_controller_create(struct weston_compositor *ec) + hmi_ctrl->surface_configured.notify = set_notification_configure_surface; + hmi_ctrl->interface->add_listener_configure_surface(&hmi_ctrl->surface_configured); + ++ hmi_ctrl->desktop_surface_configured.notify = set_notification_configure_desktop_surface; ++ hmi_ctrl->interface->add_listener_configure_desktop_surface(&hmi_ctrl->desktop_surface_configured); ++ + hmi_ctrl->destroy_listener.notify = hmi_controller_destroy; + wl_signal_add(&hmi_ctrl->compositor->destroy_signal, + &hmi_ctrl->destroy_listener); +@@ -1289,12 +1306,6 @@ ivi_hmi_controller_UI_ready(struct wl_client *client, + + ivi_hmi_controller_add_launchers(hmi_ctrl, 256); + +- /* Add surface_created listener after the initialization of launchers. +- * Otherwise, surfaces of the launchers will be added to application +- * layer too.*/ +- hmi_ctrl->surface_created.notify = set_notification_create_surface; +- hmi_ctrl->interface->add_listener_create_surface(&hmi_ctrl->surface_created); +- + hmi_ctrl->is_initialized = 1; + } + +diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c +index b06bf309..ef354d49 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -715,9 +715,15 @@ commit_surface_list(struct ivi_layout *layout) + ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; + + if (configured && !is_surface_transition(ivisurf)) { +- shell_surface_send_configure(ivisurf->surface, +- ivisurf->prop.dest_width, +- ivisurf->prop.dest_height); ++ if (ivisurf->weston_desktop_surface) { ++ weston_desktop_surface_set_size(ivisurf->weston_desktop_surface, ++ ivisurf->prop.dest_width, ++ ivisurf->prop.dest_height); ++ } else { ++ shell_surface_send_configure(ivisurf->surface, ++ ivisurf->prop.dest_width, ++ ivisurf->prop.dest_height); ++ } + } + } else { + configured = 0; diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch new file mode 100644 index 00000000..036b14cb --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0013-simple-egl-remove-ivi-application-support.patch @@ -0,0 +1,165 @@ +diff --git a/Makefile.am b/Makefile.am +index 17c053e6..e0d3cb78 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -609,9 +609,7 @@ demo_clients += weston-simple-egl + weston_simple_egl_SOURCES = clients/simple-egl.c + nodist_weston_simple_egl_SOURCES = \ + protocol/xdg-shell-unstable-v6-protocol.c \ +- protocol/xdg-shell-unstable-v6-client-protocol.h \ +- protocol/ivi-application-protocol.c \ +- protocol/ivi-application-client-protocol.h ++ protocol/xdg-shell-unstable-v6-client-protocol.h + weston_simple_egl_CFLAGS = $(AM_CFLAGS) $(SIMPLE_EGL_CLIENT_CFLAGS) + weston_simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm + endif +diff --git a/clients/simple-egl.c b/clients/simple-egl.c +index a1e57aef..936e015e 100644 +--- a/clients/simple-egl.c ++++ b/clients/simple-egl.c +@@ -45,8 +45,6 @@ + #include "xdg-shell-unstable-v6-client-protocol.h" + #include + #include +-#include "ivi-application-client-protocol.h" +-#define IVI_SURFACE_ID 9000 + + #include "shared/helpers.h" + #include "shared/platform.h" +@@ -74,7 +72,6 @@ struct display { + EGLConfig conf; + } egl; + struct window *window; +- struct ivi_application *ivi_application; + + PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC swap_buffers_with_damage; + }; +@@ -97,7 +94,6 @@ struct window { + struct wl_surface *surface; + struct zxdg_surface_v6 *xdg_surface; + struct zxdg_toplevel_v6 *xdg_toplevel; +- struct ivi_surface *ivi_surface; + EGLSurface egl_surface; + struct wl_callback *callback; + int fullscreen, maximized, opaque, buffer_size, frame_sync, delay; +@@ -359,27 +355,22 @@ static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = { + }; + + static void +-handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface, +- int32_t width, int32_t height) ++create_surface(struct window *window) + { +- struct window *window = data; +- +- wl_egl_window_resize(window->native, width, height, 0, 0); +- +- window->geometry.width = width; +- window->geometry.height = height; ++ struct display *display = window->display; ++ EGLBoolean ret; + +- if (!window->fullscreen) +- window->window_size = window->geometry; +-} ++ window->surface = wl_compositor_create_surface(display->compositor); + +-static const struct ivi_surface_listener ivi_surface_listener = { +- handle_ivi_surface_configure, +-}; ++ window->native = ++ wl_egl_window_create(window->surface, ++ window->geometry.width, ++ window->geometry.height); ++ window->egl_surface = ++ weston_platform_create_egl_surface(display->egl.dpy, ++ display->egl.conf, ++ window->native, NULL); + +-static void +-create_xdg_surface(struct window *window, struct display *display) +-{ + window->xdg_surface = zxdg_shell_v6_get_xdg_surface(display->shell, + window->surface); + zxdg_surface_v6_add_listener(window->xdg_surface, +@@ -394,50 +385,6 @@ create_xdg_surface(struct window *window, struct display *display) + + window->wait_for_configure = true; + wl_surface_commit(window->surface); +-} +- +-static void +-create_ivi_surface(struct window *window, struct display *display) +-{ +- uint32_t id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid(); +- window->ivi_surface = +- ivi_application_surface_create(display->ivi_application, +- id_ivisurf, window->surface); +- +- if (window->ivi_surface == NULL) { +- fprintf(stderr, "Failed to create ivi_client_surface\n"); +- abort(); +- } +- +- ivi_surface_add_listener(window->ivi_surface, +- &ivi_surface_listener, window); +-} +- +-static void +-create_surface(struct window *window) +-{ +- struct display *display = window->display; +- EGLBoolean ret; +- +- window->surface = wl_compositor_create_surface(display->compositor); +- +- window->native = +- wl_egl_window_create(window->surface, +- window->geometry.width, +- window->geometry.height); +- window->egl_surface = +- weston_platform_create_egl_surface(display->egl.dpy, +- display->egl.conf, +- window->native, NULL); +- +- +- if (display->shell) { +- create_xdg_surface(window, display); +- } else if (display->ivi_application ) { +- create_ivi_surface(window, display); +- } else { +- assert(0); +- } + + ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface, + window->egl_surface, window->display->egl.ctx); +@@ -469,8 +416,6 @@ destroy_surface(struct window *window) + zxdg_toplevel_v6_destroy(window->xdg_toplevel); + if (window->xdg_surface) + zxdg_surface_v6_destroy(window->xdg_surface); +- if (window->display->ivi_application) +- ivi_surface_destroy(window->ivi_surface); + wl_surface_destroy(window->surface); + + if (window->callback) +@@ -825,10 +770,6 @@ registry_handle_global(void *data, struct wl_registry *registry, + fprintf(stderr, "unable to load default left pointer\n"); + // TODO: abort ? + } +- } else if (strcmp(interface, "ivi_application") == 0) { +- d->ivi_application = +- wl_registry_bind(registry, name, +- &ivi_application_interface, 1); + } + } + +@@ -943,9 +884,6 @@ main(int argc, char **argv) + if (display.shell) + zxdg_shell_v6_destroy(display.shell); + +- if (display.ivi_application) +- ivi_application_destroy(display.ivi_application); +- + if (display.compositor) + wl_compositor_destroy(display.compositor); + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0014-simple-shm-remove-ivi-application-support.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0014-simple-shm-remove-ivi-application-support.patch new file mode 100644 index 00000000..495e50ca --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0014-simple-shm-remove-ivi-application-support.patch @@ -0,0 +1,107 @@ +index f9c8010b..c37cd00b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -574,9 +574,7 @@ nodist_weston_simple_shm_SOURCES = \ + protocol/xdg-shell-unstable-v6-protocol.c \ + protocol/xdg-shell-unstable-v6-client-protocol.h \ + protocol/fullscreen-shell-unstable-v1-protocol.c \ +- protocol/fullscreen-shell-unstable-v1-client-protocol.h \ +- protocol/ivi-application-protocol.c \ +- protocol/ivi-application-client-protocol.h ++ protocol/fullscreen-shell-unstable-v1-client-protocol.h + weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS) + weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la + +diff --git a/clients/simple-shm.c b/clients/simple-shm.c +index 9fa2e214..fc2ef001 100644 +--- a/clients/simple-shm.c ++++ b/clients/simple-shm.c +@@ -40,10 +40,6 @@ + #include "xdg-shell-unstable-v6-client-protocol.h" + #include "fullscreen-shell-unstable-v1-client-protocol.h" + +-#include +-#include "ivi-application-client-protocol.h" +-#define IVI_SURFACE_ID 9000 +- + struct display { + struct wl_display *display; + struct wl_registry *registry; +@@ -52,7 +48,6 @@ struct display { + struct zwp_fullscreen_shell_v1 *fshell; + struct wl_shm *shm; + bool has_xrgb; +- struct ivi_application *ivi_application; + }; + + struct buffer { +@@ -67,7 +62,6 @@ struct window { + struct wl_surface *surface; + struct zxdg_surface_v6 *xdg_surface; + struct zxdg_toplevel_v6 *xdg_toplevel; +- struct ivi_surface *ivi_surface; + struct buffer buffers[2]; + struct buffer *prev_buffer; + struct wl_callback *callback; +@@ -165,17 +159,6 @@ static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = { + handle_xdg_toplevel_close, + }; + +-static void +-handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface, +- int32_t width, int32_t height) +-{ +- /* Simple-shm is resizable */ +-} +- +-static const struct ivi_surface_listener ivi_surface_listener = { +- handle_ivi_surface_configure, +-}; +- + static struct window * + create_window(struct display *display, int width, int height) + { +@@ -213,19 +196,6 @@ create_window(struct display *display, int width, int height) + window->surface, + ZWP_FULLSCREEN_SHELL_V1_PRESENT_METHOD_DEFAULT, + NULL); +- } else if (display->ivi_application ) { +- uint32_t id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid(); +- window->ivi_surface = +- ivi_application_surface_create(display->ivi_application, +- id_ivisurf, window->surface); +- if (window->ivi_surface == NULL) { +- fprintf(stderr, "Failed to create ivi_client_surface\n"); +- abort(); +- } +- +- ivi_surface_add_listener(window->ivi_surface, +- &ivi_surface_listener, window); +- + } else { + assert(0); + } +@@ -407,11 +377,6 @@ registry_handle_global(void *data, struct wl_registry *registry, + id, &wl_shm_interface, 1); + wl_shm_add_listener(d->shm, &shm_listener, d); + } +- else if (strcmp(interface, "ivi_application") == 0) { +- d->ivi_application = +- wl_registry_bind(registry, id, +- &ivi_application_interface, 1); +- } + } + + static void +@@ -555,11 +520,6 @@ main(int argc, char **argv) + + fprintf(stderr, "simple-shm exiting\n"); + +- if (window->display->ivi_application) { +- ivi_surface_destroy(window->ivi_surface); +- ivi_application_destroy(window->display->ivi_application); +- } +- + destroy_window(window); + destroy_display(display); + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0015-window-client-remove-ivi-application-support.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0015-window-client-remove-ivi-application-support.patch new file mode 100644 index 00000000..f3d2fe47 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0015-window-client-remove-ivi-application-support.patch @@ -0,0 +1,130 @@ +index c37cd00b..f30ddbe9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -665,8 +665,6 @@ nodist_libtoytoolkit_la_SOURCES = \ + protocol/viewporter-client-protocol.h \ + protocol/xdg-shell-unstable-v6-protocol.c \ + protocol/xdg-shell-unstable-v6-client-protocol.h \ +- protocol/ivi-application-protocol.c \ +- protocol/ivi-application-client-protocol.h \ + protocol/pointer-constraints-unstable-v1-protocol.c \ + protocol/pointer-constraints-unstable-v1-client-protocol.h \ + protocol/relative-pointer-unstable-v1-protocol.c \ +diff --git a/clients/window.c b/clients/window.c +index 95796d46..aac43abd 100644 +--- a/clients/window.c ++++ b/clients/window.c +@@ -82,10 +82,6 @@ typedef void *EGLContext; + + #include "window.h" + +-#include +-#include "ivi-application-client-protocol.h" +-#define IVI_SURFACE_ID 9000 +- + #define ZWP_RELATIVE_POINTER_MANAGER_V1_VERSION 1 + #define ZWP_POINTER_CONSTRAINTS_V1_VERSION 1 + +@@ -107,7 +103,6 @@ struct display { + struct wl_data_device_manager *data_device_manager; + struct text_cursor_position *text_cursor_position; + struct zxdg_shell_v6 *xdg_shell; +- struct ivi_application *ivi_application; /* ivi style shell */ + struct zwp_relative_pointer_manager_v1 *relative_pointer_manager; + struct zwp_pointer_constraints_v1 *pointer_constraints; + EGLDisplay dpy; +@@ -269,8 +264,6 @@ struct window { + struct window *parent; + struct window *last_parent; + +- struct ivi_surface *ivi_surface; +- + struct window_frame *frame; + + /* struct surface::link, contains also main_surface */ +@@ -1441,19 +1434,6 @@ window_get_display(struct window *window) + return window->display; + } + +-static void +-handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface, +- int32_t width, int32_t height) +-{ +- struct window *window = data; +- +- window_schedule_resize(window, width, height); +-} +- +-static const struct ivi_surface_listener ivi_surface_listener = { +- handle_ivi_surface_configure, +-}; +- + static void + surface_create_surface(struct surface *surface, uint32_t flags) + { +@@ -1604,9 +1584,6 @@ window_destroy(struct window *window) + if (window->xdg_surface) + zxdg_surface_v6_destroy(window->xdg_surface); + +- if (window->ivi_surface) +- ivi_surface_destroy(window->ivi_surface); +- + surface_destroy(window->main_surface); + + wl_list_remove(&window->link); +@@ -5200,7 +5177,7 @@ window_create_internal(struct display *display, int custom) + surface = surface_create(window); + window->main_surface = surface; + +- assert(custom || display->xdg_shell || display->ivi_application); ++ assert(custom || display->xdg_shell); + + window->custom = custom; + window->preferred_format = WINDOW_PREFERRED_FORMAT_NONE; +@@ -5220,7 +5197,6 @@ struct window * + window_create(struct display *display) + { + struct window *window; +- uint32_t id_ivisurf; + + window = window_create_internal(display, 0); + +@@ -5243,16 +5219,6 @@ window_create(struct display *display) + window_inhibit_redraw(window); + + wl_surface_commit(window->main_surface->surface); +- } else if (display->ivi_application) { +- /* auto generation of ivi_id based on process id + basement of id */ +- id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid(); +- window->ivi_surface = +- ivi_application_surface_create(display->ivi_application, +- id_ivisurf, window->main_surface->surface); +- fail_on_null(window->ivi_surface, 0, __FILE__, __LINE__); +- +- ivi_surface_add_listener(window->ivi_surface, +- &ivi_surface_listener, window); + } + + return window; +@@ -6013,11 +5979,6 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t id, + wl_registry_bind(registry, id, + &wl_subcompositor_interface, 1); + } +- else if (strcmp(interface, "ivi_application") == 0) { +- d->ivi_application = +- wl_registry_bind(registry, id, +- &ivi_application_interface, 1); +- } + + if (d->global_handler) + d->global_handler(d, id, interface, version, d->user_data); +@@ -6316,9 +6277,6 @@ display_destroy(struct display *display) + if (display->xdg_shell) + zxdg_shell_v6_destroy(display->xdg_shell); + +- if (display->ivi_application) +- ivi_application_destroy(display->ivi_application); +- + if (display->shm) + wl_shm_destroy(display->shm); + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-compositor-add-output-type-to-weston_output.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-compositor-add-output-type-to-weston_output.patch new file mode 100644 index 00000000..6b93b06e --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0016-compositor-add-output-type-to-weston_output.patch @@ -0,0 +1,254 @@ +From 8ea60075d5310101bebedf09c94902e9d41432ac Mon Sep 17 00:00:00 2001 +From: Veeresh Kadasani +Date: Mon, 29 Jul 2019 17:04:12 +0900 +Subject: [PATCH 1/3] compositor: add output type to weston_output + +This enables weston to use multiple types of backend +Each backends have own output structure for each functions +To avoid invalid member access, type identifier is needed + +Signed-off-by: Veeresh Kadasani +--- + libweston/compositor-drm.c | 78 +++++++++++++++++++++++------------------ + libweston/compositor-fbdev.c | 2 +- + libweston/compositor-headless.c | 2 +- + libweston/compositor-rdp.c | 2 +- + libweston/compositor-wayland.c | 2 +- + libweston/compositor-x11.c | 2 +- + libweston/compositor.h | 12 ++++++- + 7 files changed, 60 insertions(+), 40 deletions(-) + +diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c +index 3891176..26a480c 100644 +--- a/libweston/compositor-drm.c ++++ b/libweston/compositor-drm.c +@@ -843,8 +843,9 @@ drm_output_find_by_crtc(struct drm_backend *b, uint32_t crtc_id) + struct drm_output *output; + + wl_list_for_each(output, &b->compositor->output_list, base.link) { +- if (output->crtc_id == crtc_id) +- return output; ++ if(output->base.output_type == OUTPUT_DRM) ++ if (output->crtc_id == crtc_id) ++ return output; + } + + return NULL; +@@ -859,7 +860,8 @@ drm_head_find_by_connector(struct drm_backend *backend, uint32_t connector_id) + wl_list_for_each(base, + &backend->compositor->head_list, compositor_link) { + head = to_drm_head(base); +- if (head->connector_id == connector_id) ++ if(base->output->output_type == OUTPUT_DRM) ++ if (head->connector_id == connector_id) + return head; + } + +@@ -5728,6 +5730,7 @@ drm_output_enable(struct weston_output *base) + drmModeRes *resources; + int ret; + ++ output->base.output_type = OUTPUT_DRM; + resources = drmModeGetResources(b->drm.fd); + if (!resources) { + weston_log("drmModeGetResources failed\n"); +@@ -6188,23 +6191,25 @@ drm_backend_update_heads(struct drm_backend *b, struct udev_device *drm_device) + /* Remove connectors that have disappeared. */ + wl_list_for_each_safe(base, next, + &b->compositor->head_list, compositor_link) { +- bool removed = true; ++ if (base->output->output_type == OUTPUT_DRM) { ++ bool removed = true; + +- head = to_drm_head(base); ++ head = to_drm_head(base); + +- for (i = 0; i < resources->count_connectors; i++) { +- if (resources->connectors[i] == head->connector_id) { +- removed = false; +- break; +- } +- } ++ for (i = 0; i < resources->count_connectors; i++) { ++ if (resources->connectors[i] == head->connector_id) { ++ removed = false; ++ break; ++ } ++ } + +- if (!removed) +- continue; ++ if (!removed) ++ continue; + +- weston_log("DRM: head '%s' (connector %d) disappeared.\n", +- head->base.name, head->connector_id); +- drm_head_destroy(head); ++ weston_log("DRM: head '%s' (connector %d) disappeared.\n", ++ head->base.name, head->connector_id); ++ drm_head_destroy(head); ++ } + } + + drm_backend_update_unused_outputs(b, resources); +@@ -6309,23 +6314,26 @@ session_notify(struct wl_listener *listener, void *data) + * pending frame callbacks. */ + + wl_list_for_each(output, &compositor->output_list, base.link) { +- output->base.repaint_needed = false; +- if (output->cursor_plane) +- drmModeSetCursor(b->drm.fd, output->crtc_id, +- 0, 0, 0); ++ if(output->base.output_type == OUTPUT_DRM) { ++ output->base.repaint_needed = false; ++ if (output->cursor_plane) ++ drmModeSetCursor(b->drm.fd, output->crtc_id, ++ 0, 0, 0); ++ } + } +- +- output = container_of(compositor->output_list.next, +- struct drm_output, base.link); +- +- wl_list_for_each(plane, &b->plane_list, link) { +- if (plane->type != WDRM_PLANE_TYPE_OVERLAY) +- continue; +- +- drmModeSetPlane(b->drm.fd, +- plane->plane_id, +- output->crtc_id, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0); ++ if(output->base.output_type == OUTPUT_DRM) { ++ output = container_of(compositor->output_list.next, ++ struct drm_output, base.link); ++ ++ wl_list_for_each(plane, &b->plane_list, link) { ++ if (plane->type != WDRM_PLANE_TYPE_OVERLAY) ++ continue; ++ ++ drmModeSetPlane(b->drm.fd, ++ plane->plane_id, ++ output->crtc_id, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0); ++ } + } + } + } +@@ -6649,7 +6657,8 @@ switch_to_gl_renderer(struct drm_backend *b) + } + + wl_list_for_each(output, &b->compositor->output_list, base.link) +- pixman_renderer_output_destroy(&output->base); ++ if(output->base.output_type == OUTPUT_DRM) ++ pixman_renderer_output_destroy(&output->base); + + b->compositor->renderer->destroy(b->compositor); + +@@ -6661,7 +6670,8 @@ switch_to_gl_renderer(struct drm_backend *b) + } + + wl_list_for_each(output, &b->compositor->output_list, base.link) +- drm_output_init_egl(output, b); ++ if(output->base.output_type == OUTPUT_DRM) ++ drm_output_init_egl(output, b); + + b->use_pixman = 0; + +diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c +index a71b7bd..8edb50b 100644 +--- a/libweston/compositor-fbdev.c ++++ b/libweston/compositor-fbdev.c +@@ -501,7 +501,7 @@ fbdev_output_enable(struct weston_output *base) + struct fbdev_head *head; + int fb_fd; + struct wl_event_loop *loop; +- ++ output->base.output_type = OUTPUT_FBDEV; + head = fbdev_output_get_head(output); + + /* Create the frame buffer. */ +diff --git a/libweston/compositor-headless.c b/libweston/compositor-headless.c +index 61a5bd9..f633cd7 100644 +--- a/libweston/compositor-headless.c ++++ b/libweston/compositor-headless.c +@@ -159,7 +159,7 @@ headless_output_enable(struct weston_output *base) + loop = wl_display_get_event_loop(b->compositor->wl_display); + output->finish_frame_timer = + wl_event_loop_add_timer(loop, finish_frame_handler, output); +- ++ output->base.output_type = OUTPUT_HEADLESS; + if (b->use_pixman) { + output->image_buf = malloc(output->base.current_mode->width * + output->base.current_mode->height * 4); +diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c +index 134e729..429370c 100644 +--- a/libweston/compositor-rdp.c ++++ b/libweston/compositor-rdp.c +@@ -554,7 +554,7 @@ rdp_output_enable(struct weston_output *base) + struct rdp_output *output = to_rdp_output(base); + struct rdp_backend *b = to_rdp_backend(base->compositor); + struct wl_event_loop *loop; +- ++ output->base.output_type = OUTPUT_RDP; + output->shadow_surface = pixman_image_create_bits(PIXMAN_x8r8g8b8, + output->base.current_mode->width, + output->base.current_mode->height, +diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c +index e80ecc1..808fc8f 100644 +--- a/libweston/compositor-wayland.c ++++ b/libweston/compositor-wayland.c +@@ -1221,7 +1221,7 @@ wayland_output_enable(struct weston_output *base) + struct wayland_backend *b = to_wayland_backend(base->compositor); + enum mode_status mode_status; + int ret = 0; +- ++ output->base.output_type = OUTPUT_WAYLAND; + weston_log("Creating %dx%d wayland output at (%d, %d)\n", + output->base.current_mode->width, + output->base.current_mode->height, +diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c +index 4a9d068..afbaa73 100644 +--- a/libweston/compositor-x11.c ++++ b/libweston/compositor-x11.c +@@ -933,7 +933,7 @@ x11_output_enable(struct weston_output *base) + XCB_EVENT_MASK_STRUCTURE_NOTIFY, + 0 + }; +- ++ output->base.output_type = OUTPUT_X11; + if (!b->no_input) + values[0] |= + XCB_EVENT_MASK_KEY_PRESS | +diff --git a/libweston/compositor.h b/libweston/compositor.h +index 8b7a102..60feda3 100644 +--- a/libweston/compositor.h ++++ b/libweston/compositor.h +@@ -169,6 +169,16 @@ enum dpms_enum { + WESTON_DPMS_OFF + }; + ++/* bit compatible with drm definitions. */ ++enum output_type { ++ OUTPUT_DRM, ++ OUTPUT_FBDEV, ++ OUTPUT_HEADLESS, ++ OUTPUT_RDP, ++ OUTPUT_WAYLAND, ++ OUTPUT_X11, ++ OUTPUT_WALTHAM ++}; + /** Represents a monitor + * + * This object represents a monitor (hardware backends like DRM) or a window +@@ -201,7 +211,7 @@ struct weston_head { + struct weston_output { + uint32_t id; + char *name; +- ++ enum output_type output_type; + /** Matches the lifetime from the user perspective */ + struct wl_signal user_destroy_signal; + +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-compositor-drm-introduce-drm_get_dmafd_from_view.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-compositor-drm-introduce-drm_get_dmafd_from_view.patch new file mode 100644 index 00000000..6fb963fb --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-compositor-drm-introduce-drm_get_dmafd_from_view.patch @@ -0,0 +1,109 @@ +From 020508b35b2bf6c89d62961eb95e2f81d6381ab5 Mon Sep 17 00:00:00 2001 +From: Veeresh Kadasani +Date: Mon, 29 Jul 2019 17:07:00 +0900 +Subject: [PATCH 2/3] compositor-drm: introduce drm_get_dmafd_from_view + +This API enables to get dmafd from weston_view + +Signed-off-by: Veeresh Kadasani +--- + libweston/compositor-drm.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++ + libweston/compositor-drm.h | 7 ++++++ + 2 files changed, 64 insertions(+) + +diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c +index 26a480c..2b99db5 100644 +--- a/libweston/compositor-drm.c ++++ b/libweston/compositor-drm.c +@@ -5420,6 +5420,62 @@ drm_output_set_seat(struct weston_output *base, + } + + static int ++drm_get_dma_fd_from_view(struct weston_output *base, ++ struct weston_view *ev) ++{ ++ struct drm_backend *b = to_drm_backend(base->compositor); ++ struct weston_buffer *buffer = ev->surface->buffer_ref.buffer; ++ struct gbm_bo *bo; ++ struct drm_fb *current; ++ struct linux_dmabuf_buffer *dmabuf; ++ bool is_opaque = drm_view_is_opaque(ev); ++ uint32_t format; ++ int fd, ret; ++ ++ if(!buffer) { ++ weston_log("buffer is NULL\n"); ++ return -1; ++ } ++ ++ if(dmabuf = linux_dmabuf_buffer_get(buffer->resource)) { ++ current = drm_fb_get_from_dmabuf(dmabuf, b, is_opaque); ++ if (!current) ++ { ++ fprintf(stderr, "failed to get drm_fb from dmabuf\n"); ++ return -1; ++ } ++ } ++ else if(ev->surface->buffer_ref.buffer->legacy_buffer) { ++ bo = gbm_bo_import(b->gbm, GBM_BO_IMPORT_WL_BUFFER, ++ buffer->resource, GBM_BO_USE_SCANOUT); ++ if (!bo) { ++ weston_log("failed to get gbm_bo\n"); ++ return -1; ++ } ++ current = drm_fb_get_from_bo(bo, b, is_opaque, BUFFER_CLIENT); ++ ++ if (!current) { ++ weston_log("failed to get drm_fb from bo\n"); ++ return -1; ++ } ++ ++ } ++ else { ++ weston_log("Buffer is not supported\n"); ++ return -1; ++ } ++ ++ ret = drmPrimeHandleToFD(b->drm.fd, current->handles[0], ++ DRM_CLOEXEC, &fd); ++ free(current); ++ if (ret) { ++ weston_log("failed to create prime fd for front buffer\n"); ++ return -1; ++ } ++ ++ return fd; ++} ++static int + drm_output_init_gamma_size(struct drm_output *output) + { + struct drm_backend *backend = to_drm_backend(output->base.compositor); +@@ -6696,6 +6752,7 @@ static const struct weston_drm_output_api api = { + drm_output_set_mode, + drm_output_set_gbm_format, + drm_output_set_seat, ++ drm_get_dma_fd_from_view, + }; + + static struct drm_backend * +diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h +index 9c37c15..a82a2a9 100644 +--- a/libweston/compositor-drm.h ++++ b/libweston/compositor-drm.h +@@ -78,6 +78,13 @@ struct weston_drm_output_api { + */ + void (*set_seat)(struct weston_output *output, + const char *seat); ++ ++ /** Get the dma fd from drm view. ++ * ++ * The dma fd is got from weston_view. ++ * Returns fd on success, -1 on failure. ++ */ ++ int (*get_dma_fd_from_view)(struct weston_output *output, struct weston_view *view); + }; + + static inline const struct weston_drm_output_api * +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0018-compositor-drm-get-stride-from-drm_get_dma_fd_from_view.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0018-compositor-drm-get-stride-from-drm_get_dma_fd_from_view.patch new file mode 100644 index 00000000..e2655d12 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0018-compositor-drm-get-stride-from-drm_get_dma_fd_from_view.patch @@ -0,0 +1,59 @@ +From 0dac780379228396a19048544b9e53d5aa407583 Mon Sep 17 00:00:00 2001 +From: Veeresh Kadasani +Date: Mon, 29 Jul 2019 17:08:31 +0900 +Subject: [PATCH 3/3] compositor-drm: get stride from drm_get_dma_fd_from_view + +Modify drm_get_dma_fd_from_view to get buffer stride. + +Signed-off-by: Veeresh Kadasani +--- + libweston/compositor-drm.c | 5 +++-- + libweston/compositor-drm.h | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c +index 2b99db5..ec2765f 100644 +--- a/libweston/compositor-drm.c ++++ b/libweston/compositor-drm.c +@@ -5421,7 +5421,7 @@ drm_output_set_seat(struct weston_output *base, + + static int + drm_get_dma_fd_from_view(struct weston_output *base, +- struct weston_view *ev) ++ struct weston_view *ev, int *buf_stride) + { + struct drm_backend *b = to_drm_backend(base->compositor); + struct weston_buffer *buffer = ev->surface->buffer_ref.buffer; +@@ -5444,6 +5444,7 @@ drm_get_dma_fd_from_view(struct weston_output *base, + fprintf(stderr, "failed to get drm_fb from dmabuf\n"); + return -1; + } ++ *buf_stride=current->strides[0]; + } + else if(ev->surface->buffer_ref.buffer->legacy_buffer) { + bo = gbm_bo_import(b->gbm, GBM_BO_IMPORT_WL_BUFFER, +@@ -5458,7 +5459,7 @@ drm_get_dma_fd_from_view(struct weston_output *base, + weston_log("failed to get drm_fb from bo\n"); + return -1; + } +- ++ *buf_stride=current->strides[0]; + } + else { + weston_log("Buffer is not supported\n"); +diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h +index a82a2a9..c2461b3 100644 +--- a/libweston/compositor-drm.h ++++ b/libweston/compositor-drm.h +@@ -84,7 +84,7 @@ struct weston_drm_output_api { + * The dma fd is got from weston_view. + * Returns fd on success, -1 on failure. + */ +- int (*get_dma_fd_from_view)(struct weston_output *output, struct weston_view *view); ++ int (*get_dma_fd_from_view)(struct weston_output *output, struct weston_view *view, int *buf_stride); + }; + + static inline const struct weston_drm_output_api * +-- +2.7.4 + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch new file mode 100644 index 00000000..2f3b0108 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston/use-XDG_RUNTIMESHARE_DIR.patch @@ -0,0 +1,47 @@ +From 0ed62e1a0beb47e033f7632dbf6d2087366b7830 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Fri, 13 Oct 2017 14:05:56 +0200 +Subject: [PATCH] use XDG_RUNTIMESHARE_DIR + +When running with LSM Smack, the file returned by the +function 'os_create_anonymous_file' is tagged with the +security label of weston. That security label genrally doesn't +allow sharing of files? Then passing the vreated file descriptor +to the client application fails with EPERM. + +To allow file descriptors to be tagged with a security +label that allows clients to receive and use it, that +patch introduce the use of the environment variable +XDG_RUNTIMESHARE_DIR that takes precedence over +XDG_RUNTIME_DIR whe, creating anonymous file is needed. + +A correct setting of the shared directory using Smack's +transmute mechanism allows set up file tag for sharing. + +This patch was submitted upstream for discussion but +was rejected with the following reason (IIRC): "the +function 'os_create_anonymous_file' and the sharing +are obsolete and should not be used anymore. IVI was +requiring it but newer version don't use it". Halas, +even aligned with latest versions of IVI-shell and weston, +the patch is needed. Because of its simplicity, it can +remain maintained locally out of mainstream in the wait +of further investigations. + +Signed-off-by: José Bollo + +diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c +index e19fb61b..826e48b8 100644 +--- a/shared/os-compatibility.c ++++ b/shared/os-compatibility.c +@@ -157,7 +157,9 @@ os_create_anonymous_file(off_t size) + int fd; + int ret; + +- path = getenv("XDG_RUNTIME_DIR"); ++ path = getenv("XDG_RUNTIMESHARE_DIR"); ++ if (!path) ++ path = getenv("XDG_RUNTIME_DIR"); + if (!path) { + errno = ENOENT; + return -1; diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 00000000..bcfe11b1 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,4 @@ +PACKAGECONFIG[notify] = "--enable-systemd-notify,--disable-systemd-notify,systemd" +PACKAGECONFIG_append = " notify" + +RRECOMMENDS_${PN}_remove = "weston-conf" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_5.0.0.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_5.0.0.bbappend new file mode 100644 index 00000000..108cca83 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_5.0.0.bbappend @@ -0,0 +1,27 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +SRC_URI_append = "\ + file://0001-Allow-regular-users-to-launch-Weston_2.0.0.patch \ + file://0001-ivi-shell-rework-goto-labels-to-avoid-memory-leaks.patch \ + file://0002-ivi-shell-removed-assert.patch \ + file://0003-ivi-shell-introduction-of-IVI_INVALID_ID.patch \ + file://0004-layout-interface-added-interface-to-change-surface-id.patch \ + file://0005-ivi-layout-introcuded-configure_desktop_changed.patch \ + file://0006-ivi-layout-introcuded-surface_create_and_configure.patch \ + file://0007-ivi-shell-linked-libweston-desktop-and-added-structs.patch \ + file://0008-ivi-layout-use-libweston-desktop-api-for-views.patch \ + file://0009-ivi-shell-added-libweston-desktop-api_implementation.patch \ + file://0010-ivi-shell-remove-surface_destroy_listener.patch \ + file://0011-ivi-shell-create-weston-desktop-in_wet_shell_init.patch \ + file://0012-hmi-controller-register-for-desktop_surface_configured.patch \ + file://0013-simple-egl-remove-ivi-application-support.patch \ + file://0014-simple-shm-remove-ivi-application-support.patch \ + file://0015-window-client-remove-ivi-application-support.patch \ + file://use-XDG_RUNTIMESHARE_DIR.patch \ + file://0016-compositor-add-output-type-to-weston_output.patch \ + file://0017-compositor-drm-introduce-drm_get_dmafd_from_view.patch \ + file://0018-compositor-drm-get-stride-from-drm_get_dma_fd_from_view.patch \ + " + + +EXTRA_OECONF_append = " --enable-sys-uid" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend new file mode 100644 index 00000000..44fcdcb0 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-graphics/wayland/weston_6.0.0.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +SRC_URI_append = "\ + file://0001-Allow-regular-users-to-launch-Weston_2.0.0.patch \ + file://use-XDG_RUNTIMESHARE_DIR.patch \ + file://0002-compositor-add-output-type-to-weston_output.patch \ + file://0003-compositor-drm-introduce-drm_get_dmafd_from_view.patch \ + " + +EXTRA_OECONF_append = " --enable-sys-uid" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad/0001-install-wayland.h.patch b/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad/0001-install-wayland.h.patch new file mode 100644 index 00000000..67481574 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad/0001-install-wayland.h.patch @@ -0,0 +1,33 @@ +From 0adaad552a15dfb03d41774c4cf45b8c9a038640 Mon Sep 17 00:00:00 2001 +From: Veeresh Kadasani +Date: Wed, 10 Jul 2019 14:36:37 +0900 +Subject: [PATCH 1/2] install wayland.h + +Signed-off-by: Veeresh Kadasani +--- + gst-libs/gst/wayland/Makefile.am | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/gst-libs/gst/wayland/Makefile.am b/gst-libs/gst/wayland/Makefile.am +index 743a489..c59b06d 100644 +--- a/gst-libs/gst/wayland/Makefile.am ++++ b/gst-libs/gst/wayland/Makefile.am +@@ -5,6 +5,8 @@ libgstwayland_@GST_API_VERSION@_la_SOURCES = wayland.c + libgstwayland_@GST_API_VERSION@includedir = \ + $(includedir)/gstreamer-@GST_API_VERSION@/gst/wayland + ++libgstwayland_@GST_API_VERSION@include_HEADERS = wayland.h ++ + libgstwayland_@GST_API_VERSION@_la_CFLAGS = \ + $(GST_PLUGINS_BAD_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) \ +@@ -21,7 +23,3 @@ libgstwayland_@GST_API_VERSION@_la_LDFLAGS = \ + $(GST_LIB_LDFLAGS) \ + $(GST_ALL_LDFLAGS) \ + $(GST_LT_LDFLAGS) +- +-noinst_HEADERS = \ +- wayland.h +- +-- +2.7.4 diff --git a/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_1.14.%.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_1.14.%.bbappend new file mode 100644 index 00000000..df13a042 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-bad/gstreamer1.0-plugins-bad_1.14.%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI_append="${@bb.utils.contains_any("MACHINE", "m3ulcb h3ulcb m3ulcb-nogfx", " "," file://0001-install-wayland.h.patch", d)}" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-good/gstreamer1.0-plugins-good_%.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-good/gstreamer1.0-plugins-good_%.bbappend new file mode 100644 index 00000000..86a181fb --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-multimedia/gstreamer1.0-plugins-good/gstreamer1.0-plugins-good_%.bbappend @@ -0,0 +1,2 @@ +# libv4l2 is useful for making more efficient use of cameras via v4l2src. +PACKAGECONFIG_append = " libv4l2" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.bb b/meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.bb new file mode 100644 index 00000000..bbb61c92 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.bb @@ -0,0 +1,9 @@ +SUMMARY = "A very basic Wayland image with a terminal" + +require agl-image-weston.inc + +LICENSE = "MIT" + +IMAGE_INSTALL_append = "\ + packagegroup-agl-profile-graphical \ + " diff --git a/meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.inc b/meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.inc new file mode 100644 index 00000000..ed1634fc --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-platform/images/agl-image-weston.inc @@ -0,0 +1,7 @@ +require recipes-platform/images/agl-image-minimal.inc + +IMAGE_FEATURES += "splash package-management ssh-server-dropbear" + +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES = "wayland" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb new file mode 100644 index 00000000..cd37cb7d --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb @@ -0,0 +1,16 @@ +SUMMARY = "The software for application framework of AGL IVI profile" +DESCRIPTION = "A set of packages belong to AGL application framework which required by \ +Multimedia Subsystem" + +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-graphical-multimedia \ + " + +RDEPENDS_${PN} += "\ + alsa-utils \ + gstreamer1.0-meta-base \ + " diff --git a/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bbappend b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bbappend new file mode 100644 index 00000000..4a98a233 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bbappend @@ -0,0 +1,5 @@ +RDEPENDS_${PN}_append_ulcb = "\ + ${@bb.utils.contains('MACHINE_FEATURES','multimedia','packagegroup-multimedia-kernel-modules','',d)} \ + ${@bb.utils.contains('MACHINE_FEATURES','multimedia','packagegroup-multimedia-libs','',d)} \ + ${@bb.utils.contains('MACHINE_FEATURES','multimedia','packagegroup-gstreamer1.0-plugins','',d)} \ +" diff --git a/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-services.bb b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-services.bb new file mode 100644 index 00000000..2ebb3d62 --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-services.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "The minimal set of packages for Connectivity Subsystem" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-graphical-services \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ +${@bb.utils.contains('DISTRO_FEATURES', 'pipewire', 'agl-service-mediaplayer', '', d)} \ +${@bb.utils.contains('DISTRO_FEATURES', 'pipewire', 'agl-service-radio', '', d)} \ + " diff --git a/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb new file mode 100644 index 00000000..53721f0d --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "The minimal set of packages required for Wayland support" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-graphical-weston \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += " \ + weston \ + weston-init \ + weston-ini-conf \ + weston-examples \ + weston-ready \ + agl-login-manager \ + agl-desktop-config \ + " + diff --git a/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb new file mode 100644 index 00000000..406ebcdb --- /dev/null +++ b/meta-agl/meta-agl-profile-graphical/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb @@ -0,0 +1,23 @@ +SUMMARY = "The middleware for AGL IVI profile" +DESCRIPTION = "The set of packages required for AGL IVI Distribution" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-profile-graphical \ + profile-graphical \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-image-minimal \ + packagegroup-agl-graphical-weston \ + packagegroup-agl-graphical-services \ + packagegroup-agl-graphical-multimedia \ +" +# FIXME: Removed due to issues building against weston 5.0.0: +# waltham-transmitter + +RDEPENDS_profile-graphical = "${PN}" diff --git a/meta-agl/meta-agl-profile-hud/conf/layer.conf b/meta-agl/meta-agl-profile-hud/conf/layer.conf new file mode 100644 index 00000000..4f5d06fc --- /dev/null +++ b/meta-agl/meta-agl-profile-hud/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofilehud" +BBFILE_PATTERN_aglprofilehud = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofilehud = "70" + +LAYERSERIES_COMPAT_aglprofilehud = "thud" diff --git a/meta-agl/meta-agl-profile-telematics/conf/layer.conf b/meta-agl/meta-agl-profile-telematics/conf/layer.conf new file mode 100644 index 00000000..6d17746b --- /dev/null +++ b/meta-agl/meta-agl-profile-telematics/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "aglprofiletelematics" +BBFILE_PATTERN_aglprofiletelematics = "^${LAYERDIR}/" +BBFILE_PRIORITY_aglprofiletelematics = "70" + +LAYERSERIES_COMPAT_aglprofiletelematics = "thud" diff --git a/meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.bb b/meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.bb new file mode 100644 index 00000000..ad6ef988 --- /dev/null +++ b/meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.bb @@ -0,0 +1,9 @@ +SUMMARY = "A basic telematics image" + +require agl-image-telematics.inc + +LICENSE = "MIT" + +IMAGE_INSTALL_append = "\ + profile-telematics \ + " diff --git a/meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.inc b/meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.inc new file mode 100644 index 00000000..b8c228cd --- /dev/null +++ b/meta-agl/meta-agl-profile-telematics/recipes-platform/images/agl-image-telematics.inc @@ -0,0 +1,5 @@ +require recipes-platform/images/agl-image-boot.inc + +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES = "3g" diff --git a/meta-agl/meta-agl-profile-telematics/recipes-platform/packagegroups/packagegroup-agl-profile-telematics.bb b/meta-agl/meta-agl-profile-telematics/recipes-platform/packagegroups/packagegroup-agl-profile-telematics.bb new file mode 100644 index 00000000..66fc0f76 --- /dev/null +++ b/meta-agl/meta-agl-profile-telematics/recipes-platform/packagegroups/packagegroup-agl-profile-telematics.bb @@ -0,0 +1,25 @@ +SUMMARY = "The middleware for AGL telematics profile" +DESCRIPTION = "The set of packages required for AGL Telematics Distribution" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-profile-telematics \ + profile-telematics \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + packagegroup-agl-image-boot \ + packagegroup-agl-core-security \ + ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','connman','connman connman-client','',d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "3g", "libqmi", "", d)} \ + agl-login-manager \ + agl-service-can-low-level \ + agl-service-network \ + can-utils \ +" + +RDEPENDS_profile-telematics = "${PN}" diff --git a/meta-agl/meta-agl.md b/meta-agl/meta-agl.md new file mode 100755 index 00000000..19f80ee3 --- /dev/null +++ b/meta-agl/meta-agl.md @@ -0,0 +1,142 @@ +## Introduction + +The `meta-agl` layer provides the minimal set of software +to boot an AGL Distribution system. +You use this layer as the minimal core on which to build AGL profiles. + +**NOTE:** The `meta-agl` layer does not include a reference UI. + The reference UI is included as part of the + [`meta-agl-demo`](./meta-agl-demo.html) layer. + Furthermore, `meta-agl` does not include additional components, such + as security, which are part of the + `meta-agl-extra` layer. + +## Sub-Layers + +The `meta-agl` layer itself contains many sub-layers and files. +Following is a "tree" look at the layer: + +``` +. +├── docs +├── meta-agl +├── meta-agl-bsp +├── meta-agl-distro +├── meta-agl-profile-cluster +├── meta-agl-profile-cluster-qt5 +├── meta-agl-profile-core +├── meta-agl-profile-graphical +├── meta-agl-profile-graphical-html5 +├── meta-agl-profile-graphical-qt5 +├── meta-agl-profile-hud +├── meta-agl-profile-telematics +├── meta-app-framework +├── meta-netboot +├── meta-security +├── README-AGL.md +├── README.md +├── scripts +├── templates +``` + +This list provides some overview information on the files and sub-layers +in `meta-agl`: + +* `docs`: Contains files that support AGL documentation. +* `meta-agl`: Contains layer configuration for the `meta-agl` layer. +* `meta-agl-bsp`: Contains adaptations for recipes and required packages + to boot an AGL distribution on targeted hardware and emulation (i.e. QEMU). +* `meta-agl-distro`: Contains distro configuration and supporting scripts. +* `meta-agl-profile-cluster`: The middleware for the AGL cluster profile. + The set of packages required for AGL Cluster Distribution. + Profiles include support for Wayland images. +* `meta-agl-profile-cluster-qt5`: The middleware for the AGL Qt5-based cluster profile. + The set of packages required for AGL Qt5-based Cluster Distribution. + Profiles include support for Wayland images with Qt5. +* `meta-agl-profile-core`: Configuration and recipes for the AGL core profiles. +* `meta-agl-profile-graphical`: Configuration and recipes supporting graphical user + interfaces. +* `meta-agl-profile-graphical-html5`: Configuration and recipes supporting profiles + with HTML user interface support. +* `meta-agl-profile-graphical-qt5`: Configuration and recipes supporting profiles + with Qt5-based user interface support. +* `meta-agl-profile-hud`: Configuration and recipes supporting profiles with + Head-Up-Display (HUD) support. +* `meta-agl-profile-telematics`: Configuration and recipes supporting profiles with + telematics support. +* `meta-app-framework`: Configuration and recipes supporting the AGL Application + Framework. +* `meta-netboot`: Contains recipes and configuration adjustments to allow network + boot through network block device (NBD) since network file system (NFS) does not + support security labels. +* `meta-security`: Configuration and recipes supporting security applications. +* `scripts`: AGL development setup and support scripts. +* `templates`: Base, feature, and machine templates used in the AGL development + environment. + +## Packagegroups + +This section describes the AGL +[packagegroup](https://yoctoproject.org/docs/2.4.4/dev-manual/dev-manual.html#usingpoky-extend-customimage-customtasks) +design: + +* packagegroup-agl-image-minimal + + packagegroup-agl-core-automotive.bb + packagegroup-agl-core-connectivity.bb + packagegroup-agl-core-graphics.bb + packagegroup-agl-core-kernel.bb + packagegroup-agl-core-multimedia.bb + packagegroup-agl-core-navi-lbs.bb + packagegroup-agl-core-os-commonlibs.bb + packagegroup-agl-core-security.bb + packagegroup-agl-core-speech-services.bb + + The previous list of Packagegroups are used to create the `agl-image-minimal` image, + which is a small image just capable of allowing a device to boot. + + Subsystem should maintain packagegroup-agl-core-[subsystem].bb which should + hold sufficient packages to build `agl-image-minimal`. + +* packagegroup-agl-image-ivi + + packagegroup-agl-ivi-automotive.bb + packagegroup-agl-ivi-connectivity.bb + packagegroup-agl-ivi-graphics.bb + packagegroup-agl-ivi-kernel.bb + packagegroup-agl-ivi-multimedia.bb + packagegroup-agl-ivi-navi-lbs.bb + packagegroup-agl-ivi-os-commonlibs.bb + packagegroup-agl-ivi-security.bb + packagegroup-agl-ivi-speech-services.bb + + The previous list of Packagegroups are used to create the `agl-image-ivi` + image, which is a baseline image (i.e. Service Layer and Operating System + Layer defined in AGL Spec v1.0) for the AGL profiles. + +* packagegroup-agl-test.bb + + Additional tools used in QA tests (for agl-image*-qa). + + diff --git a/meta-agl/meta-agl/conf/layer.conf b/meta-agl/meta-agl/conf/layer.conf new file mode 100644 index 00000000..c46ec809 --- /dev/null +++ b/meta-agl/meta-agl/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "agl" +BBFILE_PATTERN_agl = "^${LAYERDIR}/" +BBFILE_PRIORITY_agl = "70" + +LAYERSERIES_COMPAT_agl = "thud" diff --git a/meta-agl/meta-app-framework/classes/aglwgt.bbclass b/meta-agl/meta-app-framework/classes/aglwgt.bbclass new file mode 100644 index 00000000..717bd7b9 --- /dev/null +++ b/meta-agl/meta-app-framework/classes/aglwgt.bbclass @@ -0,0 +1,109 @@ +# +# aglwgt bbclass +# +# Jan-Simon Moeller, jsmoeller@linuxfoundation.org +# +# This class expects a "make package" target in the makefile +# which creates the wgt files in the package/ subfolder. +# The makefile needs to use wgtpkg-pack. +# + + +# 'wgtpkg-pack' in af-main-native is required. +DEPENDS_append = " af-main-native" + +# for bindings af-binder is required. +DEPENDS_append = " af-binder" + +# for bindings that use the cmake-apps-module +DEPENDS_append = " cmake-apps-module-native" + +# for hal bindings genskel is required. +DEPENDS_append = " af-binder-devtools-native" + +EXTRA_OECMAKE_append_agl-ptest = " -DBUILD_TEST_WGT=TRUE" + +# FIXME: Remove once CMake+ninja issues are resolved +OECMAKE_GENERATOR = "Unix Makefiles" + +do_aglwgt_package() { + cd ${B} + ${S}/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${B} VERBOSE=TRUE || \ + ( ${S}/conf.d/autobuild/agl/autobuild package BUILD_DIR=${B} DEST=${B}/package VERBOSE=TRUE && \ + ( bbwarn "OBSOLETE: Your autobuild script should be located in :" ; \ + bbwarn "autobuild/agl/ from the project root source folder"; \ + bbwarn "and generate a .wgt file using wgtpack in the build"; \ + bbwarn "root folder calling:" ; \ + bbwarn "./autobuild/agl/autobuild package DEST=" ; \ + bbwarn "See: https://wiki.automotivelinux.org/troubleshooting/app-recipes" \ + ) + ) || + ( bbwarn "OBSOLETE: You must have an autobuild script located in:" ; \ + bbwarn "autobuild/agl/ from the project root source folder"; \ + bbwarn "with filename autobuild which should generate"; \ + bbwarn "a .wgt file using wgtpack in the build"; \ + bbwarn "root folder calling:" ; \ + bbwarn "./autobuild/agl/autobuild package DEST=" ; \ + bbwarn "Fix your package as it will not work within the SDK" ; \ + bbwarn "See: https://wiki.automotivelinux.org/troubleshooting/app-recipes"; \ + make package) +} + +python () { + d.setVarFlag('do_aglwgt_deploy', 'fakeroot', '1') +} + + +POST_INSTALL_LEVEL ?= "10" +POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh" + +EXTRA_WGT_POSTINSTALL ?= "" + +do_aglwgt_deploy() { + TEST_WGT="*-test.wgt" + if [ "${AGLWGT_AUTOINSTALL_${PN}}" = "0" ] + then + install -d ${D}/usr/AGL/apps/manualinstall + install -m 0644 ${B}/*.wgt ${D}/usr/AGL/apps/manualinstall || \ + install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/manualinstall + else + install -d ${D}/usr/AGL/apps/autoinstall + install -m 0644 ${B}/*.wgt ${D}/usr/AGL/apps/autoinstall || \ + install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/autoinstall + + if [ "$(find ${D}/usr/AGL/apps/autoinstall -name ${TEST_WGT})" ] + then + install -d ${D}/usr/AGL/apps/testwgt + mv ${D}/usr/AGL/apps/autoinstall/*-test.wgt ${D}/usr/AGL/apps/testwgt + fi + fi + + APP_FILES="" + for file in ${D}/usr/AGL/apps/autoinstall/*.wgt;do + APP_FILES="${APP_FILES} $(basename $file)"; + done + install -d ${D}/${sysconfdir}/agl-postinsts + cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} < +Date: Thu, 21 Jan 2016 15:07:29 +0100 +Subject: [PATCH] Hack to allow the debugging + +This is a temporarily fix to continue debugging +afm-main. This should be removed later. + +Change-Id: I2f10f0cb1fce2ee30bd0754ad2e7bc8e2f6513aa +--- + conf/afm-user-daemon.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/conf/user/afm-user-daemon.conf b/conf/user/afm-user-daemon.conf +index 801c7ae..98a3152 100644 +--- a/conf/user/afm-user-daemon.conf ++++ b/conf/user/afm-user-daemon.conf +@@ -25,7 +25,7 @@ + + + +- ++ + + + +-- +2.1.4 + diff --git a/meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.bb b/meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.bb new file mode 100644 index 00000000..4a565453 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.bb @@ -0,0 +1,127 @@ +require af-main_${PV}.inc + +# NOTE: using libcap-native and setcap in install doesn't work +# NOTE: maybe setting afm_name to agl-framework is cleaner but has implications +# NOTE: there is a hack of security for using groups and dbus (to be checked) +# NOTE: using ZIP programs creates directories with mode 777 (very bad) + +inherit cmake pkgconfig useradd systemd +BBCLASSEXTEND = "native" + +SECTION = "base" + +DEPENDS = "openssl libxml2 xmlsec1 systemd libzip json-c systemd security-manager af-binder sed m4" +DEPENDS_class-native = "openssl libxml2 xmlsec1 libzip json-c" +RDEPENDS_${PN}_class-target += "af-binder-tools" + +PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-native libcap-native" + +EXTRA_OECMAKE_class-native = "\ + -DUSE_LIBZIP=1 \ + -DUSE_SIMULATION=1 \ + -DUSE_SDK=1 \ + -DAGLVERSION=${AGLVERSION} \ + -Dafm_name=${afm_name} \ + -Dafm_confdir=${afm_confdir} \ + -Dafm_datadir=${afm_datadir} \ +" + +EXTRA_OECMAKE = "\ + -DUSE_LIBZIP=1 \ + -DUSE_SIMULATION=0 \ + -DUSE_SDK=0 \ + -DAGLVERSION=${AGLVERSION} \ + -Dafm_name=${afm_name} \ + -Dafm_confdir=${afm_confdir} \ + -Dafm_datadir=${afm_datadir} \ + -Dsystemd_units_root=${systemd_units_root} \ + -DUNITDIR_USER=${systemd_user_unitdir} \ + -DUNITDIR_SYSTEM=${systemd_system_unitdir} \ +" + +# ------------------------ WARNING WARNING WARNNING --------------------------- +# +# ATM (FF.rc2), forcing all apps to be signed is an issue when building without +# agl-devel feature. A workaround is to define ALLOW_NO_SIGNATURE=ON for all +# builds but this must be removed later. See SPEC-1614 for more details. +# +# A variable AGL_FORBID_UNSIGNED_APPS is introduced to enable/disable this +# workaround in local.conf and allow transition to signed apps: +# * forbid unsigned apps by setting: AGL_FORBID_UNSIGNED_APPS="1" +# * [DEFAULT] allow unsigned apps: do nothing (or set: AGL_FORBID_UNSIGNED_APPS="0") +AGL_FORBID_UNSIGNED_APPS ?= "0" +# +# WORKAROUND: +EXTRA_OECMAKE_append_agl-devel = " -DAGL_DEVEL=1" +EXTRA_OECMAKE_append = " ${@bb.utils.contains('AGL_FORBID_UNSIGNED_APPS','1','','-DALLOW_NO_SIGNATURE=ON', d)}" +# +# Correct version (IMPORTANT TODO: to be restored later): +#EXTRA_OECMAKE_append_agl-devel = " -DAGL_DEVEL=1 -DALLOW_NO_SIGNATURE=ON" +# +# ------------------------ WARNING WARNING WARNNING --------------------------- + + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --gid ${afm_name} --home-dir ${afm_datadir} ${afm_name}" +GROUPADD_PARAM_${PN} = "--system ${afm_name}" + +RDEPENDS_${PN}_append_with-lsm-smack = " smack bash" +DEPENDS_append_with-lsm-smack = " smack-native" + +# short hacks here +SRC_URI += "\ + file://Hack-to-allow-the-debugging.patch \ +" + +do_install_append_class-target() { + install -d ${D}${bindir} + install -d -m 0775 ${D}${systemd_units_root}/system + install -d -m 0775 "${D}${systemd_units_root}/system/multi-user.target.wants" + install -d -m 0775 "${D}${systemd_units_root}/system/afm-user-session@.target.wants" + install -d -m 0775 ${D}${systemd_units_root}/user + install -d -m 0775 ${D}${systemd_units_root}/user/default.target.wants + install -d -m 0775 ${D}${systemd_units_root}/user/sockets.target.wants + install -d ${D}${afm_datadir}/applications + install -d ${D}${afm_datadir}/icons + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d -m 0755 ${D}${systemd_system_unitdir}/multi-user.target.wants + install -d -m 0755 ${D}${systemd_system_unitdir}/sockets.target.wants + ln -sf ../afm-system-setup.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-system-setup.service + ln -sf ../afm-system-daemon.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-system-daemon.service + ln -sf ../afm-system-daemon.socket ${D}${systemd_system_unitdir}/sockets.target.wants/afm-system-daemon.socket + fi + echo "QT_WAYLAND_SHELL_INTEGRATION=ivi-shell" > ${D}${afm_confdir}/unit.env.d/qt-for-ivi-shell +} + +pkg_postinst_ontarget_${PN}() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + chgrp ${afm_name} $D${systemd_units_root}/system + chgrp ${afm_name} $D${systemd_units_root}/system/afm-user-session@.target.wants + chgrp ${afm_name} $D${systemd_units_root}/user/default.target.wants + chgrp ${afm_name} $D${systemd_units_root}/user/sockets.target.wants + fi + chown ${afm_name}:${afm_name} $D${afm_datadir} + chown ${afm_name}:${afm_name} $D${afm_datadir}/applications + chown ${afm_name}:${afm_name} $D${afm_datadir}/icons +} + +pkg_postinst_ontarget_${PN}_append_with-lsm-smack() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + chsmack -a 'System::Shared' -t $D${systemd_units_root}/system + chsmack -a 'System::Shared' -t $D${systemd_units_root}/system/afm-user-session@.target.wants + chsmack -a 'System::Shared' -t $D${systemd_units_root}/user/default.target.wants + chsmack -a 'System::Shared' -t $D${systemd_units_root}/user/sockets.target.wants + fi + chsmack -a 'System::Shared' -t $D${afm_datadir} + chsmack -a 'System::Shared' -t $D${afm_datadir}/applications + chsmack -a 'System::Shared' -t $D${afm_datadir}/icons +} +FILES_${PN} += "${systemd_units_root}/* ${systemd_system_unitdir} ${systemd_user_unitdir}" + +PACKAGES =+ "${PN}-binding ${PN}-binding-dbg" +FILES_${PN}-binding = " ${afb_binding_dir}/afm-main-binding.so " +FILES_${PN}-binding-dbg = " ${afb_binding_dir}/.debug/afm-main-binding.so " + +PACKAGES =+ "${PN}-tools ${PN}-tools-dbg" +FILES_${PN}-tools = "${bindir}/wgtpkg-*" +FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" diff --git a/meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.inc b/meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.inc new file mode 100644 index 00000000..6795da2a --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/af-main/af-main_git.inc @@ -0,0 +1,25 @@ +SUMMARY = "AGL Framework Main part" +DESCRIPTION = "\ +This is a core framework component for managing \ +applications, widgets, and components. \ +" + +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-main" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-main;protocol=https;branch=${AGL_BRANCH}" + +SRCREV = "533d5a1a51a07f2f92e508d113cb49d373e1bad8" +PV = "${AGL_BRANCH}+git${SRCPV}" + +S = "${WORKDIR}/git" + +afm_name = "afm" +afm_confdir = "${sysconfdir}/${afm_name}" +afm_datadir = "/var/local/lib/${afm_name}" +afb_binding_dir = "${libdir}/afb" +systemd_units_root = "/var/local/lib/systemd" + +CFLAGS_append_agl-devel = " -DAGL_DEVEL" + diff --git a/meta-agl/meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb b/meta-agl/meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb new file mode 100644 index 00000000..759c893c --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb @@ -0,0 +1,27 @@ +require af-main_${PV}.inc + +inherit nativesdk cmake pkgconfig + +SECTION = "base" + +DEPENDS = "nativesdk-openssl nativesdk-libxml2 nativesdk-xmlsec1 nativesdk-libzip nativesdk-json-c" + +EXTRA_OECMAKE = "\ + -DUSE_LIBZIP=1 \ + -DUSE_SIMULATION=1 \ + -DUSE_SDK=1 \ + -DAGLVERSION=${AGLVERSION} \ + -Dafm_name=${afm_name} \ + -Dafm_confdir=${afm_confdir} \ + -Dafm_datadir=${afm_datadir} \ +" + +do_install_append() { + # remove unused .pc file we don't want to package + rm -rf ${D}/${libdir} +} + +PACKAGES = "${PN}-tools ${PN}-tools-dbg" +FILES_${PN}-tools = "${bindir}/wgtpkg-* ${afm_confdir}/*" +FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" + diff --git a/meta-agl/meta-app-framework/recipes-core/af-platform-setup/af-platform-setup_1.0.bb b/meta-agl/meta-app-framework/recipes-core/af-platform-setup/af-platform-setup_1.0.bb new file mode 100644 index 00000000..eb473cd1 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/af-platform-setup/af-platform-setup_1.0.bb @@ -0,0 +1,16 @@ +HOMEPAGE = "here" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +SRC_URI = "file://udev-shared.conf" + +S = "${WORKDIR}" + +do_install() { + d=${D}${systemd_system_unitdir}/systemd-udevd.service.d + install -d $d + install -m 0644 ${S}/udev-shared.conf $d +} + +FILES_${PN} = "${systemd_system_unitdir}" diff --git a/meta-agl/meta-app-framework/recipes-core/af-platform-setup/files/udev-shared.conf b/meta-agl/meta-app-framework/recipes-core/af-platform-setup/files/udev-shared.conf new file mode 100644 index 00000000..cce02bc5 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/af-platform-setup/files/udev-shared.conf @@ -0,0 +1,4 @@ +[Service] +ExecStartPre=/bin/mkdir -p /run/udev +ExecStartPre=/usr/bin/chsmack -r -a System::Shared -t /run/udev + diff --git a/meta-agl/meta-app-framework/recipes-core/base-files/base-files_%.bbappend b/meta-agl/meta-app-framework/recipes-core/base-files/base-files_%.bbappend new file mode 100644 index 00000000..1dddcd6f --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/base-files/base-files_%.bbappend @@ -0,0 +1,32 @@ +RDEPENDS_${PN}_append_with-lsm-smack = " smack" +PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-native" + +do_install_append() { + install -m 0700 -d ${D}/${sysconfdir}/skel + chmod -R 0700 ${D}/${sysconfdir}/skel + install -m 0700 -d ${D}/${sysconfdir}/skel/app-data + install -m 0700 -d ${D}/${sysconfdir}/skel/.config + install -m 0755 -d ${D}/var + if [ -d ${D}/usr/local ]; then + mv ${D}/usr/local ${D}/var + else + install -m 0755 -d ${D}/var/local + fi + ln -s ../var/local ${D}/usr/local +} + +do_install_append_with-lsm-smack () { + install -d ${D}/${sysconfdir}/smack/accesses.d + cat > ${D}/${sysconfdir}/smack/accesses.d/default-access-domains-no-user <\s*//' \ + -e 's/\(^hosts:\s\s*\)\(.*\)/\1localuser \2/' \ + -i $D${sysconfdir}/nsswitch.conf +} + +pkg_prerm_${PN} () { + sed -e '/^hosts:/s/\\s*//' \ + -i $D${sysconfdir}/nsswitch.conf +} + +INSANE_SKIP_${PN} = "ldflags" diff --git a/meta-agl/meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/meta-agl/meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend new file mode 100644 index 00000000..fc73e8f3 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -0,0 +1,2 @@ +RDEPENDS_${PN} =+ "nativesdk-af-main-tools nativesdk-af-binder-devtools" + diff --git a/meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework-examples.bb b/meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework-examples.bb new file mode 100644 index 00000000..7ba90916 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework-examples.bb @@ -0,0 +1,14 @@ +SUMMARY = "AGL Application Framework examples" +DESCRIPTION = "The set of examples associated to the AGL Application Framework" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-app-framework-examples \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + " diff --git a/meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb b/meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb new file mode 100644 index 00000000..854835d4 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/packagegroups/packagegroup-agl-app-framework.bb @@ -0,0 +1,20 @@ +SUMMARY = "AGL Application Framework core packages" +DESCRIPTION = "The set of packages required by the AGL Application Framework" +LICENSE = "MIT" + +inherit packagegroup + +PACKAGES = "\ + packagegroup-agl-app-framework \ + " + +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN} += "\ + af-binder \ + libafbwsc \ + af-main \ + nss-localuser \ + systemd-agl-sync \ + af-platform-setup \ + " diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Adapt-rules-to-AGL.patch b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Adapt-rules-to-AGL.patch new file mode 100644 index 00000000..4c91f7fa --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Adapt-rules-to-AGL.patch @@ -0,0 +1,50 @@ +From 935e4e4e746b5ffcda80c80097dc75c2581c1a89 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Wed, 19 Oct 2016 13:45:54 +0200 +Subject: [PATCH] Adapt rules to AGL +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +AGL distribution uses the repository https://github.com/01org/meta-intel-iot-security.git +as basis for the integration of security framework. The security framework +that it provides is an evolution of the security framework of tizen refited +to the distribution Ostro of Intel. This refit took the decision to simplify +the model by removing the running label "User". More can be viewed here: +https://github.com/01org/meta-intel-iot-security/pull/116 + +This commits adapt the template to the rules that are now needed +after this evolution. + +It also integrates one other evolutions: the shared label becomes User::App-Shared instead +of User::App::Shared to avoid collision with application of id "Shared". + +Change-Id: Ieb566b63f8c8e691b5f75e06499a3b576d042546 +Signed-off-by: José Bollo +--- + policy/app-rules-template.smack | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/policy/app-rules-template.smack b/policy/app-rules-template.smack +index 1311169..b4cd2e3 100644 +--- a/policy/app-rules-template.smack ++++ b/policy/app-rules-template.smack +@@ -1,12 +1,10 @@ +-System ~APP~ rwx ++System ~APP~ rwxa ++System ~PKG~ rwxat + ~APP~ System wx + ~APP~ System::Shared rx + ~APP~ System::Run rwxat + ~APP~ System::Log rwxa + ~APP~ _ l +-User ~APP~ rwxa +-User ~PKG~ rwxat +-~APP~ User wx + ~APP~ User::Home rxl +-~APP~ User::App::Shared rwxat ++~APP~ User::App-Shared rwxat + ~APP~ ~PKG~ rwxat +-- +2.7.4 + diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-Cmake-conf-for-gcc6-build.patch b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-Cmake-conf-for-gcc6-build.patch new file mode 100644 index 00000000..43a3ee10 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-Cmake-conf-for-gcc6-build.patch @@ -0,0 +1,40 @@ +From 19c99315a5dcba3b696c30d1fdd42a1dcd574a80 Mon Sep 17 00:00:00 2001 +From: Ronan +Date: Thu, 13 Oct 2016 11:37:47 +0200 +Subject: [PATCH] Fix Cmake conf for gcc6 build + +Signed-off-by: Ronan +--- + src/cmd/CMakeLists.txt | 4 +--- + src/server/CMakeLists.txt | 1 - + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt +index ee9a160..aa7a12c 100644 +--- a/src/cmd/CMakeLists.txt ++++ b/src/cmd/CMakeLists.txt +@@ -1,8 +1,6 @@ + FIND_PACKAGE(Boost REQUIRED COMPONENTS program_options) + +-INCLUDE_DIRECTORIES(SYSTEM +- ${Boost_INCLUDE_DIRS} +- ) ++ + + INCLUDE_DIRECTORIES( + ${INCLUDE_PATH} +diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt +index 753eb96..8eef25d 100644 +--- a/src/server/CMakeLists.txt ++++ b/src/server/CMakeLists.txt +@@ -8,7 +8,6 @@ FIND_PACKAGE(Threads REQUIRED) + + INCLUDE_DIRECTORIES(SYSTEM + ${SERVER_DEP_INCLUDE_DIRS} +- ${Boost_INCLUDE_DIRS} + ${Threads_INCLUDE_DIRS} + ) + +-- +2.6.6 + diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-gcc6-build.patch b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-gcc6-build.patch new file mode 100644 index 00000000..1b3c8c42 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-Fix-gcc6-build.patch @@ -0,0 +1,38 @@ +From cb9acc2b723b297ee373bf814282711f02657aa5 Mon Sep 17 00:00:00 2001 +From: Ronan +Date: Wed, 12 Oct 2016 17:48:55 +0200 +Subject: [PATCH] Fix gcc6 build + +Signed-off-by: ronan +--- + src/client/client-security-manager.cpp | 1 + + src/common/include/privilege_db.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/client/client-security-manager.cpp b/src/client/client-security-manager.cpp +index 74a6b30..347cddd 100644 +--- a/src/client/client-security-manager.cpp ++++ b/src/client/client-security-manager.cpp +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + + static const char *EMPTY = ""; + +diff --git a/src/common/include/privilege_db.h b/src/common/include/privilege_db.h +index 03c6680..8dd39a1 100644 +--- a/src/common/include/privilege_db.h ++++ b/src/common/include/privilege_db.h +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include + +-- +2.6.6 + diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-gcc-7-requires-include-functional-for-std-function.patch b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-gcc-7-requires-include-functional-for-std-function.patch new file mode 100644 index 00000000..7b6845ab --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/0001-gcc-7-requires-include-functional-for-std-function.patch @@ -0,0 +1,51 @@ +From ed1c105db9d7b1ceb52ec16f35b0a2c959c19c6d Mon Sep 17 00:00:00 2001 +From: Changhyeok Bae +Date: Sun, 17 Dec 2017 15:40:58 +0000 +Subject: [PATCH] gcc-7 requires include for std::function + +Signed-off-by: Changhyeok Bae +--- + src/client/client-common.cpp | 1 + + src/common/smack-labels.cpp | 1 + + src/dpl/core/src/binary_queue.cpp | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/src/client/client-common.cpp b/src/client/client-common.cpp +index 883ab8d..1babdf7 100644 +--- a/src/client/client-common.cpp ++++ b/src/client/client-common.cpp +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/src/common/smack-labels.cpp b/src/common/smack-labels.cpp +index 0294a42..1598099 100644 +--- a/src/common/smack-labels.cpp ++++ b/src/common/smack-labels.cpp +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/dpl/core/src/binary_queue.cpp b/src/dpl/core/src/binary_queue.cpp +index 72817a6..838409f 100644 +--- a/src/dpl/core/src/binary_queue.cpp ++++ b/src/dpl/core/src/binary_queue.cpp +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + namespace SecurityManager { + BinaryQueue::BinaryQueue() : +-- +2.7.4 + diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/Removing-tizen-platform-config.patch b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/Removing-tizen-platform-config.patch new file mode 100644 index 00000000..bea3516d --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/Removing-tizen-platform-config.patch @@ -0,0 +1,196 @@ +From 72e66d0e42f3bb6efd689ce33b1df407d94b3c60 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Mon, 16 Nov 2015 14:26:25 +0100 +Subject: [PATCH] Removing tizen-platform-config + +Change-Id: Ic832a2b75229517b09faba969c27fb1a4b490121 +--- + policy/security-manager-policy-reload | 2 +- + src/common/file-lock.cpp | 4 +--- + src/common/include/file-lock.h | 1 - + src/common/include/privilege_db.h | 3 +-- + src/common/service_impl.cpp | 39 +++++++++++------------------------ + src/common/smack-rules.cpp | 12 ++++------- + 6 files changed, 19 insertions(+), 42 deletions(-) + +diff --git a/policy/security-manager-policy-reload b/policy/security-manager-policy-reload +index 6f211c6..ed8047a 100755 +--- a/policy/security-manager-policy-reload ++++ b/policy/security-manager-policy-reload +@@ -2,7 +2,7 @@ + + POLICY_PATH=/usr/share/security-manager/policy + PRIVILEGE_GROUP_MAPPING=$POLICY_PATH/privilege-group.list +-DB_FILE=`tzplatform-get TZ_SYS_DB | cut -d= -f2`/.security-manager.db ++DB_FILE=/var/local/db/security-manager/.security-manager.db + + # Create default buckets + while read bucket default_policy +diff --git a/src/common/file-lock.cpp b/src/common/file-lock.cpp +index 6f3996c..1dada17 100644 +--- a/src/common/file-lock.cpp ++++ b/src/common/file-lock.cpp +@@ -30,9 +30,7 @@ + + namespace SecurityManager { + +-char const * const SERVICE_LOCK_FILE = tzplatform_mkpath3(TZ_SYS_RUN, +- "lock", +- "security-manager.lock"); ++char const * const SERVICE_LOCK_FILE = "/var/run/lock/security-manager.lock"; + + FileLocker::FileLocker(const std::string &lockFile, bool blocking) + { +diff --git a/src/common/include/file-lock.h b/src/common/include/file-lock.h +index 604b019..21a86a0 100644 +--- a/src/common/include/file-lock.h ++++ b/src/common/include/file-lock.h +@@ -29,7 +29,6 @@ + + #include + #include +-#include + + namespace SecurityManager { + +diff --git a/src/common/include/privilege_db.h b/src/common/include/privilege_db.h +index 4d73d90..03c6680 100644 +--- a/src/common/include/privilege_db.h ++++ b/src/common/include/privilege_db.h +@@ -34,14 +34,13 @@ + #include + + #include +-#include + + #ifndef PRIVILEGE_DB_H_ + #define PRIVILEGE_DB_H_ + + namespace SecurityManager { + +-const char *const PRIVILEGE_DB_PATH = tzplatform_mkpath(TZ_SYS_DB, ".security-manager.db"); ++const char *const PRIVILEGE_DB_PATH = "/var/local/db/security-manager/.security-manager.db"; + + enum class QueryType { + EGetPkgPrivileges, +diff --git a/src/common/service_impl.cpp b/src/common/service_impl.cpp +index ae305d3..65cc8b5 100644 +--- a/src/common/service_impl.cpp ++++ b/src/common/service_impl.cpp +@@ -32,7 +32,6 @@ + #include + + #include +-#include + + #include "protocols.h" + #include "privilege_db.h" +@@ -131,7 +130,13 @@ static inline int validatePolicy(policy_entry &policyEntry, std::string uidStr, + + static uid_t getGlobalUserId(void) + { +- static uid_t globaluid = tzplatform_getuid(TZ_SYS_GLOBALAPP_USER); ++ static uid_t globaluid = 0; ++ if (!globaluid) { ++ struct passwd pw, *p; ++ char buf[4096]; ++ int rc = getpwnam_r("afm", &pw, buf, sizeof buf, &p); ++ globaluid = (rc || p == NULL) ? 555 : p->pw_uid; ++ } + return globaluid; + } + +@@ -161,37 +166,17 @@ static inline bool isSubDir(const char *parent, const char *subdir) + + static bool getUserAppDir(const uid_t &uid, std::string &userAppDir) + { +- struct tzplatform_context *tz_ctx = nullptr; +- +- if (tzplatform_context_create(&tz_ctx)) +- return false; +- +- if (tzplatform_context_set_user(tz_ctx, uid)) { +- tzplatform_context_destroy(tz_ctx); +- tz_ctx = nullptr; ++ struct passwd pw, *p; ++ char buf[4096]; ++ int rc = getpwuid_r(uid, &pw, buf, sizeof buf, &p); ++ if (rc || p == NULL) + return false; +- } +- +- enum tzplatform_variable id = +- (uid == getGlobalUserId()) ? TZ_SYS_RW_APP : TZ_USER_APP; +- const char *appDir = tzplatform_context_getenv(tz_ctx, id); +- if (!appDir) { +- tzplatform_context_destroy(tz_ctx); +- tz_ctx = nullptr; +- return false; +- } +- +- userAppDir = appDir; +- +- tzplatform_context_destroy(tz_ctx); +- tz_ctx = nullptr; +- ++ userAppDir = p->pw_dir; + return true; + } + + static inline bool installRequestAuthCheck(const app_inst_req &req, uid_t uid, bool &isCorrectPath, std::string &appPath) + { +- std::string userHome; + std::string userAppDir; + std::stringstream correctPath; + +diff --git a/src/common/smack-rules.cpp b/src/common/smack-rules.cpp +index d834e42..8b5728b 100644 +--- a/src/common/smack-rules.cpp ++++ b/src/common/smack-rules.cpp +@@ -34,7 +34,6 @@ + #include + + #include +-#include + + #include "smack-labels.h" + #include "smack-rules.h" +@@ -43,7 +42,7 @@ namespace SecurityManager { + + const char *const SMACK_APP_LABEL_TEMPLATE = "~APP~"; + const char *const SMACK_PKG_LABEL_TEMPLATE = "~PKG~"; +-const char *const APP_RULES_TEMPLATE_FILE_PATH = tzplatform_mkpath4(TZ_SYS_SHARE, "security-manager", "policy", "app-rules-template.smack"); ++const char *const APP_RULES_TEMPLATE_FILE_PATH = "/usr/share/security-manager/policy/app-rules-template.smack"; + const char *const SMACK_APP_IN_PACKAGE_PERMS = "rwxat"; + + SmackRules::SmackRules() +@@ -237,14 +236,12 @@ void SmackRules::generatePackageCrossDeps(const std::vector &pkgCon + + std::string SmackRules::getPackageRulesFilePath(const std::string &pkgId) + { +- std::string path(tzplatform_mkpath3(TZ_SYS_SMACK, "accesses.d", ("pkg_" + pkgId).c_str())); +- return path; ++ return "/etc/smack/accesses.d/pkg_" + pkgId; + } + + std::string SmackRules::getApplicationRulesFilePath(const std::string &appId) + { +- std::string path(tzplatform_mkpath3(TZ_SYS_SMACK, "accesses.d", ("app_" + appId).c_str())); +- return path; ++ return "/etc/smack/accesses.d/app_" + appId; + } + void SmackRules::installApplicationPrivilegesRules(const std::string &appId, const std::string &pkgId, + const std::vector &pkgContents, const std::vector &privileges) +@@ -256,8 +253,7 @@ void SmackRules::installApplicationPrivilegesRules(const std::string &appId, con + for (auto privilege : privileges) { + if (privilege.empty()) + continue; +- std::string fprivilege ( privilege + "-template.smack"); +- std::string path(tzplatform_mkpath4(TZ_SYS_SHARE, "security-manager", "policy", fprivilege.c_str())); ++ std::string path = "/usr/share/security-manager/policy/" + privilege + "-template.smack"; + if( stat(path.c_str(), &buffer) == 0) + smackRules.addFromTemplateFile(appId, pkgId, path); + } +-- +2.1.4 + diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.service b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.service new file mode 100644 index 00000000..8ed5e860 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.service @@ -0,0 +1,15 @@ +# +# Install security-manager DB to /var + +[Unit] +Description=Install Security Manager database +After=sysinit.target +Before=security-manager.service + +[Install] +WantedBy=default.target + +[Service] +Type=oneshot +User=root +ExecStart=/usr/bin/init-security-manager-db.sh diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.sh b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.sh new file mode 100644 index 00000000..f90192a8 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager/init-security-manager-db.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ ! -e "/var/local/db/security-manager" ]; then + mkdir -p /var/local/db + cp -ra /usr/dbspace/ /var/local/db/security-manager +fi diff --git a/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend new file mode 100644 index 00000000..61c933a7 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend @@ -0,0 +1,25 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/security-manager:" + +PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-native" + +SRC_URI += " file://0001-Adapt-rules-to-AGL.patch \ + file://init-security-manager-db.service \ + file://init-security-manager-db.sh \ + file://0001-Fix-gcc6-build.patch \ + file://0001-Fix-Cmake-conf-for-gcc6-build.patch \ + file://0001-gcc-7-requires-include-functional-for-std-function.patch \ +" + +FILES_${PN}_append = "${bindir}/init-security-manager-db.sh \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/init-security-manager-db.service', '', d)} \ +" + +do_install_append () { + install -p -D ${WORKDIR}/init-security-manager-db.sh ${D}${bindir}/init-security-manager-db.sh + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + mkdir -p ${D}${systemd_unitdir}/system + mkdir -p ${D}${sysconfdir}/systemd/system/default.target.wants + install -m 644 -p -D ${WORKDIR}/init-security-manager-db.service ${D}${systemd_unitdir}/system/init-security-manager-db.service + ln -sf ${systemd_unitdir}/system/init-security-manager-db.service ${D}${sysconfdir}/systemd/system/default.target.wants + fi +} diff --git a/meta-agl/meta-app-framework/recipes-core/shadow/shadow_%.bbappend b/meta-agl/meta-app-framework/recipes-core/shadow/shadow_%.bbappend new file mode 100644 index 00000000..4f594d47 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/shadow/shadow_%.bbappend @@ -0,0 +1,6 @@ + +do_install_append() { + sed -i '/^UMASK/s:^.*$:UMASK 077:' ${D}${sysconfdir}/login.defs +} + + diff --git a/meta-agl/meta-app-framework/recipes-core/systemd-sync/systemd-agl-sync_1.0.bb b/meta-agl/meta-app-framework/recipes-core/systemd-sync/systemd-agl-sync_1.0.bb new file mode 100644 index 00000000..389ab242 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-core/systemd-sync/systemd-agl-sync_1.0.bb @@ -0,0 +1,39 @@ +SUMMARY = "Systemd synchronization script" +DESCRIPTION = "\ +Systemd synchronization script \ +reload daemon at the first boot. \ +" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +#This script should be the last to be execute at the first boot +POST_INSTALL_LEVEL = "X0" +POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh" + +do_install() { + install -d ${D}/${sysconfdir}/agl-postinsts + cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} < +Date: Fri, 22 Jan 2016 16:23:59 +0100 +Subject: [PATCH] removing capability enforcement + +Signed-off-by: ronan + +Change-Id: Idb724192ceab176a611bbed45c0ebc9c8eb5dd30 +--- + progs/setcap.c | 45 +-------------------------------------------- + 1 file changed, 1 insertion(+), 44 deletions(-) + +diff --git a/progs/setcap.c b/progs/setcap.c +index 7304343..71999b6 100644 +--- a/progs/setcap.c ++++ b/progs/setcap.c +@@ -58,11 +58,9 @@ static int read_caps(int quiet, const char *filename, char *buffer) + + int main(int argc, char **argv) + { +- int tried_to_cap_setfcap = 0; + char buffer[MAXCAP+1]; + int retval, quiet=0, verify=0; + cap_t mycaps; +- cap_value_t capflag; + + if (argc < 3) { + usage(); +@@ -150,54 +148,13 @@ int main(int argc, char **argv) + printf("%s: OK\n", *argv); + } + } else { +- if (!tried_to_cap_setfcap) { +- capflag = CAP_SETFCAP; +- +- /* +- * Raise the effective CAP_SETFCAP. +- */ +- if (cap_set_flag(mycaps, CAP_EFFECTIVE, 1, &capflag, CAP_SET) +- != 0) { +- perror("unable to manipulate CAP_SETFCAP - " +- "try a newer libcap?"); +- exit(1); +- } +- if (cap_set_proc(mycaps) != 0) { +- perror("unable to set CAP_SETFCAP effective capability"); +- exit(1); +- } +- tried_to_cap_setfcap = 1; +- } + retval = cap_set_file(*++argv, cap_d); + if (retval != 0) { +- int explained = 0; + int oerrno = errno; +-#ifdef linux +- cap_value_t cap; +- cap_flag_value_t per_state; +- +- for (cap = 0; +- cap_get_flag(cap_d, cap, CAP_PERMITTED, &per_state) != -1; +- cap++) { +- cap_flag_value_t inh_state, eff_state; +- +- cap_get_flag(cap_d, cap, CAP_INHERITABLE, &inh_state); +- cap_get_flag(cap_d, cap, CAP_EFFECTIVE, &eff_state); +- if ((inh_state | per_state) != eff_state) { +- fprintf(stderr, "NOTE: Under Linux, effective file capabilities must either be empty, or\n" +- " exactly match the union of selected permitted and inheritable bits.\n"); +- explained = 1; +- break; +- } +- } +-#endif /* def linux */ +- + fprintf(stderr, + "Failed to set capabilities on file `%s' (%s)\n", + argv[0], strerror(oerrno)); +- if (!explained) { +- usage(); +- } ++ + } + } + if (cap_d) { +-- +2.6.6 + diff --git a/meta-agl/meta-app-framework/recipes-support/libcap/libcap_%.bbappend b/meta-agl/meta-app-framework/recipes-support/libcap/libcap_%.bbappend new file mode 100644 index 00000000..ac909a64 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-support/libcap/libcap_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_append_class-native := ":${THISDIR}/${PN}" +# FIXME: It needs to be determined if this is still required +#SRC_URI_append_class-native = " file://removing-capability-enforcement.patch" diff --git a/meta-agl/meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb b/meta-agl/meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb new file mode 100644 index 00000000..45097117 --- /dev/null +++ b/meta-agl/meta-app-framework/recipes-support/libzip/libzip_1.1.1.bb @@ -0,0 +1,32 @@ +inherit autotools + +SUMMARY = "Library providing support for handling zip files" +DESCRIPTION = "\ + This library is wrapping zlib and allows \ + to easily create, browse, inflate of deflate \ + the zip files. \ + It also provides tools for zip comparing, merging or browsing.\ +" + +HOMEPAGE = "http://nih.at/libzip/index.html" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=23ebf7ca347ed9703b4ef40824d0ef66" + +SRC_URI = "http://nih.at/libzip/libzip-1.1.1.tar.xz;md5sum=0c86a1a94fbc3ec6724801036726ae1f" + +#SRC_URI = "hg://hg.nih.at/libzip;module=libzip;protocol=http" +#SRCREV = "5895e34af7f9" +#S = "${HGDIR}" + +SECTION = "base" + +DEPENDS = "zlib" + +RDEPENDS_${PN} = "zlib" + +PROVIDES += "${PN}-tools" +RDEPENDS_${PN}-tools = "${PN}" +FILES_${PN}-tools = "${bindir}/zipcmp ${bindir}/zipmerge ${bindir}/ziptool" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-agl/meta-netboot/README b/meta-agl/meta-netboot/README new file mode 100644 index 00000000..b571186b --- /dev/null +++ b/meta-agl/meta-netboot/README @@ -0,0 +1,65 @@ +meta-netboot +============ + +This layer contains some recipes and configuration adjustments to allow network boot through NBD (network block device). + +Content and usage +----------------- + +This layer creates a new supplementary initrd image which can be downloaded through TFTP with the kernel. +At boot time, the init script will try to mount the rootfs based on the following kernel command line parameters: +* nbd.server: IP address to reach the NBD server +* nbd.port: TCP port on which server is listening (default: 10809) +* nbd.dev: nbd device to use (default: /dev/nbd0) +* nbd.debug: activate debug mode (init script is then interruptible) + +The layer meta-netboot contains recipes for the following components: +* busybox: activate the built-in NBD client +* initramfs-netboot: contains the init script started by the kernel: basically, this script mounts the real root filesystem, then pivot_root on it and finally exec systemd. +* initramfs-netboot-image: image to specify for building the initrd + +To enable the build of the netboot initrd and ext4 rootfs, add the following line in conf/local.conf: + +INHERIT += "netboot" + + +Server side +----------- + +On the server side (assuming that the build dir is stored in $BUILD) we can run: + +* a TFTP server, for example tftpd-hpa started with $BUILD/tmp/deploy/images as the TFTP dir: + + /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure $BUILD/tmp/deploy/images + +* a NBD server, for example xnbd-server, used to expose the whole ext4 rootfs as a network block device: + + xnbd-server --target --lport 10809 $BUILD/tmp/deploy/images/$MACHINE/agl-demo-platform-$MACHINE.ext4 + + +Target side +----------- + +On the target board, a specific setup should also be done.\ +For Renesas Gen3 board, u-boot is updated and environment is more like : + +------------------------------------------------------------------ +setenv bootargs_console 'console=ttySC0,115200 ignore_loglevel' +setenv bootargs_extra 'rw rootfstype=ext4 rootwait rootdelay=2' +setenv bootargs_root 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp' +setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60' +setenv serverip '' +setenv 'bootdaddr' '0x48000000' +setenv 'bootdfile' 'Image-r8a7795-h3ulcb.dtb' +setenv 'bootdload_net' 'tftp ${bootdaddr} h3ulcb/${bootdfile}' +setenv 'bootkaddr' '0x48080000' +setenv 'bootkfile' 'Image' +setenv 'bootkload_net' 'tftp ${bootkaddr} h3ulcb/${bootkfile}' +setenv 'bootiaddr' '0x5C3F9520' +setenv 'bootifile' 'initramfs-netboot-image-h3ulcb.ext4.gz' +setenv 'bootiload_net' 'tftp ${bootraddr} h3ulcb/${bootrfile}' +setenv 'load_net' 'run bootkload_net; run bootdload_net; run bootiload_net; setenv initrd_size ${filesize}' + +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run load_net; booti ${bootkaddr} ${bootiaddr}:${initrd_size} ${bootdaddr}' +------------------------------------------------------------------ + diff --git a/meta-agl/meta-netboot/README.renesas-gen3 b/meta-agl/meta-netboot/README.renesas-gen3 new file mode 100644 index 00000000..496141ee --- /dev/null +++ b/meta-agl/meta-netboot/README.renesas-gen3 @@ -0,0 +1,90 @@ +Below are the environment variables that can be set in the u-boot console to boot the Renesas Gen3 ULCB boards. + +Adjust board type with the following identifiers: + +* 'm3ulcb' for Renesas Gen3 Starter Kit Pro +* 'h3ulcb' for Renesas Gen3 Starter Kit Premium + +################## Common options ##################### +# these options are common to all configurations: + +##### board info + +# choose board +setenv board m3ulcb +setenv soc r8a7796 +# or +setenv board h3ulcb +setenv soc r8a7795 + +##### boot mode +# choose bootmode: +# netboot +setenv bootmode net +# or sdcard +setenv bootmode sd +# or sdcard with initrd +setenv bootmode sdi + +##### sdcard options +# which sdcard slot to use +setenv bootmmc '0:1' + +##### netboot options +# replace and by appropriate addresses +setenv ipaddr '' +setenv serverip '' +setenv ethact ravb +setenv ethaddr DE:AD:C0:FF:EE: + +################## Internal variables ##################### + +# kernel file +setenv set_bootkfile 'setenv bootkfile Image' +setenv bootkaddr 0x48080000 + +# dtb file +setenv set_bootdfile 'setenv bootdfile Image-${soc}-${board}.dtb' +setenv bootdaddr 0x48000000 + +# initrd +setenv set_bootifile 'setenv bootifile initramfs-netboot-image-${board}.ext4.gz' +setenv bootiaddr 0x5C3F9520 +setenv bootisize 3A6AB6 + +# kernel args +setenv bootargs_console 'console=ttySC0,115200 ignore_loglevel' +setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60' +setenv bootargs_extra 'rw rootfstype=ext4 rootwait rootdelay=2' + +# final boot command +setenv bootcmd 'run bootcmd_${bootmode}' + +################ Boot on MMC (SDcard) ################# + +setenv bootkload_sd 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}' +setenv bootiload_sd 'ext4load mmc ${bootmmc} ${bootiaddr} boot/${bootifile}' +setenv bootdload_sd 'ext4load mmc ${bootmmc} ${bootdaddr} boot/${bootdfile}' + +# without initrd +setenv bootargs_root_sd 'root=/dev/mmcblk1p1' +setenv bootload_sd 'run set_bootkfile; run bootkload_sd; run set_bootdfile; run bootdload_sd' +setenv bootcmd_sd 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root_sd} ${bootargs_extra}; run bootload_sd; booti ${bootkaddr} - ${bootdaddr}' + +# with initrd +setenv bootargs_root_sdi 'root=/dev/ram0 ramdisk_size=16384' +setenv bootload_sdi 'run set_bootkfile; run bootkload_sd; run set_bootdfile; run bootdload_sd; run set_bootifile; run bootiload_sd' +setenv bootcmd_sdi 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root_sdi} ${bootargs_extra}; run bootload_sdi; booti ${bootkaddr} ${bootiaddr}:${bootisize} ${bootdaddr}' + +################ Netboot through TFTP+NBD ################## + +setenv bootkload_net 'tftp ${bootkaddr} ${board}/${bootkfile}' +setenv bootdload_net 'tftp ${bootdaddr} ${board}/${bootdfile}' +setenv bootiload_net 'tftp ${bootiaddr} ${board}/${bootifile}' + +setenv bootargs_root_net 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp' +setenv bootload_net 'run set_bootkfile; run bootkload_net; run set_bootdfile; run bootdload_net; run set_bootifile; run bootiload_net' + +setenv bootcmd_net 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root_net} ${bootargs_extra} nbd.server=${serverip}; run bootload_net; booti ${bootkaddr} ${bootiaddr}:${bootisize} ${bootdaddr}' + + diff --git a/meta-agl/meta-netboot/classes/netboot.bbclass b/meta-agl/meta-netboot/classes/netboot.bbclass new file mode 100644 index 00000000..363e6bcc --- /dev/null +++ b/meta-agl/meta-netboot/classes/netboot.bbclass @@ -0,0 +1,22 @@ +# Enable network bootable image and initrd/initramfs + +python () { + if (bb.utils.contains_any("IMAGE_FSTYPES",["live","wic.vmdk"],True,False,d)): + # typical case for Minnowboard Max + d.setVar("INITRD_IMAGE","initramfs-netboot-image") + d.setVar("INITRD_IMAGE_LIVE",d.getVar("INITRD_IMAGE",True)) + d.setVar("INITRD_LIVE","%s/%s-%s.ext4.gz" % ( + d.getVar("DEPLOY_DIR_IMAGE",True), + d.getVar("INITRD_IMAGE_LIVE",True), + d.getVar("MACHINE",True) + )) + else: + d.setVar("INITRAMFS_IMAGE","initramfs-netboot-image") + if (d.getVar("KERNEL_IMAGETYPE",True) == "uImage"): + # case for "old" u-boot images, like Porter board + d.setVar("NETBOOT_FSTYPES", "ext4.gz.u-boot"); + else: + # case for new u-boot images which don't require uImage format + d.setVar("NETBOOT_FSTYPES", "ext4.gz"); +} + diff --git a/meta-agl/meta-netboot/conf/include/agl-netboot.inc b/meta-agl/meta-netboot/conf/include/agl-netboot.inc new file mode 100644 index 00000000..fcff8c31 --- /dev/null +++ b/meta-agl/meta-netboot/conf/include/agl-netboot.inc @@ -0,0 +1,5 @@ +INHERIT += "netboot" +OVERRIDES .= ":netboot" + +# add 512MB of extra space in ext4 output image +IMAGE_ROOTFS_EXTRA_SPACE = "524288" diff --git a/meta-agl/meta-netboot/conf/layer.conf b/meta-agl/meta-netboot/conf/layer.conf new file mode 100644 index 00000000..d22a8644 --- /dev/null +++ b/meta-agl/meta-netboot/conf/layer.conf @@ -0,0 +1,15 @@ +# Added for futur conditionnals tests +DISTRO_FEATURES_append = " netboot" + +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-netboot" +BBFILE_PATTERN_meta-netboot = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-netboot = "60" + +LAYERSERIES_COMPAT_meta-netboot = "thud" diff --git a/meta-agl/meta-netboot/recipes-core/busybox/busybox_%.bbappend b/meta-agl/meta-netboot/recipes-core/busybox/busybox_%.bbappend new file mode 100644 index 00000000..35891344 --- /dev/null +++ b/meta-agl/meta-netboot/recipes-core/busybox/busybox_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " \ + file://enable_nbd.cfg \ + " + diff --git a/meta-agl/meta-netboot/recipes-core/busybox/files/enable_nbd.cfg b/meta-agl/meta-netboot/recipes-core/busybox/files/enable_nbd.cfg new file mode 100644 index 00000000..7d6c7423 --- /dev/null +++ b/meta-agl/meta-netboot/recipes-core/busybox/files/enable_nbd.cfg @@ -0,0 +1 @@ +CONFIG_NBDCLIENT=y diff --git a/meta-agl/meta-netboot/recipes-core/images/initramfs-netboot-image.bb b/meta-agl/meta-netboot/recipes-core/images/initramfs-netboot-image.bb new file mode 100644 index 00000000..965a0bd3 --- /dev/null +++ b/meta-agl/meta-netboot/recipes-core/images/initramfs-netboot-image.bb @@ -0,0 +1,23 @@ +# Netboot initramfs image. +DESCRIPTION = "Netboot initrd image" + +PACKAGE_INSTALL = "initramfs-netboot busybox base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}" + +# Do not pollute the initrd image with rootfs features +IMAGE_FEATURES = "" + +export IMAGE_BASENAME = "initramfs-netboot-image" +IMAGE_LINGUAS = "" + +LICENSE = "MIT" + +IMAGE_FSTYPES := "${NETBOOT_FSTYPES}" +inherit core-image + +# hotfix for dragonboard (which uses _append in the bsp) +IMAGE_FSTYPES_remove += "wic.gz" + +IMAGE_ROOTFS_SIZE = "8192" +IMAGE_ROOTFS_EXTRA_SPACE = "256" + +BAD_RECOMMENDATIONS += "busybox-syslog" diff --git a/meta-agl/meta-netboot/recipes-core/initramfs-netboot/files/init.sh b/meta-agl/meta-netboot/recipes-core/initramfs-netboot/files/init.sh new file mode 100644 index 00000000..7b8fbb51 --- /dev/null +++ b/meta-agl/meta-netboot/recipes-core/initramfs-netboot/files/init.sh @@ -0,0 +1,166 @@ +#!/bin/sh + +################################################################################ +# +# Init script to boot over network through NBD +# +# Contact: Stéphane Desneux +# +################################################################################ + +# banner generator: echo "AGL - Netboot" | figlet -f slant -w 80 -c +cat <<'EOF' >&2 +________________________________________________________________________________ + ___ ________ _ __ __ __ __ + / | / ____/ / / | / /__ / /_/ /_ ____ ____ / /_ + / /| |/ / __/ / ______ / |/ / _ \/ __/ __ \/ __ \/ __ \/ __/ + / ___ / /_/ / /___ /_____/ / /| / __/ /_/ /_/ / /_/ / /_/ / /_ + /_/ |_\____/_____/ /_/ |_/\___/\__/_.___/\____/\____/\__/ +________________________________________________________________________________ +EOF + +# global variables + +SMACK=n +NBD_SERVER= +NBD_PORT=10809 +NBD_DEV=/dev/nbd0 +NBD_NAMEV3= +DEBUG=n + +# ------------------------------------------- + +log_info() { echo "$0[$$]: $@" >&2; } +log_error() { echo "$0[$$]: ERROR $@" >&2; } + +do_mount_fs() { + log_info "mounting FS: $@" + [[ -e /proc/filesystems ]] && { grep -q "$1" /proc/filesystems || { log_error "Unknown filesystem"; return 1; } } + [[ -d "$2" ]] || mkdir -p "$2" + [[ -e /proc/mounts ]] && { grep -q -e "^$1 $2 $1" /proc/mounts && { log_info "$2 ($1) already mounted"; return 0; } } + mount -t "$1" "$1" "$2" +} + +bail_out() { + log_error "$@" + check_debug "Reboot will occur after exiting this shell." + log_info "Rebooting..." + exec reboot -f +} + +check_debug() { + case $DEBUG in + Y|y|yes|1|true) + log_info "$@" + /bin/sh -i + ;; + esac +} + +# ------------------------------------------- + +export PATH=/sbin:/usr/sbin:/bin:/usr/bin + +log_info "starting initrd script" + +do_mount_fs proc /proc +do_mount_fs sysfs /sys +do_mount_fs devtmpfs /dev +do_mount_fs devpts /dev/pts +do_mount_fs tmpfs /dev/shm +do_mount_fs tmpfs /tmp +do_mount_fs tmpfs /run + +# parse kernel commandline to get NBD server +for x in $(cat /proc/cmdline); do + case $x in + nbd.server=*) NBD_SERVER=${x/*=/};; + nbd.port=*) NBD_PORT=${x/*=/};; + nbd.dev=*) NBD_DEV=/dev/${x/*=/};; + nbd.namev3=*) NBD_NAMEV3=${x/*=/};; + nbd.debug=*) DEBUG=${x/*=/};; + esac +done + +check_debug "Debug point 1. Exit to continue initrd script (mount NBD device)." + +log_info "NBD parameters: device $NBD_DEV, server $NBD_SERVER:$NBD_PORT" + +# check if smack is active (and if so, mount smackfs) +grep -q smackfs /proc/filesystems && { + SMACK=y + + do_mount_fs smackfs /sys/fs/smackfs + + # adjust current label and network label + echo System >/proc/self/attr/current + echo System >/sys/fs/smackfs/ambient +} + +# start nbd client +try=5 +while :;do + log_info "Starting NBD client" + if [ -z "${NBD_NAMEV3}" ]; then + nbd-client $NBD_SERVER $NBD_PORT $NBD_DEV && { log_info "NBD client successfully started"; break; } + log_info "NBD client failed" + else + nbd3-client $NBD_SERVER $NBD_DEV --name $NBD_NAMEV3 && { log_info "NBD3 client successfully started"; break; } + log_info "NBDv3 client failed" + fi + [[ $try -gt 0 ]] && { log_info "Retrying ($try trie(s) left)..."; sleep 3; try=$(( try - 1 )); continue; } + + bail_out "Unable to mount NBD device $NBD_DEV using server $NBD_SERVER:$NBD_PORT" +done + +# mount NBD device +mkdir -p /sysroot +mount $NBD_DEV -o noatime /sysroot || bail_out "Unable to mount root NBD device" + +# move mounted devices to new root +cd /sysroot +for x in dev proc sys tmp run; do + log_info "Moving /$x to new rootfs" + mount -o move /$x $x +done + +# switch to new rootfs +log_info "Switching to new rootfs" +mkdir -p boot/initramfs +pivot_root . boot/initramfs || bail_out "pivot_root failed." + +# workaround for connman (avoid bringing down the network interface used for booting, disable DNS proxy) +if [[ -f /lib/systemd/system/connman.service ]]; then + log_info "Adjusting Connman configuration" + iface=$(ip -o link show up | tr ':' ' ' | awk '{print $2}' | grep -v -e "^lo$" | head -1) + sed -i "s|connmand -n\$|connmand -r -n -I $iface|g" /lib/systemd/system/connman.service +fi + +# also use /proc/net/pnp to generate /etc/resolv.conf +rm -f /etc/resolv.conf +grep -v bootserver /proc/net/pnp | sed 's/^domain/search/g' >/etc/resolv.conf +chsmack -A /etc/resolv.conf + +# unmount tmp and run to let systemd remount them with correct smack labels (SPEC-2596) +log_info "Unmounting /tmp and /run" +umount /tmp +umount /run + +# finally, run systemd +check_debug "Debug point 2. Exit to continue initrd script (run systemd)." + +log_info "Exec'ing systemd" +# banner generator: echo "AGL Booting . . ." | figlet -f slant -w 80 -c +cat <<'EOF' >&2 +________________________________________________________________________________ + ___ ________ ____ __ _ + / | / ____/ / / __ )____ ____ / /_(_)___ ____ _ + / /| |/ / __/ / / __ / __ \/ __ \/ __/ / __ \/ __ `/ + / ___ / /_/ / /___ / /_/ / /_/ / /_/ / /_/ / / / / /_/ / _ _ _ + /_/ |_\____/_____/ /_____/\____/\____/\__/_/_/ /_/\__, / (_) (_) (_) +_____________________________________________________/____/_____________________ +EOF + +exec /lib/systemd/systemd /dev/console 2>&1 +bail_out + diff --git a/meta-agl/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb b/meta-agl/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb new file mode 100644 index 00000000..f519694e --- /dev/null +++ b/meta-agl/meta-netboot/recipes-core/initramfs-netboot/initramfs-netboot_1.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "Extremely basic live image init script" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +SRC_URI = "file://init.sh" + +S = "${WORKDIR}" + +RDEPENDS_${PN} += "nbd-client" + +do_install() { + install -dm 0755 ${D}/etc + touch ${D}/etc/initrd-release + install -dm 0755 ${D}/dev + install -dm 0755 ${D}/sbin + install -m 0755 ${WORKDIR}/init.sh ${D}/sbin/init +} + +inherit allarch + +FILES_${PN} += " /dev /etc/initrd-release /sbin/init " + diff --git a/meta-agl/meta-netboot/recipes-support/nbd/nbd_%.bbappend b/meta-agl/meta-netboot/recipes-support/nbd/nbd_%.bbappend new file mode 100644 index 00000000..fb11ef9c --- /dev/null +++ b/meta-agl/meta-netboot/recipes-support/nbd/nbd_%.bbappend @@ -0,0 +1,6 @@ + +do_install_append() { + mv ${D}/${sbindir}/${BPN}-client ${D}/${sbindir}/${BPN}3-client +} + +FILES_${PN}-client = "${sbindir}/${BPN}3-client" diff --git a/meta-agl/meta-security/COPYING.MIT b/meta-agl/meta-security/COPYING.MIT new file mode 100644 index 00000000..89de3547 --- /dev/null +++ b/meta-agl/meta-security/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta-agl/meta-security/README.md b/meta-agl/meta-security/README.md new file mode 100644 index 00000000..0bae9f3f --- /dev/null +++ b/meta-agl/meta-security/README.md @@ -0,0 +1,31 @@ +This README file contains information on the contents of the +meta-security layer. + +Please see the corresponding sections below for details. + + +Dependencies +============ + +This layer depends on: + + URI: git://git.openembedded.org/bitbake + branch: master + + URI: git://git.openembedded.org/openembedded-core + layers: meta + branch: master + + URI: git://git.yoctoproject.org/meta-security + branch: master + + +Patches +======= + +Please submit any patches against the meta-security layer via gerrit +reviews. + +For discussion use the discussion mailing list +mailto:automotive-discussions@lists.linuxfoundation.org + diff --git a/meta-agl/meta-security/conf/layer.conf b/meta-agl/meta-security/conf/layer.conf new file mode 100644 index 00000000..16dae398 --- /dev/null +++ b/meta-agl/meta-security/conf/layer.conf @@ -0,0 +1,14 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH =. "${LAYERDIR}:" + +# We have a packages directory, add to BBFILES +BBFILES += " ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ + " + +# Must prioritize our rpm recipe over the default ones. +BBFILE_COLLECTIONS += "security-smack" +BBFILE_PATTERN_security-smack := "^${LAYERDIR}/" +BBFILE_PRIORITY_security-smack = "60" + +LAYERSERIES_COMPAT_security-smack = "thud" diff --git a/meta-agl/meta-security/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-agl/meta-security/recipes-connectivity/bluez5/bluez5_%.bbappend new file mode 100644 index 00000000..3767681b --- /dev/null +++ b/meta-agl/meta-security/recipes-connectivity/bluez5/bluez5_%.bbappend @@ -0,0 +1,55 @@ +# Recent bluez5 releases started limiting the capabilities of +# bluetoothd. When running on a Smack-enabled system, that change has the +# effect that bluetoothd can no longer create the input device under +# /sys because bluez5 running with label "System" has no write +# access to that. +# +# It works when running as normal root with unrestricted capabilities +# because then CAP_MAC_OVERRIDE (a Smack-specific capability) allows +# the process to ignore Smack rules. +# +# We need to ensure that bluetoothd still has that capability. +# +# To fix the issue, Patick and Casey(the Smack architect) had a talk +# about it in Ostro dev mail list. Casey has some ideas about the issue: +# "Turning off privilege is a great thing to do *so long as you don't +# really need the privilege*. In this case you really need it. +# The application package isn't written to account for Smack's use of +# CAP_MAC_OVERRIDE as the mechanism for controlling this dangerous operation. +# Yes, it would be possible to change /proc to change the Smack label on +# that particular file, but that might open other paths for exploit. +# I say give the program the required capability. The program maintainer +# may well say change the kernel handling of /proc. You're stuck in the +# middle, as both work the way they're intended and hence the system +# doesn't work. :( There isn't a way to make this work without "loosening" +# something." +# Therefore, when we we run the program with CAP_MAC_OVERRIDE, +# the whole reason for having capabilities is so the we can give a +# process the ability to bypass one kind of check without giving it the +# ability to bypass other, unrelated checks. A process with +# CAP_MAC_OVERRIDE is still constrained by the file mode bits. +# We was overly worried about granting that capability. +# When it has no other effect than excluding a process from Smack MAC enforcement, +# then adding to the process seems like the right solution for now. +# +# The conclusion from Patick and Casey is that the Smack architect give the key point +# that this is the solution preferred. +# +# Because the solution is to some extend specific to the environment +# in which connmand runs, this change is not submitted upstream +# and it can be overridden by a distro via FIX_BLUEZ5_CAPABILITIES. +# +# The related patch has been submitted to upstream too. +# upstream link: http://permalink.gmane.org/gmane.linux.bluez.kernel/67993 + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_with-lsm-smack = "\ + file://bluetooth.service.conf \ +" + +FILES_${PN} += "${systemd_unitdir}" + +do_install_append_with-lsm-smack() { + install -Dm0644 ${WORKDIR}/bluetooth.service.conf ${D}${systemd_unitdir}/system/bluetooth.service.d/smack.conf +} diff --git a/meta-agl/meta-security/recipes-connectivity/bluez5/files/bluetooth.service.conf b/meta-agl/meta-security/recipes-connectivity/bluez5/files/bluetooth.service.conf new file mode 100644 index 00000000..b93ab4fe --- /dev/null +++ b/meta-agl/meta-security/recipes-connectivity/bluez5/files/bluetooth.service.conf @@ -0,0 +1,2 @@ +[Service] +CapabilityBoundingSet=CAP_MAC_OVERRIDE diff --git a/meta-agl/meta-security/recipes-connectivity/connman/connman_%.bbappend b/meta-agl/meta-security/recipes-connectivity/connman/connman_%.bbappend new file mode 100644 index 00000000..3b010490 --- /dev/null +++ b/meta-agl/meta-security/recipes-connectivity/connman/connman_%.bbappend @@ -0,0 +1,34 @@ +# Recent ConnMan releases started limiting the capabilities of +# ConnMan. When running on a Smack-enabled system, that change has the +# effect that connmand can no longer change network settings under +# /proc/net because the Smack label of /proc is "_", and connmand +# running with label "System" has no write access to that. +# +# It works when running as normal root with unrestricted capabilities +# because then CAP_MAC_OVERRIDE (a Smack-specific capability) allows +# the process to ignore Smack rules. +# +# We need to ensure that connmand still has that capability. +# +# The alternative would be to set up fine-grained labelling of +# /proc with corresponding rules, which is considerably more work +# and also may depend on kernel changes (like supporting smackfsroot +# for procfs, which seems to be missing at the moment). +# +# Because the solution is to some extend specific to the environment +# in which connmand runs, this change is not submitted upstream +# and it can be overridden by a distro via FIX_CONNMAN_CAPABILITIES. + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_with-lsm-smack = "\ + file://connman.service.conf \ +" + +RDEPENDS_${PN}_append_with-lsm-smack = " smack" + +FILES_${PN} += "${systemd_unitdir}" + +do_install_append_with-lsm-smack() { + install -Dm0644 ${WORKDIR}/connman.service.conf ${D}${systemd_unitdir}/system/connman.service.d/smack.conf +} diff --git a/meta-agl/meta-security/recipes-connectivity/connman/files/connman.service.conf b/meta-agl/meta-security/recipes-connectivity/connman/files/connman.service.conf new file mode 100644 index 00000000..6ebbf6ad --- /dev/null +++ b/meta-agl/meta-security/recipes-connectivity/connman/files/connman.service.conf @@ -0,0 +1,4 @@ +[Service] +CapabilityBoundingSet=CAP_MAC_OVERRIDE +ExecStartPre=+-/bin/mkdir -p /run/connman +ExecStartPre=+-/usr/bin/chsmack -t -a System::Shared /run/connman diff --git a/meta-agl/meta-security/recipes-core/base-files/base-files_%.bbappend b/meta-agl/meta-security/recipes-core/base-files/base-files_%.bbappend new file mode 100644 index 00000000..f0e340f5 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/base-files/base-files_%.bbappend @@ -0,0 +1,79 @@ +# Install default Smack rules, copied from a running Tizen IVI 3.0. +# Corresponds to manifest file from default-access-domains in Tizen: +# https://review.tizen.org/git?p=platform/core/security/default-ac-domains.git;a=blob;f=packaging/default-ac-domains.manifest +do_install_append_with-lsm-smack () { + install -d ${D}/${sysconfdir}/smack/accesses.d + cat >${D}/${sysconfdir}/smack/accesses.d/default-access-domains <${D}/${libdir}/tmpfiles.d/packet-forwarding.conf <${D}/${base_libdir}/udev/rules.d/85-netdev-ipconf-smacklabel.rules < + install -d $D${sysconfdir} + # This has no effect on files installed into /etc during image construction + # because pseudo does not know the special semantic of SMACK::TRANSMUTE. + # To avoid having different xattrs on files inside /etc when pre-installed + # in an image vs. installed on a device, the xattr-images.bbclass has + # a workaround for this deficiency in pseudo. + chsmack -t $D${sysconfdir} + chsmack -a 'System::Shared' $D${sysconfdir} + + # Same for /media. Any daemon running as "System" will get write access + # to everything. + install -d $D/media + chsmack -t $D/media + chsmack -a 'System::Shared' $D/media + + # Same for /var. Any daemon running as "System" will get write access + # to everything. + install -d $D${localstatedir} + chsmack -t $D${localstatedir} + chsmack -a 'System::Shared' $D${localstatedir} + + # + mkdir -p $D/tmp + chsmack -a '*' $D/tmp + + # + # + # These are in a file system mounted by systemd. We patch the systemd service + # to set these attributes. +} diff --git a/meta-agl/meta-security/recipes-core/coreutils/coreutils_%.bbappend b/meta-agl/meta-security/recipes-core/coreutils/coreutils_%.bbappend new file mode 100644 index 00000000..ceaf6a29 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/coreutils/coreutils_%.bbappend @@ -0,0 +1,7 @@ +# Smack patches are included in coreutils v8.22, we just need to enable them. +# The default is not deterministic (enabled if libsmack found), so disable +# explicitly otherwise. +EXTRA_OECONF_SMACK = "--disable-libsmack" +EXTRA_OECONF_SMACK_with-lsm-smack = "--enable-libsmack" +EXTRA_OECONF_append = " ${EXTRA_OECONF_SMACK}" +DEPENDS_append_with-lsm-smack = " smack" diff --git a/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch new file mode 100644 index 00000000..3dbfa8a8 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0001-Integration-of-Cynara-asynchronous-security-checks.patch @@ -0,0 +1,2232 @@ +From 6c498a9b0f4122d1ac49d603f9968b6d85830cdb Mon Sep 17 00:00:00 2001 +From: Jacek Bukarewicz +Date: Thu, 27 Nov 2014 18:11:05 +0100 +Subject: Integration of Cynara asynchronous security checks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This commit introduces basic framework for asynchronous policy +checks and Cynara integration code. Functions for checking security +policy can now return third value - BUS_RESULT_LATER denoting check +result unavailability. Whenever policy checker cannot decide on the +result of the check it is supposed to allocate DeferredMessage structure +that will be passed to the upper layers which can decide what should be +done in such situation. +Proper handling of such case will be implemented in subsequent commits. +Currently such return value results in message denial. + +Cherry picked from 4dcfb02f17247ff9de966b62182cd2e08f301238 +by José Bollo. + +Updated for dbus 1.10.20 by Scott Murray and José Bollo + +Change-Id: I9bcbce34577e5dc2a3cecf6233a0a2b0e43e1108 +Signed-off-by: José Bollo +Signed-off-by: Scott Murray + +diff --git a/bus/Makefile.am b/bus/Makefile.am +index 9ae3071..46afb31 100644 +--- a/bus/Makefile.am ++++ b/bus/Makefile.am +@@ -13,6 +13,7 @@ DBUS_BUS_LIBS = \ + $(THREAD_LIBS) \ + $(ADT_LIBS) \ + $(NETWORK_libs) \ ++ $(CYNARA_LIBS) \ + $(NULL) + + DBUS_LAUNCHER_LIBS = \ +@@ -30,6 +31,7 @@ AM_CPPFLAGS = \ + $(APPARMOR_CFLAGS) \ + -DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \ + -DDBUS_COMPILATION \ ++ $(CYNARA_CFLAGS) \ + $(NULL) + + # if assertions are enabled, improve backtraces +@@ -90,6 +92,8 @@ BUS_SOURCES= \ + audit.h \ + bus.c \ + bus.h \ ++ check.c \ ++ check.h \ + config-loader-expat.c \ + config-parser.c \ + config-parser.h \ +@@ -97,6 +101,8 @@ BUS_SOURCES= \ + config-parser-common.h \ + connection.c \ + connection.h \ ++ cynara.c \ ++ cynara.h \ + desktop-file.c \ + desktop-file.h \ + $(DIR_WATCH_SOURCE) \ +diff --git a/bus/activation.c b/bus/activation.c +index 6f009f5..f8a02eb 100644 +--- a/bus/activation.c ++++ b/bus/activation.c +@@ -1788,14 +1788,15 @@ bus_activation_activate_service (BusActivation *activation, + + if (auto_activation && + entry != NULL && +- !bus_context_check_security_policy (activation->context, ++ BUS_RESULT_TRUE != bus_context_check_security_policy (activation->context, + transaction, + connection, /* sender */ + NULL, /* addressed recipient */ + NULL, /* proposed recipient */ + activation_message, + entry, +- error)) ++ error, ++ NULL)) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + _dbus_verbose ("activation not authorized: %s: %s\n", +diff --git a/bus/bus.c b/bus/bus.c +index 30ce4e1..237efe3 100644 +--- a/bus/bus.c ++++ b/bus/bus.c +@@ -38,6 +38,7 @@ + #include "apparmor.h" + #include "audit.h" + #include "dir-watch.h" ++#include "check.h" + #include + #include + #include +@@ -67,6 +68,7 @@ struct BusContext + BusRegistry *registry; + BusPolicy *policy; + BusMatchmaker *matchmaker; ++ BusCheck *check; + BusLimits limits; + DBusRLimit *initial_fd_limit; + unsigned int fork : 1; +@@ -1003,6 +1005,10 @@ bus_context_new (const DBusString *config_file, + parser = NULL; + } + ++ context->check = bus_check_new(context, error); ++ if (context->check == NULL) ++ goto failed; ++ + dbus_server_free_data_slot (&server_data_slot); + + return context; +@@ -1127,6 +1133,12 @@ bus_context_unref (BusContext *context) + + bus_context_shutdown (context); + ++ if (context->check) ++ { ++ bus_check_unref(context->check); ++ context->check = NULL; ++ } ++ + if (context->connections) + { + bus_connections_unref (context->connections); +@@ -1256,6 +1268,12 @@ bus_context_get_loop (BusContext *context) + return context->loop; + } + ++BusCheck* ++bus_context_get_check (BusContext *context) ++{ ++ return context->check; ++} ++ + dbus_bool_t + bus_context_allow_unix_user (BusContext *context, + unsigned long uid) +@@ -1451,6 +1469,7 @@ complain_about_message (BusContext *context, + DBusConnection *proposed_recipient, + dbus_bool_t requested_reply, + dbus_bool_t log, ++ const char *privilege, + DBusError *error) + { + DBusError stack_error = DBUS_ERROR_INIT; +@@ -1480,7 +1499,8 @@ complain_about_message (BusContext *context, + dbus_set_error (&stack_error, error_name, + "%s, %d matched rules; type=\"%s\", sender=\"%s\" (%s) " + "interface=\"%s\" member=\"%s\" error name=\"%s\" " +- "requested_reply=\"%d\" destination=\"%s\" (%s)", ++ "requested_reply=\"%d\" destination=\"%s\" (%s) " ++ "privilege=\"%s\"", + complaint, + matched_rules, + dbus_message_type_to_string (dbus_message_get_type (message)), +@@ -1491,7 +1511,8 @@ complain_about_message (BusContext *context, + nonnull (dbus_message_get_error_name (message), "(unset)"), + requested_reply, + nonnull (dbus_message_get_destination (message), DBUS_SERVICE_DBUS), +- proposed_recipient_loginfo); ++ proposed_recipient_loginfo, ++ nonnull (privilege, "(n/a)")); + + /* If we hit OOM while setting the error, this will syslog "out of memory" + * which is itself an indication that something is seriously wrong */ +@@ -1519,7 +1540,7 @@ complain_about_message (BusContext *context, + * NULL for addressed_recipient may mean the bus driver, or may mean + * no destination was specified in the message (e.g. a signal). + */ +-dbus_bool_t ++BusResult + bus_context_check_security_policy (BusContext *context, + BusTransaction *transaction, + DBusConnection *sender, +@@ -1527,7 +1548,8 @@ bus_context_check_security_policy (BusContext *context, + DBusConnection *proposed_recipient, + DBusMessage *message, + BusActivationEntry *activation_entry, +- DBusError *error) ++ DBusError *error, ++ BusDeferredMessage **deferred_message) + { + const char *src, *dest; + BusClientPolicy *sender_policy; +@@ -1536,6 +1558,7 @@ bus_context_check_security_policy (BusContext *context, + dbus_bool_t log; + int type; + dbus_bool_t requested_reply; ++ const char *privilege; + + type = dbus_message_get_type (message); + src = dbus_message_get_sender (message); +@@ -1565,7 +1588,7 @@ bus_context_check_security_policy (BusContext *context, + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, + "Message bus will not accept messages of unknown type\n"); + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + requested_reply = FALSE; +@@ -1595,7 +1618,7 @@ bus_context_check_security_policy (BusContext *context, + if (dbus_error_is_set (&error2)) + { + dbus_move_error (&error2, error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + } + } +@@ -1624,11 +1647,11 @@ bus_context_check_security_policy (BusContext *context, + complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, + "An SELinux policy prevents this sender from sending this " + "message to this recipient", +- 0, message, sender, proposed_recipient, FALSE, FALSE, error); ++ 0, message, sender, proposed_recipient, FALSE, FALSE, NULL, error); + _dbus_verbose ("SELinux security check denying send to service\n"); + } + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + /* next verify AppArmor access controls. If allowed then +@@ -1646,7 +1669,7 @@ bus_context_check_security_policy (BusContext *context, + src ? src : DBUS_SERVICE_DBUS, + activation_entry, + error)) +- return FALSE; ++ return BUS_RESULT_FALSE; + + if (!bus_connection_is_active (sender)) + { +@@ -1660,7 +1683,7 @@ bus_context_check_security_policy (BusContext *context, + { + _dbus_verbose ("security check allowing %s message\n", + "Hello"); +- return TRUE; ++ return BUS_RESULT_TRUE; + } + else + { +@@ -1671,7 +1694,7 @@ bus_context_check_security_policy (BusContext *context, + "Client tried to send a message other than %s without being registered", + "Hello"); + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + } + } +@@ -1720,20 +1743,29 @@ bus_context_check_security_policy (BusContext *context, + (proposed_recipient == NULL && recipient_policy == NULL)); + + log = FALSE; +- if (sender_policy && +- !bus_client_policy_check_can_send (sender_policy, +- context->registry, +- requested_reply, +- proposed_recipient, +- message, &toggles, &log)) +- { +- complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, +- "Rejected send message", toggles, +- message, sender, proposed_recipient, requested_reply, +- (addressed_recipient == proposed_recipient), error); +- _dbus_verbose ("security policy disallowing message due to sender policy\n"); +- return FALSE; +- } ++ if (sender_policy) ++ { ++ BusResult res = bus_client_policy_check_can_send (sender, ++ sender_policy, ++ context->registry, ++ requested_reply, ++ addressed_recipient, ++ proposed_recipient, ++ message, &toggles, &log, &privilege, ++ deferred_message); ++ if (res == BUS_RESULT_FALSE) ++ { ++ complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, ++ "Rejected send message", toggles, ++ message, sender, proposed_recipient, requested_reply, ++ (addressed_recipient == proposed_recipient), privilege, ++ error); ++ _dbus_verbose ("security policy disallowing message due to sender policy\n"); ++ return BUS_RESULT_FALSE; ++ } ++ else if (res == BUS_RESULT_LATER) ++ return BUS_RESULT_LATER; ++ } + + if (log) + { +@@ -1742,23 +1774,29 @@ bus_context_check_security_policy (BusContext *context, + complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, + "Would reject message", toggles, + message, sender, proposed_recipient, requested_reply, +- TRUE, NULL); ++ TRUE, privilege, NULL); + } + +- if (recipient_policy && +- !bus_client_policy_check_can_receive (recipient_policy, +- context->registry, +- requested_reply, +- sender, +- addressed_recipient, proposed_recipient, +- message, &toggles)) ++ if (recipient_policy) + { +- complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, +- "Rejected receive message", toggles, +- message, sender, proposed_recipient, requested_reply, +- (addressed_recipient == proposed_recipient), error); +- _dbus_verbose ("security policy disallowing message due to recipient policy\n"); +- return FALSE; ++ BusResult res; ++ res = bus_client_policy_check_can_receive (recipient_policy, ++ context->registry, ++ requested_reply, ++ sender, ++ addressed_recipient, proposed_recipient, ++ message, &toggles, &privilege, deferred_message); ++ if (res == BUS_RESULT_FALSE) ++ { ++ complain_about_message(context, DBUS_ERROR_ACCESS_DENIED, "Rejected receive message", ++ toggles, message, sender, proposed_recipient, requested_reply, ++ (addressed_recipient == proposed_recipient), privilege, error); ++ _dbus_verbose( ++ "security policy disallowing message due to recipient policy\n"); ++ return BUS_RESULT_FALSE; ++ } ++ else if (res == BUS_RESULT_LATER) ++ return BUS_RESULT_LATER; + } + + /* See if limits on size have been exceeded */ +@@ -1768,10 +1806,10 @@ bus_context_check_security_policy (BusContext *context, + { + complain_about_message (context, DBUS_ERROR_LIMITS_EXCEEDED, + "Rejected: destination has a full message queue", +- 0, message, sender, proposed_recipient, requested_reply, TRUE, ++ 0, message, sender, proposed_recipient, requested_reply, TRUE, NULL, + error); + _dbus_verbose ("security policy disallowing message due to full message queue\n"); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + /* Record that we will allow a reply here in the future (don't +@@ -1792,11 +1830,11 @@ bus_context_check_security_policy (BusContext *context, + message, error)) + { + _dbus_verbose ("Failed to record reply expectation or problem with the message expecting a reply\n"); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + _dbus_verbose ("security policy allowing message\n"); +- return TRUE; ++ return BUS_RESULT_TRUE; + } + + void +diff --git a/bus/bus.h b/bus/bus.h +index 2e0de82..82c32c8 100644 +--- a/bus/bus.h ++++ b/bus/bus.h +@@ -45,6 +45,22 @@ typedef struct BusTransaction BusTransaction; + typedef struct BusMatchmaker BusMatchmaker; + typedef struct BusMatchRule BusMatchRule; + typedef struct BusActivationEntry BusActivationEntry; ++typedef struct BusCheck BusCheck; ++typedef struct BusDeferredMessage BusDeferredMessage; ++typedef struct BusCynara BusCynara; ++ ++/** ++ * BusResult is defined as a pointer to a dummy structure to allow detection of type mismatches. ++ * The disadvantage of such solution is that now BusResult variables cannot be used in switch ++ * statement. ++ * Additionally, BUS_RESULT_TRUE is defined as 0 instead of 1 to help detect type mismatches ++ * at runtime. ++ */ ++typedef const struct BusResultStruct { int dummy; } *BusResult; ++ ++static const BusResult BUS_RESULT_TRUE = (BusResult)0x0; ++static const BusResult BUS_RESULT_FALSE = (BusResult)0x1; ++static const BusResult BUS_RESULT_LATER = (BusResult)0x2; + + typedef struct + { +@@ -101,6 +117,7 @@ BusConnections* bus_context_get_connections (BusContext + BusActivation* bus_context_get_activation (BusContext *context); + BusMatchmaker* bus_context_get_matchmaker (BusContext *context); + DBusLoop* bus_context_get_loop (BusContext *context); ++BusCheck * bus_context_get_check (BusContext *context); + dbus_bool_t bus_context_allow_unix_user (BusContext *context, + unsigned long uid); + dbus_bool_t bus_context_allow_windows_user (BusContext *context, +@@ -136,14 +153,15 @@ void bus_context_log_and_set_error (BusContext + const char *name, + const char *msg, + ...) _DBUS_GNUC_PRINTF (5, 6); +-dbus_bool_t bus_context_check_security_policy (BusContext *context, ++BusResult bus_context_check_security_policy (BusContext *context, + BusTransaction *transaction, + DBusConnection *sender, + DBusConnection *addressed_recipient, + DBusConnection *proposed_recipient, + DBusMessage *message, + BusActivationEntry *activation_entry, +- DBusError *error); ++ DBusError *error, ++ BusDeferredMessage **deferred_message); + void bus_context_check_all_watches (BusContext *context); + + #endif /* BUS_BUS_H */ +diff --git a/bus/check.c b/bus/check.c +new file mode 100644 +index 0000000..5b72d31 +--- /dev/null ++++ b/bus/check.c +@@ -0,0 +1,217 @@ ++/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ ++/* check.c Bus security policy runtime check ++ * ++ * Copyright (C) 2014 Intel, Inc. ++ * Copyright (c) 2014 Samsung Electronics, Ltd. ++ * ++ * Licensed under the Academic Free License version 2.1 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include "check.h" ++#include "connection.h" ++#include "dispatch.h" ++#include "cynara.h" ++#include "utils.h" ++#include ++#include ++#include ++ ++ ++typedef struct BusCheck ++{ ++ int refcount; ++ ++ BusContext *context; ++ BusCynara *cynara; ++} BusCheck; ++ ++typedef struct BusDeferredMessage ++{ ++ int refcount; ++ ++ DBusMessage *message; ++ DBusConnection *sender; ++ DBusConnection *proposed_recipient; ++ DBusConnection *addressed_recipient; ++ dbus_bool_t full_dispatch; ++ BusDeferredMessageStatus status; ++ BusResult response; ++ BusCheckResponseFunc response_callback; ++} BusDeferredMessage; ++ ++BusCheck * ++bus_check_new (BusContext *context, DBusError *error) ++{ ++ BusCheck *check; ++ ++ check = dbus_new(BusCheck, 1); ++ if (check == NULL) ++ { ++ BUS_SET_OOM(error); ++ return NULL; ++ } ++ ++ check->refcount = 1; ++ check->context = context; ++ check->cynara = bus_cynara_new(check, error); ++ if (dbus_error_is_set(error)) ++ { ++ dbus_free(check); ++ return NULL; ++ } ++ ++ return check; ++} ++ ++BusCheck * ++bus_check_ref (BusCheck *check) ++{ ++ _dbus_assert (check->refcount > 0); ++ check->refcount += 1; ++ ++ return check; ++} ++ ++void ++bus_check_unref (BusCheck *check) ++{ ++ _dbus_assert (check->refcount > 0); ++ ++ check->refcount -= 1; ++ ++ if (check->refcount == 0) ++ { ++ bus_cynara_unref(check->cynara); ++ dbus_free(check); ++ } ++} ++ ++BusContext * ++bus_check_get_context (BusCheck *check) ++{ ++ return check->context; ++} ++ ++BusCynara * ++bus_check_get_cynara (BusCheck *check) ++{ ++ return check->cynara; ++} ++ ++BusResult ++bus_check_privilege (BusCheck *check, ++ DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusConnection *proposed_recipient, ++ const char *privilege, ++ BusDeferredMessageStatus check_type, ++ BusDeferredMessage **deferred_message) ++{ ++ BusResult result = BUS_RESULT_FALSE; ++#ifdef DBUS_ENABLE_CYNARA ++ BusCynara *cynara; ++#endif ++ DBusConnection *connection; ++ ++ connection = check_type == BUS_DEFERRED_MESSAGE_CHECK_RECEIVE ? proposed_recipient : sender; ++ ++ if (!dbus_connection_get_is_connected(connection)) ++ { ++ return BUS_RESULT_FALSE; ++ } ++ ++ /* ask policy checkers */ ++#ifdef DBUS_ENABLE_CYNARA ++ cynara = bus_check_get_cynara(check); ++ result = bus_cynara_check_privilege(cynara, message, sender, addressed_recipient, ++ proposed_recipient, privilege, check_type, deferred_message); ++#endif ++ ++ if (result == BUS_RESULT_LATER && deferred_message != NULL) ++ { ++ (*deferred_message)->status |= check_type; ++ } ++ return result; ++} ++ ++BusDeferredMessage *bus_deferred_message_new (DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusConnection *proposed_recipient, ++ BusResult response) ++{ ++ BusDeferredMessage *deferred_message; ++ ++ deferred_message = dbus_new(BusDeferredMessage, 1); ++ if (deferred_message == NULL) ++ { ++ return NULL; ++ } ++ ++ deferred_message->refcount = 1; ++ deferred_message->sender = sender != NULL ? dbus_connection_ref(sender) : NULL; ++ deferred_message->addressed_recipient = addressed_recipient != NULL ? dbus_connection_ref(addressed_recipient) : NULL; ++ deferred_message->proposed_recipient = proposed_recipient != NULL ? dbus_connection_ref(proposed_recipient) : NULL; ++ deferred_message->message = dbus_message_ref(message); ++ deferred_message->response = response; ++ deferred_message->status = 0; ++ deferred_message->full_dispatch = FALSE; ++ deferred_message->response_callback = NULL; ++ ++ return deferred_message; ++} ++ ++BusDeferredMessage * ++bus_deferred_message_ref (BusDeferredMessage *deferred_message) ++{ ++ _dbus_assert (deferred_message->refcount > 0); ++ deferred_message->refcount += 1; ++ return deferred_message; ++} ++ ++void ++bus_deferred_message_unref (BusDeferredMessage *deferred_message) ++{ ++ _dbus_assert (deferred_message->refcount > 0); ++ ++ deferred_message->refcount -= 1; ++ ++ if (deferred_message->refcount == 0) ++ { ++ dbus_message_unref(deferred_message->message); ++ if (deferred_message->sender != NULL) ++ dbus_connection_unref(deferred_message->sender); ++ if (deferred_message->addressed_recipient != NULL) ++ dbus_connection_unref(deferred_message->addressed_recipient); ++ if (deferred_message->proposed_recipient != NULL) ++ dbus_connection_unref(deferred_message->proposed_recipient); ++ dbus_free(deferred_message); ++ } ++} ++ ++void ++bus_deferred_message_response_received (BusDeferredMessage *deferred_message, ++ BusResult result) ++{ ++ if (deferred_message->response_callback != NULL) ++ { ++ deferred_message->response_callback(deferred_message, result); ++ } ++} +diff --git a/bus/check.h b/bus/check.h +new file mode 100644 +index 0000000..c3fcaf9 +--- /dev/null ++++ b/bus/check.h +@@ -0,0 +1,68 @@ ++/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ ++/* check.h Bus security policy runtime check ++ * ++ * Copyright (C) 2014 Intel, Inc. ++ * Copyright (c) 2014 Samsung Electronics, Ltd. ++ * ++ * Licensed under the Academic Free License version 2.1 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#ifndef BUS_CHECK_H ++#define BUS_CHECK_H ++ ++#include "bus.h" ++#include "policy.h" ++ ++ ++typedef void (*BusCheckResponseFunc) (BusDeferredMessage *message, ++ BusResult result); ++ ++typedef enum { ++ BUS_DEFERRED_MESSAGE_CHECK_SEND = 1 << 0, ++ BUS_DEFERRED_MESSAGE_CHECK_RECEIVE = 1 << 1, ++ BUS_DEFERRED_MESSAGE_CHECK_OWN = 1 << 2, ++} BusDeferredMessageStatus; ++ ++ ++BusCheck *bus_check_new (BusContext *context, ++ DBusError *error); ++BusCheck *bus_check_ref (BusCheck *check); ++void bus_check_unref (BusCheck *check); ++ ++BusContext *bus_check_get_context (BusCheck *check); ++BusCynara *bus_check_get_cynara (BusCheck *check); ++BusResult bus_check_privilege (BusCheck *check, ++ DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusConnection *proposed_recipient, ++ const char *privilege, ++ BusDeferredMessageStatus check_type, ++ BusDeferredMessage **deferred_message); ++ ++BusDeferredMessage *bus_deferred_message_new (DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusConnection *proposed_recipient, ++ BusResult response); ++ ++BusDeferredMessage *bus_deferred_message_ref (BusDeferredMessage *deferred_message); ++void bus_deferred_message_unref (BusDeferredMessage *deferred_message); ++void bus_deferred_message_response_received (BusDeferredMessage *deferred_message, ++ BusResult result); ++#endif /* BUS_CHECK_H */ +diff --git a/bus/config-parser-common.c b/bus/config-parser-common.c +index c1c4191..e2f253d 100644 +--- a/bus/config-parser-common.c ++++ b/bus/config-parser-common.c +@@ -75,6 +75,10 @@ bus_config_parser_element_name_to_type (const char *name) + { + return ELEMENT_DENY; + } ++ else if (strcmp (name, "check") == 0) ++ { ++ return ELEMENT_CHECK; ++ } + else if (strcmp (name, "servicehelper") == 0) + { + return ELEMENT_SERVICEHELPER; +@@ -159,6 +163,8 @@ bus_config_parser_element_type_to_name (ElementType type) + return "allow"; + case ELEMENT_DENY: + return "deny"; ++ case ELEMENT_CHECK: ++ return "check"; + case ELEMENT_FORK: + return "fork"; + case ELEMENT_PIDFILE: +diff --git a/bus/config-parser-common.h b/bus/config-parser-common.h +index 382a014..9e026d1 100644 +--- a/bus/config-parser-common.h ++++ b/bus/config-parser-common.h +@@ -36,6 +36,7 @@ typedef enum + ELEMENT_LIMIT, + ELEMENT_ALLOW, + ELEMENT_DENY, ++ ELEMENT_CHECK, + ELEMENT_FORK, + ELEMENT_PIDFILE, + ELEMENT_SERVICEDIR, +diff --git a/bus/config-parser.c b/bus/config-parser.c +index be27d38..b5f1dd1 100644 +--- a/bus/config-parser.c ++++ b/bus/config-parser.c +@@ -1318,7 +1318,7 @@ append_rule_from_element (BusConfigParser *parser, + const char *element_name, + const char **attribute_names, + const char **attribute_values, +- dbus_bool_t allow, ++ BusPolicyRuleAccess access, + DBusError *error) + { + const char *log; +@@ -1360,6 +1360,7 @@ append_rule_from_element (BusConfigParser *parser, + const char *own_prefix; + const char *user; + const char *group; ++ const char *privilege; + + BusPolicyRule *rule; + +@@ -1390,6 +1391,7 @@ append_rule_from_element (BusConfigParser *parser, + "user", &user, + "group", &group, + "log", &log, ++ "privilege", &privilege, + NULL)) + return FALSE; + +@@ -1422,6 +1424,7 @@ append_rule_from_element (BusConfigParser *parser, + + if (!(any_send_attribute || + any_receive_attribute || ++ privilege || + own || own_prefix || user || group)) + { + dbus_set_error (error, DBUS_ERROR_FAILED, +@@ -1438,7 +1441,30 @@ append_rule_from_element (BusConfigParser *parser, + element_name); + return FALSE; + } +- ++ ++ if (access == BUS_POLICY_RULE_ACCESS_CHECK) ++ { ++ if (privilege == NULL || !*privilege) ++ { ++ dbus_set_error (error, DBUS_ERROR_FAILED, ++ "On element <%s>, you must specify the privilege to be checked.", ++ element_name); ++ return FALSE; ++ } ++ } ++ else ++ { ++ if (privilege != NULL && *privilege) ++ { ++ dbus_set_error (error, DBUS_ERROR_FAILED, ++ "On element <%s>, privilege %s is used outside of a check rule.", ++ element_name, privilege); ++ return FALSE; ++ } ++ else ++ privilege = NULL; /* replace (potentially) empty string with NULL pointer, it wouldn't be used anyway */ ++ } ++ + /* Allowed combinations of elements are: + * + * base, must be all send or all receive: +@@ -1589,7 +1615,7 @@ append_rule_from_element (BusConfigParser *parser, + error)) + return FALSE; + +- rule = bus_policy_rule_new (BUS_POLICY_RULE_SEND, allow); ++ rule = bus_policy_rule_new (BUS_POLICY_RULE_SEND, access); + if (rule == NULL) + goto nomem; + +@@ -1694,7 +1720,7 @@ append_rule_from_element (BusConfigParser *parser, + error)) + return FALSE; + +- rule = bus_policy_rule_new (BUS_POLICY_RULE_RECEIVE, allow); ++ rule = bus_policy_rule_new (BUS_POLICY_RULE_RECEIVE, access); + if (rule == NULL) + goto nomem; + +@@ -1726,7 +1752,7 @@ append_rule_from_element (BusConfigParser *parser, + } + else if (own || own_prefix) + { +- rule = bus_policy_rule_new (BUS_POLICY_RULE_OWN, allow); ++ rule = bus_policy_rule_new (BUS_POLICY_RULE_OWN, access); + if (rule == NULL) + goto nomem; + +@@ -1752,7 +1778,7 @@ append_rule_from_element (BusConfigParser *parser, + { + if (IS_WILDCARD (user)) + { +- rule = bus_policy_rule_new (BUS_POLICY_RULE_USER, allow); ++ rule = bus_policy_rule_new (BUS_POLICY_RULE_USER, access); + if (rule == NULL) + goto nomem; + +@@ -1767,7 +1793,7 @@ append_rule_from_element (BusConfigParser *parser, + + if (_dbus_parse_unix_user_from_config (&username, &uid)) + { +- rule = bus_policy_rule_new (BUS_POLICY_RULE_USER, allow); ++ rule = bus_policy_rule_new (BUS_POLICY_RULE_USER, access); + if (rule == NULL) + goto nomem; + +@@ -1784,7 +1810,7 @@ append_rule_from_element (BusConfigParser *parser, + { + if (IS_WILDCARD (group)) + { +- rule = bus_policy_rule_new (BUS_POLICY_RULE_GROUP, allow); ++ rule = bus_policy_rule_new (BUS_POLICY_RULE_GROUP, access); + if (rule == NULL) + goto nomem; + +@@ -1799,7 +1825,7 @@ append_rule_from_element (BusConfigParser *parser, + + if (_dbus_parse_unix_group_from_config (&groupname, &gid)) + { +- rule = bus_policy_rule_new (BUS_POLICY_RULE_GROUP, allow); ++ rule = bus_policy_rule_new (BUS_POLICY_RULE_GROUP, access); + if (rule == NULL) + goto nomem; + +@@ -1823,6 +1849,10 @@ append_rule_from_element (BusConfigParser *parser, + _dbus_assert (pe != NULL); + _dbus_assert (pe->type == ELEMENT_POLICY); + ++ rule->privilege = _dbus_strdup (privilege); ++ if (privilege && !rule->privilege) ++ goto nomem; ++ + switch (pe->d.policy.type) + { + case POLICY_IGNORED: +@@ -1898,7 +1928,7 @@ start_policy_child (BusConfigParser *parser, + { + if (!append_rule_from_element (parser, element_name, + attribute_names, attribute_values, +- TRUE, error)) ++ BUS_POLICY_RULE_ACCESS_ALLOW, error)) + return FALSE; + + if (push_element (parser, ELEMENT_ALLOW) == NULL) +@@ -1913,7 +1943,7 @@ start_policy_child (BusConfigParser *parser, + { + if (!append_rule_from_element (parser, element_name, + attribute_names, attribute_values, +- FALSE, error)) ++ BUS_POLICY_RULE_ACCESS_DENY, error)) + return FALSE; + + if (push_element (parser, ELEMENT_DENY) == NULL) +@@ -1922,6 +1952,21 @@ start_policy_child (BusConfigParser *parser, + return FALSE; + } + ++ return TRUE; ++ } ++ else if (strcmp (element_name, "check") == 0) ++ { ++ if (!append_rule_from_element (parser, element_name, ++ attribute_names, attribute_values, ++ BUS_POLICY_RULE_ACCESS_CHECK, error)) ++ return FALSE; ++ ++ if (push_element (parser, ELEMENT_CHECK) == NULL) ++ { ++ BUS_SET_OOM (error); ++ return FALSE; ++ } ++ + return TRUE; + } + else +@@ -2284,6 +2329,7 @@ bus_config_parser_end_element (BusConfigParser *parser, + case ELEMENT_POLICY: + case ELEMENT_ALLOW: + case ELEMENT_DENY: ++ case ELEMENT_CHECK: + case ELEMENT_FORK: + case ELEMENT_SYSLOG: + case ELEMENT_KEEP_UMASK: +@@ -2600,6 +2646,7 @@ bus_config_parser_content (BusConfigParser *parser, + case ELEMENT_POLICY: + case ELEMENT_ALLOW: + case ELEMENT_DENY: ++ case ELEMENT_CHECK: + case ELEMENT_FORK: + case ELEMENT_SYSLOG: + case ELEMENT_KEEP_UMASK: +@@ -3127,6 +3174,8 @@ do_load (const DBusString *full_path, + dbus_error_init (&error); + + parser = bus_config_load (full_path, TRUE, NULL, &error); ++ if (dbus_error_is_set (&error)) ++ _dbus_verbose ("Failed to load file: %s\n", error.message); + if (parser == NULL) + { + _DBUS_ASSERT_ERROR_IS_SET (&error); +diff --git a/bus/connection.c b/bus/connection.c +index 53605fa..b348d42 100644 +--- a/bus/connection.c ++++ b/bus/connection.c +@@ -36,6 +36,10 @@ + #include + #include + #include ++#ifdef DBUS_ENABLE_CYNARA ++#include ++#include ++#endif + + /* Trim executed commands to this length; we want to keep logs readable */ + #define MAX_LOG_COMMAND_LEN 50 +@@ -116,6 +120,9 @@ typedef struct + + /** non-NULL if and only if this is a monitor */ + DBusList *link_in_monitors; ++#ifdef DBUS_ENABLE_CYNARA ++ char *cynara_session_id; ++#endif + } BusConnectionData; + + static dbus_bool_t bus_pending_reply_expired (BusExpireList *list, +@@ -129,8 +136,8 @@ static dbus_bool_t expire_incomplete_timeout (void *data); + + #define BUS_CONNECTION_DATA(connection) (dbus_connection_get_data ((connection), connection_data_slot)) + +-static DBusLoop* +-connection_get_loop (DBusConnection *connection) ++DBusLoop* ++bus_connection_get_loop (DBusConnection *connection) + { + BusConnectionData *d; + +@@ -354,7 +361,7 @@ add_connection_watch (DBusWatch *watch, + { + DBusConnection *connection = data; + +- return _dbus_loop_add_watch (connection_get_loop (connection), watch); ++ return _dbus_loop_add_watch (bus_connection_get_loop (connection), watch); + } + + static void +@@ -363,7 +370,7 @@ remove_connection_watch (DBusWatch *watch, + { + DBusConnection *connection = data; + +- _dbus_loop_remove_watch (connection_get_loop (connection), watch); ++ _dbus_loop_remove_watch (bus_connection_get_loop (connection), watch); + } + + static void +@@ -372,7 +379,7 @@ toggle_connection_watch (DBusWatch *watch, + { + DBusConnection *connection = data; + +- _dbus_loop_toggle_watch (connection_get_loop (connection), watch); ++ _dbus_loop_toggle_watch (bus_connection_get_loop (connection), watch); + } + + static dbus_bool_t +@@ -381,7 +388,7 @@ add_connection_timeout (DBusTimeout *timeout, + { + DBusConnection *connection = data; + +- return _dbus_loop_add_timeout (connection_get_loop (connection), timeout); ++ return _dbus_loop_add_timeout (bus_connection_get_loop (connection), timeout); + } + + static void +@@ -390,7 +397,7 @@ remove_connection_timeout (DBusTimeout *timeout, + { + DBusConnection *connection = data; + +- _dbus_loop_remove_timeout (connection_get_loop (connection), timeout); ++ _dbus_loop_remove_timeout (bus_connection_get_loop (connection), timeout); + } + + static void +@@ -448,6 +455,10 @@ free_connection_data (void *data) + + dbus_free (d->name); + ++#ifdef DBUS_ENABLE_CYNARA ++ free (d->cynara_session_id); ++#endif ++ + dbus_free (d); + } + +@@ -1078,6 +1089,22 @@ bus_connection_get_policy (DBusConnection *connection) + return d->policy; + } + ++#ifdef DBUS_ENABLE_CYNARA ++const char *bus_connection_get_cynara_session_id (DBusConnection *connection) ++{ ++ BusConnectionData *d = BUS_CONNECTION_DATA (connection); ++ _dbus_assert (d != NULL); ++ ++ if (d->cynara_session_id == NULL) ++ { ++ unsigned long pid; ++ if (dbus_connection_get_unix_process_id(connection, &pid)) ++ d->cynara_session_id = cynara_session_from_pid(pid); ++ } ++ return d->cynara_session_id; ++} ++#endif ++ + static dbus_bool_t + foreach_active (BusConnections *connections, + BusConnectionForeachFunction function, +@@ -2333,6 +2360,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction, + DBusMessage *message) + { + DBusError error = DBUS_ERROR_INIT; ++ BusResult res; + + /* We have to set the sender to the driver, and have + * to check security policy since it was not done in +@@ -2370,10 +2398,11 @@ bus_transaction_send_from_driver (BusTransaction *transaction, + * if we're actively capturing messages, it's nice to log that we + * tried to send it and did not allow ourselves to do so. + */ +- if (!bus_context_check_security_policy (bus_transaction_get_context (transaction), +- transaction, +- NULL, connection, connection, +- message, NULL, &error)) ++ res = bus_context_check_security_policy (bus_transaction_get_context (transaction), ++ transaction, ++ NULL, connection, connection, message, NULL, ++ &error, NULL); ++ if (res == BUS_RESULT_FALSE) + { + if (!bus_transaction_capture_error_reply (transaction, connection, + &error, message)) +@@ -2388,6 +2417,12 @@ bus_transaction_send_from_driver (BusTransaction *transaction, + dbus_error_free (&error); + return TRUE; + } ++ else if (res == BUS_RESULT_LATER) ++ { ++ _dbus_verbose ("Cannot delay sending message from bus driver, dropping it\n"); ++ dbus_error_free (&error); ++ return TRUE; ++ } + + return bus_transaction_send (transaction, connection, message); + } +diff --git a/bus/connection.h b/bus/connection.h +index 9e253ae..71078ea 100644 +--- a/bus/connection.h ++++ b/bus/connection.h +@@ -31,6 +31,7 @@ + typedef dbus_bool_t (* BusConnectionForeachFunction) (DBusConnection *connection, + void *data); + ++DBusLoop* bus_connection_get_loop (DBusConnection *connection); + + BusConnections* bus_connections_new (BusContext *context); + BusConnections* bus_connections_ref (BusConnections *connections); +@@ -124,6 +125,9 @@ dbus_bool_t bus_connection_be_monitor (DBusConnection *connection, + BusTransaction *transaction, + DBusList **rules, + DBusError *error); ++#ifdef DBUS_ENABLE_CYNARA ++const char *bus_connection_get_cynara_session_id (DBusConnection *connection); ++#endif + + /* transaction API so we can send or not send a block of messages as a whole */ + +diff --git a/bus/cynara.c b/bus/cynara.c +new file mode 100644 +index 0000000..57a4c45 +--- /dev/null ++++ b/bus/cynara.c +@@ -0,0 +1,374 @@ ++/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ ++/* cynara.c Cynara runtime privilege checking ++ * ++ * Copyright (c) 2014 Samsung Electronics, Ltd. ++ * ++ * Licensed under the Academic Free License version 2.1 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include "cynara.h" ++#include "check.h" ++#include "utils.h" ++ ++#include ++ ++#include ++#include ++#include ++#include ++#ifdef DBUS_ENABLE_CYNARA ++#include ++#endif ++ ++ ++#ifdef DBUS_ENABLE_CYNARA ++typedef struct BusCynara ++{ ++ int refcount; ++ ++ BusContext *context; ++ BusCheck *check; ++ cynara_async *cynara; ++ DBusWatch *cynara_watch; ++} BusCynara; ++ ++#define USE_CYNARA_CACHE 1 ++#ifdef USE_CYNARA_CACHE ++#define CYNARA_CACHE_SIZE 1000 ++#endif ++ ++static dbus_bool_t bus_cynara_watch_callback(DBusWatch *watch, ++ unsigned int flags, ++ void *data); ++ ++static void status_callback(int old_fd, ++ int new_fd, ++ cynara_async_status status, ++ void *user_status_data); ++static void bus_cynara_check_response_callback (cynara_check_id check_id, ++ cynara_async_call_cause cause, ++ int response, ++ void *user_response_data); ++#endif ++ ++ ++BusCynara * ++bus_cynara_new(BusCheck *check, DBusError *error) ++{ ++#ifdef DBUS_ENABLE_CYNARA ++ BusContext *context; ++ BusCynara *cynara; ++ cynara_async_configuration *conf = NULL; ++ int ret; ++ ++ cynara = dbus_new(BusCynara, 1); ++ if (cynara == NULL) ++ { ++ BUS_SET_OOM(error); ++ return NULL; ++ } ++ ++ context = bus_check_get_context(check); ++ ++ cynara->refcount = 1; ++ cynara->check = check; ++ cynara->context = context; ++ cynara->cynara_watch = NULL; ++ ++ ret = cynara_async_configuration_create(&conf); ++ if (ret != CYNARA_API_SUCCESS) ++ { ++ dbus_set_error (error, DBUS_ERROR_FAILED, "Failed to create Cynara configuration"); ++ goto out; ++ } ++ ++#ifdef CYNARA_CACHE_SIZE ++ ret = cynara_async_configuration_set_cache_size(conf, CYNARA_CACHE_SIZE); ++ if (ret != CYNARA_API_SUCCESS) ++ { ++ dbus_set_error (error, DBUS_ERROR_FAILED, "Failed to Cynara cache size"); ++ goto out; ++ } ++#endif ++ ++ ret = cynara_async_initialize(&cynara->cynara, conf, &status_callback, cynara); ++ if (ret != CYNARA_API_SUCCESS) ++ { ++ dbus_set_error (error, DBUS_ERROR_FAILED, "Failed to initialize Cynara client"); ++ goto out; ++ } ++ ++out: ++ cynara_async_configuration_destroy(conf); ++ if (ret != CYNARA_API_SUCCESS) ++ { ++ dbus_free(cynara); ++ return NULL; ++ } ++ ++ return cynara; ++#else ++ return NULL; ++#endif ++} ++ ++BusCynara * ++bus_cynara_ref (BusCynara *cynara) ++{ ++#ifdef DBUS_ENABLE_CYNARA ++ _dbus_assert (cynara->refcount > 0); ++ cynara->refcount += 1; ++ ++ return cynara; ++#else ++ return NULL; ++#endif ++} ++ ++void ++bus_cynara_unref (BusCynara *cynara) ++{ ++#ifdef DBUS_ENABLE_CYNARA ++ _dbus_assert (cynara->refcount > 0); ++ ++ cynara->refcount -= 1; ++ ++ if (cynara->refcount == 0) ++ { ++ cynara_async_finish(cynara->cynara); ++ dbus_free(cynara); ++ } ++#endif ++} ++ ++BusResult ++bus_cynara_check_privilege (BusCynara *cynara, ++ DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusConnection *proposed_recipient, ++ const char *privilege, ++ BusDeferredMessageStatus check_type, ++ BusDeferredMessage **deferred_message_param) ++{ ++#ifdef DBUS_ENABLE_CYNARA ++ int result; ++ unsigned long uid; ++ char *label; ++ const char *session_id; ++ char user[32]; ++ cynara_check_id check_id; ++ DBusConnection *connection = check_type == BUS_DEFERRED_MESSAGE_CHECK_RECEIVE ? proposed_recipient : sender; ++ BusDeferredMessage *deferred_message; ++ BusResult ret; ++ ++ _dbus_assert(connection != NULL); ++ ++ if (dbus_connection_get_unix_user(connection, &uid) == FALSE) ++ return BUS_RESULT_FALSE; ++ ++ if (_dbus_connection_get_linux_security_label(connection, &label) == FALSE || label == NULL) ++ { ++ _dbus_warn("Failed to obtain security label for connection\n"); ++ return BUS_RESULT_FALSE; ++ } ++ ++ session_id = bus_connection_get_cynara_session_id (connection); ++ if (session_id == NULL) ++ { ++ ret = BUS_RESULT_FALSE; ++ goto out; ++ } ++ ++ snprintf(user, sizeof(user), "%lu", uid); ++ ++#if USE_CYNARA_CACHE ++ result = cynara_async_check_cache(cynara->cynara, label, session_id, user, privilege); ++#else ++ result = CYNARA_API_CACHE_MISS; ++#endif ++ ++ switch (result) ++ { ++ case CYNARA_API_ACCESS_ALLOWED: ++ _dbus_verbose("Cynara: got ALLOWED answer from cache (client=%s session_id=%s user=%s privilege=%s)\n", ++ label, session_id, user, privilege); ++ ret = BUS_RESULT_TRUE; ++ break; ++ ++ case CYNARA_API_ACCESS_DENIED: ++ _dbus_verbose("Cynara: got DENIED answer from cache (client=%s session_id=%s user=%s privilege=%s)\n", ++ label, session_id, user, privilege); ++ ret = BUS_RESULT_FALSE; ++ break; ++ ++ case CYNARA_API_CACHE_MISS: ++ deferred_message = bus_deferred_message_new(message, sender, addressed_recipient, ++ proposed_recipient, BUS_RESULT_LATER); ++ if (deferred_message == NULL) ++ { ++ _dbus_verbose("Failed to allocate memory for deferred message\n"); ++ ret = BUS_RESULT_FALSE; ++ goto out; ++ } ++ ++ /* callback is supposed to unref deferred_message*/ ++ result = cynara_async_create_request(cynara->cynara, label, session_id, user, privilege, &check_id, ++ &bus_cynara_check_response_callback, deferred_message); ++ if (result == CYNARA_API_SUCCESS) ++ { ++ _dbus_verbose("Created Cynara request: client=%s session_id=%s user=%s privilege=%s check_id=%u " ++ "deferred_message=%p\n", label, session_id, user, privilege, (unsigned int)check_id, deferred_message); ++ if (deferred_message_param != NULL) ++ *deferred_message_param = deferred_message; ++ ret = BUS_RESULT_LATER; ++ } ++ else ++ { ++ _dbus_verbose("Error on cynara request create: %i\n", result); ++ bus_deferred_message_unref(deferred_message); ++ ret = BUS_RESULT_FALSE; ++ } ++ break; ++ default: ++ _dbus_verbose("Error when accessing Cynara cache: %i\n", result); ++ ret = BUS_RESULT_FALSE; ++ } ++out: ++ dbus_free(label); ++ return ret; ++ ++#else ++ return BUS_RESULT_FALSE; ++#endif ++} ++ ++ ++ ++#ifdef DBUS_ENABLE_CYNARA ++static void ++status_callback(int old_fd, int new_fd, cynara_async_status status, ++ void *user_status_data) ++{ ++ BusCynara *cynara = (BusCynara *)user_status_data; ++ DBusLoop *loop = bus_context_get_loop(cynara->context); ++ ++ if (cynara->cynara_watch != NULL) ++ { ++ _dbus_loop_remove_watch(loop, cynara->cynara_watch); ++ _dbus_watch_invalidate(cynara->cynara_watch); ++ _dbus_watch_unref(cynara->cynara_watch); ++ cynara->cynara_watch = NULL; ++ } ++ ++ if (new_fd != -1) ++ { ++ unsigned int flags; ++ DBusWatch *watch; ++ ++ switch (status) ++ { ++ case CYNARA_STATUS_FOR_READ: ++ flags = DBUS_WATCH_READABLE; ++ break; ++ case CYNARA_STATUS_FOR_RW: ++ flags = DBUS_WATCH_READABLE | DBUS_WATCH_WRITABLE; ++ break; ++ default: ++ /* Cynara passed unknown status - warn and add RW watch */ ++ _dbus_verbose("Cynara passed unknown status value: 0x%08X\n", (unsigned int)status); ++ flags = DBUS_WATCH_READABLE | DBUS_WATCH_WRITABLE; ++ break; ++ } ++ ++ watch = _dbus_watch_new(new_fd, flags, TRUE, &bus_cynara_watch_callback, cynara, NULL); ++ if (watch != NULL) ++ { ++ if (_dbus_loop_add_watch(loop, watch) == TRUE) ++ { ++ cynara->cynara_watch = watch; ++ return; ++ } ++ ++ _dbus_watch_invalidate(watch); ++ _dbus_watch_unref(watch); ++ } ++ ++ /* It seems like not much can be done at this point. Cynara events won't be processed ++ * until next Cynara function call triggering status callback */ ++ _dbus_verbose("Failed to add dbus watch\n"); ++ } ++} ++ ++static dbus_bool_t ++bus_cynara_watch_callback(DBusWatch *watch, ++ unsigned int flags, ++ void *data) ++{ ++ BusCynara *cynara = (BusCynara *)data; ++ int result = cynara_async_process(cynara->cynara); ++ if (result != CYNARA_API_SUCCESS) ++ _dbus_verbose("cynara_async_process returned %d\n", result); ++ ++ return result != CYNARA_API_OUT_OF_MEMORY ? TRUE : FALSE; ++} ++ ++static inline const char * ++call_cause_to_string(cynara_async_call_cause cause) ++{ ++ switch (cause) ++ { ++ case CYNARA_CALL_CAUSE_ANSWER: ++ return "ANSWER"; ++ case CYNARA_CALL_CAUSE_CANCEL: ++ return "CANCEL"; ++ case CYNARA_CALL_CAUSE_FINISH: ++ return "FINSIH"; ++ case CYNARA_CALL_CAUSE_SERVICE_NOT_AVAILABLE: ++ return "SERVICE NOT AVAILABLE"; ++ default: ++ return "INVALID"; ++ } ++} ++ ++static void ++bus_cynara_check_response_callback (cynara_check_id check_id, ++ cynara_async_call_cause cause, ++ int response, ++ void *user_response_data) ++{ ++ BusDeferredMessage *deferred_message = user_response_data; ++ BusResult result; ++ ++ _dbus_verbose("Cynara callback: check_id=%u, cause=%s response=%i response_data=%p\n", ++ (unsigned int)check_id, call_cause_to_string(cause), response, user_response_data); ++ ++ if (deferred_message == NULL) ++ return; ++ ++ if (cause == CYNARA_CALL_CAUSE_ANSWER && response == CYNARA_API_ACCESS_ALLOWED) ++ result = BUS_RESULT_TRUE; ++ else ++ result = BUS_RESULT_FALSE; ++ ++ bus_deferred_message_response_received(deferred_message, result); ++ bus_deferred_message_unref(deferred_message); ++} ++ ++#endif /* DBUS_ENABLE_CYNARA */ +diff --git a/bus/cynara.h b/bus/cynara.h +new file mode 100644 +index 0000000..c4728bb +--- /dev/null ++++ b/bus/cynara.h +@@ -0,0 +1,37 @@ ++/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ ++/* cynara.h Cynara runtime privilege checking ++ * ++ * Copyright (c) 2014 Samsung Electronics, Ltd. ++ * ++ * Licensed under the Academic Free License version 2.1 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include "bus.h" ++#include "check.h" ++ ++BusCynara *bus_cynara_new (BusCheck *check, DBusError *error); ++BusCynara *bus_cynara_ref (BusCynara *cynara); ++void bus_cynara_unref (BusCynara *cynara); ++BusResult bus_cynara_check_privilege (BusCynara *cynara, ++ DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusConnection *proposed_recipient, ++ const char *privilege, ++ BusDeferredMessageStatus check_type, ++ BusDeferredMessage **deferred_message); +diff --git a/bus/dispatch.c b/bus/dispatch.c +index 19228be..d3867f7 100644 +--- a/bus/dispatch.c ++++ b/bus/dispatch.c +@@ -25,6 +25,7 @@ + + #include + #include "dispatch.h" ++#include "check.h" + #include "connection.h" + #include "driver.h" + #include "services.h" +@@ -64,14 +65,18 @@ send_one_message (DBusConnection *connection, + DBusError *error) + { + DBusError stack_error = DBUS_ERROR_INIT; ++ BusDeferredMessage *deferred_message; ++ BusResult result; + +- if (!bus_context_check_security_policy (context, transaction, ++ result = bus_context_check_security_policy (context, transaction, + sender, + addressed_recipient, + connection, + message, + NULL, +- &stack_error)) ++ &stack_error, ++ &deferred_message); ++ if (result != BUS_RESULT_TRUE) + { + if (!bus_transaction_capture_error_reply (transaction, sender, + &stack_error, message)) +@@ -130,6 +135,8 @@ bus_dispatch_matches (BusTransaction *transaction, + BusMatchmaker *matchmaker; + DBusList *link; + BusContext *context; ++ BusDeferredMessage *deferred_message; ++ BusResult res; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + +@@ -145,11 +152,20 @@ bus_dispatch_matches (BusTransaction *transaction, + /* First, send the message to the addressed_recipient, if there is one. */ + if (addressed_recipient != NULL) + { +- if (!bus_context_check_security_policy (context, transaction, +- sender, addressed_recipient, +- addressed_recipient, +- message, NULL, error)) ++ res = bus_context_check_security_policy (context, transaction, ++ sender, addressed_recipient, ++ addressed_recipient, ++ message, NULL, error, ++ &deferred_message); ++ if (res == BUS_RESULT_FALSE) + return FALSE; ++ else if (res == BUS_RESULT_LATER) ++ { ++ dbus_set_error (error, ++ DBUS_ERROR_ACCESS_DENIED, ++ "Rejecting message because time is needed to check security policy"); ++ return FALSE; ++ } + + if (dbus_message_contains_unix_fds (message) && + !dbus_connection_can_send_type (addressed_recipient, +@@ -374,19 +390,31 @@ bus_dispatch (DBusConnection *connection, + if (service_name && + strcmp (service_name, DBUS_SERVICE_DBUS) == 0) /* to bus driver */ + { ++ BusDeferredMessage *deferred_message; ++ BusResult res; ++ + if (!bus_transaction_capture (transaction, connection, NULL, message)) + { + BUS_SET_OOM (&error); + goto out; + } + +- if (!bus_context_check_security_policy (context, transaction, +- connection, NULL, NULL, message, +- NULL, &error)) ++ res = bus_context_check_security_policy (context, transaction, ++ connection, NULL, NULL, message, NULL, ++ &error, &deferred_message); ++ if (res == BUS_RESULT_FALSE) + { + _dbus_verbose ("Security policy rejected message\n"); + goto out; + } ++ else if (res == BUS_RESULT_LATER) ++ { ++ dbus_set_error (&error, ++ DBUS_ERROR_ACCESS_DENIED, ++ "Rejecting message because time is needed to check security policy"); ++ _dbus_verbose ("Security policy needs time to check policy. Dropping message\n"); ++ goto out; ++ } + + _dbus_verbose ("Giving message to %s\n", DBUS_SERVICE_DBUS); + if (!bus_driver_handle_message (connection, transaction, message, &error)) +diff --git a/bus/policy.c b/bus/policy.c +index a37be80..7ee1ce5 100644 +--- a/bus/policy.c ++++ b/bus/policy.c +@@ -22,6 +22,7 @@ + */ + + #include ++#include "check.h" + #include "policy.h" + #include "services.h" + #include "test.h" +@@ -33,7 +34,7 @@ + + BusPolicyRule* + bus_policy_rule_new (BusPolicyRuleType type, +- dbus_bool_t allow) ++ BusPolicyRuleAccess access) + { + BusPolicyRule *rule; + +@@ -43,7 +44,7 @@ bus_policy_rule_new (BusPolicyRuleType type, + + rule->type = type; + rule->refcount = 1; +- rule->allow = allow; ++ rule->access = access; + + switch (rule->type) + { +@@ -55,18 +56,19 @@ bus_policy_rule_new (BusPolicyRuleType type, + break; + case BUS_POLICY_RULE_SEND: + rule->d.send.message_type = DBUS_MESSAGE_TYPE_INVALID; +- + /* allow rules default to TRUE (only requested replies allowed) ++ * check rules default to TRUE (only requested replies are checked) + * deny rules default to FALSE (only unrequested replies denied) + */ +- rule->d.send.requested_reply = rule->allow; ++ rule->d.send.requested_reply = rule->access != BUS_POLICY_RULE_ACCESS_DENY; + break; + case BUS_POLICY_RULE_RECEIVE: + rule->d.receive.message_type = DBUS_MESSAGE_TYPE_INVALID; + /* allow rules default to TRUE (only requested replies allowed) ++ * check rules default to TRUE (only requested replies are checked) + * deny rules default to FALSE (only unrequested replies denied) + */ +- rule->d.receive.requested_reply = rule->allow; ++ rule->d.receive.requested_reply = rule->access != BUS_POLICY_RULE_ACCESS_DENY; + break; + case BUS_POLICY_RULE_OWN: + break; +@@ -122,7 +124,8 @@ bus_policy_rule_unref (BusPolicyRule *rule) + default: + _dbus_assert_not_reached ("invalid rule"); + } +- ++ ++ dbus_free (rule->privilege); + dbus_free (rule); + } + } +@@ -435,7 +438,10 @@ list_allows_user (dbus_bool_t def, + else + continue; + +- allowed = rule->allow; ++ /* We don't intend to support and ++ rules. They are treated like deny. ++ */ ++ allowed = rule->access == BUS_POLICY_RULE_ACCESS_ALLOW; + } + + return allowed; +@@ -873,18 +879,23 @@ bus_client_policy_append_rule (BusClientPolicy *policy, + return TRUE; + } + +-dbus_bool_t +-bus_client_policy_check_can_send (BusClientPolicy *policy, +- BusRegistry *registry, +- dbus_bool_t requested_reply, +- DBusConnection *receiver, +- DBusMessage *message, +- dbus_int32_t *toggles, +- dbus_bool_t *log) ++BusResult ++bus_client_policy_check_can_send (DBusConnection *sender, ++ BusClientPolicy *policy, ++ BusRegistry *registry, ++ dbus_bool_t requested_reply, ++ DBusConnection *addressed_recipient, ++ DBusConnection *receiver, ++ DBusMessage *message, ++ dbus_int32_t *toggles, ++ dbus_bool_t *log, ++ const char **privilege_param, ++ BusDeferredMessage **deferred_message) + { + DBusList *link; +- dbus_bool_t allowed; +- ++ BusResult result; ++ const char *privilege; ++ + /* policy->rules is in the order the rules appeared + * in the config file, i.e. last rule that applies wins + */ +@@ -892,7 +903,7 @@ bus_client_policy_check_can_send (BusClientPolicy *policy, + _dbus_verbose (" (policy) checking send rules\n"); + *toggles = 0; + +- allowed = FALSE; ++ result = BUS_RESULT_FALSE; + link = _dbus_list_get_first_link (&policy->rules); + while (link != NULL) + { +@@ -923,13 +934,14 @@ bus_client_policy_check_can_send (BusClientPolicy *policy, + /* If it's a reply, the requested_reply flag kicks in */ + if (dbus_message_get_reply_serial (message) != 0) + { +- /* for allow, requested_reply=true means the rule applies +- * only when reply was requested. requested_reply=false means +- * always allow. ++ /* for allow or check requested_reply=true means the rule applies ++ * only when reply was requested. requested_reply=false means the ++ * rule always applies + */ +- if (!requested_reply && rule->allow && rule->d.send.requested_reply && !rule->d.send.eavesdrop) ++ if (!requested_reply && rule->access != BUS_POLICY_RULE_ACCESS_DENY && rule->d.send.requested_reply && !rule->d.send.eavesdrop) + { +- _dbus_verbose (" (policy) skipping allow rule since it only applies to requested replies and does not allow eavesdropping\n"); ++ _dbus_verbose (" (policy) skipping %s rule since it only applies to requested replies and does not allow eavesdropping\n", ++ rule->access == BUS_POLICY_RULE_ACCESS_ALLOW ? "allow" : "check"); + continue; + } + +@@ -937,7 +949,7 @@ bus_client_policy_check_can_send (BusClientPolicy *policy, + * when the reply was not requested. requested_reply=true means the + * rule always applies. + */ +- if (requested_reply && !rule->allow && !rule->d.send.requested_reply) ++ if (requested_reply && rule->access == BUS_POLICY_RULE_ACCESS_DENY && !rule->d.send.requested_reply) + { + _dbus_verbose (" (policy) skipping deny rule since it only applies to unrequested replies\n"); + continue; +@@ -960,13 +972,15 @@ bus_client_policy_check_can_send (BusClientPolicy *policy, + /* The interface is optional in messages. For allow rules, if the message + * has no interface we want to skip the rule (and thus not allow); + * for deny rules, if the message has no interface we want to use the +- * rule (and thus deny). ++ * rule (and thus deny). Check rules are meant to be used like allow ++ * rules (they can grant access, but not remove it), so we treat it like ++ * allow here. + */ + dbus_bool_t no_interface; + + no_interface = dbus_message_get_interface (message) == NULL; + +- if ((no_interface && rule->allow) || ++ if ((no_interface && rule->access != BUS_POLICY_RULE_ACCESS_DENY) || + (!no_interface && + strcmp (dbus_message_get_interface (message), + rule->d.send.interface) != 0)) +@@ -1079,33 +1093,63 @@ bus_client_policy_check_can_send (BusClientPolicy *policy, + } + + /* Use this rule */ +- allowed = rule->allow; ++ switch (rule->access) ++ { ++ case BUS_POLICY_RULE_ACCESS_ALLOW: ++ result = BUS_RESULT_TRUE; ++ break; ++ case BUS_POLICY_RULE_ACCESS_DENY: ++ result = BUS_RESULT_FALSE; ++ break; ++ case BUS_POLICY_RULE_ACCESS_CHECK: ++ result = BUS_RESULT_LATER; ++ privilege = rule->privilege; ++ break; ++ } ++ + *log = rule->d.send.log; + (*toggles)++; + +- _dbus_verbose (" (policy) used rule, allow now = %d\n", +- allowed); ++ _dbus_verbose (" (policy) used rule, result now = %d\n", ++ (int)(intptr_t)result); + } + +- return allowed; ++ if (result == BUS_RESULT_LATER) ++ { ++ BusContext *context = bus_connection_get_context(sender); ++ BusCheck *check = bus_context_get_check(context); ++ ++ result = bus_check_privilege(check, message, sender, addressed_recipient, receiver, ++ privilege, BUS_DEFERRED_MESSAGE_CHECK_SEND, deferred_message); ++ } ++ else ++ privilege = NULL; ++ ++ if (privilege_param != NULL) ++ *privilege_param = privilege; ++ ++ return result; + } + + /* See docs on what the args mean on bus_context_check_security_policy() + * comment + */ +-dbus_bool_t +-bus_client_policy_check_can_receive (BusClientPolicy *policy, +- BusRegistry *registry, +- dbus_bool_t requested_reply, +- DBusConnection *sender, +- DBusConnection *addressed_recipient, +- DBusConnection *proposed_recipient, +- DBusMessage *message, +- dbus_int32_t *toggles) ++BusResult ++bus_client_policy_check_can_receive (BusClientPolicy *policy, ++ BusRegistry *registry, ++ dbus_bool_t requested_reply, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusConnection *proposed_recipient, ++ DBusMessage *message, ++ dbus_int32_t *toggles, ++ const char **privilege_param, ++ BusDeferredMessage **deferred_message) + { + DBusList *link; +- dbus_bool_t allowed; + dbus_bool_t eavesdropping; ++ BusResult result; ++ const char *privilege; + + eavesdropping = + addressed_recipient != proposed_recipient && +@@ -1118,7 +1162,7 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + _dbus_verbose (" (policy) checking receive rules, eavesdropping = %d\n", eavesdropping); + *toggles = 0; + +- allowed = FALSE; ++ result = BUS_RESULT_FALSE; + link = _dbus_list_get_first_link (&policy->rules); + while (link != NULL) + { +@@ -1141,19 +1185,21 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + } + } + +- /* for allow, eavesdrop=false means the rule doesn't apply when +- * eavesdropping. eavesdrop=true means always allow. ++ ++ /* for allow or check, eavesdrop=false means the rule doesn't apply when ++ * eavesdropping. eavesdrop=true means the rule always applies + */ +- if (eavesdropping && rule->allow && !rule->d.receive.eavesdrop) ++ if (eavesdropping && rule->access != BUS_POLICY_RULE_ACCESS_DENY && !rule->d.receive.eavesdrop) + { +- _dbus_verbose (" (policy) skipping allow rule since it doesn't apply to eavesdropping\n"); ++ _dbus_verbose (" (policy) skipping %s rule since it doesn't apply to eavesdropping\n", ++ rule->access == BUS_POLICY_RULE_ACCESS_ALLOW ? "allow" : "check"); + continue; + } + + /* for deny, eavesdrop=true means the rule applies only when + * eavesdropping; eavesdrop=false means always deny. + */ +- if (!eavesdropping && !rule->allow && rule->d.receive.eavesdrop) ++ if (!eavesdropping && rule->access == BUS_POLICY_RULE_ACCESS_DENY && rule->d.receive.eavesdrop) + { + _dbus_verbose (" (policy) skipping deny rule since it only applies to eavesdropping\n"); + continue; +@@ -1162,13 +1208,14 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + /* If it's a reply, the requested_reply flag kicks in */ + if (dbus_message_get_reply_serial (message) != 0) + { +- /* for allow, requested_reply=true means the rule applies +- * only when reply was requested. requested_reply=false means +- * always allow. ++ /* for allow or check requested_reply=true means the rule applies ++ * only when reply was requested. requested_reply=false means the ++ * rule always applies + */ +- if (!requested_reply && rule->allow && rule->d.receive.requested_reply && !rule->d.receive.eavesdrop) ++ if (!requested_reply && rule->access != BUS_POLICY_RULE_ACCESS_DENY && rule->d.send.requested_reply && !rule->d.send.eavesdrop) + { +- _dbus_verbose (" (policy) skipping allow rule since it only applies to requested replies and does not allow eavesdropping\n"); ++ _dbus_verbose (" (policy) skipping %s rule since it only applies to requested replies and does not allow eavesdropping\n", ++ rule->access == BUS_POLICY_RULE_ACCESS_DENY ? "allow" : "deny"); + continue; + } + +@@ -1176,7 +1223,7 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + * when the reply was not requested. requested_reply=true means the + * rule always applies. + */ +- if (requested_reply && !rule->allow && !rule->d.receive.requested_reply) ++ if (requested_reply && rule->access == BUS_POLICY_RULE_ACCESS_DENY && !rule->d.receive.requested_reply) + { + _dbus_verbose (" (policy) skipping deny rule since it only applies to unrequested replies\n"); + continue; +@@ -1199,13 +1246,13 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + /* The interface is optional in messages. For allow rules, if the message + * has no interface we want to skip the rule (and thus not allow); + * for deny rules, if the message has no interface we want to use the +- * rule (and thus deny). ++ * rule (and thus deny). Check rules are treated like allow rules. + */ + dbus_bool_t no_interface; + + no_interface = dbus_message_get_interface (message) == NULL; + +- if ((no_interface && rule->allow) || ++ if ((no_interface && rule->access != BUS_POLICY_RULE_ACCESS_DENY) || + (!no_interface && + strcmp (dbus_message_get_interface (message), + rule->d.receive.interface) != 0)) +@@ -1295,14 +1342,42 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + } + + /* Use this rule */ +- allowed = rule->allow; ++ switch (rule->access) ++ { ++ case BUS_POLICY_RULE_ACCESS_ALLOW: ++ result = BUS_RESULT_TRUE; ++ break; ++ case BUS_POLICY_RULE_ACCESS_DENY: ++ result = BUS_RESULT_FALSE; ++ break; ++ case BUS_POLICY_RULE_ACCESS_CHECK: ++ result = BUS_RESULT_LATER; ++ privilege = rule->privilege; ++ break; ++ } ++ + (*toggles)++; + +- _dbus_verbose (" (policy) used rule, allow now = %d\n", +- allowed); ++ _dbus_verbose (" (policy) used rule, result now = %d\n", ++ (int)(intptr_t)result); + } + +- return allowed; ++ ++ if (result == BUS_RESULT_LATER) ++ { ++ BusContext *context = bus_connection_get_context(proposed_recipient); ++ BusCheck *check = bus_context_get_check(context); ++ ++ result = bus_check_privilege(check, message, sender, addressed_recipient, proposed_recipient, ++ privilege, BUS_DEFERRED_MESSAGE_CHECK_RECEIVE, deferred_message); ++ } ++ else ++ privilege = NULL; ++ ++ if (privilege_param != NULL) ++ *privilege_param = privilege; ++ ++ return result; + } + + +@@ -1354,7 +1429,7 @@ bus_rules_check_can_own (DBusList *rules, + } + + /* Use this rule */ +- allowed = rule->allow; ++ allowed = rule->access == BUS_POLICY_RULE_ACCESS_ALLOW; + } + + return allowed; +diff --git a/bus/policy.h b/bus/policy.h +index ec43ffa..f839d23 100644 +--- a/bus/policy.h ++++ b/bus/policy.h +@@ -46,6 +46,14 @@ typedef enum + BUS_POLICY_TRISTATE_TRUE + } BusPolicyTristate; + ++typedef enum ++{ ++ BUS_POLICY_RULE_ACCESS_DENY, ++ BUS_POLICY_RULE_ACCESS_ALLOW, ++ /** runtime check resulting in allow or deny */ ++ BUS_POLICY_RULE_ACCESS_CHECK ++} BusPolicyRuleAccess; ++ + /** determines whether the rule affects a connection, or some global item */ + #define BUS_POLICY_RULE_IS_PER_CLIENT(rule) (!((rule)->type == BUS_POLICY_RULE_USER || \ + (rule)->type == BUS_POLICY_RULE_GROUP)) +@@ -56,8 +64,9 @@ struct BusPolicyRule + + BusPolicyRuleType type; + +- unsigned int allow : 1; /**< #TRUE if this allows, #FALSE if it denies */ +- ++ unsigned int access : 2; /**< BusPolicyRuleAccess */ ++ char *privilege; /**< for BUS_POLICY_RULE_ACCESS_CHECK */ ++ + union + { + struct +@@ -118,7 +127,7 @@ struct BusPolicyRule + }; + + BusPolicyRule* bus_policy_rule_new (BusPolicyRuleType type, +- dbus_bool_t allow); ++ BusPolicyRuleAccess access); + BusPolicyRule* bus_policy_rule_ref (BusPolicyRule *rule); + void bus_policy_rule_unref (BusPolicyRule *rule); + +@@ -152,21 +161,27 @@ dbus_bool_t bus_policy_merge (BusPolicy *policy, + BusClientPolicy* bus_client_policy_new (void); + BusClientPolicy* bus_client_policy_ref (BusClientPolicy *policy); + void bus_client_policy_unref (BusClientPolicy *policy); +-dbus_bool_t bus_client_policy_check_can_send (BusClientPolicy *policy, ++BusResult bus_client_policy_check_can_send (DBusConnection *sender, ++ BusClientPolicy *policy, + BusRegistry *registry, + dbus_bool_t requested_reply, ++ DBusConnection *addressed_recipient, + DBusConnection *receiver, + DBusMessage *message, + dbus_int32_t *toggles, +- dbus_bool_t *log); +-dbus_bool_t bus_client_policy_check_can_receive (BusClientPolicy *policy, ++ dbus_bool_t *log, ++ const char **privilege_param, ++ BusDeferredMessage **deferred_message); ++BusResult bus_client_policy_check_can_receive (BusClientPolicy *policy, + BusRegistry *registry, + dbus_bool_t requested_reply, + DBusConnection *sender, + DBusConnection *addressed_recipient, + DBusConnection *proposed_recipient, + DBusMessage *message, +- dbus_int32_t *toggles); ++ dbus_int32_t *toggles, ++ const char **privilege_param, ++ BusDeferredMessage **deferred_message); + dbus_bool_t bus_client_policy_check_can_own (BusClientPolicy *policy, + const DBusString *service_name); + dbus_bool_t bus_client_policy_append_rule (BusClientPolicy *policy, +diff --git a/configure.ac b/configure.ac +index 81028ba..f21d1b2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1770,6 +1770,17 @@ AC_ARG_ENABLE([user-session], + AM_CONDITIONAL([DBUS_ENABLE_USER_SESSION], + [test "x$enable_user_session" = xyes]) + ++#enable cynara integration ++AC_ARG_ENABLE([cynara], [AS_HELP_STRING([--enable-cynara], [enable Cynara integration])], [], [enable_cynara=no]) ++if test "x$enable_cynara" = xyes; then ++ PKG_CHECK_MODULES([CYNARA], [cynara-client-async >= 0.6.0 cynara-session >= 0.6.0], ++ [AC_DEFINE([DBUS_ENABLE_CYNARA], [1], [Define to enable Cynara privilege checks in dbus-daemon])], ++ [AC_MSG_ERROR([libcynara-client-async and cynara-session are required to enable Cynara integration])]) ++fi ++ ++AC_SUBST([CYNARA_CFLAGS]) ++AC_SUBST([CYNARA_LIBS]) ++ + AC_CONFIG_FILES([ + Doxyfile + dbus/Version +@@ -1852,6 +1863,7 @@ echo " + Building bus stats API: ${enable_stats} + Building SELinux support: ${have_selinux} + Building AppArmor support: ${have_apparmor} ++ Building Cynara support: ${enable_cynara} + Building inotify support: ${have_inotify} + Building kqueue support: ${have_kqueue} + Building systemd support: ${have_systemd} +diff --git a/test/Makefile.am b/test/Makefile.am +index 6a6e1a3..ce84dbc 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -439,6 +439,7 @@ in_data = \ + data/valid-config-files/debug-allow-all.conf.in \ + data/valid-config-files/finite-timeout.conf.in \ + data/valid-config-files/forbidding.conf.in \ ++ data/valid-config-files/debug-check-some.conf.in \ + data/valid-config-files/incoming-limit.conf.in \ + data/valid-config-files/max-completed-connections.conf.in \ + data/valid-config-files/max-connections-per-user.conf.in \ +diff --git a/test/data/invalid-config-files/badcheck-1.conf b/test/data/invalid-config-files/badcheck-1.conf +new file mode 100644 +index 0000000..fad9f50 +--- /dev/null ++++ b/test/data/invalid-config-files/badcheck-1.conf +@@ -0,0 +1,9 @@ ++ ++ ++ mybususer ++ unix:path=/foo/bar ++ ++ ++ ++ +diff --git a/test/data/invalid-config-files/badcheck-2.conf b/test/data/invalid-config-files/badcheck-2.conf +new file mode 100644 +index 0000000..63c7ef2 +--- /dev/null ++++ b/test/data/invalid-config-files/badcheck-2.conf +@@ -0,0 +1,9 @@ ++ ++ ++ mybususer ++ unix:path=/foo/bar ++ ++ ++ ++ +diff --git a/test/data/valid-config-files/check-1.conf b/test/data/valid-config-files/check-1.conf +new file mode 100644 +index 0000000..ad71473 +--- /dev/null ++++ b/test/data/valid-config-files/check-1.conf +@@ -0,0 +1,9 @@ ++ ++ ++ mybususer ++ unix:path=/foo/bar ++ ++ ++ ++ +diff --git a/test/data/valid-config-files/debug-check-some.conf.in b/test/data/valid-config-files/debug-check-some.conf.in +new file mode 100644 +index 0000000..47ee854 +--- /dev/null ++++ b/test/data/valid-config-files/debug-check-some.conf.in +@@ -0,0 +1,18 @@ ++ ++ ++ ++ ++ debug-pipe:name=test-server ++ @TEST_LISTEN@ ++ @DBUS_TEST_DATA@/valid-service-files ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +2.17.2 + diff --git a/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch new file mode 100644 index 00000000..ebbd531f --- /dev/null +++ b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0002-Disable-message-dispatching-when-send-rule-result-is.patch @@ -0,0 +1,949 @@ +From aae977a0c4bb1c25640c7056166fbc4e76ef1db6 Mon Sep 17 00:00:00 2001 +From: Jacek Bukarewicz +Date: Fri, 28 Nov 2014 12:07:39 +0100 +Subject: Disable message dispatching when send rule result is not known +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When unicast message is sent to addressed recipient and policy result +is not available message dispatch from the sender is disabled. +This also means that any further messages from the given connection are +put into the incoming queue without being processed. If response is received +message dispatching is resumed. This time answer is attached to the message +which is now processed synchronously. +Receive rule result unavailability is not yet handled - such messages are +rejected. Also, if message is sent to non-addressed recipient and policy result +is unknown, message is silently dropped. + +Cherry-picked from b1b87ad9f20b2052c28431b48e81073078a745ce +by Jose Bollo. + +Updated for dbus 1.10.20 by Scott Murray and José Bollo + +Signed-off-by: José Bollo +Signed-off-by: Scott Murray + +diff --git a/bus/activation.c b/bus/activation.c +index f8a02eb..005047f 100644 +--- a/bus/activation.c ++++ b/bus/activation.c +@@ -32,6 +32,7 @@ + #include "services.h" + #include "test.h" + #include "utils.h" ++#include + #include + #include + #include +@@ -94,6 +95,8 @@ struct BusPendingActivationEntry + DBusConnection *connection; + + dbus_bool_t auto_activation; ++ ++ dbus_bool_t is_put_back; + }; + + typedef struct +@@ -1241,20 +1244,23 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation + BusPendingActivationEntry *entry = link->data; + DBusList *next = _dbus_list_get_next_link (&pending_activation->entries, link); + +- if (entry->auto_activation && (entry->connection == NULL || dbus_connection_get_is_connected (entry->connection))) ++ if (entry->auto_activation && !entry->is_put_back && ++ (entry->connection == NULL || dbus_connection_get_is_connected (entry->connection))) + { + DBusConnection *addressed_recipient; + DBusError error; ++ BusResult res; + + dbus_error_init (&error); + + addressed_recipient = bus_service_get_primary_owners_connection (service); + + /* Resume dispatching where we left off in bus_dispatch() */ +- if (!bus_dispatch_matches (transaction, +- entry->connection, +- addressed_recipient, +- entry->activation_message, &error)) ++ res = bus_dispatch_matches (transaction, ++ entry->connection, ++ addressed_recipient, ++ entry->activation_message, &error); ++ if (res == BUS_RESULT_FALSE) + { + /* If permission is denied, we just want to return the error + * to the original method invoker; in particular, we don't +@@ -1266,9 +1272,40 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation + bus_connection_send_oom_error (entry->connection, + entry->activation_message); + } ++ } ++ else if (res == BUS_RESULT_LATER) ++ { ++ DBusList *putback_message_link = link; ++ DBusMessage *last_inserted_message = NULL; ++ ++ /* NULL entry->connection implies sending pending ActivationRequest message to systemd */ ++ if (entry->connection == NULL) ++ { ++ _dbus_assert_not_reached ("bus_dispatch_matches returned BUS_RESULT_LATER unexpectedly when sender is NULL"); ++ link = next; ++ continue; ++ } + +- link = next; +- continue; ++ /** ++ * Getting here means that policy check result is not yet available and dispatching ++ * messages from entry->connection has been disabled. ++ * Let's put back all messages for the given connection in the incoming queue and mark ++ * this entry as put back so they are not handled twice. ++ */ ++ while (putback_message_link != NULL) ++ { ++ BusPendingActivationEntry *putback_message = putback_message_link->data; ++ if (putback_message->connection == entry->connection) ++ { ++ if (!_dbus_connection_putback_message (putback_message->connection, last_inserted_message, ++ putback_message->activation_message, &error)) ++ goto error; ++ last_inserted_message = putback_message->activation_message; ++ putback_message->is_put_back = TRUE; ++ } ++ ++ putback_message_link = _dbus_list_get_next_link(&pending_activation->entries, putback_message_link); ++ } + } + } + +@@ -1286,6 +1323,19 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation + return TRUE; + + error: ++ /* remove all messages that have been put to connections' incoming queues */ ++ link = _dbus_list_get_first_link (&pending_activation->entries); ++ while (link != NULL) ++ { ++ BusPendingActivationEntry *entry = link->data; ++ if (entry->is_put_back) ++ { ++ _dbus_connection_remove_message(entry->connection, entry->activation_message); ++ entry->is_put_back = FALSE; ++ } ++ link = _dbus_list_get_next_link(&pending_activation->entries, link); ++ } ++ + return FALSE; + } + +@@ -2078,6 +2128,7 @@ bus_activation_activate_service (BusActivation *activation, + + if (service != NULL) + { ++ BusResult res; + bus_context_log (activation->context, + DBUS_SYSTEM_LOG_INFO, "Activating via systemd: service name='%s' unit='%s' requested by '%s' (%s)", + service_name, +@@ -2085,8 +2136,17 @@ bus_activation_activate_service (BusActivation *activation, + bus_connection_get_name (connection), + bus_connection_get_loginfo (connection)); + /* Wonderful, systemd is connected, let's just send the msg */ +- retval = bus_dispatch_matches (activation_transaction, NULL, ++ res = bus_dispatch_matches (activation_transaction, NULL, + systemd, message, error); ++ ++ if (res == BUS_RESULT_TRUE) ++ retval = TRUE; ++ else ++ { ++ retval = FALSE; ++ if (res == BUS_RESULT_LATER) ++ _dbus_verbose("Unexpectedly need time to check message from bus driver to systemd - dropping the message.\n"); ++ } + } + else + { +diff --git a/bus/check.c b/bus/check.c +index 5b72d31..4b8a699 100644 +--- a/bus/check.c ++++ b/bus/check.c +@@ -55,6 +55,8 @@ typedef struct BusDeferredMessage + BusCheckResponseFunc response_callback; + } BusDeferredMessage; + ++static dbus_int32_t deferred_message_data_slot = -1; ++ + BusCheck * + bus_check_new (BusContext *context, DBusError *error) + { +@@ -67,11 +69,19 @@ bus_check_new (BusContext *context, DBusError *error) + return NULL; + } + ++ if (!dbus_message_allocate_data_slot(&deferred_message_data_slot)) ++ { ++ dbus_free(check); ++ BUS_SET_OOM(error); ++ return NULL; ++ } ++ + check->refcount = 1; + check->context = context; + check->cynara = bus_cynara_new(check, error); + if (dbus_error_is_set(error)) + { ++ dbus_message_free_data_slot(&deferred_message_data_slot); + dbus_free(check); + return NULL; + } +@@ -98,6 +108,7 @@ bus_check_unref (BusCheck *check) + if (check->refcount == 0) + { + bus_cynara_unref(check->cynara); ++ dbus_message_free_data_slot(&deferred_message_data_slot); + dbus_free(check); + } + } +@@ -114,6 +125,45 @@ bus_check_get_cynara (BusCheck *check) + return check->cynara; + } + ++static void ++bus_check_enable_dispatch_callback (BusDeferredMessage *deferred_message, ++ BusResult result) ++{ ++ _dbus_verbose("bus_check_enable_dispatch_callback called deferred_message=%p\n", deferred_message); ++ ++ deferred_message->response = result; ++ _dbus_connection_enable_dispatch(deferred_message->sender); ++} ++ ++static void ++deferred_message_free_function(void *data) ++{ ++ BusDeferredMessage *deferred_message = (BusDeferredMessage *)data; ++ bus_deferred_message_unref(deferred_message); ++} ++ ++void ++bus_deferred_message_disable_sender (BusDeferredMessage *deferred_message) ++{ ++ _dbus_assert(deferred_message != NULL); ++ _dbus_assert(deferred_message->sender != NULL); ++ ++ if (dbus_message_get_data(deferred_message->message, deferred_message_data_slot) == NULL) ++ { ++ if (dbus_message_set_data(deferred_message->message, deferred_message_data_slot, deferred_message, ++ deferred_message_free_function)) ++ bus_deferred_message_ref(deferred_message); ++ } ++ ++ _dbus_connection_disable_dispatch(deferred_message->sender); ++ deferred_message->response_callback = bus_check_enable_dispatch_callback; ++} ++ ++#ifdef DBUS_ENABLE_EMBEDDED_TESTS ++BusResult (*bus_check_test_override) (DBusConnection *connection, ++ const char *privilege); ++#endif ++ + BusResult + bus_check_privilege (BusCheck *check, + DBusMessage *message, +@@ -124,6 +174,7 @@ bus_check_privilege (BusCheck *check, + BusDeferredMessageStatus check_type, + BusDeferredMessage **deferred_message) + { ++ BusDeferredMessage *previous_deferred_message; + BusResult result = BUS_RESULT_FALSE; + #ifdef DBUS_ENABLE_CYNARA + BusCynara *cynara; +@@ -137,16 +188,54 @@ bus_check_privilege (BusCheck *check, + return BUS_RESULT_FALSE; + } + +- /* ask policy checkers */ +-#ifdef DBUS_ENABLE_CYNARA +- cynara = bus_check_get_cynara(check); +- result = bus_cynara_check_privilege(cynara, message, sender, addressed_recipient, +- proposed_recipient, privilege, check_type, deferred_message); ++#ifdef DBUS_ENABLE_EMBEDDED_TESTS ++ if (bus_check_test_override) ++ return bus_check_test_override (connection, privilege); + #endif + +- if (result == BUS_RESULT_LATER && deferred_message != NULL) ++ previous_deferred_message = dbus_message_get_data(message, deferred_message_data_slot); ++ /* check if message blocked at sender's queue is being processed */ ++ if (previous_deferred_message != NULL) ++ { ++ if ((check_type & BUS_DEFERRED_MESSAGE_CHECK_SEND) && ++ !(previous_deferred_message->status & BUS_DEFERRED_MESSAGE_CHECK_SEND)) ++ { ++ /** ++ * Message has been deferred due to receive or own rule which means that sending this message ++ * is allowed - it must have been checked previously. ++ * This might happen when client calls RequestName method which depending on security ++ * policy might result in both "can_send" and "can_own" Cynara checks. ++ */ ++ result = BUS_RESULT_TRUE; ++ } ++ else ++ { ++ result = previous_deferred_message->response; ++ if (result == BUS_RESULT_LATER) ++ { ++ /* result is still not known - reuse deferred message object */ ++ if (deferred_message != NULL) ++ *deferred_message = previous_deferred_message; ++ } ++ else ++ { ++ /* result is available - we can remove deferred message from the processed message */ ++ dbus_message_set_data(message, deferred_message_data_slot, NULL, NULL); ++ } ++ } ++ } ++ else + { +- (*deferred_message)->status |= check_type; ++ /* ask policy checkers */ ++#ifdef DBUS_ENABLE_CYNARA ++ cynara = bus_check_get_cynara(check); ++ result = bus_cynara_check_privilege(cynara, message, sender, addressed_recipient, ++ proposed_recipient, privilege, check_type, deferred_message); ++#endif ++ if (result == BUS_RESULT_LATER && deferred_message != NULL) ++ { ++ (*deferred_message)->status |= check_type; ++ } + } + return result; + } +@@ -206,6 +295,12 @@ bus_deferred_message_unref (BusDeferredMessage *deferred_message) + } + } + ++BusDeferredMessageStatus ++bus_deferred_message_get_status (BusDeferredMessage *deferred_message) ++{ ++ return deferred_message->status; ++} ++ + void + bus_deferred_message_response_received (BusDeferredMessage *deferred_message, + BusResult result) +diff --git a/bus/check.h b/bus/check.h +index c3fcaf9..d177549 100644 +--- a/bus/check.h ++++ b/bus/check.h +@@ -55,6 +55,7 @@ BusResult bus_check_privilege (BusCheck *check, + BusDeferredMessageStatus check_type, + BusDeferredMessage **deferred_message); + ++ + BusDeferredMessage *bus_deferred_message_new (DBusMessage *message, + DBusConnection *sender, + DBusConnection *addressed_recipient, +@@ -65,4 +66,13 @@ BusDeferredMessage *bus_deferred_message_ref (BusDeferredMessage + void bus_deferred_message_unref (BusDeferredMessage *deferred_message); + void bus_deferred_message_response_received (BusDeferredMessage *deferred_message, + BusResult result); ++void bus_deferred_message_disable_sender (BusDeferredMessage *deferred_message); ++ ++BusDeferredMessageStatus bus_deferred_message_get_status (BusDeferredMessage *deferred_message); ++ ++#ifdef DBUS_ENABLE_EMBEDDED_TESTS ++extern BusResult (*bus_check_test_override) (DBusConnection *connection, ++ const char *privilege); ++#endif ++ + #endif /* BUS_CHECK_H */ +diff --git a/bus/cynara.c b/bus/cynara.c +index 57a4c45..77aed62 100644 +--- a/bus/cynara.c ++++ b/bus/cynara.c +@@ -36,7 +36,6 @@ + #include + #endif + +- + #ifdef DBUS_ENABLE_CYNARA + typedef struct BusCynara + { +diff --git a/bus/dispatch.c b/bus/dispatch.c +index d3867f7..50a22a3 100644 +--- a/bus/dispatch.c ++++ b/bus/dispatch.c +@@ -35,6 +35,7 @@ + #include "signals.h" + #include "test.h" + #include ++#include + #include + #include + +@@ -122,7 +123,7 @@ send_one_message (DBusConnection *connection, + return TRUE; + } + +-dbus_bool_t ++BusResult + bus_dispatch_matches (BusTransaction *transaction, + DBusConnection *sender, + DBusConnection *addressed_recipient, +@@ -158,13 +159,29 @@ bus_dispatch_matches (BusTransaction *transaction, + message, NULL, error, + &deferred_message); + if (res == BUS_RESULT_FALSE) +- return FALSE; ++ return BUS_RESULT_FALSE; + else if (res == BUS_RESULT_LATER) + { +- dbus_set_error (error, +- DBUS_ERROR_ACCESS_DENIED, +- "Rejecting message because time is needed to check security policy"); +- return FALSE; ++ BusDeferredMessageStatus status; ++ status = bus_deferred_message_get_status(deferred_message); ++ ++ if (status & BUS_DEFERRED_MESSAGE_CHECK_SEND) ++ { ++ /* send rule result not available - disable dispatching messages from the sender */ ++ bus_deferred_message_disable_sender(deferred_message); ++ return BUS_RESULT_LATER; ++ } ++ else if (status & BUS_DEFERRED_MESSAGE_CHECK_RECEIVE) ++ { ++ dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, ++ "Rejecting message because time is needed to check security policy"); ++ return BUS_RESULT_FALSE; ++ } ++ else ++ { ++ _dbus_verbose("deferred message has no status field set to send or receive unexpectedly\n"); ++ return BUS_RESULT_FALSE; ++ } + } + + if (dbus_message_contains_unix_fds (message) && +@@ -175,14 +192,14 @@ bus_dispatch_matches (BusTransaction *transaction, + DBUS_ERROR_NOT_SUPPORTED, + "Tried to send message with Unix file descriptors" + "to a client that doesn't support that."); +- return FALSE; +- } ++ return BUS_RESULT_FALSE; ++ } + + /* Dispatch the message */ + if (!bus_transaction_send (transaction, addressed_recipient, message)) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + } + +@@ -197,7 +214,7 @@ bus_dispatch_matches (BusTransaction *transaction, + &recipients)) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + link = _dbus_list_get_first_link (&recipients); +@@ -219,10 +236,10 @@ bus_dispatch_matches (BusTransaction *transaction, + if (dbus_error_is_set (&tmp_error)) + { + dbus_move_error (&tmp_error, error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + else +- return TRUE; ++ return BUS_RESULT_TRUE; + } + + static DBusHandlerResult +@@ -409,10 +426,12 @@ bus_dispatch (DBusConnection *connection, + } + else if (res == BUS_RESULT_LATER) + { +- dbus_set_error (&error, +- DBUS_ERROR_ACCESS_DENIED, +- "Rejecting message because time is needed to check security policy"); +- _dbus_verbose ("Security policy needs time to check policy. Dropping message\n"); ++ /* Disable dispatching messages from the sender, ++ * roll back and dispatch the message once the policy result is available */ ++ bus_deferred_message_disable_sender(deferred_message); ++ bus_transaction_cancel_and_free (transaction); ++ transaction = NULL; ++ result = DBUS_HANDLER_RESULT_LATER; + goto out; + } + +@@ -514,8 +533,14 @@ bus_dispatch (DBusConnection *connection, + * addressed_recipient == NULL), and match it against other connections' + * match rules. + */ +- if (!bus_dispatch_matches (transaction, connection, addressed_recipient, message, &error)) +- goto out; ++ if (BUS_RESULT_LATER == bus_dispatch_matches (transaction, connection, addressed_recipient, ++ message, &error)) ++ { ++ /* Roll back and dispatch the message once the policy result is available */ ++ bus_transaction_cancel_and_free (transaction); ++ transaction = NULL; ++ result = DBUS_HANDLER_RESULT_LATER; ++ } + + out: + if (dbus_error_is_set (&error)) +@@ -5060,9 +5085,132 @@ bus_dispatch_test_conf_fail (const DBusString *test_data_dir, + } + #endif + ++typedef struct { ++ DBusTimeout *timeout; ++ DBusConnection *connection; ++ dbus_bool_t timedout; ++ int check_counter; ++} BusTestCheckData; ++ ++static BusTestCheckData *cdata; ++ ++static dbus_bool_t ++bus_dispatch_test_check_timeout (void *data) ++{ ++ _dbus_verbose ("timeout triggered - pretend that privilege check result is available\n"); ++ ++ /* should only happen once during the test */ ++ _dbus_assert (!cdata->timedout); ++ cdata->timedout = TRUE; ++ _dbus_connection_enable_dispatch (cdata->connection); ++ ++ /* don't call this again */ ++ _dbus_loop_remove_timeout (bus_connection_get_loop (cdata->connection), ++ cdata->timeout); ++ dbus_connection_unref (cdata->connection); ++ cdata->connection = NULL; ++ return TRUE; ++} ++ ++static BusResult ++bus_dispatch_test_check_override (DBusConnection *connection, ++ const char *privilege) ++{ ++ _dbus_verbose ("overriding privilege check %s #%d\n", privilege, cdata->check_counter); ++ cdata->check_counter++; ++ if (!cdata->timedout) ++ { ++ dbus_bool_t added; ++ ++ /* Should be the first privilege check for the "Echo" method. */ ++ _dbus_assert (cdata->check_counter == 1); ++ cdata->timeout = _dbus_timeout_new (1, bus_dispatch_test_check_timeout, ++ NULL, NULL); ++ _dbus_assert (cdata->timeout); ++ added = _dbus_loop_add_timeout (bus_connection_get_loop (connection), ++ cdata->timeout); ++ _dbus_assert (added); ++ cdata->connection = connection; ++ dbus_connection_ref (connection); ++ _dbus_connection_disable_dispatch (connection); ++ return BUS_RESULT_LATER; ++ } ++ else ++ { ++ /* Should only be checked one more time, and this time succeeds. */ ++ _dbus_assert (cdata->check_counter == 2); ++ return BUS_RESULT_TRUE; ++ } ++} ++ ++static dbus_bool_t ++bus_dispatch_test_check (const DBusString *test_data_dir) ++{ ++ const char *filename = "valid-config-files/debug-check-some.conf"; ++ BusContext *context; ++ DBusConnection *foo; ++ DBusError error; ++ dbus_bool_t result = TRUE; ++ BusTestCheckData data; ++ ++ /* save the config name for the activation helper */ ++ if (!setenv_TEST_LAUNCH_HELPER_CONFIG (test_data_dir, filename)) ++ _dbus_assert_not_reached ("no memory setting TEST_LAUNCH_HELPER_CONFIG"); ++ ++ dbus_error_init (&error); ++ ++ context = bus_context_new_test (test_data_dir, filename); ++ if (context == NULL) ++ return FALSE; ++ ++ foo = dbus_connection_open_private (TEST_DEBUG_PIPE, &error); ++ if (foo == NULL) ++ _dbus_assert_not_reached ("could not alloc connection"); ++ ++ if (!bus_setup_debug_client (foo)) ++ _dbus_assert_not_reached ("could not set up connection"); ++ ++ spin_connection_until_authenticated (context, foo); ++ ++ if (!check_hello_message (context, foo)) ++ _dbus_assert_not_reached ("hello message failed"); ++ ++ if (!check_double_hello_message (context, foo)) ++ _dbus_assert_not_reached ("double hello message failed"); ++ ++ if (!check_add_match (context, foo, "")) ++ _dbus_assert_not_reached ("AddMatch message failed"); ++ ++ /* ++ * Cause bus_check_send_privilege() to return BUS_RESULT_LATER in the ++ * first call, then BUS_RESULT_TRUE. ++ */ ++ cdata = &data; ++ memset (cdata, 0, sizeof(*cdata)); ++ bus_check_test_override = bus_dispatch_test_check_override; ++ ++ result = check_existent_service_auto_start (context, foo); ++ ++ _dbus_assert (cdata->check_counter == 2); ++ _dbus_assert (cdata->timedout); ++ _dbus_assert (cdata->timeout); ++ _dbus_assert (!cdata->connection); ++ _dbus_timeout_unref (cdata->timeout); ++ ++ kill_client_connection_unchecked (foo); ++ ++ bus_context_unref (context); ++ ++ return result; ++} ++ + dbus_bool_t + bus_dispatch_test (const DBusString *test_data_dir) + { ++ _dbus_verbose (" tests\n"); ++ if (!bus_dispatch_test_check (test_data_dir)) ++ return FALSE; ++ + /* run normal activation tests */ + _dbus_verbose ("Normal activation tests\n"); + if (!bus_dispatch_test_conf (test_data_dir, +diff --git a/bus/dispatch.h b/bus/dispatch.h +index fb5ba7a..afba6a2 100644 +--- a/bus/dispatch.h ++++ b/bus/dispatch.h +@@ -29,7 +29,7 @@ + + dbus_bool_t bus_dispatch_add_connection (DBusConnection *connection); + void bus_dispatch_remove_connection (DBusConnection *connection); +-dbus_bool_t bus_dispatch_matches (BusTransaction *transaction, ++BusResult bus_dispatch_matches (BusTransaction *transaction, + DBusConnection *sender, + DBusConnection *recipient, + DBusMessage *message, +diff --git a/bus/driver.c b/bus/driver.c +index cd0a714..f414f64 100644 +--- a/bus/driver.c ++++ b/bus/driver.c +@@ -218,6 +218,7 @@ bus_driver_send_service_owner_changed (const char *service_name, + { + DBusMessage *message; + dbus_bool_t retval; ++ BusResult res; + const char *null_service; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -253,7 +254,16 @@ bus_driver_send_service_owner_changed (const char *service_name, + if (!bus_transaction_capture (transaction, NULL, NULL, message)) + goto oom; + +- retval = bus_dispatch_matches (transaction, NULL, NULL, message, error); ++ res = bus_dispatch_matches (transaction, NULL, NULL, message, error); ++ if (res == BUS_RESULT_TRUE) ++ retval = TRUE; ++ else ++ { ++ retval = FALSE; ++ if (res == BUS_RESULT_LATER) ++ /* should never happen */ ++ _dbus_assert_not_reached ("bus_dispatch_matches returned BUS_RESULT_LATER unexpectedly"); ++ } + dbus_message_unref (message); + + return retval; +diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h +index 4835732..94b1c95 100644 +--- a/dbus/dbus-connection-internal.h ++++ b/dbus/dbus-connection-internal.h +@@ -118,6 +118,21 @@ DBUS_PRIVATE_EXPORT + dbus_bool_t _dbus_connection_get_linux_security_label (DBusConnection *connection, + char **label_p); + ++DBUS_PRIVATE_EXPORT ++void _dbus_connection_enable_dispatch (DBusConnection *connection); ++DBUS_PRIVATE_EXPORT ++void _dbus_connection_disable_dispatch (DBusConnection *connection); ++ ++DBUS_PRIVATE_EXPORT ++dbus_bool_t _dbus_connection_putback_message (DBusConnection *connection, ++ DBusMessage *after_message, ++ DBusMessage *message, ++ DBusError *error); ++ ++DBUS_PRIVATE_EXPORT ++dbus_bool_t _dbus_connection_remove_message (DBusConnection *connection, ++ DBusMessage *message); ++ + /* if DBUS_ENABLE_STATS */ + DBUS_PRIVATE_EXPORT + void _dbus_connection_get_stats (DBusConnection *connection, +diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c +index c525b6d..958968c 100644 +--- a/dbus/dbus-connection.c ++++ b/dbus/dbus-connection.c +@@ -311,7 +311,8 @@ struct DBusConnection + */ + dbus_bool_t dispatch_acquired; /**< Someone has dispatch path (can drain incoming queue) */ + dbus_bool_t io_path_acquired; /**< Someone has transport io path (can use the transport to read/write messages) */ +- ++ ++ unsigned int dispatch_disabled : 1; /**< if true, then dispatching incoming messages is stopped until enabled again */ + unsigned int shareable : 1; /**< #TRUE if libdbus owns a reference to the connection and can return it from dbus_connection_open() more than once */ + + unsigned int exit_on_disconnect : 1; /**< If #TRUE, exit after handling disconnect signal */ +@@ -439,6 +440,39 @@ _dbus_connection_wakeup_mainloop (DBusConnection *connection) + (*connection->wakeup_main_function) (connection->wakeup_main_data); + } + ++static void ++_dbus_connection_set_dispatch(DBusConnection *connection, ++ dbus_bool_t disabled) ++{ ++ CONNECTION_LOCK (connection); ++ if (connection->dispatch_disabled != disabled) ++ { ++ DBusDispatchStatus status; ++ ++ connection->dispatch_disabled = disabled; ++ status = _dbus_connection_get_dispatch_status_unlocked (connection); ++ _dbus_connection_update_dispatch_status_and_unlock (connection, status); ++ } ++ else ++ { ++ CONNECTION_UNLOCK (connection); ++ } ++} ++ ++ ++void ++_dbus_connection_enable_dispatch (DBusConnection *connection) ++{ ++ _dbus_connection_set_dispatch (connection, FALSE); ++} ++ ++void ++ _dbus_connection_disable_dispatch (DBusConnection *connection) ++{ ++ _dbus_connection_set_dispatch (connection, TRUE); ++} ++ ++ + #ifdef DBUS_ENABLE_EMBEDDED_TESTS + /** + * Gets the locks so we can examine them +@@ -4069,6 +4103,82 @@ _dbus_connection_putback_message_link_unlocked (DBusConnection *connection, + "_dbus_connection_putback_message_link_unlocked"); + } + ++dbus_bool_t ++_dbus_connection_putback_message (DBusConnection *connection, ++ DBusMessage *after_message, ++ DBusMessage *message, ++ DBusError *error) ++{ ++ DBusDispatchStatus status; ++ DBusList *message_link = _dbus_list_alloc_link (message); ++ DBusList *after_link; ++ if (message_link == NULL) ++ { ++ _DBUS_SET_OOM (error); ++ return FALSE; ++ } ++ dbus_message_ref (message); ++ ++ CONNECTION_LOCK (connection); ++ _dbus_connection_acquire_dispatch (connection); ++ HAVE_LOCK_CHECK (connection); ++ ++ after_link = _dbus_list_find_first(&connection->incoming_messages, after_message); ++ _dbus_list_insert_after_link (&connection->incoming_messages, after_link, message_link); ++ connection->n_incoming += 1; ++ ++ _dbus_verbose ("Message %p (%s %s %s '%s') put back into queue %p, %d incoming\n", ++ message_link->data, ++ dbus_message_type_to_string (dbus_message_get_type (message_link->data)), ++ dbus_message_get_interface (message_link->data) ? ++ dbus_message_get_interface (message_link->data) : ++ "no interface", ++ dbus_message_get_member (message_link->data) ? ++ dbus_message_get_member (message_link->data) : ++ "no member", ++ dbus_message_get_signature (message_link->data), ++ connection, connection->n_incoming); ++ ++ _dbus_message_trace_ref (message_link->data, -1, -1, ++ "_dbus_connection_putback_message"); ++ ++ _dbus_connection_release_dispatch (connection); ++ ++ status = _dbus_connection_get_dispatch_status_unlocked (connection); ++ _dbus_connection_update_dispatch_status_and_unlock (connection, status); ++ ++ return TRUE; ++} ++ ++dbus_bool_t ++_dbus_connection_remove_message (DBusConnection *connection, ++ DBusMessage *message) ++{ ++ DBusDispatchStatus status; ++ dbus_bool_t removed; ++ ++ CONNECTION_LOCK (connection); ++ _dbus_connection_acquire_dispatch (connection); ++ HAVE_LOCK_CHECK (connection); ++ ++ removed = _dbus_list_remove(&connection->incoming_messages, message); ++ ++ if (removed) ++ { ++ connection->n_incoming -= 1; ++ dbus_message_unref(message); ++ _dbus_verbose ("Message %p removed from incoming queue\n", message); ++ } ++ else ++ _dbus_verbose ("Message %p not found in the incoming queue\n", message); ++ ++ _dbus_connection_release_dispatch (connection); ++ ++ status = _dbus_connection_get_dispatch_status_unlocked (connection); ++ _dbus_connection_update_dispatch_status_and_unlock (connection, status); ++ return removed; ++} ++ + /** + * Returns the first-received message from the incoming message queue, + * removing it from the queue. The caller owns a reference to the +@@ -4252,8 +4362,9 @@ static DBusDispatchStatus + _dbus_connection_get_dispatch_status_unlocked (DBusConnection *connection) + { + HAVE_LOCK_CHECK (connection); +- +- if (connection->n_incoming > 0) ++ if (connection->dispatch_disabled && _dbus_connection_get_is_connected_unlocked(connection)) ++ return DBUS_DISPATCH_COMPLETE; ++ else if (connection->n_incoming > 0) + return DBUS_DISPATCH_DATA_REMAINS; + else if (!_dbus_transport_queue_messages (connection->transport)) + return DBUS_DISPATCH_NEED_MEMORY; +@@ -4716,6 +4827,8 @@ dbus_connection_dispatch (DBusConnection *connection) + + CONNECTION_LOCK (connection); + ++ if (result == DBUS_HANDLER_RESULT_LATER) ++ goto out; + if (result == DBUS_HANDLER_RESULT_NEED_MEMORY) + { + _dbus_verbose ("No memory\n"); +@@ -4838,9 +4951,11 @@ dbus_connection_dispatch (DBusConnection *connection) + connection); + + out: +- if (result == DBUS_HANDLER_RESULT_NEED_MEMORY) ++ if (result == DBUS_HANDLER_RESULT_LATER || ++ result == DBUS_HANDLER_RESULT_NEED_MEMORY) + { +- _dbus_verbose ("out of memory\n"); ++ if (result == DBUS_HANDLER_RESULT_NEED_MEMORY) ++ _dbus_verbose ("out of memory\n"); + + /* Put message back, and we'll start over. + * Yes this means handlers must be idempotent if they +diff --git a/dbus/dbus-list.c b/dbus/dbus-list.c +index 8e713c0..32ea871 100644 +--- a/dbus/dbus-list.c ++++ b/dbus/dbus-list.c +@@ -458,6 +458,35 @@ _dbus_list_remove_last (DBusList **list, + return FALSE; + } + ++/** ++ * Finds a value in the list. Returns the first link ++ * with value equal to the given data pointer. ++ * This is a linear-time operation. ++ * Returns #NULL if no value found that matches. ++ * ++ * @param list address of the list head. ++ * @param data the value to find. ++ * @returns the link if found ++ */ ++DBusList* ++_dbus_list_find_first (DBusList **list, ++ void *data) ++{ ++ DBusList *link; ++ ++ link = _dbus_list_get_first_link (list); ++ ++ while (link != NULL) ++ { ++ if (link->data == data) ++ return link; ++ ++ link = _dbus_list_get_next_link (list, link); ++ } ++ ++ return NULL; ++} ++ + /** + * Finds a value in the list. Returns the last link + * with value equal to the given data pointer. +diff --git a/dbus/dbus-list.h b/dbus/dbus-list.h +index 9350a0d..fee9f1b 100644 +--- a/dbus/dbus-list.h ++++ b/dbus/dbus-list.h +@@ -68,6 +68,9 @@ DBUS_PRIVATE_EXPORT + void _dbus_list_remove_link (DBusList **list, + DBusList *link); + DBUS_PRIVATE_EXPORT ++DBusList* _dbus_list_find_first (DBusList **list, ++ void *data); ++DBUS_PRIVATE_EXPORT + DBusList* _dbus_list_find_last (DBusList **list, + void *data); + DBUS_PRIVATE_EXPORT +diff --git a/dbus/dbus-shared.h b/dbus/dbus-shared.h +index 7ab9103..e5bfbed 100644 +--- a/dbus/dbus-shared.h ++++ b/dbus/dbus-shared.h +@@ -67,7 +67,8 @@ typedef enum + { + DBUS_HANDLER_RESULT_HANDLED, /**< Message has had its effect - no need to run more handlers. */ + DBUS_HANDLER_RESULT_NOT_YET_HANDLED, /**< Message has not had any effect - see if other handlers want it. */ +- DBUS_HANDLER_RESULT_NEED_MEMORY /**< Need more memory in order to return #DBUS_HANDLER_RESULT_HANDLED or #DBUS_HANDLER_RESULT_NOT_YET_HANDLED. Please try again later with more memory. */ ++ DBUS_HANDLER_RESULT_NEED_MEMORY, /**< Need more memory in order to return #DBUS_HANDLER_RESULT_HANDLED or #DBUS_HANDLER_RESULT_NOT_YET_HANDLED. Please try again later with more memory. */ ++ DBUS_HANDLER_RESULT_LATER /**< Message dispatch deferred due to pending policy check */ + } DBusHandlerResult; + + /* Bus names */ +-- +2.17.2 + diff --git a/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch new file mode 100644 index 00000000..1c2ab2bc --- /dev/null +++ b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0003-Handle-unavailability-of-policy-results-for-broadcas.patch @@ -0,0 +1,1082 @@ +From fdc3d7086c8f7a623e3da80e559708545b9201fc Mon Sep 17 00:00:00 2001 +From: Jacek Bukarewicz +Date: Fri, 28 Nov 2014 12:39:33 +0100 +Subject: Handle unavailability of policy results for broadcasts and receive + rules +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When message is sent to the addressed recipient and receive rule +result is unavailable we don't want to block the sender +as it most likely will be the privileged service, so instead we queue +it at the recipient. Any further messages sent to it will be queued to +maintain message order. Once the answer from Cynara arrives messages are +dispatched from the recipient queue. In such case full dispatch is +performed - messages are sent to addressed recipient and other +interested connections. +Messages sent to non-addressed recipients (eavesdroppers or broadcast +message recipients) are handled in a similar way. The difference is +that it is not full dispatch meaning message is sent to a single recipient. + +Cherry picked from 1e231194610892dd4360224998d91336097b05a1 by Jose Bollo + +Updated for dbus 1.10.20 by Scott Murray and José Bollo + +Signed-off-by: José Bollo +Signed-off-by: Scott Murray + +diff --git a/bus/activation.c b/bus/activation.c +index 005047f..ffdc6fc 100644 +--- a/bus/activation.c ++++ b/bus/activation.c +@@ -1259,7 +1259,7 @@ bus_activation_send_pending_auto_activation_messages (BusActivation *activation + res = bus_dispatch_matches (transaction, + entry->connection, + addressed_recipient, +- entry->activation_message, &error); ++ entry->activation_message, NULL, &error); + if (res == BUS_RESULT_FALSE) + { + /* If permission is denied, we just want to return the error +@@ -2137,7 +2137,7 @@ bus_activation_activate_service (BusActivation *activation, + bus_connection_get_loginfo (connection)); + /* Wonderful, systemd is connected, let's just send the msg */ + res = bus_dispatch_matches (activation_transaction, NULL, +- systemd, message, error); ++ systemd, message, NULL, error); + + if (res == BUS_RESULT_TRUE) + retval = TRUE; +diff --git a/bus/bus.c b/bus/bus.c +index 237efe3..5bb5637 100644 +--- a/bus/bus.c ++++ b/bus/bus.c +@@ -1800,17 +1800,9 @@ bus_context_check_security_policy (BusContext *context, + } + + /* See if limits on size have been exceeded */ +- if (proposed_recipient && +- ((dbus_connection_get_outgoing_size (proposed_recipient) > context->limits.max_outgoing_bytes) || +- (dbus_connection_get_outgoing_unix_fds (proposed_recipient) > context->limits.max_outgoing_unix_fds))) +- { +- complain_about_message (context, DBUS_ERROR_LIMITS_EXCEEDED, +- "Rejected: destination has a full message queue", +- 0, message, sender, proposed_recipient, requested_reply, TRUE, NULL, +- error); +- _dbus_verbose ("security policy disallowing message due to full message queue\n"); ++ if (!bus_context_check_recipient_message_limits(context, proposed_recipient, sender, message, ++ requested_reply, error)) + return BUS_RESULT_FALSE; +- } + + /* Record that we will allow a reply here in the future (don't + * bother if the recipient is the bus or this is an eavesdropping +@@ -1869,3 +1861,41 @@ bus_context_check_all_watches (BusContext *context) + _dbus_server_toggle_all_watches (server, enabled); + } + } ++ ++void ++bus_context_complain_about_message (BusContext *context, ++ const char *error_name, ++ const char *complaint, ++ int matched_rules, ++ DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *proposed_recipient, ++ dbus_bool_t requested_reply, ++ dbus_bool_t log, ++ const char *privilege, ++ DBusError *error) ++{ ++ complain_about_message(context, error_name, complaint, matched_rules, message, sender, ++ proposed_recipient, requested_reply, log, privilege, error); ++} ++ ++dbus_bool_t bus_context_check_recipient_message_limits (BusContext *context, ++ DBusConnection *recipient, ++ DBusConnection *sender, ++ DBusMessage *message, ++ dbus_bool_t requested_reply, ++ DBusError *error) ++{ ++ if (recipient && ++ ((dbus_connection_get_outgoing_size (recipient) > context->limits.max_outgoing_bytes) || ++ (dbus_connection_get_outgoing_unix_fds (recipient) > context->limits.max_outgoing_unix_fds))) ++ { ++ complain_about_message (context, DBUS_ERROR_LIMITS_EXCEEDED, ++ "Rejected: destination has a full message queue", ++ 0, message, sender, recipient, requested_reply, TRUE, NULL, ++ error); ++ _dbus_verbose ("security policy disallowing message due to full message queue\n"); ++ return FALSE; ++ } ++ return TRUE; ++} +diff --git a/bus/bus.h b/bus/bus.h +index 82c32c8..1b08f7c 100644 +--- a/bus/bus.h ++++ b/bus/bus.h +@@ -164,4 +164,23 @@ BusResult bus_context_check_security_policy (BusContext + BusDeferredMessage **deferred_message); + void bus_context_check_all_watches (BusContext *context); + ++dbus_bool_t bus_context_check_recipient_message_limits (BusContext *context, ++ DBusConnection *recipient, ++ DBusConnection *sender, ++ DBusMessage *message, ++ dbus_bool_t requested_reply, ++ DBusError *error); ++void bus_context_complain_about_message (BusContext *context, ++ const char *error_name, ++ const char *complaint, ++ int matched_rules, ++ DBusMessage *message, ++ DBusConnection *sender, ++ DBusConnection *proposed_recipient, ++ dbus_bool_t requested_reply, ++ dbus_bool_t log, ++ const char *privilege, ++ DBusError *error); ++ ++ + #endif /* BUS_BUS_H */ +diff --git a/bus/check.c b/bus/check.c +index 4b8a699..f3d283f 100644 +--- a/bus/check.c ++++ b/bus/check.c +@@ -49,6 +49,9 @@ typedef struct BusDeferredMessage + DBusConnection *sender; + DBusConnection *proposed_recipient; + DBusConnection *addressed_recipient; ++ dbus_bool_t requested_reply; ++ int matched_rules; ++ const char *privilege; + dbus_bool_t full_dispatch; + BusDeferredMessageStatus status; + BusResult response; +@@ -135,6 +138,89 @@ bus_check_enable_dispatch_callback (BusDeferredMessage *deferred_message, + _dbus_connection_enable_dispatch(deferred_message->sender); + } + ++static void ++bus_check_queued_message_reply_callback (BusDeferredMessage *deferred_message, ++ BusResult result) ++{ ++ int status; ++ ++ _dbus_verbose("bus_check_queued_message_reply_callback called message=%p\n", deferred_message); ++ ++ if (!bus_connection_is_active(deferred_message->proposed_recipient)) ++ return; ++ ++ status = deferred_message->status; ++ ++ deferred_message->status = 0; /* mark message as not waiting for response */ ++ deferred_message->response = result; ++ ++ /* ++ * If send rule allows us to send message we still need to check receive rules. ++ */ ++ if ((status & BUS_DEFERRED_MESSAGE_CHECK_SEND) && (result == BUS_RESULT_TRUE)) ++ { ++ int toggles; ++ BusContext *context; ++ BusRegistry *registry; ++ BusClientPolicy *recipient_policy; ++ BusDeferredMessage *deferred_message_receive; ++ ++ context = bus_connection_get_context(deferred_message->proposed_recipient); ++ registry = bus_context_get_registry(context); ++ recipient_policy = bus_connection_get_policy(deferred_message->proposed_recipient); ++ ++ deferred_message->response = bus_client_policy_check_can_receive(recipient_policy, registry, ++ deferred_message->requested_reply, deferred_message->sender, ++ deferred_message->addressed_recipient, deferred_message->proposed_recipient, deferred_message->message, ++ &toggles, NULL, &deferred_message_receive); ++ if (deferred_message->response == BUS_RESULT_LATER) ++ { ++ /* replace deferred message associated with send check with the one associated with ++ * receive check */ ++ if (!bus_deferred_message_replace(deferred_message, deferred_message_receive)) ++ { ++ /* failed to replace deferred message (due to oom). Set it to rejected */ ++ deferred_message->response = BUS_RESULT_FALSE; ++ } ++ } ++ } ++ ++ bus_connection_dispatch_deferred(deferred_message->proposed_recipient); ++} ++ ++static void ++queue_deferred_message_cancel_transaction_hook (void *data) ++{ ++ BusDeferredMessage *deferred_message = (BusDeferredMessage *)data; ++ bus_connection_remove_deferred_message(deferred_message->proposed_recipient, deferred_message); ++} ++ ++ ++dbus_bool_t ++bus_deferred_message_queue_at_recipient (BusDeferredMessage *deferred_message, ++ BusTransaction *transaction, ++ dbus_bool_t full_dispatch, ++ dbus_bool_t prepend) ++{ ++ _dbus_assert(deferred_message != NULL); ++ _dbus_assert(deferred_message->proposed_recipient != NULL); ++ ++ if (!bus_connection_queue_deferred_message(deferred_message->proposed_recipient, ++ deferred_message, prepend)) ++ return FALSE; ++ ++ if (!bus_transaction_add_cancel_hook(transaction, queue_deferred_message_cancel_transaction_hook, ++ deferred_message, NULL)) ++ { ++ bus_connection_remove_deferred_message(deferred_message->proposed_recipient, deferred_message); ++ return FALSE; ++ } ++ deferred_message->response_callback = bus_check_queued_message_reply_callback; ++ deferred_message->full_dispatch = full_dispatch; ++ ++ return TRUE; ++} ++ + static void + deferred_message_free_function(void *data) + { +@@ -159,6 +245,20 @@ bus_deferred_message_disable_sender (BusDeferredMessage *deferred_message) + deferred_message->response_callback = bus_check_enable_dispatch_callback; + } + ++void ++bus_deferred_message_set_policy_check_info (BusDeferredMessage *deferred_message, ++ dbus_bool_t requested_reply, ++ int matched_rules, ++ const char *privilege) ++{ ++ _dbus_assert(deferred_message != NULL); ++ ++ deferred_message->requested_reply = requested_reply; ++ deferred_message->matched_rules = matched_rules; ++ deferred_message->privilege = privilege; ++} ++ ++ + #ifdef DBUS_ENABLE_EMBEDDED_TESTS + BusResult (*bus_check_test_override) (DBusConnection *connection, + const char *privilege); +@@ -259,6 +359,9 @@ BusDeferredMessage *bus_deferred_message_new (DBusMessage *message, + deferred_message->addressed_recipient = addressed_recipient != NULL ? dbus_connection_ref(addressed_recipient) : NULL; + deferred_message->proposed_recipient = proposed_recipient != NULL ? dbus_connection_ref(proposed_recipient) : NULL; + deferred_message->message = dbus_message_ref(message); ++ deferred_message->requested_reply = FALSE; ++ deferred_message->matched_rules = 0; ++ deferred_message->privilege = NULL; + deferred_message->response = response; + deferred_message->status = 0; + deferred_message->full_dispatch = FALSE; +@@ -295,12 +398,215 @@ bus_deferred_message_unref (BusDeferredMessage *deferred_message) + } + } + ++dbus_bool_t ++bus_deferred_message_check_message_limits (BusDeferredMessage *deferred_message, DBusError *error) ++{ ++ BusContext *context = bus_connection_get_context(deferred_message->proposed_recipient); ++ ++ return bus_context_check_recipient_message_limits(context, deferred_message->proposed_recipient, ++ deferred_message->sender, deferred_message->message, deferred_message->requested_reply, ++ error); ++} ++ ++dbus_bool_t ++bus_deferred_message_expect_method_reply(BusDeferredMessage *deferred_message, BusTransaction *transaction, DBusError *error) ++{ ++ int type = dbus_message_get_type(deferred_message->message); ++ if (type == DBUS_MESSAGE_TYPE_METHOD_CALL && ++ deferred_message->sender && ++ deferred_message->addressed_recipient && ++ deferred_message->addressed_recipient == deferred_message->proposed_recipient && /* not eavesdropping */ ++ !bus_connections_expect_reply (bus_connection_get_connections (deferred_message->sender), ++ transaction, ++ deferred_message->sender, deferred_message->addressed_recipient, ++ deferred_message->message, error)) ++ { ++ _dbus_verbose ("Failed to record reply expectation or problem with the message expecting a reply\n"); ++ return FALSE; ++ } ++ return TRUE; ++} ++ ++void ++bus_deferred_message_create_error(BusDeferredMessage *deferred_message, ++ const char *error_message, DBusError *error) ++{ ++ BusContext *context; ++ _dbus_assert (deferred_message->status == 0 && deferred_message->response == BUS_RESULT_FALSE); ++ ++ if (deferred_message->sender == NULL) ++ return; /* error won't be sent to bus driver anyway */ ++ ++ context = bus_connection_get_context(deferred_message->sender); ++ bus_context_complain_about_message(context, DBUS_ERROR_ACCESS_DENIED, "Rejected message", ++ deferred_message->matched_rules, deferred_message->message, deferred_message->sender, ++ deferred_message->proposed_recipient, deferred_message->requested_reply, FALSE, ++ deferred_message->privilege, error); ++} ++ ++BusResult ++bus_deferred_message_dispatch (BusDeferredMessage *deferred_message) ++{ ++ BusContext *context = bus_connection_get_context (deferred_message->proposed_recipient); ++ BusTransaction *transaction = bus_transaction_new (context); ++ BusResult result = BUS_RESULT_TRUE; ++ DBusError error; ++ ++ if (transaction == NULL) ++ { ++ return BUS_RESULT_FALSE; ++ } ++ ++ dbus_error_init(&error); ++ ++ if (!deferred_message->full_dispatch) ++ { ++ result = deferred_message->response; ++ if (result == BUS_RESULT_TRUE) ++ { ++ if (!bus_context_check_recipient_message_limits(context, deferred_message->proposed_recipient, ++ deferred_message->sender, deferred_message->message, deferred_message->requested_reply, &error)) ++ result = BUS_RESULT_FALSE; ++ } ++ else if (result == BUS_RESULT_LATER) ++ { ++ BusDeferredMessage *deferred_message2; ++ result = bus_context_check_security_policy (context, transaction, ++ deferred_message->sender, ++ deferred_message->addressed_recipient, ++ deferred_message->proposed_recipient, ++ deferred_message->message, NULL, NULL, ++ &deferred_message2); ++ ++ if (result == BUS_RESULT_LATER) ++ { ++ /* prepend at recipient */ ++ if (!bus_deferred_message_queue_at_recipient(deferred_message2, transaction, ++ FALSE, TRUE)) ++ result = BUS_RESULT_FALSE; ++ } ++ } ++ ++ /* silently drop messages on access denial */ ++ if (result == BUS_RESULT_TRUE) ++ { ++ if (!bus_transaction_send (transaction, deferred_message->proposed_recipient, deferred_message->message, TRUE)) ++ result = BUS_RESULT_FALSE; ++ } ++ ++ bus_transaction_execute_and_free(transaction); ++ ++ goto out; ++ } ++ ++ /* do not attempt to send message if sender has disconnected */ ++ if (deferred_message->sender != NULL && !bus_connection_is_active(deferred_message->sender)) ++ { ++ bus_transaction_cancel_and_free(transaction); ++ result = BUS_RESULT_FALSE; ++ goto out; ++ } ++ ++ result = bus_dispatch_matches(transaction, deferred_message->sender, ++ deferred_message->addressed_recipient, deferred_message->message, deferred_message, &error); ++ ++ if (result == BUS_RESULT_LATER) ++ { ++ /* Message deferring was already done in bus_dispatch_matches */ ++ bus_transaction_cancel_and_free(transaction); ++ goto out; ++ } ++ ++ /* this part is a copy & paste from bus_dispatch function. Probably can be moved to a function */ ++ if (dbus_error_is_set (&error)) ++ { ++ if (!dbus_connection_get_is_connected (deferred_message->sender)) ++ { ++ /* If we disconnected it, we won't bother to send it any error ++ * messages. ++ */ ++ _dbus_verbose ("Not sending error to connection we disconnected\n"); ++ } ++ else if (dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY)) ++ { ++ bus_connection_send_oom_error (deferred_message->sender, deferred_message->message); ++ ++ /* cancel transaction due to OOM */ ++ if (transaction != NULL) ++ { ++ bus_transaction_cancel_and_free (transaction); ++ transaction = NULL; ++ } ++ } ++ else ++ { ++ /* Try to send the real error, if no mem to do that, send ++ * the OOM error ++ */ ++ _dbus_assert (transaction != NULL); ++ if (!bus_transaction_send_error_reply (transaction, deferred_message->sender, ++ &error, deferred_message->message)) ++ { ++ bus_connection_send_oom_error (deferred_message->sender, deferred_message->message); ++ ++ /* cancel transaction due to OOM */ ++ if (transaction != NULL) ++ { ++ bus_transaction_cancel_and_free (transaction); ++ transaction = NULL; ++ } ++ } ++ } ++ } ++ ++ if (transaction != NULL) ++ { ++ bus_transaction_execute_and_free (transaction); ++ } ++ ++out: ++ dbus_error_free(&error); ++ ++ return result; ++} ++ ++dbus_bool_t ++bus_deferred_message_replace (BusDeferredMessage *old_message, BusDeferredMessage *new_message) ++{ ++ if (bus_connection_replace_deferred_message(old_message->proposed_recipient, ++ old_message, new_message)) ++ { ++ new_message->response_callback = old_message->response_callback; ++ new_message->full_dispatch = old_message->full_dispatch; ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++dbus_bool_t ++bus_deferred_message_waits_for_check(BusDeferredMessage *deferred_message) ++{ ++ return deferred_message->status != 0; ++} ++ ++DBusConnection * ++bus_deferred_message_get_recipient(BusDeferredMessage *deferred_message) ++{ ++ return deferred_message->proposed_recipient; ++} ++ + BusDeferredMessageStatus + bus_deferred_message_get_status (BusDeferredMessage *deferred_message) + { + return deferred_message->status; + } + ++BusResult ++bus_deferred_message_get_response (BusDeferredMessage *deferred_message) ++{ ++ return deferred_message->response; ++} ++ + void + bus_deferred_message_response_received (BusDeferredMessage *deferred_message, + BusResult result) +@@ -310,3 +616,4 @@ bus_deferred_message_response_received (BusDeferredMessage *deferred_message, + deferred_message->response_callback(deferred_message, result); + } + } ++ +diff --git a/bus/check.h b/bus/check.h +index d177549..9c13c18 100644 +--- a/bus/check.h ++++ b/bus/check.h +@@ -64,12 +64,37 @@ BusDeferredMessage *bus_deferred_message_new (DBusMessage *messag + + BusDeferredMessage *bus_deferred_message_ref (BusDeferredMessage *deferred_message); + void bus_deferred_message_unref (BusDeferredMessage *deferred_message); ++BusResult bus_deferred_message_dispatch (BusDeferredMessage *deferred_message); ++dbus_bool_t bus_deferred_message_waits_for_check (BusDeferredMessage *deferred_message); ++DBusConnection *bus_deferred_message_get_recipient (BusDeferredMessage *deferred_message); + void bus_deferred_message_response_received (BusDeferredMessage *deferred_message, + BusResult result); ++dbus_bool_t bus_deferred_message_queue_at_recipient (BusDeferredMessage *deferred_message, ++ BusTransaction *transaction, ++ dbus_bool_t full_dispatch, ++ dbus_bool_t prepend); ++dbus_bool_t bus_deferred_message_replace (BusDeferredMessage *old_message, ++ BusDeferredMessage *new_message); + void bus_deferred_message_disable_sender (BusDeferredMessage *deferred_message); ++BusResult bus_deferred_message_get_response (BusDeferredMessage *deferred_message); + + BusDeferredMessageStatus bus_deferred_message_get_status (BusDeferredMessage *deferred_message); + ++ ++dbus_bool_t bus_deferred_message_expect_method_reply (BusDeferredMessage *deferred_message, ++ BusTransaction *transaction, ++ DBusError *error); ++void bus_deferred_message_create_error (BusDeferredMessage *deferred_message, ++ const char *error_message, ++ DBusError *error); ++void bus_deferred_message_set_policy_check_info (BusDeferredMessage *deferred_message, ++ dbus_bool_t requested_reply, ++ int matched_rules, ++ const char *privilege); ++dbus_bool_t bus_deferred_message_check_message_limits (BusDeferredMessage *deferred_message, ++ DBusError *error); ++ ++ + #ifdef DBUS_ENABLE_EMBEDDED_TESTS + extern BusResult (*bus_check_test_override) (DBusConnection *connection, + const char *privilege); +diff --git a/bus/connection.c b/bus/connection.c +index b348d42..ee93384 100644 +--- a/bus/connection.c ++++ b/bus/connection.c +@@ -31,11 +31,13 @@ + #include "expirelist.h" + #include "selinux.h" + #include "apparmor.h" ++#include "check.h" + #include + #include + #include + #include + #include ++#include + #ifdef DBUS_ENABLE_CYNARA + #include + #include +@@ -102,6 +104,7 @@ typedef struct + DBusMessage *oom_message; + DBusPreallocatedSend *oom_preallocated; + BusClientPolicy *policy; ++ DBusList *deferred_messages; /**< Queue of messages deferred due to pending policy check */ + + char *cached_loginfo_string; + BusSELinuxID *selinux_id; +@@ -268,6 +271,8 @@ bus_connection_disconnected (DBusConnection *connection) + bus_transaction_execute_and_free (transaction); + } + ++ bus_connection_clear_deferred_messages(connection); ++ + bus_dispatch_remove_connection (connection); + + /* no more watching */ +@@ -2307,7 +2312,7 @@ bus_transaction_capture (BusTransaction *transaction, + { + DBusConnection *recipient = link->data; + +- if (!bus_transaction_send (transaction, recipient, message)) ++ if (!bus_transaction_send (transaction, recipient, message, FALSE)) + goto out; + } + +@@ -2361,6 +2366,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction, + { + DBusError error = DBUS_ERROR_INIT; + BusResult res; ++ BusDeferredMessage *deferred_message; + + /* We have to set the sender to the driver, and have + * to check security policy since it was not done in +@@ -2401,7 +2407,7 @@ bus_transaction_send_from_driver (BusTransaction *transaction, + res = bus_context_check_security_policy (bus_transaction_get_context (transaction), + transaction, + NULL, connection, connection, message, NULL, +- &error, NULL); ++ &error, &deferred_message); + if (res == BUS_RESULT_FALSE) + { + if (!bus_transaction_capture_error_reply (transaction, connection, +@@ -2419,18 +2425,20 @@ bus_transaction_send_from_driver (BusTransaction *transaction, + } + else if (res == BUS_RESULT_LATER) + { +- _dbus_verbose ("Cannot delay sending message from bus driver, dropping it\n"); + dbus_error_free (&error); +- return TRUE; ++ if (!bus_deferred_message_queue_at_recipient(deferred_message, transaction, FALSE, FALSE)) ++ return FALSE; ++ return TRUE; /* pretend to have sent it */ + } + +- return bus_transaction_send (transaction, connection, message); ++ return bus_transaction_send (transaction, connection, message, FALSE); + } + + dbus_bool_t + bus_transaction_send (BusTransaction *transaction, + DBusConnection *connection, +- DBusMessage *message) ++ DBusMessage *message, ++ dbus_bool_t deferred_dispatch) + { + MessageToSend *to_send; + BusConnectionData *d; +@@ -2456,7 +2464,28 @@ bus_transaction_send (BusTransaction *transaction, + + d = BUS_CONNECTION_DATA (connection); + _dbus_assert (d != NULL); +- ++ ++ if (!deferred_dispatch && d->deferred_messages != NULL) ++ { ++ BusDeferredMessage *deferred_message; ++ dbus_bool_t success; ++ /* sender and addressed recipient are not required at this point as we only need to send message ++ * to a single recipient without performing policy check. */ ++ deferred_message = bus_deferred_message_new (message, ++ NULL, ++ NULL, ++ connection, ++ BUS_RESULT_TRUE); ++ if (deferred_message == NULL) ++ return FALSE; ++ ++ success = bus_deferred_message_queue_at_recipient(deferred_message, transaction, ++ FALSE, FALSE); ++ bus_deferred_message_unref(deferred_message); ++ ++ return success; ++ } ++ + to_send = dbus_new (MessageToSend, 1); + if (to_send == NULL) + { +@@ -2708,6 +2737,131 @@ bus_transaction_add_cancel_hook (BusTransaction *transaction, + return TRUE; + } + ++void ++bus_connection_dispatch_deferred (DBusConnection *connection) ++{ ++ BusDeferredMessage *message; ++ ++ _dbus_return_if_fail (connection != NULL); ++ ++ while ((message = bus_connection_pop_deferred_message(connection)) != NULL) ++ { ++ bus_deferred_message_dispatch(message); ++ bus_deferred_message_unref(message); ++ } ++} ++ ++dbus_bool_t ++bus_connection_has_deferred_messages (DBusConnection *connection) ++{ ++ BusConnectionData *d = BUS_CONNECTION_DATA(connection); ++ return d->deferred_messages != NULL ? TRUE : FALSE; ++} ++ ++dbus_bool_t ++bus_connection_queue_deferred_message (DBusConnection *connection, ++ BusDeferredMessage *message, ++ dbus_bool_t prepend) ++{ ++ BusConnectionData *d = BUS_CONNECTION_DATA(connection); ++ dbus_bool_t success; ++ if (prepend) ++ success = _dbus_list_prepend(&d->deferred_messages, message); ++ else ++ success = _dbus_list_append(&d->deferred_messages, message); ++ ++ if (success) ++ { ++ bus_deferred_message_ref(message); ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ ++dbus_bool_t ++bus_connection_replace_deferred_message (DBusConnection *connection, ++ BusDeferredMessage *oldMessage, ++ BusDeferredMessage *newMessage) ++{ ++ DBusList *link; ++ BusConnectionData *d = BUS_CONNECTION_DATA(connection); ++ ++ link = _dbus_list_find_first(&d->deferred_messages, oldMessage); ++ if (link == NULL) ++ return FALSE; ++ ++ if (!_dbus_list_insert_after(&d->deferred_messages, link, newMessage)) ++ return FALSE; ++ ++ bus_deferred_message_ref(newMessage); ++ _dbus_list_remove_link(&d->deferred_messages, link); ++ bus_deferred_message_unref(oldMessage); ++ return TRUE; ++} ++ ++BusDeferredMessage * ++bus_connection_pop_deferred_message (DBusConnection *connection) ++{ ++ DBusList *link; ++ BusDeferredMessage *message; ++ BusConnectionData *d = BUS_CONNECTION_DATA(connection); ++ ++ link =_dbus_list_get_first_link(&d->deferred_messages); ++ if (link != NULL) ++ { ++ message = link->data; ++ if (!bus_deferred_message_waits_for_check(message)) ++ { ++ _dbus_list_remove_link(&d->deferred_messages, link); ++ return message; ++ } ++ } ++ ++ return NULL; ++} ++ ++dbus_bool_t ++bus_connection_putback_deferred_message (DBusConnection *connection, BusDeferredMessage *message) ++{ ++ BusConnectionData *d = BUS_CONNECTION_DATA(connection); ++ if (_dbus_list_prepend(&d->deferred_messages, message)) ++ { ++ return TRUE; ++ } ++ return FALSE; ++} ++ ++void ++bus_connection_clear_deferred_messages (DBusConnection *connection) ++{ ++ BusConnectionData *d = BUS_CONNECTION_DATA(connection); ++ DBusList *link; ++ DBusList *next; ++ BusDeferredMessage *message; ++ ++ link =_dbus_list_get_first_link(&d->deferred_messages); ++ while (link != NULL) ++ { ++ next = _dbus_list_get_next_link (&d->deferred_messages, link); ++ message = link->data; ++ ++ bus_deferred_message_unref(message); ++ _dbus_list_remove_link(&d->deferred_messages, link); ++ ++ link = next; ++ } ++} ++ ++void ++bus_connection_remove_deferred_message (DBusConnection *connection, ++ BusDeferredMessage *message) ++{ ++ BusConnectionData *d = BUS_CONNECTION_DATA(connection); ++ if (_dbus_list_remove(&d->deferred_messages, message)) ++ bus_deferred_message_unref(message); ++} ++ + int + bus_connections_get_n_active (BusConnections *connections) + { +diff --git a/bus/connection.h b/bus/connection.h +index 71078ea..97dae96 100644 +--- a/bus/connection.h ++++ b/bus/connection.h +@@ -85,6 +85,22 @@ dbus_bool_t bus_connection_preallocate_oom_error (DBusConnection *connection); + void bus_connection_send_oom_error (DBusConnection *connection, + DBusMessage *in_reply_to); + ++dbus_bool_t bus_connection_has_deferred_messages (DBusConnection *connection); ++dbus_bool_t bus_connection_queue_deferred_message (DBusConnection *connection, ++ BusDeferredMessage *message, ++ dbus_bool_t prepend); ++BusDeferredMessage *bus_connection_pop_deferred_message (DBusConnection *connection); ++dbus_bool_t bus_connection_putback_deferred_message (DBusConnection *connection, ++ BusDeferredMessage *message); ++void bus_connection_remove_deferred_message (DBusConnection *connection, ++ BusDeferredMessage *message); ++dbus_bool_t bus_connection_replace_deferred_message (DBusConnection *connection, ++ BusDeferredMessage *oldMessage, ++ BusDeferredMessage *newMessage); ++void bus_connection_dispatch_deferred (DBusConnection *connection); ++void bus_connection_clear_deferred_messages (DBusConnection *connection); ++ ++ + /* called by signals.c */ + dbus_bool_t bus_connection_add_match_rule (DBusConnection *connection, + BusMatchRule *rule); +@@ -137,7 +153,8 @@ BusTransaction* bus_transaction_new (BusContext * + BusContext* bus_transaction_get_context (BusTransaction *transaction); + dbus_bool_t bus_transaction_send (BusTransaction *transaction, + DBusConnection *connection, +- DBusMessage *message); ++ DBusMessage *message, ++ dbus_bool_t deferred_dispatch); + dbus_bool_t bus_transaction_capture (BusTransaction *transaction, + DBusConnection *connection, + DBusConnection *addressed_recipient, +diff --git a/bus/dispatch.c b/bus/dispatch.c +index 50a22a3..7d30ce4 100644 +--- a/bus/dispatch.c ++++ b/bus/dispatch.c +@@ -33,6 +33,7 @@ + #include "utils.h" + #include "bus.h" + #include "signals.h" ++#include "dispatch.h" + #include "test.h" + #include + #include +@@ -77,7 +78,7 @@ send_one_message (DBusConnection *connection, + NULL, + &stack_error, + &deferred_message); +- if (result != BUS_RESULT_TRUE) ++ if (result == BUS_RESULT_FALSE) + { + if (!bus_transaction_capture_error_reply (transaction, sender, + &stack_error, message)) +@@ -112,9 +113,19 @@ send_one_message (DBusConnection *connection, + return TRUE; /* don't send it but don't return an error either */ + } + ++ if (result == BUS_RESULT_LATER) ++ { ++ if (!bus_deferred_message_queue_at_recipient(deferred_message, transaction, FALSE, FALSE)) ++ { ++ BUS_SET_OOM (error); ++ return FALSE; ++ } ++ return TRUE; /* pretend to have sent it */ ++ } ++ + if (!bus_transaction_send (transaction, + connection, +- message)) ++ message, FALSE)) + { + BUS_SET_OOM (error); + return FALSE; +@@ -124,11 +135,12 @@ send_one_message (DBusConnection *connection, + } + + BusResult +-bus_dispatch_matches (BusTransaction *transaction, +- DBusConnection *sender, +- DBusConnection *addressed_recipient, +- DBusMessage *message, +- DBusError *error) ++bus_dispatch_matches (BusTransaction *transaction, ++ DBusConnection *sender, ++ DBusConnection *addressed_recipient, ++ DBusMessage *message, ++ BusDeferredMessage *dispatched_deferred_message, ++ DBusError *error) + { + DBusError tmp_error; + BusConnections *connections; +@@ -137,7 +149,6 @@ bus_dispatch_matches (BusTransaction *transaction, + DBusList *link; + BusContext *context; + BusDeferredMessage *deferred_message; +- BusResult res; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + +@@ -153,16 +164,80 @@ bus_dispatch_matches (BusTransaction *transaction, + /* First, send the message to the addressed_recipient, if there is one. */ + if (addressed_recipient != NULL) + { +- res = bus_context_check_security_policy (context, transaction, ++ BusResult result; ++ /* To maintain message order message needs to be appended at the recipient if there are already ++ * deferred messages and we are not doing deferred dispatch ++ */ ++ if (dispatched_deferred_message == NULL && bus_connection_has_deferred_messages(addressed_recipient)) ++ { ++ deferred_message = bus_deferred_message_new(message, sender, ++ addressed_recipient, addressed_recipient, BUS_RESULT_LATER); ++ ++ if (deferred_message == NULL) ++ { ++ BUS_SET_OOM(error); ++ return BUS_RESULT_FALSE; ++ } ++ ++ if (!bus_deferred_message_queue_at_recipient(deferred_message, transaction, TRUE, FALSE)) ++ { ++ bus_deferred_message_unref(deferred_message); ++ BUS_SET_OOM(error); ++ return BUS_RESULT_FALSE; ++ } ++ ++ bus_deferred_message_unref(deferred_message); ++ return BUS_RESULT_TRUE; /* pretend to have sent it */ ++ } ++ ++ if (dispatched_deferred_message != NULL) ++ { ++ result = bus_deferred_message_get_response(dispatched_deferred_message); ++ if (result == BUS_RESULT_TRUE) ++ { ++ /* if we know the result of policy check we still need to check if message limits ++ * are not exceeded. It is also required to add entry in expected replies list if ++ * this is a method call ++ */ ++ if (!bus_deferred_message_check_message_limits(dispatched_deferred_message, error)) ++ return BUS_RESULT_FALSE; ++ ++ if (!bus_deferred_message_expect_method_reply(dispatched_deferred_message, transaction, error)) ++ return BUS_RESULT_FALSE; ++ } ++ else if (result == BUS_RESULT_FALSE) ++ { ++ bus_deferred_message_create_error(dispatched_deferred_message, "Rejected message", error); ++ return BUS_RESULT_FALSE; ++ } ++ } ++ else ++ result = BUS_RESULT_LATER; ++ ++ if (result == BUS_RESULT_LATER) ++ result = bus_context_check_security_policy (context, transaction, + sender, addressed_recipient, + addressed_recipient, + message, NULL, error, + &deferred_message); +- if (res == BUS_RESULT_FALSE) ++ ++ if (result == BUS_RESULT_FALSE) + return BUS_RESULT_FALSE; +- else if (res == BUS_RESULT_LATER) ++ else if (result == BUS_RESULT_LATER) + { + BusDeferredMessageStatus status; ++ ++ if (dispatched_deferred_message != NULL) ++ { ++ /* for deferred dispatch prepend message at the recipient */ ++ if (!bus_deferred_message_queue_at_recipient(deferred_message, transaction, TRUE, TRUE)) ++ { ++ BUS_SET_OOM(error); ++ return BUS_RESULT_FALSE; ++ } ++ return BUS_RESULT_TRUE; /* pretend to have sent it */ ++ } ++ + status = bus_deferred_message_get_status(deferred_message); + + if (status & BUS_DEFERRED_MESSAGE_CHECK_SEND) +@@ -173,13 +248,18 @@ bus_dispatch_matches (BusTransaction *transaction, + } + else if (status & BUS_DEFERRED_MESSAGE_CHECK_RECEIVE) + { +- dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, +- "Rejecting message because time is needed to check security policy"); +- return BUS_RESULT_FALSE; ++ /* receive rule result not available - queue message at the recipient */ ++ if (!bus_deferred_message_queue_at_recipient(deferred_message, transaction, TRUE, FALSE)) ++ { ++ BUS_SET_OOM(error); ++ return BUS_RESULT_FALSE; ++ } ++ ++ return BUS_RESULT_TRUE; /* pretend to have sent it */ + } + else + { +- _dbus_verbose("deferred message has no status field set to send or receive unexpectedly\n"); ++ _dbus_verbose("deferred message has no status field set unexpectedly\n"); + return BUS_RESULT_FALSE; + } + } +@@ -196,7 +276,8 @@ bus_dispatch_matches (BusTransaction *transaction, + } + + /* Dispatch the message */ +- if (!bus_transaction_send (transaction, addressed_recipient, message)) ++ if (!bus_transaction_send(transaction, addressed_recipient, message, ++ dispatched_deferred_message != NULL ? TRUE : FALSE)) + { + BUS_SET_OOM (error); + return BUS_RESULT_FALSE; +@@ -534,7 +615,7 @@ bus_dispatch (DBusConnection *connection, + * match rules. + */ + if (BUS_RESULT_LATER == bus_dispatch_matches (transaction, connection, addressed_recipient, +- message, &error)) ++ message, NULL, &error)) + { + /* Roll back and dispatch the message once the policy result is available */ + bus_transaction_cancel_and_free (transaction); +diff --git a/bus/dispatch.h b/bus/dispatch.h +index afba6a2..f6102e8 100644 +--- a/bus/dispatch.h ++++ b/bus/dispatch.h +@@ -29,10 +29,11 @@ + + dbus_bool_t bus_dispatch_add_connection (DBusConnection *connection); + void bus_dispatch_remove_connection (DBusConnection *connection); +-BusResult bus_dispatch_matches (BusTransaction *transaction, +- DBusConnection *sender, +- DBusConnection *recipient, +- DBusMessage *message, +- DBusError *error); ++BusResult bus_dispatch_matches (BusTransaction *transaction, ++ DBusConnection *sender, ++ DBusConnection *recipient, ++ DBusMessage *message, ++ BusDeferredMessage *dispatched_deferred_message, ++ DBusError *error); + + #endif /* BUS_DISPATCH_H */ +diff --git a/bus/driver.c b/bus/driver.c +index f414f64..d89a658 100644 +--- a/bus/driver.c ++++ b/bus/driver.c +@@ -254,7 +254,7 @@ bus_driver_send_service_owner_changed (const char *service_name, + if (!bus_transaction_capture (transaction, NULL, NULL, message)) + goto oom; + +- res = bus_dispatch_matches (transaction, NULL, NULL, message, error); ++ res = bus_dispatch_matches (transaction, NULL, NULL, message, NULL, error); + if (res == BUS_RESULT_TRUE) + retval = TRUE; + else +diff --git a/bus/policy.c b/bus/policy.c +index 7ee1ce5..b1fab0d 100644 +--- a/bus/policy.c ++++ b/bus/policy.c +@@ -1121,6 +1121,9 @@ bus_client_policy_check_can_send (DBusConnection *sender, + + result = bus_check_privilege(check, message, sender, addressed_recipient, receiver, + privilege, BUS_DEFERRED_MESSAGE_CHECK_SEND, deferred_message); ++ if (result == BUS_RESULT_LATER && deferred_message != NULL) ++ bus_deferred_message_set_policy_check_info(*deferred_message, requested_reply, ++ *toggles, privilege); + } + else + privilege = NULL; +@@ -1370,6 +1373,9 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + + result = bus_check_privilege(check, message, sender, addressed_recipient, proposed_recipient, + privilege, BUS_DEFERRED_MESSAGE_CHECK_RECEIVE, deferred_message); ++ if (result == BUS_RESULT_LATER && deferred_message != NULL) ++ bus_deferred_message_set_policy_check_info(*deferred_message, requested_reply, ++ *toggles, privilege); + } + else + privilege = NULL; +-- +2.17.2 + diff --git a/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch new file mode 100644 index 00000000..9cb744de --- /dev/null +++ b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0004-Add-own-rule-result-unavailability-handling.patch @@ -0,0 +1,1493 @@ +From e7ae85429aa3e6d80df13b3a5a492d9ccbf42518 Mon Sep 17 00:00:00 2001 +From: Jacek Bukarewicz +Date: Thu, 27 Nov 2014 11:26:21 +0100 +Subject: Add own rule result unavailability handling +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Own rule result unavailability is handled like send rules - dispatching +messages from the sender is blocked and resumed when result becomes +available. + +Handler of "RequestName" method needs to return BUS_RESULT_LATER when +policy result is not known therefore its return type is modified. +Since bus message handlers are put into function pointer array other +message handler function singatures are also affected. + +Cherry-picked from 35ef89cd6777ea2430077fc621d21bd01df92349 by Jose.bollo + +Updated for dbus 1.10.20 by Scott Murray and José Bollo + +Signed-off-by: José Bollo +Signed-off-by: Scott Murray + +diff --git a/bus/dispatch.c b/bus/dispatch.c +index 7d30ce4..4b84c21 100644 +--- a/bus/dispatch.c ++++ b/bus/dispatch.c +@@ -517,8 +517,17 @@ bus_dispatch (DBusConnection *connection, + } + + _dbus_verbose ("Giving message to %s\n", DBUS_SERVICE_DBUS); +- if (!bus_driver_handle_message (connection, transaction, message, &error)) ++ res = bus_driver_handle_message (connection, transaction, message, &error); ++ if (res == BUS_RESULT_FALSE) + goto out; ++ else if (res == BUS_RESULT_LATER) ++ { ++ /* connection has been disabled in message handler */ ++ bus_transaction_cancel_and_free (transaction); ++ transaction = NULL; ++ result = DBUS_HANDLER_RESULT_LATER; ++ goto out; ++ } + } + else if (!bus_connection_is_active (connection)) /* clients must talk to bus driver first */ + { +diff --git a/bus/driver.c b/bus/driver.c +index d89a658..aaeb3b2 100644 +--- a/bus/driver.c ++++ b/bus/driver.c +@@ -420,7 +420,7 @@ create_unique_client_name (BusRegistry *registry, + return TRUE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_hello (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -428,7 +428,7 @@ bus_driver_handle_hello (DBusConnection *connection, + { + DBusString unique_name; + BusService *service; +- dbus_bool_t retval; ++ BusResult retval; + BusRegistry *registry; + BusConnections *connections; + DBusError tmp_error; +@@ -442,7 +442,7 @@ bus_driver_handle_hello (DBusConnection *connection, + /* We already handled an Hello message for this connection. */ + dbus_set_error (error, DBUS_ERROR_FAILED, + "Already handled an Hello message"); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + /* Note that when these limits are exceeded we don't disconnect the +@@ -464,16 +464,16 @@ bus_driver_handle_hello (DBusConnection *connection, + bus_context_log (context, DBUS_SYSTEM_LOG_WARNING, "%s (%s=%d)", + tmp_error.message, limit_name, limit); + dbus_move_error (&tmp_error, error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + if (!_dbus_string_init (&unique_name)) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +- retval = FALSE; ++ retval = BUS_RESULT_FALSE; + + registry = bus_connection_get_registry (connection); + +@@ -506,7 +506,7 @@ bus_driver_handle_hello (DBusConnection *connection, + goto out_0; + + _dbus_assert (bus_connection_is_active (connection)); +- retval = TRUE; ++ retval = BUS_RESULT_TRUE; + + out_0: + _dbus_string_free (&unique_name); +@@ -558,7 +558,7 @@ bus_driver_send_welcome_message (DBusConnection *connection, + } + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_list_services (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -580,14 +580,14 @@ bus_driver_handle_list_services (DBusConnection *connection, + if (reply == NULL) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + if (!bus_registry_list_services (registry, &services, &len)) + { + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + dbus_message_iter_init_append (reply, &iter); +@@ -599,7 +599,7 @@ bus_driver_handle_list_services (DBusConnection *connection, + dbus_free_string_array (services); + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + { +@@ -611,7 +611,7 @@ bus_driver_handle_list_services (DBusConnection *connection, + dbus_free_string_array (services); + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + } + +@@ -624,7 +624,7 @@ bus_driver_handle_list_services (DBusConnection *connection, + dbus_free_string_array (services); + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + ++i; + } +@@ -635,23 +635,23 @@ bus_driver_handle_list_services (DBusConnection *connection, + { + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + if (!bus_transaction_send_from_driver (transaction, connection, reply)) + { + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + else + { + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + } + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_list_activatable_services (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -673,14 +673,14 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection, + if (reply == NULL) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + if (!bus_activation_list_services (activation, &services, &len)) + { + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + dbus_message_iter_init_append (reply, &iter); +@@ -692,7 +692,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection, + dbus_free_string_array (services); + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + { +@@ -704,7 +704,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection, + dbus_free_string_array (services); + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + } + +@@ -717,7 +717,7 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection, + dbus_free_string_array (services); + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + ++i; + } +@@ -728,23 +728,23 @@ bus_driver_handle_list_activatable_services (DBusConnection *connection, + { + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + if (!bus_transaction_send_from_driver (transaction, connection, reply)) + { + dbus_message_unref (reply); + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + else + { + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + } + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_acquire_service (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -755,7 +755,8 @@ bus_driver_handle_acquire_service (DBusConnection *connection, + const char *name; + dbus_uint32_t service_reply; + dbus_uint32_t flags; +- dbus_bool_t retval; ++ BusResult retval; ++ BusResult res; + BusRegistry *registry; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -766,20 +767,24 @@ bus_driver_handle_acquire_service (DBusConnection *connection, + DBUS_TYPE_STRING, &name, + DBUS_TYPE_UINT32, &flags, + DBUS_TYPE_INVALID)) +- return FALSE; ++ return BUS_RESULT_FALSE; + + _dbus_verbose ("Trying to own name %s with flags 0x%x\n", name, flags); + +- retval = FALSE; ++ retval = BUS_RESULT_FALSE; + reply = NULL; + + _dbus_string_init_const (&service_name, name); + +- if (!bus_registry_acquire_service (registry, connection, +- &service_name, flags, +- &service_reply, transaction, +- error)) +- goto out; ++ res = bus_registry_acquire_service (registry, connection, message, ++ &service_name, flags, ++ &service_reply, transaction, ++ error); ++ if (res != BUS_RESULT_TRUE) ++ { ++ retval = res; ++ goto out; ++ } + + reply = dbus_message_new_method_return (message); + if (reply == NULL) +@@ -800,7 +805,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection, + goto out; + } + +- retval = TRUE; ++ retval = BUS_RESULT_TRUE; + + out: + if (reply) +@@ -808,7 +813,7 @@ bus_driver_handle_acquire_service (DBusConnection *connection, + return retval; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_release_service (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -818,7 +823,7 @@ bus_driver_handle_release_service (DBusConnection *connection, + DBusString service_name; + const char *name; + dbus_uint32_t service_reply; +- dbus_bool_t retval; ++ BusResult retval; + BusRegistry *registry; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -828,11 +833,11 @@ bus_driver_handle_release_service (DBusConnection *connection, + if (!dbus_message_get_args (message, error, + DBUS_TYPE_STRING, &name, + DBUS_TYPE_INVALID)) +- return FALSE; ++ return BUS_RESULT_FALSE; + + _dbus_verbose ("Trying to release name %s\n", name); + +- retval = FALSE; ++ retval = BUS_RESULT_FALSE; + reply = NULL; + + _dbus_string_init_const (&service_name, name); +@@ -861,7 +866,7 @@ bus_driver_handle_release_service (DBusConnection *connection, + goto out; + } + +- retval = TRUE; ++ retval = BUS_RESULT_TRUE; + + out: + if (reply) +@@ -869,7 +874,7 @@ bus_driver_handle_release_service (DBusConnection *connection, + return retval; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_service_exists (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -880,7 +885,7 @@ bus_driver_handle_service_exists (DBusConnection *connection, + BusService *service; + dbus_bool_t service_exists; + const char *name; +- dbus_bool_t retval; ++ BusResult retval; + BusRegistry *registry; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -890,9 +895,9 @@ bus_driver_handle_service_exists (DBusConnection *connection, + if (!dbus_message_get_args (message, error, + DBUS_TYPE_STRING, &name, + DBUS_TYPE_INVALID)) +- return FALSE; ++ return BUS_RESULT_FALSE; + +- retval = FALSE; ++ retval = BUS_RESULT_FALSE; + + if (strcmp (name, DBUS_SERVICE_DBUS) == 0) + { +@@ -926,7 +931,7 @@ bus_driver_handle_service_exists (DBusConnection *connection, + goto out; + } + +- retval = TRUE; ++ retval = BUS_RESULT_TRUE; + + out: + if (reply) +@@ -935,7 +940,7 @@ bus_driver_handle_service_exists (DBusConnection *connection, + return retval; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_activate_service (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -943,7 +948,7 @@ bus_driver_handle_activate_service (DBusConnection *connection, + { + dbus_uint32_t flags; + const char *name; +- dbus_bool_t retval; ++ BusResult retval; + BusActivation *activation; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -957,10 +962,10 @@ bus_driver_handle_activate_service (DBusConnection *connection, + { + _DBUS_ASSERT_ERROR_IS_SET (error); + _dbus_verbose ("No memory to get arguments to StartServiceByName\n"); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +- retval = FALSE; ++ retval = BUS_RESULT_FALSE; + + if (!bus_activation_activate_service (activation, connection, transaction, FALSE, + message, name, error)) +@@ -970,7 +975,7 @@ bus_driver_handle_activate_service (DBusConnection *connection, + goto out; + } + +- retval = TRUE; ++ retval = BUS_RESULT_TRUE; + + out: + return retval; +@@ -1072,13 +1077,13 @@ bus_driver_send_or_activate (BusTransaction *transaction, + return TRUE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_update_activation_environment (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error) + { +- dbus_bool_t retval; ++ BusResult retval; + BusActivation *activation; + BusContext *context; + DBusMessageIter iter; +@@ -1100,7 +1105,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, + "Cannot change activation environment " + "on a system bus."); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + activation = bus_connection_get_activation (connection); +@@ -1114,7 +1119,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, + + dbus_message_iter_recurse (&iter, &dict_iter); + +- retval = FALSE; ++ retval = BUS_RESULT_FALSE; + systemd_message = NULL; + + /* Then loop through the sent dictionary, add the location of +@@ -1279,7 +1284,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, + if (!bus_driver_send_ack_reply (connection, transaction, message, error)) + goto out; + +- retval = TRUE; ++ retval = BUS_RESULT_TRUE; + + out: + if (systemd_message != NULL) +@@ -1289,7 +1294,7 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, + return retval; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_add_match (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1371,16 +1376,16 @@ bus_driver_handle_add_match (DBusConnection *connection, + + bus_match_rule_unref (rule); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + failed: + _DBUS_ASSERT_ERROR_IS_SET (error); + if (rule) + bus_match_rule_unref (rule); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_remove_match (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1423,16 +1428,16 @@ bus_driver_handle_remove_match (DBusConnection *connection, + + bus_match_rule_unref (rule); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + failed: + _DBUS_ASSERT_ERROR_IS_SET (error); + if (rule) + bus_match_rule_unref (rule); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_service_owner (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1502,7 +1507,7 @@ bus_driver_handle_get_service_owner (DBusConnection *connection, + + dbus_message_unref (reply); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -1511,10 +1516,10 @@ bus_driver_handle_get_service_owner (DBusConnection *connection, + _DBUS_ASSERT_ERROR_IS_SET (error); + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_list_queued_owners (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1606,7 +1611,7 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection, + + dbus_message_unref (reply); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -1619,10 +1624,10 @@ bus_driver_handle_list_queued_owners (DBusConnection *connection, + if (base_names) + _dbus_list_clear (&base_names); + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_connection_unix_user (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1679,7 +1684,7 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection, + + dbus_message_unref (reply); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -1688,10 +1693,10 @@ bus_driver_handle_get_connection_unix_user (DBusConnection *connection, + _DBUS_ASSERT_ERROR_IS_SET (error); + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1748,7 +1753,7 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection, + + dbus_message_unref (reply); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -1757,10 +1762,10 @@ bus_driver_handle_get_connection_unix_process_id (DBusConnection *connection, + _DBUS_ASSERT_ERROR_IS_SET (error); + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1811,7 +1816,7 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection, + + dbus_message_unref (reply); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -1820,10 +1825,10 @@ bus_driver_handle_get_adt_audit_session_data (DBusConnection *connection, + _DBUS_ASSERT_ERROR_IS_SET (error); + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_connection_selinux_security_context (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1872,7 +1877,7 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne + + dbus_message_unref (reply); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -1881,10 +1886,10 @@ bus_driver_handle_get_connection_selinux_security_context (DBusConnection *conne + _DBUS_ASSERT_ERROR_IS_SET (error); + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_connection_credentials (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -1998,7 +2003,7 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection, + + dbus_message_unref (reply); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -2012,10 +2017,10 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection, + dbus_message_unref (reply); + } + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_reload_config (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2040,7 +2045,7 @@ bus_driver_handle_reload_config (DBusConnection *connection, + goto oom; + + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -2049,11 +2054,11 @@ bus_driver_handle_reload_config (DBusConnection *connection, + _DBUS_ASSERT_ERROR_IS_SET (error); + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + #ifdef DBUS_ENABLE_VERBOSE_MODE +-static dbus_bool_t ++static BusResult + bus_driver_handle_enable_verbose (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2073,7 +2078,7 @@ bus_driver_handle_enable_verbose (DBusConnection *connection, + _dbus_set_verbose(TRUE); + + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -2082,10 +2087,10 @@ bus_driver_handle_enable_verbose (DBusConnection *connection, + + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_disable_verbose (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2105,7 +2110,7 @@ bus_driver_handle_disable_verbose (DBusConnection *connection, + _dbus_set_verbose(FALSE); + + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -2114,11 +2119,11 @@ bus_driver_handle_disable_verbose (DBusConnection *connection, + + if (reply) + dbus_message_unref (reply); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + #endif + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_id (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2134,7 +2139,7 @@ bus_driver_handle_get_id (DBusConnection *connection, + if (!_dbus_string_init (&uuid)) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + reply = NULL; +@@ -2160,7 +2165,7 @@ bus_driver_handle_get_id (DBusConnection *connection, + + _dbus_string_free (&uuid); + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -2170,10 +2175,10 @@ bus_driver_handle_get_id (DBusConnection *connection, + if (reply) + dbus_message_unref (reply); + _dbus_string_free (&uuid); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_become_monitor (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2189,7 +2194,7 @@ bus_driver_handle_become_monitor (DBusConnection *connection, + int i; + int n_match_rules; + dbus_uint32_t flags; +- dbus_bool_t ret = FALSE; ++ BusResult ret = BUS_RESULT_FALSE; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + +@@ -2262,10 +2267,10 @@ bus_driver_handle_become_monitor (DBusConnection *connection, + if (!bus_connection_be_monitor (connection, transaction, &rules, error)) + goto out; + +- ret = TRUE; ++ ret = BUS_RESULT_TRUE; + + out: +- if (ret) ++ if (ret == BUS_RESULT_TRUE) + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + else + _DBUS_ASSERT_ERROR_IS_SET (error); +@@ -2281,7 +2286,7 @@ out: + return ret; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_machine_id (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2296,7 +2301,7 @@ bus_driver_handle_get_machine_id (DBusConnection *connection, + if (!_dbus_string_init (&uuid)) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + if (!_dbus_get_local_machine_uuid_encoded (&uuid, error)) +@@ -2321,7 +2326,7 @@ bus_driver_handle_get_machine_id (DBusConnection *connection, + + _dbus_string_free (&uuid); + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + _DBUS_ASSERT_ERROR_IS_CLEAR (error); +@@ -2335,29 +2340,30 @@ fail: + dbus_message_unref (reply); + + _dbus_string_free (&uuid); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_ping (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error) + { +- return bus_driver_send_ack_reply (connection, transaction, message, error); ++ return bus_driver_send_ack_reply (connection, transaction, message, error) == TRUE ++ ? BUS_RESULT_TRUE : BUS_RESULT_FALSE; + } + +-static dbus_bool_t bus_driver_handle_get (DBusConnection *connection, ++static BusResult bus_driver_handle_get (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); + +-static dbus_bool_t bus_driver_handle_get_all (DBusConnection *connection, ++static BusResult bus_driver_handle_get_all (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); + +-static dbus_bool_t bus_driver_handle_set (DBusConnection *connection, ++static BusResult bus_driver_handle_set (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); +@@ -2389,10 +2395,10 @@ typedef struct + const char *name; + const char *in_args; + const char *out_args; +- dbus_bool_t (* handler) (DBusConnection *connection, +- BusTransaction *transaction, +- DBusMessage *message, +- DBusError *error); ++ BusResult (* handler) (DBusConnection *connection, ++ BusTransaction *transaction, ++ DBusMessage *message, ++ DBusError *error); + MethodFlags flags; + } MessageHandler; + +@@ -2511,7 +2517,7 @@ static const PropertyHandler dbus_property_handlers[] = { + { NULL, NULL, NULL } + }; + +-static dbus_bool_t bus_driver_handle_introspect (DBusConnection *, ++static BusResult bus_driver_handle_introspect (DBusConnection *, + BusTransaction *, DBusMessage *, DBusError *); + + static const MessageHandler properties_message_handlers[] = { +@@ -2763,7 +2769,7 @@ bus_driver_generate_introspect_string (DBusString *xml, + return TRUE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_introspect (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2784,13 +2790,13 @@ bus_driver_handle_introspect (DBusConnection *connection, + DBUS_TYPE_INVALID)) + { + _DBUS_ASSERT_ERROR_IS_SET (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + if (!_dbus_string_init (&xml)) + { + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + is_canonical_path = dbus_message_has_path (message, DBUS_PATH_DBUS); +@@ -2815,7 +2821,7 @@ bus_driver_handle_introspect (DBusConnection *connection, + dbus_message_unref (reply); + _dbus_string_free (&xml); + +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -2825,10 +2831,42 @@ bus_driver_handle_introspect (DBusConnection *connection, + + _dbus_string_free (&xml); + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + ++/* ++ * Set @error and return FALSE if the message is not directed to the ++ * dbus-daemon by its canonical object path. This is hardening against ++ * system services with poorly-written security policy files, which ++ * might allow sending dangerously broad equivalence classes of messages ++ * such as "anything with this assumed-to-be-safe object path". ++ * ++ * dbus-daemon is unusual in that it normally ignores the object path ++ * of incoming messages; we need to keep that behaviour for the "read" ++ * read-only method calls like GetConnectionUnixUser for backwards ++ * compatibility, but it seems safer to be more restrictive for things ++ * intended to be root-only or privileged-developers-only. ++ * ++ * It is possible that there are other system services with the same ++ * quirk as dbus-daemon. ++ */ + dbus_bool_t ++bus_driver_check_message_is_for_us (DBusMessage *message, ++ DBusError *error) ++{ ++ if (!dbus_message_has_path (message, DBUS_PATH_DBUS)) ++ { ++ dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, ++ "Method '%s' is only available at the canonical object path '%s'", ++ dbus_message_get_member (message), DBUS_PATH_DBUS); ++ ++ return FALSE; ++ } ++ ++ return TRUE; ++} ++ ++BusResult + bus_driver_handle_message (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -2839,6 +2877,7 @@ bus_driver_handle_message (DBusConnection *connection, + const MessageHandler *mh; + dbus_bool_t found_interface = FALSE; + dbus_bool_t is_canonical_path; ++ BusResult res; + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + +@@ -2854,7 +2893,7 @@ bus_driver_handle_message (DBusConnection *connection, + transaction, + message, + error)) +- return FALSE; ++ return BUS_RESULT_FALSE; + + context = bus_connection_get_context (connection); + systemd = bus_driver_get_owner_of_name (connection, +@@ -2871,7 +2910,7 @@ bus_driver_handle_message (DBusConnection *connection, + attacker ? attacker : "(unauthenticated)", + bus_connection_get_loginfo (connection)); + /* ignore it */ +- return TRUE; ++ return BUS_RESULT_TRUE; + } + + if (!bus_context_get_systemd_activation (context)) +@@ -2879,16 +2918,16 @@ bus_driver_handle_message (DBusConnection *connection, + bus_context_log (context, DBUS_SYSTEM_LOG_WARNING, + "Ignoring unexpected ActivationFailure message " + "while not using systemd activation"); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +- return dbus_activation_systemd_failure(bus_context_get_activation(context), message); ++ return dbus_activation_systemd_failure(bus_context_get_activation(context), message) == TRUE ? BUS_RESULT_TRUE : BUS_RESULT_FALSE; + } + + if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_CALL) + { + _dbus_verbose ("Driver got a non-method-call message, ignoring\n"); +- return TRUE; /* we just ignore this */ ++ return BUS_RESULT_TRUE; /* we just ignore this */ + } + + /* may be NULL, which means "any interface will do" */ +@@ -2953,20 +2992,27 @@ bus_driver_handle_message (DBusConnection *connection, + name, dbus_message_get_signature (message), + mh->in_args); + _DBUS_ASSERT_ERROR_IS_SET (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +- if ((* mh->handler) (connection, transaction, message, error)) ++ res = (* mh->handler) (connection, transaction, message, error); ++ if (res == BUS_RESULT_TRUE) + { + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + _dbus_verbose ("Driver handler succeeded\n"); +- return TRUE; ++ return BUS_RESULT_TRUE; + } +- else ++ else if (res == BUS_RESULT_FALSE) + { + _DBUS_ASSERT_ERROR_IS_SET (error); + _dbus_verbose ("Driver handler returned failure\n"); +- return FALSE; ++ return BUS_RESULT_FALSE; ++ } ++ else if (res == BUS_RESULT_LATER) ++ { ++ _DBUS_ASSERT_ERROR_IS_CLEAR (error); ++ _dbus_verbose ("Driver handler delayed message processing due to policy check\n"); ++ return BUS_RESULT_LATER; + } + } + } +@@ -2978,7 +3024,7 @@ bus_driver_handle_message (DBusConnection *connection, + "%s does not understand message %s", + DBUS_SERVICE_DBUS, name); + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + void +@@ -3099,7 +3145,7 @@ interface_handler_find_property (const InterfaceHandler *ih, + return NULL; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -3120,18 +3166,18 @@ bus_driver_handle_get (DBusConnection *connection, + DBUS_TYPE_STRING, &iface, + DBUS_TYPE_STRING, &prop, + DBUS_TYPE_INVALID)) +- return FALSE; ++ return BUS_RESULT_FALSE; + + /* We only implement Properties on /org/freedesktop/DBus so far. */ + ih = bus_driver_find_interface (iface, TRUE, error); + + if (ih == NULL) +- return FALSE; ++ return BUS_RESULT_FALSE; + + handler = interface_handler_find_property (ih, prop, error); + + if (handler == NULL) +- return FALSE; ++ return BUS_RESULT_FALSE; + + context = bus_transaction_get_context (transaction); + +@@ -3159,17 +3205,17 @@ bus_driver_handle_get (DBusConnection *connection, + goto oom; + + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + if (reply != NULL) + dbus_message_unref (reply); + + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_get_all (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -3188,13 +3234,13 @@ bus_driver_handle_get_all (DBusConnection *connection, + if (!dbus_message_get_args (message, error, + DBUS_TYPE_STRING, &iface, + DBUS_TYPE_INVALID)) +- return FALSE; ++ return BUS_RESULT_FALSE; + + /* We only implement Properties on /org/freedesktop/DBus so far. */ + ih = bus_driver_find_interface (iface, TRUE, error); + + if (ih == NULL) +- return FALSE; ++ return BUS_RESULT_FALSE; + + context = bus_transaction_get_context (transaction); + +@@ -3229,7 +3275,7 @@ bus_driver_handle_get_all (DBusConnection *connection, + goto oom; + + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom_abandon_message: + _dbus_asv_abandon (&reply_iter, &array_iter); +@@ -3239,10 +3285,10 @@ oom: + dbus_message_unref (reply); + + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-static dbus_bool_t ++static BusResult + bus_driver_handle_set (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -3271,15 +3317,15 @@ bus_driver_handle_set (DBusConnection *connection, + ih = bus_driver_find_interface (iface, TRUE, error); + + if (ih == NULL) +- return FALSE; ++ return BUS_RESULT_FALSE; + + handler = interface_handler_find_property (ih, prop, error); + + if (handler == NULL) +- return FALSE; ++ return BUS_RESULT_FALSE; + + /* We don't implement any properties that can be set yet. */ + dbus_set_error (error, DBUS_ERROR_PROPERTY_READ_ONLY, + "Property '%s.%s' cannot be set", iface, prop); +- return FALSE; ++ return BUS_RESULT_FALSE; + } +diff --git a/bus/driver.h b/bus/driver.h +index ac1289d..183c28b 100644 +--- a/bus/driver.h ++++ b/bus/driver.h +@@ -35,7 +35,7 @@ typedef enum + } BusDriverFound; + + void bus_driver_remove_connection (DBusConnection *connection); +-dbus_bool_t bus_driver_handle_message (DBusConnection *connection, ++BusResult bus_driver_handle_message (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); +diff --git a/bus/policy.c b/bus/policy.c +index b1fab0d..27b66d1 100644 +--- a/bus/policy.c ++++ b/bus/policy.c +@@ -1388,18 +1388,21 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + + + +-static dbus_bool_t ++static BusResult + bus_rules_check_can_own (DBusList *rules, +- const DBusString *service_name) ++ const DBusString *service_name, ++ DBusConnection *connection, ++ DBusMessage *message) + { + DBusList *link; +- dbus_bool_t allowed; ++ BusResult result; ++ const char *privilege; + + /* rules is in the order the rules appeared + * in the config file, i.e. last rule that applies wins + */ + +- allowed = FALSE; ++ result = BUS_RESULT_FALSE; + link = _dbus_list_get_first_link (&rules); + while (link != NULL) + { +@@ -1435,17 +1438,45 @@ bus_rules_check_can_own (DBusList *rules, + } + + /* Use this rule */ +- allowed = rule->access == BUS_POLICY_RULE_ACCESS_ALLOW; ++ switch (rule->access) ++ { ++ case BUS_POLICY_RULE_ACCESS_ALLOW: ++ result = BUS_RESULT_TRUE; ++ break; ++ case BUS_POLICY_RULE_ACCESS_DENY: ++ result = BUS_RESULT_FALSE; ++ break; ++ case BUS_POLICY_RULE_ACCESS_CHECK: ++ result = BUS_RESULT_LATER; ++ privilege = rule->privilege; ++ break; ++ } + } + +- return allowed; ++ if (result == BUS_RESULT_LATER) ++ { ++ BusContext *context = bus_connection_get_context(connection); ++ BusCheck *check = bus_context_get_check(context); ++ BusDeferredMessage *deferred_message; ++ ++ result = bus_check_privilege(check, message, connection, NULL, NULL, ++ privilege, BUS_DEFERRED_MESSAGE_CHECK_OWN, &deferred_message); ++ if (result == BUS_RESULT_LATER) ++ { ++ bus_deferred_message_disable_sender(deferred_message); ++ } ++ } ++ ++ return result; + } + +-dbus_bool_t ++BusResult + bus_client_policy_check_can_own (BusClientPolicy *policy, +- const DBusString *service_name) ++ const DBusString *service_name, ++ DBusConnection *connection, ++ DBusMessage *message) + { +- return bus_rules_check_can_own (policy->rules, service_name); ++ return bus_rules_check_can_own (policy->rules, service_name, connection, message); + } + + #ifdef DBUS_ENABLE_EMBEDDED_TESTS +@@ -1453,7 +1484,7 @@ dbus_bool_t + bus_policy_check_can_own (BusPolicy *policy, + const DBusString *service_name) + { +- return bus_rules_check_can_own (policy->default_rules, service_name); ++ return bus_rules_check_can_own (policy->default_rules, service_name, NULL, NULL) == BUS_RESULT_TRUE; + } + #endif /* DBUS_ENABLE_EMBEDDED_TESTS */ + +diff --git a/bus/policy.h b/bus/policy.h +index f839d23..28ce8f2 100644 +--- a/bus/policy.h ++++ b/bus/policy.h +@@ -182,8 +182,10 @@ BusResult bus_client_policy_check_can_receive (BusClientPolicy *policy, + dbus_int32_t *toggles, + const char **privilege_param, + BusDeferredMessage **deferred_message); +-dbus_bool_t bus_client_policy_check_can_own (BusClientPolicy *policy, +- const DBusString *service_name); ++BusResult bus_client_policy_check_can_own (BusClientPolicy *policy, ++ const DBusString *service_name, ++ DBusConnection *connection, ++ DBusMessage *message); + dbus_bool_t bus_client_policy_append_rule (BusClientPolicy *policy, + BusPolicyRule *rule); + void bus_client_policy_optimize (BusClientPolicy *policy); +diff --git a/bus/services.c b/bus/services.c +index 127edda..586af18 100644 +--- a/bus/services.c ++++ b/bus/services.c +@@ -376,16 +376,17 @@ bus_registry_list_services (BusRegistry *registry, + return FALSE; + } + +-dbus_bool_t ++BusResult + bus_registry_acquire_service (BusRegistry *registry, + DBusConnection *connection, ++ DBusMessage *message, + const DBusString *service_name, + dbus_uint32_t flags, + dbus_uint32_t *result, + BusTransaction *transaction, + DBusError *error) + { +- dbus_bool_t retval; ++ BusResult retval; + DBusConnection *old_owner_conn; + BusClientPolicy *policy; + BusService *service; +@@ -393,8 +394,9 @@ bus_registry_acquire_service (BusRegistry *registry, + BusSELinuxID *sid; + BusOwner *primary_owner; + int limit; ++ BusResult res; + +- retval = FALSE; ++ retval = BUS_RESULT_FALSE; + + if (!_dbus_validate_bus_name (service_name, 0, + _dbus_string_get_length (service_name))) +@@ -467,7 +469,8 @@ bus_registry_acquire_service (BusRegistry *registry, + _dbus_string_get_const_data (service_name), error)) + goto out; + +- if (!bus_client_policy_check_can_own (policy, service_name)) ++ res = bus_client_policy_check_can_own (policy, service_name, connection, message); ++ if (res == BUS_RESULT_FALSE) + { + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, + "Connection \"%s\" is not allowed to own the service \"%s\" due " +@@ -478,6 +481,11 @@ bus_registry_acquire_service (BusRegistry *registry, + _dbus_string_get_const_data (service_name)); + goto out; + } ++ else if (res == BUS_RESULT_LATER) ++ { ++ retval = BUS_RESULT_LATER; ++ goto out; ++ } + + limit = bus_context_get_max_services_per_connection (registry->context); + +@@ -603,11 +611,13 @@ bus_registry_acquire_service (BusRegistry *registry, + } + + activation = bus_context_get_activation (registry->context); +- retval = bus_activation_send_pending_auto_activation_messages (activation, ++ ++ if (bus_activation_send_pending_auto_activation_messages (activation, + service, +- transaction); +- if (!retval) +- BUS_SET_OOM (error); ++ transaction)) ++ retval = BUS_RESULT_TRUE; ++ else ++ BUS_SET_OOM (error); + + out: + return retval; +diff --git a/bus/services.h b/bus/services.h +index 056dd9f..3df3dd7 100644 +--- a/bus/services.h ++++ b/bus/services.h +@@ -50,8 +50,9 @@ void bus_registry_foreach (BusRegistry *registry + dbus_bool_t bus_registry_list_services (BusRegistry *registry, + char ***listp, + int *array_len); +-dbus_bool_t bus_registry_acquire_service (BusRegistry *registry, ++BusResult bus_registry_acquire_service (BusRegistry *registry, + DBusConnection *connection, ++ DBusMessage *message, + const DBusString *service_name, + dbus_uint32_t flags, + dbus_uint32_t *result, +diff --git a/bus/stats.c b/bus/stats.c +index 1582255..c25be98 100644 +--- a/bus/stats.c ++++ b/bus/stats.c +@@ -36,7 +36,7 @@ + + #ifdef DBUS_ENABLE_STATS + +-dbus_bool_t ++BusResult + bus_stats_handle_get_stats (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -51,6 +51,9 @@ bus_stats_handle_get_stats (DBusConnection *connection, + + _DBUS_ASSERT_ERROR_IS_CLEAR (error); + ++ if (!bus_driver_check_message_is_for_us (message, error)) ++ return BUS_RESULT_FALSE; ++ + context = bus_transaction_get_context (transaction); + connections = bus_context_get_connections (context); + +@@ -104,17 +107,17 @@ bus_stats_handle_get_stats (DBusConnection *connection, + goto oom; + + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + if (reply != NULL) + dbus_message_unref (reply); + + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + +-dbus_bool_t ++BusResult + bus_stats_handle_get_connection_stats (DBusConnection *caller_connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -209,7 +212,7 @@ bus_stats_handle_get_connection_stats (DBusConnection *caller_connection, + goto oom; + + dbus_message_unref (reply); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + BUS_SET_OOM (error); +@@ -218,11 +221,11 @@ failed: + if (reply != NULL) + dbus_message_unref (reply); + +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + +-dbus_bool_t ++BusResult + bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection, + BusTransaction *transaction, + DBusMessage *message, +@@ -246,7 +249,7 @@ bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection, + matchmaker = bus_context_get_matchmaker (context); + + if (!bus_registry_list_services (registry, &services, &services_len)) +- return FALSE; ++ return BUS_RESULT_FALSE; + + reply = dbus_message_new_method_return (message); + if (reply == NULL) +@@ -325,7 +328,7 @@ bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection, + + dbus_message_unref (reply); + dbus_free_string_array (services); +- return TRUE; ++ return BUS_RESULT_TRUE; + + oom: + if (reply != NULL) +@@ -334,7 +337,7 @@ oom: + dbus_free_string_array (services); + + BUS_SET_OOM (error); +- return FALSE; ++ return BUS_RESULT_FALSE; + } + + #endif +diff --git a/bus/stats.h b/bus/stats.h +index dcb022c..683fa17 100644 +--- a/bus/stats.h ++++ b/bus/stats.h +@@ -25,17 +25,17 @@ + + #define BUS_INTERFACE_STATS "org.freedesktop.DBus.Debug.Stats" + +-dbus_bool_t bus_stats_handle_get_stats (DBusConnection *connection, ++BusResult bus_stats_handle_get_stats (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); + +-dbus_bool_t bus_stats_handle_get_connection_stats (DBusConnection *connection, ++BusResult bus_stats_handle_get_connection_stats (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); + +-dbus_bool_t bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection, ++BusResult bus_stats_handle_get_all_match_rules (DBusConnection *caller_connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); +-- +2.17.2 + diff --git a/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch new file mode 100644 index 00000000..8ce441b0 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0005-Perform-Cynara-runtime-policy-checks-by-default.patch @@ -0,0 +1,175 @@ +From 69ba571e0daa0a7a9aa6c6b5be5d3338a89d144a Mon Sep 17 00:00:00 2001 +From: Jacek Bukarewicz +Date: Tue, 23 Jun 2015 11:08:48 +0200 +Subject: Perform Cynara runtime policy checks by default +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This change introduces http://tizen.org/privilege/internal/dbus privilege +which is supposed to be available only to trusted system resources. +Checks for this privilege are used in place of certain allow rules to +make security policy more strict. + +For system bus sending and receiving signals now requires +http://tizen.org/privilege/internal/dbus privilege. Requesting name +ownership and sending methods is still denied by default. + +For session bus http://tizen.org/privilege/internal/dbus privilege +is now required for requesting name, calling methods, sending and receiving +signals. + +Services are supposed to override these default settings to implement their +own security policy. + +Cherry picked from e8610297cf7031e94eb314a2e8c11246f4405403 by Jose Bollo + +Updated for dbus 1.10.20 by Scott Murray and José Bollo + +Signed-off-by: Jacek Bukarewicz +Signed-off-by: José Bollo +Signed-off-by: Scott Murray + +diff --git a/bus/activation.c b/bus/activation.c +index ffdc6fc..6a95b95 100644 +--- a/bus/activation.c ++++ b/bus/activation.c +@@ -1837,22 +1837,32 @@ bus_activation_activate_service (BusActivation *activation, + } + + if (auto_activation && +- entry != NULL && +- BUS_RESULT_TRUE != bus_context_check_security_policy (activation->context, +- transaction, +- connection, /* sender */ +- NULL, /* addressed recipient */ +- NULL, /* proposed recipient */ +- activation_message, +- entry, +- error, +- NULL)) +- { +- _DBUS_ASSERT_ERROR_IS_SET (error); +- _dbus_verbose ("activation not authorized: %s: %s\n", +- error != NULL ? error->name : "(error ignored)", +- error != NULL ? error->message : "(error ignored)"); +- return FALSE; ++ entry != NULL) ++ { ++ BusResult result; ++ ++ result = bus_context_check_security_policy (activation->context, ++ transaction, ++ connection, /* sender */ ++ NULL, /* addressed recipient */ ++ NULL, /* proposed recipient */ ++ activation_message, ++ entry, ++ error, ++ NULL); ++ if (result == BUS_RESULT_FALSE) ++ { ++ _DBUS_ASSERT_ERROR_IS_SET (error); ++ _dbus_verbose ("activation not authorized: %s: %s\n", ++ error != NULL ? error->name : "(error ignored)", ++ error != NULL ? error->message : "(error ignored)"); ++ return FALSE; ++ } ++ if (result == BUS_RESULT_LATER) ++ { ++ /* TODO */ ++ _dbus_verbose ("ALERT FIX ME!!!!!!!!!!!!!!!"); ++ } + } + + /* Bypass the registry lookup if we're auto-activating, bus_dispatch would not +diff --git a/bus/session.conf.in b/bus/session.conf.in +index affa7f1..157dfb4 100644 +--- a/bus/session.conf.in ++++ b/bus/session.conf.in +@@ -27,12 +27,32 @@ + + + +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +diff --git a/bus/system.conf.in b/bus/system.conf.in +index f139b55..19d0c04 100644 +--- a/bus/system.conf.in ++++ b/bus/system.conf.in +@@ -50,17 +50,20 @@ + + + +- ++ ++ ++ ++ +- + + + +- ++ + + + +- + + + + ++ ++ ++ + + +Date: Wed, 29 May 2019 16:32:50 +0200 +Subject: Fix gcc 8 warnings +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Compiling with -Werror isn't possible without adaptation +of the code. + +Signed-off-by: José Bollo + +diff --git a/bus/config-parser-trivial.c b/bus/config-parser-trivial.c +index dd65c6d..23dedb4 100644 +--- a/bus/config-parser-trivial.c ++++ b/bus/config-parser-trivial.c +@@ -194,6 +194,7 @@ bus_config_parser_start_element (BusConfigParser *parser, + case ELEMENT_POLICY: + case ELEMENT_LIMIT: + case ELEMENT_ALLOW: ++ case ELEMENT_CHECK: + case ELEMENT_DENY: + case ELEMENT_FORK: + case ELEMENT_PIDFILE: +@@ -316,6 +317,7 @@ bus_config_parser_content (BusConfigParser *parser, + case ELEMENT_POLICY: + case ELEMENT_LIMIT: + case ELEMENT_ALLOW: ++ case ELEMENT_CHECK: + case ELEMENT_DENY: + case ELEMENT_FORK: + case ELEMENT_PIDFILE: +diff --git a/bus/config-parser.c b/bus/config-parser.c +index b5f1dd1..7f91469 100644 +--- a/bus/config-parser.c ++++ b/bus/config-parser.c +@@ -3408,6 +3408,7 @@ elements_equal (const Element *a, + case ELEMENT_LISTEN: + case ELEMENT_AUTH: + case ELEMENT_ALLOW: ++ case ELEMENT_CHECK: + case ELEMENT_DENY: + case ELEMENT_FORK: + case ELEMENT_PIDFILE: +diff --git a/bus/desktop-file.c b/bus/desktop-file.c +index 4459858..4a27ee3 100644 +--- a/bus/desktop-file.c ++++ b/bus/desktop-file.c +@@ -382,7 +382,7 @@ is_valid_section_name (const char *name) + + while (*name) + { +- if (!((*name >= 'A' && *name <= 'Z') || (*name >= 'a' || *name <= 'z') || ++ if (!((*name >= ' ' && *name <= '~' && *name != '[' && *name != ']') || + *name == '\n' || *name == '\t')) + return FALSE; + +diff --git a/bus/driver.h b/bus/driver.h +index 183c28b..05e9886 100644 +--- a/bus/driver.h ++++ b/bus/driver.h +@@ -66,5 +66,7 @@ dbus_bool_t bus_driver_send_ack_reply (DBusConnection *connection, + BusTransaction *transaction, + DBusMessage *message, + DBusError *error); ++dbus_bool_t bus_driver_check_message_is_for_us (DBusMessage *message, ++ DBusError *error); + + #endif /* BUS_DRIVER_H */ +diff --git a/bus/policy.c b/bus/policy.c +index 27b66d1..c4c3d4b 100644 +--- a/bus/policy.c ++++ b/bus/policy.c +@@ -1098,6 +1098,7 @@ bus_client_policy_check_can_send (DBusConnection *sender, + case BUS_POLICY_RULE_ACCESS_ALLOW: + result = BUS_RESULT_TRUE; + break; ++ default: + case BUS_POLICY_RULE_ACCESS_DENY: + result = BUS_RESULT_FALSE; + break; +@@ -1350,6 +1351,7 @@ bus_client_policy_check_can_receive (BusClientPolicy *policy, + case BUS_POLICY_RULE_ACCESS_ALLOW: + result = BUS_RESULT_TRUE; + break; ++ default: + case BUS_POLICY_RULE_ACCESS_DENY: + result = BUS_RESULT_FALSE; + break; +@@ -1443,6 +1445,7 @@ bus_rules_check_can_own (DBusList *rules, + case BUS_POLICY_RULE_ACCESS_ALLOW: + result = BUS_RESULT_TRUE; + break; ++ default: + case BUS_POLICY_RULE_ACCESS_DENY: + result = BUS_RESULT_FALSE; + break; +diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c +index 565e089..b96c735 100644 +--- a/dbus/dbus-sysdeps-unix.c ++++ b/dbus/dbus-sysdeps-unix.c +@@ -4364,7 +4364,11 @@ _dbus_daemon_unpublish_session_bus_address (void) + dbus_bool_t + _dbus_get_is_errno_eagain_or_ewouldblock (int e) + { ++#if EAGAIN != EWOULDBLOCK + return e == EAGAIN || e == EWOULDBLOCK; ++#else ++ return e == EAGAIN; ++#endif + } + + /** +diff --git a/tools/dbus-send.c b/tools/dbus-send.c +index 6fb65fe..d853b39 100644 +--- a/tools/dbus-send.c ++++ b/tools/dbus-send.c +@@ -293,10 +293,12 @@ main (int argc, char *argv[]) + { + is_bus = TRUE; + } ++#if 0 + else if (arg[2] == 'p') /* peer */ + { + is_bus = FALSE; + } ++#endif + else /* address; keeping backwards compatibility */ + { + is_bus = FALSE; +-- +2.17.2 + diff --git a/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0007-Fix-SIGSEGV-on-disconnections.patch b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0007-Fix-SIGSEGV-on-disconnections.patch new file mode 100644 index 00000000..b5ee138e --- /dev/null +++ b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus-cynara/0007-Fix-SIGSEGV-on-disconnections.patch @@ -0,0 +1,109 @@ +From 2a1c1c3f9264f53abc439ec44b33fdca8ffbb803 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Fri, 16 Aug 2019 13:29:23 +0200 +Subject: [PATCH 7/8] Fix SIGSEGV on disconnections +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Sometime, at start of the system, dbus-daemon was crashing +because a pending authorisation were reactivating a closed +connection. + +Also, clean unused function. + +Signed-off-by: José Bollo +--- + bus/check.c | 5 +++++ + bus/check.h | 1 + + bus/connection.c | 14 +++----------- + bus/connection.h | 3 --- + 4 files changed, 9 insertions(+), 14 deletions(-) + +diff --git a/bus/check.c b/bus/check.c +index f3d283f..b73d08b 100644 +--- a/bus/check.c ++++ b/bus/check.c +@@ -617,3 +617,8 @@ bus_deferred_message_response_received (BusDeferredMessage *deferred_message, + } + } + ++void ++bus_deferred_message_abort (BusDeferredMessage *deferred_message) ++{ ++ deferred_message->response_callback = NULL; ++} +diff --git a/bus/check.h b/bus/check.h +index 9c13c18..d718a69 100644 +--- a/bus/check.h ++++ b/bus/check.h +@@ -93,6 +93,7 @@ void bus_deferred_message_set_policy_check_info (BusDeferredMessa + const char *privilege); + dbus_bool_t bus_deferred_message_check_message_limits (BusDeferredMessage *deferred_message, + DBusError *error); ++void bus_deferred_message_abort (BusDeferredMessage *deferred_message); + + + #ifdef DBUS_ENABLE_EMBEDDED_TESTS +diff --git a/bus/connection.c b/bus/connection.c +index ee93384..b520d57 100644 +--- a/bus/connection.c ++++ b/bus/connection.c +@@ -47,6 +47,7 @@ + #define MAX_LOG_COMMAND_LEN 50 + + static void bus_connection_remove_transactions (DBusConnection *connection); ++static void bus_connection_clear_deferred_messages (DBusConnection *connection); + + typedef struct + { +@@ -2821,17 +2822,7 @@ bus_connection_pop_deferred_message (DBusConnection *connection) + return NULL; + } + +-dbus_bool_t +-bus_connection_putback_deferred_message (DBusConnection *connection, BusDeferredMessage *message) +-{ +- BusConnectionData *d = BUS_CONNECTION_DATA(connection); +- if (_dbus_list_prepend(&d->deferred_messages, message)) +- { +- return TRUE; +- } +- return FALSE; +-} +- ++static + void + bus_connection_clear_deferred_messages (DBusConnection *connection) + { +@@ -2846,6 +2837,7 @@ bus_connection_clear_deferred_messages (DBusConnection *connection) + next = _dbus_list_get_next_link (&d->deferred_messages, link); + message = link->data; + ++ bus_deferred_message_abort(message); + bus_deferred_message_unref(message); + _dbus_list_remove_link(&d->deferred_messages, link); + +diff --git a/bus/connection.h b/bus/connection.h +index 97dae96..6af7bf1 100644 +--- a/bus/connection.h ++++ b/bus/connection.h +@@ -90,15 +90,12 @@ dbus_bool_t bus_connection_queue_deferred_message (DBusConnection *con + BusDeferredMessage *message, + dbus_bool_t prepend); + BusDeferredMessage *bus_connection_pop_deferred_message (DBusConnection *connection); +-dbus_bool_t bus_connection_putback_deferred_message (DBusConnection *connection, +- BusDeferredMessage *message); + void bus_connection_remove_deferred_message (DBusConnection *connection, + BusDeferredMessage *message); + dbus_bool_t bus_connection_replace_deferred_message (DBusConnection *connection, + BusDeferredMessage *oldMessage, + BusDeferredMessage *newMessage); + void bus_connection_dispatch_deferred (DBusConnection *connection); +-void bus_connection_clear_deferred_messages (DBusConnection *connection); + + + /* called by signals.c */ +-- +2.17.2 + diff --git a/meta-agl/meta-security/recipes-core/dbus-cynara/dbus_1.12.10.bbappend b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus_1.12.10.bbappend new file mode 100644 index 00000000..5cbf65ef --- /dev/null +++ b/meta-agl/meta-security/recipes-core/dbus-cynara/dbus_1.12.10.bbappend @@ -0,0 +1,15 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/dbus-cynara:" + +SRC_URI_append_class-target = "\ + file://0001-Integration-of-Cynara-asynchronous-security-checks.patch \ + file://0002-Disable-message-dispatching-when-send-rule-result-is.patch \ + file://0003-Handle-unavailability-of-policy-results-for-broadcas.patch \ + file://0004-Add-own-rule-result-unavailability-handling.patch \ + file://0005-Perform-Cynara-runtime-policy-checks-by-default.patch \ + file://0006-Fix-gcc-8-warnings.patch \ + file://0007-Fix-SIGSEGV-on-disconnections.patch \ +" + +DEPENDS_append_class-target = " cynara smack" +EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('DISTRO_FEATURES','smack','--enable-cynara --disable-selinux','',d)}" + diff --git a/meta-agl/meta-security/recipes-core/packagegroups/packagegroup-security-framework.bb b/meta-agl/meta-security/recipes-core/packagegroups/packagegroup-security-framework.bb new file mode 100644 index 00000000..6dd575df --- /dev/null +++ b/meta-agl/meta-security/recipes-core/packagegroups/packagegroup-security-framework.bb @@ -0,0 +1,23 @@ +SUMMARY = "Security middleware components" +LICENSE = "MIT" + +inherit packagegroup + +# Install Cynara and security-manager by default if (and only if) +# Smack is enabled. +# +# Cynara does not have a hard dependency on Smack security, +# but is meant to be used with it. security-manager however +# links against smack and expects Smack to be active, +# so we do not have any choice. +# +# Without configuration, security-manager is not usable. We use +# the policy packaged from the upstream source code here. Adapting +# it for the distro can be done by patching that source. +RDEPENDS_${PN}_append_with-lsm-smack = " \ + cynara \ + security-manager \ + security-manager-policy \ + smacknet \ + smack-system-setup \ +" diff --git a/meta-agl/meta-security/recipes-core/smack-system-setup/files/55-udev-smack-default.rules b/meta-agl/meta-security/recipes-core/smack-system-setup/files/55-udev-smack-default.rules new file mode 100644 index 00000000..eca65292 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/smack-system-setup/files/55-udev-smack-default.rules @@ -0,0 +1,27 @@ +# do not edit this file, it will be overwritten on update + +KERNEL=="null", SECLABEL{smack}="*" +KERNEL=="zero", SECLABEL{smack}="*" +KERNEL=="console", SECLABEL{smack}="*" +KERNEL=="kmsg", SECLABEL{smack}="*" +KERNEL=="video*", SECLABEL{smack}="*" +KERNEL=="card*", SECLABEL{smack}="*" +KERNEL=="ptmx", SECLABEL{smack}="*" +KERNEL=="tty", SECLABEL{smack}="*" +KERNEL=="rfkill", SECLABEL{smack}="*" + +SUBSYSTEM=="most_cdev_aim", SECLABEL{smack}="*" + +SUBSYSTEM=="graphics", GROUP="video", SECLABEL{smack}="*" +SUBSYSTEM=="drm", GROUP="video", SECLABEL{smack}="*" +SUBSYSTEM=="dvb", GROUP="video", SECLABEL{smack}="*" +SUBSYSTEM=="sound", GROUP="audio", SECLABEL{smack}="*" + +SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666", SECLABEL{smack}="*" +SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666", SECLABEL{smack}="*" +SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620", SECLABEL{smack}="*" +SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty", SECLABEL{smack}="*" +KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout", SECLABEL{smack}="*" + +SUBSYSTEM=="input", KERNEL=="mouse*|mice|event*", MODE="0640", SECLABEL{smack}="*" +SUBSYSTEM=="input", KERNEL=="ts[0-9]*|uinput", MODE="0640", SECLABEL{smack}="*" diff --git a/meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-journald.service.conf b/meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-journald.service.conf new file mode 100644 index 00000000..7035a141 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-journald.service.conf @@ -0,0 +1,16 @@ +# Run systemd-journald with the hat ("^") Smack label. +# +# The journal daemon needs global read access to gather information +# about the services spawned by systemd. The hat label is intended +# for this purpose. The journal daemon is the only part of the +# System domain that needs read access to the User domain. Giving +# the journal daemon the hat label means that we can remove the +# System domain's read access to the User domain and we can avoid +# hard-coding a specific label name for that domain. +# +# Original author: Casey Schaufler +# +# This is considered a configuration change and thus distro specific. +[Service] +SmackProcessLabel=^ + diff --git a/meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-tmpfiles-setup.service.conf b/meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-tmpfiles-setup.service.conf new file mode 100644 index 00000000..db43c8c5 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/smack-system-setup/files/systemd-tmpfiles-setup.service.conf @@ -0,0 +1,2 @@ +[Service] +ExecStartPost=/bin/sh -c '([ ! -d /var/tmp ] || chsmack -L -a \"*\" /var/tmp) && ([ ! -d /var/log ] || chsmack -L -a System::Log /var/log && chsmack -L -t /var/log)' diff --git a/meta-agl/meta-security/recipes-core/smack-system-setup/files/tmp.mount.conf b/meta-agl/meta-security/recipes-core/smack-system-setup/files/tmp.mount.conf new file mode 100644 index 00000000..388986e8 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/smack-system-setup/files/tmp.mount.conf @@ -0,0 +1,12 @@ +# Mount /tmp publicly accessable. Based on patch by Michael Demeter . +# Upstream systemd temporarily had SmackFileSystemRoot for this (https://github.com/systemd/systemd/pull/1664), +# but it was removed again (https://github.com/systemd/systemd/issues/1696) because +# util-linux mount will ignore smackfsroot when Smack is not active. However, +# busybox is not that intelligent. +# +# When using busybox mount, adding smackfsroot=* and booting without +# Smack (i.e. security=none), tmp.mount will fail with an error about +# "Bad mount option smackfsroot". +[Mount] +Options=smackfsroot=* + diff --git a/meta-agl/meta-security/recipes-core/smack-system-setup/smack-system-setup_1.bb b/meta-agl/meta-security/recipes-core/smack-system-setup/smack-system-setup_1.bb new file mode 100644 index 00000000..49b12ad3 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/smack-system-setup/smack-system-setup_1.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "setup of a system using smack" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "\ + file://55-udev-smack-default.rules \ + file://systemd-journald.service.conf \ + file://systemd-tmpfiles-setup.service.conf \ + file://tmp.mount.conf \ +" + +RDEPENDS_${PN}_append_with-lsm-smack = " smack" + +do_install_append_with-lsm-smack() { + # tuning systemd units + install -Dm0644 ${WORKDIR}/systemd-tmpfiles-setup.service.conf \ + ${D}${systemd_unitdir}/system/systemd-tmpfiles-setup.service.d/smack.conf + install -Dm0644 ${WORKDIR}/systemd-journald.service.conf \ + ${D}${systemd_unitdir}/system/systemd-journald.service.d/smack.conf + install -Dm0644 ${WORKDIR}/tmp.mount.conf \ + ${D}${systemd_unitdir}/system/tmp.mount.d/smack.conf + + # add udev rules + install -Dm0644 ${WORKDIR}/55-udev-smack-default.rules \ + ${D}${sysconfdir}/udev/rules.d/55-udev-smack-default.rules +} + +FILES_${PN} += "${systemd_unitdir}" diff --git a/meta-agl/meta-security/recipes-core/systemd/systemd/0001-Switch-Smack-label-earlier.patch b/meta-agl/meta-security/recipes-core/systemd/systemd/0001-Switch-Smack-label-earlier.patch new file mode 100644 index 00000000..46445be7 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/systemd/systemd/0001-Switch-Smack-label-earlier.patch @@ -0,0 +1,52 @@ +From 6cc74075797edb6f698cb7f312bb1c3d8cc6cb28 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Thu, 12 Oct 2017 17:17:56 +0200 +Subject: [PATCH] Switch Smack label earlier +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Switching label after removing capability isn't +possible. + +Change-Id: Ib7dac8f071f36119520ed3205d743c1e3df3cd5e +Signed-off-by: José Bollo +--- + src/core/execute.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/core/execute.c b/src/core/execute.c +index d72e5bf08..0abffd569 100644 +--- a/src/core/execute.c ++++ b/src/core/execute.c +@@ -2707,6 +2707,13 @@ static int exec_child( + } + } + ++ r = setup_smack(context, command); ++ if (r < 0) { ++ *exit_status = EXIT_SMACK_PROCESS_LABEL; ++ *error_message = strdup("Failed to set SMACK process label"); ++ return r; ++ } ++ + if (!cap_test_all(context->capability_bounding_set)) { + r = capability_bounding_set_drop(context->capability_bounding_set, false); + if (r < 0) { +@@ -2775,13 +2782,6 @@ static int exec_child( + } + #endif + +- r = setup_smack(context, command); +- if (r < 0) { +- *exit_status = EXIT_SMACK_PROCESS_LABEL; +- *error_message = strdup("Failed to set SMACK process label"); +- return r; +- } +- + #ifdef HAVE_APPARMOR + if (context->apparmor_profile && mac_apparmor_use()) { + r = aa_change_onexec(context->apparmor_profile); +-- +2.14.3 + diff --git a/meta-agl/meta-security/recipes-core/systemd/systemd_239.bbappend b/meta-agl/meta-security/recipes-core/systemd/systemd_239.bbappend new file mode 100644 index 00000000..789c05f8 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/systemd/systemd_239.bbappend @@ -0,0 +1,40 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# Ensures systemd runs with label "System" +EXTRA_OEMESON_append_with-lsm-smack = " -Dsmack-run-label=System" + +################################################################################## +# Maintaining trivial, non-upstreamable configuration changes as patches +# is tedious. But in same cases (like early mounting of special directories) +# the configuration has to be in code. We make these changes here directly. +################################################################################## +do_patch[prefuncs] += "patch_systemd" +do_patch[vardeps] += "patch_systemd" +patch_systemd() { + # Handling of /run and /sys/fs/cgroup. Make /run a transmuting directory to + # enable systemd communications with services in the User domain. + # Original patch by Michael Demeter . + # + # We simplify the patching by touching only lines which check the result of + # mac_smack_use(). Those are the ones which are used when Smack is active. + # + # smackfsroot=* on /sys/fs/cgroup may be upstreamable, but smackfstransmute=System::Run + # is too distro specific (depends on Smack rules) and thus has to remain here. + sed -i -e 's;\("/sys/fs/cgroup", *"[^"]*", *"[^"]*\)\(.*mac_smack_use.*\);\1,smackfsroot=*\2;' \ + -e 's;\("/run", *"[^"]*", *"[^"]*\)\(.*mac_smack_use.*\);\1,smackfstransmute=System::Run\2;' \ + ${S}/src/core/mount-setup.c +} + +################################################################################## +# What follows is temporary. +# This is a solution to the Bug-AGL SPEC-539 +# (see https://jira.automotivelinux.org/browse/SPEC-539). +# +# It renames the file "touchscreen.rules" to "55-touchscreen.rules" +# This comes with the recipe systemd_230/234 of poky (meta/recipes-core/systemd) +# It should be removed when poky changes. +################################################################################## +do_install_prepend() { + mv ${WORKDIR}/touchscreen.rules ${WORKDIR}/55-touchscreen.rules || true +} + diff --git a/meta-agl/meta-security/recipes-core/util-linux/util-linux_%.bbappend b/meta-agl/meta-security/recipes-core/util-linux/util-linux_%.bbappend new file mode 100644 index 00000000..05286f80 --- /dev/null +++ b/meta-agl/meta-security/recipes-core/util-linux/util-linux_%.bbappend @@ -0,0 +1,8 @@ +# Enabling Smack support in util-linux enables special support +# in [lib]mount for Smack mount options: they get removed if +# Smack is not active in the current kernel. Important for +# booting with "security=none" when userspace otherwise is +# compiled to use Smack. + +PACKAGECONFIG_append_with-lsm-smack_class-target = " smack" +PACKAGECONFIG[smack] = "--with-smack, --without-smack" diff --git a/meta-agl/meta-security/recipes-kernel/linux/linux-%.bbappend b/meta-agl/meta-security/recipes-kernel/linux/linux-%.bbappend new file mode 100644 index 00000000..717d32e3 --- /dev/null +++ b/meta-agl/meta-security/recipes-kernel/linux/linux-%.bbappend @@ -0,0 +1,17 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" + +IS_KERNEL_RECIPE := "${@bb.data.inherits_class('kernel', d) and 'yes' or 'no'}" +SMACK_KERNEL_SRC_URI_no = "" +SMACK_KERNEL_SRC_URI_yes = "" + +# Kernel config fragment enabling Smack, without making it the default explicitly. +SMACK_KERNEL_SRC_URI_yes += "file://smack.cfg" + +# When added, set Smack as the default LSM. +SMACK_DEFAULT_SECURITY_CFG = "file://smack-default-lsm.cfg" + +# Add it by default, can be overridden by changing this variable here. +SMACK_DEFAULT_SECURITY ??= "${SMACK_DEFAULT_SECURITY_CFG}" +SMACK_KERNEL_SRC_URI_yes += " ${SMACK_DEFAULT_SECURITY}" + +SRC_URI_append_with-lsm-smack = "${SMACK_KERNEL_SRC_URI_${IS_KERNEL_RECIPE}}" diff --git a/meta-agl/meta-security/recipes-kernel/linux/linux/audit.cfg b/meta-agl/meta-security/recipes-kernel/linux/linux/audit.cfg new file mode 100644 index 00000000..214dbe33 --- /dev/null +++ b/meta-agl/meta-security/recipes-kernel/linux/linux/audit.cfg @@ -0,0 +1,2 @@ +CONFIG_AUDIT=y +CONFIG_AUDITSYSCALL=y diff --git a/meta-agl/meta-security/recipes-kernel/linux/linux/smack-default-lsm.cfg b/meta-agl/meta-security/recipes-kernel/linux/linux/smack-default-lsm.cfg new file mode 100644 index 00000000..b5c48454 --- /dev/null +++ b/meta-agl/meta-security/recipes-kernel/linux/linux/smack-default-lsm.cfg @@ -0,0 +1,2 @@ +CONFIG_DEFAULT_SECURITY="smack" +CONFIG_DEFAULT_SECURITY_SMACK=y diff --git a/meta-agl/meta-security/recipes-kernel/linux/linux/smack.cfg b/meta-agl/meta-security/recipes-kernel/linux/linux/smack.cfg new file mode 100644 index 00000000..62f465a4 --- /dev/null +++ b/meta-agl/meta-security/recipes-kernel/linux/linux/smack.cfg @@ -0,0 +1,8 @@ +CONFIG_IP_NF_SECURITY=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_SECURITY=y +CONFIG_SECURITY_SMACK=y +CONFIG_TMPFS_XATTR=y diff --git a/meta-agl/meta-security/recipes-security/audit/audit/add-system-call-table-for-ARM.patch b/meta-agl/meta-security/recipes-security/audit/audit/add-system-call-table-for-ARM.patch new file mode 100644 index 00000000..ad94d11b --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/add-system-call-table-for-ARM.patch @@ -0,0 +1,46 @@ +From 52ff74be2f01182ed9d4fcc3da059512fad63d72 Mon Sep 17 00:00:00 2001 +From: Han Chao +Date: Thu, 27 Feb 2014 14:58:57 +0800 +Subject: [PATCH] add system call table for ARM. + +This change enable audit system call on ARM. +Add arm System call table on machinetabs.h. +Audit system call need enable kernel config CONFIG_AUDITSYSCALL. + +Signed-off-by: Han Chao +--- + lib/machinetabs.h | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/lib/machinetabs.h b/lib/machinetabs.h +index ec2d033..1c2e284 100644 +--- a/lib/machinetabs.h ++++ b/lib/machinetabs.h +@@ -1,10 +1,11 @@ +-/* This is a generated file, see Makefile.am for its inputs. */ +-static const char machine_strings[] = "i386\0i486\0i586\0i686\0ia64\0ppc\0ppc64\0s390\0s390x\0x86_64"; ++/* Such is aways generated file, see Makefile.am for its inputs. ++ * But this version is not generated file, which is for ARM. */ ++static const char machine_strings[] = "armeb\0armv5tejl\0armv5tel\0armv6l\0armv7l"; + static const unsigned machine_s2i_s[] = { +- 0,5,10,15,20,25,29,35,40,46, ++ 0,6,16,25,32, + }; + static const int machine_s2i_i[] = { +- 0,0,0,0,2,4,3,6,5,1, ++ 8,8,8,8,8, + }; + static int machine_s2i(const char *s, int *value) { + size_t len, i; +@@ -19,7 +20,7 @@ static int machine_s2i(const char *s, int *value) { + } + } + static const unsigned machine_i2s_direct[] = { +- 0,46,20,29,25,40,35, ++ 39,85,59,68,64, + }; + static const char *machine_i2s(int v) { + return i2s_direct__(machine_strings, machine_i2s_direct, 0, 6, v); +-- +1.7.9.5 + diff --git a/meta-agl/meta-security/recipes-security/audit/audit/audit-for-cross-compiling.patch b/meta-agl/meta-security/recipes-security/audit/audit/audit-for-cross-compiling.patch new file mode 100644 index 00000000..60a23a8a --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/audit-for-cross-compiling.patch @@ -0,0 +1,2938 @@ +From f73f654734c5f0d1a6568c6c8fba232b01f919f4 Mon Sep 17 00:00:00 2001 +From: Joe MacDonald +Date: Wed, 23 Oct 2013 16:02:34 -0400 +Subject: [PATCH] audit: use generated headers for cross compiling + +In the same vein as the patch for audit 2.2.1 (commit: 6c77455b), we generate +the headers which are inherently architecture specific but portable on a +convenient platform and use them for all platforms. + +Upstream-Status: Inappropriate [cross-compile specific] + +Signed-off-by: Joe MacDonald +--- + auparse/Makefile.am | 200 --------------------------------------------- + auparse/accesstabs.h | 6 ++ + auparse/captabs.h | 14 ++++ + auparse/clocktabs.h | 8 ++ + auparse/clone-flagtabs.h | 10 +++ + auparse/epoll_ctls.h | 8 ++ + auparse/famtabs.h | 14 ++++ + auparse/fcntl-cmdtabs.h | 17 ++++ + auparse/flagtabs.h | 6 ++ + auparse/icmptypetabs.h | 10 +++ + auparse/ip6optnametabs.h | 20 +++++ + auparse/ipccmdtabs.h | 6 ++ + auparse/ipctabs.h | 11 +++ + auparse/ipoptnametabs.h | 17 ++++ + auparse/mmaptabs.h | 8 ++ + auparse/mounttabs.h | 10 +++ + auparse/nfprototabs.h | 9 ++ + auparse/open-flagtabs.h | 8 ++ + auparse/persontabs.h | 17 ++++ + auparse/pktoptnametabs.h | 10 +++ + auparse/prctl_opttabs.h | 14 ++++ + auparse/prottabs.h | 6 ++ + auparse/ptracetabs.h | 17 ++++ + auparse/recvtabs.h | 8 ++ + auparse/rlimittabs.h | 10 +++ + auparse/schedtabs.h | 8 ++ + auparse/seccomptabs.h | 11 +++ + auparse/seektabs.h | 8 ++ + auparse/shm_modetabs.h | 6 ++ + auparse/signaltabs.h | 14 ++++ + auparse/sockleveltabs.h | 12 +++ + auparse/sockoptnametabs.h | 23 ++++++ + auparse/socktabs.h | 10 +++ + auparse/socktypetabs.h | 8 ++ + auparse/tcpoptnametabs.h | 12 +++ + auparse/typetabs.h | 35 ++++++++ + auparse/umounttabs.h | 6 ++ + lib/Makefile.am | 106 ------------------------ + lib/aarch64_tables.h | 125 ++++++++++++++++++++++++++++ + lib/actiontabs.h | 26 ++++++ + lib/alpha_tables.h | 196 ++++++++++++++++++++++++++++++++++++++++++++ + lib/armeb_tables.h | 165 +++++++++++++++++++++++++++++++++++++ + lib/errtabs.h | 78 ++++++++++++++++++ + lib/fieldtabs.h | 49 +++++++++++ + lib/flagtabs.h | 26 ++++++ + lib/ftypetabs.h | 29 +++++++ + lib/i386_tables.h | 163 ++++++++++++++++++++++++++++++++++++ + lib/ia64_tables.h | 147 +++++++++++++++++++++++++++++++++ + lib/machinetabs.h | 26 ++++++ + lib/msg_typetabs.h | 104 +++++++++++++++++++++++ + lib/optabs.h | 11 +++ + lib/ppc_tables.h | 163 ++++++++++++++++++++++++++++++++++++ + lib/s390_tables.h | 153 ++++++++++++++++++++++++++++++++++ + lib/s390x_tables.h | 144 ++++++++++++++++++++++++++++++++ + lib/x86_64_tables.h | 150 ++++++++++++++++++++++++++++++++++ + 55 files changed, 2172 insertions(+), 306 deletions(-) + create mode 100644 auparse/accesstabs.h + create mode 100644 auparse/captabs.h + create mode 100644 auparse/clocktabs.h + create mode 100644 auparse/clone-flagtabs.h + create mode 100644 auparse/epoll_ctls.h + create mode 100644 auparse/famtabs.h + create mode 100644 auparse/fcntl-cmdtabs.h + create mode 100644 auparse/flagtabs.h + create mode 100644 auparse/icmptypetabs.h + create mode 100644 auparse/ip6optnametabs.h + create mode 100644 auparse/ipccmdtabs.h + create mode 100644 auparse/ipctabs.h + create mode 100644 auparse/ipoptnametabs.h + create mode 100644 auparse/mmaptabs.h + create mode 100644 auparse/mounttabs.h + create mode 100644 auparse/nfprototabs.h + create mode 100644 auparse/open-flagtabs.h + create mode 100644 auparse/persontabs.h + create mode 100644 auparse/pktoptnametabs.h + create mode 100644 auparse/prctl_opttabs.h + create mode 100644 auparse/prottabs.h + create mode 100644 auparse/ptracetabs.h + create mode 100644 auparse/recvtabs.h + create mode 100644 auparse/rlimittabs.h + create mode 100644 auparse/schedtabs.h + create mode 100644 auparse/seccomptabs.h + create mode 100644 auparse/seektabs.h + create mode 100644 auparse/shm_modetabs.h + create mode 100644 auparse/signaltabs.h + create mode 100644 auparse/sockleveltabs.h + create mode 100644 auparse/sockoptnametabs.h + create mode 100644 auparse/socktabs.h + create mode 100644 auparse/socktypetabs.h + create mode 100644 auparse/tcpoptnametabs.h + create mode 100644 auparse/typetabs.h + create mode 100644 auparse/umounttabs.h + create mode 100644 lib/aarch64_tables.h + create mode 100644 lib/actiontabs.h + create mode 100644 lib/alpha_tables.h + create mode 100644 lib/armeb_tables.h + create mode 100644 lib/errtabs.h + create mode 100644 lib/fieldtabs.h + create mode 100644 lib/flagtabs.h + create mode 100644 lib/ftypetabs.h + create mode 100644 lib/i386_tables.h + create mode 100644 lib/ia64_tables.h + create mode 100644 lib/machinetabs.h + create mode 100644 lib/msg_typetabs.h + create mode 100644 lib/optabs.h + create mode 100644 lib/ppc_tables.h + create mode 100644 lib/s390_tables.h + create mode 100644 lib/s390x_tables.h + create mode 100644 lib/x86_64_tables.h + +diff --git a/auparse/Makefile.am b/auparse/Makefile.am +index f0ca18f..7d1527c 100644 +--- a/auparse/Makefile.am ++++ b/auparse/Makefile.am +@@ -53,203 +53,3 @@ BUILT_SOURCES = accesstabs.h captabs.h clocktabs.h clone-flagtabs.h \ + seektabs.h shm_modetabs.h signaltabs.h sockoptnametabs.h \ + socktabs.h sockleveltabs.h socktypetabs.h \ + tcpoptnametabs.h typetabs.h umounttabs.h +-noinst_PROGRAMS = gen_accesstabs_h gen_captabs_h gen_clock_h \ +- gen_clone-flagtabs_h \ +- gen_epoll_ctls_h gen_famtabs_h \ +- gen_fcntl-cmdtabs_h gen_flagtabs_h \ +- gen_icmptypetabs_h gen_ipctabs_h gen_ipccmdtabs_h\ +- gen_ipoptnametabs_h gen_ip6optnametabs_h gen_nfprototabs_h \ +- gen_mmaptabs_h gen_mounttabs_h \ +- gen_open-flagtabs_h gen_persontabs_h \ +- gen_prctl_opttabs_h gen_pktoptnametabs_h gen_prottabs_h \ +- gen_recvtabs_h gen_rlimit_h gen_ptracetabs_h \ +- gen_schedtabs_h gen_seccomptabs_h \ +- gen_seektabs_h gen_shm_modetabs_h gen_signals_h \ +- gen_sockoptnametabs_h gen_socktabs_h gen_sockleveltabs_h \ +- gen_socktypetabs_h gen_tcpoptnametabs_h gen_typetabs_h \ +- gen_umounttabs_h +- +-gen_accesstabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h accesstab.h +-gen_accesstabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="accesstab.h"' +-accesstabs.h: gen_accesstabs_h Makefile +- ./gen_accesstabs_h --i2s-transtab access > $@ +- +-gen_captabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h captab.h +-gen_captabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="captab.h"' +-captabs.h: gen_captabs_h Makefile +- ./gen_captabs_h --i2s cap > $@ +- +-gen_clock_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h clocktab.h +-gen_clock_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="clocktab.h"' +-clocktabs.h: gen_clock_h Makefile +- ./gen_clock_h --i2s clock > $@ +- +-gen_clone_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \ +- clone-flagtab.h +-gen_clone_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="clone-flagtab.h"' +-clone-flagtabs.h: gen_clone-flagtabs_h Makefile +- ./gen_clone-flagtabs_h --i2s-transtab clone_flag > $@ +- +-gen_epoll_ctls_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h epoll_ctl.h +-gen_epoll_ctls_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="epoll_ctl.h"' +-epoll_ctls.h: gen_epoll_ctls_h Makefile +- ./gen_epoll_ctls_h --i2s epoll_ctl > $@ +- +-gen_famtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h famtab.h +-gen_famtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="famtab.h"' +-famtabs.h: gen_famtabs_h Makefile +- ./gen_famtabs_h --i2s fam > $@ +- +-gen_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h flagtab.h +-# ../auparse/ is used to avoid using ../lib/flagtab.h +-gen_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="../auparse/flagtab.h"' +-flagtabs.h: gen_flagtabs_h Makefile +- ./gen_flagtabs_h --i2s-transtab flag > $@ +- +-gen_fcntl_cmdtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \ +- fcntl-cmdtab.h +-gen_fcntl_cmdtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="fcntl-cmdtab.h"' +-fcntl-cmdtabs.h: gen_fcntl-cmdtabs_h Makefile +- ./gen_fcntl-cmdtabs_h --i2s fcntl > $@ +- +-gen_icmptypetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h icmptypetab.h +-gen_icmptypetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="icmptypetab.h"' +-icmptypetabs.h: gen_icmptypetabs_h Makefile +- ./gen_icmptypetabs_h --i2s icmptype > $@ +- +-gen_ipctabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipctab.h +-gen_ipctabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ipctab.h"' +-ipctabs.h: gen_ipctabs_h Makefile +- ./gen_ipctabs_h --i2s ipc > $@ +- +-gen_ipccmdtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipccmdtab.h +-gen_ipccmdtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ipccmdtab.h"' +-ipccmdtabs.h: gen_ipccmdtabs_h Makefile +- ./gen_ipccmdtabs_h --i2s-transtab ipccmd > $@ +- +-gen_ipoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ipoptnametab.h +-gen_ipoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ipoptnametab.h"' +-ipoptnametabs.h: gen_ipoptnametabs_h Makefile +- ./gen_ipoptnametabs_h --i2s ipoptname > $@ +- +-gen_ip6optnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ip6optnametab.h +-gen_ip6optnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ip6optnametab.h"' +-ip6optnametabs.h: gen_ip6optnametabs_h Makefile +- ./gen_ip6optnametabs_h --i2s ip6optname > $@ +- +-gen_mmaptabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h mmaptab.h +-gen_mmaptabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="mmaptab.h"' +-mmaptabs.h: gen_mmaptabs_h Makefile +- ./gen_mmaptabs_h --i2s-transtab mmap > $@ +- +-gen_mounttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h mounttab.h +-gen_mounttabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="mounttab.h"' +-mounttabs.h: gen_mounttabs_h Makefile +- ./gen_mounttabs_h --i2s-transtab mount > $@ +- +-gen_nfprototabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h nfprototab.h +-gen_nfprototabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="nfprototab.h"' +-nfprototabs.h: gen_nfprototabs_h Makefile +- ./gen_nfprototabs_h --i2s nfproto > $@ +- +-gen_open_flagtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h \ +- open-flagtab.h +-gen_open_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="open-flagtab.h"' +-open-flagtabs.h: gen_open-flagtabs_h Makefile +- ./gen_open-flagtabs_h --i2s-transtab open_flag > $@ +- +-gen_persontabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h persontab.h +-gen_persontabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="persontab.h"' +-persontabs.h: gen_persontabs_h Makefile +- ./gen_persontabs_h --i2s person > $@ +- +-gen_ptracetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h ptracetab.h +-gen_ptracetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ptracetab.h"' +-ptracetabs.h: gen_ptracetabs_h Makefile +- ./gen_ptracetabs_h --i2s ptrace > $@ +- +-gen_prctl_opttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h prctl-opt-tab.h +-gen_prctl_opttabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="prctl-opt-tab.h"' +-prctl_opttabs.h: gen_prctl_opttabs_h Makefile +- ./gen_prctl_opttabs_h --i2s prctl_opt > $@ +- +-gen_pktoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h pktoptnametab.h +-gen_pktoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="pktoptnametab.h"' +-pktoptnametabs.h: gen_pktoptnametabs_h Makefile +- ./gen_pktoptnametabs_h --i2s pktoptname > $@ +- +-gen_prottabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h prottab.h +-gen_prottabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="prottab.h"' +-prottabs.h: gen_prottabs_h Makefile +- ./gen_prottabs_h --i2s-transtab prot > $@ +- +-gen_recvtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h recvtab.h +-gen_recvtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="recvtab.h"' +-recvtabs.h: gen_recvtabs_h Makefile +- ./gen_recvtabs_h --i2s-transtab recv > $@ +- +-gen_rlimit_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h rlimittab.h +-gen_rlimit_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="rlimittab.h"' +-rlimittabs.h: gen_rlimit_h Makefile +- ./gen_rlimit_h --i2s rlimit > $@ +- +-gen_schedtabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h schedtab.h +-gen_schedtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="schedtab.h"' +-schedtabs.h: gen_schedtabs_h Makefile +- ./gen_schedtabs_h --i2s sched > $@ +- +-gen_seccomptabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h seccomptab.h +-gen_seccomptabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="seccomptab.h"' +-seccomptabs.h: gen_seccomptabs_h Makefile +- ./gen_seccomptabs_h --i2s seccomp > $@ +- +-gen_seektabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h seektab.h +-gen_seektabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="seektab.h"' +-seektabs.h: gen_seektabs_h Makefile +- ./gen_seektabs_h --i2s seek > $@ +- +-gen_shm_modetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h shm_modetab.h +-gen_shm_modetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="shm_modetab.h"' +-shm_modetabs.h: gen_shm_modetabs_h Makefile +- ./gen_shm_modetabs_h --i2s-transtab shm_mode > $@ +- +-gen_signals_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h signaltab.h +-gen_signals_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="signaltab.h"' +-signaltabs.h: gen_signals_h Makefile +- ./gen_signals_h --i2s signal > $@ +- +-gen_sockleveltabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h sockleveltab.h +-gen_sockleveltabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="sockleveltab.h"' +-sockleveltabs.h: gen_sockleveltabs_h Makefile +- ./gen_sockleveltabs_h --i2s socklevel > $@ +- +-gen_sockoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h sockoptnametab.h +-gen_sockoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="sockoptnametab.h"' +-sockoptnametabs.h: gen_sockoptnametabs_h Makefile +- ./gen_sockoptnametabs_h --i2s sockoptname > $@ +- +-gen_socktabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h socktab.h +-gen_socktabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="socktab.h"' +-socktabs.h: gen_socktabs_h Makefile +- ./gen_socktabs_h --i2s sock > $@ +- +-gen_socktypetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h socktypetab.h +-gen_socktypetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="socktypetab.h"' +-socktypetabs.h: gen_socktypetabs_h Makefile +- ./gen_socktypetabs_h --i2s sock_type > $@ +- +-gen_tcpoptnametabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h tcpoptnametab.h +-gen_tcpoptnametabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="tcpoptnametab.h"' +-tcpoptnametabs.h: gen_tcpoptnametabs_h Makefile +- ./gen_tcpoptnametabs_h --i2s tcpoptname > $@ +- +-gen_typetabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h typetab.h +-gen_typetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="typetab.h"' +-typetabs.h: gen_typetabs_h Makefile +- ./gen_typetabs_h --s2i type > $@ +- +-gen_umounttabs_h_SOURCES = ../lib/gen_tables.c ../lib/gen_tables.h umounttab.h +-gen_umounttabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="umounttab.h"' +-umounttabs.h: gen_umounttabs_h Makefile +- ./gen_umounttabs_h --i2s-transtab umount > $@ +- +diff --git a/auparse/accesstabs.h b/auparse/accesstabs.h +new file mode 100644 +index 0000000..867d99c +--- /dev/null ++++ b/auparse/accesstabs.h +@@ -0,0 +1,6 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char access_strings[] = "R_OK\0W_OK\0X_OK"; ++static const struct transtab access_table[] = { ++ {1,10},{2,5},{4,0}, ++}; ++#define ACCESS_NUM_ENTRIES (sizeof(access_table) / sizeof(*access_table)) +diff --git a/auparse/captabs.h b/auparse/captabs.h +new file mode 100644 +index 0000000..9267466 +--- /dev/null ++++ b/auparse/captabs.h +@@ -0,0 +1,14 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char cap_strings[] = "audit_control\0audit_write\0block_suspend\0chown\0compromise_kernel\0dac_override\0dac_read_search\0fowner\0fsetid\0ipc_lock\0" ++ "ipc_owner\0kill\0lease\0linux_immutable\0mac_admin\0mac_override\0mknod\0net_admin\0net_bind_service\0net_broadcast\0" ++ "net_raw\0setfcap\0setgid\0setpcap\0setuid\0sys_admin\0sys_boot\0sys_chroot\0sys_module\0sys_nice\0" ++ "sys_pacct\0sys_ptrace\0sys_rawio\0sys_resource\0sys_time\0sys_tty_config\0syslog\0wake_alarm"; ++static const unsigned cap_i2s_direct[] = { ++ 40,64,77,93,100,126,239,254,246,137, ++ 192,209,182,223,107,116,291,332,280,321, ++ 311,261,271,302,342,355,364,176,131,14, ++ 0,231,163,153,379,386,26,46, ++}; ++static const char *cap_i2s(int v) { ++ return i2s_direct__(cap_strings, cap_i2s_direct, 0, 37, v); ++} +diff --git a/auparse/clocktabs.h b/auparse/clocktabs.h +new file mode 100644 +index 0000000..03f9f09 +--- /dev/null ++++ b/auparse/clocktabs.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char clock_strings[] = "CLOCK_BOOTTIME\0CLOCK_BOOTTIME_ALARM\0CLOCK_MONOTONIC\0CLOCK_MONOTONIC_COARSE\0CLOCK_MONOTONIC_RAW\0CLOCK_PROCESS_CPUTIME_ID\0CLOCK_REALTIME\0CLOCK_REALTIME_ALARM\0CLOCK_REALTIME_COARSE\0CLOCK_THREAD_CPUTIME_ID"; ++static const unsigned clock_i2s_direct[] = { ++ 120,36,95,178,75,156,52,0,135,15, ++}; ++static const char *clock_i2s(int v) { ++ return i2s_direct__(clock_strings, clock_i2s_direct, 0, 9, v); ++} +diff --git a/auparse/clone-flagtabs.h b/auparse/clone-flagtabs.h +new file mode 100644 +index 0000000..b8f815d +--- /dev/null ++++ b/auparse/clone-flagtabs.h +@@ -0,0 +1,10 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char clone_flag_strings[] = "CLONE_CHILD_CLEARTID\0CLONE_CHILD_SETTID\0CLONE_DETACHED\0CLONE_FILES\0CLONE_FS\0CLONE_IO\0CLONE_NEWIPC\0CLONE_NEWNET\0CLONE_NEWNS\0CLONE_NEWPID\0" ++ "CLONE_NEWUSER\0CLONE_NEWUTS\0CLONE_PARENT\0CLONE_PARENT_SETTID\0CLONE_PTRACE\0CLONE_SETTLS\0CLONE_SIGHAND\0CLONE_STOPPED\0CLONE_SYSVSEM\0CLONE_THREAD\0" ++ "CLONE_UNTRACED\0CLONE_VFORK\0CLONE_VM"; ++static const struct transtab clone_flag_table[] = { ++ {256,304},{512,67},{1024,55},{2048,222},{8192,196},{16384,292},{32768,163},{65536,264},{131072,111},{262144,250}, ++ {524288,209},{1048576,176},{2097152,0},{4194304,40},{8388608,277},{16777216,21},{33554432,236},{67108864,150},{134217728,85},{268435456,136}, ++ {536870912,123},{1073741824,98},{-2147483648,76}, ++}; ++#define CLONE_FLAG_NUM_ENTRIES (sizeof(clone_flag_table) / sizeof(*clone_flag_table)) +diff --git a/auparse/epoll_ctls.h b/auparse/epoll_ctls.h +new file mode 100644 +index 0000000..2787c18 +--- /dev/null ++++ b/auparse/epoll_ctls.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char epoll_ctl_strings[] = "EPOLL_CTL_ADD\0EPOLL_CTL_DEL\0EPOLL_CTL_MOD"; ++static const unsigned epoll_ctl_i2s_direct[] = { ++ 0,14,28, ++}; ++static const char *epoll_ctl_i2s(int v) { ++ return i2s_direct__(epoll_ctl_strings, epoll_ctl_i2s_direct, 1, 3, v); ++} +diff --git a/auparse/famtabs.h b/auparse/famtabs.h +new file mode 100644 +index 0000000..cae396b +--- /dev/null ++++ b/auparse/famtabs.h +@@ -0,0 +1,14 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char fam_strings[] = "alg\0appletalk\0ash\0atmpvc\0atmsvc\0ax25\0bluetooth\0bridge\0caif\0can\0" ++ "decnet\0econet\0ieee802154\0inet\0inet6\0ipx\0irda\0isdn\0iucv\0key\0" ++ "llc\0local\0netbeui\0netlink\0netrom\0nfc\0packet\0phonet\0pppox\0rds\0" ++ "rose\0rxrpc\0security\0sna\0tipc\0vsock\0wanpipe\0x25"; ++static const unsigned fam_i2s_direct[] = { ++ 126,88,32,99,4,148,47,18,226,93, ++ 183,63,132,194,118,140,159,14,70,25, ++ 179,203,103,173,218,122,-1u,-1u,59,207, ++ 37,113,188,108,166,77,54,0,155,212, ++}; ++static const char *fam_i2s(int v) { ++ return i2s_direct__(fam_strings, fam_i2s_direct, 1, 40, v); ++} +diff --git a/auparse/fcntl-cmdtabs.h b/auparse/fcntl-cmdtabs.h +new file mode 100644 +index 0000000..18c6cc7 +--- /dev/null ++++ b/auparse/fcntl-cmdtabs.h +@@ -0,0 +1,17 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char fcntl_strings[] = "F_CANCELLK\0F_DUPFD\0F_DUPFD_CLOEXEC\0F_GETFD\0F_GETFL\0F_GETLEASE\0F_GETLK\0F_GETLK64\0F_GETOWN\0F_GETOWNER_UIDS\0" ++ "F_GETOWN_EX\0F_GETPIPE_SZ\0F_GETSIG\0F_NOTIFY\0F_SETFD\0F_SETFL\0F_SETLEASE\0F_SETLK\0F_SETLK64\0F_SETLKW\0" ++ "F_SETLKW64\0F_SETOWN\0F_SETOWN_EX\0F_SETPIPE_SZ\0F_SETSIG"; ++static const int fcntl_i2s_i[] = { ++ 0,1,2,3,4,5,6,7,8,9, ++ 10,11,12,13,14,15,16,17,1024,1025, ++ 1026,1029,1030,1031,1032, ++}; ++static const unsigned fcntl_i2s_s[] = { ++ 11,35,148,43,156,62,175,193,213,80, ++ 247,130,70,183,202,222,105,89,164,51, ++ 139,0,19,234,117, ++}; ++static const char *fcntl_i2s(int v) { ++ return i2s_bsearch__(fcntl_strings, fcntl_i2s_i, fcntl_i2s_s, 25, v); ++} +diff --git a/auparse/flagtabs.h b/auparse/flagtabs.h +new file mode 100644 +index 0000000..5f57e14 +--- /dev/null ++++ b/auparse/flagtabs.h +@@ -0,0 +1,6 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char flag_strings[] = "access\0atomic\0continue\0create\0directory\0follow\0noalt\0open\0parent"; ++static const struct transtab flag_table[] = { ++ {1,40},{2,30},{4,14},{16,58},{32,47},{64,7},{256,53},{512,23},{1024,0}, ++}; ++#define FLAG_NUM_ENTRIES (sizeof(flag_table) / sizeof(*flag_table)) +diff --git a/auparse/icmptypetabs.h b/auparse/icmptypetabs.h +new file mode 100644 +index 0000000..49b44bf +--- /dev/null ++++ b/auparse/icmptypetabs.h +@@ -0,0 +1,10 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char icmptype_strings[] = "address-mask-reply\0address-mask-request\0destination-unreachable\0echo\0echo-reply\0info-reply\0info-request\0parameter-problem\0redirect\0source-quench\0" ++ "time-exceeded\0timestamp-reply\0timestamp-request"; ++static const unsigned icmptype_i2s_direct[] = { ++ 69,-1u,-1u,40,131,122,-1u,-1u,64,-1u, ++ -1u,145,104,175,159,91,80,19,0, ++}; ++static const char *icmptype_i2s(int v) { ++ return i2s_direct__(icmptype_strings, icmptype_i2s_direct, 0, 18, v); ++} +diff --git a/auparse/ip6optnametabs.h b/auparse/ip6optnametabs.h +new file mode 100644 +index 0000000..4af11c2 +--- /dev/null ++++ b/auparse/ip6optnametabs.h +@@ -0,0 +1,20 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ip6optname_strings[] = "IP6T_SO_GET_REVISION_MATCH\0IP6T_SO_GET_REVISION_TARGET\0IP6T_SO_ORIGINAL_DST\0IP6T_SO_SET_ADD_COUNTERS\0IP6T_SO_SET_REPLACE\0IPV6_2292DSTOPTS\0IPV6_2292HOPLIMIT\0IPV6_2292HOPOPTS\0IPV6_2292PKTINFO\0IPV6_2292PKTOPTIONS\0" ++ "IPV6_2292RTHDR\0IPV6_ADDRFORM\0IPV6_ADDR_PREFERENCES\0IPV6_ADD_MEMBERSHIP\0IPV6_AUTHHDR\0IPV6_CHECKSUM\0IPV6_DONTFRAG\0IPV6_DROP_MEMBERSHIP\0IPV6_DSTOPTS\0IPV6_FLOWINFO\0" ++ "IPV6_FLOWINFO_SEND\0IPV6_FLOWLABEL_MGR\0IPV6_HOPLIMIT\0IPV6_HOPOPTS\0IPV6_IPSEC_POLICY\0IPV6_JOIN_ANYCAST\0IPV6_LEAVE_ANYCAST\0IPV6_MINHOPCOUNT\0IPV6_MTU\0IPV6_MTU_DISCOVER\0" ++ "IPV6_MULTICAST_HOPS\0IPV6_MULTICAST_IF\0IPV6_MULTICAST_LOOP\0IPV6_NEXTHOP\0IPV6_ORIGDSTADDR\0IPV6_PATHMTU\0IPV6_PKTINFO\0IPV6_RECVDSTOPTS\0IPV6_RECVERR\0IPV6_RECVHOPLIMIT\0" ++ "IPV6_RECVHOPOPTS\0IPV6_RECVPATHMTU\0IPV6_RECVPKTINFO\0IPV6_RECVRTHDR\0IPV6_RECVTCLASS\0IPV6_ROUTER_ALERT\0IPV6_RTHDR\0IPV6_RTHDRDSTOPTS\0IPV6_TCLASS\0IPV6_TRANSPARENT\0" ++ "IPV6_UNICAST_HOPS\0IPV6_UNICAST_IF\0IPV6_USE_MIN_MTU\0IPV6_V6ONLY\0IPV6_XFRM_POLICY"; ++static const unsigned ip6optname_i2s_direct[] = { ++ 225,173,156,121,210,190,294,138,592,281, ++ 356,-1u,-1u,-1u,-1u,854,554,534,572,261, ++ 322,778,516,507,665,905,453,471,-1u,-1u, ++ -1u,389,370,435,917,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,730,635, ++ 678,408,696,422,807,747,796,648,343,713, ++ 622,308,888,101,76,762,825,0,27,-1u, ++ -1u,239,490,605,837,872,-1u,-1u,-1u,55, ++}; ++static const char *ip6optname_i2s(int v) { ++ return i2s_direct__(ip6optname_strings, ip6optname_i2s_direct, 1, 80, v); ++} +diff --git a/auparse/ipccmdtabs.h b/auparse/ipccmdtabs.h +new file mode 100644 +index 0000000..ff43dbb +--- /dev/null ++++ b/auparse/ipccmdtabs.h +@@ -0,0 +1,6 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ipccmd_strings[] = "IPC_CREAT\0IPC_EXCL\0IPC_NOWAIT"; ++static const struct transtab ipccmd_table[] = { ++ {512,0},{1024,10},{2048,19}, ++}; ++#define IPCCMD_NUM_ENTRIES (sizeof(ipccmd_table) / sizeof(*ipccmd_table)) +diff --git a/auparse/ipctabs.h b/auparse/ipctabs.h +new file mode 100644 +index 0000000..4bf3bcd +--- /dev/null ++++ b/auparse/ipctabs.h +@@ -0,0 +1,11 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ipc_strings[] = "msgctl\0msgget\0msgrcv\0msgsnd\0semctl\0semget\0semop\0semtimedop\0shmat\0shmctl\0" ++ "shmdt\0shmget"; ++static const unsigned ipc_i2s_direct[] = { ++ 42,35,28,48,-1u,-1u,-1u,-1u,-1u,-1u, ++ 21,14,7,0,-1u,-1u,-1u,-1u,-1u,-1u, ++ 59,72,78,65, ++}; ++static const char *ipc_i2s(int v) { ++ return i2s_direct__(ipc_strings, ipc_i2s_direct, 1, 24, v); ++} +diff --git a/auparse/ipoptnametabs.h b/auparse/ipoptnametabs.h +new file mode 100644 +index 0000000..fb0b8b7 +--- /dev/null ++++ b/auparse/ipoptnametabs.h +@@ -0,0 +1,17 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ipoptname_strings[] = "IPT_SO_GET_REVISION_TARGET\0IPT_SO_SET_ADD_COUNTERS\0IPT_SO_SET_REPLACE\0IP_ADD_MEMBERSHIP\0IP_ADD_SOURCE_MEMBERSHIP\0IP_BLOCK_SOURCE\0IP_DROP_MEMBERSHIP\0IP_DROP_SOURCE_MEMBERSHIP\0IP_FREEBIND\0IP_HDRINCL\0" ++ "IP_IPSEC_POLICY\0IP_MINTTL\0IP_MSFILTER\0IP_MTU\0IP_MTU_DISCOVER\0IP_MULTICAST_ALL\0IP_MULTICAST_IF\0IP_MULTICAST_LOOP\0IP_MULTICAST_TTL\0IP_NODEFRAG\0" ++ "IP_OPTIONS\0IP_ORIGDSTADDR\0IP_PASSSEC\0IP_PKTINFO\0IP_PKTOPTIONS\0IP_RECVERR\0IP_RECVOPTS\0IP_RECVTTL\0IP_RETOPTS\0IP_ROUTER_ALERT\0" ++ "IP_TOS\0IP_TRANSPARENT\0IP_TTL\0IP_UNBLOCK_SOURCE\0IP_UNICAST_IF\0IP_XFRM_POLICY"; ++static const unsigned ipoptname_i2s_direct[] = { ++ 461,483,186,338,445,411,434,375,386,242, ++ 400,423,-1u,235,174,197,522,364,468,349, ++ 213,326,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,275,309,291,70,129,490,113,88,148, ++ 223,-1u,-1u,-1u,-1u,-1u,-1u,-1u,258,508, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,51,27,0, ++}; ++static const char *ipoptname_i2s(int v) { ++ return i2s_direct__(ipoptname_strings, ipoptname_i2s_direct, 1, 66, v); ++} +diff --git a/auparse/mmaptabs.h b/auparse/mmaptabs.h +new file mode 100644 +index 0000000..386833c +--- /dev/null ++++ b/auparse/mmaptabs.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char mmap_strings[] = "MAP_32BIT\0MAP_ANONYMOUS\0MAP_DENYWRITE\0MAP_EXECUTABLE\0MAP_FIXED\0MAP_GROWSDOWN\0MAP_HUGETLB\0MAP_LOCKED\0MAP_NONBLOCK\0MAP_NORESERVE\0" ++ "MAP_POPULATE\0MAP_PRIVATE\0MAP_SHARED\0MAP_STACK"; ++static const struct transtab mmap_table[] = { ++ {1,152},{2,140},{16,53},{32,10},{64,0},{256,63},{2048,24},{4096,38},{8192,89},{16384,113}, ++ {32768,127},{65536,100},{131072,163},{262144,77}, ++}; ++#define MMAP_NUM_ENTRIES (sizeof(mmap_table) / sizeof(*mmap_table)) +diff --git a/auparse/mounttabs.h b/auparse/mounttabs.h +new file mode 100644 +index 0000000..ca66885 +--- /dev/null ++++ b/auparse/mounttabs.h +@@ -0,0 +1,10 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char mount_strings[] = "MS_ACTIVE\0MS_BIND\0MS_BORN\0MS_DIRSYNC\0MS_I_VERSION\0MS_KERNMOUNT\0MS_MANDLOCK\0MS_MOVE\0MS_NOATIME\0MS_NODEV\0" ++ "MS_NODIRATIME\0MS_NOEXEC\0MS_NOSEC\0MS_NOSUID\0MS_NOUSER\0MS_POSIXACL\0MS_PRIVATE\0MS_RDONLY\0MS_REC\0MS_RELATIME\0" ++ "MS_REMOUNT\0MS_SHARED\0MS_SILENT\0MS_SLAVE\0MS_SNAP_STABLE\0MS_STRICTATIME\0MS_SYNCHRONOUS\0MS_UNBINDABLE"; ++static const struct transtab mount_table[] = { ++ {1,179},{2,136},{4,94},{8,117},{16,278},{32,208},{64,63},{128,26},{1024,83},{2048,103}, ++ {4096,10},{8192,75},{16384,189},{32768,229},{65536,156},{131072,293},{262144,168},{524288,239},{1048576,219},{2097152,196}, ++ {4194304,50},{8388608,37},{16777216,263},{134217728,248},{268435456,127},{536870912,18},{1073741824,0},{-2147483648,146}, ++}; ++#define MOUNT_NUM_ENTRIES (sizeof(mount_table) / sizeof(*mount_table)) +diff --git a/auparse/nfprototabs.h b/auparse/nfprototabs.h +new file mode 100644 +index 0000000..9bb2723 +--- /dev/null ++++ b/auparse/nfprototabs.h +@@ -0,0 +1,9 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char nfproto_strings[] = "arp\0bridge\0decnet\0ipv4\0ipv6\0unspecified"; ++static const unsigned nfproto_i2s_direct[] = { ++ 28,-1u,18,0,-1u,-1u,-1u,4,-1u,-1u, ++ 23,-1u,11, ++}; ++static const char *nfproto_i2s(int v) { ++ return i2s_direct__(nfproto_strings, nfproto_i2s_direct, 0, 12, v); ++} +diff --git a/auparse/open-flagtabs.h b/auparse/open-flagtabs.h +new file mode 100644 +index 0000000..5e3c3eb +--- /dev/null ++++ b/auparse/open-flagtabs.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char open_flag_strings[] = "O_APPEND\0O_ASYNC\0O_CLOEXEC\0O_CREAT\0O_DIRECT\0O_DIRECTORY\0O_DSYNC\0O_EXCL\0O_NOATIME\0O_NOCTTY\0" ++ "O_NOFOLLOW\0O_NONBLOCK\0O_PATH\0O_RDWR\0O_TRUNC\0O_WRONLY\0__O_SYNC"; ++static const struct transtab open_flag_table[] = { ++ {1,134},{2,119},{64,27},{128,64},{256,81},{512,126},{1024,0},{2048,101},{4096,56},{8192,9}, ++ {16384,35},{65536,44},{131072,90},{262144,71},{524288,17},{1048576,143},{2097152,112}, ++}; ++#define OPEN_FLAG_NUM_ENTRIES (sizeof(open_flag_table) / sizeof(*open_flag_table)) +diff --git a/auparse/persontabs.h b/auparse/persontabs.h +new file mode 100644 +index 0000000..d099839 +--- /dev/null ++++ b/auparse/persontabs.h +@@ -0,0 +1,17 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char person_strings[] = "PER_BSD\0PER_HPUX\0PER_IRIX32\0PER_IRIX64\0PER_IRIXN32\0PER_ISCR4\0PER_LINUX\0PER_LINUX32\0PER_LINUX32_3GB\0PER_LINUX_32BIT\0" ++ "PER_OSF4\0PER_OSR5\0PER_RISCOS\0PER_SCOSVR3\0PER_SOLARIS\0PER_SUNOS\0PER_SVR3\0PER_SVR4\0PER_UW7\0PER_WYSEV386\0" ++ "PER_XENIX"; ++static const int person_i2s_i[] = { ++ 0,6,8,12,15,16,8388608,67108869,67108870,67108873, ++ 67108874,67108875,67108877,68157441,68157454,83886082,83886084,83886087,100663299,117440515, ++ 134217736, ++}; ++static const unsigned person_i2s_s[] = { ++ 61,0,71,133,115,8,99,51,168,17, ++ 39,28,156,187,196,178,204,217,124,144, ++ 83, ++}; ++static const char *person_i2s(int v) { ++ return i2s_bsearch__(person_strings, person_i2s_i, person_i2s_s, 21, v); ++} +diff --git a/auparse/pktoptnametabs.h b/auparse/pktoptnametabs.h +new file mode 100644 +index 0000000..4613372 +--- /dev/null ++++ b/auparse/pktoptnametabs.h +@@ -0,0 +1,10 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char pktoptname_strings[] = "PACKET_ADD_MEMBERSHIP\0PACKET_AUXDATA\0PACKET_COPY_THRESH\0PACKET_DROP_MEMBERSHIP\0PACKET_FANOUT\0PACKET_HDRLEN\0PACKET_LOSS\0PACKET_ORIGDEV\0PACKET_RECV_OUTPUT\0PACKET_RESERVE\0" ++ "PACKET_RX_RING\0PACKET_STATISTICS\0PACKET_TIMESTAMP\0PACKET_TX_HAS_OFF\0PACKET_TX_RING\0PACKET_TX_TIMESTAMP\0PACKET_VERSION\0PACKET_VNET_HDR"; ++static const unsigned pktoptname_i2s_direct[] = { ++ 0,56,134,-1u,168,183,37,22,119,271, ++ 93,153,236,107,286,251,201,79,218, ++}; ++static const char *pktoptname_i2s(int v) { ++ return i2s_direct__(pktoptname_strings, pktoptname_i2s_direct, 1, 19, v); ++} +diff --git a/auparse/prctl_opttabs.h b/auparse/prctl_opttabs.h +new file mode 100644 +index 0000000..03707a8 +--- /dev/null ++++ b/auparse/prctl_opttabs.h +@@ -0,0 +1,14 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char prctl_opt_strings[] = "PR_CAPBSET_DROP\0PR_CAPBSET_READ\0PR_GET_CHILD_SUBREAPER\0PR_GET_DUMPABLE\0PR_GET_ENDIAN\0PR_GET_FPEMU\0PR_GET_FPEXC\0PR_GET_KEEPCAPS\0PR_GET_NAME\0PR_GET_NO_NEW_PRIVS\0" ++ "PR_GET_PDEATHSIG\0PR_GET_SECCOMP\0PR_GET_SECUREBITS\0PR_GET_TID_ADDRESS\0PR_GET_TIMERSLACK\0PR_GET_TIMING\0PR_GET_TSC\0PR_GET_UNALIGN\0PR_MCE_KILL\0PR_MCE_KILL_GET\0" ++ "PR_SET_CHILD_SUBREAPER\0PR_SET_DUMPABLE\0PR_SET_ENDIAN\0PR_SET_FPEMU\0PR_SET_FPEXC\0PR_SET_KEEPCAPS\0PR_SET_MM\0PR_SET_NAME\0PR_SET_NO_NEW_PRIVS\0PR_SET_PDEATHSIG\0" ++ "PR_SET_SECCOMP\0PR_SET_SECUREBITS\0PR_SET_TIMERSLACK\0PR_SET_TIMING\0PR_SET_TSC\0PR_SET_UNALIGN\0PR_TASK_PERF_EVENTS_DISABLE\0PR_TASK_PERF_EVENTS_ENABLE"; ++static const unsigned prctl_opt_i2s_direct[] = { ++ 451,159,55,337,271,544,111,393,85,367, ++ 98,380,246,519,419,127,-1u,-1u,71,353, ++ 176,468,16,0,260,533,191,483,501,228, ++ 559,587,286,298,409,314,32,431,139,209, ++}; ++static const char *prctl_opt_i2s(int v) { ++ return i2s_direct__(prctl_opt_strings, prctl_opt_i2s_direct, 1, 40, v); ++} +diff --git a/auparse/prottabs.h b/auparse/prottabs.h +new file mode 100644 +index 0000000..1727f43 +--- /dev/null ++++ b/auparse/prottabs.h +@@ -0,0 +1,6 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char prot_strings[] = "PROT_EXEC\0PROT_READ\0PROT_SEM\0PROT_WRITE"; ++static const struct transtab prot_table[] = { ++ {1,10},{2,29},{4,0},{8,20}, ++}; ++#define PROT_NUM_ENTRIES (sizeof(prot_table) / sizeof(*prot_table)) +diff --git a/auparse/ptracetabs.h b/auparse/ptracetabs.h +new file mode 100644 +index 0000000..6bbfc9b +--- /dev/null ++++ b/auparse/ptracetabs.h +@@ -0,0 +1,17 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ptrace_strings[] = "PTRACE_ATTACH\0PTRACE_CONT\0PTRACE_DETACH\0PTRACE_GETEVENTMSG\0PTRACE_GETFPREGS\0PTRACE_GETFPXREGS\0PTRACE_GETREGS\0PTRACE_GETREGSET\0PTRACE_GETSIGINFO\0PTRACE_INTERRUPT\0" ++ "PTRACE_KILL\0PTRACE_LISTEN\0PTRACE_PEEKDATA\0PTRACE_PEEKTEXT\0PTRACE_PEEKUSER\0PTRACE_POKEDATA\0PTRACE_POKETEXT\0PTRACE_POKEUSER\0PTRACE_SEIZE\0PTRACE_SETFPREGS\0" ++ "PTRACE_SETFPXREGS\0PTRACE_SETOPTIONS\0PTRACE_SETREGS\0PTRACE_SETREGSET\0PTRACE_SETSIGINFO\0PTRACE_SINGLESTEP\0PTRACE_SYSCALL\0PTRACE_TRACEME"; ++static const int ptrace_i2s_i[] = { ++ 0,1,2,3,4,5,6,7,8,9, ++ 12,13,14,15,16,17,18,19,24,16896, ++ 16897,16898,16899,16900,16901,16902,16903,16904, ++}; ++static const unsigned ptrace_i2s_s[] = { ++ 432,203,187,219,251,235,267,14,161,399, ++ 94,349,59,296,0,26,76,313,417,331, ++ 40,126,381,109,364,283,144,173, ++}; ++static const char *ptrace_i2s(int v) { ++ return i2s_bsearch__(ptrace_strings, ptrace_i2s_i, ptrace_i2s_s, 28, v); ++} +diff --git a/auparse/recvtabs.h b/auparse/recvtabs.h +new file mode 100644 +index 0000000..9cab5a3 +--- /dev/null ++++ b/auparse/recvtabs.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char recv_strings[] = "MSG_CMSG_CLOEXEC\0MSG_CONFIRM\0MSG_CTRUNC\0MSG_DONTROUTE\0MSG_DONTWAIT\0MSG_EOR\0MSG_ERRQUEUE\0MSG_FASTOPEN\0MSG_FIN\0MSG_MORE\0" ++ "MSG_NOSIGNAL\0MSG_OOB\0MSG_PEEK\0MSG_PROXY\0MSG_RST\0MSG_SENDPAGE_NOTLAST\0MSG_SYN\0MSG_TRUNC\0MSG_WAITALL\0MSG_WAITFORONE"; ++static const struct transtab recv_table[] = { ++ {1,131},{2,139},{4,40},{8,29},{16,148},{32,195},{64,54},{128,67},{256,205},{512,101}, ++ {1024,187},{2048,17},{4096,158},{8192,75},{16384,118},{32768,109},{65536,217},{131072,166},{536870912,88},{1073741824,0}, ++}; ++#define RECV_NUM_ENTRIES (sizeof(recv_table) / sizeof(*recv_table)) +diff --git a/auparse/rlimittabs.h b/auparse/rlimittabs.h +new file mode 100644 +index 0000000..364ad69 +--- /dev/null ++++ b/auparse/rlimittabs.h +@@ -0,0 +1,10 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char rlimit_strings[] = "RLIMIT_AS\0RLIMIT_CORE\0RLIMIT_CPU\0RLIMIT_DATA\0RLIMIT_FSIZE\0RLIMIT_LOCKS\0RLIMIT_MEMLOCK\0RLIMIT_MSGQUEUE\0RLIMIT_NICE\0RLIMIT_NOFILE\0" ++ "RLIMIT_NPROC\0RLIMIT_RSS\0RLIMIT_RTPRIO\0RLIMIT_RTTIME\0RLIMIT_SIGPENDING\0RLIMIT_STACK"; ++static const unsigned rlimit_i2s_direct[] = { ++ 22,45,33,198,10,141,128,114,71,0, ++ 58,180,86,102,152,166, ++}; ++static const char *rlimit_i2s(int v) { ++ return i2s_direct__(rlimit_strings, rlimit_i2s_direct, 0, 15, v); ++} +diff --git a/auparse/schedtabs.h b/auparse/schedtabs.h +new file mode 100644 +index 0000000..875317f +--- /dev/null ++++ b/auparse/schedtabs.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char sched_strings[] = "SCHED_BATCH\0SCHED_FIFO\0SCHED_IDLE\0SCHED_OTHER\0SCHED_RR"; ++static const unsigned sched_i2s_direct[] = { ++ 34,12,46,0,-1u,23, ++}; ++static const char *sched_i2s(int v) { ++ return i2s_direct__(sched_strings, sched_i2s_direct, 0, 5, v); ++} +diff --git a/auparse/seccomptabs.h b/auparse/seccomptabs.h +new file mode 100644 +index 0000000..5c6c911 +--- /dev/null ++++ b/auparse/seccomptabs.h +@@ -0,0 +1,11 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char seccomp_strings[] = "allow\0errno\0kill\0trace\0trap"; ++static const int seccomp_i2s_i[] = { ++ 0,196608,327680,2146435072,2147418112, ++}; ++static const unsigned seccomp_i2s_s[] = { ++ 12,23,6,17,0, ++}; ++static const char *seccomp_i2s(int v) { ++ return i2s_bsearch__(seccomp_strings, seccomp_i2s_i, seccomp_i2s_s, 5, v); ++} +diff --git a/auparse/seektabs.h b/auparse/seektabs.h +new file mode 100644 +index 0000000..0d0f542 +--- /dev/null ++++ b/auparse/seektabs.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char seek_strings[] = "SEEK_CUR\0SEEK_DATA\0SEEK_END\0SEEK_HOLE\0SEEK_SET"; ++static const unsigned seek_i2s_direct[] = { ++ 38,0,19,9,28, ++}; ++static const char *seek_i2s(int v) { ++ return i2s_direct__(seek_strings, seek_i2s_direct, 0, 4, v); ++} +diff --git a/auparse/shm_modetabs.h b/auparse/shm_modetabs.h +new file mode 100644 +index 0000000..ddd414d +--- /dev/null ++++ b/auparse/shm_modetabs.h +@@ -0,0 +1,6 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char shm_mode_strings[] = "SHM_DEST\0SHM_HUGETLB\0SHM_LOCKED\0SHM_NORESERVE"; ++static const struct transtab shm_mode_table[] = { ++ {512,0},{1024,21},{2048,9},{4096,32}, ++}; ++#define SHM_MODE_NUM_ENTRIES (sizeof(shm_mode_table) / sizeof(*shm_mode_table)) +diff --git a/auparse/signaltabs.h b/auparse/signaltabs.h +new file mode 100644 +index 0000000..91ce38e +--- /dev/null ++++ b/auparse/signaltabs.h +@@ -0,0 +1,14 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char signal_strings[] = "IGPWR\0SIG0\0SIGABRT\0SIGALRM\0SIGBUS\0SIGCHLD\0SIGCONT\0SIGFPE\0SIGHUP\0SIGILL\0" ++ "SIGINT\0SIGIO\0SIGKILL\0SIGPIPE\0SIGPROF\0SIGQUIT\0SIGSEGV\0SIGSTKFLT\0SIGSTOP\0SIGSYS\0" ++ "SIGTERM\0SIGTRAP\0SIGTSTP\0SIGTTIN\0SIGTTOU\0SIGURG\0SIGUSR1\0SIGUSR2\0SIGVTALRM\0SIGWINCH\0" ++ "SIGXCPU\0SIGXFSZ"; ++static const unsigned signal_i2s_direct[] = { ++ 6,57,71,108,64,157,11,27,50,84, ++ 196,116,204,92,19,149,124,34,42,134, ++ 165,173,181,189,231,239,212,100,222,78, ++ 0,142, ++}; ++static const char *signal_i2s(int v) { ++ return i2s_direct__(signal_strings, signal_i2s_direct, 0, 31, v); ++} +diff --git a/auparse/sockleveltabs.h b/auparse/sockleveltabs.h +new file mode 100644 +index 0000000..4473d8c +--- /dev/null ++++ b/auparse/sockleveltabs.h +@@ -0,0 +1,12 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char socklevel_strings[] = "SOL_AAL\0SOL_ALG\0SOL_ATALK\0SOL_ATM\0SOL_AX25\0SOL_BLUETOOTH\0SOL_CAIF\0SOL_DCCP\0SOL_DECNET\0SOL_IPX\0" ++ "SOL_IRDA\0SOL_IUCV\0SOL_LLC\0SOL_NETBEUI\0SOL_NETLINK\0SOL_NETROM\0SOL_PACKET\0SOL_PNPIPE\0SOL_PPPOL2TP\0SOL_RAW\0" ++ "SOL_RDS\0SOL_ROSE\0SOL_RXRPC\0SOL_TIPC"; ++static const unsigned socklevel_i2s_direct[] = { ++ 190,86,34,16,144,206,75,-1u,155,26, ++ 0,94,120,112,66,132,225,215,177,43, ++ 166,198,103,57,8, ++}; ++static const char *socklevel_i2s(int v) { ++ return i2s_direct__(socklevel_strings, socklevel_i2s_direct, 255, 279, v); ++} +diff --git a/auparse/sockoptnametabs.h b/auparse/sockoptnametabs.h +new file mode 100644 +index 0000000..831a030 +--- /dev/null ++++ b/auparse/sockoptnametabs.h +@@ -0,0 +1,23 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char sockoptname_strings[] = "SO_ACCEPTCONN\0SO_ATTACH_FILTER\0SO_BINDTODEVICE\0SO_BROADCAST\0SO_BSDCOMPAT\0SO_DEBUG\0SO_DETACH_FILTER\0SO_DOMAIN\0SO_DONTROUTE\0SO_ERROR\0" ++ "SO_KEEPALIVE\0SO_LINGER\0SO_LOCK_FILTER\0SO_MARK\0SO_NOFCS\0SO_NO_CHECK\0SO_OOBINLINE\0SO_PASSCRED\0SO_PASSCRED\0SO_PASSSEC\0" ++ "SO_PEEK_OFF\0SO_PEERCRED\0SO_PEERCRED\0SO_PEERNAME\0SO_PEERSEC\0SO_PRIORITY\0SO_PROTOCOL\0SO_RCVBUF\0SO_RCVBUFFORCE\0SO_RCVLOWAT\0" ++ "SO_RCVLOWAT\0SO_RCVTIMEO\0SO_RCVTIMEO\0SO_REUSEADDR\0SO_REUSEPORT\0SO_RXQ_OVFL\0SO_SECURITY_AUTHENTICATION\0SO_SECURITY_ENCRYPTION_NETWORK\0SO_SECURITY_ENCRYPTION_TRANSPORT\0SO_SNDBUF\0" ++ "SO_SNDBUFFORCE\0SO_SNDLOWAT\0SO_SNDLOWAT\0SO_SNDTIMEO\0SO_SNDTIMEO\0SO_TIMESTAMP\0SO_TIMESTAMPING\0SO_TIMESTAMPNS\0SO_TYPE\0SO_WIFI_STATUS"; ++static const int sockoptname_i2s_i[] = { ++ 1,2,3,4,5,6,7,8,9,10, ++ 11,12,13,14,15,16,17,18,19,20, ++ 21,22,23,24,25,26,27,28,29,30, ++ 31,32,33,34,35,36,37,38,39,40, ++ 41,42,43,44,116,117,118,119,120,121, ++}; ++static const unsigned sockoptname_i2s_s[] = { ++ 73,402,648,122,109,47,531,329,131,198, ++ 186,305,144,60,415,211,258,354,556,378, ++ 580,440,498,467,31,14,82,282,604,0, ++ 294,541,339,235,633,169,617,317,99,428, ++ 656,246,177,154,366,568,390,592,223,270, ++}; ++static const char *sockoptname_i2s(int v) { ++ return i2s_bsearch__(sockoptname_strings, sockoptname_i2s_i, sockoptname_i2s_s, 50, v); ++} +diff --git a/auparse/socktabs.h b/auparse/socktabs.h +new file mode 100644 +index 0000000..66a8235 +--- /dev/null ++++ b/auparse/socktabs.h +@@ -0,0 +1,10 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char sock_strings[] = "accept\0accept4\0bind\0connect\0getpeername\0getsockname\0getsockopt\0listen\0recv\0recvfrom\0" ++ "recvmmsg\0recvmsg\0send\0sendmmsg\0sendmsg\0sendto\0setsockopt\0shutdown\0socket\0socketpair"; ++static const unsigned sock_i2s_direct[] = { ++ 150,15,20,63,0,40,28,157,101,70, ++ 123,75,141,130,52,115,93,7,84,106, ++}; ++static const char *sock_i2s(int v) { ++ return i2s_direct__(sock_strings, sock_i2s_direct, 1, 20, v); ++} +diff --git a/auparse/socktypetabs.h b/auparse/socktypetabs.h +new file mode 100644 +index 0000000..05e8d36 +--- /dev/null ++++ b/auparse/socktypetabs.h +@@ -0,0 +1,8 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char sock_type_strings[] = "SOCK_DCCP\0SOCK_DGRAM\0SOCK_PACKET\0SOCK_RAW\0SOCK_RDM\0SOCK_SEQPACKET\0SOCK_STREAM"; ++static const unsigned sock_type_i2s_direct[] = { ++ 66,10,33,42,51,0,-1u,-1u,-1u,21, ++}; ++static const char *sock_type_i2s(int v) { ++ return i2s_direct__(sock_type_strings, sock_type_i2s_direct, 1, 10, v); ++} +diff --git a/auparse/tcpoptnametabs.h b/auparse/tcpoptnametabs.h +new file mode 100644 +index 0000000..061db3f +--- /dev/null ++++ b/auparse/tcpoptnametabs.h +@@ -0,0 +1,12 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char tcpoptname_strings[] = "TCP_CONGESTION\0TCP_COOKIE_TRANSACTIONS\0TCP_CORK\0TCP_DEFER_ACCEPT\0TCP_FASTOPEN\0TCP_INFO\0TCP_KEEPCNT\0TCP_KEEPIDLE\0TCP_KEEPINTVL\0TCP_LINGER2\0" ++ "TCP_MAXSEG\0TCP_MD5SIG\0TCP_NODELAY\0TCP_QUEUE_SEQ\0TCP_QUICKACK\0TCP_REPAIR\0TCP_REPAIR_OPTIONS\0TCP_REPAIR_QUEUE\0TCP_SYNCNT\0TCP_THIN_DUPACK\0" ++ "TCP_THIN_LINEAR_TIMEOUTS\0TCP_TIMESTAMP\0TCP_USER_TIMEOUT\0TCP_WINDOW_CLAMP"; ++static const unsigned tcpoptname_i2s_direct[] = { ++ 160,138,39,99,112,87,246,126,48,329, ++ 78,186,0,149,15,273,257,312,199,229, ++ 172,210,65,298, ++}; ++static const char *tcpoptname_i2s(int v) { ++ return i2s_direct__(tcpoptname_strings, tcpoptname_i2s_direct, 1, 24, v); ++} +diff --git a/auparse/typetabs.h b/auparse/typetabs.h +new file mode 100644 +index 0000000..a99d398 +--- /dev/null ++++ b/auparse/typetabs.h +@@ -0,0 +1,35 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char type_strings[] = "a0\0a1\0a2\0a3\0acct\0addr\0arch\0auid\0cap_fi\0cap_fp\0" ++ "cap_pe\0cap_pi\0cap_pp\0capability\0cgroup\0cmd\0code\0comm\0cwd\0data\0" ++ "device\0dir\0egid\0euid\0exe\0exit\0family\0fe\0fi\0file\0" ++ "flags\0fp\0fsgid\0fsuid\0gid\0icmptype\0id\0igid\0inode_gid\0inode_uid\0" ++ "iuid\0key\0list\0mode\0name\0new-disk\0new-fs\0new-rng\0new_gid\0new_pe\0" ++ "new_pi\0new_pp\0oauid\0obj_gid\0obj_uid\0ocomm\0oflag\0ogid\0old-disk\0old-fs\0" ++ "old-rng\0old_pe\0old_pi\0old_pp\0old_prom\0ouid\0path\0per\0perm\0perm_mask\0" ++ "prom\0proto\0res\0result\0saddr\0sauid\0ses\0sgid\0sig\0sigev_signo\0" ++ "suid\0syscall\0uid\0vm\0watch"; ++static const unsigned type_s2i_s[] = { ++ 0,3,6,9,12,17,22,27,32,39, ++ 46,53,60,67,78,85,89,94,99,103, ++ 108,115,119,124,129,133,138,145,148,151, ++ 156,162,165,171,177,181,190,193,198,208, ++ 218,223,227,232,237,242,251,258,266,274, ++ 281,288,295,301,309,317,323,329,334,343, ++ 350,358,365,372,379,388,393,398,402,407, ++ 417,422,428,432,439,445,451,455,460,464, ++ 476,481,489,493,496, ++}; ++static const int type_s2i_i[] = { ++ 14,15,16,17,6,26,4,1,22,22, ++ 22,22,22,12,6,6,28,6,6,20, ++ 6,6,2,1,6,5,23,22,22,6, ++ 30,22,2,1,2,24,1,2,2,1, ++ 1,6,19,8,6,6,6,6,2,22, ++ 22,22,1,2,1,6,29,2,6,6, ++ 6,22,22,22,11,1,6,27,7,7, ++ 11,25,13,13,9,1,21,2,18,18, ++ 1,3,1,6,6, ++}; ++static int type_s2i(const char *s, int *value) { ++ return s2i__(type_strings, type_s2i_s, type_s2i_i, 85, s, value); ++} +diff --git a/auparse/umounttabs.h b/auparse/umounttabs.h +new file mode 100644 +index 0000000..e98118f +--- /dev/null ++++ b/auparse/umounttabs.h +@@ -0,0 +1,6 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char umount_strings[] = "MNT_DETACH\0MNT_EXPIRE\0MNT_FORCE\0UMOUNT_NOFOLLOW\0UMOUNT_UNUSED"; ++static const struct transtab umount_table[] = { ++ {1,22},{2,0},{4,11},{8,32},{-2147483647,48}, ++}; ++#define UMOUNT_NUM_ENTRIES (sizeof(umount_table) / sizeof(*umount_table)) +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 5e9f966..5a7d12b 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -50,109 +50,3 @@ endif + if USE_AARCH64 + BUILT_SOURCES += aarch64_tables.h + endif +-noinst_PROGRAMS = gen_actiontabs_h gen_errtabs_h gen_fieldtabs_h \ +- gen_flagtabs_h gen_ftypetabs_h gen_i386_tables_h \ +- gen_ia64_tables_h gen_machinetabs_h gen_msg_typetabs_h \ +- gen_optabs_h gen_ppc_tables_h gen_s390_tables_h \ +- gen_s390x_tables_h gen_x86_64_tables_h +-if USE_ALPHA +-noinst_PROGRAMS += gen_alpha_tables_h +-endif +-if USE_ARMEB +-noinst_PROGRAMS += gen_armeb_tables_h +-endif +-if USE_AARCH64 +-noinst_PROGRAMS += gen_aarch64_tables_h +-endif +-gen_actiontabs_h_SOURCES = gen_tables.c gen_tables.h actiontab.h +-gen_actiontabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="actiontab.h"' +-actiontabs.h: gen_actiontabs_h Makefile +- ./gen_actiontabs_h --lowercase --i2s --s2i action > $@ +- +-if USE_ALPHA +-gen_alpha_tables_h_SOURCES = gen_tables.c gen_tables.h alpha_table.h +-gen_alpha_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="alpha_table.h"' +-alpha_tables.h: gen_alpha_tables_h Makefile +- ./gen_alpha_tables_h --lowercase --i2s --s2i alpha_syscall > $@ +-endif +- +-if USE_ARMEB +-gen_armeb_tables_h_SOURCES = gen_tables.c gen_tables.h armeb_table.h +-gen_armeb_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="armeb_table.h"' +-armeb_tables.h: gen_armeb_tables_h Makefile +- ./gen_armeb_tables_h --lowercase --i2s --s2i armeb_syscall > $@ +-endif +- +-if USE_AARCH64 +-gen_aarch64_tables_h_SOURCES = gen_tables.c gen_tables.h aarch64_table.h +-gen_aarch64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="aarch64_table.h"' +-aarch64_tables.h: gen_aarch64_tables_h Makefile +- ./gen_aarch64_tables_h --lowercase --i2s --s2i aarch64_syscall > $@ +-endif +- +-gen_errtabs_h_SOURCES = gen_tables.c gen_tables.h errtab.h +-gen_errtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="errtab.h"' +-errtabs.h: gen_errtabs_h Makefile +- ./gen_errtabs_h --duplicate-ints --uppercase --i2s --s2i err > $@ +- +-gen_fieldtabs_h_SOURCES = gen_tables.c gen_tables.h fieldtab.h +-gen_fieldtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="fieldtab.h"' +-fieldtabs.h: gen_fieldtabs_h Makefile +- ./gen_fieldtabs_h --duplicate-ints --lowercase --i2s --s2i field > $@ +- +-gen_flagtabs_h_SOURCES = gen_tables.c gen_tables.h flagtab.h +-gen_flagtabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="flagtab.h"' +-flagtabs.h: gen_flagtabs_h Makefile +- ./gen_flagtabs_h --lowercase --i2s --s2i flag > $@ +- +-gen_ftypetabs_h_SOURCES = gen_tables.c gen_tables.h ftypetab.h +-gen_ftypetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ftypetab.h"' +-ftypetabs.h: gen_ftypetabs_h Makefile +- ./gen_ftypetabs_h --lowercase --i2s --s2i ftype > $@ +- +-gen_i386_tables_h_SOURCES = gen_tables.c gen_tables.h i386_table.h +-gen_i386_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="i386_table.h"' +-i386_tables.h: gen_i386_tables_h Makefile +- ./gen_i386_tables_h --duplicate-ints --lowercase --i2s --s2i \ +- i386_syscall > $@ +- +-gen_ia64_tables_h_SOURCES = gen_tables.c gen_tables.h ia64_table.h +-gen_ia64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ia64_table.h"' +-ia64_tables.h: gen_ia64_tables_h Makefile +- ./gen_ia64_tables_h --lowercase --i2s --s2i ia64_syscall > $@ +- +-gen_machinetabs_h_SOURCES = gen_tables.c gen_tables.h machinetab.h +-gen_machinetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="machinetab.h"' +-machinetabs.h: gen_machinetabs_h Makefile +- ./gen_machinetabs_h --duplicate-ints --lowercase --i2s --s2i machine \ +- > $@ +- +-gen_msg_typetabs_h_SOURCES = gen_tables.c gen_tables.h msg_typetab.h +-gen_msg_typetabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="msg_typetab.h"' +-msg_typetabs.h: gen_msg_typetabs_h Makefile +- ./gen_msg_typetabs_h --uppercase --i2s --s2i msg_type > $@ +- +-gen_optabs_h_SOURCES = gen_tables.c gen_tables.h optab.h +-gen_optabs_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="optab.h"' +-optabs.h: gen_optabs_h Makefile +- ./gen_optabs_h --i2s op > $@ +- +-gen_ppc_tables_h_SOURCES = gen_tables.c gen_tables.h ppc_table.h +-gen_ppc_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="ppc_table.h"' +-ppc_tables.h: gen_ppc_tables_h Makefile +- ./gen_ppc_tables_h --lowercase --i2s --s2i ppc_syscall > $@ +- +-gen_s390_tables_h_SOURCES = gen_tables.c gen_tables.h s390_table.h +-gen_s390_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="s390_table.h"' +-s390_tables.h: gen_s390_tables_h Makefile +- ./gen_s390_tables_h --lowercase --i2s --s2i s390_syscall > $@ +- +-gen_s390x_tables_h_SOURCES = gen_tables.c gen_tables.h s390x_table.h +-gen_s390x_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="s390x_table.h"' +-s390x_tables.h: gen_s390x_tables_h Makefile +- ./gen_s390x_tables_h --lowercase --i2s --s2i s390x_syscall > $@ +- +-gen_x86_64_tables_h_SOURCES = gen_tables.c gen_tables.h x86_64_table.h +-gen_x86_64_tables_h_CFLAGS = $(AM_CFLAGS) '-DTABLE_H="x86_64_table.h"' +-x86_64_tables.h: gen_x86_64_tables_h Makefile +- ./gen_x86_64_tables_h --lowercase --i2s --s2i x86_64_syscall > $@ +diff --git a/lib/aarch64_tables.h b/lib/aarch64_tables.h +new file mode 100644 +index 0000000..571d6ee +--- /dev/null ++++ b/lib/aarch64_tables.h +@@ -0,0 +1,125 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char aarch64_syscall_strings[] = "accept\0accept4\0acct\0add_key\0adjtimex\0bind\0brk\0capget\0capset\0chdir\0" ++ "chroot\0clock_adjtime\0clock_getres\0clock_gettime\0clock_nanosleep\0clock_settime\0clone\0close\0connect\0delete_module\0" ++ "dup\0dup3\0epoll_create1\0epoll_ctl\0epoll_pwait\0eventfd2\0execve\0exit\0exit_group\0faccessat\0" ++ "fallocate\0fanotify_init\0fanotify_mark\0fchdir\0fchmod\0fchmodat\0fchown\0fchownat\0fdatasync\0fgetxattr\0" ++ "finit_module\0flistxattr\0flock\0fremovexattr\0fsetxattr\0fsync\0futex\0get_mempolicy\0get_robust_list\0getcpu\0" ++ "getcwd\0getdents64\0getegid\0geteuid\0getgid\0getgroups\0getitimer\0getpeername\0getpgid\0getpid\0" ++ "getppid\0getpriority\0getresgid\0getresuid\0getrlimit\0getrusage\0getsid\0getsockname\0getsockopt\0gettid\0" ++ "gettimeofday\0getuid\0getxattr\0init_module\0inotify_add_watch\0inotify_init1\0inotify_rm_watch\0io_cancel\0io_destroy\0io_getevents\0" ++ "io_setup\0io_submit\0ioctl\0ioprio_get\0ioprio_set\0kcmp\0kexec_load\0keyctl\0kill\0lgetxattr\0" ++ "linkat\0listen\0listxattr\0llistxattr\0lookup_dcookie\0lremovexattr\0lsetxattr\0madvise\0mbind\0migrate_pages\0" ++ "mincore\0mkdirat\0mknodat\0mlock\0mlockall\0mount\0move_pages\0mprotect\0mq_getsetattr\0mq_notify\0" ++ "mq_open\0mq_timedreceive\0mq_timedsend\0mq_unlink\0mremap\0msgctl\0msgget\0msgrcv\0msgsnd\0msync\0" ++ "munlock\0munlockall\0munmap\0name_to_handle_at\0nanosleep\0nfsservctl\0open_by_handle_at\0openat\0perf_event_open\0personality\0" ++ "pipe2\0pivot_root\0ppoll\0prctl\0pread64\0preadv\0prlimit64\0process_vm_readv\0process_vm_writev\0pselect6\0" ++ "ptrace\0pwrite64\0pwritev\0quotactl\0read\0readahead\0readlinkat\0readv\0reboot\0recvfrom\0" ++ "recvmmsg\0recvmsg\0remap_file_pages\0removexattr\0renameat\0request_key\0restart_syscall\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0" ++ "rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0rt_sigtimedwait\0rt_tgsigqueueinfo\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0" ++ "sched_rr_get_interval\0sched_setaffinity\0sched_setparam\0sched_setscheduler\0sched_yield\0semctl\0semget\0semop\0semtimedop\0sendmmsg\0" ++ "sendmsg\0sendto\0set_mempolicy\0set_robust_list\0set_tid_address\0setdomainname\0setfsgid\0setfsuid\0setgid\0setgroups\0" ++ "sethostname\0setitimer\0setns\0setpgid\0setpriority\0setregid\0setresgid\0setresuid\0setreuid\0setrlimit\0" ++ "setsid\0setsockopt\0settimeofday\0setuid\0setxattr\0shmat\0shmctl\0shmdt\0shmget\0shutdown\0" ++ "sigaltstack\0signalfd4\0socket\0socketpair\0splice\0swapoff\0swapon\0symlinkat\0sync\0sync_file_range\0" ++ "syncfs\0sysinfo\0syslog\0tee\0tgkill\0timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0timer_settime\0" ++ "timerfd_create\0timerfd_gettime\0timerfd_settime\0times\0tkill\0umask\0umount2\0uname\0unlinkat\0unshare\0" ++ "utimensat\0vhangup\0vmsplice\0wait4\0waitid\0write\0writev"; ++static const unsigned aarch64_syscall_s2i_s[] = { ++ 0,7,15,20,28,37,42,46,53,60, ++ 66,73,87,100,114,130,144,150,156,164, ++ 178,182,187,201,211,223,232,239,244,255, ++ 265,275,289,303,310,317,326,333,342,352, ++ 362,375,386,392,405,415,421,427,441,457, ++ 464,471,482,490,498,505,515,525,537,545, ++ 552,560,572,582,592,602,612,619,631,642, ++ 649,662,669,678,690,708,722,739,749,760, ++ 773,782,792,798,809,820,825,836,843,848, ++ 858,865,872,882,893,908,921,931,939,945, ++ 959,967,975,983,989,998,1004,1015,1024,1038, ++ 1048,1056,1072,1085,1095,1102,1109,1116,1123,1130, ++ 1136,1144,1155,1162,1180,1190,1201,1219,1226,1242, ++ 1254,1260,1271,1277,1283,1291,1298,1308,1325,1343, ++ 1352,1359,1368,1376,1385,1390,1400,1411,1417,1424, ++ 1433,1442,1450,1467,1479,1488,1500,1516,1529,1543, ++ 1558,1574,1587,1601,1617,1635,1658,1681,1699,1714, ++ 1733,1755,1773,1788,1807,1819,1826,1833,1839,1850, ++ 1859,1867,1874,1888,1904,1920,1934,1943,1952,1959, ++ 1969,1981,1991,1997,2005,2017,2026,2036,2046,2055, ++ 2065,2072,2083,2096,2103,2112,2118,2125,2131,2138, ++ 2147,2159,2169,2176,2187,2194,2202,2209,2219,2224, ++ 2240,2247,2255,2262,2266,2273,2286,2299,2316,2330, ++ 2344,2359,2375,2391,2397,2403,2409,2417,2423,2432, ++ 2440,2450,2458,2467,2473,2480,2486, ++}; ++static const int aarch64_syscall_s2i_i[] = { ++ 202,242,89,217,171,200,214,90,91,49, ++ 51,266,114,113,115,112,220,57,203,106, ++ 23,24,20,21,22,19,221,93,94,48, ++ 47,262,263,50,52,53,55,54,83,10, ++ 273,13,32,16,7,82,98,236,100,168, ++ 17,61,177,175,176,158,102,205,155,172, ++ 173,141,150,148,163,165,156,204,209,178, ++ 169,174,8,105,27,26,28,3,1,4, ++ 0,2,29,31,30,272,104,219,129,9, ++ 37,201,11,12,18,15,6,233,235,238, ++ 232,34,33,228,230,40,239,226,185,184, ++ 180,183,182,181,216,187,186,188,189,227, ++ 229,231,215,264,101,42,265,56,241,92, ++ 59,41,73,167,67,69,261,270,271,72, ++ 117,68,70,60,63,213,78,65,142,207, ++ 243,212,234,14,38,218,128,134,136,135, ++ 138,139,133,137,240,125,126,123,121,120, ++ 127,122,118,119,124,191,190,193,192,269, ++ 211,206,237,99,96,162,152,151,144,159, ++ 161,103,268,154,140,143,149,147,145,164, ++ 157,208,170,146,5,196,195,197,194,210, ++ 132,74,198,199,76,225,224,36,81,84, ++ 267,179,116,77,131,107,111,109,108,110, ++ 85,87,86,153,130,166,39,160,35,97, ++ 88,58,75,260,95,64,66, ++}; ++static int aarch64_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(aarch64_syscall_strings, aarch64_syscall_s2i_s, aarch64_syscall_s2i_i, 247, copy, value); ++ } ++} ++static const unsigned aarch64_syscall_i2s_direct[] = { ++ 773,749,782,739,760,2103,921,405,669,848, ++ 352,872,882,375,1467,908,392,464,893,223, ++ 187,201,211,178,182,-1u,708,690,722,792, ++ 809,798,386,975,967,2423,2209,858,1479,2409, ++ 998,1260,1190,-1u,-1u,-1u,-1u,265,255,60, ++ 303,66,310,317,333,326,1219,150,2450,1254, ++ 1376,471,-1u,1385,2480,1411,2486,1283,1359,1291, ++ 1368,-1u,1343,1271,2159,2458,2187,2262,1400,-1u, ++ -1u,2219,415,342,2224,2344,2375,2359,2440,15, ++ 46,53,1242,239,244,2473,1904,2432,421,1888, ++ 441,1180,515,1981,825,678,164,2273,2316,2299, ++ 2330,2286,130,100,87,114,2255,1352,1773,1788, ++ 1714,1699,1755,1681,1807,1635,1658,1733,1500,843, ++ 2397,2266,2147,1587,1516,1543,1529,1601,1558,1574, ++ 2005,560,1417,2017,1952,2046,2096,2036,582,2026, ++ 572,1943,1934,2391,1997,537,612,2065,505,1959, ++ 2417,1969,1920,592,2055,602,2403,1277,457,649, ++ 2083,28,545,552,662,490,498,482,642,2247, ++ 1048,1085,1072,1056,1038,1024,1109,1102,1116,1123, ++ 1826,1819,1839,1833,2131,2118,2112,2125,2169,2176, ++ 37,865,0,156,619,525,1867,1424,2072,631, ++ 2138,1859,1442,1390,42,1155,1095,20,1488,836, ++ 144,232,-1u,-1u,2202,2194,1015,1130,983,1136, ++ 989,1144,959,931,1450,939,427,1874,945,1004, ++ 1617,1226,7,1433,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ 2467,1298,275,289,1162,1201,73,2240,1991,1850, ++ 1308,1325,820,362, ++}; ++static const char *aarch64_syscall_i2s(int v) { ++ return i2s_direct__(aarch64_syscall_strings, aarch64_syscall_i2s_direct, 0, 273, v); ++} +diff --git a/lib/actiontabs.h b/lib/actiontabs.h +new file mode 100644 +index 0000000..a7a9e62 +--- /dev/null ++++ b/lib/actiontabs.h +@@ -0,0 +1,26 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char action_strings[] = "always\0never\0possible"; ++static const unsigned action_s2i_s[] = { ++ 0,7,13, ++}; ++static const int action_s2i_i[] = { ++ 2,0,1, ++}; ++static int action_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(action_strings, action_s2i_s, action_s2i_i, 3, copy, value); ++ } ++} ++static const unsigned action_i2s_direct[] = { ++ 7,13,0, ++}; ++static const char *action_i2s(int v) { ++ return i2s_direct__(action_strings, action_i2s_direct, 0, 2, v); ++} +diff --git a/lib/alpha_tables.h b/lib/alpha_tables.h +new file mode 100644 +index 0000000..b57e54c +--- /dev/null ++++ b/lib/alpha_tables.h +@@ -0,0 +1,196 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char alpha_syscall_strings[] = "_sysctl\0accept\0accept4\0access\0acct\0add_key\0adjtimex\0afs_syscall\0bdflush\0bind\0" ++ "brk\0capget\0capset\0chdir\0chmod\0chown\0chroot\0clock_adjtime\0clone\0close\0" ++ "connect\0create_module\0delete_module\0dipc\0dup\0dup2\0dup3\0epoll_create\0epoll_create1\0epoll_ctl\0" ++ "epoll_pwait\0epoll_wait\0eventfd\0eventfd2\0exec_with_loader\0execve\0exit\0exit_group\0faccessat\0fadvise64\0" ++ "fallocate\0fanotify_init\0fanotify_mark\0fchdir\0fchmod\0fchmodat\0fchown\0fchownat\0fcntl\0fdatasync\0" ++ "fgetxattr\0flistxattr\0flock\0fork\0fremovexattr\0fsetxattr\0fstat\0fstat64\0fstatat64\0fstatfs\0" ++ "fsync\0ftruncate\0futex\0futimesat\0get_kernel_syms\0get_mempolicy\0get_robust_list\0getcpu\0getcwd\0getdents\0" ++ "getdents64\0getdtablesize\0getgroups\0gethostname\0getitimer\0getpagesize\0getpeername\0getpgid\0getpgrp\0getpriority\0" ++ "getresgid\0getresuid\0getrlimit\0getrusage\0getsid\0getsockname\0getsockopt\0gettid\0gettimeofday\0getxattr\0" ++ "getxgid\0getxpid\0getxuid\0init_module\0inotify_add_watch\0inotify_init\0inotify_init1\0inotify_rm_watch\0io_cancel\0io_destroy\0" ++ "io_getevents\0io_setup\0io_submit\0ioctl\0ioprio_get\0ioprio_set\0kexec_load\0keyctl\0kill\0lchown\0" ++ "lgetxattr\0link\0linkat\0listen\0listxattr\0llistxattr\0lookup_dcookie\0lremovexattr\0lseek\0lsetxattr\0" ++ "lstat\0lstat64\0madvise\0mbind\0migrate_pages\0mincore\0mkdir\0mkdirat\0mknod\0mknodat\0" ++ "mlock\0mlockall\0mmap\0mount\0move_pages\0mprotect\0mq_getsetattr\0mq_notify\0mq_open\0mq_timedreceive\0" ++ "mq_timedsend\0mq_unlink\0mremap\0msgctl\0msgget\0msgrcv\0msgsnd\0msync\0munlock\0munlockall\0" ++ "munmap\0name_to_handle_at\0nanosleep\0nfsservctl\0old_adjtimex\0oldumount\0open\0open_by_handle_at\0openat\0osf_adjtime\0" ++ "osf_afs_syscall\0osf_alt_plock\0osf_alt_setsid\0osf_alt_sigpending\0osf_asynch_daemon\0osf_audcntl\0osf_audgen\0osf_chflags\0osf_execve\0osf_exportfs\0" ++ "osf_fchflags\0osf_fdatasync\0osf_fpathconf\0osf_fstatfs\0osf_fuser\0osf_getaddressconf\0osf_getdirentries\0osf_getdomainname\0osf_getfh\0osf_getfsstat\0" ++ "osf_gethostid\0osf_getitimer\0osf_getlogin\0osf_getmnt\0osf_getrusage\0osf_getsysinfo\0osf_gettimeofday\0osf_kloadcall\0osf_kmodcall\0osf_memcntl\0" ++ "osf_mincore\0osf_mount\0osf_mremap\0osf_msfs_syscall\0osf_msleep\0osf_mvalid\0osf_mwakeup\0osf_naccept\0osf_nfssvc\0osf_ngetpeername\0" ++ "osf_ngetsockname\0osf_nrecvfrom\0osf_nrecvmsg\0osf_nsendmsg\0osf_ntp_adjtime\0osf_ntp_gettime\0osf_old_creat\0osf_old_fstat\0osf_old_getpgrp\0osf_old_killpg\0" ++ "osf_old_lstat\0osf_old_open\0osf_old_sigaction\0osf_old_sigblock\0osf_old_sigreturn\0osf_old_sigsetmask\0osf_old_sigvec\0osf_old_stat\0osf_old_vadvise\0osf_old_vtrace\0" ++ "osf_old_wait\0osf_oldquota\0osf_pathconf\0osf_pid_block\0osf_pid_unblock\0osf_plock\0osf_priocntlset\0osf_profil\0osf_proplist_syscall\0osf_reboot\0" ++ "osf_revoke\0osf_sbrk\0osf_security\0osf_select\0osf_set_program_attributes\0osf_set_speculative\0osf_sethostid\0osf_setitimer\0osf_setlogin\0osf_setsysinfo\0" ++ "osf_settimeofday\0osf_shmat\0osf_signal\0osf_sigprocmask\0osf_sigsendset\0osf_sigstack\0osf_sigwaitprim\0osf_sstk\0osf_statfs\0osf_subsys_info\0" ++ "osf_swapctl\0osf_swapon\0osf_syscall\0osf_sysinfo\0osf_table\0osf_uadmin\0osf_usleep_thread\0osf_uswitch\0osf_utc_adjtime\0osf_utc_gettime\0" ++ "osf_utimes\0osf_utsname\0osf_wait4\0osf_waitid\0pciconfig_iobase\0pciconfig_read\0pciconfig_write\0perf_event_open\0personality\0pipe\0" ++ "pipe2\0pivot_root\0poll\0ppoll\0prctl\0pread\0preadv\0prlimit64\0process_vm_readv\0process_vm_writev\0" ++ "pselect6\0ptrace\0pwrite\0pwritev\0query_module\0quotactl\0read\0readahead\0readlink\0readlinkat\0" ++ "readv\0reboot\0recv\0recvfrom\0recvmmsg\0recvmsg\0remap_file_pages\0removexattr\0rename\0renameat\0" ++ "request_key\0restart_syscall\0rmdir\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0rt_sigtimedwait\0" ++ "rt_tgsigqueueinfo\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0sched_setparam\0sched_setscheduler\0" ++ "sched_yield\0select\0semctl\0semget\0semop\0send\0sendfile\0sendmmsg\0sendmsg\0sendto\0" ++ "set_mempolicy\0set_robust_list\0set_tid_address\0setdomainname\0setfsgid\0setfsuid\0setgid\0setgroups\0sethae\0sethostname\0" ++ "setitimer\0setns\0setpgid\0setpgrp\0setpriority\0setregid\0setresgid\0setresuid\0setreuid\0setrlimit\0" ++ "setsid\0setsockopt\0settimeofday\0setuid\0setxattr\0shmctl\0shmdt\0shmget\0shutdown\0sigaction\0" ++ "sigaltstack\0signalfd\0signalfd4\0sigpending\0sigreturn\0sigsuspend\0socket\0socketpair\0splice\0stat\0" ++ "stat64\0statfs\0swapoff\0swapon\0symlink\0symlinkat\0sync\0sync_file_range\0syncfs\0sysfs\0" ++ "sysinfo\0syslog\0tee\0tgkill\0timerfd\0timerfd_create\0timerfd_gettime\0timerfd_settime\0times\0tkill\0" ++ "truncate\0tuxcall\0umask\0umount\0uname\0unlink\0unlinkat\0unshare\0uselib\0ustat\0" ++ "utimensat\0utimes\0vfork\0vhangup\0vmsplice\0vserver\0wait4\0waitid\0write\0writev"; ++static const unsigned alpha_syscall_s2i_s[] = { ++ 0,8,15,23,30,35,43,52,64,72, ++ 77,81,88,95,101,107,113,120,134,140, ++ 146,154,168,182,187,191,196,201,214,228, ++ 238,250,261,269,278,295,302,307,318,328, ++ 338,348,362,376,383,390,399,406,415,421, ++ 431,441,452,458,463,476,486,492,500,510, ++ 518,524,534,540,550,566,580,596,603,610, ++ 619,630,644,654,666,676,688,700,708,716, ++ 728,738,748,758,768,775,787,798,805,818, ++ 827,835,843,851,863,881,894,908,925,935, ++ 946,959,968,978,984,995,1006,1017,1024,1029, ++ 1036,1046,1051,1058,1065,1075,1086,1101,1114,1120, ++ 1130,1136,1144,1152,1158,1172,1180,1186,1194,1200, ++ 1208,1214,1223,1228,1234,1245,1254,1268,1278,1286, ++ 1302,1315,1325,1332,1339,1346,1353,1360,1366,1374, ++ 1385,1392,1410,1420,1431,1444,1454,1459,1477,1484, ++ 1496,1512,1526,1541,1560,1578,1590,1601,1613,1624, ++ 1637,1650,1664,1678,1690,1700,1719,1737,1755,1765, ++ 1779,1793,1807,1820,1831,1845,1860,1877,1891,1904, ++ 1916,1928,1938,1949,1966,1977,1988,2000,2012,2023, ++ 2040,2057,2071,2084,2097,2113,2129,2143,2157,2173, ++ 2188,2202,2215,2233,2250,2268,2287,2302,2315,2331, ++ 2346,2359,2372,2385,2399,2415,2425,2441,2452,2473, ++ 2484,2495,2504,2517,2528,2555,2575,2589,2603,2616, ++ 2631,2648,2658,2669,2685,2700,2713,2729,2738,2749, ++ 2765,2777,2788,2800,2812,2822,2833,2851,2863,2879, ++ 2895,2906,2918,2928,2939,2956,2971,2987,3003,3015, ++ 3020,3026,3037,3042,3048,3054,3060,3067,3077,3094, ++ 3112,3121,3128,3135,3143,3156,3165,3170,3180,3189, ++ 3200,3206,3213,3218,3227,3236,3244,3261,3273,3280, ++ 3289,3301,3317,3323,3336,3350,3365,3381,3394,3408, ++ 3424,3442,3465,3488,3506,3521,3540,3562,3580,3595, ++ 3614,3626,3633,3640,3647,3653,3658,3667,3676,3684, ++ 3691,3705,3721,3737,3751,3760,3769,3776,3786,3793, ++ 3805,3815,3821,3829,3837,3849,3858,3868,3878,3887, ++ 3897,3904,3915,3928,3935,3944,3951,3957,3964,3973, ++ 3983,3995,4004,4014,4025,4035,4046,4053,4064,4071, ++ 4076,4083,4090,4098,4105,4113,4123,4128,4144,4151, ++ 4157,4165,4172,4176,4183,4191,4206,4222,4238,4244, ++ 4250,4259,4267,4273,4280,4286,4293,4302,4310,4317, ++ 4323,4333,4340,4346,4354,4363,4371,4377,4384,4390, ++}; ++static const int alpha_syscall_s2i_i[] = { ++ 319,99,502,33,51,439,366,338,300,104, ++ 17,368,369,12,15,16,61,499,312,6, ++ 98,306,308,373,41,90,487,407,486,408, ++ 474,409,478,485,25,59,1,405,462,413, ++ 480,494,495,13,124,461,123,453,92,447, ++ 387,390,131,2,393,384,91,427,455,329, ++ 95,130,394,454,309,430,467,473,367,305, ++ 377,89,79,87,361,64,141,233,63,100, ++ 372,344,144,364,234,150,118,378,359,385, ++ 47,20,24,307,445,444,489,446,402,399, ++ 400,398,401,54,443,442,448,441,37,208, ++ 386,9,458,106,388,389,406,392,19,383, ++ 68,426,75,429,449,375,136,451,14,452, ++ 314,316,71,302,472,74,437,436,432,435, ++ 434,433,341,200,201,202,203,217,315,317, ++ 73,497,340,342,303,321,45,498,450,140, ++ 258,181,188,187,163,252,253,34,11,169, ++ 35,261,248,161,243,214,159,165,164,18, ++ 142,86,49,184,117,256,116,223,77,260, ++ 78,21,65,240,215,213,216,30,158,31, ++ 32,29,27,28,245,246,8,62,81,146, ++ 40,5,46,109,139,110,108,38,72,115, ++ 84,149,247,153,154,107,237,44,244,55, ++ 56,69,222,93,43,239,143,83,50,257, ++ 122,209,218,48,238,112,157,70,160,255, ++ 259,199,0,241,85,242,251,250,220,219, ++ 138,207,7,236,376,345,346,493,324,42, ++ 488,374,94,464,348,349,490,496,504,505, ++ 463,26,350,491,347,148,3,379,58,460, ++ 120,311,102,125,479,113,410,391,128,457, ++ 440,412,137,352,354,353,356,351,357,355, ++ 492,335,336,396,331,333,337,395,330,332, ++ 334,358,204,205,206,101,370,503,114,133, ++ 431,466,411,166,326,325,132,80,301,88, ++ 362,501,39,82,96,127,371,343,126,145, ++ 147,105,360,23,382,210,211,212,134,156, ++ 235,476,484,52,103,111,97,135,468,67, ++ 425,328,304,322,57,459,36,469,500,254, ++ 318,310,470,424,477,481,483,482,323,381, ++ 129,397,60,22,339,10,456,465,313,327, ++ 475,363,66,76,471,428,365,438,4,121, ++}; ++static int alpha_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(alpha_syscall_strings, alpha_syscall_s2i_s, alpha_syscall_s2i_i, 410, copy, value); ++ } ++} ++static const unsigned alpha_syscall_i2s_direct[] = { ++ 2788,302,458,3165,4384,2202,140,2918,2129,1046, ++ 4286,1613,95,376,1194,101,107,77,1765,1114, ++ 835,1928,4273,3928,843,278,3121,2071,2084,2057, ++ 2000,2023,2040,23,1601,1637,4123,1024,2302,3821, ++ 2188,187,3015,2528,2441,1454,2215,827,2669,1807, ++ 2603,30,4014,-1u,978,2473,2484,4105,3180,295, ++ 4267,113,2143,708,676,1938,4340,4071,1130,2495, ++ 2729,1223,2315,1385,1245,1144,4346,1891,1916,644, ++ 3776,2157,3829,2589,2346,2812,1793,654,3793,630, ++ 191,486,415,2517,3037,518,3837,4046,146,8, ++ 716,3653,3213,4025,72,3904,1058,2415,2287,2233, ++ 2268,4035,2700,3236,3676,2331,1860,1831,787,-1u, ++ 3200,4390,2631,399,383,3218,3878,3849,3273,4250, ++ 524,452,3769,3684,3964,4053,1180,3317,2895,2250, ++ 1484,688,1779,2575,748,3887,2173,3897,3156,2359, ++ 775,-1u,-1u,2385,2399,-1u,3973,2713,2012,1719, ++ 2738,1678,-1u,1560,1755,1737,3737,-1u,-1u,1624, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,1512,-1u,-1u,1820,-1u,-1u,1541,1526,-1u, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,2777, ++ 1332,1339,1346,1353,3633,3640,3647,2906,1029,2648, ++ 3944,3951,3957,1977,1700,1966,1988,1360,2658,2879, ++ 2863,-1u,2504,1877,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,700,768,3983,2928,2425,2685,2555, ++ 1949,2800,2822,1690,2452,2097,2113,2372,1664,-1u, ++ 2851,2833,1578,1590,4151,2749,1845,2616,1496,2765, ++ 1904,1650,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u,-1u, ++ 64,3786,1228,1431,4090,610,154,851,168,550, ++ 4165,3206,134,4310,1208,1366,1214,1374,4157,0, ++ -1u,1444,4098,4238,3003,3760,3751,4317,4083,510, ++ 3580,3506,3595,3521,3614,3442,3465,3540,52,4280, ++ 1410,1325,1420,3868,738,2956,2971,3143,3048,3054, ++ 3128,3381,3323,3350,3336,3408,3365,3394,3626,805, ++ 3915,666,3805,4333,758,4371,43,603,81,88, ++ 3658,3858,728,182,3026,1172,2939,619,798,3170, ++ -1u,4244,3935,1120,476,818,1036,431,1065,1075, ++ 441,3261,1101,463,534,3562,3488,4259,959,935, ++ 946,968,925,-1u,-1u,307,1086,201,228,250, ++ 3244,3721,3301,328,-1u,-1u,-1u,-1u,-1u,-1u, ++ -1u,-1u,-1u,-1u,4176,4076,1136,492,4363,1152, ++ 566,3691,1278,1315,1302,1286,1268,1254,4377,35, ++ 3289,1017,995,984,881,863,908,421,1006,1158, ++ 1477,1186,1200,406,540,500,4293,3280,1051,4113, ++ 3189,390,318,3112,3042,4302,3705,580,4064,4128, ++ 4172,4354,1234,596,238,4323,3995,4183,261,3227, ++ 338,4191,4222,4206,4004,269,214,196,3020,894, ++ 3060,3135,3424,2987,348,362,3067,1392,1459,120, ++ 4144,3815,15,3667,3077,3094, ++}; ++static const char *alpha_syscall_i2s(int v) { ++ return i2s_direct__(alpha_syscall_strings, alpha_syscall_i2s_direct, 0, 505, v); ++} +diff --git a/lib/armeb_tables.h b/lib/armeb_tables.h +new file mode 100644 +index 0000000..dd2bf5f +--- /dev/null ++++ b/lib/armeb_tables.h +@@ -0,0 +1,165 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char armeb_syscall_strings[] = "accept\0accept4\0access\0acct\0add_key\0adjtimex\0alarm\0bdflush\0bind\0brk\0" ++ "capget\0capset\0chdir\0chmod\0chown\0chown32\0chroot\0clock_adjtime\0clock_getres\0clock_gettime\0" ++ "clock_nanosleep\0clock_settime\0clone\0close\0connect\0creat\0delete_module\0dup\0dup2\0dup3\0" ++ "epoll_create\0epoll_create1\0epoll_ctl\0epoll_wait\0eventfd\0eventfd2\0execve\0exit\0exit_group\0faccessat\0" ++ "fadvise64_64\0fallocate\0fanotify_init\0fanotify_mark\0fchdir\0fchmod\0fchmodat\0fchown\0fchown32\0fchownat\0" ++ "fcntl\0fcntl64\0fdatasync\0fgetxattr\0finit_module\0flistxattr\0flock\0fork\0fremovexattr\0fsetxattr\0" ++ "fstat\0fstat64\0fstatat64\0fstatfs\0fstatfs64\0fsync\0ftruncate\0ftruncate64\0futex\0futimesat\0" ++ "get_mempolicy\0get_robust_list\0getcpu\0getcwd\0getdents\0getdents64\0getegid\0getegid32\0geteuid\0geteuid32\0" ++ "getgid\0getgid32\0getgroups\0getgroups32\0getitimer\0getpeername\0getpgid\0getpgrp\0getpid\0getppid\0" ++ "getpriority\0getresgid\0getresgid32\0getresuid\0getresuid32\0getrlimit\0getrusage\0getsid\0getsockname\0getsockopt\0" ++ "gettid\0gettimeofday\0getuid\0getuid32\0getxattr\0init_module\0inotify_add_watch\0inotify_init\0inotify_init1\0inotify_rm_watch\0" ++ "io_cancel\0io_destroy\0io_getevents\0io_setup\0io_submit\0ioctl\0ioprio_get\0ioprio_set\0ipc\0kcmp\0" ++ "kexec_load\0keyctl\0kill\0lchown\0lchown32\0lgetxattr\0link\0linkat\0listen\0listxattr\0" ++ "llistxattr\0llseek\0lookup_dcookie\0lremovexattr\0lseek\0lsetxattr\0lstat\0lstat64\0madvise\0mbind\0" ++ "mincore\0mkdir\0mkdirat\0mknod\0mknodat\0mlock\0mlockall\0mmap\0mmap2\0mount\0" ++ "move_pages\0mprotect\0mq_getsetattr\0mq_notify\0mq_open\0mq_timedreceive\0mq_timedsend\0mq_unlink\0mremap\0msgctl\0" ++ "msgget\0msgrcv\0msgsnd\0msync\0munlock\0munlockall\0munmap\0name_to_handle_at\0nanosleep\0newselect\0" ++ "nfsservctl\0nice\0open\0open_by_handle_at\0openat\0pause\0pciconfig_iobase\0pciconfig_read\0pciconfig_write\0perf_event_open\0" ++ "personality\0pipe\0pipe2\0pivot_root\0poll\0prctl\0pread64\0preadv\0prlimit64\0process_vm_readv\0" ++ "process_vm_writev\0ptrace\0pwrite64\0pwritev\0quotactl\0read\0readahead\0readdir\0readlink\0readlinkat\0" ++ "readv\0reboot\0recv\0recvfrom\0recvmmsg\0recvmsg\0remap_file_pages\0removexattr\0rename\0renameat\0" ++ "request_key\0restart_syscall\0rmdir\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0rt_sigtimedwait\0" ++ "rt_tgsigqueueinfo\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0sched_setparam\0sched_setscheduler\0" ++ "sched_yield\0select\0semctl\0semget\0semop\0semtimedop\0send\0sendfile\0sendfile64\0sendmmsg\0" ++ "sendmsg\0sendto\0set_mempolicy\0set_robust_list\0set_tid_address\0setdomainname\0setfsgid\0setfsgid32\0setfsuid\0setfsuid32\0" ++ "setgid\0setgid32\0setgroups\0setgroups32\0sethostname\0setitimer\0setns\0setpgid\0setpriority\0setregid\0" ++ "setregid32\0setresgid\0setresgid32\0setresuid\0setresuid32\0setreuid\0setreuid32\0setrlimit\0setsid\0setsockopt\0" ++ "settimeofday\0setuid\0setuid32\0setxattr\0shmat\0shmctl\0shmdt\0shmget\0shutdown\0sigaction\0" ++ "sigaltstack\0signalfd\0signalfd4\0sigpending\0sigprocmask\0sigreturn\0sigsuspend\0socket\0socketcall\0socketpair\0" ++ "splice\0stat\0stat64\0statfs\0statfs64\0stime\0swapoff\0swapon\0symlink\0symlinkat\0" ++ "sync\0sync_file_range\0syncfs\0syscall\0sysctl\0sysfs\0sysinfo\0syslog\0tee\0tgkill\0" ++ "time\0timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0timer_settime\0timerfd_create\0timerfd_gettime\0timerfd_settime\0times\0" ++ "tkill\0truncate\0truncate64\0ugetrlimit\0umask\0umount\0umount2\0uname\0unlink\0unlinkat\0" ++ "unshare\0uselib\0ustat\0utime\0utimensat\0utimes\0vfork\0vhangup\0vmsplice\0vserver\0" ++ "wait4\0waitid\0write\0writev"; ++static const unsigned armeb_syscall_s2i_s[] = { ++ 0,7,15,22,27,35,44,50,58,63, ++ 67,74,81,87,93,99,107,114,128,141, ++ 155,171,185,191,197,205,211,225,229,234, ++ 239,252,266,276,287,295,304,311,316,327, ++ 337,350,360,374,388,395,402,411,418,427, ++ 436,442,450,460,470,483,494,500,505,518, ++ 528,534,542,552,560,570,576,586,598,604, ++ 614,628,644,651,658,667,678,686,696,704, ++ 714,721,730,740,752,762,774,782,790,797, ++ 805,817,827,839,849,861,871,881,888,900, ++ 911,918,931,938,947,956,968,986,999,1013, ++ 1030,1040,1051,1064,1073,1083,1089,1100,1111,1115, ++ 1120,1131,1138,1143,1150,1159,1169,1174,1181,1188, ++ 1198,1209,1216,1231,1244,1250,1260,1266,1274,1282, ++ 1288,1296,1302,1310,1316,1324,1330,1339,1344,1350, ++ 1356,1367,1376,1390,1400,1408,1424,1437,1447,1454, ++ 1461,1468,1475,1482,1488,1496,1507,1514,1532,1542, ++ 1552,1563,1568,1573,1591,1598,1604,1621,1636,1652, ++ 1668,1680,1685,1691,1702,1707,1713,1721,1728,1738, ++ 1755,1773,1780,1789,1797,1806,1811,1821,1829,1838, ++ 1849,1855,1862,1867,1876,1885,1893,1910,1922,1929, ++ 1938,1950,1966,1972,1985,1999,2014,2030,2043,2057, ++ 2073,2091,2114,2137,2155,2170,2189,2211,2229,2244, ++ 2263,2275,2282,2289,2296,2302,2313,2318,2327,2338, ++ 2347,2355,2362,2376,2392,2408,2422,2431,2442,2451, ++ 2462,2469,2478,2488,2500,2512,2522,2528,2536,2548, ++ 2557,2568,2578,2590,2600,2612,2621,2632,2642,2649, ++ 2660,2673,2680,2689,2698,2704,2711,2717,2724,2733, ++ 2743,2755,2764,2774,2785,2797,2807,2818,2825,2836, ++ 2847,2854,2859,2866,2873,2882,2888,2896,2903,2911, ++ 2921,2926,2942,2949,2957,2964,2970,2978,2985,2989, ++ 2996,3001,3014,3027,3044,3058,3072,3087,3103,3119, ++ 3125,3131,3140,3151,3162,3168,3175,3183,3189,3196, ++ 3205,3213,3220,3226,3232,3242,3249,3255,3263,3272, ++ 3280,3286,3293,3299, ++}; ++static const int armeb_syscall_s2i_i[] = { ++ 285,366,33,51,309,124,27,134,282,45, ++ 184,185,12,15,182,212,61,372,264,263, ++ 265,262,120,6,283,8,129,41,63,358, ++ 250,357,251,252,351,356,11,1,248,334, ++ 270,352,367,368,133,94,333,95,207,325, ++ 55,221,148,231,379,234,143,2,237,228, ++ 108,197,327,100,267,118,93,194,240,326, ++ 320,339,345,183,141,217,50,202,49,201, ++ 47,200,80,205,105,287,132,65,20,64, ++ 96,171,211,165,209,76,77,147,286,295, ++ 224,78,24,199,229,128,317,316,360,318, ++ 247,244,245,243,246,54,315,314,117,378, ++ 347,311,37,16,198,230,9,330,284,232, ++ 233,140,249,236,19,227,107,196,220,319, ++ 219,39,323,14,324,150,152,90,192,21, ++ 344,125,279,278,274,277,276,275,163,304, ++ 303,302,301,144,151,153,91,370,162,142, ++ 169,34,5,371,322,29,271,272,273,364, ++ 136,42,359,218,168,172,180,361,369,376, ++ 377,26,181,362,131,3,225,89,85,332, ++ 145,88,291,292,365,297,253,235,38,329, ++ 310,0,40,174,176,175,178,173,179,177, ++ 363,159,160,242,155,157,161,241,154,156, ++ 158,82,300,299,298,312,289,187,239,374, ++ 296,290,321,338,256,121,139,216,138,215, ++ 46,214,81,206,74,104,375,57,97,71, ++ 204,170,210,164,208,70,203,75,66,294, ++ 79,23,213,226,305,308,306,307,293,67, ++ 186,349,355,73,126,119,72,281,102,288, ++ 340,106,195,99,266,25,115,87,83,331, ++ 36,341,373,113,149,135,116,103,342,268, ++ 13,257,261,260,259,258,350,354,353,43, ++ 238,92,193,191,60,22,52,122,10,328, ++ 337,86,62,30,348,269,190,111,343,313, ++ 114,280,4,146, ++}; ++static int armeb_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(armeb_syscall_strings, armeb_syscall_s2i_s, armeb_syscall_s2i_i, 344, copy, value); ++ } ++} ++static const unsigned armeb_syscall_i2s_direct[] = { ++ 1950,311,500,1806,3293,1568,191,-1u,205,1169, ++ 3189,304,81,2996,1310,87,1143,-1u,-1u,1244, ++ 790,1350,3168,2673,931,2882,1773,44,-1u,1598, ++ 3226,-1u,-1u,15,1563,-1u,2921,1138,1922,1296, ++ 1966,225,1680,3119,-1u,63,2462,714,-1u,696, ++ 678,22,3175,-1u,1083,436,-1u,2528,-1u,-1u, ++ 3162,107,3220,229,797,782,2642,2733,-1u,-1u, ++ 2612,2548,2807,2774,2500,2632,861,871,918,2660, ++ 730,2478,2275,2903,-1u,1829,3213,2896,1855,1821, ++ 1339,1507,3131,576,395,411,805,2536,-1u,2866, ++ 552,-1u,2825,2978,2512,752,2854,1260,528,-1u, ++ -1u,3255,-1u,2949,3280,2888,2970,1111,570,2797, ++ 185,2408,3183,-1u,35,1367,2785,-1u,956,211, ++ -1u,1797,774,388,50,2964,1668,-1u,2442,2422, ++ 1209,658,1542,494,1482,1849,3299,881,450,2957, ++ 1324,1488,1330,1496,2229,2155,2244,2170,2263,2091, ++ 2114,2189,1532,1447,2590,839,-1u,-1u,1702,1552, ++ 2568,817,1707,2030,1972,1999,1985,2057,2014,2043, ++ 1713,1780,93,651,67,74,2743,2318,-1u,-1u, ++ 3249,3151,1344,3140,586,2859,1266,534,1150,938, ++ 721,704,686,2621,2557,740,2488,418,2600,849, ++ 2578,827,99,2680,2469,2451,2431,667,1691,1288, ++ 1274,442,-1u,-1u,911,1811,2689,1250,518,947, ++ 1159,460,1188,1198,483,1910,1231,505,3125,2327, ++ 598,2211,2137,1064,1040,1051,1073,1030,316,1216, ++ 239,266,276,1893,-1u,-1u,2392,3001,3058,3044, ++ 3027,3014,171,141,128,155,2873,560,2989,3242, ++ 337,1604,1621,1636,1400,1437,1424,1408,1390,1376, ++ 3286,2818,58,197,1181,0,888,762,2836,2313, ++ 2355,1862,1867,2724,2649,900,2347,1885,2296,2289, ++ 2282,1475,1468,1461,1454,2698,2711,2717,2704,27, ++ 1938,1131,2302,3272,1100,1089,986,968,1013,1282, ++ 614,2362,1591,1302,1316,427,604,542,3196,1929, ++ 1174,2911,1838,402,327,-1u,-1u,3205,2376,628, ++ 2847,2926,2985,3263,1356,644,-1u,1120,3232,2755, ++ 3072,287,350,3103,3087,2764,295,252,234,1685, ++ 999,1721,1789,2073,1652,1876,7,360,374,1728, ++ 1514,1573,114,2942,2338,2522,1738,1755,1115,470, ++}; ++static const char *armeb_syscall_i2s(int v) { ++ return i2s_direct__(armeb_syscall_strings, armeb_syscall_i2s_direct, 0, 379, v); ++} +diff --git a/lib/errtabs.h b/lib/errtabs.h +new file mode 100644 +index 0000000..53deac2 +--- /dev/null ++++ b/lib/errtabs.h +@@ -0,0 +1,78 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char err_strings[] = "E2BIG\0EACCES\0EADDRINUSE\0EADDRNOTAVAIL\0EADV\0EAFNOSUPPORT\0EAGAIN\0EALREADY\0EBADE\0EBADF\0" ++ "EBADFD\0EBADMSG\0EBADR\0EBADRQC\0EBADSLT\0EBFONT\0EBUSY\0ECANCELED\0ECHILD\0ECHRNG\0" ++ "ECOMM\0ECONNABORTED\0ECONNREFUSED\0ECONNRESET\0EDEADLK\0EDEADLOCK\0EDESTADDRREQ\0EDOM\0EDOTDOT\0EDQUOT\0" ++ "EEXIST\0EFAULT\0EFBIG\0EHOSTDOWN\0EHOSTUNREACH\0EIDRM\0EILSEQ\0EINPROGRESS\0EINTR\0EINVAL\0" ++ "EIO\0EISCONN\0EISDIR\0EISNAM\0EKEYEXPIRED\0EKEYREJECTED\0EKEYREVOKED\0EL2HLT\0EL2NSYNC\0EL3HLT\0" ++ "EL3RST\0ELIBACC\0ELIBBAD\0ELIBEXEC\0ELIBMAX\0ELIBSCN\0ELNRNG\0ELOOP\0EMEDIUMTYPE\0EMFILE\0" ++ "EMLINK\0EMSGSIZE\0EMULTIHOP\0ENAMETOOLONG\0ENAVAIL\0ENETDOWN\0ENETRESET\0ENETUNREACH\0ENFILE\0ENOANO\0" ++ "ENOBUFS\0ENOCSI\0ENODATA\0ENODEV\0ENOENT\0ENOEXEC\0ENOKEY\0ENOLCK\0ENOLINK\0ENOMEDIUM\0" ++ "ENOMEM\0ENOMSG\0ENONET\0ENOPKG\0ENOPROTOOPT\0ENOSPC\0ENOSR\0ENOSTR\0ENOSYS\0ENOTBLK\0" ++ "ENOTCONN\0ENOTDIR\0ENOTEMPTY\0ENOTNAM\0ENOTRECOVERABLE\0ENOTSOCK\0ENOTTY\0ENOTUNIQ\0ENXIO\0EOPNOTSUPP\0" ++ "EOVERFLOW\0EOWNERDEAD\0EPERM\0EPFNOSUPPORT\0EPIPE\0EPROTO\0EPROTONOSUPPORT\0EPROTOTYPE\0ERANGE\0EREMCHG\0" ++ "EREMOTE\0EREMOTEIO\0ERESTART\0EROFS\0ESHUTDOWN\0ESOCKTNOSUPPORT\0ESPIPE\0ESRCH\0ESRMNT\0ESTALE\0" ++ "ESTRPIPE\0ETIME\0ETIMEDOUT\0ETOOMANYREFS\0ETXTBSY\0EUCLEAN\0EUNATCH\0EUSERS\0EWOULDBLOCK\0EXDEV\0" ++ "EXFULL"; ++static const unsigned err_s2i_s[] = { ++ 0,6,13,24,38,43,56,63,72,78, ++ 84,91,99,105,113,121,128,134,144,151, ++ 158,164,177,190,201,209,219,232,237,245, ++ 252,259,266,272,282,295,301,308,320,326, ++ 333,337,345,352,359,371,384,396,403,412, ++ 419,426,434,442,451,459,467,474,480,492, ++ 499,506,515,525,538,546,555,565,577,584, ++ 591,599,606,614,621,628,636,643,650,658, ++ 668,675,682,689,696,708,715,721,728,735, ++ 743,752,760,770,778,794,803,810,819,825, ++ 836,846,857,863,876,882,889,905,916,923, ++ 931,939,949,958,964,974,990,997,1003,1010, ++ 1017,1026,1032,1042,1055,1063,1071,1079,1086,1098, ++ 1104, ++}; ++static const int err_s2i_i[] = { ++ 7,13,98,99,68,97,11,114,52,9, ++ 77,74,53,56,57,59,16,125,10,44, ++ 70,103,111,104,35,35,89,33,73,122, ++ 17,14,27,112,113,43,84,115,4,22, ++ 5,106,21,120,127,129,128,51,45,46, ++ 47,79,80,83,82,81,48,40,124,24, ++ 31,90,72,36,119,100,102,101,23,55, ++ 105,50,61,19,2,8,126,37,67,123, ++ 12,42,64,65,92,28,63,60,38,15, ++ 107,20,39,118,131,88,25,76,6,95, ++ 75,130,1,96,32,71,93,91,34,78, ++ 66,121,85,30,108,94,29,3,69,116, ++ 86,62,110,109,26,117,49,87,11,18, ++ 54, ++}; ++static int err_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISLOWER(c) ? c - 'a' + 'A' : c; ++ } ++ copy[i] = 0; ++ return s2i__(err_strings, err_s2i_s, err_s2i_i, 131, copy, value); ++ } ++} ++static const unsigned err_i2s_direct[] = { ++ 857,621,997,320,333,819,0,628,78,144, ++ 56,668,6,259,735,128,252,1098,614,752, ++ 345,326,577,492,803,1055,266,708,990,958, ++ 499,876,232,916,201,525,643,728,760,474, ++ -1u,675,295,151,403,412,419,467,1071,599, ++ 396,72,99,1104,584,105,113,-1u,121,721, ++ 606,1026,715,682,689,931,650,38,1003,158, ++ 882,515,237,91,836,810,84,923,426,434, ++ 459,451,442,301,949,1017,1079,794,219,506, ++ 905,696,889,974,825,863,43,13,24,546, ++ 565,555,164,190,591,337,743,964,1042,1032, ++ 177,272,282,63,308,1010,1063,770,538,352, ++ 939,245,658,480,134,636,359,384,371,846, ++ 778, ++}; ++static const char *err_i2s(int v) { ++ return i2s_direct__(err_strings, err_i2s_direct, 1, 131, v); ++} +diff --git a/lib/fieldtabs.h b/lib/fieldtabs.h +new file mode 100644 +index 0000000..fb50e08 +--- /dev/null ++++ b/lib/fieldtabs.h +@@ -0,0 +1,49 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char field_strings[] = "a0\0a1\0a2\0a3\0arch\0auid\0devmajor\0devminor\0dir\0egid\0" ++ "euid\0exit\0field_compare\0filetype\0fsgid\0fsuid\0gid\0inode\0key\0loginuid\0" ++ "msgtype\0obj_gid\0obj_lev_high\0obj_lev_low\0obj_role\0obj_type\0obj_uid\0obj_user\0path\0perm\0" ++ "pers\0pid\0ppid\0sgid\0subj_clr\0subj_role\0subj_sen\0subj_type\0subj_user\0success\0" ++ "suid\0uid"; ++static const unsigned field_s2i_s[] = { ++ 0,3,6,9,12,17,22,31,40,44, ++ 49,54,59,73,82,88,94,98,104,108, ++ 117,125,133,146,158,167,176,184,193,198, ++ 203,208,212,217,222,231,241,250,260,270, ++ 278,283, ++}; ++static const int field_s2i_i[] = { ++ 200,201,202,203,11,9,100,101,107,6, ++ 2,103,111,108,8,4,5,102,210,9, ++ 12,110,23,22,20,21,109,19,105,106, ++ 10,0,18,7,17,14,16,15,13,104, ++ 3,1, ++}; ++static int field_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(field_strings, field_s2i_s, field_s2i_i, 42, copy, value); ++ } ++} ++static const int field_i2s_i[] = { ++ 0,1,2,3,4,5,6,7,8,9, ++ 10,11,12,13,14,15,16,17,18,19, ++ 20,21,22,23,100,101,102,103,104,105, ++ 106,107,108,109,110,111,200,201,202,203, ++ 210, ++}; ++static const unsigned field_i2s_s[] = { ++ 208,283,49,278,88,94,44,217,82,17, ++ 203,12,117,260,231,250,241,222,212,184, ++ 158,167,146,133,22,31,98,54,270,193, ++ 198,40,73,176,125,59,0,3,6,9, ++ 104, ++}; ++static const char *field_i2s(int v) { ++ return i2s_bsearch__(field_strings, field_i2s_i, field_i2s_s, 41, v); ++} +diff --git a/lib/flagtabs.h b/lib/flagtabs.h +new file mode 100644 +index 0000000..e191db3 +--- /dev/null ++++ b/lib/flagtabs.h +@@ -0,0 +1,26 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char flag_strings[] = "entry\0exclude\0exit\0task\0user"; ++static const unsigned flag_s2i_s[] = { ++ 0,6,14,19,24, ++}; ++static const int flag_s2i_i[] = { ++ 2,5,4,1,0, ++}; ++static int flag_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(flag_strings, flag_s2i_s, flag_s2i_i, 5, copy, value); ++ } ++} ++static const unsigned flag_i2s_direct[] = { ++ 24,19,0,-1u,14,6, ++}; ++static const char *flag_i2s(int v) { ++ return i2s_direct__(flag_strings, flag_i2s_direct, 0, 5, v); ++} +diff --git a/lib/ftypetabs.h b/lib/ftypetabs.h +new file mode 100644 +index 0000000..04aaa46 +--- /dev/null ++++ b/lib/ftypetabs.h +@@ -0,0 +1,29 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ftype_strings[] = "block\0character\0dir\0fifo\0file\0link\0socket"; ++static const unsigned ftype_s2i_s[] = { ++ 0,6,16,20,25,30,35, ++}; ++static const int ftype_s2i_i[] = { ++ 24576,8192,16384,4096,32768,40960,49152, ++}; ++static int ftype_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(ftype_strings, ftype_s2i_s, ftype_s2i_i, 7, copy, value); ++ } ++} ++static const int ftype_i2s_i[] = { ++ 4096,8192,16384,24576,32768,40960,49152, ++}; ++static const unsigned ftype_i2s_s[] = { ++ 20,6,16,0,25,30,35, ++}; ++static const char *ftype_i2s(int v) { ++ return i2s_bsearch__(ftype_strings, ftype_i2s_i, ftype_i2s_s, 7, v); ++} +diff --git a/lib/i386_tables.h b/lib/i386_tables.h +new file mode 100644 +index 0000000..6703ffc +--- /dev/null ++++ b/lib/i386_tables.h +@@ -0,0 +1,163 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char i386_syscall_strings[] = "_llseek\0_newselect\0_sysctl\0access\0acct\0add_key\0adjtimex\0afs_syscall\0alarm\0bdflush\0" ++ "break\0brk\0capget\0capset\0chdir\0chmod\0chown\0chown32\0chroot\0clock_adjtime\0" ++ "clock_getres\0clock_gettime\0clock_nanosleep\0clock_settime\0clone\0close\0creat\0create_module\0delete_module\0dup\0" ++ "dup2\0dup3\0epoll_create\0epoll_create1\0epoll_ctl\0epoll_pwait\0epoll_wait\0eventfd\0eventfd2\0execve\0" ++ "exit\0exit_group\0faccessat\0fadvise64\0fadvise64_64\0fallocate\0fanotify_init\0fanotify_mark\0fchdir\0fchmod\0" ++ "fchmodat\0fchown\0fchown32\0fchownat\0fcntl\0fcntl64\0fdatasync\0fgetxattr\0finit_module\0flistxattr\0" ++ "flock\0fork\0fremovexattr\0fsetxattr\0fstat\0fstat64\0fstatat64\0fstatfs\0fstatfs64\0fsync\0" ++ "ftime\0ftruncate\0ftruncate64\0futex\0futimesat\0get_kernel_syms\0get_mempolicy\0get_robust_list\0get_thread_area\0getcpu\0" ++ "getcwd\0getdents\0getdents64\0getegid\0getegid32\0geteuid\0geteuid32\0getgid\0getgid32\0getgroups\0" ++ "getgroups32\0getitimer\0getpgid\0getpgrp\0getpid\0getpmsg\0getppid\0getpriority\0getresgid\0getresgid32\0" ++ "getresuid\0getresuid32\0getrlimit\0getrusage\0getsid\0gettid\0gettimeofday\0getuid\0getuid32\0getxattr\0" ++ "gtty\0idle\0init_module\0inotify_add_watch\0inotify_init\0inotify_init1\0inotify_rm_watch\0io_cancel\0io_destroy\0io_getevents\0" ++ "io_setup\0io_submit\0ioctl\0ioperm\0iopl\0ioprio_get\0ioprio_set\0ipc\0kcmp\0keyctl\0" ++ "kill\0lchown\0lchown32\0lgetxattr\0link\0linkat\0listxattr\0llistxattr\0lock\0lookup_dcookie\0" ++ "lremovexattr\0lseek\0lsetxattr\0lstat\0lstat64\0madvise\0madvise1\0mbind\0migrate_pages\0mincore\0" ++ "mkdir\0mkdirat\0mknod\0mknodat\0mlock\0mlockall\0mmap\0mmap2\0modify_ldt\0mount\0" ++ "move_pages\0mprotect\0mpx\0mq_getsetattr\0mq_notify\0mq_open\0mq_timedreceive\0mq_timedsend\0mq_unlink\0mremap\0" ++ "msync\0munlock\0munlockall\0munmap\0name_to_handle_at\0nanosleep\0nfsservctl\0nice\0oldfstat\0oldlstat\0" ++ "oldolduname\0oldstat\0olduname\0open\0open_by_handle_at\0openat\0pause\0perf_event_open\0personality\0pipe\0" ++ "pipe2\0pivot_root\0poll\0ppoll\0prctl\0pread64\0preadv\0prlimit64\0process_vm_readv\0process_vm_writev\0" ++ "prof\0profil\0pselect6\0ptrace\0putpmsg\0pwrite64\0pwritev\0query_module\0quotactl\0read\0" ++ "readahead\0readdir\0readlink\0readlinkat\0readv\0reboot\0recvmmsg\0remap_file_pages\0removexattr\0rename\0" ++ "renameat\0request_key\0restart_syscall\0rmdir\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0" ++ "rt_sigtimedwait\0rt_tgsigqueueinfo\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0sched_setparam\0" ++ "sched_setscheduler\0sched_yield\0select\0sendfile\0sendfile64\0sendmmsg\0set_mempolicy\0set_robust_list\0set_thread_area\0set_tid_address\0" ++ "setdomainname\0setfsgid\0setfsgid32\0setfsuid\0setfsuid32\0setgid\0setgid32\0setgroups\0setgroups32\0sethostname\0" ++ "setitimer\0setns\0setpgid\0setpriority\0setregid\0setregid32\0setresgid\0setresgid32\0setresuid\0setresuid32\0" ++ "setreuid\0setreuid32\0setrlimit\0setsid\0settimeofday\0setuid\0setuid32\0setxattr\0sgetmask\0sigaction\0" ++ "sigaltstack\0signal\0signalfd\0signalfd4\0sigpending\0sigprocmask\0sigreturn\0sigsuspend\0socketcall\0splice\0" ++ "ssetmask\0stat\0stat64\0statfs\0statfs64\0stime\0stty\0swapoff\0swapon\0symlink\0" ++ "symlinkat\0sync\0sync_file_range\0syncfs\0sys_kexec_load\0sysfs\0sysinfo\0syslog\0tee\0tgkill\0" ++ "time\0timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0timer_settime\0timerfd\0timerfd_gettime\0timerfd_settime\0times\0" ++ "tkill\0truncate\0truncate64\0ugetrlimit\0ulimit\0umask\0umount\0umount2\0uname\0unlink\0" ++ "unlinkat\0unshare\0uselib\0ustat\0utime\0utimensat\0utimes\0vfork\0vhangup\0vm86\0" ++ "vm86old\0vmsplice\0vserver\0wait4\0waitid\0waitpid\0write\0writev"; ++static const unsigned i386_syscall_s2i_s[] = { ++ 0,8,19,27,34,39,47,56,68,74, ++ 82,88,92,99,106,112,118,124,132,139, ++ 153,166,180,196,210,216,222,228,242,256, ++ 260,265,270,283,297,307,319,330,338,347, ++ 354,359,370,380,390,403,413,427,441,448, ++ 455,464,471,480,489,495,503,513,523,536, ++ 547,553,558,571,581,587,595,605,613,623, ++ 629,635,645,657,663,673,689,703,719,735, ++ 742,749,758,769,777,787,795,805,812,821, ++ 831,843,853,861,869,876,884,892,904,914, ++ 926,936,948,958,968,975,982,995,1002,1011, ++ 1020,1025,1030,1042,1060,1073,1087,1104,1114,1125, ++ 1138,1147,1157,1163,1170,1175,1186,1197,1201,1206, ++ 1213,1218,1225,1234,1244,1249,1256,1266,1277,1282, ++ 1297,1310,1316,1326,1332,1340,1348,1357,1363,1377, ++ 1385,1391,1399,1405,1413,1419,1428,1433,1439,1450, ++ 1456,1467,1476,1480,1494,1504,1512,1528,1541,1551, ++ 1558,1564,1572,1583,1590,1608,1618,1629,1634,1643, ++ 1652,1664,1672,1681,1686,1704,1711,1717,1733,1745, ++ 1750,1756,1767,1772,1778,1784,1792,1799,1809,1826, ++ 1844,1849,1856,1865,1872,1880,1889,1897,1910,1919, ++ 1924,1934,1942,1951,1962,1968,1975,1984,2001,2013, ++ 2020,2029,2041,2057,2063,2076,2090,2105,2121,2134, ++ 2148,2164,2182,2205,2228,2246,2261,2280,2302,2320, ++ 2335,2354,2366,2373,2382,2393,2402,2416,2432,2448, ++ 2464,2478,2487,2498,2507,2518,2525,2534,2544,2556, ++ 2568,2578,2584,2592,2604,2613,2624,2634,2646,2656, ++ 2668,2677,2688,2698,2705,2718,2725,2734,2743,2752, ++ 2762,2774,2781,2790,2800,2811,2823,2833,2844,2855, ++ 2862,2871,2876,2883,2890,2899,2905,2910,2918,2925, ++ 2933,2943,2948,2964,2971,2986,2992,3000,3007,3011, ++ 3018,3023,3036,3049,3066,3080,3094,3102,3118,3134, ++ 3140,3146,3155,3166,3177,3184,3190,3197,3205,3211, ++ 3218,3227,3235,3242,3248,3254,3264,3271,3277,3285, ++ 3290,3298,3307,3315,3321,3328,3336,3342, ++}; ++static const int i386_syscall_s2i_i[] = { ++ 140,142,149,33,51,286,124,137,27,134, ++ 17,45,184,185,12,15,182,212,61,343, ++ 266,265,267,264,120,6,8,127,129,41, ++ 63,330,254,329,255,319,256,323,328,11, ++ 1,252,307,250,272,324,338,339,133,94, ++ 306,95,207,298,55,221,148,231,350,234, ++ 143,2,237,228,108,197,300,100,269,118, ++ 35,93,194,240,299,130,275,312,244,318, ++ 183,141,220,50,202,49,201,47,200,80, ++ 205,105,132,65,20,188,64,96,171,211, ++ 165,209,76,77,147,224,78,24,199,229, ++ 32,112,128,292,291,332,293,249,246,247, ++ 245,248,54,101,110,290,289,117,349,288, ++ 37,16,198,230,9,303,232,233,53,253, ++ 236,19,227,107,196,219,219,274,294,218, ++ 39,296,14,297,150,152,90,192,123,21, ++ 317,125,56,282,281,277,280,279,278,163, ++ 144,151,153,91,341,162,169,34,28,84, ++ 59,18,109,5,342,295,29,336,136,42, ++ 331,217,168,309,172,180,333,340,347,348, ++ 44,98,308,26,189,181,334,167,131,3, ++ 225,89,85,305,145,88,337,257,235,38, ++ 302,287,0,40,174,176,175,178,173,179, ++ 177,335,159,160,242,155,157,161,241,154, ++ 156,158,82,187,239,345,276,311,243,258, ++ 121,139,216,138,215,46,214,81,206,74, ++ 104,346,57,97,71,204,170,210,164,208, ++ 70,203,75,66,79,23,213,226,68,67, ++ 186,48,321,327,73,126,119,72,102,313, ++ 69,106,195,99,268,25,31,115,87,83, ++ 304,36,314,344,283,135,116,103,315,270, ++ 13,259,263,262,261,260,322,326,325,43, ++ 238,92,193,191,58,60,22,52,122,10, ++ 301,310,86,62,30,320,271,190,111,166, ++ 113,316,273,114,284,7,4,146, ++}; ++static int i386_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(i386_syscall_strings, i386_syscall_s2i_s, i386_syscall_s2i_i, 348, copy, value); ++ } ++} ++static const unsigned i386_syscall_i2s_direct[] = { ++ 2041,354,553,1919,3336,1681,216,3328,222,1244, ++ 3211,347,106,3018,1399,112,1218,82,1664,1310, ++ 869,1450,3190,2718,995,2899,1865,68,1634,1711, ++ 3248,2905,1020,27,1629,629,2943,1213,2013,1385, ++ 2057,256,1745,3134,1844,88,2518,805,2774,787, ++ 769,34,3197,1277,1157,489,1476,2584,3177,1652, ++ 3184,132,3242,260,884,861,2698,2752,2743,2862, ++ 2668,2604,2833,2800,2556,2688,948,958,982,2705, ++ 821,2534,2366,2925,1643,1942,3235,2918,1968,1934, ++ 1428,1583,3146,635,448,464,892,2592,1849,2883, ++ 605,1163,2844,3000,2568,843,2871,1326,581,1672, ++ 1170,3277,1025,3290,3315,2910,2992,1197,623,2823, ++ 210,2464,3205,1439,47,1467,2811,228,1030,242, ++ 673,1910,853,441,74,2986,1733,56,2498,2478, ++ 0,749,8,547,1558,1962,3342,968,503,19, ++ 1413,1564,1419,1572,2320,2246,2335,2261,2354,2182, ++ 2205,2280,1608,1551,2646,926,3285,1897,1767,1618, ++ 2624,904,1778,2121,2063,2090,2076,2148,2105,2134, ++ 1784,1880,118,742,92,99,2762,2373,876,1872, ++ 3271,3166,1433,3155,645,2876,1332,587,1225,1002, ++ 812,795,777,2677,2613,831,2544,471,2656,936, ++ 2634,914,124,2725,2525,2507,2487,1756,1377,1340, ++ 758,495,-1u,-1u,975,1924,2734,1316,571,1011, ++ 1234,513,1256,1266,536,2001,1297,558,3140,2382, ++ 657,2302,2228,2432,719,1138,1114,1125,1147,1104, ++ 380,-1u,359,1282,270,297,319,1984,2448,3023, ++ 3080,3066,3049,3036,196,166,153,180,2890,613, ++ 3011,3264,390,3307,1357,689,2402,1504,1541,1528, ++ 1512,1494,1480,2971,3321,-1u,39,2029,1206,1186, ++ 1175,1060,1042,1087,1363,1704,1391,1405,480,663, ++ 595,3218,2020,1249,2933,1951,455,370,1856,1772, ++ 3227,2416,703,2855,2948,3007,3298,1456,735,307, ++ 3254,2781,3094,330,403,3118,3102,2790,338,283, ++ 265,1750,1073,1792,1889,2164,1717,1975,413,427, ++ 1799,1590,1686,139,2964,2393,2578,1809,1826,1201, ++ 523, ++}; ++static const char *i386_syscall_i2s(int v) { ++ return i2s_direct__(i386_syscall_strings, i386_syscall_i2s_direct, 0, 350, v); ++} +diff --git a/lib/ia64_tables.h b/lib/ia64_tables.h +new file mode 100644 +index 0000000..9e127a0 +--- /dev/null ++++ b/lib/ia64_tables.h +@@ -0,0 +1,147 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ia64_syscall_strings[] = "_sysctl\0accept\0accept4\0access\0acct\0add_key\0adjtimex\0afs_syscall\0bdflush\0bind\0" ++ "brk\0capget\0capset\0chdir\0chmod\0chown\0chroot\0clock_adjtime\0clock_getres\0clock_gettime\0" ++ "clock_nanosleep\0clock_settime\0clone\0clone2\0close\0connect\0creat\0delete_module\0dup\0dup2\0" ++ "dup3\0epoll_create\0epoll_create1\0epoll_ctl\0epoll_pwait\0epoll_wait\0eventfd\0eventfd2\0execve\0exit\0" ++ "exit_group\0faccessat\0fadvise64\0fallocate\0fanotify_init\0fanotify_mark\0fchdir\0fchmod\0fchmodat\0fchown\0" ++ "fchownat\0fcntl\0fdatasync\0fgetxattr\0finit_module\0flistxattr\0flock\0fremovexattr\0fsetxattr\0fstat\0" ++ "fstatfs\0fstatfs64\0fsync\0ftruncate\0futex\0futimesat\0get_mempolicy\0get_robust_list\0getcpu\0getcwd\0" ++ "getdents\0getdents64\0getegid\0geteuid\0getgid\0getgroups\0getitimer\0getpeername\0getpgid\0getpid\0" ++ "getpmsg\0getppid\0getpriority\0getresgid\0getresuid\0getrlimit\0getrusage\0getsid\0getsockname\0getsockopt\0" ++ "gettid\0gettimeofday\0getuid\0getunwind\0getxattr\0init_module\0inotify_add_watch\0inotify_init\0inotify_init1\0inotify_rm_watch\0" ++ "io_cancel\0io_destroy\0io_getevents\0io_setup\0io_submit\0ioctl\0ioprio_get\0ioprio_set\0kexec_load\0keyctl\0" ++ "kill\0lchown\0lgetxattr\0link\0linkat\0listen\0listxattr\0llistxattr\0lookup_dcookie\0lremovexattr\0" ++ "lseek\0lsetxattr\0lstat\0madvise\0mbind\0migrate_pages\0mincore\0mkdir\0mkdirat\0mknod\0" ++ "mknodat\0mlock\0mlockall\0mmap\0mmap2\0mount\0mprotect\0mq_getsetattr\0mq_notify\0mq_open\0" ++ "mq_timedreceive\0mq_timedsend\0mq_unlink\0mremap\0msgctl\0msgget\0msgrcv\0msgsnd\0msync\0munlock\0" ++ "munlockall\0munmap\0name_to_handle_at\0nanosleep\0newfstatat\0nfsservctl\0ni_syscall\0open\0open_by_handle_at\0openat\0" ++ "pciconfig_read\0pciconfig_write\0perfmonctl\0personality\0pipe\0pipe2\0pivot_root\0poll\0ppoll\0prctl\0" ++ "pread64\0preadv\0prlimit64\0process_vm_readv\0process_vm_writev\0pselect\0ptrace\0putpmsg\0pwrite64\0pwritev\0" ++ "quotactl\0read\0readahead\0readlink\0readlinkat\0readv\0reboot\0recv\0recvfrom\0recvmmsg\0" ++ "recvmsg\0remap_file_pages\0removexattr\0rename\0renameat\0request_key\0restart_syscall\0rmdir\0rt_sigaction\0rt_sigpending\0" ++ "rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0rt_sigtimedwait\0rt_tgsigqueueinfo\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0" ++ "sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0sched_setparam\0sched_setscheduler\0sched_yield\0select\0semctl\0semget\0semop\0" ++ "semtimedop\0send\0sendfile\0sendmmsg\0sendmsg\0sendto\0set_mempolicy\0set_robust_list\0set_tid_address\0set_zone_reclaim\0" ++ "setdomainname\0setfsgid\0setfsuid\0setgid\0setgroups\0sethostname\0setitimer\0setns\0setpgid\0setpriority\0" ++ "setregid\0setresgid\0setresuid\0setreuid\0setrlimit\0setsid\0setsockopt\0settimeofday\0setuid\0setxattr\0" ++ "shmat\0shmctl\0shmdt\0shmget\0shutdown\0sigaltstack\0signalfd\0signalfd4\0socket\0socketpair\0" ++ "splice\0stat\0statfs\0statfs64\0swapoff\0swapon\0symlink\0symlinkat\0sync\0sync_file_range\0" ++ "syncfs\0sysfs\0sysinfo\0syslog\0tee\0tgkill\0timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0" ++ "timer_settime\0timerfd\0timerfd_create\0timerfd_gettime\0timerfd_settime\0times\0tkill\0truncate\0tux\0umask\0" ++ "umount\0uname\0unlink\0unlinkat\0unshare\0uselib\0ustat\0utimensat\0utimes\0vhangup\0" ++ "vmsplice\0vserver\0wait4\0waitid\0write\0writev"; ++static const unsigned ia64_syscall_s2i_s[] = { ++ 0,8,15,23,30,35,43,52,64,72, ++ 77,81,88,95,101,107,113,120,134,147, ++ 161,177,191,197,204,210,218,224,238,242, ++ 247,252,265,279,289,301,312,320,329,336, ++ 341,352,362,372,382,396,410,417,424,433, ++ 440,449,455,465,475,488,499,505,518,528, ++ 534,542,552,558,568,574,584,598,614,621, ++ 628,637,648,656,664,671,681,691,703,711, ++ 718,726,734,746,756,766,776,786,793,805, ++ 816,823,836,843,853,862,874,892,905,919, ++ 936,946,957,970,979,989,995,1006,1017,1028, ++ 1035,1040,1047,1057,1062,1069,1076,1086,1097,1112, ++ 1125,1131,1141,1147,1155,1161,1175,1183,1189,1197, ++ 1203,1211,1217,1226,1231,1237,1243,1252,1266,1276, ++ 1284,1300,1313,1323,1330,1337,1344,1351,1358,1364, ++ 1372,1383,1390,1408,1418,1429,1440,1451,1456,1474, ++ 1481,1496,1512,1523,1535,1540,1546,1557,1562,1568, ++ 1574,1582,1589,1599,1616,1634,1642,1649,1657,1666, ++ 1674,1683,1688,1698,1707,1718,1724,1731,1736,1745, ++ 1754,1762,1779,1791,1798,1807,1819,1835,1841,1854, ++ 1868,1883,1899,1912,1926,1942,1960,1983,2006,2024, ++ 2039,2058,2080,2098,2113,2132,2144,2151,2158,2165, ++ 2171,2182,2187,2196,2205,2213,2220,2234,2250,2266, ++ 2283,2297,2306,2315,2322,2332,2344,2354,2360,2368, ++ 2380,2389,2399,2409,2418,2428,2435,2446,2459,2466, ++ 2475,2481,2488,2494,2501,2510,2522,2531,2541,2548, ++ 2559,2566,2571,2578,2587,2595,2602,2610,2620,2625, ++ 2641,2648,2654,2662,2669,2673,2680,2693,2706,2723, ++ 2737,2751,2759,2774,2790,2806,2812,2818,2827,2831, ++ 2837,2844,2850,2857,2866,2874,2881,2887,2897,2904, ++ 2912,2921,2929,2935,2942,2948, ++}; ++static const int ia64_syscall_s2i_i[] = { ++ 1150,1194,1334,1049,1064,1271,1131,1141,1138,1191, ++ 1060,1185,1186,1034,1038,1039,1068,1328,1255,1254, ++ 1256,1253,1128,1213,1029,1192,1030,1134,1057,1070, ++ 1316,1243,1315,1244,1305,1245,1309,1314,1033,1025, ++ 1236,1293,1234,1303,1323,1324,1035,1099,1292,1100, ++ 1284,1066,1052,1222,1335,1225,1145,1228,1219,1212, ++ 1104,1257,1051,1098,1230,1285,1260,1299,1304,1184, ++ 1144,1214,1063,1047,1062,1077,1119,1196,1079,1041, ++ 1188,1042,1101,1075,1073,1085,1086,1082,1195,1204, ++ 1105,1087,1046,1215,1220,1133,1278,1277,1318,1279, ++ 1242,1239,1240,1238,1241,1065,1275,1274,1268,1273, ++ 1053,1124,1221,1031,1289,1193,1223,1224,1237,1227, ++ 1040,1218,1211,1209,1259,1280,1208,1055,1282,1037, ++ 1283,1153,1154,1151,1172,1043,1155,1267,1266,1262, ++ 1265,1264,1263,1156,1112,1109,1111,1110,1157,1158, ++ 1159,1152,1326,1168,1286,1169,1024,1028,1327,1281, ++ 1173,1174,1175,1140,1058,1317,1207,1090,1295,1170, ++ 1148,1319,1325,1332,1333,1294,1048,1189,1149,1320, ++ 1137,1026,1216,1092,1291,1146,1096,1200,1201,1322, ++ 1206,1125,1226,1054,1288,1272,1246,1056,1177,1178, ++ 1179,1180,1181,1182,1183,1321,1165,1166,1232,1160, ++ 1162,1167,1231,1161,1163,1164,1089,1108,1106,1107, ++ 1247,1198,1187,1331,1205,1199,1261,1298,1233,1276, ++ 1129,1143,1142,1061,1078,1083,1118,1330,1080,1102, ++ 1072,1076,1074,1071,1084,1081,1203,1088,1045,1217, ++ 1114,1116,1115,1113,1202,1176,1307,1313,1190,1197, ++ 1297,1210,1103,1258,1095,1094,1091,1290,1050,1300, ++ 1329,1139,1127,1117,1301,1235,1248,1252,1251,1250, ++ 1249,1308,1310,1312,1311,1059,1229,1097,1120,1067, ++ 1044,1130,1032,1287,1296,1093,1069,1306,1036,1123, ++ 1302,1269,1126,1270,1027,1147, ++}; ++static int ia64_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(ia64_syscall_strings, ia64_syscall_s2i_s, ia64_syscall_s2i_i, 306, copy, value); ++ } ++} ++static const unsigned ia64_syscall_i2s_direct[] = { ++ 1440,336,1683,2942,1451,204,218,1057,2850,329, ++ 95,410,2897,1197,101,107,1125,711,726,1237, ++ 2837,2459,836,656,1642,23,2620,552,455,1035, ++ 1791,1183,1835,238,1535,2806,77,2315,664,648, ++ 30,989,449,2831,113,2881,242,2409,2380,756, ++ 2399,746,2389,671,2322,703,2360,2428,786,2332, ++ 2418,766,776,823,2446,2144,1557,2602,1698,2874, ++ 2595,2587,1724,2818,558,417,433,734,2368,2571, ++ 534,816,2158,2165,2151,1337,1351,1344,1330,2494, ++ 2475,2488,2481,2662,2344,681,2827,-1u,-1u,2904, ++ 1040,1762,2929,2654,191,2283,2844,43,-1u,862, ++ 224,-1u,-1u,1674,64,2648,1523,52,2306,2297, ++ 628,499,1718,2948,1574,1657,0,1226,1383,1211, ++ 1217,1243,1323,1358,1364,1372,2024,2098,2039,2113, ++ 2132,1960,1983,2058,1408,1429,1568,-1u,1231,1481, ++ 1496,1512,2510,1841,1854,1868,1883,1899,1912,1926, ++ 621,81,88,2187,718,1649,2541,72,210,1069, ++ 8,793,691,2548,2182,2213,1731,1736,2501,2435, ++ 805,2205,1754,1546,1175,1147,2566,1141,528,197, ++ 637,843,1688,2466,1131,518,853,1047,465,1076, ++ 1086,488,1779,1112,505,2812,568,2080,2006,2250, ++ 362,2673,341,1097,970,946,957,979,936,252, ++ 279,301,1819,2171,2680,2737,2723,2706,2693,177, ++ 147,134,161,542,2578,1155,584,2220,1276,1313, ++ 1300,1284,1266,1252,1017,2921,2935,35,1807,1028, ++ 1006,995,2266,892,874,919,1161,1474,1189,1203, ++ 440,574,1418,2857,1798,1062,2610,1707,424,352, ++ 1634,1562,2866,2559,2234,598,2625,2669,2912,372, ++ 614,289,2887,2522,2751,312,2759,2790,2774,2531, ++ 320,265,247,1540,905,1582,1666,1942,1745,382, ++ 396,1589,1390,1456,120,2641,2354,2196,1599,1616, ++ 15,475, ++}; ++static const char *ia64_syscall_i2s(int v) { ++ return i2s_direct__(ia64_syscall_strings, ia64_syscall_i2s_direct, 1024, 1335, v); ++} +diff --git a/lib/machinetabs.h b/lib/machinetabs.h +new file mode 100644 +index 0000000..ec2d033 +--- /dev/null ++++ b/lib/machinetabs.h +@@ -0,0 +1,26 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char machine_strings[] = "i386\0i486\0i586\0i686\0ia64\0ppc\0ppc64\0s390\0s390x\0x86_64"; ++static const unsigned machine_s2i_s[] = { ++ 0,5,10,15,20,25,29,35,40,46, ++}; ++static const int machine_s2i_i[] = { ++ 0,0,0,0,2,4,3,6,5,1, ++}; ++static int machine_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(machine_strings, machine_s2i_s, machine_s2i_i, 10, copy, value); ++ } ++} ++static const unsigned machine_i2s_direct[] = { ++ 0,46,20,29,25,40,35, ++}; ++static const char *machine_i2s(int v) { ++ return i2s_direct__(machine_strings, machine_i2s_direct, 0, 6, v); ++} +diff --git a/lib/msg_typetabs.h b/lib/msg_typetabs.h +new file mode 100644 +index 0000000..770ec21 +--- /dev/null ++++ b/lib/msg_typetabs.h +@@ -0,0 +1,104 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char msg_type_strings[] = "ADD_GROUP\0ADD_USER\0ANOM_ABEND\0ANOM_ACCESS_FS\0ANOM_ADD_ACCT\0ANOM_AMTU_FAIL\0ANOM_CRYPTO_FAIL\0ANOM_DEL_ACCT\0ANOM_EXEC\0ANOM_LINK\0" ++ "ANOM_LOGIN_ACCT\0ANOM_LOGIN_FAILURES\0ANOM_LOGIN_LOCATION\0ANOM_LOGIN_SESSIONS\0ANOM_LOGIN_TIME\0ANOM_MAX_DAC\0ANOM_MAX_MAC\0ANOM_MK_EXEC\0ANOM_MOD_ACCT\0ANOM_PROMISCUOUS\0" ++ "ANOM_RBAC_FAIL\0ANOM_RBAC_INTEGRITY_FAIL\0ANOM_ROOT_TRANS\0AVC\0AVC_PATH\0BPRM_FCAPS\0CAPSET\0CHGRP_ID\0CHUSER_ID\0CONFIG_CHANGE\0" ++ "CRED_ACQ\0CRED_DISP\0CRED_REFR\0CRYPTO_FAILURE_USER\0CRYPTO_KEY_USER\0CRYPTO_LOGIN\0CRYPTO_LOGOUT\0CRYPTO_PARAM_CHANGE_USER\0CRYPTO_REPLAY_USER\0CRYPTO_SESSION\0" ++ "CRYPTO_TEST_USER\0CWD\0DAC_CHECK\0DAEMON_ABORT\0DAEMON_ACCEPT\0DAEMON_CLOSE\0DAEMON_CONFIG\0DAEMON_END\0DAEMON_RESUME\0DAEMON_ROTATE\0" ++ "DAEMON_START\0DEL_GROUP\0DEL_USER\0DEV_ALLOC\0DEV_DEALLOC\0EOE\0EXECVE\0FD_PAIR\0FS_RELABEL\0GRP_AUTH\0" ++ "INTEGRITY_DATA\0INTEGRITY_HASH\0INTEGRITY_METADATA\0INTEGRITY_PCR\0INTEGRITY_RULE\0INTEGRITY_STATUS\0IPC\0IPC_SET_PERM\0KERNEL\0KERNEL_OTHER\0" ++ "LABEL_LEVEL_CHANGE\0LABEL_OVERRIDE\0LIST_RULES\0LOGIN\0MAC_CIPSOV4_ADD\0MAC_CIPSOV4_DEL\0MAC_CONFIG_CHANGE\0MAC_IPSEC_ADDSA\0MAC_IPSEC_ADDSPD\0MAC_IPSEC_DELSA\0" ++ "MAC_IPSEC_DELSPD\0MAC_IPSEC_EVENT\0MAC_MAP_ADD\0MAC_MAP_DEL\0MAC_POLICY_LOAD\0MAC_STATUS\0MAC_UNLBL_ALLOW\0MAC_UNLBL_STCADD\0MAC_UNLBL_STCDEL\0MMAP\0" ++ "MQ_GETSETATTR\0MQ_NOTIFY\0MQ_OPEN\0MQ_SENDRECV\0NETFILTER_CFG\0NETFILTER_PKT\0OBJ_PID\0PATH\0RESP_ACCT_LOCK\0RESP_ACCT_LOCK_TIMED\0" ++ "RESP_ACCT_REMOTE\0RESP_ACCT_UNLOCK_TIMED\0RESP_ALERT\0RESP_ANOMALY\0RESP_EXEC\0RESP_HALT\0RESP_KILL_PROC\0RESP_SEBOOL\0RESP_SINGLE\0RESP_TERM_ACCESS\0" ++ "RESP_TERM_LOCK\0ROLE_ASSIGN\0ROLE_MODIFY\0ROLE_REMOVE\0SECCOMP\0SELINUX_ERR\0SERVICE_START\0SERVICE_STOP\0SOCKADDR\0SOCKETCALL\0" ++ "SYSCALL\0SYSTEM_BOOT\0SYSTEM_RUNLEVEL\0SYSTEM_SHUTDOWN\0TEST\0TRUSTED_APP\0TTY\0TTY_GET\0TTY_SET\0USER\0" ++ "USER_ACCT\0USER_AUTH\0USER_AVC\0USER_CHAUTHTOK\0USER_CMD\0USER_END\0USER_ERR\0USER_LABELED_EXPORT\0USER_LOGIN\0USER_LOGOUT\0" ++ "USER_MAC_POLICY_LOAD\0USER_MGMT\0USER_ROLE_CHANGE\0USER_SELINUX_ERR\0USER_START\0USER_TTY\0USER_UNLABELED_EXPORT\0USYS_CONFIG\0VIRT_CONTROL\0VIRT_MACHINE_ID\0" ++ "VIRT_RESOURCE"; ++static const unsigned msg_type_s2i_s[] = { ++ 0,10,19,30,45,59,74,91,105,115, ++ 125,141,161,181,201,217,230,243,256,270, ++ 287,302,327,343,347,356,367,374,383,393, ++ 407,416,426,436,456,472,485,499,524,543, ++ 558,575,579,589,602,616,629,643,654,668, ++ 682,695,705,714,724,736,740,747,755,766, ++ 775,790,805,824,838,853,870,874,887,894, ++ 907,926,941,952,958,974,990,1008,1024,1041, ++ 1057,1074,1090,1102,1114,1130,1141,1157,1174,1191, ++ 1196,1210,1220,1228,1240,1254,1268,1276,1281,1296, ++ 1317,1334,1357,1368,1381,1391,1401,1416,1428,1440, ++ 1457,1472,1484,1496,1508,1516,1528,1542,1555,1564, ++ 1575,1583,1595,1611,1627,1632,1644,1648,1656,1664, ++ 1669,1679,1689,1698,1713,1722,1731,1740,1760,1771, ++ 1783,1804,1814,1831,1848,1859,1868,1890,1902,1915, ++ 1931, ++}; ++static const int msg_type_s2i_i[] = { ++ 1116,1114,1701,2111,2114,2107,2110,2115,2112,1702, ++ 2103,2100,2104,2102,2101,2105,2106,2113,2116,1700, ++ 2108,2109,2117,1400,1402,1321,1322,1119,1125,1305, ++ 1103,1104,1110,2405,2404,2402,2403,2401,2406,2407, ++ 2400,1307,1118,1202,1207,1208,1203,1201,1206,1205, ++ 1200,1117,1115,2307,2308,1320,1309,1317,2309,1126, ++ 1800,1803,1801,1804,1805,1802,1303,1311,2000,1316, ++ 2304,2303,1013,1006,1407,1408,1405,1411,1413,1412, ++ 1414,1415,1409,1410,1403,1404,1406,1416,1417,1323, ++ 1315,1314,1312,1313,1325,1324,1318,1302,2207,2205, ++ 2204,2206,2201,2200,2210,2212,2202,2209,2211,2203, ++ 2208,2301,2311,2302,1326,1401,1130,1131,1306,1304, ++ 1300,1127,1129,1128,1120,1121,1319,1016,1017,1005, ++ 1101,1100,1107,1108,1123,1106,1109,2305,1112,1113, ++ 2310,1102,2300,1122,1105,1124,2306,1111,2500,2502, ++ 2501, ++}; ++static int msg_type_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISLOWER(c) ? c - 'a' + 'A' : c; ++ } ++ copy[i] = 0; ++ return s2i__(msg_type_strings, msg_type_s2i_s, msg_type_s2i_i, 151, copy, value); ++ } ++} ++static const int msg_type_i2s_i[] = { ++ 1005,1006,1013,1016,1017,1100,1101,1102,1103,1104, ++ 1105,1106,1107,1108,1109,1110,1111,1112,1113,1114, ++ 1115,1116,1117,1118,1119,1120,1121,1122,1123,1124, ++ 1125,1126,1127,1128,1129,1130,1131,1200,1201,1202, ++ 1203,1205,1206,1207,1208,1300,1302,1303,1304,1305, ++ 1306,1307,1309,1311,1312,1313,1314,1315,1316,1317, ++ 1318,1319,1320,1321,1322,1323,1324,1325,1326,1400, ++ 1401,1402,1403,1404,1405,1406,1407,1408,1409,1410, ++ 1411,1412,1413,1414,1415,1416,1417,1700,1701,1702, ++ 1800,1801,1802,1803,1804,1805,2000,2100,2101,2102, ++ 2103,2104,2105,2106,2107,2108,2109,2110,2111,2112, ++ 2113,2114,2115,2116,2117,2200,2201,2202,2203,2204, ++ 2205,2206,2207,2208,2209,2210,2211,2212,2300,2301, ++ 2302,2303,2304,2305,2306,2307,2308,2309,2310,2311, ++ 2400,2401,2402,2403,2404,2405,2406,2407,2500,2501, ++ 2502, ++}; ++static const unsigned msg_type_i2s_s[] = { ++ 1664,952,941,1648,1656,1679,1669,1804,407,416, ++ 1848,1722,1689,1698,1731,426,1890,1760,1771,10, ++ 705,0,695,579,374,1627,1632,1831,1713,1859, ++ 383,766,1583,1611,1595,1528,1542,682,643,589, ++ 629,668,654,602,616,1575,1276,870,1564,393, ++ 1555,575,740,874,1220,1228,1210,1196,894,747, ++ 1268,1644,736,356,367,1191,1254,1240,1508,343, ++ 1516,347,1114,1130,990,1141,958,974,1090,1102, ++ 1008,1041,1024,1057,1074,1157,1174,270,19,115, ++ 775,805,853,790,824,838,887,141,201,181, ++ 125,161,217,230,59,287,302,74,30,105, ++ 243,45,91,256,327,1368,1357,1401,1440,1317, ++ 1296,1334,1281,1457,1416,1381,1428,1391,1814,1472, ++ 1496,926,907,1740,1868,714,724,755,1783,1484, ++ 558,499,472,485,456,436,524,543,1902,1931, ++ 1915, ++}; ++static const char *msg_type_i2s(int v) { ++ return i2s_bsearch__(msg_type_strings, msg_type_i2s_i, msg_type_i2s_s, 151, v); ++} +diff --git a/lib/optabs.h b/lib/optabs.h +new file mode 100644 +index 0000000..d79b665 +--- /dev/null ++++ b/lib/optabs.h +@@ -0,0 +1,11 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char op_strings[] = "!=\0&\0&=\0<\0<=\0=\0>\0>="; ++static const int op_i2s_i[] = { ++ 134217728,268435456,536870912,805306368,1073741824,1207959552,1342177280,1610612736, ++}; ++static const unsigned op_i2s_s[] = { ++ 3,8,15,0,13,5,10,17, ++}; ++static const char *op_i2s(int v) { ++ return i2s_bsearch__(op_strings, op_i2s_i, op_i2s_s, 8, v); ++} +diff --git a/lib/ppc_tables.h b/lib/ppc_tables.h +new file mode 100644 +index 0000000..778fae3 +--- /dev/null ++++ b/lib/ppc_tables.h +@@ -0,0 +1,163 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char ppc_syscall_strings[] = "_llseek\0_newselect\0_sysctl\0accept\0accept4\0access\0acct\0add_key\0adjtimex\0afs_syscall\0" ++ "alarm\0bdflush\0bind\0break\0brk\0capget\0capset\0chdir\0chmod\0chown\0" ++ "chroot\0clock_adjtime\0clock_getres\0clock_gettime\0clock_nanosleep\0clock_settime\0clone\0close\0connect\0creat\0" ++ "create_module\0delete_module\0dup\0dup2\0dup3\0epoll_create\0epoll_create1\0epoll_ctl\0epoll_pwait\0epoll_wait\0" ++ "eventfd\0eventfd2\0execve\0exit\0exit_group\0faccessat\0fadvise64\0fadvise64_64\0fallocate\0fanotify_init\0" ++ "fanotify_mark\0fchdir\0fchmod\0fchmodat\0fchown\0fchownat\0fcntl\0fcntl64\0fdatasync\0fgetxattr\0" ++ "finit_module\0flistxattr\0flock\0fork\0fremovexattr\0fsetxattr\0fstat\0fstat64\0fstatat\0fstatfs\0" ++ "fstatfs64\0fsync\0ftime\0ftruncate\0ftruncate64\0futex\0futimesat\0get_kernel_syms\0get_robust_list\0getcpu\0" ++ "getcwd\0getdents\0getdents64\0getegid\0geteuid\0getgid\0getgroups\0getitimer\0getpeername\0getpgid\0" ++ "getpgrp\0getpid\0getpmsg\0getppid\0getpriority\0getresgid\0getresuid\0getrlimit\0getrusage\0getsid\0" ++ "getsockname\0getsockopt\0gettid\0gettimeofday\0getuid\0getxattr\0gtty\0idle\0init_module\0inotify_add_watch\0" ++ "inotify_init\0inotify_init1\0inotify_rm_watch\0io_cancel\0io_destroy\0io_getevents\0io_setup\0io_submit\0ioctl\0ioperm\0" ++ "iopl\0ioprio_get\0ioprio_set\0ipc\0kcmp\0kexec_load\0keyctl\0kill\0lchown\0lgetxattr\0" ++ "link\0linkat\0listen\0listxattr\0llistxattr\0lock\0lookup_dcookie\0lremovexattr\0lseek\0lsetxattr\0" ++ "lstat\0lstat64\0madvise\0mincore\0mkdir\0mkdirat\0mknod\0mknodat\0mlock\0mlockall\0" ++ "mmap\0mmap2\0modify_ldt\0mount\0move_pages\0mprotect\0mpx\0mq_getsetattr\0mq_notify\0mq_open\0" ++ "mq_timedreceive\0mq_timedsend\0mq_unlink\0mremap\0msync\0multiplexer\0munlock\0munlockall\0munmap\0name_to_handle_at\0" ++ "nanosleep\0nfsservctl\0nice\0oldfstat\0oldlstat\0oldolduname\0oldstat\0olduname\0open\0open_by_handle_at\0" ++ "openat\0pause\0pciconfig_iobase\0pciconfig_read\0pciconfig_write\0perf_counter_open\0personality\0pipe\0pipe2\0pivot_root\0" ++ "poll\0ppoll\0prctl\0pread\0preadv\0prlimit64\0process_vm_readv\0process_vm_writev\0prof\0profil\0" ++ "pselect6\0ptrace\0putpmsg\0pwrite\0pwritev\0query_module\0quotactl\0read\0readahead\0readdir\0" ++ "readlink\0readlinkat\0readv\0reboot\0recv\0recvfrom\0recvmmsg\0recvmsg\0remap_file_pages\0removexattr\0" ++ "rename\0renameat\0request_key\0rmdir\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0" ++ "rt_sigtimedwait\0rt_tgsigqueueinfo\0rtas\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0" ++ "sched_setparam\0sched_setscheduler\0sched_yield\0select\0send\0sendfile\0sendfile64\0sendmmsg\0sendmsg\0sendto\0" ++ "set_robust_list\0set_tid_address\0setdomainname\0setfsgid\0setfsuid\0setgid\0setgroups\0sethostname\0setitimer\0setns\0" ++ "setpgid\0setpriority\0setregid\0setresgid\0setresuid\0setreuid\0setrlimit\0setsid\0setsockopt\0settimeofday\0" ++ "setuid\0setxattr\0sgetmask\0shutdown\0sigaction\0sigaltstack\0signal\0signalfd\0signalfd4\0sigpending\0" ++ "sigprocmask\0sigreturn\0sigsuspend\0socket\0socketcall\0socketpair\0splice\0spu_create\0spu_run\0ssetmask\0" ++ "stat\0stat64\0statfs\0statfs64\0stime\0stty\0subpage_prot\0swapcontext\0swapoff\0swapon\0" ++ "symlink\0symlinkat\0sync\0sync_file_range2\0syncfs\0sysfs\0sysinfo\0syslog\0tee\0tgkill\0" ++ "time\0timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0timer_settime\0timerfd\0timerfd_gettime\0timerfd_settime\0times\0" ++ "tkill\0truncate\0truncate64\0tuxcall\0ugetrlimit\0ulimit\0umask\0umount\0umount2\0uname\0" ++ "unlink\0unlinkat\0unshare\0uselib\0ustat\0utime\0utimensat\0utimes\0vfork\0vhangup\0" ++ "vm86\0vmsplice\0wait4\0waitid\0waitpid\0write\0writev"; ++static const unsigned ppc_syscall_s2i_s[] = { ++ 0,8,19,27,34,42,49,54,62,71, ++ 83,89,97,102,108,112,119,126,132,138, ++ 144,151,165,178,192,208,222,228,234,242, ++ 248,262,276,280,285,290,303,317,327,339, ++ 350,358,367,374,379,390,400,410,423,433, ++ 447,461,468,475,484,491,500,506,514,524, ++ 534,547,558,564,569,582,592,598,606,614, ++ 622,632,638,644,654,666,672,682,698,714, ++ 721,728,737,748,756,764,771,781,791,803, ++ 811,819,826,834,842,854,864,874,884,894, ++ 901,913,924,931,944,951,960,965,970,982, ++ 1000,1013,1027,1044,1054,1065,1078,1087,1097,1103, ++ 1110,1115,1126,1137,1141,1146,1157,1164,1169,1176, ++ 1186,1191,1198,1205,1215,1226,1231,1246,1259,1265, ++ 1275,1281,1289,1297,1305,1311,1319,1325,1333,1339, ++ 1348,1353,1359,1370,1376,1387,1396,1400,1414,1424, ++ 1432,1448,1461,1471,1478,1484,1496,1504,1515,1522, ++ 1540,1550,1561,1566,1575,1584,1596,1604,1613,1618, ++ 1636,1643,1649,1666,1681,1697,1715,1727,1732,1738, ++ 1749,1754,1760,1766,1772,1779,1789,1806,1824,1829, ++ 1836,1845,1852,1860,1867,1875,1888,1897,1902,1912, ++ 1920,1929,1940,1946,1953,1958,1967,1976,1984,2001, ++ 2013,2020,2029,2041,2047,2060,2074,2089,2105,2118, ++ 2132,2148,2166,2171,2194,2217,2235,2250,2269,2291, ++ 2309,2324,2343,2355,2362,2367,2376,2387,2396,2404, ++ 2411,2427,2443,2457,2466,2475,2482,2492,2504,2514, ++ 2520,2528,2540,2549,2559,2569,2578,2588,2595,2606, ++ 2619,2626,2635,2644,2653,2663,2675,2682,2691,2701, ++ 2712,2724,2734,2745,2752,2763,2774,2781,2792,2800, ++ 2809,2814,2821,2828,2837,2843,2848,2861,2873,2881, ++ 2888,2896,2906,2911,2928,2935,2941,2949,2956,2960, ++ 2967,2972,2985,2998,3015,3029,3043,3051,3067,3083, ++ 3089,3095,3104,3115,3123,3134,3141,3147,3154,3162, ++ 3168,3175,3184,3192,3199,3205,3211,3221,3228,3234, ++ 3242,3247,3256,3262,3269,3277,3283, ++}; ++static const int ppc_syscall_s2i_i[] = { ++ 140,142,149,330,344,33,51,269,124,137, ++ 27,134,327,17,45,183,184,12,15,181, ++ 61,347,247,246,248,245,120,6,328,8, ++ 127,129,41,63,316,236,315,237,303,238, ++ 307,314,11,1,234,298,233,254,309,323, ++ 324,133,94,297,95,289,55,204,148,214, ++ 353,217,143,2,220,211,108,197,291,100, ++ 253,118,35,93,194,221,290,130,299,302, ++ 182,141,202,50,49,47,80,105,332,132, ++ 65,20,187,64,96,170,165,76,77,147, ++ 331,340,207,78,24,212,32,112,128,276, ++ 275,318,277,231,228,229,227,230,54,101, ++ 110,274,273,117,354,268,271,37,16,213, ++ 9,294,329,215,216,53,235,219,19,210, ++ 107,196,205,206,39,287,14,288,150,152, ++ 90,192,123,21,301,125,56,267,266,262, ++ 265,264,263,163,144,201,151,153,91,345, ++ 162,168,34,28,84,59,18,109,5,346, ++ 286,29,200,198,199,319,136,42,317,203, ++ 167,281,171,179,320,325,351,352,44,98, ++ 280,26,188,180,321,166,131,3,191,89, ++ 85,296,145,88,336,337,343,342,239,218, ++ 38,293,270,40,173,175,174,177,172,178, ++ 176,322,255,159,160,223,155,157,161,222, ++ 154,156,158,82,334,186,226,349,341,335, ++ 300,232,121,139,138,46,81,74,104,350, ++ 57,97,71,169,164,70,75,66,339,79, ++ 23,209,68,338,67,185,48,305,313,73, ++ 126,119,72,326,102,333,283,279,278,69, ++ 106,195,99,252,25,31,310,249,115,87, ++ 83,295,36,308,348,135,116,103,284,250, ++ 13,240,244,243,242,241,306,312,311,43, ++ 208,92,193,225,190,58,60,22,52,122, ++ 10,292,282,86,62,30,304,251,189,111, ++ 113,285,114,272,7,4,146, ++}; ++static int ppc_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(ppc_syscall_strings, ppc_syscall_s2i_s, ppc_syscall_s2i_i, 347, copy, value); ++ } ++} ++static const unsigned ppc_syscall_i2s_direct[] = { ++ 374,564,1897,3277,1613,228,3269,242,1186,3168, ++ 367,126,2967,1319,132,1169,102,1596,1259,819, ++ 1370,3147,2619,944,2837,1845,83,1566,1643,3205, ++ 2843,960,42,1561,638,2906,1164,2013,1305,2041, ++ 276,1727,3083,1824,108,2475,764,2675,756,748, ++ 49,3154,1226,1097,500,1396,2520,3134,1584,3141, ++ 144,3199,280,834,811,2588,2653,2635,2800,2569, ++ 2540,2734,2701,2492,2578,874,884,931,2606,771, ++ 2482,2355,2888,1575,1920,3192,2881,1946,1912,1348, ++ 1515,3095,644,468,484,842,2528,1829,2821,614, ++ 1103,2752,2949,2504,781,2809,1275,592,1604,1110, ++ 3234,965,3242,3256,2873,2941,1137,632,2724,222, ++ 2443,3162,1359,62,1387,2712,248,970,262,682, ++ 1888,803,461,89,2935,1715,71,2466,2457,0, ++ 728,8,558,1478,1940,3283,894,514,19,1333, ++ 1496,1339,1504,2309,2235,2324,2250,2343,2171,2194, ++ 2269,1540,1471,2559,864,1875,1749,1550,2549,854, ++ 1760,2105,2047,2074,2060,2132,2089,2118,1766,1860, ++ 138,721,112,119,2663,2367,826,1852,3228,3123, ++ 1902,1353,3104,654,2814,1281,598,1666,1681,1649, ++ 1484,737,1738,506,1289,1297,924,3089,2626,1265, ++ 582,951,1176,524,1205,1215,547,2001,1246,569, ++ 666,2291,2217,-1u,3115,2376,1078,1054,1065,1087, ++ 1044,2427,400,379,1231,290,317,339,1984,2972, ++ 3029,3015,2998,2985,208,178,165,192,2861,2960, ++ 3221,2828,622,410,2166,-1u,-1u,-1u,-1u,-1u, ++ -1u,1424,1461,1448,1432,1414,1400,1146,54,2029, ++ 1157,3262,1126,1115,1000,982,1027,2792,2781,1836, ++ 1754,3184,2774,2956,3247,1636,1311,1325,491,672, ++ 606,3175,2020,1191,2896,1929,475,390,698,2411, ++ 1376,714,327,3211,2682,3043,350,2911,423,2848, ++ 3067,3051,2691,358,303,285,1732,1013,1697,1772, ++ 1867,2148,433,447,1779,2745,97,234,1198,27, ++ 901,791,2763,2362,2404,1953,1958,2644,2595,913, ++ 2396,1976,1967,34,1522,1618,151,2928,2387,2514, ++ 1789,1806,534,1141, ++}; ++static const char *ppc_syscall_i2s(int v) { ++ return i2s_direct__(ppc_syscall_strings, ppc_syscall_i2s_direct, 1, 354, v); ++} +diff --git a/lib/s390_tables.h b/lib/s390_tables.h +new file mode 100644 +index 0000000..218482e +--- /dev/null ++++ b/lib/s390_tables.h +@@ -0,0 +1,153 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char s390_syscall_strings[] = "_llseek\0_newselect\0_sysctl\0access\0acct\0add_key\0adjtimex\0afs_syscall\0alarm\0bdflush\0" ++ "brk\0capget\0capset\0chdir\0chmod\0chown\0chown32\0chroot\0clock_adjtime\0clock_getres\0" ++ "clock_gettime\0clock_nanosleep\0clock_settime\0clone\0close\0creat\0create_module\0delete_module\0dup\0dup2\0" ++ "dup3\0epoll_create\0epoll_create1\0epoll_ctl\0epoll_pwait\0epoll_wait\0eventfd\0eventfd2\0execve\0exit\0" ++ "exit_group\0faccessat\0fadvise64\0fadvise64_64\0fallocate\0fanotify_init\0fanotify_mark\0fchdir\0fchmod\0fchmodat\0" ++ "fchown\0fchown32\0fchownat\0fcntl\0fcntl64\0fdatasync\0fgetxattr\0finit_module\0flistxattr\0flock\0" ++ "fork\0fremovexattr\0fsetxattr\0fstat\0fstat64\0fstatat\0fstatfs\0fstatfs64\0fsync\0ftruncate\0" ++ "ftruncate64\0futex\0futimesat\0get_kernel_syms\0get_robust_list\0getcpu\0getcwd\0getdents\0getdents64\0getegid\0" ++ "getegid32\0geteuid\0geteuid32\0getgid\0getgid32\0getgroups\0getgroups32\0getitimer\0getpgid\0getpgrp\0" ++ "getpid\0getpmsg\0getppid\0getpriority\0getresgid\0getresgid32\0getresuid\0getresuid32\0getrlimit\0getrusage\0" ++ "getsid\0gettid\0gettimeofday\0getuid\0getuid32\0getxattr\0idle\0init_module\0inotify_add_watch\0inotify_init\0" ++ "inotify_init1\0inotify_rm_watch\0io_cancel\0io_destroy\0io_getevents\0io_setup\0io_submit\0ioctl\0ioperm\0ioprio_get\0" ++ "ioprio_set\0ipc\0kcmp\0kexec_load\0keyctl\0kill\0lchown\0lchown32\0lgetxattr\0link\0" ++ "linkat\0listxattr\0llistxattr\0lremovexattr\0lseek\0lsetxattr\0lstat\0lstat64\0madvise\0mincore\0" ++ "mkdir\0mkdirat\0mknod\0mknodat\0mlock\0mlockall\0mmap\0mmap2\0mount\0mprotect\0" ++ "mq_getsetattr\0mq_notify\0mq_open\0mq_timedreceive\0mq_timedsend\0mq_unlink\0mremap\0msync\0munlock\0munlockall\0" ++ "munmap\0name_to_handle_at\0nanosleep\0nfsservctl\0nice\0open\0open_by_handle_at\0openat\0pause\0perf_event_open\0" ++ "personality\0pipe\0pipe2\0pivot_root\0poll\0ppoll\0prctl\0pread\0preadv\0prlimit64\0" ++ "process_vm_readv\0process_vm_writev\0pselect6\0ptrace\0putpmsg\0pwrite\0pwritev\0query_module\0quotactl\0read\0" ++ "readahead\0readdir\0readlink\0readlinkat\0readv\0reboot\0remap_file_pages\0removexattr\0rename\0renameat\0" ++ "request_key\0rmdir\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0rt_sigtimedwait\0rt_tgsigqueueinfo\0" ++ "s390_runtime_instr\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0sched_setparam\0sched_setscheduler\0" ++ "sched_yield\0sendfile\0sendfile64\0set_robust_list\0set_tid_address\0setdomainname\0setfsgid\0setfsgid32\0setfsuid\0setfsuid32\0" ++ "setgid\0setgid32\0setgroups\0setgroups32\0sethostname\0setitimer\0setns\0setpgid\0setpriority\0setregid\0" ++ "setregid32\0setresgid\0setresgid32\0setresuid\0setresuid32\0setreuid\0setreuid32\0setrlimit\0setsid\0settimeofday\0" ++ "setuid\0setuid32\0setxattr\0sigaction\0sigaltstack\0signal\0signalfd\0signalfd4\0sigpending\0sigprocmask\0" ++ "sigreturn\0sigsuspend\0socketcall\0splice\0stat\0stat64\0statfs\0statfs64\0stime\0swapoff\0" ++ "swapon\0symlink\0symlinkat\0sync\0sync_file_range\0syncfs\0sysfs\0sysinfo\0syslog\0tee\0" ++ "tgkill\0time\0timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0timer_settime\0timerfd\0timerfd_create\0timerfd_gettime\0" ++ "timerfd_settime\0times\0tkill\0truncate\0truncate64\0ugetrlimit\0umask\0umount\0umount2\0uname\0" ++ "unlink\0unlinkat\0unshare\0uselib\0ustat\0utime\0utimensat\0utimes\0vfork\0vhangup\0" ++ "vmsplice\0wait4\0waitid\0write\0writev"; ++static const unsigned s390_syscall_s2i_s[] = { ++ 0,8,19,27,34,39,47,56,68,74, ++ 82,86,93,100,106,112,118,126,133,147, ++ 160,174,190,204,210,216,222,236,250,254, ++ 259,264,277,291,301,313,324,332,341,348, ++ 353,364,374,384,397,407,421,435,442,449, ++ 458,465,474,483,489,497,507,517,530,541, ++ 547,552,565,575,581,589,597,605,615,621, ++ 631,643,649,659,675,691,698,705,714,725, ++ 733,743,751,761,768,777,787,799,809,817, ++ 825,832,840,848,860,870,882,892,904,914, ++ 924,931,938,951,958,967,976,981,993,1011, ++ 1024,1038,1055,1065,1076,1089,1098,1108,1114,1121, ++ 1132,1143,1147,1152,1163,1170,1175,1182,1191,1201, ++ 1206,1213,1223,1234,1247,1253,1263,1269,1277,1285, ++ 1293,1299,1307,1313,1321,1327,1336,1341,1347,1353, ++ 1362,1376,1386,1394,1410,1423,1433,1440,1446,1454, ++ 1465,1472,1490,1500,1511,1516,1521,1539,1546,1552, ++ 1568,1580,1585,1591,1602,1607,1613,1619,1625,1632, ++ 1642,1659,1677,1686,1693,1701,1708,1716,1729,1738, ++ 1743,1753,1761,1770,1781,1787,1794,1811,1823,1830, ++ 1839,1851,1857,1870,1884,1899,1915,1928,1942,1958, ++ 1976,1995,2018,2041,2059,2074,2093,2115,2133,2148, ++ 2167,2179,2188,2199,2215,2231,2245,2254,2265,2274, ++ 2285,2292,2301,2311,2323,2335,2345,2351,2359,2371, ++ 2380,2391,2401,2413,2423,2435,2444,2455,2465,2472, ++ 2485,2492,2501,2510,2520,2532,2539,2548,2558,2569, ++ 2581,2591,2602,2613,2620,2625,2632,2639,2648,2654, ++ 2662,2669,2677,2687,2692,2708,2715,2721,2729,2736, ++ 2740,2747,2752,2765,2778,2795,2809,2823,2831,2846, ++ 2862,2878,2884,2890,2899,2910,2921,2927,2934,2942, ++ 2948,2955,2964,2972,2979,2985,2991,3001,3008,3014, ++ 3022,3031,3037,3044,3050, ++}; ++static const int s390_syscall_s2i_i[] = { ++ 140,142,149,33,51,278,124,137,27,134, ++ 45,184,185,12,15,182,212,61,337,261, ++ 260,262,259,120,6,8,127,129,41,63, ++ 326,249,327,250,312,251,318,323,11,1, ++ 248,300,253,264,314,332,333,133,94,299, ++ 95,207,291,55,221,148,229,344,232,143, ++ 2,235,226,108,197,293,100,266,118,93, ++ 194,238,292,130,305,311,183,141,220,50, ++ 202,49,201,47,200,80,205,105,132,65, ++ 20,188,64,96,171,211,165,209,76,77, ++ 147,236,78,24,199,227,112,128,285,284, ++ 324,286,247,244,245,243,246,54,101,283, ++ 282,117,343,277,280,37,16,198,228,9, ++ 296,230,231,234,19,225,107,196,219,218, ++ 39,289,14,290,150,152,90,192,21,125, ++ 276,275,271,274,273,272,163,144,151,153, ++ 91,335,162,169,34,5,336,288,29,331, ++ 136,42,325,217,168,302,172,180,328,334, ++ 340,341,301,26,189,181,329,167,131,3, ++ 222,89,85,298,145,88,267,233,38,295, ++ 279,40,174,176,175,178,173,179,177,330, ++ 342,159,160,240,155,157,161,239,154,156, ++ 158,187,223,304,252,121,139,216,138,215, ++ 46,214,81,206,74,104,339,57,97,71, ++ 204,170,210,164,208,70,203,75,66,79, ++ 23,213,224,67,186,48,316,322,73,126, ++ 119,72,102,306,106,195,99,265,25,115, ++ 87,83,297,36,307,338,135,116,103,308, ++ 241,13,254,258,257,256,255,317,319,321, ++ 320,43,237,92,193,191,60,22,52,122, ++ 10,294,303,86,62,30,315,313,190,111, ++ 309,114,281,4,146, ++}; ++static int s390_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(s390_syscall_strings, s390_syscall_s2i_s, s390_syscall_s2i_i, 315, copy, value); ++ } ++} ++static const unsigned s390_syscall_i2s_direct[] = { ++ 348,547,1738,3044,1516,210,-1u,216,1201,2948, ++ 341,100,2747,1307,106,1175,-1u,-1u,1247,825, ++ 1347,2927,2485,951,2648,1686,68,-1u,1546,2985, ++ -1u,-1u,27,1511,-1u,2687,1170,1823,1293,1851, ++ 250,1580,2878,-1u,82,2285,761,2532,743,725, ++ 34,2934,-1u,1108,483,-1u,2351,-1u,-1u,2921, ++ 126,2979,254,840,817,2465,2510,-1u,-1u,2435, ++ 2371,2591,2558,2323,2455,904,914,938,2472,777, ++ 2301,-1u,2669,-1u,1761,2972,2662,1787,1753,1336, ++ 1465,2890,621,442,458,848,2359,-1u,2632,597, ++ 1114,2602,2729,2335,799,2620,1263,575,-1u,-1u, ++ 3014,976,-1u,3031,2654,2721,1143,615,2581,204, ++ 2231,2942,-1u,47,1353,2569,222,981,236,659, ++ 1729,809,435,74,2715,1568,56,2265,2245,0, ++ 705,8,541,1440,1781,3050,924,497,19,1321, ++ 1446,1327,1454,2133,2059,2148,2074,2167,1995,2018, ++ 2093,1490,1433,2413,882,-1u,1716,1602,1500,2391, ++ 860,1613,1915,1857,1884,1870,1942,1899,1928,1619, ++ 1701,112,698,86,93,2520,2179,832,1693,3008, ++ 2910,1341,2899,631,2625,1269,581,1182,958,768, ++ 751,733,2444,2380,787,2311,465,2423,892,2401, ++ 870,118,2492,2292,2274,2254,1591,1285,1277,714, ++ 489,1743,2188,2501,1253,565,967,1191,507,1213, ++ 1223,530,1811,1234,552,931,2884,643,2115,2041, ++ 2740,-1u,1089,1065,1076,1098,1055,353,264,291, ++ 313,2215,374,2752,2809,2795,2778,2765,190,160, ++ 147,174,-1u,384,2639,605,1794,-1u,-1u,-1u, ++ 1386,1423,1410,1394,1376,1362,1152,39,1839,1163, ++ 3037,1132,1121,1011,993,1038,-1u,1539,1299,1313, ++ 474,649,589,2955,1830,1206,2677,1770,449,364, ++ 1677,1607,2964,2199,675,2613,2692,2736,3022,-1u, ++ 691,301,3001,397,2991,2539,2823,324,2831,2862, ++ 2846,2548,332,1024,1585,259,277,1625,1708,1958, ++ 1552,407,421,1632,1472,1521,133,2708,2345,1642, ++ 1659,1976,1147,517, ++}; ++static const char *s390_syscall_i2s(int v) { ++ return i2s_direct__(s390_syscall_strings, s390_syscall_i2s_direct, 1, 344, v); ++} +diff --git a/lib/s390x_tables.h b/lib/s390x_tables.h +new file mode 100644 +index 0000000..36099fc +--- /dev/null ++++ b/lib/s390x_tables.h +@@ -0,0 +1,144 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char s390x_syscall_strings[] = "_sysctl\0access\0acct\0add_key\0adjtimex\0afs_syscall\0alarm\0bdflush\0brk\0capget\0" ++ "capset\0chdir\0chmod\0chown\0chroot\0clock_adjtime\0clock_getres\0clock_gettime\0clock_nanosleep\0clock_settime\0" ++ "clone\0close\0creat\0create_module\0delete_module\0dup\0dup2\0dup3\0epoll_create\0epoll_create1\0" ++ "epoll_ctl\0epoll_pwait\0epoll_wait\0eventfd\0eventfd2\0execve\0exit\0exit_group\0faccessat\0fadvise64\0" ++ "fallocate\0fanotify_init\0fanotify_mark\0fchdir\0fchmod\0fchmodat\0fchown\0fchownat\0fcntl\0fdatasync\0" ++ "fgetxattr\0finit_module\0flistxattr\0flock\0fork\0fremovexattr\0fsetxattr\0fstat\0fstatfs\0fstatfs64\0" ++ "fsync\0ftruncate\0futex\0futimesat\0get_kernel_syms\0get_robust_list\0getcpu\0getcwd\0getdents\0getegid\0" ++ "geteuid\0getgid\0getgroups\0getitimer\0getpgid\0getpgrp\0getpid\0getpmsg\0getppid\0getpriority\0" ++ "getresgid\0getresuid\0getrlimit\0getrusage\0getsid\0gettid\0gettimeofday\0getuid\0getxattr\0idle\0" ++ "init_module\0inotify_add_watch\0inotify_init\0inotify_init1\0inotify_rm_watch\0io_cancel\0io_destroy\0io_getevents\0io_setup\0io_submit\0" ++ "ioctl\0ioprio_get\0ioprio_set\0ipc\0kcmp\0kexec_load\0keyctl\0kill\0lchown\0lgetxattr\0" ++ "link\0linkat\0listxattr\0llistxattr\0lremovexattr\0lseek\0lsetxattr\0lstat\0madvise\0mincore\0" ++ "mkdir\0mkdirat\0mknod\0mknodat\0mlock\0mlockall\0mmap\0mount\0mprotect\0mq_getsetattr\0" ++ "mq_notify\0mq_open\0mq_timedreceive\0mq_timedsend\0mq_unlink\0mremap\0msync\0munlock\0munlockall\0munmap\0" ++ "name_to_handle_at\0nanosleep\0newfstatat\0nfsservctl\0nice\0open\0open_by_handle_at\0openat\0pause\0perf_event_open\0" ++ "personality\0pipe\0pipe2\0pivot_root\0poll\0ppoll\0prctl\0pread\0preadv\0prlimit64\0" ++ "process_vm_readv\0process_vm_writev\0pselect6\0ptrace\0putpmsg\0pwrite\0pwritev\0query_module\0quotactl\0read\0" ++ "readahead\0readdir\0readlink\0readlinkat\0readv\0reboot\0remap_file_pages\0removexattr\0rename\0renameat\0" ++ "request_key\0rmdir\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0rt_sigsuspend\0rt_sigtimedwait\0rt_tgsigqueueinfo\0" ++ "s390_runtime_instr\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0sched_setparam\0sched_setscheduler\0" ++ "sched_yield\0select\0sendfile\0set_robust_list\0set_tid_address\0setdomainname\0setfsgid\0setfsuid\0setgid\0setgroups\0" ++ "sethostname\0setitimer\0setns\0setpgid\0setpriority\0setregid\0setresgid\0setresuid\0setreuid\0setrlimit\0" ++ "setsid\0settimeofday\0setuid\0setxattr\0sigaction\0sigaltstack\0signal\0signalfd\0signalfd4\0sigpending\0" ++ "sigprocmask\0sigreturn\0sigsuspend\0socketcall\0splice\0stat\0statfs\0statfs64\0swapoff\0swapon\0" ++ "symlink\0symlinkat\0sync\0sync_file_range\0syncfs\0sysfs\0sysinfo\0syslog\0tee\0tgkill\0" ++ "timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0timer_settime\0timerfd\0timerfd_create\0timerfd_gettime\0timerfd_settime\0times\0" ++ "tkill\0truncate\0umask\0umount\0umount2\0uname\0unlink\0unlinkat\0unshare\0uselib\0" ++ "ustat\0utime\0utimensat\0utimes\0vfork\0vhangup\0vmsplice\0wait4\0waitid\0write\0" ++ "writev"; ++static const unsigned s390x_syscall_s2i_s[] = { ++ 0,8,15,20,28,37,49,55,63,67, ++ 74,81,87,93,99,106,120,133,147,163, ++ 177,183,189,195,209,223,227,232,237,250, ++ 264,274,286,297,305,314,321,326,337,347, ++ 357,367,381,395,402,409,418,425,434,440, ++ 450,460,473,484,490,495,508,518,524,532, ++ 542,548,558,564,574,590,606,613,620,629, ++ 637,645,652,662,672,680,688,695,703,711, ++ 723,733,743,753,763,770,777,790,797,806, ++ 811,823,841,854,868,885,895,906,919,928, ++ 938,944,955,966,970,975,986,993,998,1005, ++ 1015,1020,1027,1037,1048,1061,1067,1077,1083,1091, ++ 1099,1105,1113,1119,1127,1133,1142,1147,1153,1162, ++ 1176,1186,1194,1210,1223,1233,1240,1246,1254,1265, ++ 1272,1290,1300,1311,1322,1327,1332,1350,1357,1363, ++ 1379,1391,1396,1402,1413,1418,1424,1430,1436,1443, ++ 1453,1470,1488,1497,1504,1512,1519,1527,1540,1549, ++ 1554,1564,1572,1581,1592,1598,1605,1622,1634,1641, ++ 1650,1662,1668,1681,1695,1710,1726,1739,1753,1769, ++ 1787,1806,1829,1852,1870,1885,1904,1926,1944,1959, ++ 1978,1990,1997,2006,2022,2038,2052,2061,2070,2077, ++ 2087,2099,2109,2115,2123,2135,2144,2154,2164,2173, ++ 2183,2190,2203,2210,2219,2229,2241,2248,2257,2267, ++ 2278,2290,2300,2311,2322,2329,2334,2341,2350,2358, ++ 2365,2373,2383,2388,2404,2411,2417,2425,2432,2436, ++ 2443,2456,2469,2486,2500,2514,2522,2537,2553,2569, ++ 2575,2581,2590,2596,2603,2611,2617,2624,2633,2641, ++ 2648,2654,2660,2670,2677,2683,2691,2700,2706,2713, ++ 2719, ++}; ++static const int s390x_syscall_s2i_i[] = { ++ 149,33,51,278,124,137,27,134,45,184, ++ 185,12,15,212,61,337,261,260,262,259, ++ 120,6,8,127,129,41,63,326,249,327, ++ 250,312,251,318,323,11,1,248,300,253, ++ 314,332,333,133,94,299,207,291,55,148, ++ 229,344,232,143,2,235,226,108,100,266, ++ 118,93,238,292,130,305,311,183,141,202, ++ 201,200,205,105,132,65,20,188,64,96, ++ 211,209,191,77,147,236,78,199,227,112, ++ 128,285,284,324,286,247,244,245,243,246, ++ 54,283,282,117,343,277,280,37,198,228, ++ 9,296,230,231,234,19,225,107,219,218, ++ 39,289,14,290,150,152,90,21,125,276, ++ 275,271,274,273,272,163,144,151,153,91, ++ 335,162,293,169,34,5,336,288,29,331, ++ 136,42,325,217,168,302,172,180,328,334, ++ 340,341,301,26,189,181,329,167,131,3, ++ 222,89,85,298,145,88,267,233,38,295, ++ 279,40,174,176,175,178,173,179,177,330, ++ 342,159,160,240,155,157,161,239,154,156, ++ 158,142,187,304,252,121,216,215,214,206, ++ 74,104,339,57,97,204,210,208,203,75, ++ 66,79,213,224,67,186,48,316,322,73, ++ 126,119,72,102,306,106,99,265,115,87, ++ 83,297,36,307,338,135,116,103,308,241, ++ 254,258,257,256,255,317,319,321,320,43, ++ 237,92,60,22,52,122,10,294,303,86, ++ 62,30,315,313,190,111,309,114,281,4, ++ 146, ++}; ++static int s390x_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(s390x_syscall_strings, s390x_syscall_s2i_s, s390x_syscall_s2i_i, 281, copy, value); ++ } ++} ++static const unsigned s390x_syscall_i2s_direct[] = { ++ 321,490,1549,2713,1327,183,-1u,189,1015,2617, ++ 314,81,-1u,1113,87,-1u,-1u,-1u,1061,688, ++ 1147,2596,-1u,-1u,-1u,1497,49,-1u,1357,2654, ++ -1u,-1u,8,1322,-1u,2383,993,1634,1099,1662, ++ 223,1391,2569,-1u,63,-1u,-1u,2241,-1u,-1u, ++ 15,2603,-1u,938,434,-1u,2115,-1u,-1u,2590, ++ 99,2648,227,703,680,2183,2219,-1u,-1u,-1u, ++ -1u,2300,2267,2087,2173,-1u,753,777,2190,-1u, ++ -1u,-1u,2365,-1u,1572,2641,2358,1598,1564,1142, ++ 1265,2581,548,402,-1u,711,2123,-1u,2334,524, ++ -1u,2311,2425,2099,662,2329,1077,518,-1u,-1u, ++ 2683,806,-1u,2700,2350,2417,966,542,2290,177, ++ 2038,2611,-1u,28,1153,2278,195,811,209,574, ++ 1540,672,395,55,2411,1379,37,-1u,-1u,-1u, ++ 620,1990,484,1240,1592,2719,763,440,0,1127, ++ 1246,1133,1254,1944,1870,1959,1885,1978,1806,1829, ++ 1904,1290,1233,-1u,-1u,-1u,1527,1413,1311,-1u, ++ -1u,1424,1726,1668,1695,1681,1753,1710,1739,1430, ++ 1512,-1u,613,67,74,2229,1997,695,1504,2677, ++ 743,-1u,-1u,-1u,-1u,-1u,-1u,998,790,645, ++ 637,629,2164,2135,652,2077,418,2154,733,2144, ++ 723,93,2203,2070,2061,2052,1402,1091,1083,-1u, ++ -1u,1554,-1u,2210,1067,508,797,1005,450,1027, ++ 1037,473,1622,1048,495,770,2575,558,1926,1852, ++ 2436,-1u,919,895,906,928,885,326,237,264, ++ 286,2022,347,2443,2500,2486,2469,2456,163,133, ++ 120,147,-1u,-1u,2341,532,1605,-1u,-1u,-1u, ++ 1186,1223,1210,1194,1176,1162,975,20,1650,986, ++ 2706,955,944,841,823,868,-1u,1350,1105,1119, ++ 425,564,1300,2624,1641,1020,2373,1581,409,337, ++ 1488,1418,2633,2006,590,2322,2388,2432,2691,-1u, ++ 606,274,2670,357,2660,2248,2514,297,2522,2553, ++ 2537,2257,305,854,1396,232,250,1436,1519,1769, ++ 1363,367,381,1443,1272,1332,106,2404,2109,1453, ++ 1470,1787,970,460, ++}; ++static const char *s390x_syscall_i2s(int v) { ++ return i2s_direct__(s390x_syscall_strings, s390x_syscall_i2s_direct, 1, 344, v); ++} +diff --git a/lib/x86_64_tables.h b/lib/x86_64_tables.h +new file mode 100644 +index 0000000..d2a5673 +--- /dev/null ++++ b/lib/x86_64_tables.h +@@ -0,0 +1,150 @@ ++/* This is a generated file, see Makefile.am for its inputs. */ ++static const char x86_64_syscall_strings[] = "_sysctl\0accept\0accept4\0access\0acct\0add_key\0adjtimex\0afs_syscall\0alarm\0arch_prctl\0" ++ "bind\0brk\0capget\0capset\0chdir\0chmod\0chown\0chroot\0clock_adjtime\0clock_getres\0" ++ "clock_gettime\0clock_nanosleep\0clock_settime\0clone\0close\0connect\0creat\0create_module\0delete_module\0dup\0" ++ "dup2\0dup3\0epoll_create\0epoll_create1\0epoll_ctl\0epoll_ctl_old\0epoll_pwait\0epoll_wait\0epoll_wait_old\0eventfd\0" ++ "eventfd2\0execve\0exit\0exit_group\0faccessat\0fadvise64\0fallocate\0fanotify_init\0fanotify_mark\0fchdir\0" ++ "fchmod\0fchmodat\0fchown\0fchownat\0fcntl\0fdatasync\0fgetxattr\0finit_module\0flistxattr\0flock\0" ++ "fork\0fremovexattr\0fsetxattr\0fstat\0fstatfs\0fsync\0ftruncate\0futex\0futimesat\0get_kernel_syms\0" ++ "get_mempolicy\0get_robust_list\0get_thread_area\0getcpu\0getcwd\0getdents\0getdents64\0getegid\0geteuid\0getgid\0" ++ "getgroups\0getitimer\0getpeername\0getpgid\0getpgrp\0getpid\0getpmsg\0getppid\0getpriority\0getresgid\0" ++ "getresuid\0getrlimit\0getrusage\0getsid\0getsockname\0getsockopt\0gettid\0gettimeofday\0getuid\0getxattr\0" ++ "init_module\0inotify_add_watch\0inotify_init\0inotify_init1\0inotify_rm_watch\0io_cancel\0io_destroy\0io_getevents\0io_setup\0io_submit\0" ++ "ioctl\0ioperm\0iopl\0ioprio_get\0ioprio_set\0kcmp\0kexec_load\0keyctl\0kill\0lchown\0" ++ "lgetxattr\0link\0linkat\0listen\0listxattr\0llistxattr\0lookup_dcookie\0lremovexattr\0lseek\0lsetxattr\0" ++ "lstat\0madvise\0mbind\0migrate_pages\0mincore\0mkdir\0mkdirat\0mknod\0mknodat\0mlock\0" ++ "mlockall\0mmap\0modify_ldt\0mount\0move_pages\0mprotect\0mq_getsetattr\0mq_notify\0mq_open\0mq_timedreceive\0" ++ "mq_timedsend\0mq_unlink\0mremap\0msgctl\0msgget\0msgrcv\0msgsnd\0msync\0munlock\0munlockall\0" ++ "munmap\0name_to_handle_at\0nanosleep\0newfstatat\0nfsservctl\0open\0open_by_handle_at\0openat\0pause\0perf_event_open\0" ++ "personality\0pipe\0pipe2\0pivot_root\0poll\0ppoll\0prctl\0pread\0preadv\0prlimit64\0" ++ "process_vm_readv\0process_vm_writev\0pselect6\0ptrace\0putpmsg\0pwrite\0pwritev\0query_module\0quotactl\0read\0" ++ "readahead\0readlink\0readlinkat\0readv\0reboot\0recvfrom\0recvmmsg\0recvmsg\0remap_file_pages\0removexattr\0" ++ "rename\0renameat\0request_key\0restart_syscall\0rmdir\0rt_sigaction\0rt_sigpending\0rt_sigprocmask\0rt_sigqueueinfo\0rt_sigreturn\0" ++ "rt_sigsuspend\0rt_sigtimedwait\0rt_tgsigqueueinfo\0sched_get_priority_max\0sched_get_priority_min\0sched_getaffinity\0sched_getparam\0sched_getscheduler\0sched_rr_get_interval\0sched_setaffinity\0" ++ "sched_setparam\0sched_setscheduler\0sched_yield\0security\0select\0semctl\0semget\0semop\0semtimedop\0sendfile\0" ++ "sendmmsg\0sendmsg\0sendto\0set_mempolicy\0set_robust_list\0set_thread_area\0set_tid_address\0setdomainname\0setfsgid\0setfsuid\0" ++ "setgid\0setgroups\0sethostname\0setitimer\0setns\0setpgid\0setpriority\0setregid\0setresgid\0setresuid\0" ++ "setreuid\0setrlimit\0setsid\0setsockopt\0settimeofday\0setuid\0setxattr\0shmat\0shmctl\0shmdt\0" ++ "shmget\0shutdown\0sigaltstack\0signalfd\0signalfd4\0socket\0socketpair\0splice\0stat\0statfs\0" ++ "swapoff\0swapon\0symlink\0symlinkat\0sync\0sync_file_range\0syncfs\0sysfs\0sysinfo\0syslog\0" ++ "tee\0tgkill\0time\0timer_create\0timer_delete\0timer_getoverrun\0timer_gettime\0timer_settime\0timerfd\0timerfd_gettime\0" ++ "timerfd_settime\0times\0tkill\0truncate\0tuxcall\0umask\0umount2\0uname\0unlink\0unlinkat\0" ++ "unshare\0uselib\0ustat\0utime\0utimensat\0utimes\0vfork\0vhangup\0vmsplice\0vserver\0" ++ "wait4\0waitid\0write\0writev"; ++static const unsigned x86_64_syscall_s2i_s[] = { ++ 0,8,15,23,30,35,43,52,64,70, ++ 81,86,90,97,104,110,116,122,129,143, ++ 156,170,186,200,206,212,220,226,240,254, ++ 258,263,268,281,295,305,319,331,342,357, ++ 365,374,381,386,397,407,417,427,441,455, ++ 462,469,478,485,494,500,510,520,533,544, ++ 550,555,568,578,584,592,598,608,614,624, ++ 640,654,670,686,693,700,709,720,728,736, ++ 743,753,763,775,783,791,798,806,814,826, ++ 836,846,856,866,873,885,896,903,916,923, ++ 932,944,962,975,989,1006,1016,1027,1040,1049, ++ 1059,1065,1072,1077,1088,1099,1104,1115,1122,1127, ++ 1134,1144,1149,1156,1163,1173,1184,1199,1212,1218, ++ 1228,1234,1242,1248,1262,1270,1276,1284,1290,1298, ++ 1304,1313,1318,1329,1335,1346,1355,1369,1379,1387, ++ 1403,1416,1426,1433,1440,1447,1454,1461,1467,1475, ++ 1486,1493,1511,1521,1532,1543,1548,1566,1573,1579, ++ 1595,1607,1612,1618,1629,1634,1640,1646,1652,1659, ++ 1669,1686,1704,1713,1720,1728,1735,1743,1756,1765, ++ 1770,1780,1789,1800,1806,1813,1822,1831,1839,1856, ++ 1868,1875,1884,1896,1912,1918,1931,1945,1960,1976, ++ 1989,2003,2019,2037,2060,2083,2101,2116,2135,2157, ++ 2175,2190,2209,2221,2230,2237,2244,2251,2257,2268, ++ 2277,2286,2294,2301,2315,2331,2347,2363,2377,2386, ++ 2395,2402,2412,2424,2434,2440,2448,2460,2469,2479, ++ 2489,2498,2508,2515,2526,2539,2546,2555,2561,2568, ++ 2574,2581,2590,2602,2611,2621,2628,2639,2646,2651, ++ 2658,2666,2673,2681,2691,2696,2712,2719,2725,2733, ++ 2740,2744,2751,2756,2769,2782,2799,2813,2827,2835, ++ 2851,2867,2873,2879,2888,2896,2902,2910,2916,2923, ++ 2932,2940,2947,2953,2959,2969,2976,2982,2990,2999, ++ 3007,3013,3020,3026, ++}; ++static const int x86_64_syscall_s2i_i[] = { ++ 156,43,288,21,163,248,159,183,37,158, ++ 49,12,125,126,80,90,92,161,305,229, ++ 228,230,227,56,3,42,85,174,176,32, ++ 33,292,213,291,233,214,281,232,215,284, ++ 290,59,60,231,269,221,285,300,301,81, ++ 91,268,93,260,72,75,193,313,196,73, ++ 57,199,190,5,138,74,77,202,261,177, ++ 239,274,211,309,79,78,217,108,107,104, ++ 115,36,52,121,111,39,181,110,140,120, ++ 118,97,98,124,51,55,186,96,102,191, ++ 175,254,253,294,255,210,207,208,206,209, ++ 16,173,172,252,251,312,246,250,62,94, ++ 192,86,265,50,194,195,212,198,8,189, ++ 6,28,237,256,27,83,258,133,259,149, ++ 151,9,154,165,279,10,245,244,240,243, ++ 242,241,25,71,68,70,69,26,150,152, ++ 11,303,35,262,180,2,304,257,34,298, ++ 135,22,293,155,7,271,157,17,295,302, ++ 310,311,270,101,182,18,296,178,179,0, ++ 187,89,267,19,169,45,299,47,216,197, ++ 82,264,249,219,84,13,127,14,129,15, ++ 130,128,297,146,147,204,143,145,148,203, ++ 142,144,24,185,23,66,64,65,220,40, ++ 307,46,44,238,273,205,218,171,123,122, ++ 106,116,170,38,308,109,141,114,119,117, ++ 113,160,112,54,164,105,188,30,31,67, ++ 29,48,131,282,289,41,53,275,4,137, ++ 168,167,88,266,162,277,306,139,99,103, ++ 276,234,201,222,226,225,224,223,283,287, ++ 286,100,200,76,184,95,166,63,87,263, ++ 272,134,136,132,280,235,58,153,278,236, ++ 61,247,1,20, ++}; ++static int x86_64_syscall_s2i(const char *s, int *value) { ++ size_t len, i; ++ len = strlen(s); ++ { char copy[len + 1]; ++ for (i = 0; i < len; i++) { ++ char c = s[i]; ++ copy[i] = GT_ISUPPER(c) ? c - 'A' + 'a' : c; ++ } ++ copy[i] = 0; ++ return s2i__(x86_64_syscall_strings, x86_64_syscall_s2i_s, x86_64_syscall_s2i_i, 314, copy, value); ++ } ++} ++static const unsigned x86_64_syscall_i2s_direct[] = { ++ 1765,3020,1543,206,2646,578,1228,1629,1212,1313, ++ 1346,1486,86,1918,1945,1976,1059,1646,1728,1800, ++ 3026,23,1607,2230,2209,1426,1461,1262,1234,2574, ++ 2555,2561,254,258,1573,1511,753,64,2424,791, ++ 2268,2621,212,8,2294,1813,2286,1831,2581,81, ++ 1156,873,763,2628,2515,885,200,550,2976,374, ++ 381,3007,1122,2910,2244,2251,2237,2568,1440,1454, ++ 1447,1433,494,544,592,500,2879,598,700,693, ++ 104,455,1868,1270,1912,220,1144,2916,2673,1780, ++ 110,462,116,478,1127,2896,903,846,856,2725, ++ 2867,1713,916,2733,736,2539,2395,728,720,2440, ++ 806,783,2508,2489,2460,743,2402,2479,836,2469, ++ 826,775,2386,2377,866,90,97,1931,2003,1960, ++ 1989,2590,2953,1284,2940,1595,2947,2651,584,2719, ++ 814,2448,2175,2101,2190,2116,2037,2060,2135,1298, ++ 1467,1304,1475,2982,1318,1618,0,1640,70,43, ++ 2498,122,2691,30,2526,1329,2902,2666,2658,1806, ++ 2412,2363,1072,1065,226,932,240,624,1743,1756, ++ 1532,798,1720,52,2888,2221,896,1770,2546,1218, ++ 568,923,1134,510,1163,1173,533,1856,1199,555, ++ 2873,2751,608,2157,2083,2331,1040,1016,1027,1049, ++ 1006,670,1184,268,305,342,1839,709,2347,1896, ++ 2257,407,2756,2813,2799,2782,2769,186,156,143, ++ 170,386,331,295,2744,2969,2999,1242,2301,640, ++ 1379,1416,1403,1387,1369,1355,1104,3013,35,1884, ++ 1115,1088,1077,962,944,989,1248,1566,1276,1290, ++ 485,614,1521,2923,1875,1149,2681,1789,469,397, ++ 1704,1634,2932,2315,654,2639,2740,2696,2990,1335, ++ 2959,319,2602,2827,357,417,2851,2835,15,2611, ++ 365,281,263,1612,975,1652,1735,2019,1579,1822, ++ 427,441,1659,1493,1548,129,2712,2277,2434,686, ++ 1669,1686,1099,520, ++}; ++static const char *x86_64_syscall_i2s(int v) { ++ return i2s_direct__(x86_64_syscall_strings, x86_64_syscall_i2s_direct, 0, 313, v); ++} +-- +1.7.9.5 + diff --git a/meta-agl/meta-security/recipes-security/audit/audit/audit-python-configure.patch b/meta-agl/meta-security/recipes-security/audit/audit/audit-python-configure.patch new file mode 100644 index 00000000..f90e2133 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/audit-python-configure.patch @@ -0,0 +1,27 @@ +From cace630b0eb42418dea4f3d98c69d0d777bfc1be Mon Sep 17 00:00:00 2001 +From: Xin Ouyang +Date: Wed, 20 Jun 2012 16:34:19 +0800 +Subject: [PATCH] audit: python cross-compile + +Signed-off-by: Xin Ouyang +--- + configure.ac | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 3db7d45..9a07db6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -90,7 +90,8 @@ if test x$use_python = xno ; then + else + AC_MSG_RESULT(testing) + AM_PATH_PYTHON +-if test -f /usr/include/python${am_cv_python_version}/Python.h ; then ++PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'` ++if test -f $PY_PREFIX/include/python${am_cv_python_version}/Python.h ; then + python_found="yes" + AC_MSG_NOTICE(Python bindings will be built) + else +-- +1.7.7 + diff --git a/meta-agl/meta-security/recipes-security/audit/audit/audit-python.patch b/meta-agl/meta-security/recipes-security/audit/audit/audit-python.patch new file mode 100644 index 00000000..78fce019 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/audit-python.patch @@ -0,0 +1,31 @@ +Remove hard coded python include directory + +Signed-off-by: Mark Hatle + +diff -ur audit-2.1.3.orig/bindings/python/Makefile.am audit-2.1.3/bindings/python/Makefile.am +--- audit-2.1.3.orig/bindings/python/Makefile.am 2011-08-15 12:31:01.000000000 -0500 ++++ audit-2.1.3/bindings/python/Makefile.am 2012-01-30 12:19:54.533959225 -0600 +@@ -25,7 +25,9 @@ + + pyexec_LTLIBRARIES = auparse.la + ++PYINC ?= /usr/include/python$(PYTHON_VERSION) ++ + auparse_la_SOURCES = auparse_python.c +-auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing ++auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I$(PYINC) -fno-strict-aliasing + auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro + auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la +diff -ur audit-2.1.3.orig/swig/Makefile.am audit-2.1.3/swig/Makefile.am +--- audit-2.1.3.orig/swig/Makefile.am 2011-08-15 12:31:03.000000000 -0500 ++++ audit-2.1.3/swig/Makefile.am 2012-01-30 12:28:09.574834697 -0600 +@@ -23,7 +23,8 @@ + CONFIG_CLEAN_FILES = *.loT *.rej *.orig + AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing + PYLIBVER ?= python$(PYTHON_VERSION) +-INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I/usr/include/$(PYLIBVER) ++PYINC ?= /usr/include/$(PYLIBVER) ++INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I$(PYINC) + LIBS = $(top_builddir)/lib/libaudit.la + pyexec_PYTHON = audit.py + pyexec_LTLIBRARIES = _audit.la diff --git a/meta-agl/meta-security/recipes-security/audit/audit/audit-volatile.conf b/meta-agl/meta-security/recipes-security/audit/audit/audit-volatile.conf new file mode 100644 index 00000000..9cbe1547 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/audit-volatile.conf @@ -0,0 +1 @@ +d /var/log/audit 0750 root root - diff --git a/meta-agl/meta-security/recipes-security/audit/audit/auditd b/meta-agl/meta-security/recipes-security/audit/audit/auditd new file mode 100755 index 00000000..fcd96c9d --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/auditd @@ -0,0 +1,153 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: auditd +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Audit Daemon +# Description: Collects audit information from Linux 2.6 Kernels. +### END INIT INFO + +# Author: Philipp Matthias Hahn +# Based on Debians /etc/init.d/skeleton and Auditds init.d/auditd.init + +# June, 2012: Adopted for yocto + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="audit daemon" +NAME=auditd +DAEMON=/sbin/auditd +PIDFILE=/var/run/"$NAME".pid +SCRIPTNAME=/etc/init.d/"$NAME" + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/"$NAME" ] && . /etc/default/"$NAME" + +. /etc/default/rcS + +. /etc/init.d/functions + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon -S --quiet --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null \ + || return 1 + start-stop-daemon -S --quiet --pidfile "$PIDFILE" --exec "$DAEMON" -- \ + $EXTRAOPTIONS \ + || return 2 + if [ -f /etc/audit/audit.rules ] + then + /sbin/auditctl -R /etc/audit/audit.rules >/dev/null + fi +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon -K --quiet --pidfile "$PIDFILE" --name "$NAME" + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f "$PIDFILE" + rm -f /var/run/audit_events + # Remove watches so shutdown works cleanly + case "$AUDITD_CLEAN_STOP" in + no|NO) ;; + *) /sbin/auditctl -D >/dev/null ;; + esac + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +if [ ! -e /var/log/audit ]; then + mkdir -p /var/log/audit + [ -x /sbin/restorecon ] && /sbin/restorecon -F /var/log/audit +fi + +case "$1" in + start) + [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && echo 0 ;; + 2) [ "$VERBOSE" != no ] && echo 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && echo 0 ;; + 2) [ "$VERBOSE" != no ] && echo 1 ;; + esac + ;; + reload|force-reload) + echo "Reloading $DESC" "$NAME" + do_reload + echo $? + ;; + restart) + echo "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) echo 0 ;; + 1) echo 1 ;; # Old process is still running + *) echo 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + echo 1 + ;; + esac + ;; + rotate) + echo "Rotating $DESC logs" "$NAME" + start-stop-daemon -K --signal USR1 --quiet --pidfile "$PIDFILE" --name "$NAME" + echo $? + ;; + status) + pidofproc "$DAEMON" >/dev/null + status=$? + if [ $status -eq 0 ]; then + echo "$NAME is running." + else + echo "$NAME is not running." + fi + exit $status + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|rotate|status}" >&2 + exit 3 + ;; +esac + +: diff --git a/meta-agl/meta-security/recipes-security/audit/audit/auditd.service b/meta-agl/meta-security/recipes-security/audit/audit/auditd.service new file mode 100644 index 00000000..ebc07989 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/auditd.service @@ -0,0 +1,20 @@ +[Unit] +Description=Security Auditing Service +DefaultDependencies=no +After=local-fs.target +Conflicts=shutdown.target +Before=sysinit.target shutdown.target +After=systemd-tmpfiles-setup.service + +[Service] +ExecStart=/sbin/auditd -n +## To use augenrules, copy this file to /etc/systemd/system/auditd.service +## and uncomment the next line and delete/comment out the auditctl line. +## Then copy existing rules to /etc/audit/rules.d/ +## Not doing this last step can cause loss of existing rules +#ExecStartPost=-/sbin/augenrules --load +ExecStartPost=-/sbin/auditctl -R /etc/audit/audit.rules +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-security/recipes-security/audit/audit/disable-ldap.patch b/meta-agl/meta-security/recipes-security/audit/audit/disable-ldap.patch new file mode 100644 index 00000000..1d683c29 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/disable-ldap.patch @@ -0,0 +1,59 @@ +Disable LDAP support + +Signed-off-by: Mark Hatle + +Disable LDAP support + +Signed-off-by: Mark Hatle + +Index: audit-2.3.2/audisp/plugins/Makefile.am +=================================================================== +--- audit-2.3.2.orig/audisp/plugins/Makefile.am ++++ audit-2.3.2/audisp/plugins/Makefile.am +@@ -22,8 +22,10 @@ + + CONFIG_CLEAN_FILES = *.loT *.rej *.orig + +-SUBDIRS = builtins zos-remote remote +-#SUBDIRS = builtins zos-remote ++SUBDIRS = builtins remote ++if HAVE_LDAP ++SUBDIRS += zos-remote ++endif + if HAVE_PRELUDE + SUBDIRS += prelude + endif +Index: audit-2.3.2/configure.ac +=================================================================== +--- audit-2.3.2.orig/configure.ac ++++ audit-2.3.2/configure.ac +@@ -241,6 +241,12 @@ else + fi + AM_CONDITIONAL(HAVE_PRELUDE, test x$have_prelude = xyes) + ++AC_ARG_WITH(ldap, ++AS_HELP_STRING([--with-ldap],[enable zos-remote plugin, which requires ldap]), ++use_ldap=$withval, ++use_ldap=no) ++AM_CONDITIONAL(HAVE_LDAP, test x$have_ldap = xyes) ++ + AC_MSG_CHECKING(whether to use libwrap) + AC_ARG_WITH(libwrap, + [ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support.], +Index: audit-2.3.2/docs/Makefile.am +=================================================================== +--- audit-2.3.2.orig/docs/Makefile.am ++++ audit-2.3.2/docs/Makefile.am +@@ -53,7 +53,9 @@ ausearch_add_expression.3 ausearch_add_t + ausearch_clear.3 \ + ausearch_next_event.3 ausearch_set_stop.3 \ + autrace.8 get_auditfail_action.3 set_aumessage_mode.3 \ +-audispd.8 audispd.conf.5 audispd-zos-remote.8 libaudit.conf.5 \ +-augenrules.8 \ +-zos-remote.conf.5 ++audispd.8 audispd.conf.5 libaudit.conf.5 \ ++augenrules.8 + ++if HAVE_LDAP ++man_MANS += audispd-zos-remote.8 zos-remote.conf.5 ++endif diff --git a/meta-agl/meta-security/recipes-security/audit/audit/fix-swig-host-contamination.patch b/meta-agl/meta-security/recipes-security/audit/audit/fix-swig-host-contamination.patch new file mode 100644 index 00000000..16bb173a --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit/fix-swig-host-contamination.patch @@ -0,0 +1,48 @@ +audit: Fixed swig host contamination issue + +The audit build uses swig to generate a python wrapper. +Unfortunately, the swig info file references host include +directories. Some of these were previously noticed and +eliminated, but the one fixed here was not. + +Upstream Status: pending + +Signed-off-by: Anders Hedlund +Signed-off-by: Joe Slater + +Index: audit-2.2.1/swig/Makefile.am +=================================================================== +--- audit-2.2.1.orig/swig/Makefile.am ++++ audit-2.2.1/swig/Makefile.am +@@ -25,6 +25,7 @@ AM_CFLAGS = -fPIC -DPIC -fno-strict-alia + PYLIBVER ?= python$(PYTHON_VERSION) + PYINC ?= /usr/include/$(PYLIBVER) + INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I$(PYINC) ++STDINC ?= /usr/include + LIBS = $(top_builddir)/lib/libaudit.la + pyexec_PYTHON = audit.py + pyexec_LTLIBRARIES = _audit.la +@@ -34,7 +35,7 @@ _audit_la_HEADERS: $(top_builddir)/confi + _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la + nodist__audit_la_SOURCES = audit_wrap.c + audit.py audit_wrap.c: ${srcdir}/auditswig.i +- swig -o audit_wrap.c -python ${INCLUDES} ${srcdir}/auditswig.i ++ swig -o audit_wrap.c -python ${INCLUDES} -I$(STDINC) ${srcdir}/auditswig.i + + CLEANFILES = audit.py* audit_wrap.c *~ + +Index: audit-2.2.1/swig/auditswig.i +=================================================================== +--- audit-2.2.1.orig/swig/auditswig.i ++++ audit-2.2.1/swig/auditswig.i +@@ -37,8 +37,8 @@ signed + #define __attribute(X) /*nothing*/ + typedef unsigned __u32; + typedef unsigned uid_t; +-%include "/usr/include/linux/audit.h" ++%include "linux/audit.h" + #define __extension__ /*nothing*/ +-%include "/usr/include/stdint.h" ++%include "stdint.h" + %include "../lib/libaudit.h" + diff --git a/meta-agl/meta-security/recipes-security/audit/audit_2.3.2.bb b/meta-agl/meta-security/recipes-security/audit/audit_2.3.2.bb new file mode 100644 index 00000000..1d7ea0f0 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/audit/audit_2.3.2.bb @@ -0,0 +1,102 @@ +SUMMARY = "User space tools for kernel auditing" +DESCRIPTION = "The audit package contains the user space utilities for \ +storing and searching the audit records generated by the audit subsystem \ +in the Linux kernel." +HOMEPAGE = "http://people.redhat.com/sgrubb/audit/" +SECTION = "base" +PR = "r8" +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ + file://disable-ldap.patch \ + file://audit-python.patch \ + file://audit-python-configure.patch \ + file://audit-for-cross-compiling.patch \ + file://auditd \ + file://fix-swig-host-contamination.patch \ + file://auditd.service \ + file://audit-volatile.conf \ +" +SRC_URI_append_arm = "file://add-system-call-table-for-ARM.patch" + +inherit autotools pythonnative update-rc.d systemd + +UPDATERCPN = "auditd" +INITSCRIPT_NAME = "auditd" +INITSCRIPT_PARAMS = "defaults" + +SYSTEMD_SERVICE_${PN} = "auditd.service" + +SRC_URI[md5sum] = "4e8d065b5cc16b77b9b61e93a9ed160e" +SRC_URI[sha256sum] = "8872e0b5392888789061db8034164305ef0e1b34543e1e7004d275f039081d29" + +DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30)" + +EXTRA_OECONF += "--without-prelude \ + --with-libwrap \ + --enable-gssapi-krb5=no \ + --without-ldap \ + --with-libcap-ng=yes \ + --with-python=yes \ + --libdir=${base_libdir} \ + --sbindir=${base_sbindir} \ + " +EXTRA_OECONF_append_arm = " --with-armeb=yes" + +EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' \ + PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \ + pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \ + STDINC='${STAGING_INCDIR}' \ + " + +SUMMARY_audispd-plugins = "Plugins for the audit event dispatcher" +DESCRIPTION_audispd-plugins = "The audispd-plugins package provides plugins for the real-time \ +interface to the audit system, audispd. These plugins can do things \ +like relay events to remote machines or analyze events for suspicious \ +behavior." + +PACKAGES =+ "audispd-plugins" +PACKAGES += "auditd ${PN}-python" + +FILES_${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*" +FILES_auditd += "${bindir}/* ${base_sbindir}/* ${sysconfdir}/*" +FILES_audispd-plugins += "${sysconfdir}/audisp/audisp-remote.conf \ + ${sysconfdir}/audisp/plugins.d/au-remote.conf \ + ${sbindir}/audisp-remote ${localstatedir}/spool/audit \ + " +FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug" +FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}" +FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la" + +CONFFILES_auditd += "${sysconfdir}/audit/audit.rules" +RDEPENDS_auditd += "bash" + +do_install_append() { + rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a + rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la + + # reuse auditd config + [ ! -e ${D}/etc/default ] && mkdir ${D}/etc/default + mv ${D}/etc/sysconfig/auditd ${D}/etc/default + rmdir ${D}/etc/sysconfig/ + + # replace init.d + install -D -m 0755 ${S}/../auditd ${D}/etc/init.d/auditd + rm -rf ${D}/etc/rc.d + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d/ + install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ + fi + + # install systemd unit files + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/auditd.service ${D}${systemd_unitdir}/system + + chmod 750 ${D}/etc/audit ${D}/etc/audit/rules.d + chmod 640 ${D}/etc/audit/auditd.conf ${D}/etc/audit/rules.d/audit.rules + + # Based on the audit.spec "Copy default rules into place on new installation" + cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules +} diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch new file mode 100644 index 00000000..e1d0cfac --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/0001-Add-fallthrough-tags.patch @@ -0,0 +1,57 @@ +From 8bf90bf3e7a821dbd3b7029d87aa592eec6f1754 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Thu, 25 Jan 2018 12:00:18 +0100 +Subject: [PATCH] Add fallthrough tags +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 7 emits a warning when the tag /*@fallthrough@*/ +doesn't appear in a switch case when a case continue +to the next after some processing. + +Change-Id: I420e3788a4c0a6d910a1214964c5480bbd12708c +Signed-off-by: José Bollo + +--- + src/admin/api/admin-api.cpp | 1 + + src/client-async/logic/Logic.cpp | 1 + + src/common/sockets/SocketClient.cpp | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/src/admin/api/admin-api.cpp b/src/admin/api/admin-api.cpp +index c638f41..aafa45e 100644 +--- a/src/admin/api/admin-api.cpp ++++ b/src/admin/api/admin-api.cpp +@@ -146,6 +146,7 @@ int cynara_admin_set_policies(struct cynara_admin *p_cynara_admin, + case CYNARA_ADMIN_BUCKET: + if (!isStringValid(policy->result_extra)) + return CYNARA_API_INVALID_PARAM; ++ /*@fallthrough@*/ + default: + { + std::string extraStr = policy->result_extra ? policy->result_extra : ""; +diff --git a/src/client-async/logic/Logic.cpp b/src/client-async/logic/Logic.cpp +index 5ae0251..c1d6c33 100644 +--- a/src/client-async/logic/Logic.cpp ++++ b/src/client-async/logic/Logic.cpp +@@ -233,6 +233,7 @@ bool Logic::processOut(void) { + case Socket::SendStatus::ALL_DATA_SENT: + onStatusChange(m_socketClient.getSockFd(), + cynara_async_status::CYNARA_STATUS_FOR_READ); ++ /*@fallthrough@*/ + case Socket::SendStatus::PARTIAL_DATA_SENT: + return true; + default: +diff --git a/src/common/sockets/SocketClient.cpp b/src/common/sockets/SocketClient.cpp +index b1ca4f7..f4394e5 100644 +--- a/src/common/sockets/SocketClient.cpp ++++ b/src/common/sockets/SocketClient.cpp +@@ -45,6 +45,7 @@ bool SocketClient::connect(void) { + LOGW("Error connecting to Cynara. Service not available."); + return false; + } ++ /*@fallthrough@*/ + default: + return true; + } diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch new file mode 100644 index 00000000..40e11ce5 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/0001-fix-fallthrough-in-cmdlineparser.patch @@ -0,0 +1,35 @@ +From ca28ec4a0781a1ab9ec5f015387436beb51adfc3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= +Date: Fri, 19 Oct 2018 08:09:28 +0000 +Subject: [PATCH] fix fallthrough in cmdlineparser +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jan-Simon Möller + +--- + src/service/main/CmdlineParser.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/service/main/CmdlineParser.cpp b/src/service/main/CmdlineParser.cpp +index ca56e39..e07ea52 100644 +--- a/src/service/main/CmdlineParser.cpp ++++ b/src/service/main/CmdlineParser.cpp +@@ -112,13 +112,16 @@ struct CmdLineOptions handleCmdlineOptions(int argc, char * const *argv) { + case ':': // Missing argument + ret.m_error = true; + ret.m_exit = true; ++ /*@fallthrough@*/ + switch (optopt) { + case CmdlineOpt::Mask: + case CmdlineOpt::User: + case CmdlineOpt::Group: + printMissingArgument(execName, argv[optind - 1]); + return ret; ++ /*@fallthrough@*/ + } ++ /*@fallthrough@*/ + //intentional fall to Unknown option + case '?': // Unknown option + default: diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch new file mode 100644 index 00000000..b8dbfac4 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/0002-gcc-7-requires-include-functional-for-std-function.patch @@ -0,0 +1,36 @@ +From e2d8414b0d1c6c59baf1bb73e856e93aaabaf955 Mon Sep 17 00:00:00 2001 +From: Changhyeok Bae +Date: Sun, 17 Dec 2017 15:28:28 +0000 +Subject: [PATCH] gcc-7 requires include for std::function + +Signed-off-by: Changhyeok Bae + +--- + src/common/types/PolicyBucket.h | 1 + + src/cyad/AdminPolicyParser.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/common/types/PolicyBucket.h b/src/common/types/PolicyBucket.h +index 029d3dd..1bceeca 100644 +--- a/src/common/types/PolicyBucket.h ++++ b/src/common/types/PolicyBucket.h +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/src/cyad/AdminPolicyParser.h b/src/cyad/AdminPolicyParser.h +index 53dde23..f38c194 100644 +--- a/src/cyad/AdminPolicyParser.h ++++ b/src/cyad/AdminPolicyParser.h +@@ -25,6 +25,7 @@ + + #include + #include ++#include + + #include + diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch new file mode 100644 index 00000000..1b105a00 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/0003-Avoid-warning-when-compiling-without-smack.patch @@ -0,0 +1,43 @@ +From fdcf2a68a4bfec588b1c6c969caa0be20961b807 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Thu, 25 Jan 2018 11:38:16 +0100 +Subject: [PATCH] Avoid warning when compiling without smack +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When DB_FILES_SMACK_LABEL is not defined, cmake complains +with the following message: + +> -- Checking for modules '' +> Please specify at least one package name on the command line. + +Change-Id: Ie837cae81114d096f951ec0ee4ada4173fb60190 +Signed-off-by: José Bollo + +--- + src/admin/CMakeLists.txt | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/admin/CMakeLists.txt b/src/admin/CMakeLists.txt +index e4f354a..38b8669 100644 +--- a/src/admin/CMakeLists.txt ++++ b/src/admin/CMakeLists.txt +@@ -23,12 +23,12 @@ IF (DB_FILES_SMACK_LABEL) + SET(SMACK "smack") + SET(LIBSMACK "libsmack") + ADD_DEFINITIONS("-DDB_FILES_SMACK_LABEL=\"${DB_FILES_SMACK_LABEL}\"") +-ENDIF (DB_FILES_SMACK_LABEL) + +-PKG_CHECK_MODULES(CYNARA_ADMIN_API_DEP +- REQUIRED +- ${LIBSMACK} +- ) ++ PKG_CHECK_MODULES(CYNARA_ADMIN_API_DEP ++ REQUIRED ++ ${LIBSMACK} ++ ) ++ENDIF (DB_FILES_SMACK_LABEL) + + SET(CYNARA_LIB_CYNARA_ADMIN_PATH ${CYNARA_PATH}/admin) + diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch new file mode 100644 index 00000000..f19cdfb5 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/0004-Fix-mode-of-sockets.patch @@ -0,0 +1,42 @@ +From 233fb8a93343c3c9c04914e1148ef5ab87a808a1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Thu, 25 Jan 2018 12:52:39 +0100 +Subject: [PATCH] Fix mode of sockets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Setting execution bit on the socket serves nothing. + +Change-Id: I2ca1ea8e0c369ee5517878e92073ace0e50f9f10 +Signed-off-by: José Bollo + +--- + systemd/cynara-admin.socket | 2 +- + systemd/cynara.socket | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/systemd/cynara-admin.socket b/systemd/cynara-admin.socket +index 2d1aea4..ed38386 100644 +--- a/systemd/cynara-admin.socket ++++ b/systemd/cynara-admin.socket +@@ -1,6 +1,6 @@ + [Socket] + ListenStream=/run/cynara/cynara-admin.socket +-SocketMode=0700 ++SocketMode=0600 + SmackLabelIPIn=@ + SmackLabelIPOut=@ + +diff --git a/systemd/cynara.socket b/systemd/cynara.socket +index 9f2a870..fad2745 100644 +--- a/systemd/cynara.socket ++++ b/systemd/cynara.socket +@@ -1,6 +1,6 @@ + [Socket] + ListenStream=/run/cynara/cynara.socket +-SocketMode=0777 ++SocketMode=0666 + SmackLabelIPIn=* + SmackLabelIPOut=@ + diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch new file mode 100644 index 00000000..e954c7f2 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/0005-Allow-to-tune-sockets.patch @@ -0,0 +1,237 @@ +From ebde8e9fdba7bc1c8152f7e45c551030a36ece82 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Thu, 25 Jan 2018 13:47:37 +0100 +Subject: [PATCH] Allow to tune sockets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Allow to change the directory of sockets +through a true integration of SOCKET_DIR + +Allow to override the socket's group of + - /run/cynara/cynara-agent.socket + - /run/cynara/cynara-monitor-get.socket + +through the newly defined variable CYNARA_ADMIN_SOCKET_GROUP + +Change-Id: I7d58854c328e948e3d6d7fa3fc00569fd08f8aef +Signed-off-by: José Bollo + +--- + systemd/CMakeLists.txt | 19 +++++++++++++++---- + systemd/cynara-admin.socket | 14 -------------- + systemd/cynara-admin.socket.in | 14 ++++++++++++++ + systemd/cynara-agent.socket | 15 --------------- + systemd/cynara-agent.socket.in | 15 +++++++++++++++ + systemd/cynara-monitor-get.socket | 15 --------------- + systemd/cynara-monitor-get.socket.in | 15 +++++++++++++++ + systemd/cynara.socket | 14 -------------- + systemd/cynara.socket.in | 14 ++++++++++++++ + 9 files changed, 73 insertions(+), 62 deletions(-) + delete mode 100644 systemd/cynara-admin.socket + create mode 100644 systemd/cynara-admin.socket.in + delete mode 100644 systemd/cynara-agent.socket + create mode 100644 systemd/cynara-agent.socket.in + delete mode 100644 systemd/cynara-monitor-get.socket + create mode 100644 systemd/cynara-monitor-get.socket.in + delete mode 100644 systemd/cynara.socket + create mode 100644 systemd/cynara.socket.in + +diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt +index 20accf0..1b75c12 100644 +--- a/systemd/CMakeLists.txt ++++ b/systemd/CMakeLists.txt +@@ -16,13 +16,24 @@ + # @author Lukasz Wojciechowski + # + ++SET(CYNARA_ADMIN_SOCKET_GROUP ++ "security_fw" ++ CACHE STRING ++ "Group to apply on administrative sockets") ++ ++ ++CONFIGURE_FILE(cynara.socket.in cynara.socket @ONLY) ++CONFIGURE_FILE(cynara-admin.socket.in cynara-admin.socket @ONLY) ++CONFIGURE_FILE(cynara-agent.socket.in cynara-agent.socket @ONLY) ++CONFIGURE_FILE(cynara-monitor-get.socket.in cynara-monitor-get.socket @ONLY) ++ + INSTALL(FILES + ${CMAKE_SOURCE_DIR}/systemd/cynara.service + ${CMAKE_SOURCE_DIR}/systemd/cynara.target +- ${CMAKE_SOURCE_DIR}/systemd/cynara.socket +- ${CMAKE_SOURCE_DIR}/systemd/cynara-admin.socket +- ${CMAKE_SOURCE_DIR}/systemd/cynara-agent.socket +- ${CMAKE_SOURCE_DIR}/systemd/cynara-monitor-get.socket ++ ${CMAKE_BINARY_DIR}/systemd/cynara.socket ++ ${CMAKE_BINARY_DIR}/systemd/cynara-admin.socket ++ ${CMAKE_BINARY_DIR}/systemd/cynara-agent.socket ++ ${CMAKE_BINARY_DIR}/systemd/cynara-monitor-get.socket + DESTINATION + ${SYSTEMD_UNIT_DIR} + ) +diff --git a/systemd/cynara-admin.socket b/systemd/cynara-admin.socket +deleted file mode 100644 +index ed38386..0000000 +--- a/systemd/cynara-admin.socket ++++ /dev/null +@@ -1,14 +0,0 @@ +-[Socket] +-ListenStream=/run/cynara/cynara-admin.socket +-SocketMode=0600 +-SmackLabelIPIn=@ +-SmackLabelIPOut=@ +- +-Service=cynara.service +- +-[Unit] +-Wants=cynara.target +-Before=cynara.target +- +-[Install] +-WantedBy=sockets.target +diff --git a/systemd/cynara-admin.socket.in b/systemd/cynara-admin.socket.in +new file mode 100644 +index 0000000..2364c3e +--- /dev/null ++++ b/systemd/cynara-admin.socket.in +@@ -0,0 +1,14 @@ ++[Socket] ++ListenStream=@SOCKET_DIR@/cynara-admin.socket ++SocketMode=0600 ++SmackLabelIPIn=@ ++SmackLabelIPOut=@ ++ ++Service=cynara.service ++ ++[Unit] ++Wants=cynara.target ++Before=cynara.target ++ ++[Install] ++WantedBy=sockets.target +diff --git a/systemd/cynara-agent.socket b/systemd/cynara-agent.socket +deleted file mode 100644 +index 5a677e0..0000000 +--- a/systemd/cynara-agent.socket ++++ /dev/null +@@ -1,15 +0,0 @@ +-[Socket] +-ListenStream=/run/cynara/cynara-agent.socket +-SocketGroup=security_fw +-SocketMode=0060 +-SmackLabelIPIn=* +-SmackLabelIPOut=@ +- +-Service=cynara.service +- +-[Unit] +-Wants=cynara.target +-Before=cynara.target +- +-[Install] +-WantedBy=sockets.target +diff --git a/systemd/cynara-agent.socket.in b/systemd/cynara-agent.socket.in +new file mode 100644 +index 0000000..4f86c9d +--- /dev/null ++++ b/systemd/cynara-agent.socket.in +@@ -0,0 +1,15 @@ ++[Socket] ++ListenStream=@SOCKET_DIR@/cynara-agent.socket ++SocketGroup=@CYNARA_ADMIN_SOCKET_GROUP@ ++SocketMode=0060 ++SmackLabelIPIn=* ++SmackLabelIPOut=@ ++ ++Service=cynara.service ++ ++[Unit] ++Wants=cynara.target ++Before=cynara.target ++ ++[Install] ++WantedBy=sockets.target +diff --git a/systemd/cynara-monitor-get.socket b/systemd/cynara-monitor-get.socket +deleted file mode 100644 +index a50feeb..0000000 +--- a/systemd/cynara-monitor-get.socket ++++ /dev/null +@@ -1,15 +0,0 @@ +-[Socket] +-ListenStream=/run/cynara/cynara-monitor-get.socket +-SocketGroup=security_fw +-SocketMode=0060 +-SmackLabelIPIn=@ +-SmackLabelIPOut=@ +- +-Service=cynara.service +- +-[Unit] +-Wants=cynara.target +-Before=cynara.target +- +-[Install] +-WantedBy=sockets.target +diff --git a/systemd/cynara-monitor-get.socket.in b/systemd/cynara-monitor-get.socket.in +new file mode 100644 +index 0000000..b88dbf7 +--- /dev/null ++++ b/systemd/cynara-monitor-get.socket.in +@@ -0,0 +1,15 @@ ++[Socket] ++ListenStream=@SOCKET_DIR@/cynara-monitor-get.socket ++SocketGroup=@CYNARA_ADMIN_SOCKET_GROUP@ ++SocketMode=0060 ++SmackLabelIPIn=@ ++SmackLabelIPOut=@ ++ ++Service=cynara.service ++ ++[Unit] ++Wants=cynara.target ++Before=cynara.target ++ ++[Install] ++WantedBy=sockets.target +diff --git a/systemd/cynara.socket b/systemd/cynara.socket +deleted file mode 100644 +index fad2745..0000000 +--- a/systemd/cynara.socket ++++ /dev/null +@@ -1,14 +0,0 @@ +-[Socket] +-ListenStream=/run/cynara/cynara.socket +-SocketMode=0666 +-SmackLabelIPIn=* +-SmackLabelIPOut=@ +- +-Service=cynara.service +- +-[Unit] +-Wants=cynara.target +-Before=cynara.target +- +-[Install] +-WantedBy=sockets.target +diff --git a/systemd/cynara.socket.in b/systemd/cynara.socket.in +new file mode 100644 +index 0000000..ba76549 +--- /dev/null ++++ b/systemd/cynara.socket.in +@@ -0,0 +1,14 @@ ++[Socket] ++ListenStream=@SOCKET_DIR@/cynara.socket ++SocketMode=0666 ++SmackLabelIPIn=* ++SmackLabelIPOut=@ ++ ++Service=cynara.service ++ ++[Unit] ++Wants=cynara.target ++Before=cynara.target ++ ++[Install] ++WantedBy=sockets.target diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch new file mode 100644 index 00000000..68864f1e --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/0006-Install-socket-activation-by-default.patch @@ -0,0 +1,78 @@ +From 23f1a7cb34dd4ef88bac5a43057feaf7f50559aa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Thu, 25 Jan 2018 14:09:23 +0100 +Subject: [PATCH] Install socket activation by default +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: Ifd10c3800486689ed0ed6271df59760ccfbf6caf +Signed-off-by: José Bollo + +--- + packaging/cynara.spec | 5 ----- + systemd/CMakeLists.txt | 7 +++++++ + systemd/sockets.target.wants/cynara-admin.socket | 1 + + systemd/sockets.target.wants/cynara-agent.socket | 1 + + systemd/sockets.target.wants/cynara.socket | 1 + + 5 files changed, 10 insertions(+), 5 deletions(-) + create mode 120000 systemd/sockets.target.wants/cynara-admin.socket + create mode 120000 systemd/sockets.target.wants/cynara-agent.socket + create mode 120000 systemd/sockets.target.wants/cynara.socket + +diff --git a/packaging/cynara.spec b/packaging/cynara.spec +index d2e0b80..2c5b326 100644 +--- a/packaging/cynara.spec ++++ b/packaging/cynara.spec +@@ -72,12 +72,7 @@ make %{?jobs:-j%jobs} + rm -rf %{buildroot} + %make_install + +-mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants + mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants +-ln -s ../cynara.socket %{buildroot}%{_unitdir}/sockets.target.wants/cynara.socket +-ln -s ../cynara-admin.socket %{buildroot}%{_unitdir}/sockets.target.wants/cynara-admin.socket +-ln -s ../cynara-agent.socket %{buildroot}%{_unitdir}/sockets.target.wants/cynara-agent.socket +-ln -s ../cynara-monitor-get.socket %{buildroot}%{_unitdir}/sockets.target.wants/cynara-monitor-get.socket + ln -s ../cynara.service %{buildroot}%{_unitdir}/multi-user.target.wants/cynara.service + + %post +diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt +index 1b75c12..9a2d70d 100644 +--- a/systemd/CMakeLists.txt ++++ b/systemd/CMakeLists.txt +@@ -38,3 +38,10 @@ INSTALL(FILES + ${SYSTEMD_UNIT_DIR} + ) + ++INSTALL(DIRECTORY ++ ${CMAKE_SOURCE_DIR}/systemd/sockets.target.wants ++ DESTINATION ++ ${SYSTEMD_UNIT_DIR} ++) ++ ++ +diff --git a/systemd/sockets.target.wants/cynara-admin.socket b/systemd/sockets.target.wants/cynara-admin.socket +new file mode 120000 +index 0000000..3d0b1ce +--- /dev/null ++++ b/systemd/sockets.target.wants/cynara-admin.socket +@@ -0,0 +1 @@ ++../cynara-admin.socket +\ No newline at end of file +diff --git a/systemd/sockets.target.wants/cynara-agent.socket b/systemd/sockets.target.wants/cynara-agent.socket +new file mode 120000 +index 0000000..22b37dd +--- /dev/null ++++ b/systemd/sockets.target.wants/cynara-agent.socket +@@ -0,0 +1 @@ ++../cynara-agent.socket +\ No newline at end of file +diff --git a/systemd/sockets.target.wants/cynara.socket b/systemd/sockets.target.wants/cynara.socket +new file mode 120000 +index 0000000..c0e5a5b +--- /dev/null ++++ b/systemd/sockets.target.wants/cynara.socket +@@ -0,0 +1 @@ ++../cynara.socket +\ No newline at end of file diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch b/meta-agl/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch new file mode 100644 index 00000000..c1441892 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/cynara-db-migration-abort-on-errors.patch @@ -0,0 +1,29 @@ +From 3605e9f8a3ea1252d1cf221398431e0d7a3ea34d Mon Sep 17 00:00:00 2001 +From: Patrick Ohly +Date: Mon, 23 Mar 2015 15:01:39 -0700 +Subject: [PATCH] cynara-db-migration.in: abort on errors + +"set -e" enables error checking for all commands invoked by the script. +Previously, errors were silently ignored. + +Upstream-status: Submitted [https://github.com/Samsung/cynara/pull/8] + +Signed-off-by: Patrick Ohly + +--- + migration/cynara-db-migration.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/migration/cynara-db-migration.in b/migration/cynara-db-migration.in +index 7b666d4..0682df6 100644 +--- a/migration/cynara-db-migration.in ++++ b/migration/cynara-db-migration.in +@@ -19,6 +19,8 @@ + # @brief Migration tool for Cynara's database + # + ++set -e ++ + ##### Constants (these must not be modified by shell) + + PATH=/bin:/usr/bin:/sbin:/usr/sbin diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara/run-ptest b/meta-agl/meta-security/recipes-security/cynara/cynara/run-ptest new file mode 100755 index 00000000..f8dd5d8b --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh + +cynara-tests | sed -e 's/^\[ *OK *\] \(\S*\)$/PASS: \1/' -e 's/^\[ *FAILED *\] \(\S*\)$/FAIL: \1/' +sh /usr/bin/cynara-db-migration-tests | sed -e 's/^Test .*(\([^)]*\)).*passed.*/PASS: \1/' -e 's/^Test .*(\([^)]*\)).*failed.*/FAIL: \1/' diff --git a/meta-agl/meta-security/recipes-security/cynara/cynara_0.14.10.bb b/meta-agl/meta-security/recipes-security/cynara/cynara_0.14.10.bb new file mode 100644 index 00000000..765c17bc --- /dev/null +++ b/meta-agl/meta-security/recipes-security/cynara/cynara_0.14.10.bb @@ -0,0 +1,157 @@ +DESCRIPTION = "Cynara service with client libraries" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327;beginline=3" + +PV = "0.14.10+git${SRCPV}" +SRCREV = "be455dcaf1400bec0272a6ce90852b9147393a60" +SRC_URI = "git://github.com/Samsung/cynara.git" +S = "${WORKDIR}/git" + +SRC_URI += " \ + file://cynara-db-migration-abort-on-errors.patch \ + file://0001-Add-fallthrough-tags.patch \ + file://0002-gcc-7-requires-include-functional-for-std-function.patch \ + file://0003-Avoid-warning-when-compiling-without-smack.patch \ + file://0004-Fix-mode-of-sockets.patch \ + file://0005-Allow-to-tune-sockets.patch \ + file://0006-Install-socket-activation-by-default.patch \ + file://0001-fix-fallthrough-in-cmdlineparser.patch \ +" + +DEPENDS = " \ +systemd \ +" + +PACKAGECONFIG ??= "" +# Use debug mode to increase logging. Beware, also compiles with less optimization +# and thus has to disable FORTIFY_SOURCE below. +PACKAGECONFIG[debug] = "-DCMAKE_BUILD_TYPE=DEBUG,-DCMAKE_BUILD_TYPE=RELEASE,libunwind elfutils" + +inherit cmake + +EXTRA_OECMAKE += " \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DBUILD_WITH_SYSTEMD_DAEMON=ON \ + -DBUILD_WITH_SYSTEMD_JOURNAL=ON \ + -DSYSTEMD_UNIT_DIR=${systemd_system_unitdir} \ + -DSOCKET_DIR=/run/cynara \ + -DBUILD_COMMONS=ON \ + -DBUILD_SERVICE=ON \ + -DBUILD_DBUS=OFF \ + -DCYNARA_ADMIN_SOCKET_GROUP=cynara \ +" + +# Explicitly package empty directory. Otherwise Cynara prints warnings +# at runtime: +# cyad[198]: Couldn't scan for plugins in : +FILES_${PN}_append = " \ +${libdir}/cynara/plugin/service \ +${libdir}/cynara/plugin/client \ +" + +inherit useradd +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "-r cynara" +USERADD_PARAM_${PN} = "\ +--system --home ${localstatedir}/lib/empty \ +--no-create-home --shell /bin/false \ +--gid cynara cynara \ +" + +# Causes deadlock during booting, see workaround in postinst below. +#inherit systemd +#SYSTEMD_SERVICE_${PN} = "cynara.service" + +#do_install_append () { +# chmod a+rx ${D}/${sbindir}/cynara-db-migration +# +# install -d ${D}${sysconfdir}/cynara/ +# install -m 644 ${S}/conf/creds.conf ${D}/${sysconfdir}/cynara/creds.conf +# +# # No need to create empty directories except for those which +# # Cynara expects to find. +# # install -d ${D}${localstatedir}/cynara/ +# # install -d ${D}${prefix}/share/cynara/tests/empty_db +# install -d ${D}${libdir}/cynara/plugin/client +# install -d ${D}${libdir}/cynara/plugin/service +# +# # install db* ${D}${prefix}/share/cynara/tests/ +# +# install -d ${D}${systemd_system_unitdir}/sockets.target.wants +# ln -s ../cynara.socket ${D}${systemd_system_unitdir}/sockets.target.wants/cynara.socket +# ln -s ../cynara-admin.socket ${D}${systemd_system_unitdir}/sockets.target.wants/cynara-admin.socket +# ln -s ../cynara-agent.socket ${D}${systemd_system_unitdir}/sockets.target.wants/cynara-agent.socket +#} + +# We want the post-install logic to create and label /var/cynara, so +# it should not be in the package. +do_install_append () { + rmdir ${D}${localstatedir}/cynara +} + +FILES_${PN} += "${systemd_system_unitdir}" + +# Cynara itself has no dependency on Smack. Only its installation +# is Smack-aware in the sense that it sets Smack labels. Do not +# depend on smack userspace unless we really need Smack labels. +# +# The Tizen .spec file calls cynara-db-migration in a %pre section. +# That only works when cynara-db-migration is packaged separately +# (overly complex) and does not seem necessary: perhaps there is a +# time window where cynara might already get activated before +# the postinst completes, but that is a general problem. It gets +# avoided entirely when calling this script while building the +# rootfs. +DEPENDS_append_with-lsm-smack = " smack smack-native" +EXTRA_OECMAKE_append_with-lsm-smack = " -DDB_FILES_SMACK_LABEL=System" +CHSMACK_with-lsm-smack = "chsmack" +CHSMACK = "true" +pkg_postinst_ontarget_${PN} () { + mkdir -p $D${sysconfdir}/cynara + ${CHSMACK} -a System $D${sysconfdir}/cynara + + # Strip git patch level information, the version comparison code + # in cynara-db-migration only expect major.minor.patch version numbers. + VERSION=${@d.getVar('PV',d,1).split('+git')[0]} + if [ -d $D${localstatedir}/cynara ] ; then + # upgrade + echo "NOTE: updating cynara DB to version $VERSION" + $D${sbindir}/cynara-db-migration upgrade -f 0.0.0 -t $VERSION + else + # install + echo "NOTE: creating cynara DB for version $VERSION" + mkdir -p $D${localstatedir}/cynara + ${CHSMACK} -a System $D${localstatedir}/cynara + $D${sbindir}/cynara-db-migration install -t $VERSION + fi + + # Workaround for systemd.bbclass issue: it would call + # "systemctl start" without "--no-block", but because + # the service is not ready to run at the time when + # this scripts gets executed by run-postinsts.service, + # booting deadlocks. + echo "NOTE: enabling and starting cynara service" + systemctl enable cynara + systemctl start --no-block cynara +} + +# Testing depends on gmock and gtest. They can be found in meta-oe +# and are not necessarily available, so this feature is off by default. +# If gmock from meta-oe is used, then a workaround is needed to avoid +# a link error (libgmock.a calls pthread functions without libpthread +# being listed in the .pc file). +DEPENDS_append = "${@bb.utils.contains('PACKAGECONFIG', 'tests', ' gmock', '', d)}" +LDFLAGS_append = "${@bb.utils.contains('PACKAGECONFIG', 'tests', ' -lpthread', '', d)}" +SRC_URI_append = "${@bb.utils.contains('PACKAGECONFIG', 'tests', ' file://run-ptest', '', d)}" +PACKAGECONFIG[tests] = "-DBUILD_TESTS:BOOL=ON,-DBUILD_TESTS:BOOL=OFF,gmock gtest," + +# Will be empty if no tests were built. +inherit ptest +FILES_${PN}-ptest += "${bindir}/cynara-tests ${bindir}/cynara-db-migration-tests ${datadir}/cynara/tests" +do_install_ptest () { + if ${@bb.utils.contains('PACKAGECONFIG', 'tests', 'true', 'false', d)}; then + mkdir -p ${D}/${datadir}/cynara/tests + cp -r ${S}/test/db/* ${D}/${datadir}/cynara/tests + fi +} + diff --git a/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils-arm-remove-m32-m64.patch b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils-arm-remove-m32-m64.patch new file mode 100644 index 00000000..a049fd23 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils-arm-remove-m32-m64.patch @@ -0,0 +1,19 @@ +Index: keyutils-1.5.5/Makefile +=================================================================== +--- keyutils-1.5.5.orig/Makefile 2011-12-20 11:05:10.000000000 +0200 ++++ keyutils-1.5.5/Makefile 2011-12-20 11:06:27.000000000 +0200 +@@ -58,12 +58,12 @@ + LNS := ln -sf + + ifeq ($(BUILDFOR),32-bit) +-CFLAGS += -m32 ++#CFLAGS += -m32 + LIBDIR := /usr/lib + USRLIBDIR := /usr/lib + else + ifeq ($(BUILDFOR),64-bit) +-CFLAGS += -m64 ++#CFLAGS += -m64 + LIBDIR := /usr/lib + USRLIBDIR := /usr/lib + endif diff --git a/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_library_install.patch b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_library_install.patch new file mode 100644 index 00000000..adf06430 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_library_install.patch @@ -0,0 +1,30 @@ +Index: keyutils-1.5.5/Makefile +=================================================================== +--- keyutils-1.5.5.orig/Makefile 2011-11-30 17:27:43.000000000 +0200 ++++ keyutils-1.5.5/Makefile 2011-12-21 16:05:53.000000000 +0200 +@@ -59,13 +59,13 @@ + + ifeq ($(BUILDFOR),32-bit) + CFLAGS += -m32 +-LIBDIR := /lib ++LIBDIR := /usr/lib + USRLIBDIR := /usr/lib + else + ifeq ($(BUILDFOR),64-bit) + CFLAGS += -m64 +-LIBDIR := /lib64 +-USRLIBDIR := /usr/lib64 ++LIBDIR := /usr/lib ++USRLIBDIR := /usr/lib + endif + endif + +@@ -152,7 +152,7 @@ + $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) + $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + mkdir -p $(DESTDIR)$(USRLIBDIR) +- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) ++ $(LNS) $(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) + $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl + $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key + $(INSTALL) -D request-key-debug.sh $(DESTDIR)$(SHAREDIR)/request-key-debug.sh diff --git a/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86-64_cflags.patch b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86-64_cflags.patch new file mode 100644 index 00000000..8dd22450 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86-64_cflags.patch @@ -0,0 +1,13 @@ +Index: git/Makefile +=================================================================== +--- git.orig/Makefile 2012-11-16 15:40:05.258723425 +0200 ++++ git/Makefile 2012-11-16 15:41:08.978725491 +0200 +@@ -53,7 +53,7 @@ + ############################################################################### + LIBDIR := $(shell ldd /usr/bin/make | grep '\(/libc\)' | sed -e 's!.*\(/.*\)/libc[.].*!\1!') + USRLIBDIR := $(patsubst /lib/%,/usr/lib/%,$(LIBDIR)) +-BUILDFOR := $(shell file /usr/bin/make | sed -e 's!.*ELF \(32\|64\)-bit.*!\1!')-bit ++BUILDFOR := 64-bit + + LNS := ln -sf + diff --git a/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86_cflags.patch b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86_cflags.patch new file mode 100644 index 00000000..573c429b --- /dev/null +++ b/meta-agl/meta-security/recipes-security/keyutils/keyutils/keyutils_fix_x86_cflags.patch @@ -0,0 +1,13 @@ +Index: git/Makefile +=================================================================== +--- git.orig/Makefile 2012-11-16 15:40:05.258723425 +0200 ++++ git/Makefile 2012-11-16 15:41:08.978725491 +0200 +@@ -53,7 +53,7 @@ + ############################################################################### + LIBDIR := $(shell ldd /usr/bin/make | grep '\(/libc\)' | sed -e 's!.*\(/.*\)/libc[.].*!\1!') + USRLIBDIR := $(patsubst /lib/%,/usr/lib/%,$(LIBDIR)) +-BUILDFOR := $(shell file /usr/bin/make | sed -e 's!.*ELF \(32\|64\)-bit.*!\1!')-bit ++BUILDFOR := 32-bit + + LNS := ln -sf + diff --git a/meta-agl/meta-security/recipes-security/keyutils/keyutils_1.5.8.bb b/meta-agl/meta-security/recipes-security/keyutils/keyutils_1.5.8.bb new file mode 100644 index 00000000..46b2b622 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/keyutils/keyutils_1.5.8.bb @@ -0,0 +1,44 @@ +SUMMARY = "Linux Key Management Utilities" +DESCRIPTION = "Keyutils is a set of utilities for managing the key retention \ +facility in the kernel, which can be used by filesystems, block devices and \ +more to gain and retain the authorization and encryption keys required to \ +perform secure operations." +SECTION = "base" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENCE.GPL;md5=5f6e72824f5da505c1f4a7197f004b45" + +PR = "r1" + +SRCREV = "dd64114721edca5808872190e7e2e927ee2e994c" + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git;protocol=git \ + file://keyutils_fix_library_install.patch \ + " +SRC_URI_append_arm = " file://keyutils-arm-remove-m32-m64.patch" +SRC_URI_append_x86 = " file://keyutils_fix_x86_cflags.patch" +SRC_URI_append_x86-64 = " file://keyutils_fix_x86-64_cflags.patch" + +S = "${WORKDIR}/git" + +INSTALL_FLAGS = " \ +BINDIR=${bindir} \ +SBINDIR=${sbindir} \ +INCLUDEDIR=${includedir} \ +ETCDIR=${sysconfdir} \ +LIBDIR=${libdir} \ +USRLIBDIR=${libdir} \ +SHAREDIR=${datadir} \ +MAN1=${mandir}/man1 \ +MAN3=${mandir}/man3 \ +MAN5=${mandir}/man5 \ +MAN8=${mandir}/man8 \ +DESTDIR=${D}" + +do_install() { + cd ${S} && oe_runmake ${INSTALL_FLAGS} install + + # Debugging script of unknown value, not packaged. + rm -f "${D}${datadir}/request-key-debug.sh" +} + +BBCLASSEXTEND = "native" diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager.inc b/meta-agl/meta-security/recipes-security/security-manager/security-manager.inc new file mode 100644 index 00000000..ddd87a93 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager.inc @@ -0,0 +1,94 @@ +DESCRIPTION = "Security manager and utilities" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327;beginline=3" + +inherit cmake + +# Out-of-tree build is broken ("sqlite3 .security-manager.db +Date: Fri, 1 Feb 2019 15:37:44 +0100 +Subject: [PATCH] Avoid casting from "const T&" to "void*" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Latest version of g++ refuse the cast + + reinterpret_cast(serviceFunction) + +I made no investigation to know if the problem +is coming from the const or not. + +Signed-off-by: José Bollo +--- + src/server/main/include/service-thread.h | 43 ++++++++++-------------- + 1 file changed, 18 insertions(+), 25 deletions(-) + +diff --git a/src/server/main/include/service-thread.h b/src/server/main/include/service-thread.h +index 964d168..92b0ec8 100644 +--- a/src/server/main/include/service-thread.h ++++ b/src/server/main/include/service-thread.h +@@ -9,78 +94,72 @@ public: + Join(); + while (!m_eventQueue.empty()){ + auto front = m_eventQueue.front(); +- delete front.eventPtr; ++ delete front; + m_eventQueue.pop(); + } + } + + template + void Event(const T &event, + Service *servicePtr, + void (Service::*serviceFunction)(const T &)) + { +- EventDescription description; +- description.serviceFunctionPtr = +- reinterpret_cast(serviceFunction); +- description.servicePtr = servicePtr; +- description.eventFunctionPtr = &ServiceThread::EventCall; +- description.eventPtr = new T(event); ++ EventCallerBase *ec = new EventCaller(event, servicePtr, serviceFunction); + { + std::lock_guard lock(m_eventQueueMutex); +- m_eventQueue.push(description); ++ m_eventQueue.push(ec); + } + m_waitCondition.notify_one(); + } + + protected: + +- struct EventDescription { +- void (Service::*serviceFunctionPtr)(void *); +- Service *servicePtr; +- void (ServiceThread::*eventFunctionPtr)(const EventDescription &event); +- GenericEvent* eventPtr; +- }; +- +- template +- void EventCall(const EventDescription &desc) { +- auto fun = reinterpret_cast(desc.serviceFunctionPtr); +- const T& eventLocale = *(static_cast(desc.eventPtr)); +- (desc.servicePtr->*fun)(eventLocale); +- } ++ struct EventCallerBase { ++ virtual void fire() = 0; ++ virtual ~EventCallerBase() {} ++ }; + ++ template ++ struct EventCaller : public EventCallerBase { ++ T *event; Service *target; void (Service::*function)(const T&); ++ EventCaller(const T &e, Service *c, void (Service::*f)(const T&)) : event(new T(e)), target(c), function(f) {} ++ ~EventCaller() { delete event; } ++ void fire() { (target->*function)(*event); } ++ }; ++ + static void ThreadLoopStatic(ServiceThread *ptr) { + ptr->ThreadLoop(); + } + + void ThreadLoop(){ + for (;;) { +- EventDescription description = {NULL, NULL, NULL, NULL}; ++ EventCallerBase *ec = NULL; + { + std::unique_lock ulock(m_eventQueueMutex); + if (m_quit) + return; + if (!m_eventQueue.empty()) { +- description = m_eventQueue.front(); ++ ec = m_eventQueue.front(); + m_eventQueue.pop(); + } else { + m_waitCondition.wait(ulock); + } + } + +- if (description.eventPtr != NULL) { ++ if (ec != NULL) { + UNHANDLED_EXCEPTION_HANDLER_BEGIN + { +- (this->*description.eventFunctionPtr)(description); +- delete description.eventPtr; ++ ec->fire(); + } + UNHANDLED_EXCEPTION_HANDLER_END ++ delete ec; + } + } + } + + std::thread m_thread; + std::mutex m_eventQueueMutex; +- std::queue m_eventQueue; ++ std::queue m_eventQueue; + std::condition_variable m_waitCondition; + + State m_state; +-- +2.17.2 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch new file mode 100644 index 00000000..5a55a312 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Fix-gcc8-warning-error-Werror-catch-value.patch @@ -0,0 +1,32 @@ +From 37c63c280eaec8cae3a321d45404d6c03a68c9d9 Mon Sep 17 00:00:00 2001 +From: Stephane Desneux +Date: Fri, 1 Feb 2019 12:26:17 +0000 +Subject: [PATCH] Fix gcc8 warning/error [-Werror=catch-value=] + +Fixes the following warning/error during compile: + +src/dpl/core/src/assert.cpp:61:14: error: catching polymorphic type 'class SecurityManager::Exception' by value [-Werror=catch-value=] +| } catch (Exception) { +| ^~~~~~~~~ + +Signed-off-by: Stephane Desneux +--- + src/dpl/core/src/assert.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/dpl/core/src/assert.cpp b/src/dpl/core/src/assert.cpp +index 63538a2..fc60ce9 100644 +--- a/src/dpl/core/src/assert.cpp ++++ b/src/dpl/core/src/assert.cpp +@@ -58,7 +58,7 @@ void AssertProc(const char *condition, + INTERNAL_LOG("### Function: " << function); + INTERNAL_LOG( + "################################################################################"); +- } catch (Exception) { ++ } catch (Exception const&) { + // Just ignore possible double errors + } + +-- +2.11.0 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Smack-rules-create-two-new-functions.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Smack-rules-create-two-new-functions.patch new file mode 100644 index 00000000..b0e11afe --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/0001-Smack-rules-create-two-new-functions.patch @@ -0,0 +1,116 @@ +From d130a7384428a96f31ad5950ffbffadc0aa29a15 Mon Sep 17 00:00:00 2001 +From: Alejandro Joya +Date: Wed, 4 Nov 2015 19:01:35 -0600 +Subject: [PATCH 1/2] Smack-rules: create two new functions + +It let to smack-rules to create multiple set of rules +related with the privileges. + +It runs from the same bases than for a static set of rules on the +template, but let you add 1 or many templates for different cases. + +Signed-off-by: Alejandro Joya +--- + src/common/include/smack-rules.h | 15 ++++++++++++++ + src/common/smack-rules.cpp | 44 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 59 insertions(+) + +diff --git a/src/common/include/smack-rules.h b/src/common/include/smack-rules.h +index 91446a7..f9fa438 100644 +--- a/src/common/include/smack-rules.h ++++ b/src/common/include/smack-rules.h +@@ -47,6 +47,8 @@ public: + void addFromTemplate(const std::vector &templateRules, + const std::string &appId, const std::string &pkgId); + void addFromTemplateFile(const std::string &appId, const std::string &pkgId); ++ void addFromTemplateFile(const std::string &appId, const std::string &pkgId, ++ const std::string &path); + + void apply() const; + void clear() const; +@@ -75,6 +77,19 @@ public: + static void installApplicationRules(const std::string &appId, const std::string &pkgId, + const std::vector &pkgContents); + /** ++ * Install privileges-specific smack rules. ++ * ++ * Function creates smack rules using predefined template. Rules are applied ++ * to the kernel and saved on persistent storage so they are loaded on system boot. ++ * ++ * @param[in] appId - application id that is beeing installed ++ * @param[in] pkgId - package id that the application is in ++ * @param[in] pkgContents - a list of all applications in the package ++ * @param[in] privileges - a list of all prvileges ++ */ ++ static void installApplicationPrivilegesRules(const std::string &appId, const std::string &pkgId, ++ const std::vector &pkgContents, const std::vector &privileges); ++ /** + * Uninstall package-specific smack rules. + * + * Function loads package-specific smack rules, revokes them from the kernel +diff --git a/src/common/smack-rules.cpp b/src/common/smack-rules.cpp +index 3629e0f..d834e42 100644 +--- a/src/common/smack-rules.cpp ++++ b/src/common/smack-rules.cpp +@@ -135,6 +135,29 @@ void SmackRules::saveToFile(const std::string &path) const + } + } + ++void SmackRules::addFromTemplateFile(const std::string &appId, ++ const std::string &pkgId, const std::string &path) ++{ ++ std::vector templateRules; ++ std::string line; ++ std::ifstream templateRulesFile(path); ++ ++ if (!templateRulesFile.is_open()) { ++ LogError("Cannot open rules template file: " << path); ++ ThrowMsg(SmackException::FileError, "Cannot open rules template file: " << path); ++ } ++ ++ while (std::getline(templateRulesFile, line)) { ++ templateRules.push_back(line); ++ } ++ ++ if (templateRulesFile.bad()) { ++ LogError("Error reading template file: " << APP_RULES_TEMPLATE_FILE_PATH); ++ ThrowMsg(SmackException::FileError, "Error reading template file: " << APP_RULES_TEMPLATE_FILE_PATH); ++ } ++ ++ addFromTemplate(templateRules, appId, pkgId); ++} + + void SmackRules::addFromTemplateFile(const std::string &appId, + const std::string &pkgId) +@@ -223,7 +246,28 @@ std::string SmackRules::getApplicationRulesFilePath(const std::string &appId) + std::string path(tzplatform_mkpath3(TZ_SYS_SMACK, "accesses.d", ("app_" + appId).c_str())); + return path; + } ++void SmackRules::installApplicationPrivilegesRules(const std::string &appId, const std::string &pkgId, ++ const std::vector &pkgContents, const std::vector &privileges) ++{ ++ SmackRules smackRules; ++ std::string appPath = getApplicationRulesFilePath(appId); ++ smackRules.loadFromFile(appPath); ++ struct stat buffer; ++ for (auto privilege : privileges) { ++ if (privilege.empty()) ++ continue; ++ std::string fprivilege ( privilege + "-template.smack"); ++ std::string path(tzplatform_mkpath4(TZ_SYS_SHARE, "security-manager", "policy", fprivilege.c_str())); ++ if( stat(path.c_str(), &buffer) == 0) ++ smackRules.addFromTemplateFile(appId, pkgId, path); ++ } ++ ++ if (smack_smackfs_path() != NULL) ++ smackRules.apply(); + ++ smackRules.saveToFile(appPath); ++ updatePackageRules(pkgId, pkgContents); ++} + void SmackRules::installApplicationRules(const std::string &appId, const std::string &pkgId, + const std::vector &pkgContents) + { +-- +2.1.0 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/0002-app-install-implement-multiple-set-of-smack-rules.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/0002-app-install-implement-multiple-set-of-smack-rules.patch new file mode 100644 index 00000000..d60096a1 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/0002-app-install-implement-multiple-set-of-smack-rules.patch @@ -0,0 +1,34 @@ +From 19688cbe2ca10921a499f3fa265928dca54cf98d Mon Sep 17 00:00:00 2001 +From: Alejandro Joya +Date: Wed, 4 Nov 2015 19:06:23 -0600 +Subject: [PATCH 2/2] app-install: implement multiple set of smack-rules + +If it's need it could create load multiple set of smack rules +related with the privileges. +It wouldn't affect the case that only the default set of rules is need it. + +Signed-off-by: Alejandro Joya +--- + src/common/service_impl.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/common/service_impl.cpp b/src/common/service_impl.cpp +index 7fd621c..ae305d3 100644 +--- a/src/common/service_impl.cpp ++++ b/src/common/service_impl.cpp +@@ -338,6 +338,12 @@ int appInstall(const app_inst_req &req, uid_t uid) + LogDebug("Adding Smack rules for new appId: " << req.appId << " with pkgId: " + << req.pkgId << ". Applications in package: " << pkgContents.size()); + SmackRules::installApplicationRules(req.appId, req.pkgId, pkgContents); ++ /*Setup for privileges custom rules*/ ++ LogDebug("Adding Smack rules for new appId: " << req.appId << " with pkgId: " ++ << req.pkgId << ". Applications in package: " << pkgContents.size() ++ << " and Privileges"); ++ SmackRules::installApplicationPrivilegesRules(req.appId, req.pkgId, ++ pkgContents,req.privileges); + } catch (const SmackException::Base &e) { + LogError("Error while applying Smack policy for application: " << e.DumpToString()); + return SECURITY_MANAGER_API_ERROR_SETTING_FILE_LABEL_FAILED; +-- +2.1.0 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/Removing-tizen-platform-config.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/Removing-tizen-platform-config.patch new file mode 100644 index 00000000..4baea657 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/Removing-tizen-platform-config.patch @@ -0,0 +1,196 @@ +From 72e66d0e42f3bb6efd689ce33b1df407d94b3c60 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Mon, 16 Nov 2015 14:26:25 +0100 +Subject: [PATCH] Removing tizen-platform-config + +Change-Id: Ic832a2b75229517b09faba969c27fb1a4b490121 +--- + policy/security-manager-policy-reload | 2 +- + src/common/file-lock.cpp | 4 +--- + src/common/include/file-lock.h | 1 - + src/common/include/privilege_db.h | 3 +-- + src/common/service_impl.cpp | 39 +++++++++++------------------------ + src/common/smack-rules.cpp | 12 ++++------- + 6 files changed, 19 insertions(+), 42 deletions(-) + +diff --git a/policy/security-manager-policy-reload b/policy/security-manager-policy-reload +index 6f211c6..ed8047a 100755 +--- a/policy/security-manager-policy-reload ++++ b/policy/security-manager-policy-reload +@@ -2,7 +2,7 @@ + + POLICY_PATH=/usr/share/security-manager/policy + PRIVILEGE_GROUP_MAPPING=$POLICY_PATH/privilege-group.list +-DB_FILE=`tzplatform-get TZ_SYS_DB | cut -d= -f2`/.security-manager.db ++DB_FILE=/usr/dbspace/.security-manager.db + + # Create default buckets + while read bucket default_policy +diff --git a/src/common/file-lock.cpp b/src/common/file-lock.cpp +index 6f3996c..1dada17 100644 +--- a/src/common/file-lock.cpp ++++ b/src/common/file-lock.cpp +@@ -30,9 +30,7 @@ + + namespace SecurityManager { + +-char const * const SERVICE_LOCK_FILE = tzplatform_mkpath3(TZ_SYS_RUN, +- "lock", +- "security-manager.lock"); ++char const * const SERVICE_LOCK_FILE = "/var/run/lock/security-manager.lock"; + + FileLocker::FileLocker(const std::string &lockFile, bool blocking) + { +diff --git a/src/common/include/file-lock.h b/src/common/include/file-lock.h +index 604b019..21a86a0 100644 +--- a/src/common/include/file-lock.h ++++ b/src/common/include/file-lock.h +@@ -29,7 +29,6 @@ + + #include + #include +-#include + + namespace SecurityManager { + +diff --git a/src/common/include/privilege_db.h b/src/common/include/privilege_db.h +index 4d73d90..03c6680 100644 +--- a/src/common/include/privilege_db.h ++++ b/src/common/include/privilege_db.h +@@ -34,14 +34,13 @@ + #include + + #include +-#include + + #ifndef PRIVILEGE_DB_H_ + #define PRIVILEGE_DB_H_ + + namespace SecurityManager { + +-const char *const PRIVILEGE_DB_PATH = tzplatform_mkpath(TZ_SYS_DB, ".security-manager.db"); ++const char *const PRIVILEGE_DB_PATH = "/usr/dbspace/.security-manager.db"; + + enum class QueryType { + EGetPkgPrivileges, +diff --git a/src/common/service_impl.cpp b/src/common/service_impl.cpp +index ae305d3..65cc8b5 100644 +--- a/src/common/service_impl.cpp ++++ b/src/common/service_impl.cpp +@@ -32,7 +32,6 @@ + #include + + #include +-#include + + #include "protocols.h" + #include "privilege_db.h" +@@ -131,7 +130,13 @@ static inline int validatePolicy(policy_entry &policyEntry, std::string uidStr, + + static uid_t getGlobalUserId(void) + { +- static uid_t globaluid = tzplatform_getuid(TZ_SYS_GLOBALAPP_USER); ++ static uid_t globaluid = 0; ++ if (!globaluid) { ++ struct passwd pw, *p; ++ char buf[4096]; ++ int rc = getpwnam_r("userapp", &pw, buf, sizeof buf, &p); ++ globaluid = (rc || p == NULL) ? 555 : p->pw_uid; ++ } + return globaluid; + } + +@@ -161,37 +166,17 @@ static inline bool isSubDir(const char *parent, const char *subdir) + + static bool getUserAppDir(const uid_t &uid, std::string &userAppDir) + { +- struct tzplatform_context *tz_ctx = nullptr; +- +- if (tzplatform_context_create(&tz_ctx)) +- return false; +- +- if (tzplatform_context_set_user(tz_ctx, uid)) { +- tzplatform_context_destroy(tz_ctx); +- tz_ctx = nullptr; ++ struct passwd pw, *p; ++ char buf[4096]; ++ int rc = getpwuid_r(uid, &pw, buf, sizeof buf, &p); ++ if (rc || p == NULL) + return false; +- } +- +- enum tzplatform_variable id = +- (uid == getGlobalUserId()) ? TZ_SYS_RW_APP : TZ_USER_APP; +- const char *appDir = tzplatform_context_getenv(tz_ctx, id); +- if (!appDir) { +- tzplatform_context_destroy(tz_ctx); +- tz_ctx = nullptr; +- return false; +- } +- +- userAppDir = appDir; +- +- tzplatform_context_destroy(tz_ctx); +- tz_ctx = nullptr; +- ++ userAppDir = p->pw_dir; + return true; + } + + static inline bool installRequestAuthCheck(const app_inst_req &req, uid_t uid, bool &isCorrectPath, std::string &appPath) + { +- std::string userHome; + std::string userAppDir; + std::stringstream correctPath; + +diff --git a/src/common/smack-rules.cpp b/src/common/smack-rules.cpp +index d834e42..8b5728b 100644 +--- a/src/common/smack-rules.cpp ++++ b/src/common/smack-rules.cpp +@@ -34,7 +34,6 @@ + #include + + #include +-#include + + #include "smack-labels.h" + #include "smack-rules.h" +@@ -43,7 +42,7 @@ namespace SecurityManager { + + const char *const SMACK_APP_LABEL_TEMPLATE = "~APP~"; + const char *const SMACK_PKG_LABEL_TEMPLATE = "~PKG~"; +-const char *const APP_RULES_TEMPLATE_FILE_PATH = tzplatform_mkpath4(TZ_SYS_SHARE, "security-manager", "policy", "app-rules-template.smack"); ++const char *const APP_RULES_TEMPLATE_FILE_PATH = "/usr/share/security-manager/policy/app-rules-template.smack"; + const char *const SMACK_APP_IN_PACKAGE_PERMS = "rwxat"; + + SmackRules::SmackRules() +@@ -237,14 +236,12 @@ void SmackRules::generatePackageCrossDeps(const std::vector &pkgCon + + std::string SmackRules::getPackageRulesFilePath(const std::string &pkgId) + { +- std::string path(tzplatform_mkpath3(TZ_SYS_SMACK, "accesses.d", ("pkg_" + pkgId).c_str())); +- return path; ++ return "/etc/smack/accesses.d/pkg_" + pkgId; + } + + std::string SmackRules::getApplicationRulesFilePath(const std::string &appId) + { +- std::string path(tzplatform_mkpath3(TZ_SYS_SMACK, "accesses.d", ("app_" + appId).c_str())); +- return path; ++ return "/etc/smack/accesses.d/app_" + appId; + } + void SmackRules::installApplicationPrivilegesRules(const std::string &appId, const std::string &pkgId, + const std::vector &pkgContents, const std::vector &privileges) +@@ -256,8 +253,7 @@ void SmackRules::installApplicationPrivilegesRules(const std::string &appId, con + for (auto privilege : privileges) { + if (privilege.empty()) + continue; +- std::string fprivilege ( privilege + "-template.smack"); +- std::string path(tzplatform_mkpath4(TZ_SYS_SHARE, "security-manager", "policy", fprivilege.c_str())); ++ std::string path = "/usr/share/security-manager/policy/" + privilege + "-template.smack"; + if( stat(path.c_str(), &buffer) == 0) + smackRules.addFromTemplateFile(appId, pkgId, path); + } +-- +2.1.4 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/c-11-replace-depracated-auto_ptr.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/c-11-replace-depracated-auto_ptr.patch new file mode 100644 index 00000000..c312a9e7 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/c-11-replace-depracated-auto_ptr.patch @@ -0,0 +1,32 @@ +From 6abeec29a0e704f4bf7084b29275b99fea0a78de Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Wed, 13 Jan 2016 17:30:06 +0100 +Subject: [PATCH 2/2] c++11: replace depracated auto_ptr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Submitted [https://review.tizen.org/gerrit/#/c/56940/] + +Change-Id: Id793c784c9674eef48f346226c094bdd9f7bbda8 +Signed-off-by: José Bollo +--- + src/dpl/core/include/dpl/binary_queue.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/dpl/core/include/dpl/binary_queue.h b/src/dpl/core/include/dpl/binary_queue.h +index dd03f5e..185b6c7 100644 +--- a/src/dpl/core/include/dpl/binary_queue.h ++++ b/src/dpl/core/include/dpl/binary_queue.h +@@ -33,7 +33,7 @@ namespace SecurityManager { + * Binary queue auto pointer + */ + class BinaryQueue; +-typedef std::auto_ptr BinaryQueueAutoPtr; ++typedef std::unique_ptr BinaryQueueAutoPtr; + + /** + * Binary stream implemented as constant size bucket list +-- +2.1.4 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/include-linux-xattr.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/include-linux-xattr.patch new file mode 100644 index 00000000..33fbc025 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/include-linux-xattr.patch @@ -0,0 +1,24 @@ +From: José Bollo +Date: Tue, 30 Oct 2015 14:32:03 -0100 +Subject: [PATCH] include linux xattr + +adds a #include in source. + +--- + src/client/client-security-manager.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/client/client-security-manager.cpp b/src/client/client-security-manager.cpp +index 74a6b30..641790b 100644 +--- a/src/client/client-security-manager.cpp ++++ b/src/client/client-security-manager.cpp +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.1.4 diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/libcap-without-pkgconfig.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/libcap-without-pkgconfig.patch new file mode 100644 index 00000000..a948343f --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/libcap-without-pkgconfig.patch @@ -0,0 +1,32 @@ +From: José Bollo +Date: Tue, 30 Oct 2015 14:32:03 -0100 +Subject: [PATCH] libcap without pkgconfig + +Handles libcap that isn't distributed for pkg-config + +--- + src/client/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt +index 5399a55..0250ce2 100644 +--- a/src/client/CMakeLists.txt ++++ b/src/client/CMakeLists.txt +@@ -1,7 +1,6 @@ + PKG_CHECK_MODULES(CLIENT_DEP + REQUIRED + libsmack +- libcap + ) + + SET(CLIENT_VERSION_MAJOR 1) +@@ -37,6 +36,7 @@ SET_TARGET_PROPERTIES(${TARGET_CLIENT} + TARGET_LINK_LIBRARIES(${TARGET_CLIENT} + ${TARGET_COMMON} + ${CLIENT_DEP_LIBRARIES} ++ cap + ) + + INSTALL(TARGETS ${TARGET_CLIENT} DESTINATION ${LIB_INSTALL_DIR}) +-- +2.1.4 diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/removes-dependency-to-libslp-db-utils.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/removes-dependency-to-libslp-db-utils.patch new file mode 100644 index 00000000..f9497307 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/removes-dependency-to-libslp-db-utils.patch @@ -0,0 +1,78 @@ +From 1e2f8f58d4320afa1d83a6f94822e53346108ee8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Mon, 16 Nov 2015 15:56:27 +0100 +Subject: [PATCH] removes dependency to libslp-db-utils + +Change-Id: I90471e77d20e04bae58cc42eb2639e4aef97fdec +--- + src/common/CMakeLists.txt | 1 ++- + src/dpl/db/src/sql_connection.cpp | 17 +---------------- + 2 files changed, 3 additions(+), 17 deletions(-) + +diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt +index 968c7c1..d1fe644 100644 +--- a/src/common/CMakeLists.txt ++++ b/src/common/CMakeLists.txt +@@ -5,7 +5,8 @@ PKG_CHECK_MODULES(COMMON_DEP + REQUIRED + libsystemd + libsmack +- db-util ++ sqlite3 ++ icu-i18n + cynara-admin + cynara-client + ) +diff --git a/src/dpl/db/src/sql_connection.cpp b/src/dpl/db/src/sql_connection.cpp +index fdb4fe4..1fb97be 100644 +--- a/src/dpl/db/src/sql_connection.cpp ++++ b/src/dpl/db/src/sql_connection.cpp +@@ -26,7 +26,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -606,16 +605,7 @@ void SqlConnection::Connect(const std::string &address, + + // Connect to database + int result; +- if (type & Flag::UseLucene) { +- result = db_util_open_with_options( +- address.c_str(), +- &m_connection, +- flag, +- NULL); +- +- m_usingLucene = true; +- LogPedantic("Lucene index enabled"); +- } else { ++ (void)type; + result = sqlite3_open_v2( + address.c_str(), + &m_connection, +@@ -624,7 +614,6 @@ void SqlConnection::Connect(const std::string &address, + + m_usingLucene = false; + LogPedantic("Lucene index disabled"); +- } + + if (result == SQLITE_OK) { + LogPedantic("Connected to DB"); +@@ -653,11 +642,7 @@ void SqlConnection::Disconnect() + + int result; + +- if (m_usingLucene) { +- result = db_util_close(m_connection); +- } else { + result = sqlite3_close(m_connection); +- } + + if (result != SQLITE_OK) { + const char *error = sqlite3_errmsg(m_connection); +-- +2.1.4 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/security-manager-policy-reload-do-not-depend-on-GNU-.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/security-manager-policy-reload-do-not-depend-on-GNU-.patch new file mode 100644 index 00000000..ac57964c --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/security-manager-policy-reload-do-not-depend-on-GNU-.patch @@ -0,0 +1,35 @@ +From d2995014142306987bf86b4d508a84b9b4683c5c Mon Sep 17 00:00:00 2001 +From: Patrick Ohly +Date: Wed, 19 Aug 2015 15:02:32 +0200 +Subject: [PATCH 2/2] security-manager-policy-reload: do not depend on GNU sed + +\U (= make replacement uppercase) is a GNU sed extension which is not +supported by other sed implementation's (like the one from +busybox). When using busybox, the bucket for user profiles became +USER_TYPE_Uadmin instead USER_TYPE_ADMIN. + +To make SecurityManager more portable, better use tr to turn the +bucket name into uppercase. + +Signed-off-by: Patrick Ohly +Upstream-Status: Submitted (https://github.com/Samsung/security-manager/pull/1 + +--- + policy/security-manager-policy-reload | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/policy/security-manager-policy-reload b/policy/security-manager-policy-reload +index 274c49c..6f211c6 100755 +--- a/policy/security-manager-policy-reload ++++ b/policy/security-manager-policy-reload +@@ -33,7 +33,7 @@ END + find "$POLICY_PATH" -name "usertype-*.profile" | + while read file + do +- bucket="`echo $file | sed -r 's|.*/usertype-(.*).profile$|USER_TYPE_\U\1|'`" ++ bucket="`echo $file | sed -r 's|.*/usertype-(.*).profile$|USER_TYPE_\1|' | tr '[:lower:]' '[:upper:]'`" + + # Re-create the bucket with empty contents + cyad --delete-bucket=$bucket || true +-- +2.1.4 diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/socket-manager-removes-tizen-specific-call.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/socket-manager-removes-tizen-specific-call.patch new file mode 100644 index 00000000..fa4c21c7 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/socket-manager-removes-tizen-specific-call.patch @@ -0,0 +1,47 @@ +From 75c4852e47217ab85d6840b488ab4b3688091856 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Bollo?= +Date: Fri, 8 Jan 2016 16:53:46 +0100 +Subject: [PATCH 1/2] socket-manager: removes tizen specific call +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The function 'smack_fgetlabel' is specific to Tizen +and is no more maintained upstream. + +Upstream-Status: Accepted [https://review.tizen.org/gerrit/#/c/56507/] + +Change-Id: I3802742b1758efe37b33e6d968ff727d68f2fd1f +Signed-off-by: José Bollo +--- + src/server/main/socket-manager.cpp | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/server/main/socket-manager.cpp b/src/server/main/socket-manager.cpp +index 0366186..c5cec18 100644 +--- a/src/server/main/socket-manager.cpp ++++ b/src/server/main/socket-manager.cpp +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -500,9 +501,9 @@ int SocketManager::CreateDomainSocketHelp( + if (smack_check()) { + LogInfo("Set up smack label: " << desc.smackLabel); + +- if (0 != smack_fsetlabel(sockfd, desc.smackLabel.c_str(), SMACK_LABEL_IPIN)) { +- LogError("Error in smack_fsetlabel"); +- ThrowMsg(Exception::InitFailed, "Error in smack_fsetlabel"); ++ if (0 != smack_set_label_for_file(sockfd, XATTR_NAME_SMACKIPIN, desc.smackLabel.c_str())) { ++ LogError("Error in smack_set_label_for_file"); ++ ThrowMsg(Exception::InitFailed, "Error in smack_set_label_for_file"); + } + } else { + LogInfo("No smack on platform. Socket won't be securied with smack label!"); +-- +2.1.4 + diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager/systemd-stop-using-compat-libs.patch b/meta-agl/meta-security/recipes-security/security-manager/security-manager/systemd-stop-using-compat-libs.patch new file mode 100644 index 00000000..cd5c36a6 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager/systemd-stop-using-compat-libs.patch @@ -0,0 +1,47 @@ +From 8ec024d2adecb53029c6f1af2b95c93dfd43a7cb Mon Sep 17 00:00:00 2001 +From: Patrick Ohly +Date: Tue, 24 Mar 2015 04:54:03 -0700 +Subject: [PATCH] systemd: stop using compat libs + +libsystemd-journal and libsystemd-daemon are considered obsolete +in systemd since 2.09 and may not be available (not compiled +by default). + +The code works fine with the current libsystemd, so just +use that. + +Signed-off-by: Patrick Ohly +Upstream-Status: Submitted (https://github.com/Samsung/security-manager/pull/1 + +--- + src/common/CMakeLists.txt | 2 +- + src/server/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt +index 2da9c3e..968c7c1 100644 +--- a/src/common/CMakeLists.txt ++++ b/src/common/CMakeLists.txt +@@ -3,7 +3,7 @@ SET(COMMON_VERSION ${COMMON_VERSION_MAJOR}.0.2) + + PKG_CHECK_MODULES(COMMON_DEP + REQUIRED +- libsystemd-journal ++ libsystemd + libsmack + db-util + cynara-admin +diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt +index 753eb96..6849d76 100644 +--- a/src/server/CMakeLists.txt ++++ b/src/server/CMakeLists.txt +@@ -1,6 +1,6 @@ + PKG_CHECK_MODULES(SERVER_DEP + REQUIRED +- libsystemd-daemon ++ libsystemd + ) + + FIND_PACKAGE(Boost REQUIRED) +-- +2.1.4 diff --git a/meta-agl/meta-security/recipes-security/security-manager/security-manager_git.bb b/meta-agl/meta-security/recipes-security/security-manager/security-manager_git.bb new file mode 100644 index 00000000..3cbc3aea --- /dev/null +++ b/meta-agl/meta-security/recipes-security/security-manager/security-manager_git.bb @@ -0,0 +1,38 @@ +require security-manager.inc + +PV = "1.0.2+git${SRCPV}" +SRCREV = "860305a595d681d650024ad07b3b0977e1fcb0a6" +SRC_URI += "git://github.com/Samsung/security-manager.git" +S = "${WORKDIR}/git" + +SRC_URI += " \ +file://systemd-stop-using-compat-libs.patch \ +file://security-manager-policy-reload-do-not-depend-on-GNU-.patch \ +file://0001-Smack-rules-create-two-new-functions.patch \ +file://0002-app-install-implement-multiple-set-of-smack-rules.patch \ +file://c-11-replace-depracated-auto_ptr.patch \ +file://socket-manager-removes-tizen-specific-call.patch \ +file://Removing-tizen-platform-config.patch \ +file://removes-dependency-to-libslp-db-utils.patch \ +file://0001-Fix-gcc8-warning-error-Werror-catch-value.patch \ +file://0001-Avoid-casting-from-const-T-to-void.patch \ +" + +########################################## +# This are patches for backward compatibility to the version dizzy of poky. +# The dizzy version of libcap isn't providing a packconfig file. +# This is solved by the patch libcap-without-pkgconfig.patch. +# But after solving that issue, it appears that linux/xattr.h should +# also be include add definitions of XATTR_NAME_SMACK... values. +# Unfortunately, there is no explanation why linux/xattr.h should +# also be included (patch include-linux-xattr.patch) +########################################## +do_patch[depends] = "libcap:do_populate_sysroot" +APPLY = "${@str('no' if os.path.exists('${STAGING_LIBDIR}/pkgconfig/libcap.pc') else 'yes')}" +SRC_URI += "\ + file://libcap-without-pkgconfig.patch;apply=${APPLY} \ + file://include-linux-xattr.patch;apply=${APPLY} \ +" + +# Use make with cmake and not ninja +OECMAKE_GENERATOR = "Unix Makefiles" diff --git a/meta-agl/meta-security/recipes-security/smacknet/files/smacknet b/meta-agl/meta-security/recipes-security/smacknet/files/smacknet new file mode 100644 index 00000000..3818d30a --- /dev/null +++ b/meta-agl/meta-security/recipes-security/smacknet/files/smacknet @@ -0,0 +1,184 @@ +#!/usr/bin/python +# Copyright (c) 2012, 2013, Intel Corporation +# Copyright (c) 2009 David Wolinsky L", bmask)[0]).count("1") + tags = [ + addr+"/"+str(prefix)+" Network::Local\n", + "0.0.0.0/0 Network::Cloud\n", + "127.0.0.1/8 -CIPSO\n"] + smackfs_netlabel(tags) + +def loadnetlabelrules(): + rulesSystem = [ + "System Network::Cloud w\n", + "System Network::Local w\n", + "Network::Cloud System w\n", + "Network::Local System w\n"] + smackfs_load2(rulesSystem) + +def smackfs_load2 (rules): + with open(SMACKFS_LOAD, "w") as load2: + for rule in rules: + load2.write(rule) + +def smackfs_netlabel (tags): + for tag in tags: + with open(SMACKFS_NETLABEL, "w") as netlabel: + netlabel.write(tag) + +""" + Source of: Class ip monitor, and other functions named bellow. + Original author: David Wolinsky " + addr) + + def request_addrs(self, sock): + sock.send(struct.pack("IHHIIBBBBI", 24, rtattr.GETADDR, \ + netlink.REQUEST | netlink.ROOT | netlink.MATCH, 0, sock.getsockname()[0], \ + socket.AF_INET, 0, 0, 0, 0)) + + def start_thread(self): + thread.start_new_thread(self.run, ()) + + def run(self): + sock = socket.socket(socket.AF_NETLINK, socket.SOCK_RAW, socket.NETLINK_ROUTE) + sock.bind((0, rtattr.GRP_IPV4_IFADDR)) + self.request_addrs(sock) + + while True: + data = sock.recv(4096) + pos = 0 + while pos < len(data): + nl = netlink(data[pos:]) + if nl.msgtype == netlink.DONE: + break + pos += align(nl.msglen) + if nl.msgtype != rtattr.NEWADDR: + continue + self._callback(nl.rtas[ifaddr.LABEL], nl.rtas[ifaddr.LOCAL]) + +def main(): + if not os.path.isfile(SMACKFS_LOAD): + print ("Smack not found.") + return -1 + loadnetlabelrules() + + ip_monitor(applynetlabeltags).run() + +if __name__ == "__main__": + main() diff --git a/meta-agl/meta-security/recipes-security/smacknet/files/smacknet.service b/meta-agl/meta-security/recipes-security/smacknet/files/smacknet.service new file mode 100644 index 00000000..218d8b89 --- /dev/null +++ b/meta-agl/meta-security/recipes-security/smacknet/files/smacknet.service @@ -0,0 +1,11 @@ +[Unit] +Description=netlabels configuration for SMACK +Wants=network.target network-online.target +After=network.target network-online.target + +[Service] +TimeoutStartSec=0 +ExecStart=@BINDIR@/smacknet + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl/meta-security/recipes-security/smacknet/smacknet.bb b/meta-agl/meta-security/recipes-security/smacknet/smacknet.bb new file mode 100644 index 00000000..553456ae --- /dev/null +++ b/meta-agl/meta-security/recipes-security/smacknet/smacknet.bb @@ -0,0 +1,29 @@ +#SMACKNET Description +SUMMARY = "Smack network labels configuration" +DESCRIPTION = "Provide service that will be labeling the network rules" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" +RDEPENDS_${PN} = "python" + +SRC_URI += "file://smacknet \ + file://smacknet.service \ + " +S = "${WORKDIR}" + +inherit systemd + +inherit distro_features_check +REQUIRED_DISTRO_FEATURES = "smack" + +#netlabel configuration service +SYSTEMD_SERVICE_${PN} = "smacknet.service" +SYSTEMD_AUTO_ENABLE = "enable" +do_install(){ + install -d ${D}${bindir} + install -m 0551 ${WORKDIR}/smacknet ${D}${bindir} + + install -d -m 755 ${D}${systemd_unitdir}/system + install -m 644 ${WORKDIR}/smacknet.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_unitdir}/system/smacknet.service +} + diff --git a/meta-agl/meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend b/meta-agl/meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend new file mode 100644 index 00000000..9c6080fc --- /dev/null +++ b/meta-agl/meta-security/recipes-security/xmlsec1/xmlsec1_%.bbappend @@ -0,0 +1,3 @@ +# remove the EXTRA_OECONF from the recipe to +# avoid an build error in >= YP SUMO +EXTRA_OECONF = "" diff --git a/meta-agl/scripts/.aglsetup_genconfig.bash b/meta-agl/scripts/.aglsetup_genconfig.bash new file mode 100755 index 00000000..323479c3 --- /dev/null +++ b/meta-agl/scripts/.aglsetup_genconfig.bash @@ -0,0 +1,581 @@ +#!/bin/bash + +################################################################################ +# +# The MIT License (MIT) +# +# Copyright (c) 2016-2019 Stéphane Desneux +# (c) 2016 Jan-Simon Möller +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +################################################################################ + +# this script shouldn't be called directly, but through aglsetup.sh that will in +# turn execute (source) generated instructions back in the parent shell, +# whether it's bash, zsh, or any other supported shell + +VERSION=1.2.0 +DEFAULT_MACHINE=qemux86-64 +DEFAULT_BUILDDIR=./build +VERBOSE=0 +SHOWVERSION=0 +: ${DEBUG:=false} + +#SCRIPT=$(basename $BASH_SOURCE) +SCRIPT=aglsetup.sh +SCRIPTDIR=$(cd $(dirname $BASH_SOURCE) && pwd -P) +METADIR=$(cd $(dirname $BASH_SOURCE)/../.. && pwd -P) + +function info() { echo "$@" >&2; } +function infon() { echo -n "$@" >&2; } +function error() { echo "ERROR: $@" >&2; return 1; } +function verbose() { [[ $VERBOSE == 1 ]] && echo "$@" >&2; return 0; } +function debug() { $DEBUG && echo "DEBUG: $@" >&2; return 0;} + +debug "------------ $SCRIPT: starting with command line arguments: $@" + +#compute AGL_REPOSITORIES +AGL_REPOSITORIES=$(for x in $(ls -d $METADIR/meta-*/templates/{machine,feature} $METADIR/bsp/*/templates/machine 2>/dev/null); do echo $(basename $(dirname $(dirname $x))); done | sort -u) + +function list_machines() { + for a in $@; do + for y in $(ls -d $METADIR/{.,bsp}/$a/templates/machine/* 2>/dev/null); do + echo $(basename $y) + done + done +} + +function list_all_machines() { + for x in $AGL_REPOSITORIES; do + list_machines $x + done +} + +function validate_builddir() { + if [[ "$BUILDDIR" =~ [[:space:]] ]]; then + error "Build dir '$BUILDDIR' shouldn't contain any space" + fi + debug "Build dir is valid" +} + +function validate_machines() { + list_all_machines | sort | uniq -c | while read cnt machine; do + [[ $cnt == 1 ]] && continue + info "Machine $machine found in the following repositories:" + for x in $(ls -d $METADIR/*/templates/machine/$machine $METADIR/bsp/*/templates/machine/$machine 2>/dev/null); do + info " - $x" + done + error "Multiple machine templates are not allowed" + done + debug "Machines list has no duplicate." +} + +function list_features() { + for x in $@; do + for y in $(ls -d $METADIR/$x/templates/feature/* 2>/dev/null); do + echo $(basename $y) + done + done +} + +function list_all_features() { + for x in $AGL_REPOSITORIES; do + list_features $x + done +} + +function validate_features() { + list_all_features | sort | uniq -c | while read cnt feature; do + [[ $cnt == 1 ]] && continue; + info "Feature $feature found in the following repositories:" + for x in $(ls -d $METADIR/*/templates/feature/$feature 2>/dev/null); do + info " - $x" + done + error "Multiple feature templates are not allowed" + done + debug "Features list has no duplicate." +} + +function find_machine_dir() { + machine=$1 + for x in $AGL_REPOSITORIES; do + dirs=$(ls -d $METADIR/{.,bsp}/$x/templates/machine/$machine 2>/dev/null) + for dir in $dirs; do + [[ -d $dir ]] && { echo $dir; return 0; } + done + done + return 1 +} + +function find_feature_dir() { + feature=$1 + for x in $AGL_REPOSITORIES; do + dir=$METADIR/$x/templates/feature/$feature + [[ -d $dir ]] && { echo $dir; return 0; } + done + return 1 +} + +function usage() { + cat <&2 +Usage: . $SCRIPT [options] [feature [feature [... ]]] + +Version: $VERSION +Compatibility: bash, zsh, ksh + +Options: + -m|--machine + what machine to use + default: '$DEFAULT_MACHINE' + -b|--build + build directory to use + default: '$DEFAULT_BUILDDIR' + -s|--script + file where setup script is generated + default: none (no script) + -f|--force + flag to force overwriting any existing configuration + default: false + -r|--rpm-revision + Specify how to handle RPM packages revisions + can be: + 'prservice[:
]' : Use a PR service daemon. + if
is not specified, the default value 'localhost:0' + is used (shortcut for a PR service started by bitbake) + 'timestamp' : Use a generated time stamp (UTC). + 'value:' : Use explicitly. + 'none' : Do nothing. + -t|--topic + Specify an optional topic for this setup. + If specified, the topic will be propagated in build manifests: + - in deployment dir: tmp/deploy/images/*/build-info + - in target image: /etc/platform-info/build + - in SDK: tmp/deploy/sdk/*.build-info + -v|--verbose + verbose mode + default: false + -V|--version + display version, set AGLSETUP_VERSION variable with version value and exit + -d|--debug + debug mode + for early debug, set env variable DEBUG. + for example: + DEBUG=true source aglsetup.sh -V + default: false + -h|--help + get some help + +EOF + local buf + + echo "Available machines:" >&2 + for x in $AGL_REPOSITORIES; do + buf=$(list_machines $x) + [[ -z "$buf" ]] && continue + echo " [$x]" + for y in $buf; do + [[ $y == $DEFAULT_MACHINE ]] && def="* " || def=" " + echo " $def$y" + done + done + echo >&2 + + echo "Available features:" >&2 + for x in $AGL_REPOSITORIES; do + buf=$(list_features $x) + [[ -z "$buf" ]] && continue + echo " [$x]" + for feature in $buf; do + print_feature="$feature" + featuredir=$(find_feature_dir $feature) + if [ -e $featuredir/included.dep ];then + print_feature="$print_feature :($(find_feature_dependency $feature $feature))" + fi; + echo " $print_feature" + done + done + echo >&2 +} + +function append_fragment() { + basefile=$1; shift # output file + f=$1; shift # input file + label=$(echo "$@") + + debug "adding fragment to $basefile: $f" + echo >>$basefile + echo "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #" >>$basefile + echo "# fragment { " >>$basefile + [[ -f $f ]] && echo "# $f" >>$basefile || true + echo "#" >>$basefile + [[ -n "$label" ]] && echo "$label" >>$basefile + [[ -f $f ]] && cat $f >>$basefile || true + echo "" >>$basefile + echo "#" >>$basefile + echo "# }" >>$basefile + echo "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #" >>$basefile + [[ -f $f ]] && echo $f >>$BUILDDIR/conf/fragments.log || true +} + +function execute_setup() { + script=$1 + debug "Executing script $script" + opts="-e" + $DEBUG && opts="$opts -x" + pushd $BUILDDIR &>/dev/null + $BASH $opts $script \ + && rc=0 \ + || { rc=$?; error "Script $script failed"; } + popd &>/dev/null + return $rc +} + + +# process all fragments +FRAGMENTS_BBLAYERS="" +FRAGMENTS_LOCALCONF="" +FRAGMENTS_SETUP="" +function process_fragments() { + for dir in "$@"; do + debug "processing fragments in dir $dir" + + verbose " Searching fragments: $dir" + + # lookup for files with priorities specified: something like xx_bblayers.conf.yyyyy.inc + for x in $(ls $dir/??[._]bblayers.conf*.inc 2>/dev/null); do + FRAGMENTS_BBLAYERS="$FRAGMENTS_BBLAYERS $(basename $x):$x" + verbose " priority $(basename $x | cut -c1-2): $(basename $x)" + done + + # same for local.conf + for x in $(ls $dir/??[._]local.conf*.inc 2>/dev/null); do + FRAGMENTS_LOCALCONF="$FRAGMENTS_LOCALCONF $(basename $x):$x" + verbose " priority $(basename $x | cut -c1-2): $(basename $x)" + done + + # same fot setup.sh + for x in $(ls $dir/??[._]setup*.sh 2>/dev/null); do + FRAGMENTS_SETUP="$FRAGMENTS_SETUP $(basename $x):$x" + verbose " priority $(basename $x | cut -c1-2): $(basename $x)" + done + done +} + +function containsFeature () { + for feature in $1; do + [[ "$feature" == "$2" ]] && return 1; + done; + return 0; +} + +function find_feature_dependency() { + res_dep_features="" + featuredir=$(find_feature_dir $1) + full_feature=$2; + if [ -e $featuredir/included.dep ]; then + dep_features="$(cat $featuredir/included.dep)" + for dep_feature in $dep_features; do + full_feature="$full_feature $res_dep_features" + res_dep_features="$res_dep_features $dep_feature" + if containsFeature $dep_feature $full_feature ; then + res_dep_features="$res_dep_features $(find_feature_dependency $dep_feature $full_feature)" + fi; + done; + fi; + echo "$res_dep_features"; + return 0; +} + +GLOBAL_ARGS=( "$@" ) +debug "Parsing arguments: $@" +TEMP=$(getopt -o m:b:r:t:s:fvVdh --long machine:,builddir:,rpm-revision:,topic:,script:,force,verbose,version,debug,help -n $SCRIPT -- "$@") +[[ $? != 0 ]] && { usage; exit 1; } +eval set -- "$TEMP" + +set -e + +### default options values +MACHINE=$DEFAULT_MACHINE +BUILDDIR=$DEFAULT_BUILDDIR +SETUPSCRIPT= +FORCE= +RPMREVISION= +TOPIC= +SETUP_MANIFEST=aglsetup.manifest + +while true; do + case "$1" in + -m|--machine) MACHINE=$2; shift 2;; + -b|--builddir) BUILDDIR=$2; shift 2;; + -s|--setupscript) SETUPSCRIPT=$2; shift 2;; + -f|--force) FORCE=1; shift;; + -r|--rpm-revision) RPMREVISION=$2; shift 2;; + -t|--topic) TOPIC=$2; shift 2;; + -v|--verbose) VERBOSE=1; shift;; + -V|--version) SHOWVERSION=1; shift;; + -d|--debug) VERBOSE=1; DEBUG=true; shift;; + -h|--help) HELP=1; shift;; + --) shift; break;; + *) error "Arguments parsing error"; exit 1;; + esac +done + +[[ "$HELP" == 1 ]] && { usage; exit 0; } + +if [[ "$SHOWVERSION" == 1 ]]; then + # display version on stdout + echo "$VERSION" + + # generate output script if requested by caller + if [[ -n "$SETUPSCRIPT" ]]; then + cat <$SETUPSCRIPT +AGLSETUP_VERSION=$VERSION +EOF + fi + + # IMPORTANT: exit successfully + # older aglsetup scripts with version <1.2.0 will fail with option --version + exit 0 +fi + +info "------------ $SCRIPT: Starting" + +verbose "Command line arguments: ${GLOBAL_ARGS[@]}" + +# the remaining args are the features +FEATURES="$@" + +# validate the machine list +debug "validating machines list" +validate_machines + +# validate the machine +debug "validating machine $MACHINE" +find_machine_dir $MACHINE >/dev/null || error "Machine '$MACHINE' not found in [ $(list_all_machines)]" + +# validate the features list +debug "validating features list" +validate_features + +TMP_FEATURES=""; +for FEATURE in $FEATURES;do + TMP_FEATURES="$TMP_FEATURES $FEATURE" + TMP_FEATURES="$TMP_FEATURES $(find_feature_dependency $FEATURE $TMP_FEATURES)" +done +# remove duplicate features if any +FEATURES=$(for x in $TMP_FEATURES; do echo $x; done | sort -u | awk '{printf("%s ",$1);}') + +# validate the features +for f in $FEATURES; do + debug "validating feature $f" + find_feature_dir $f >/dev/null || error "Feature '$f' not found in [ $(list_all_features)]" +done + +# validate build dir +debug "validating builddir $BUILDDIR" +BUILDDIR=$(mkdir -p "$BUILDDIR" && cd "$BUILDDIR" && pwd -P) +validate_builddir + +########################################################################################### +function dump_log() { + info " ------------ $(basename $1) -----------------" + sed 's/^/ | /g' $1 + info " ----------------------------------------" +} + +function genconfig() { + info "Generating configuration files:" + info " Build dir: $BUILDDIR" + info " Machine: $MACHINE" + info " Features: $FEATURES" + + # step 1: run usual OE setup to generate conf dir + export TEMPLATECONF=$(cd $SCRIPTDIR/../templates/base && pwd -P) + debug "running oe-init-build-env with TEMPLATECONF=$TEMPLATECONF" + info " Running $METADIR/external/poky/oe-init-build-env" + info " Templates dir: $TEMPLATECONF" + + CURDIR=$(pwd -P) + . $METADIR/external/poky/oe-init-build-env $BUILDDIR >/dev/null + cd $CURDIR + + # step 2: concatenate other remaining fragments coming from base + process_fragments $TEMPLATECONF + + # step 3: fragments for machine + process_fragments $(find_machine_dir $MACHINE) + + # step 4: fragments for features + for feature in $FEATURES; do + process_fragments $(find_feature_dir $feature) + done + + # step 5: sort fragments and append them in destination files + FRAGMENTS_BBLAYERS=$(sed 's/ /\n/g' <<<$FRAGMENTS_BBLAYERS | sort) + debug "bblayer fragments: $FRAGMENTS_BBLAYERS" + info " Config: $BUILDDIR/conf/bblayers.conf" + for x in $FRAGMENTS_BBLAYERS; do + file=${x/#*:/} + append_fragment $BUILDDIR/conf/bblayers.conf $file + verbose " + $file" + done + + FRAGMENTS_LOCALCONF=$(sed 's/ /\n/g' <<<$FRAGMENTS_LOCALCONF | sort) + debug "localconf fragments: $FRAGMENTS_LOCALCONF" + info " Config: $BUILDDIR/conf/local.conf" + for x in $FRAGMENTS_LOCALCONF; do + file=${x/#*:/} + append_fragment $BUILDDIR/conf/local.conf $file + verbose " + $file" + done + # special fragment to call distro-manifest-generator.sh from + # meta-agl-profile-core/recipes-core/distro-build-manifest/distro-build-manifest.bb + append_fragment $BUILDDIR/conf/local.conf /dev/stdin "# generated by $(realpath $BASH_SOURCE)" <<-EOF + DISTRO_SETUP_MANIFEST = "$(realpath -Ls $BUILDDIR)/$SETUP_MANIFEST" + DISTRO_MANIFEST_GENERATOR = "$(dirname $(realpath $BASH_SOURCE))/distro-manifest-generator.sh" + EOF + + FRAGMENTS_SETUP=$(sed 's/ /\n/g' <<<$FRAGMENTS_SETUP | sort) + debug "setup fragments: $FRAGMENTS_SETUP" + cat <$BUILDDIR/conf/setup.sh +#!/bin/bash + +# this script has been generated by $BASH_SOURCE + +export MACHINE="$MACHINE" +export FEATURES="$FEATURES" +export BUILDDIR="$BUILDDIR" +export METADIR="$METADIR" +export RPMREVISION="$RPMREVISION" +export LOCALCONF="$BUILDDIR/conf/local.conf" + +echo "--- beginning of setup script" +EOF + info " Setup script: $BUILDDIR/conf/setup.sh" + for x in $FRAGMENTS_SETUP; do + file=${x/#*:/} + append_fragment $BUILDDIR/conf/setup.sh $file "echo '--- fragment $file'" + verbose " + $file" + done + append_fragment $BUILDDIR/conf/setup.sh "" "echo '--- end of setup script'" + + infon " Executing setup script ... " + execute_setup $BUILDDIR/conf/setup.sh 2>&1 | tee $BUILDDIR/conf/setup.log + [[ ${PIPESTATUS[0]} == 0 ]] && { + info "OK" + [[ $VERBOSE == 1 ]] && dump_log $BUILDDIR/conf/setup.log + rm $BUILDDIR/conf/setup.sh + } \ + || { + info "FAIL: please check $BUILDDIR/conf/setup.log" + dump_log $BUILDDIR/conf/setup.log + return 1 + } +} + +########################################################################################### + +# check for overwrite +[[ $FORCE -eq 1 ]] && rm -f \ + $BUILDDIR/conf/local.conf \ + $BUILDDIR/conf/bblayers.conf \ + $BUILDDIR/conf/setup.* \ + $BUILDDIR/conf/*.log + +####### step 1: generate configuration file ####### + +if [[ -f $BUILDDIR/conf/local.conf || -f $BUILDDIR/conf/bblayers.conf ]]; then + info "Configuration files already exist:" + for x in $BUILDDIR/conf/local.conf $BUILDDIR/conf/bblayers.conf; do + [[ -f $x ]] && info " - $x" + done + info "Skipping configuration files generation." + info "Use option -f|--force to overwrite existing configuration." +else + genconfig +fi + +####### step 2: generate aglsetup.manifest ####### + +infon "Generating setup manifest: $BUILDDIR/$SETUP_MANIFEST ... " +for x in /etc/os-release /usr/lib/os-release; do + [[ -f $x ]] && . $x +done +FEATURES_md5=$(echo $FEATURES|md5sum -|awk '{print $1;}') +cat <$BUILDDIR/$SETUP_MANIFEST +# ---------------------------------------------- +# This fragment has been generated by $SCRIPT at setup time + +# distro name +DIST_DISTRO_NAME="AGL" + +# target machine as passed to $SCRIPT +DIST_MACHINE="$MACHINE" + +# features as resolved by $SCRIPT +DIST_FEATURES="$FEATURES" +DIST_FEATURES_MD5="${FEATURES_md5}" + +# build host information deduced from os-release +DIST_BUILD_HOST="$(id -un)@$(hostname -f || hostname || hostname -s)" +DIST_BUILD_OS="${PRETTY_NAME:-${NAME} ${VERSION} [COMPUTED]}" + +# meta directory +DIST_METADIR="$METADIR" + +# timestamp +DIST_SETUP_TS="$(date -u +%Y%m%d_%H%M%S_%Z)" + +# topic +DIST_SETUP_TOPIC="$TOPIC" + +# ------------ end of $SCRIPT fragment -------- +EOF +info "OK" + +####### step 3: generate agl-init-build-env ####### + +# always generate setup script in builddir: it can be sourced later manually without re-running the setup +infon "Generating setup file: $BUILDDIR/agl-init-build-env ... " + +cat <$BUILDDIR/agl-init-build-env +. $METADIR/external/poky/oe-init-build-env $BUILDDIR +if [ -n "\$DL_DIR" ]; then + BB_ENV_EXTRAWHITE="\$BB_ENV_EXTRAWHITE DL_DIR" +fi +if [ -n "\$SSTATE_DIR" ]; then + BB_ENV_EXTRAWHITE="\$BB_ENV_EXTRAWHITE SSTATE_DIR" +fi +export BB_ENV_EXTRAWHITE +unset TEMPLATECONF +EOF +info "OK" + +####### step 4: generate output script ####### + +# finally, generate output script if requested by caller +if [[ -n "$SETUPSCRIPT" ]]; then + debug "generating setupscript in $SETUPSCRIPT" + cat <$SETUPSCRIPT +. $BUILDDIR/agl-init-build-env +EOF +fi + +info "------------ $SCRIPT: Done" diff --git a/meta-agl/scripts/README-mkefi-agl.md b/meta-agl/scripts/README-mkefi-agl.md new file mode 100644 index 00000000..2262fb12 --- /dev/null +++ b/meta-agl/scripts/README-mkefi-agl.md @@ -0,0 +1,18 @@ +# Introduction + +This script will install the AGL distribution on a removable device to boot on Intel UEFI-based computer. + +In particular it can create a USB or SD bootable support for [MinnowBoard](www.minnowboard.org). + +Usage: mkefi-agl.sh [-v] IDSK_IMAGE REMOVABLE_DEVICE + -v: Verbose debug + HDDIMG: The DISK_IMAGE file generated by Yocto the efi disk from + Supported formats are .hddimg, .wic .wic.xz + REMOVABLE_DEVICE: The block device to write the image to, e.g. /dev/sdh +ex: + mkefi-agl.sh agl-demo-platform-intel-corei7-64.hddimg /dev/sdd + mkefi-agl.sh agl-demo-platform-intel-corei7-64.wic.xz /dev/sdd + +## Documentation + +[Additional documentation](https://wiki.automotivelinux.org/agl-distro/developer_resources_intel) diff --git a/meta-agl/scripts/aglsetup.sh b/meta-agl/scripts/aglsetup.sh new file mode 100644 index 00000000..3bb6e0cd --- /dev/null +++ b/meta-agl/scripts/aglsetup.sh @@ -0,0 +1,60 @@ +################################################################################ +# +# The MIT License (MIT) +# +# Copyright (c) 2016 Stéphane Desneux +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +################################################################################ + +# detect if this script is sourced: see http://stackoverflow.com/a/38128348/6255594 +SOURCED=0 +if [ -n "$ZSH_EVAL_CONTEXT" ]; then + [[ $ZSH_EVAL_CONTEXT =~ :file$ ]] && { SOURCED=1; SOURCEDIR=$(cd $(dirname -- $0) && pwd -P); } +elif [ -n "$KSH_VERSION" ]; then + [[ "$(cd $(dirname -- $0) && pwd -P)/$(basename -- $0)" != "$(cd $(dirname -- ${.sh.file}) && pwd -P)/$(basename -- ${.sh.file})" ]] && { SOURCED=1; SOURCEDIR=$(cd $(dirname -- ${.sh.file}) && pwd -P); } +elif [ -n "$BASH_VERSION" ]; then + [[ $0 != "$BASH_SOURCE" ]] && { SOURCED=1; SOURCEDIR=$(cd $(dirname -- $BASH_SOURCE) && pwd -P); } +fi + +if [ $SOURCED -ne 1 ]; then + unset SOURCED + unset SOURCEDIR + echo "Error: this script needs to be sourced in a supported shell" >&2 + echo "Please check that the current shell is bash, zsh or ksh and run this script as '. $0 '" >&2 + exit 56 +else + unset SOURCED + tmpfile=$(mktemp /tmp/aglsetup.XXXXXXXX) + $SOURCEDIR/.aglsetup_genconfig.bash -s $tmpfile "$@" + rc=$? + unset SOURCEDIR + if [ $rc -eq 0 ]; then + source $tmpfile + rc=$? + else + echo "Error: configuration files generation failed. Environment is not ready." + fi + + rm -f $tmpfile + unset tmpfile + return $rc +fi + diff --git a/meta-agl/scripts/distro-manifest-generator.sh b/meta-agl/scripts/distro-manifest-generator.sh new file mode 100755 index 00000000..0db3e132 --- /dev/null +++ b/meta-agl/scripts/distro-manifest-generator.sh @@ -0,0 +1,310 @@ +#!/usr/bin/env bash + +################################################################################ +# +# The MIT License (MIT) +# +# Copyright (c) 2018 Stéphane Desneux +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +################################################################################ + +mode=deploy +manifest= +verbose=0 +format=bash +sourcefile= +timestamp="$(date -u +%Y%m%d_%H%M%S_%Z)" + +function info() { echo "$@" >&2; } +function error() { echo "$BASH_SOURCE: $@" >&2; } +function out() { echo -n "$@"; } +function out_object() { + # expected stdin stream is: + # -------------- + # key + # value + # key + # value + # ... + # -------------- + local sep="" + local k + case $format in + bash) + while read x; do + [[ -z "$k" ]] && { k="$x"; continue; } + out "$sep${k}=" + out_value "$x" + sep=$'\n' + k= + done + out "$sep" + ;; + json) + out "{" + while read x; do + [[ -z "$k" ]] && { k="$x"; continue; } + out "$sep\"${k}\":" + out_value "$x" + sep="," + k= + done + out "}" + ;; + esac +} + +function out_array() { + # expected stdin stream is: + # -------------- + # value + # value + # ... + # -------------- + local sep="" + case $format in + bash) + while read x; do + out "$sep" + out_value "$x" + sep=" " + done + ;; + json) + out "[" + while read x; do + out $sep + out_value "$x" + sep="," + done + out "]" + ;; + esac +} + +function out_value() { + # string + # number + # object + # array + # 'true' + # 'false' + # 'null' + + x=$1 + + # litterals + if [[ "$x" =~ ^(true|false|null)$ ]]; then + out "$x" + # number + elif [[ "$x" =~ ^[+-]?[0-9]+(\.[0-9]+)?$ ]]; then + out "$x" + # object + elif [[ "$x" =~ ^\{.*\}$ ]]; then + out "$x" + # array + elif [[ "$x" =~ ^\[.*\]$ ]]; then + out "$x" + # string + else + out "\"$(sed 's/\("\)/\\\1/g' <<<$x)\"" + fi +} + +function out_comment() { + case $format in + bash) + [[ "$verbose" == 1 ]] && echo "# $@" || true + ;; + json) + ;; + esac +} + +function _getgitmanifest() { + # this function takes the setup.manifest generated by setup script and uses DIST_METADIR + # to analyze git repos + + local manifest=$1 mode=$2 + [[ -f $manifest ]] && source $manifest || { error "Invalid setup manifest '$manifest'"; return 1; } + [[ ! -d "$DIST_METADIR" ]] && { + error "Invalid meta directory. Check variable DIST_METADIR in manifest file '$manifest'." + error "$BASH_SOURCE: Also, check directory '$DIST_METADIR'." + return 2 + } + local GIT=$(which git) REALPATH=$(which realpath) + [[ ! -x $GIT ]] && { error "$BASH_SOURCE: Unable to find git command in $PATH."; return 3; } + [[ ! -x $REALPATH ]] && { error "$BASH_SOURCE: Unable to find realpath command in $PATH."; return 4; } + + local gitrepo gitrev metagitdir sep="" + DIST_LAYERS="" + for metagitdir in $(find $DIST_METADIR -maxdepth 2 -type d \( -not -path '*/.*' \) -exec test -d "{}/.git" \; -print -prune); do + gitrepo=$($REALPATH -Ls $metagitdir --relative-to=$DIST_METADIR) + pushd $DIST_METADIR/$gitrepo &>/dev/null && { + gitrev=$( { $GIT describe --long --dirty --always 2>/dev/null || echo "unknown_revision"; } | tr ' \t' '__' ) + popd &>/dev/null + } || { + gitrev=unknown + } + DIST_LAYERS="${DIST_LAYERS}${sep}${gitrepo}:${gitrev}" + sep=" " + done + + # layers checksum + DIST_LAYERS_MD5=$(echo $DIST_LAYERS|md5sum -|awk '{print $1;}') + + # in json, transform layers in an object, features in array + [[ "$format" == "json" ]] && { + DIST_FEATURES=$(for x in $DIST_FEATURES; do + echo $x + done | out_array) + DIST_LAYERS=$(for x in $DIST_LAYERS; do + echo ${x%%:*} + echo ${x#*:} + done | out_object) + } + + + # compute build hash + DIST_BUILD_HASH="F${DIST_FEATURES_MD5:0:8}-L${DIST_LAYERS_MD5:0:8}" + DIST_BUILD_ID="${DIST_DISTRO_NAME}-${DIST_MACHINE}-F${DIST_FEATURES_MD5:0:8}-L${DIST_LAYERS_MD5:0:8}" + + + # compute setup manifest path and build TS + DIST_SETUP_MANIFEST="$($REALPATH $manifest)" + + # Manifest build timestamp + DIST_BUILD_TS="$timestamp" + + # build topic from setup topic + DIST_BUILD_TOPIC="${DIST_SETUP_TOPIC}" + + # what to retain from setup manifest? + # to generate the full list: cat setup.manifest | grep = | cut -f1 -d"=" | awk '{printf("%s ",$1);}' + declare -A SETUP_VARS + SETUP_VARS[deploy]="DIST_MACHINE DIST_FEATURES DIST_FEATURES_MD5 DIST_BUILD_HOST DIST_BUILD_OS DIST_SETUP_TS" + SETUP_VARS[target]="DIST_MACHINE DIST_FEATURES" + SETUP_VARS[sdk]="DIST_MACHINE DIST_FEATURES" + + # extra vars not coming from setup.manifest but generated here + declare -A EXTRA_VARS + EXTRA_VARS[deploy]="DIST_SETUP_MANIFEST DIST_BUILD_TS DIST_LAYERS DIST_LAYERS_MD5 DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TOPIC" + EXTRA_VARS[target]="DIST_LAYERS DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TS DIST_BUILD_TOPIC" + EXTRA_VARS[sdk]="DIST_LAYERS DIST_BUILD_HASH DIST_BUILD_ID DIST_BUILD_TS DIST_BUILD_TOPIC" + + # BITBAKE_VARS may be defined from external file to source (--source arg) + # this is used to dump extra vars from inside bitbake recipe + + { for x in ${SETUP_VARS[$mode]} ${EXTRA_VARS[$mode]} ${BITBAKE_VARS[$mode]}; do + k=$x + [[ "$format" == "json" ]] && { + k=${k#DIST_} # remove prefix + k=${k,,*} # to lower case + } + echo $k + echo ${!x} + done } | out_object +} + +function getmanifest() { + local rc=0 + out_comment "DISTRO BUILD MANIFEST" + out_comment + + # add layers manifest + out_comment "----- this fragment has been generated by $BASH_SOURCE" + _getgitmanifest $1 $2 || rc=$? + out_comment "------------ end of $BASH_SOURCE fragment --------" + + return $rc +} + +function __usage() { + cat <&2 +Usage: $BASH_SOURCE [-v|--verbose] [-f|--format ] [-t|--timestamp ] [-m|--mode ] [-s|--source ] + Options: + -v|--verbose: generate comments in the output file + -s|--source: extra file to source (get extra variables generated from bitbake recipe) + -t|--timestamp: set build timestamp (default: current date - may not be the same ts as bitbake) + -f|--format: specify output format: 'bash' or 'json' + -m|--mode: specify the destination for the generated manifest + 'deploy' : for the tmp/deploy/images/* directories + 'target' : for the manifest to be installed inside a target image + 'sdk' : for the manifest to be installed inside the SDK + + is the input manifest generated from setup script +EOF +} + +set -e + +tmp=$(getopt -o h,v,m:,f:,t:,s: --long help,verbose,mode:,format:,timestamp:,source: -n "$BASH_SOURCE" -- "$@") || { + error "Invalid arguments." + __usage + exit 1 +} +eval set -- $tmp + +while true; do + case "$1" in + -h|--help) __usage; exit 0;; + -v|--verbose) verbose=1; shift ;; + -f|--format) format=$2; shift 2;; + -m|--mode) mode=$2; shift 2;; + -t|--timestamp) timestamp=$2; shift 2;; + -s|--source) sourcefile=$2; shift 2;; + --) shift; break;; + *) fatal "Internal error";; + esac +done + +manifest=$1 +shift +[[ ! -f "$manifest" ]] && { __usage; exit 1; } + +case $mode in + deploy|target|sdk) ;; + *) error "Invalid mode specified. Allowed modes are: 'deploy', 'target', 'sdk'"; __usage; exit 42;; +esac + +case $format in + bash|json) ;; + *) error "Invalid format specified. Allowed formats are 'json' or 'bash'"; __usage; exit 43;; +esac + +info "Generating manifest: mode=$mode format=$format manifest=$manifest" +[[ -f "$sourcefile" ]] && { + info "Sourcing file $sourcefile" + . $sourcefile + # this may define extra vars: to be taken into account BITBAKE_VARS must be defined +} + +[[ "$format" == "json" ]] && { + # if jq is present, use it to format json output + jq=$(which jq || true) + [[ -n "$jq" ]] && { + getmanifest $manifest $mode | $jq "" + exit ${PIPESTATUS[0]} + } +} + +getmanifest $manifest $mode + diff --git a/meta-agl/scripts/envsetup.sh b/meta-agl/scripts/envsetup.sh new file mode 100644 index 00000000..27b1de19 --- /dev/null +++ b/meta-agl/scripts/envsetup.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +################################################################################ +# +# The MIT License (MIT) +# +# Copyright (c) 2016 Stéphane Desneux +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +################################################################################ + +################################################################################# +# IMPORTANT NOTICE +# +# This script is a compatiblity script with previous (AGL 1.0) envsetup script +# It has been replaced by another script named "aglsetup.sh". +# +################################################################################ + +# detect if this script is sourced: see http://stackoverflow.com/a/38128348/6255594 +SOURCED=0 +if [ -n "$ZSH_EVAL_CONTEXT" ]; then + [[ $ZSH_EVAL_CONTEXT =~ :file$ ]] && { SOURCED=1; SOURCEDIR=$(cd $(dirname -- $0) && pwd -P); } +elif [ -n "$KSH_VERSION" ]; then + [[ "$(cd $(dirname -- $0) && pwd -P)/$(basename -- $0)" != "$(cd $(dirname -- ${.sh.file}) && pwd -P)/$(basename -- ${.sh.file})" ]] && { SOURCED=1; SOURCEDIR=$(cd $(dirname -- ${.sh.file}) && pwd -P); } +elif [ -n "$BASH_VERSION" ]; then + [[ $0 != "$BASH_SOURCE" ]] && { SOURCED=1; SOURCEDIR=$(cd $(dirname -- $BASH_SOURCE) && pwd -P); } +fi + +if [ $SOURCED -ne 1 ]; then + unset SOURCED + unset SOURCEDIR + echo "Error: this script needs to be sourced in a supported shell" >&2 + echo "Please check that the current shell is bash, zsh or ksh and run this script as '. $0 '" >&2 + return 1 +else + unset SOURCED + if [ -z $1 ]; then + echo -e "Usage: source envsetup.sh [build dir]" + return 1 + fi + if [ -n "$2" ]; then + BUILD_DIR="$2" + else + BUILD_DIR=build + fi + # echo "DEPRECATED..." | figlet -f big -w 80 -c + cat <<'EOF' >&2 + ------------------------------------------------------------------------------ +| using this script is... | +| _____ ______ _____ _____ ______ _____ _______ ______ _____ | +| | __ \| ____| __ \| __ \| ____/ ____| /\|__ __| ____| __ \ | +| | | | | |__ | |__) | |__) | |__ | | / \ | | | |__ | | | | | +| | | | | __| | ___/| _ /| __|| | / /\ \ | | | __| | | | | | +| | |__| | |____| | | | \ \| |___| |____ / ____ \| | | |____| |__| | _ _ | +| |_____/|______|_| |_| \_\______\_____/_/ \_\_| |______|_____(_|_|_) | +| | +| To support the newest/upcoming features, please use the script aglsetup.sh. | + ------------------------------------------------------------------------------ +EOF + . $SOURCEDIR/aglsetup.sh -m $1 -b $BUILD_DIR agl-devel agl-netboot agl-appfw-smack agl-demo + rc=$? + unset SOURCEDIR + unset BUILD_DIR + return $rc +fi diff --git a/meta-agl/scripts/ias_image_app b/meta-agl/scripts/ias_image_app new file mode 100755 index 00000000..6a9b55f3 --- /dev/null +++ b/meta-agl/scripts/ias_image_app @@ -0,0 +1,191 @@ +#!/usr/bin/env python +# +# Copyright (c) 2012, Intel Corporation. +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# The CRC is a python translation of c code generated by (available under MIT license) +# pycrc 0.7.1 (http://www.tty1.net/pycrc/). Command line used: +# './pycrc.py --model=crc-32c --generate c --algorithm=table-driven' +# + +import argparse +import os +import struct +import errno + +__version__ = "0.0.1a" + +#======================================================================== +# IAS image creation +#======================================================================== + +MAGIC = 0x2E6B7069 +HEADER = struct.Struct('IIIIIII') + +def image (payload, ext_hdr=''): + + payload_len = round_up(len(payload)) + image_len = HEADER.size + len(ext_hdr) + payload_len + 4 + bytes = bytearray (image_len) + + type = 0x30000 + version = 0 + length = payload_len + offset = HEADER.size + len(ext_hdr) + uncomp = length ## compression not supported (yet) + hcrc = 0 + HEADER.pack_into (bytes, 0, + MAGIC, type, version, length, offset, uncomp, hcrc) + crc = crc32c_buf (bytes[0:24]) + struct.pack_into ('I', bytes, 24, crc) + + bytes[HEADER.size:offset] = ext_hdr + bytes[offset:offset+len(payload)] = payload + crc = crc32c_buf(bytes[HEADER.size:offset+length]) + struct.pack_into ('I', bytes, offset+length, crc) + + return bytes + +def multi_image (files): + + nfile = len(files) + + subimg = [] + o = 0 + for f in files: + l = len(f) + subimg.append((o, l)) + o += round_up(l) + + sizes = bytearray(4*nfile) + payload = bytearray(o) + for i in range(nfile): + o, l = subimg[i] + struct.pack_into ('I', sizes, 4*i, l) + payload[o:o+l] = files[i] + + return image (payload, sizes) + +# ======================================================================== +# Support functions. +# ======================================================================== + +def round_up (value, div=4): + """Round VALUE up to the next multiple of DIV (a power of two).""" + return (value + div - 1) & ~(div - 1) + +# ======================================================================== +# +# CRC32C +# +# Prehashed table of value to speed script execution +# +_CRC32C_TABLE = ( + + 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, + 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, + 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, + 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, + 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, + 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, + 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, + 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, + 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, + 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, + 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, + 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, + 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, + 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, + 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, + 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, + 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, + 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, + 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, + 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, + 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, + 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, + 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, + 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, + 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, + 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, + 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, + 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, + 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, + 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, + 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, + 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 +) + +def crc32c (byte, crc=0xffffffff): + + crc = (crc >> 8) ^ _CRC32C_TABLE[(crc ^ byte) & 0xff] + return crc + +def crc32c_buf (buf, crc=0xffffffff): + + for b in buf: + crc = crc32c (b, crc) + return crc + +# ======================================================================== + +#======================================================================== +# Main program: Argument handling. +#======================================================================== + +def parse_args(): + """Parse the command line and return an argparse.Namespace object.""" + + parser = argparse.ArgumentParser(description='Create a NON SIGNED IAS image to be used with DEVEL-ABL.') + + parser.add_argument ('-V', '--version', + action='version', version='%(prog)s ' + __version__) + parser.add_argument ('-o', '--output', + default='image.bin', + help='write final image to OUTPUT') + parser.add_argument ('-i', '--ignore', + default='', + help='provided for script compatibility with full featured ias_image_app',) + + parser.add_argument ('file', + help='add FILE to payload of IMAGE being created', + nargs='+', + metavar='file') + + return parser.parse_args() + +# ------------------------------------------------------------------------ + +def main(): + + a = parse_args() + try: + data = [open(f, 'rb').read() for f in a.file] + except IOError: + print ('error: Cannot open', a.file) + exit (1) + print ('Creating NON signed Linux Kernel for ABL') + img = multi_image(data) + try: + open (a.output, 'wb').write (img) + except IOError as err: + print ('error: Cannot open for write', a.output) + exit (2) + +if __name__ == '__main__': + main() + +# ======================================================================== diff --git a/meta-agl/scripts/mkabl-agl.sh b/meta-agl/scripts/mkabl-agl.sh new file mode 100755 index 00000000..611c08fb --- /dev/null +++ b/meta-agl/scripts/mkabl-agl.sh @@ -0,0 +1,507 @@ +#!/bin/sh +# +# Copyright (c) 2012, Intel Corporation. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +# the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Modification from mkefidisk.sh provided by the Yocto project by Dominig +# to install Automotive Grade Linux (AGL) on +# Intel platforms equipped with the Automotive Linux Boot (ABL) +# +# Dependencies: +# Relies on the Intel iasImage tool to pakage the Kernel and the initrd in ABL format +# +# changes +# - simpler use model +# - keep initrd if present +# - does not allocate swap +# - accept .hddimg, wic and wic.xz as sources +# + +LANG=C + +# Set to 1 to enable additional output +DEBUG=0 +exec 3>/dev/null + +# +# Defaults +# +# 100 Mb for the boot partition +BOOT_SIZE=100 +# min available space on TMP_DIR for uncompressing xz image in kB e.g. 5G (5000000) +TMP_SIZE_MIN=5000000 +# TMP_DIR directory use for holding image file for uncompression (e.g. /tmp or $HOME) +TMP_DIR=/tmp +# +MRB_DEBUG_TTY="ttyS2,115200n8" +MRB_HDMI="HDMI-A-1:e" +# +IAS_PATH="" +IAS_EXE="ias_image_app" +IAS_CMD_LINE=/tmp/iasCommandLine.cmd + +# Cleanup after die() +cleanup() { + debug "Syncing and unmounting devices" + # Unmount anything we mounted + unmount $ROOTFS_MNT || error "Failed to unmount $ROOTFS_MNT" + unmount $BOOTFS_MNT || error "Failed to unmount $BOOTFS_MNT" + unmount $HDDIMG_ROOTFS_MNT || error "Failed to unmount $HDDIMG_ROOTFS_MNT" + unmount $HDDIMG_MNT || error "Failed to unmount $HDDIMG_MNT" + if [ "$IMG_TYPE" = "DISK" ]; then + debug "de-attaching loop devices" + for LOOP_DEVICE in `losetup --list |grep $HDDIMG | cut -d" " -f1` ; do + losetup -d $LOOP_DEVICE 1>&3 2>&1 || error "Detaching $LOOP_DEVICE from $HDDIMG failled" + done + fi + # Remove the TMPDIR + debug "Removing temporary files" + if [ -d "$TMPDIR" ]; then + rm -rf $TMPDIR || error "Failed to remove $TMPDIR" + fi + [ -f "$TMP_DIR/TMP-AGL-wic-image.wic" ] || rm -f $TMP_DIR/TMP-AGL-wic-image.wic +} + +trap 'die "Signal Received, Aborting..."' HUP INT TERM + +# Logging routines +WARNINGS=0 +ERRORS=0 +CLEAR="$(tput sgr0)" +INFO="$(tput bold)" +RED="$(tput setaf 1)$(tput bold)" +GREEN="$(tput setaf 2)$(tput bold)" +YELLOW="$(tput setaf 3)$(tput bold)" +info() { + echo "${INFO}$1${CLEAR}" +} +error() { + ERRORS=$((ERRORS+1)) + echo "${RED}$1${CLEAR}" +} +warn() { + WARNINGS=$((WARNINGS+1)) + echo "${YELLOW}$1${CLEAR}" +} +success() { + echo "${GREEN}$1${CLEAR}" +} +die() { + error "$1" + cleanup + exit 1 +} +debug() { + if [ $DEBUG -eq 1 ]; then + echo "$1" + fi +} + +usage() { + echo "Install AGL on a removable device to boot ABL based computer" + echo "ABL on the target must accept non signed development Linux kernel" + echo "In particular is can create USB or SD bootable support for Intel MRB" + echo "" + echo "Usage: $(basename $0) [-v] [-p path_to_iasImage_tool] HDDIMG REMOVABLE_DEVICE" + echo " -v: Verbose debug" + echo " path_to_iasImage_tool: path the iasImage tool provided by Intel." + echo " HDDIMG: The hddimg file to generate the efi disk from" + echo " Supported formats are .hddimg, .wic .wic.xz" + echo " REMOVABLE_DEVICE: The block device to write the image to, e.g. /dev/sdh" + echo "ex:" + echo " mkabl-agl.sh agl-demo-platform-intel-corei7-64.wic.xz /dev/sdd" + echo " mkabl-agl.sh agl-demo-platform-intel-corei7-64.hddimg /dev/sdd" + + echo " assuming that iasImage is accessible via your default path" + exit 1 +} + +image_details() { + IMG=$1 + info "Image details" + echo " image: $(stat --printf '%N\n' $IMG)" + echo " size: $(stat -L --printf '%s bytes\n' $IMG)" + echo " modified: $(stat -L --printf '%y\n' $IMG)" + echo " type: $(file -L -b $IMG)" + echo "" +} + +device_details() { + DEV=$1 + BLOCK_SIZE=512 + + info "Device details" + echo " device: $DEVICE" + if [ -f "/sys/class/block/$DEV/device/vendor" ]; then + echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)" + else + echo " vendor: UNKOWN" + fi + if [ -f "/sys/class/block/$DEV/device/model" ]; then + echo " model: $(cat /sys/class/block/$DEV/device/model)" + else + echo " model: UNKNOWN" + fi + if [ -f "/sys/class/block/$DEV/size" ]; then + echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes" + else + echo " size: UNKNOWN" + fi + echo "" +} + +unmount_device() { + grep -q $DEVICE /proc/mounts + if [ $? -eq 0 ]; then + warn "$DEVICE listed in /proc/mounts, attempting to unmount" + umount $DEVICE* 2>/dev/null + ! grep -q $DEVICE /proc/mounts && info "Unmounted successfully" + return $? + fi + return 0 +} + +unmount() { + if [ "$1" = "" ] ; then + return 0 + fi + grep -q $1 /proc/mounts + if [ $? -eq 0 ]; then + debug "Unmounting $1" + umount $1 + ! grep -q $1 /proc/mounts # check if unmounted successfully + return $? + fi + return 0 +} + +# +# Parse and validate arguments +# + +if [ "$1" = "-v" ] ; then + DEBUG=1 + exec 3>&1 + shift +fi + +if [ "$1" = "-p" ] ; then + IAS_PATH="$2""/" + shift 2 +fi + +if [ $# -ne 2 ]; then + usage +fi + +IAS_IMAGE_TOOL="$IAS_PATH$IAS_EXE" +debug "iasImage tool is: $IAS_IMAGE_TOOL" +which $IAS_IMAGE_TOOL > IAS_IMAGE_TOOL_PATH +if [ ! -x "$(command -v $IAS_IMAGE_TOOL)" ]; then + die "$IAS_IMAGE_TOOL not found pointed by the path via 'sudo; use -p option'" +fi + +HDDIMG=$1 +DEVICE=$2 + +LINK=$(readlink $DEVICE) +if [ $? -eq 0 ]; then + DEVICE="$LINK" +fi + +if [ ! -w "$DEVICE" ]; then + if [ ! -e "${DEVICE}" ] ; then + die "Device $DEVICE cannot be found" + else + die "Device $DEVICE is not writable (need to run under sudo?)" + fi +fi + +if [ ! -e "$HDDIMG" ]; then + die "HDDIMG $HDDIMG does not exist" +fi +HDDIMG_EXT=${HDDIMG##*.} +case $HDDIMG_EXT in + hddimg) + IMG_TYPE="MOUNT" + IMG_COMPRESS="NO" + debug "Detected: uncompressed image type .hddimg" + ;; + wic) + IMG_TYPE="DISK" + IMG_COMPRESS="NO" + debug "Detected: uncompressed image type .wic" + ;; + xz) + IMG_TYPE="DISK" + IMG_COMPRESS="YES" + debug "Detected: xz compressed image type .wic" + command -v xz >/dev/null 2>&1 || { die "xz command is not available, pleaes install xz package"; } + TMP_SIZE=`df -k $TMP_DIR | awk '/[0-9]%/{print $(NF-2)}'` + if [ "$TMP_SIZE" -lt "$TMP_SIZE_MIN" ]; then + die "Available space on $TMP_DIR must be at least $TMP_SIZE_MIN kB" + fi + printf "Starting decompression of the image. It may take some time ..." + xz --decompress --keep --format=auto --force --threads=0 --stdout > $TMP_DIR/TMP-AGL-wic-image.wic $HDDIMG|| \ + die "xz command failled: xz --decompress --keep --format=auto --force --threads=0 --stdout > $TMP_DIR/TMP-AGL-wic-image.wic" + HDDIMG="$TMP_DIR/TMP-AGL-wic-image.wic" + echo "Image uncompressed, starting doing real work ..." + ;; + *) + die "Unsupported image format: $HDDIMG_EXT Supported format are .hddimg .wic wic.xz" + ;; +esac +# +# Ensure the hddimg is not mounted +# +debug "will now try to umount /detach previous images" +case $IMG_TYPE in + MOUNT) + unmount "$HDDIMG" || die "Failed to unmount $HDDIMG" + ;; + DISK) + [ `losetup --list |grep $HDDIMG | wc -l ` -gt 1 ] && die "Image mounted more than once, manual cleaning required see: losetup --list" + debug "ready to attach the wic image to aloop device" + LOOP_DEVICE=`losetup --find --show $HDDIMG` && ( losetup -d $LOOP_DEVICE 1>&3 2>&1 || die "Detaching $LOOP_DEVICE from $HDDIMG failled") + ;; + *) + die "unknown image format $IMG_TYPE" + ;; +esac +# +# Check if any $DEVICE partitions are mounted +# +unmount_device || die "Failed to unmount $DEVICE" + +# +# Confirm device with user +# +image_details $HDDIMG +device_details $(basename $DEVICE) +echo -n "${INFO}Prepare ABL image on $DEVICE [y/N]?${CLEAR} " +read RESPONSE +if [ "$RESPONSE" != "y" ]; then + echo "Image creation aborted" + exit 0 +fi + + +# +# Prepare the temporary working space +# +TMPDIR=$(mktemp -d mkabldisk-XXX) || die "Failed to create temporary mounting directory." +HDDIMG_MNT=$TMPDIR/hddimg +debug "TEMPDIR is: $TMPDIR" +HDDIMG_ROOTFS_MNT=$TMPDIR/hddimg_rootfs +ROOTFS_MNT=$TMPDIR/rootfs +BOOTFS_MNT=$TMPDIR/bootfs +mkdir $HDDIMG_MNT || die "Failed to create $HDDIMG_MNT" +mkdir $HDDIMG_ROOTFS_MNT || die "Failed to create $HDDIMG_ROOTFS_MNT" +mkdir $ROOTFS_MNT || die "Failed to create $ROOTFS_MNT" +mkdir $BOOTFS_MNT || die "Failed to create $BOOTFS_MNT" + + +# +# Partition $DEVICE +# +DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") +# If the device size is not reported there may not be a valid label +if [ "$DEVICE_SIZE" = "" ] ; then + parted -s $DEVICE mklabel msdos || die "Failed to create MSDOS partition table" + DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") +fi +ROOTFS_SIZE=$((DEVICE_SIZE-BOOT_SIZE)) +ROOTFS_START=$((BOOT_SIZE)) +ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE)) + +# MMC devices use a partition prefix character 'p' +PART_PREFIX="" +if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ] || [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then + PART_PREFIX="p" +fi +BOOTFS=$DEVICE${PART_PREFIX}1 +ROOTFS=$DEVICE${PART_PREFIX}2 + +TARGET_PART_PREFIX="" +if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ]; then + TARGET_PART_PREFIX="p" +fi +TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2 + +echo "" +info "Boot partition size: $BOOT_SIZE MB ($BOOTFS)" +info "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)" +echo "" + +# Use MSDOS by default as GPT cannot be reliably distributed in disk image form +# as it requires the backup table to be on the last block of the device, which +# of course varies from device to device. + +info "Partitioning installation media ($DEVICE)" + +debug "Deleting partition table on $DEVICE" +dd if=/dev/zero of=$DEVICE bs=512 count=2 1>&3 2>&1 || die "Failed to zero beginning of $DEVICE" + +debug "Creating new partition table (MSDOS) on $DEVICE" +parted -s $DEVICE mklabel msdos 1>&3 2>&1 || die "Failed to create MSDOS partition table" + +debug "Creating boot partition on $BOOTFS" +parted -s $DEVICE mkpart primary 0% $BOOT_SIZE 1>&3 2>&1 || die "Failed to create BOOT partition" + +debug "Enabling boot flag on $BOOTFS" +parted -s $DEVICE set 1 boot on 1>&3 2>&1 || die "Failed to enable boot flag" + +debug "Creating ROOTFS partition on $ROOTFS" +parted -s $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END 1>&3 2>&1 || die "Failed to create ROOTFS partition" + +# as blkid does not provide PARTUUID on Ubuntu LTS 14.04 we myst hack via fdisk +#ROOTFS_PARTUUID=$(blkid |grep -e "$ROOTFS" |sed -n 's/^.*PARTUUID=/PARTUUID=/p') +export LC_ALL=C +ROOTFS_DISKID=$(fdisk -l "$DEVICE" | grep -e "Disk identifier" | sed -n 's/^.*Disk identifier: 0x/PARTUUID=/p') +if [ $ROOTFS_DISKID = "" ]; then + die "Failed to read DISKID" +fi +BOOTFS_PARTUUID="$ROOTFS_DISKID-01" +ROOTFS_PARTUUID="$ROOTFS_DISKID-02" +debug "PARTUUID for ROOTFS is $ROOTFS_PARTUUID" + +if [ $DEBUG -eq 1 ]; then + parted -s $DEVICE print +fi + + +# +# Check if any $DEVICE partitions are mounted after partitioning +# +unmount_device || die "Failed to unmount $DEVICE partitions" + + +# +# Format $DEVICE partitions +# +info "Formatting partitions" +debug "Formatting $BOOTFS as ext2" +mkfs.ext2 -F -F -L BOOT $BOOTFS 1>&3 2>&1 || die "Failed to format $BOOTFS" + +debug "Formatting $ROOTFS as ext4" +mkfs.ext4 -F $ROOTFS -L "ROOT" 1>&3 2>&1 || die "Failed to format $ROOTFS" + + +# Mounting image file system on loop devices +# +case $IMG_TYPE in + + MOUNT) + debug "Mounting images and device in preparation for installation" + mount -o loop $HDDIMG $HDDIMG_MNT 1>&3 2>&1 || die "Failed to mount $HDDIMG" + mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount rootfs.img" + ;; + DISK) + debug "Attaching image and mounting partitions then device in preparation for installation" + LOOP_DEVICE=`losetup --find` || die "Failled to find an available loop device see: losetup --find" + losetup -P $LOOP_DEVICE $HDDIMG 1>&3 2>&1 || die "Attaching $LOOP_DEVICE from $HDDIMG failled" + mount "$LOOP_DEVICE"p2 $HDDIMG_ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount $LOOP_DEVICEp1 on $HDDIMG_ROOTFS_MNT" + mount "$LOOP_DEVICE"p1 $HDDIMG_MNT 1>&3 2>&1 || die "Failed to mount $LOOP_DEVICEp2 on $HDDIMG_MNT" + ;; + *) + die "unknown image format $IMG_TYPE" + ;; +esac + +mount $ROOTFS $ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount $ROOTFS on $ROOTFS_MNT" +mount $BOOTFS $BOOTFS_MNT 1>&3 2>&1 || die "Failed to mount $BOOTFS on $BOOTFS_MNT" + +info "Preparing boot partition" +# create the config file for iasImage +# Remove any existing root= kernel parameters and: +# o Add a root= parameter with the target rootfs +# o Specify ro so fsck can be run during boot +# o Specify rootwait in case the target media is an asyncronous block device +# such as MMC or USB disks +# o Specify "quiet" to minimize boot time when using slow serial consoles + +# iasImage command line file creation +echo "root=$ROOTFS_PARTUUID" > $IAS_CMD_LINE +echo "console=$MRB_DEBUG_TTY" >> $IAS_CMD_LINE +echo "earlycon=uart8250,mmio32,0xfc000000,115200n8" >> $IAS_CMD_LINE +echo "rootwait" >> $IAS_CMD_LINE +echo "video=$MRB_HDMI" >> $IAS_CMD_LINE +echo "i915.enable_initial_modeset=1" >> $IAS_CMD_LINE +debug "temp config for iasImage is $IAS_CMD_LINE" + +if [ -f $HDDIMG_MNT/vmlinuz ]; then + KERNEL_TYPE="vmlinuz" + debug "kernel is vmlinuz" +fi +if [ -f $HDDIMG_MNT/bzimage ]; then + KERNEL_TYPE="bzimage" + debug "kernel is bzimage -> vmlinuz" +fi +if [ -f $HDDIMG_MNT/microcode.cpio ]; then + warn "initrd=microcode.cpio is not a supported configuration, microcode.cpio has been ignored" +fi +[ -z $KERNEL_TYPE ] && die "Linux kernel type in $HDDIMG is unsupported" + +if [ -f $HDDIMG_MNT/initrd ]; + then + info "creating ABL image with initramsfs" + debug "$IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE $HDDIMG_MNT/initrd" + $IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE $HDDIMG_MNT/initrd + else + info "creating ABL image without initramfs" + debug "$IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE" + $IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE +fi + +printf "Copying ROOTFS files ... " +command -v rsync >/dev/null 2>&1 # check if rsync exists +if [ $DEBUG -eq 1 ] && [ $? -eq 0 ]; then + rsync --info=progress2 -h -aHAXW --no-compress $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed" +else + cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed" +fi + +debug "removing any swap entry in /etc/fstab" +sed --in-place '/swap/d' $ROOTFS_MNT/etc/fstab +debug "fixing PARTUUID for /boot" +sed --in-place -e "s#PARTUUID=[0-9a-z-]\+\t/boot#${BOOTFS_PARTUUID}\t/boot#" $ROOTFS_MNT/etc/fstab + +printf "flushing data on removable device. May take a while ... " +sync --file-system $ROOTFS_MNT +echo done + +# We dont want udev to mount our root device while we're booting... +if [ -d $ROOTFS_MNT/etc/udev/ ] ; then + echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist +fi + + +# Call cleanup to unmount devices and images and remove the TMPDIR +cleanup + +echo "" +if [ $WARNINGS -ne 0 ] && [ $ERRORS -eq 0 ]; then + echo "${YELLOW}Installation completed with warnings${CLEAR}" + echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" +elif [ $ERRORS -ne 0 ]; then + echo "${RED}Installation encountered errors${CLEAR}" + echo "${RED}Errors: $ERRORS${CLEAR}" + echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" +else + success "Installation completed successfully" +fi +echo "" diff --git a/meta-agl/scripts/mkefi-agl.sh b/meta-agl/scripts/mkefi-agl.sh new file mode 100755 index 00000000..c44ecedd --- /dev/null +++ b/meta-agl/scripts/mkefi-agl.sh @@ -0,0 +1,531 @@ +#!/bin/sh +# +# Copyright (c) 2012, Intel Corporation. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +# the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Modification from mkefidisk.sh provided by the Yocto project by Dominig +# to install Automotive Grade Linux (AGL) on Minnowboard and any PC with UEFI boot +# +# changes +# - simpler use model +# - keep initrd if present +# - create a grub config with PARTUID to ease boot from various devices automaticaly +# - add a UEFI startup.nsh script for autoboot +# - remove any configured swap is fstab +# - accept .hddimg, wic and wic.xz as sources + +LANG=C + +# Set to 1 to enable additional output +DEBUG=0 +exec 3>/dev/null + +# +# Defaults +# +# 100 Mb for the boot partition +BOOT_SIZE=100 +# min available space on TMP_DIR for uncompressing xz image in kB e.g. 5G (5000000) +TMP_SIZE_MIN=5000000 +# TMP_DIR directory use for holding image file for uncompression (e.g. /tmp or $HOME) +TMP_DIR=/tmp + +# Cleanup after die() +cleanup() { + debug "Syncing and unmounting devices" + # Unmount anything we mounted + unmount $ROOTFS_MNT || error "Failed to unmount $ROOTFS_MNT" + unmount $BOOTFS_MNT || error "Failed to unmount $BOOTFS_MNT" + unmount $HDDIMG_ROOTFS_MNT || error "Failed to unmount $HDDIMG_ROOTFS_MNT" + unmount $HDDIMG_MNT || error "Failed to unmount $HDDIMG_MNT" + if [ "$IMG_TYPE" = "DISK" ]; then + debug "de-attaching loop devices" + for LOOP_DEVICE in `losetup --list |grep $HDDIMG | cut -d" " -f1` ; do + losetup -d $LOOP_DEVICE 1>&3 2>&1 || error "Detaching $LOOP_DEVICE from $HDDIMG failled" + done + fi + + # Remove the TMPDIR + debug "Removing temporary files" + if [ -d "$TMPDIR" ]; then + rm -rf "$TMPDIR" || error "Failed to remove $TMPDIR" + fi + [ -f "$TMP_DIR/TMP-AGL-wic-image.wic" ] && rm -f $TMP_DIR/TMP-AGL-wic-image.wic +} + +trap 'die "Signal Received, Aborting..."' HUP INT TERM + +# Logging routines +WARNINGS=0 +ERRORS=0 +CLEAR="$(tput sgr0)" +INFO="$(tput bold)" +RED="$(tput setaf 1)$(tput bold)" +GREEN="$(tput setaf 2)$(tput bold)" +YELLOW="$(tput setaf 3)$(tput bold)" +info() { + echo "${INFO}$1${CLEAR}" +} +error() { + ERRORS=$((ERRORS+1)) + echo "${RED}$1${CLEAR}" +} +warn() { + WARNINGS=$((WARNINGS+1)) + echo "${YELLOW}$1${CLEAR}" +} +success() { + echo "${GREEN}$1${CLEAR}" +} +die() { + error "$1" + cleanup + exit 1 +} +debug() { + if [ $DEBUG -eq 1 ]; then + echo "$1" + fi +} + +usage() { + echo "Install AGL on a removable device to boot on IA UEFI based computer" + echo "In particular is can create USB or SD bootable support for Minnowboard" + echo "" + echo "Usage: $(basename $0) [-v] IDSK_IMAGE REMOVABLE_DEVICE" + echo " -v: Verbose debug" + echo " HDDIMG: The DISK_IMAGE file generated by Yocto the efi disk from" + echo " Supported formats are .hddimg, .wic .wic.xz" + echo " REMOVABLE_DEVICE: The block device to write the image to, e.g. /dev/sdh" + echo "ex:" + echo " mkefi-agl.sh agl-demo-platform-intel-corei7-64.hddimg /dev/sdd" + echo " mkefi-agl.sh agl-demo-platform-intel-corei7-64.wic.xz /dev/sdd" + exit 1 +} + +image_details() { + IMG=$1 + info "Image details" + echo " image: $(stat --printf '%N\n' $IMG)" + echo " size: $(stat -L --printf '%s bytes\n' $IMG)" + echo " modified: $(stat -L --printf '%y\n' $IMG)" + echo " type: $(file -L -b $IMG)" + echo "" +} + +device_details() { + DEV=$1 + BLOCK_SIZE=512 + + info "Device details" + echo " device: $DEVICE" + if [ -f "/sys/class/block/$DEV/device/vendor" ]; then + echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)" + else + echo " vendor: UNKOWN" + fi + if [ -f "/sys/class/block/$DEV/device/model" ]; then + echo " model: $(cat /sys/class/block/$DEV/device/model)" + else + echo " model: UNKNOWN" + fi + if [ -f "/sys/class/block/$DEV/size" ]; then + echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes" + else + echo " size: UNKNOWN" + fi + echo "" +} + +unmount_device() { + grep -q $DEVICE /proc/mounts + if [ $? -eq 0 ]; then + warn "$DEVICE listed in /proc/mounts, attempting to unmount" + umount $DEVICE* 2>/dev/null + ! grep -q $DEVICE /proc/mounts && info "Unmounted successfully" + return $? + fi + return 0 +} + +unmount() { + if [ "$1" = "" ] ; then + return 0 + fi + grep -q $1 /proc/mounts + if [ $? -eq 0 ]; then + debug "Unmounting $1" + umount $1 + ! grep -q $1 /proc/mounts # check if unmounted successfully + return $? + fi + return 0 +} + +# +# Parse and validate arguments +# +if [ "$1" != "-v" ] && [ $# -ne 2 ]; then + usage +fi +if [ "$1" = "-v" ] && [ $# -ne 3 ]; then + usage +fi + +if [ "$1" = "-v" ] ; then + DEBUG=1 + exec 3>&1 + shift +fi + +HDDIMG=$1 +DEVICE=$2 + +LINK=$(readlink $DEVICE) +if [ $? -eq 0 ]; then + DEVICE="$LINK" +fi + +if [ ! -w "$DEVICE" ]; then + if [ ! -e "${DEVICE}" ] ; then + die "Device $DEVICE cannot be found" + else + die "Device $DEVICE is not writable (need to run under sudo?)" + fi +fi + +if [ ! -e "$HDDIMG" ]; then + die "HDDIMG $HDDIMG does not exist" +fi +HDDIMG_EXT=${HDDIMG##*.} +case $HDDIMG_EXT in + hddimg) + IMG_TYPE="MOUNT" + IMG_COMPRESS="NO" + debug "Detected: uncompressed image type .hddimg" + ;; + wic) + IMG_TYPE="DISK" + IMG_COMPRESS="NO" + debug "Detected: uncompressed image type .wic" + ;; + xz) + IMG_TYPE="DISK" + IMG_COMPRESS="YES" + debug "Detected: xz compressed image type .wic" + command -v xz >/dev/null 2>&1 || { die "xz command is not available, pleaes install xz package"; } + TMP_SIZE=`df -k $TMP_DIR | awk '/[0-9]%/{print $(NF-2)}'` + if [ "$TMP_SIZE" -lt "$TMP_SIZE_MIN" ]; then + die "Available space on $TMP_DIR must be at least $TMP_SIZE_MIN kB" + fi + printf "Starting decompression of the image. It may take some time ..." + xz --decompress --keep --format=auto --force --threads=0 --stdout > $TMP_DIR/TMP-AGL-wic-image.wic $HDDIMG|| \ + die "xz command failled: xz --decompress --keep --format=auto --force --threads=0 --stdout > $TMP_DIR/TMP-AGL-wic-image.wic" + HDDIMG="$TMP_DIR/TMP-AGL-wic-image.wic" + echo "Image uncompressed, starting doing real work ..." + ;; + *) + die "Unsupported image format: $HDDIMG_EXT Supported format are .hddimg .wic wic.xz" + ;; +esac + +# +# Ensure the hddimg is not mounted +# +debug "will now try to umount /detach previous images" +case $IMG_TYPE in + MOUNT) + unmount "$HDDIMG" || die "Failed to unmount $HDDIMG" + ;; + DISK) + [ `losetup --list |grep $HDDIMG | wc -l ` -gt 1 ] && die "Image mounted more than once, manual cleaning required see: losetup --list" + debug "ready to attach the wic image to aloop device" + LOOP_DEVICE=`losetup --find --show $HDDIMG` && ( losetup -d $LOOP_DEVICE 1>&3 2>&1 || die "Detaching $LOOP_DEVICE from $HDDIMG failled") + ;; + *) + die "unknown image format $IMG_TYPE" + ;; +esac + +# +# Check if any $DEVICE partitions are mounted +# +unmount_device || die "Failed to unmount $DEVICE" + +# +# Confirm device with user +# +image_details $HDDIMG +device_details $(basename $DEVICE) +echo -n "${INFO}Prepare EFI image on $DEVICE [y/N]?${CLEAR} " +read RESPONSE +if [ "$RESPONSE" != "y" ]; then + die "Image creation aborted" +fi + + +# +# Prepare the temporary working space +# +TMPDIR=$(mktemp -d mkefidisk-XXX) || die "Failed to create temporary mounting directory." +HDDIMG_MNT=$TMPDIR/hddimg +HDDIMG_ROOTFS_MNT=$TMPDIR/hddimg_rootfs +ROOTFS_MNT=$TMPDIR/rootfs +BOOTFS_MNT=$TMPDIR/bootfs +mkdir $HDDIMG_MNT || die "Failed to create $HDDIMG_MNT" +mkdir $HDDIMG_ROOTFS_MNT || die "Failed to create $HDDIMG_ROOTFS_MNT" +mkdir $ROOTFS_MNT || die "Failed to create $ROOTFS_MNT" +mkdir $BOOTFS_MNT || die "Failed to create $BOOTFS_MNT" + + +# +# Partition $DEVICE +# +DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") +# If the device size is not reported there may not be a valid label +if [ "$DEVICE_SIZE" = "" ] ; then + parted -s $DEVICE mklabel msdos || die "Failed to create MSDOS partition table" + DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") +fi +ROOTFS_SIZE=$((DEVICE_SIZE-BOOT_SIZE)) +ROOTFS_START=$((BOOT_SIZE)) +ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE)) + +# MMC devices use a partition prefix character 'p' +PART_PREFIX="" +if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ] || [ ! "${DEVICE#/dev/nvme0n}" = "${DEVICE}" ] || [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then + PART_PREFIX="p" +fi +BOOTFS=$DEVICE${PART_PREFIX}1 +ROOTFS=$DEVICE${PART_PREFIX}2 + +TARGET_PART_PREFIX="" +if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ] || [ ! "${TARGET_DEVICE#/dev/nvme0n}" = "${TARGET_DEVICE}" ]; then + TARGET_PART_PREFIX="p" +fi +TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2 + +echo "" +info "Boot partition size: $BOOT_SIZE MB ($BOOTFS)" +info "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)" +echo "" + +# Use MSDOS by default as GPT cannot be reliably distributed in disk image form +# as it requires the backup table to be on the last block of the device, which +# of course varies from device to device. + +info "Partitioning installation media ($DEVICE)" + +debug "Deleting partition table on $DEVICE" +dd if=/dev/zero of=$DEVICE bs=512 count=2 1>&3 2>&1 || die "Failed to zero beginning of $DEVICE" + +debug "Creating new partition table (MSDOS) on $DEVICE" +parted -s $DEVICE mklabel msdos 1>&3 2>&1 || die "Failed to create MSDOS partition table" + +debug "Creating boot partition on $BOOTFS" +parted -s $DEVICE mkpart primary 0% $BOOT_SIZE 1>&3 2>&1 || die "Failed to create BOOT partition" + +debug "Enabling boot flag on $BOOTFS" +parted -s $DEVICE set 1 boot on 1>&3 2>&1 || die "Failed to enable boot flag" + +debug "Creating ROOTFS partition on $ROOTFS" +parted -s $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END 1>&3 2>&1 || die "Failed to create ROOTFS partition" + +# as blkid does not provide PARTUUID on Ubuntu LTS 14.04 we myst hack via fdisk +#ROOTFS_PARTUUID=$(blkid |grep -e "$ROOTFS" |sed -n 's/^.*PARTUUID=/PARTUUID=/p') +export LC_ALL=C +ROOTFS_DISKID=$(fdisk -l "$DEVICE" | grep -e "Disk identifier" | sed -n 's/^.*Disk identifier: 0x/PARTUUID=/p') +if [ $ROOTFS_DISKID = "" ]; then + die "Failed to read DISKID" +fi +BOOTFS_PARTUUID="$ROOTFS_DISKID-01" +ROOTFS_PARTUUID="$ROOTFS_DISKID-02" +debug "PARTUUID for ROOTFS is $ROOTFS_PARTUUID" + +if [ $DEBUG -eq 1 ]; then + parted -s $DEVICE print +fi + + +# +# Check if any $DEVICE partitions are mounted after partitioning +# +unmount_device || die "Failed to unmount $DEVICE partitions" + + +# +# Format $DEVICE partitions +# +info "Formatting partitions" +debug "Formatting $BOOTFS as vfat" +if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then + mkfs.vfat -I $BOOTFS -n "EFI" 1>&3 2>&1 || die "Failed to format $BOOTFS" +else + mkfs.vfat $BOOTFS -n "EFI" 1>&3 2>&1 || die "Failed to format $BOOTFS" +fi + +debug "Formatting $ROOTFS as ext4" +mkfs.ext4 -F $ROOTFS -L "ROOT" 1>&3 2>&1 || die "Failed to format $ROOTFS" + + +# +# Mounting image file system on loop devices +# +case $IMG_TYPE in + + MOUNT) + debug "Mounting images and device in preparation for installation" + mount -o loop $HDDIMG $HDDIMG_MNT 1>&3 2>&1 || die "Failed to mount $HDDIMG" + mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount rootfs.img" + ;; + DISK) + debug "Attaching image and mounting partitions then device in preparation for installation" + LOOP_DEVICE=`losetup --find` || die "Failled to find an available loop device see: losetup --find" + losetup -P $LOOP_DEVICE $HDDIMG 1>&3 2>&1 || die "Attaching $LOOP_DEVICE from $HDDIMG failled" + mount "$LOOP_DEVICE"p2 $HDDIMG_ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount $LOOP_DEVICEp1 on $HDDIMG_ROOTFS_MNT" + mount "$LOOP_DEVICE"p1 $HDDIMG_MNT 1>&3 2>&1 || die "Failed to mount $LOOP_DEVICEp2 on $HDDIMG_MNT" + ;; + *) + die "unknown image format $IMG_TYPE" + ;; +esac +# Mount removable device + mount $ROOTFS $ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount $ROOTFS on $ROOTFS_MNT" + mount $BOOTFS $BOOTFS_MNT 1>&3 2>&1 || die "Failed to mount $BOOTFS on $BOOTFS_MNT" + + +info "Preparing boot partition" +EFIDIR="$BOOTFS_MNT/EFI/BOOT" +if [ -f $HDDIMG_MNT/vmlinuz ]; then + cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT 1>&3 2>&1 || die "Failed to copy vmlinuz" + KERNEL_TYPE="VMLINUZ" + debug "kernel is vmlinuz" +fi +if [ -f $HDDIMG_MNT/bzimage ]; then + cp $HDDIMG_MNT/bzimage $BOOTFS_MNT 1>&3 2>&1 || die "Failed to copy bzimage" + KERNEL_TYPE="BZIMAGE" + debug "kernel is bzimage" +fi +if [ -f $HDDIMG_MNT/microcode.cpio ]; then + cp $HDDIMG_MNT/microcode.cpio $BOOTFS_MNT 1>&3 2>&1 || die "Failed to copy microcode.cpio" + debug "microcode.cpio copied" +fi +[ -z $KERNEL_TYPE ] && die "Linux kernel type in $HDDIMG is unsupported" + +if [ -f $HDDIMG_MNT/initrd ] + then + echo "initrd detected" + cp $HDDIMG_MNT/initrd $BOOTFS_MNT 1>&3 2>&1 || die "Failed to copy initrd" + else + warn "initrd missing" +fi +echo "bootx64.efi" > $BOOTFS_MNT/startup.nsh || die "Failed to create startup.nsh" +# Copy the efi loader and configs (booti*.efi and grub.cfg if it exists) +cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT 1>&3 2>&1 || die "Failed to copy EFI dir" +# Silently ignore a missing systemd-boot or gummiboot loader dir (we might just be a GRUB image) +cp -r $HDDIMG_MNT/loader $BOOTFS_MNT 1>&3 2>&1 + +# Update the boot loaders configurations for an installed image +# Remove any existing root= kernel parameters and: +# o Add a root= parameter with the target rootfs +# o Specify ro so fsck can be run during boot +# o Specify rootwait in case the target media is an asyncronous block device +# such as MMC or USB disks +# o Specify "quiet" to minimize boot time when using slow serial consoles + +# Look for a GRUB installation +GRUB_CFG="$EFIDIR/grub.cfg" +if [ -e "$GRUB_CFG" ]; then + info "Configuring GRUB" + # Delete the install entry + sed -i "/menuentry 'install'/,/^}/d" $GRUB_CFG + # Delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG + # detect config initrd=microcode.cpio + if grep -q microcode $GRUB_CFG; then + warn "initrd=microcode.cpio detected, might not work on all boot configurations" + fi + sed -i "s@ root=[^ ]*@ @" $GRUB_CFG + sed -i "s@vmlinuz @vmlinuz root=$ROOTFS_PARTUUID @" $GRUB_CFG +fi + +# look for a systemd-boot loader.conf file and create a default boot entry +SYSTEMDBOOT_CFG="$BOOTFS_MNT/loader/loader.conf" +if [ -e "$SYSTEMDBOOT_CFG" ]; then + info "Configuring SYSTEMD-BOOT" + SYSTEMDBOOT_BOOT="$BOOTFS_MNT/loader/entries/boot.conf" + SYSTEMDBOOT_DEBUG="$BOOTFS_MNT/loader/entries/debug.conf" + # Delete the install entry + sed -i "/menuentry 'install'/,/^}/d" $SYSTEMDBOOT_CFG + rm -rf "$BOOTFS_MNT/loader/entries/install.conf" 1>&3 2>&1 + # Add PARTUUID to the boot entry file + if [ ! -e "$SYSTEMDBOOT_BOOT" ]; then + die "no boot.conf entry found in systemd-boot directories" + fi + # Delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $SYSTEMDBOOT_BOOT + # detect config initrd=microcode.cpio + if grep -q microcode $SYSTEMDBOOT_BOOT; then + warn "initrd=microcode.cpio detected, might not work on all boot configurations" + fi + sed -i "s@ root=[^ ]*@ @" $SYSTEMDBOOT_BOOT + sed -i "s@options @options root=$ROOTFS_PARTUUID @" $SYSTEMDBOOT_BOOT +fi + + +# Ensure we have at least one EFI bootloader configured +if [ ! -e $GRUB_CFG ] && [ ! -e $SYSTEMDBOOT_CFG ] ; then + die "No EFI bootloader configuration found" +fi + +printf "Copying ROOTFS files ... " +command -v rsync >/dev/null 2>&1 # check if rsync exists +if [ $DEBUG -eq 1 ] && [ $? -eq 0 ]; then + rsync --info=progress2 -h -aHAXW --no-compress $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed" +else + cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed" +fi +debug "removing any swap entry in /etc/fstab" +sed --in-place '/swap/d' $ROOTFS_MNT/etc/fstab +debug "fixing PARTUUID for /boot" +sed --in-place -e "s#PARTUUID=[0-9a-z-]\+\t/boot#${BOOTFS_PARTUUID}\t/boot#" $ROOTFS_MNT/etc/fstab + +printf "flushing data on removable device. May take a while ... " +sync --file-system $ROOTFS_MNT +echo done + +# We dont want udev to mount our root device while we're booting... +if [ -d $ROOTFS_MNT/etc/udev/ ] ; then + echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist +fi + + +# Call cleanup to unmount devices and images and remove the TMPDIR +cleanup + +echo "" +if [ $WARNINGS -ne 0 ] && [ $ERRORS -eq 0 ]; then + echo "${YELLOW}Installation completed with warnings${CLEAR}" + echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" +elif [ $ERRORS -ne 0 ]; then + echo "${RED}Installation encountered errors${CLEAR}" + echo "${RED}Errors: $ERRORS${CLEAR}" + echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" +else + success "Installation completed successfully" +fi +echo "" diff --git a/meta-agl/templates/base/00_local.conf.agl.inc b/meta-agl/templates/base/00_local.conf.agl.inc new file mode 100644 index 00000000..b49c44df --- /dev/null +++ b/meta-agl/templates/base/00_local.conf.agl.inc @@ -0,0 +1,11 @@ +# AGL global configuration options +#--------------------------------- + +# Set DISTRO for AGL +DISTRO = "poky-agl" + +#see meta-agl/meta-agl-profile-core/conf/include/base-agl.inc +require conf/include/base-agl.inc + +#see meta-agl/meta-app-framework/conf/include/agl-appfw-smack.inc +require conf/include/agl-appfw-smack.inc diff --git a/meta-agl/templates/base/01_setup_EULAfunc.sh b/meta-agl/templates/base/01_setup_EULAfunc.sh new file mode 100644 index 00000000..5ea29416 --- /dev/null +++ b/meta-agl/templates/base/01_setup_EULAfunc.sh @@ -0,0 +1,88 @@ +find_and_ack_eula() { + # Handle EULA , if needed. This is a generic method to handle BSPs + # that might (or not) come with a EULA. If a machine has a EULA, we + # assume that its corresponding layers has conf/EULA/$MACHINE file + # with the EULA text, which we will display to the user and request + # for acceptance. If accepted, the variable ACCEPT_EULA_$MACHINE is + # set to 1 in local.conf, which can later be used by the BSP. + # If the env variable EULA_$MACHINE is set it is used by default, + # without prompting the user. + # FIXME: there is a potential issue if the same $MACHINE is set in more than one layer.. but we should assert that earlier + # $1 is layer directory + # $2 is location of EULA file relative to layer directory + if test x"" == x"$2"; then + EULA=$(find $1 -print | grep "conf/eula/$MACHINE" | grep -v scripts | grep -v openembedded-core || true) + else + EULA=$1/$2 + fi + if [ -n "$EULA" ]; then + # remove '-' since we are constructing a bash variable name here + EULA_MACHINE="EULA_$(echo $MACHINE | sed 's/-//g')" + # NOTE: indirect reference / dynamic variable + if [ -n "${!EULA_MACHINE}" ]; then + # the EULA_$MACHINE variable is set in the environment, so we just configure + # ACCEPT_EULA_$MACHINE in local.conf + EULA_ACCEPT=${!EULA_MACHINE} + else + # so we need to ask user if he/she accepts the EULA: + cat <> $LOCALCONF + +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +# fragment { +# generated by $THIS "$RPMREVISION" +# + +EOF + + case "$RPMREVISION" in + prservice*) + [[ $RPMREVISION =~ ^prservice(:([^ \t\n]+))?$ ]] && { + echo "PRSERV_HOST ?= \"${BASH_REMATCH[2]:-localhost:0}\"" >> $LOCALCONF + } || { + echo "ERROR ($THIS): invalid address specified for PR Service" + return 1 + } + ;; + timestamp) + AGL_PR=$(date --utc '+%Y%m%d.%H%M%S') + cat <<'EOF' >> $LOCALCONF +# to re-generate AGL_PR the same way as aglsetup does, run: +# echo "AGL_PR ?= \"$(date --utc '+%Y%m%d.%H%M%S')\"" +EOF + echo "AGL_PR ?= \"${AGL_PR}\"" >> $LOCALCONF; + cat <<'EOF' >> $LOCALCONF +PKGR = "${PR}${EXTENDPRAUTO}.${AGL_PR}" +PKGV = "${@ '${PV}'.replace('AUTOINC','${AGL_PR}')}" +BB_HASHBASE_WHITELIST_append = " PKGR PKGV" +EOF + ;; + value:*) + echo "AGL_PR ?= \"${RPMREVISION#value:}\"" >> $LOCALCONF; + cat <<'EOF' >> $LOCALCONF +PKGR = "${PR}${EXTENDPRAUTO}.${AGL_PR}" +PKGV = "${@ '${PV}'.replace('AUTOINC','${AGL_PR}')}" +BB_HASHBASE_WHITELIST_append = " PKGR PKGV" +EOF + ;; + none) + # do nothing + ;; + *) + echo "ERROR ($THIS): unknown package revision method '$REVISION'" + return 1 + ;; + esac + + cat <<'EOF' >> $LOCALCONF + +# +# } +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +EOF + +} + +01_setup_pkg_revision diff --git a/meta-agl/templates/base/99_local.conf.inc b/meta-agl/templates/base/99_local.conf.inc new file mode 100644 index 00000000..871ea0eb --- /dev/null +++ b/meta-agl/templates/base/99_local.conf.inc @@ -0,0 +1,19 @@ +######################## +# AGL DISTRO VARIABLES # +######################## + +# ARM 32bit 'medium' compiler (armv7thf instead of armv7ve) +# (only use for CPUs <= cortex-a9 / w/o virt extension - e.g. cortex-a8) +# DISTRO_FEATURES_append = " agl-medium-arm-compiler" + + +###################### +# AGL USER VARIABLES # +###################### + +# Add additional IMAGE_FSTYPES here on-top of the default ext4.xz and tar.xz +#AGL_EXTRA_IMAGE_FSTYPES = "" + +# Additional free disk space created in the image in Kbytes. +#IMAGE_ROOTFS_EXTRA_SPACE="524288" + diff --git a/meta-agl/templates/base/99_setup_EULAconf.sh b/meta-agl/templates/base/99_setup_EULAconf.sh new file mode 100644 index 00000000..351401d1 --- /dev/null +++ b/meta-agl/templates/base/99_setup_EULAconf.sh @@ -0,0 +1,14 @@ +case "$EULA_ACCEPT" in + 1) + echo "" >> $BUILDDIR/conf/local.conf + echo "# EULA" >> $BUILDDIR/conf/local.conf + if test x"" = x"$EULA_FLAG_NAME"; then + echo "ACCEPT_EULA_$MACHINE = \"1\"" >> $BUILDDIR/conf/local.conf + else + echo "$EULA_FLAG_NAME = \"1\"" >> $BUILDDIR/conf/local.conf + fi + ;; + *) + ;; +esac + diff --git a/meta-agl/templates/base/bblayers.conf.sample b/meta-agl/templates/base/bblayers.conf.sample new file mode 100644 index 00000000..653f6dbe --- /dev/null +++ b/meta-agl/templates/base/bblayers.conf.sample @@ -0,0 +1,67 @@ +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +# Convenience variables usable in various configuration fragments +#---------------------------------- +BCONFDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)))}" +METADIR := "${@os.path.abspath('##OEROOT##/../..')}" + +# These are the core OE + YP Layers +#---------------------------------- +YOCTO_LAYERS = " \ + ${METADIR}/external/poky/meta \ + ${METADIR}/external/poky/meta-poky \ + " +# this is added for the boards where necessary, not globally +# ${METADIR}/external/poky/meta-yocto-bsp \ +# +# These are the AGL CORE Layers that make up the basis +# - they create a minimal bootable filesystem +# with some automotive tools/libraries +#----------------------------------------------------- +AGL_CORE_LAYERS = " \ + ${METADIR}/meta-agl/meta-agl-profile-core \ + ${METADIR}/meta-agl/meta-agl-distro \ + ${METADIR}/meta-agl/meta-agl-bsp \ + " + +AGL_APPFW_LAYERS = " \ + ${METADIR}/external/meta-security \ + ${METADIR}/external/meta-openembedded/meta-perl \ + ${METADIR}/meta-agl/meta-security \ + ${METADIR}/meta-agl/meta-app-framework \ + " + + +# These are the direct dependencies of the AGL CORE Layers +#--------------------------------------------------------- +AGL_CORE_DEPENDENCY_LAYERS = " \ + ${METADIR}/external/meta-openembedded/meta-oe \ + ${METADIR}/external/meta-openembedded/meta-multimedia \ + ${METADIR}/external/meta-openembedded/meta-networking \ + ${METADIR}/external/meta-openembedded/meta-python \ + ${METADIR}/external/meta-openembedded/meta-filesystems \ + " + +#################### +# Combine the layers +BBLAYERS ?= " \ + ${AGL_CORE_DEPENDENCY_LAYERS} \ + ${AGL_CORE_LAYERS} \ + ${AGL_APPFW_LAYERS} \ + ${YOCTO_LAYERS} \ + " + +BBLAYERS_NON_REMOVABLE ?= " \ + ${METADIR}/external/poky/meta \ + ${METADIR}/external/poky/meta-poky \ + ${METADIR}/meta-agl/meta-agl-profile-core \ + ${METADIR}/meta-agl/meta-agl-distro \ + " + + + diff --git a/meta-agl/templates/base/conf-notes.txt b/meta-agl/templates/base/conf-notes.txt new file mode 100644 index 00000000..1279e297 --- /dev/null +++ b/meta-agl/templates/base/conf-notes.txt @@ -0,0 +1,17 @@ +Common targets are: + - meta-agl: (core system) + agl-image-minimal + agl-image-minimal-qa + + agl-image-ivi + agl-image-ivi-qa + agl-image-ivi-crosssdk + + agl-image-weston + + - meta-agl-demo: (demo with UI) + agl-demo-platform (* default demo target) + agl-demo-platform-qa + agl-demo-platform-crosssdk + + agl-demo-platform-html5 diff --git a/meta-agl/templates/base/local.conf.sample b/meta-agl/templates/base/local.conf.sample new file mode 100644 index 00000000..365b6eb2 --- /dev/null +++ b/meta-agl/templates/base/local.conf.sample @@ -0,0 +1,237 @@ +# +# 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" +#MACHINE ?= "genericx86" +#MACHINE ?= "genericx86-64" +#MACHINE ?= "mpc8315e-rdb" +#MACHINE ?= "edgerouter" +# +# This sets the default machine to be qemux86 if no other machine is selected: +MACHINE ??= "qemux86" + +# +# 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: +PACKAGE_CLASSES ?= "package_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 and x86_64 +#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) +# "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. +EXTRA_IMAGE_FEATURES ?= "debug-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 +# - 'image-mklibs' to reduce shared library files size for an image +# - 'image-prelink' in order to prelink the filesystem image +# - 'image-swab' to perform host system intrusion detection +# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink +# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended +USER_CLASSES ?= "buildstats image-mklibs image-prelink" + +# +# 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. To +# enable this uncomment this line. See classes/testimage(-auto).bbclass for +# further details. +#TEST_IMAGE = "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 that 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 necesary 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 +# 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" + + +# +# Qemu configuration +# +# By default qemu will build with a builtin VNC server where graphical output can be +# seen. The two lines below enable the SDL backend too. By default libsdl-native will +# be built, if you want to use your host's libSDL instead of the minimal libsdl built +# by libsdl-native then uncomment the ASSUME_PROVIDED line below. +PACKAGECONFIG_append_pn-qemu-native = " sdl" +PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" +#ASSUME_PROVIDED += "libsdl-native" + +# 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 = "1" diff --git a/meta-agl/templates/feature/agl-all-features/README_feature_agl-all-features.md b/meta-agl/templates/feature/agl-all-features/README_feature_agl-all-features.md new file mode 100644 index 00000000..9dab654d --- /dev/null +++ b/meta-agl/templates/feature/agl-all-features/README_feature_agl-all-features.md @@ -0,0 +1,16 @@ +--- +description: Feature agl-all-features +authors: Jan-Simon Moeller , Jan-Simon Möller , Phong Tran , Ronan Le Martret +--- + +### Feature agl-all-features + +*Description is missing - please complete file meta-agl/templates/feature/agl-all-features/README_feature_agl-all-features.md* + +#### Dependent features pulled by agl-all-features + +The following features are pulled: + +* agl-demo +* agl-netboot + diff --git a/meta-agl/templates/feature/agl-all-features/included.dep b/meta-agl/templates/feature/agl-all-features/included.dep new file mode 100644 index 00000000..80717ded --- /dev/null +++ b/meta-agl/templates/feature/agl-all-features/included.dep @@ -0,0 +1 @@ +agl-demo agl-netboot diff --git a/meta-agl/templates/feature/agl-appfw-smack/50_local.conf.inc b/meta-agl/templates/feature/agl-appfw-smack/50_local.conf.inc new file mode 100644 index 00000000..e69de29b diff --git a/meta-agl/templates/feature/agl-appfw-smack/README_feature_agl-appfw-smack.md b/meta-agl/templates/feature/agl-appfw-smack/README_feature_agl-appfw-smack.md new file mode 100644 index 00000000..c96edac3 --- /dev/null +++ b/meta-agl/templates/feature/agl-appfw-smack/README_feature_agl-appfw-smack.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-appfw-smack +authors: Jan-Simon Möller , José Bollo , Ronan Le Martret , Stephane Desneux +--- + +### Feature agl-appfw-smack + +*Description is missing - please complete file meta-agl/templates/feature/agl-appfw-smack/README_feature_agl-appfw-smack.md* + diff --git a/meta-agl/templates/feature/agl-archiver/.50_FEATURE.md.swp b/meta-agl/templates/feature/agl-archiver/.50_FEATURE.md.swp new file mode 100644 index 00000000..b9384551 Binary files /dev/null and b/meta-agl/templates/feature/agl-archiver/.50_FEATURE.md.swp differ diff --git a/meta-agl/templates/feature/agl-archiver/50_local.conf.inc b/meta-agl/templates/feature/agl-archiver/50_local.conf.inc new file mode 100644 index 00000000..946c262d --- /dev/null +++ b/meta-agl/templates/feature/agl-archiver/50_local.conf.inc @@ -0,0 +1,2 @@ +INHERIT += "archiver" +ARCHIVER_MODE[src] = "original" diff --git a/meta-agl/templates/feature/agl-archiver/README_feature_agl-archiver.md b/meta-agl/templates/feature/agl-archiver/README_feature_agl-archiver.md new file mode 100644 index 00000000..bcd11b32 --- /dev/null +++ b/meta-agl/templates/feature/agl-archiver/README_feature_agl-archiver.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-archiver +authors: Jan-Simon Möller , Stéphane Desneux +--- + +### Feature agl-archiver + +*Description is missing - please complete file meta-agl/templates/feature/agl-archiver/README_feature_agl-archiver.md* + diff --git a/meta-agl/templates/feature/agl-basesystem/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-basesystem/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/agl-basesystem/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/agl-basesystem/50_local.conf.inc b/meta-agl/templates/feature/agl-basesystem/50_local.conf.inc new file mode 100644 index 00000000..8978d11a --- /dev/null +++ b/meta-agl/templates/feature/agl-basesystem/50_local.conf.inc @@ -0,0 +1,2 @@ +#see meta-agl-basesystem/conf/include/agl-basesystem-base.inc +require conf/include/agl-basesystem-base.inc diff --git a/meta-agl/templates/feature/agl-basesystem/README_feature_agl-basesystem.md b/meta-agl/templates/feature/agl-basesystem/README_feature_agl-basesystem.md new file mode 100644 index 00000000..9c2f0633 --- /dev/null +++ b/meta-agl/templates/feature/agl-basesystem/README_feature_agl-basesystem.md @@ -0,0 +1,3 @@ +--- +description: Feature agl-basesystem +authors: diff --git a/meta-agl/templates/feature/agl-buildstats/50_local.conf.inc b/meta-agl/templates/feature/agl-buildstats/50_local.conf.inc new file mode 100644 index 00000000..34110d35 --- /dev/null +++ b/meta-agl/templates/feature/agl-buildstats/50_local.conf.inc @@ -0,0 +1,2 @@ +INHERIT += "buildstats" +INHERIT += "buildstats-summary" diff --git a/meta-agl/templates/feature/agl-buildstats/README_feature_agl-buildstats.md b/meta-agl/templates/feature/agl-buildstats/README_feature_agl-buildstats.md new file mode 100644 index 00000000..d10bd7e3 --- /dev/null +++ b/meta-agl/templates/feature/agl-buildstats/README_feature_agl-buildstats.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-buildstats +authors: Jan-Simon Möller +--- + +### Feature agl-buildstats + +*Description is missing - please complete file meta-agl/templates/feature/agl-buildstats/README_feature_agl-buildstats.md* + diff --git a/meta-agl/templates/feature/agl-ci-change-features-nogfx/README_feature_agl-ci-change-features-nogfx.md b/meta-agl/templates/feature/agl-ci-change-features-nogfx/README_feature_agl-ci-change-features-nogfx.md new file mode 100644 index 00000000..6889d084 --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-change-features-nogfx/README_feature_agl-ci-change-features-nogfx.md @@ -0,0 +1,19 @@ +--- +description: Feature agl-ci-change-features-nogfx +authors: George Kiagiadakis , Jan-Simon Möller +--- + +### Feature agl-ci-change-features-nogfx + +*Description is missing - please complete file meta-agl/templates/feature/agl-ci-change-features-nogfx/README_feature_agl-ci-change-features-nogfx.md* + +#### Dependent features pulled by agl-ci-change-features-nogfx + +The following features are pulled: + +* agl-devel +* agl-netboot +* agl-pipewire +* agl-buildstats +* agl-ptest + diff --git a/meta-agl/templates/feature/agl-ci-change-features-nogfx/included.dep b/meta-agl/templates/feature/agl-ci-change-features-nogfx/included.dep new file mode 100644 index 00000000..759f4792 --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-change-features-nogfx/included.dep @@ -0,0 +1 @@ +agl-devel agl-netboot agl-pipewire agl-buildstats agl-ptest \ No newline at end of file diff --git a/meta-agl/templates/feature/agl-ci-change-features/README_feature_agl-ci-change-features.md b/meta-agl/templates/feature/agl-ci-change-features/README_feature_agl-ci-change-features.md new file mode 100644 index 00000000..d60499bc --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-change-features/README_feature_agl-ci-change-features.md @@ -0,0 +1,20 @@ +--- +description: Feature agl-ci-change-features +authors: George Kiagiadakis , Jan-Simon Moeller , Jan-Simon Möller , Phong Tran +--- + +### Feature agl-ci-change-features + +*Description is missing - please complete file meta-agl/templates/feature/agl-ci-change-features/README_feature_agl-ci-change-features.md* + +#### Dependent features pulled by agl-ci-change-features + +The following features are pulled: + +* agl-demo +* agl-devel +* agl-netboot +* agl-pipewire +* agl-buildstats +* agl-ptest + diff --git a/meta-agl/templates/feature/agl-ci-change-features/included.dep b/meta-agl/templates/feature/agl-ci-change-features/included.dep new file mode 100644 index 00000000..27e9852f --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-change-features/included.dep @@ -0,0 +1 @@ +agl-demo agl-devel agl-netboot agl-pipewire agl-buildstats agl-ptest diff --git a/meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/README_feature_agl-ci-snapshot-features-nogfx.md b/meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/README_feature_agl-ci-snapshot-features-nogfx.md new file mode 100644 index 00000000..0289143f --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/README_feature_agl-ci-snapshot-features-nogfx.md @@ -0,0 +1,20 @@ +--- +description: Feature agl-ci-snapshot-features-nogfx +authors: George Kiagiadakis , Jan-Simon Möller +--- + +### Feature agl-ci-snapshot-features-nogfx + +*Description is missing - please complete file meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/README_feature_agl-ci-snapshot-features-nogfx.md* + +#### Dependent features pulled by agl-ci-snapshot-features-nogfx + +The following features are pulled: + +* agl-devel +* agl-netboot +* agl-archiver +* agl-pipewire +* agl-buildstats +* agl-ptest + diff --git a/meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/included.dep b/meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/included.dep new file mode 100644 index 00000000..b8184837 --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-snapshot-features-nogfx/included.dep @@ -0,0 +1 @@ +agl-devel agl-netboot agl-archiver agl-pipewire agl-buildstats agl-ptest diff --git a/meta-agl/templates/feature/agl-ci-snapshot-features/README_feature_agl-ci-snapshot-features.md b/meta-agl/templates/feature/agl-ci-snapshot-features/README_feature_agl-ci-snapshot-features.md new file mode 100644 index 00000000..42dec570 --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-snapshot-features/README_feature_agl-ci-snapshot-features.md @@ -0,0 +1,21 @@ +--- +description: Feature agl-ci-snapshot-features +authors: George Kiagiadakis , Jan-Simon Moeller , Jan-Simon Möller , Phong Tran +--- + +### Feature agl-ci-snapshot-features + +*Description is missing - please complete file meta-agl/templates/feature/agl-ci-snapshot-features/README_feature_agl-ci-snapshot-features.md* + +#### Dependent features pulled by agl-ci-snapshot-features + +The following features are pulled: + +* agl-demo +* agl-devel +* agl-netboot +* agl-archiver +* agl-pipewire +* agl-buildstats +* agl-ptest + diff --git a/meta-agl/templates/feature/agl-ci-snapshot-features/included.dep b/meta-agl/templates/feature/agl-ci-snapshot-features/included.dep new file mode 100644 index 00000000..01ef6c81 --- /dev/null +++ b/meta-agl/templates/feature/agl-ci-snapshot-features/included.dep @@ -0,0 +1 @@ +agl-demo agl-devel agl-netboot agl-archiver agl-pipewire agl-buildstats agl-ptest diff --git a/meta-agl/templates/feature/agl-ci/99_local.conf.inc b/meta-agl/templates/feature/agl-ci/99_local.conf.inc new file mode 100644 index 00000000..5386671b --- /dev/null +++ b/meta-agl/templates/feature/agl-ci/99_local.conf.inc @@ -0,0 +1 @@ +DISTRO_FEATURES_append = " AGLCI" diff --git a/meta-agl/templates/feature/agl-ci/README_feature_agl-ci.md b/meta-agl/templates/feature/agl-ci/README_feature_agl-ci.md new file mode 100644 index 00000000..3d983cfd --- /dev/null +++ b/meta-agl/templates/feature/agl-ci/README_feature_agl-ci.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-ci +authors: Jan-Simon Möller +--- + +### Feature agl-ci + +*Description is missing - please complete file meta-agl/templates/feature/agl-ci/README_feature_agl-ci.md* + diff --git a/meta-agl/templates/feature/agl-devel/50_local.conf.inc b/meta-agl/templates/feature/agl-devel/50_local.conf.inc new file mode 100644 index 00000000..54a023cd --- /dev/null +++ b/meta-agl/templates/feature/agl-devel/50_local.conf.inc @@ -0,0 +1,2 @@ +#see meta-agl/meta-agl/conf/include/agl-devel.inc +require conf/include/agl-devel.inc diff --git a/meta-agl/templates/feature/agl-devel/README_feature_agl-devel.md b/meta-agl/templates/feature/agl-devel/README_feature_agl-devel.md new file mode 100644 index 00000000..24483f95 --- /dev/null +++ b/meta-agl/templates/feature/agl-devel/README_feature_agl-devel.md @@ -0,0 +1,42 @@ +--- +description: Feature agl-devel +authors: José Bollo , Ronan Le Martret , Stephane Desneux , Yannick Gicquel +--- + +### Feature agl-devel + +Activation of the agl-devel features turns on +features needed for developping and debugging +agl distribution. + +This includes: + +* adding to images some useful packages +* adding to images the package group 'packagegroup-agl-devel' +* definition of a contionnal the tag 'agl-devel' + for conditionnal building + + * definition of the distro feature 'agl-devel' + * adds packages for development in SDK + +### How to use agl-devel in conditionnal builds + +The following example shows how to activate C/C++ code +specific to agl-devel: + +```yocto +CPPFLAGS_append_agl-devel = " -DAGL_DEVEL" +``` + +Using this, any code enclosed in + +```yocto +#ifdef AGL_DEVEL +...my code specific to agl-devel... +#endif +``` + +will normaly be effective only if agl-devel is set on. + +At this time, it is recommended to use AGL_DEVEL as tag +within C/C++ code. diff --git a/meta-agl/templates/feature/agl-egvirt/50_local.conf.inc b/meta-agl/templates/feature/agl-egvirt/50_local.conf.inc new file mode 100644 index 00000000..48590c40 --- /dev/null +++ b/meta-agl/templates/feature/agl-egvirt/50_local.conf.inc @@ -0,0 +1,9 @@ +#see meta-agl-devel/meta-egvirt/conf/include/agl_egvirt.inc +require conf/include/agl_egvirt.inc + +# In order to enable the agl virtualization features (agl-egvirt), +# each supported board needs to add in one of its configuration +# files (see for instance meta-agl/meta-agl-bsp/conf/include) +# the following line: +# +# MACHINE_FEATURES += "agl-egvirt" diff --git a/meta-agl/templates/feature/agl-egvirt/README_feature_agl-egvirt.md b/meta-agl/templates/feature/agl-egvirt/README_feature_agl-egvirt.md new file mode 100644 index 00000000..658b39f8 --- /dev/null +++ b/meta-agl/templates/feature/agl-egvirt/README_feature_agl-egvirt.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-egvirt +authors: Jan-Simon Möller +--- + +### Feature agl-egvirt + +*Description is missing - please complete file meta-agl/templates/feature/agl-egvirt/README_feature_agl-egvirt.md* + diff --git a/meta-agl/templates/feature/agl-fossdriver/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-fossdriver/50_bblayers.conf.inc new file mode 100644 index 00000000..eea04c4e --- /dev/null +++ b/meta-agl/templates/feature/agl-fossdriver/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/external/meta-spdxscanner" diff --git a/meta-agl/templates/feature/agl-fossdriver/50_local.conf.inc b/meta-agl/templates/feature/agl-fossdriver/50_local.conf.inc new file mode 100644 index 00000000..9dea9a0d --- /dev/null +++ b/meta-agl/templates/feature/agl-fossdriver/50_local.conf.inc @@ -0,0 +1 @@ +INHERIT += "fossdriver-host" \ No newline at end of file diff --git a/meta-agl/templates/feature/agl-fossdriver/README_feature_agl-fossdriver.md b/meta-agl/templates/feature/agl-fossdriver/README_feature_agl-fossdriver.md new file mode 100644 index 00000000..5a928436 --- /dev/null +++ b/meta-agl/templates/feature/agl-fossdriver/README_feature_agl-fossdriver.md @@ -0,0 +1,13 @@ +--- +description: Feature agl-fossdriver +authors: Jan-Simon Möller , Stéphane Desneux +--- + +### Feature agl-fossdriver + +Integration with meta-spdxscanner. + +This needs fossdriver setup and a fossology instance before it can work. + +*Full description is missing - please complete file meta-agl/templates/feature/agl-fossdriver/README_feature_agl-fossdriver.md* + diff --git a/meta-agl/templates/feature/agl-gplv2/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-gplv2/50_bblayers.conf.inc new file mode 100644 index 00000000..a0f26980 --- /dev/null +++ b/meta-agl/templates/feature/agl-gplv2/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/external/meta-gplv2" diff --git a/meta-agl/templates/feature/agl-gplv2/50_local.conf.inc b/meta-agl/templates/feature/agl-gplv2/50_local.conf.inc new file mode 100644 index 00000000..8e0d5df7 --- /dev/null +++ b/meta-agl/templates/feature/agl-gplv2/50_local.conf.inc @@ -0,0 +1,2 @@ +#see meta-agl/meta-agl/conf/include/agl-gplv2.inc +require conf/include/agl-gplv2.inc diff --git a/meta-agl/templates/feature/agl-gplv2/README_feature_agl-gplv2.md b/meta-agl/templates/feature/agl-gplv2/README_feature_agl-gplv2.md new file mode 100644 index 00000000..ffbe331b --- /dev/null +++ b/meta-agl/templates/feature/agl-gplv2/README_feature_agl-gplv2.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-gplv2 +authors: Jan-Simon Möller , Martin Kelly +--- + +### Feature agl-gplv2 + +*Description is missing - please complete file meta-agl/templates/feature/agl-gplv2/README_feature_agl-gplv2.md* + diff --git a/meta-agl/templates/feature/agl-hmi-framework/50_local.conf.inc b/meta-agl/templates/feature/agl-hmi-framework/50_local.conf.inc new file mode 100644 index 00000000..d251e183 --- /dev/null +++ b/meta-agl/templates/feature/agl-hmi-framework/50_local.conf.inc @@ -0,0 +1,4 @@ +# In order to enable the hmi-framework features , +# enables the following line: +# +DISTRO_FEATURES_append = " agl-hmi-framework" diff --git a/meta-agl/templates/feature/agl-hmi-framework/README_feature_agl-hmi-framework.md b/meta-agl/templates/feature/agl-hmi-framework/README_feature_agl-hmi-framework.md new file mode 100644 index 00000000..e298023d --- /dev/null +++ b/meta-agl/templates/feature/agl-hmi-framework/README_feature_agl-hmi-framework.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-hmi-framework +authors: Jan-Simon Möller , Scott Murray +--- + +### Feature agl-hmi-framework + +*Description is missing - please complete file meta-agl/templates/feature/agl-hmi-framework/README_feature_agl-hmi-framework.md* + diff --git a/meta-agl/templates/feature/agl-netboot/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-netboot/50_bblayers.conf.inc new file mode 100644 index 00000000..3d2ed646 --- /dev/null +++ b/meta-agl/templates/feature/agl-netboot/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/meta-agl/meta-netboot" diff --git a/meta-agl/templates/feature/agl-netboot/50_local.conf.inc b/meta-agl/templates/feature/agl-netboot/50_local.conf.inc new file mode 100644 index 00000000..77c31367 --- /dev/null +++ b/meta-agl/templates/feature/agl-netboot/50_local.conf.inc @@ -0,0 +1,2 @@ +#see meta-agl/meta-netboot/conf/include/agl-netboot.inc +require conf/include/agl-netboot.inc diff --git a/meta-agl/templates/feature/agl-netboot/README_feature_agl-netboot.md b/meta-agl/templates/feature/agl-netboot/README_feature_agl-netboot.md new file mode 100644 index 00000000..171f852b --- /dev/null +++ b/meta-agl/templates/feature/agl-netboot/README_feature_agl-netboot.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-netboot +authors: Jan-Simon Möller , Ronan Le Martret , Stephane Desneux +--- + +### Feature agl-netboot + +*Description is missing - please complete file meta-agl/templates/feature/agl-netboot/README_feature_agl-netboot.md* + diff --git a/meta-agl/templates/feature/agl-profile-cluster-qt5/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-profile-cluster-qt5/50_bblayers.conf.inc new file mode 100644 index 00000000..f1aef074 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-cluster-qt5/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-profile-cluster-qt5 \ +" diff --git a/meta-agl/templates/feature/agl-profile-cluster-qt5/README_feature_agl-profile-cluster-qt5.md b/meta-agl/templates/feature/agl-profile-cluster-qt5/README_feature_agl-profile-cluster-qt5.md new file mode 100644 index 00000000..095a8db1 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-cluster-qt5/README_feature_agl-profile-cluster-qt5.md @@ -0,0 +1,15 @@ +--- +description: Feature agl-profile-cluster-qt5 +authors: Scott Murray +--- + +### Feature agl-profile-cluster-qt5 + +*Description is missing - please complete file meta-agl/templates/feature/agl-profile-cluster-qt5/README_feature_agl-profile-cluster-qt5.md* + +#### Dependent features pulled by agl-profile-cluster-qt5 + +The following features are pulled: + +* agl-profile-graphical-qt5 + diff --git a/meta-agl/templates/feature/agl-profile-cluster-qt5/included.dep b/meta-agl/templates/feature/agl-profile-cluster-qt5/included.dep new file mode 100644 index 00000000..21b1fa6b --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-cluster-qt5/included.dep @@ -0,0 +1 @@ +agl-profile-graphical-qt5 diff --git a/meta-agl/templates/feature/agl-profile-cluster/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-profile-cluster/50_bblayers.conf.inc new file mode 100644 index 00000000..b430dc7d --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-cluster/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-profile-cluster \ +" diff --git a/meta-agl/templates/feature/agl-profile-cluster/README_feature_agl-profile-cluster.md b/meta-agl/templates/feature/agl-profile-cluster/README_feature_agl-profile-cluster.md new file mode 100644 index 00000000..544dc7c8 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-cluster/README_feature_agl-profile-cluster.md @@ -0,0 +1,15 @@ +--- +description: Feature agl-profile-cluster +authors: Scott Murray +--- + +### Feature agl-profile-cluster + +*Description is missing - please complete file meta-agl/templates/feature/agl-profile-cluster/README_feature_agl-profile-cluster.md* + +#### Dependent features pulled by agl-profile-cluster + +The following features are pulled: + +* agl-profile-graphical + diff --git a/meta-agl/templates/feature/agl-profile-cluster/included.dep b/meta-agl/templates/feature/agl-profile-cluster/included.dep new file mode 100644 index 00000000..032609b8 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-cluster/included.dep @@ -0,0 +1 @@ +agl-profile-graphical diff --git a/meta-agl/templates/feature/agl-profile-graphical-html5/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-profile-graphical-html5/50_bblayers.conf.inc new file mode 100644 index 00000000..97b44a21 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical-html5/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-profile-graphical-html5 \ +" diff --git a/meta-agl/templates/feature/agl-profile-graphical-html5/README_feature_agl-profile-graphical-html5.md b/meta-agl/templates/feature/agl-profile-graphical-html5/README_feature_agl-profile-graphical-html5.md new file mode 100644 index 00000000..48bf84b0 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical-html5/README_feature_agl-profile-graphical-html5.md @@ -0,0 +1,15 @@ +--- +description: Feature agl-profile-graphical-html5 +authors: Jan-Simon Möller +--- + +### Feature agl-profile-graphical-html5 + +*Description is missing - please complete file meta-agl/templates/feature/agl-profile-graphical-html5/README_feature_agl-profile-graphical-html5.md* + +#### Dependent features pulled by agl-profile-graphical-html5 + +The following features are pulled: + +* agl-profile-graphical + diff --git a/meta-agl/templates/feature/agl-profile-graphical-html5/included.dep b/meta-agl/templates/feature/agl-profile-graphical-html5/included.dep new file mode 100644 index 00000000..5b54430d --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical-html5/included.dep @@ -0,0 +1 @@ +agl-profile-graphical \ No newline at end of file diff --git a/meta-agl/templates/feature/agl-profile-graphical-qt5/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-profile-graphical-qt5/50_bblayers.conf.inc new file mode 100644 index 00000000..96026790 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical-qt5/50_bblayers.conf.inc @@ -0,0 +1,9 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-profile-graphical-qt5 \ +" + +# These are the dependencies +#--------------------------- +BBLAYERS =+ " \ + ${METADIR}/external/meta-qt5 \ +" diff --git a/meta-agl/templates/feature/agl-profile-graphical-qt5/README_feature_agl-profile-graphical-qt5.md b/meta-agl/templates/feature/agl-profile-graphical-qt5/README_feature_agl-profile-graphical-qt5.md new file mode 100644 index 00000000..387de2ca --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical-qt5/README_feature_agl-profile-graphical-qt5.md @@ -0,0 +1,15 @@ +--- +description: Feature agl-profile-graphical-qt5 +authors: Jan-Simon Möller +--- + +### Feature agl-profile-graphical-qt5 + +*Description is missing - please complete file meta-agl/templates/feature/agl-profile-graphical-qt5/README_feature_agl-profile-graphical-qt5.md* + +#### Dependent features pulled by agl-profile-graphical-qt5 + +The following features are pulled: + +* agl-profile-graphical + diff --git a/meta-agl/templates/feature/agl-profile-graphical-qt5/included.dep b/meta-agl/templates/feature/agl-profile-graphical-qt5/included.dep new file mode 100644 index 00000000..5b54430d --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical-qt5/included.dep @@ -0,0 +1 @@ +agl-profile-graphical \ No newline at end of file diff --git a/meta-agl/templates/feature/agl-profile-graphical/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-profile-graphical/50_bblayers.conf.inc new file mode 100644 index 00000000..44b0885d --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-profile-graphical \ +" diff --git a/meta-agl/templates/feature/agl-profile-graphical/README_feature_agl-profile-graphical.md b/meta-agl/templates/feature/agl-profile-graphical/README_feature_agl-profile-graphical.md new file mode 100644 index 00000000..594d047e --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-graphical/README_feature_agl-profile-graphical.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-profile-graphical +authors: Jan-Simon Möller +--- + +### Feature agl-profile-graphical + +*Description is missing - please complete file meta-agl/templates/feature/agl-profile-graphical/README_feature_agl-profile-graphical.md* + diff --git a/meta-agl/templates/feature/agl-profile-hud/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-profile-hud/50_bblayers.conf.inc new file mode 100644 index 00000000..04738371 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-hud/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-profile-hud \ +" diff --git a/meta-agl/templates/feature/agl-profile-hud/README_feature_agl-profile-hud.md b/meta-agl/templates/feature/agl-profile-hud/README_feature_agl-profile-hud.md new file mode 100644 index 00000000..b4387c12 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-hud/README_feature_agl-profile-hud.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-profile-hud +authors: Jan-Simon Möller +--- + +### Feature agl-profile-hud + +*Description is missing - please complete file meta-agl/templates/feature/agl-profile-hud/README_feature_agl-profile-hud.md* + diff --git a/meta-agl/templates/feature/agl-profile-telematics/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-profile-telematics/50_bblayers.conf.inc new file mode 100644 index 00000000..874b438f --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-telematics/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-profile-telematics \ +" diff --git a/meta-agl/templates/feature/agl-profile-telematics/README_feature_agl-profile-telematics.md b/meta-agl/templates/feature/agl-profile-telematics/README_feature_agl-profile-telematics.md new file mode 100644 index 00000000..6abcd5d2 --- /dev/null +++ b/meta-agl/templates/feature/agl-profile-telematics/README_feature_agl-profile-telematics.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-profile-telematics +authors: Jan-Simon Möller +--- + +### Feature agl-profile-telematics + +*Description is missing - please complete file meta-agl/templates/feature/agl-profile-telematics/README_feature_agl-profile-telematics.md* + diff --git a/meta-agl/templates/feature/agl-ptest/90_local.conf.inc b/meta-agl/templates/feature/agl-ptest/90_local.conf.inc new file mode 100644 index 00000000..bee38fab --- /dev/null +++ b/meta-agl/templates/feature/agl-ptest/90_local.conf.inc @@ -0,0 +1,9 @@ + +# Enabling ptest in image ... + +OVERRIDES .= ":agl-ptest" +EXTRA_OECMAKE_append = " -DBUILD_TEST_WGT=TRUE" +DISTRO_FEATURES_append = " ptest" +EXTRA_IMAGE_FEATURES_append = " ptest-pkgs" + +# / ptest diff --git a/meta-agl/templates/feature/agl-ptest/README_feature_agl-ptest.md b/meta-agl/templates/feature/agl-ptest/README_feature_agl-ptest.md new file mode 100644 index 00000000..89ba4936 --- /dev/null +++ b/meta-agl/templates/feature/agl-ptest/README_feature_agl-ptest.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-ptest +authors: Jan-Simon Möller , Romain Forlot +--- + +### Feature agl-ptest + +*Description is missing - please complete file meta-agl/templates/feature/agl-ptest/README_feature_agl-ptest.md* + diff --git a/meta-agl/templates/feature/agl-sota/50_bblayers.conf.inc b/meta-agl/templates/feature/agl-sota/50_bblayers.conf.inc new file mode 100644 index 00000000..67c41d23 --- /dev/null +++ b/meta-agl/templates/feature/agl-sota/50_bblayers.conf.inc @@ -0,0 +1,7 @@ +BBLAYERS =+ " \ + ${METADIR}/external/meta-updater \ + ${METADIR}/external/meta-updater-qemux86-64 \ + ${METADIR}/external/meta-openembedded/meta-filesystems \ + ${METADIR}/external/meta-openembedded/meta-python \ + " + diff --git a/meta-agl/templates/feature/agl-sota/50_local.conf.inc b/meta-agl/templates/feature/agl-sota/50_local.conf.inc new file mode 100644 index 00000000..509cf612 --- /dev/null +++ b/meta-agl/templates/feature/agl-sota/50_local.conf.inc @@ -0,0 +1,4 @@ +#see meta-updater/conf/distro/sota.conf.inc +INHERIT += "sota" +DISTRO_FEATURES_append = " sota usrmerge" +DISTRO_FEATURES_NATIVE_append = " sota" diff --git a/meta-agl/templates/feature/agl-sota/README_feature_agl-sota.md b/meta-agl/templates/feature/agl-sota/README_feature_agl-sota.md new file mode 100644 index 00000000..beeffc23 --- /dev/null +++ b/meta-agl/templates/feature/agl-sota/README_feature_agl-sota.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-sota +authors: Anton Gerasimov , Changhyeok Bae , Jan-Simon Moeller , Jan-Simon Möller , Leon Anavi , Phil Wise , Ronan Le Martret +--- + +### Feature agl-sota + +*Description is missing - please complete file meta-agl/templates/feature/agl-sota/README_feature_agl-sota.md* + diff --git a/meta-agl/templates/feature/ns-backupmanager/50_bblayers.conf.inc b/meta-agl/templates/feature/ns-backupmanager/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ns-backupmanager/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ns-backupmanager/50_local.conf.inc b/meta-agl/templates/feature/ns-backupmanager/50_local.conf.inc new file mode 100644 index 00000000..0063e850 --- /dev/null +++ b/meta-agl/templates/feature/ns-backupmanager/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ns-backupmanager agl-service-ns-backupmanager" diff --git a/meta-agl/templates/feature/ns-backupmanager/README_feature_ns-backupmanager.md b/meta-agl/templates/feature/ns-backupmanager/README_feature_ns-backupmanager.md new file mode 100644 index 00000000..260b9cf5 --- /dev/null +++ b/meta-agl/templates/feature/ns-backupmanager/README_feature_ns-backupmanager.md @@ -0,0 +1,3 @@ +--- +description: Feature ns-backupmanager +authors: diff --git a/meta-agl/templates/feature/ns-commonlibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/ns-commonlibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ns-commonlibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ns-commonlibrary/50_local.conf.inc b/meta-agl/templates/feature/ns-commonlibrary/50_local.conf.inc new file mode 100644 index 00000000..31142d46 --- /dev/null +++ b/meta-agl/templates/feature/ns-commonlibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ns-commonlibrary" diff --git a/meta-agl/templates/feature/ns-commonlibrary/README_feature_ns-commonlibrary.md b/meta-agl/templates/feature/ns-commonlibrary/README_feature_ns-commonlibrary.md new file mode 100644 index 00000000..8d01b0bd --- /dev/null +++ b/meta-agl/templates/feature/ns-commonlibrary/README_feature_ns-commonlibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature ns-commonlibrary +authors: diff --git a/meta-agl/templates/feature/ns-frameworkunified/50_bblayers.conf.inc b/meta-agl/templates/feature/ns-frameworkunified/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ns-frameworkunified/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ns-frameworkunified/50_local.conf.inc b/meta-agl/templates/feature/ns-frameworkunified/50_local.conf.inc new file mode 100644 index 00000000..a784d258 --- /dev/null +++ b/meta-agl/templates/feature/ns-frameworkunified/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ns-frameworkunified" diff --git a/meta-agl/templates/feature/ns-frameworkunified/README_feature_ns-frameworkunified.md b/meta-agl/templates/feature/ns-frameworkunified/README_feature_ns-frameworkunified.md new file mode 100644 index 00000000..03ccc2cc --- /dev/null +++ b/meta-agl/templates/feature/ns-frameworkunified/README_feature_ns-frameworkunified.md @@ -0,0 +1,3 @@ +--- +description: Feature ns-frameworkunified +authors: diff --git a/meta-agl/templates/feature/ns-loglibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/ns-loglibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ns-loglibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ns-loglibrary/50_local.conf.inc b/meta-agl/templates/feature/ns-loglibrary/50_local.conf.inc new file mode 100644 index 00000000..e6e58331 --- /dev/null +++ b/meta-agl/templates/feature/ns-loglibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ns-loglibrary" diff --git a/meta-agl/templates/feature/ns-loglibrary/README_feature_ns-loglibrary.md b/meta-agl/templates/feature/ns-loglibrary/README_feature_ns-loglibrary.md new file mode 100644 index 00000000..4f5c2187 --- /dev/null +++ b/meta-agl/templates/feature/ns-loglibrary/README_feature_ns-loglibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature ns-loglibrary +authors: diff --git a/meta-agl/templates/feature/ns-notificationpersistent/50_bblayers.conf.inc b/meta-agl/templates/feature/ns-notificationpersistent/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ns-notificationpersistent/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ns-notificationpersistent/50_local.conf.inc b/meta-agl/templates/feature/ns-notificationpersistent/50_local.conf.inc new file mode 100644 index 00000000..a65b3b94 --- /dev/null +++ b/meta-agl/templates/feature/ns-notificationpersistent/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " agl-service-ns-notificationpersistent" diff --git a/meta-agl/templates/feature/ns-notificationpersistent/README_feature_ns-notificationpersistent.md b/meta-agl/templates/feature/ns-notificationpersistent/README_feature_ns-notificationpersistent.md new file mode 100644 index 00000000..a79ae128 --- /dev/null +++ b/meta-agl/templates/feature/ns-notificationpersistent/README_feature_ns-notificationpersistent.md @@ -0,0 +1,3 @@ +--- +description: Feature ns-notificationpersistent +authors: diff --git a/meta-agl/templates/feature/os-eventlibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/os-eventlibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/os-eventlibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/os-eventlibrary/50_local.conf.inc b/meta-agl/templates/feature/os-eventlibrary/50_local.conf.inc new file mode 100644 index 00000000..4b7b255f --- /dev/null +++ b/meta-agl/templates/feature/os-eventlibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " os-eventlibrary" diff --git a/meta-agl/templates/feature/os-eventlibrary/README_feature_os-eventlibrary.md b/meta-agl/templates/feature/os-eventlibrary/README_feature_os-eventlibrary.md new file mode 100644 index 00000000..bb57ca5f --- /dev/null +++ b/meta-agl/templates/feature/os-eventlibrary/README_feature_os-eventlibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature os-eventlibrary +authors: diff --git a/meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_local.conf.inc b/meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_local.conf.inc new file mode 100644 index 00000000..bf128fea --- /dev/null +++ b/meta-agl/templates/feature/os-posixbasedos001legacylibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " os-posixbasedos001legacylibrary" diff --git a/meta-agl/templates/feature/os-posixbasedos001legacylibrary/README_feature_os-posixbasedos001legacylibrary.md b/meta-agl/templates/feature/os-posixbasedos001legacylibrary/README_feature_os-posixbasedos001legacylibrary.md new file mode 100644 index 00000000..fc0705da --- /dev/null +++ b/meta-agl/templates/feature/os-posixbasedos001legacylibrary/README_feature_os-posixbasedos001legacylibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature os-posixbasedos001legacylibrary +authors: diff --git a/meta-agl/templates/feature/os-rpclibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/os-rpclibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/os-rpclibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/os-rpclibrary/50_local.conf.inc b/meta-agl/templates/feature/os-rpclibrary/50_local.conf.inc new file mode 100644 index 00000000..87e4a839 --- /dev/null +++ b/meta-agl/templates/feature/os-rpclibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " os-rpclibrary os-rpclibrary-tool" diff --git a/meta-agl/templates/feature/os-rpclibrary/README_feature_os-rpclibrary.md b/meta-agl/templates/feature/os-rpclibrary/README_feature_os-rpclibrary.md new file mode 100644 index 00000000..2cbd38ac --- /dev/null +++ b/meta-agl/templates/feature/os-rpclibrary/README_feature_os-rpclibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature os-rpclibrary +authors: diff --git a/meta-agl/templates/feature/os-vehicleparameterlibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/os-vehicleparameterlibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/os-vehicleparameterlibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/os-vehicleparameterlibrary/50_local.conf.inc b/meta-agl/templates/feature/os-vehicleparameterlibrary/50_local.conf.inc new file mode 100644 index 00000000..4bac5091 --- /dev/null +++ b/meta-agl/templates/feature/os-vehicleparameterlibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " os-vehicleparameterlibrary" diff --git a/meta-agl/templates/feature/os-vehicleparameterlibrary/README_feature_os-vehicleparameterlibrary.md b/meta-agl/templates/feature/os-vehicleparameterlibrary/README_feature_os-vehicleparameterlibrary.md new file mode 100644 index 00000000..97c88e7c --- /dev/null +++ b/meta-agl/templates/feature/os-vehicleparameterlibrary/README_feature_os-vehicleparameterlibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature os-vehicleparameterlibrary +authors: diff --git a/meta-agl/templates/feature/ps-communication/50_bblayers.conf.inc b/meta-agl/templates/feature/ps-communication/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ps-communication/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ps-communication/50_local.conf.inc b/meta-agl/templates/feature/ps-communication/50_local.conf.inc new file mode 100644 index 00000000..fdedf9de --- /dev/null +++ b/meta-agl/templates/feature/ps-communication/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ps-communication agl-service-ps-communication" diff --git a/meta-agl/templates/feature/ps-communication/README_feature_ps-communication.md b/meta-agl/templates/feature/ps-communication/README_feature_ps-communication.md new file mode 100644 index 00000000..92269ab5 --- /dev/null +++ b/meta-agl/templates/feature/ps-communication/README_feature_ps-communication.md @@ -0,0 +1,3 @@ +--- +description: Feature ps-communication +authors: diff --git a/meta-agl/templates/feature/ss-config/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-config/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-config/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-config/50_local.conf.inc b/meta-agl/templates/feature/ss-config/50_local.conf.inc new file mode 100644 index 00000000..01688a2e --- /dev/null +++ b/meta-agl/templates/feature/ss-config/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ss-config" diff --git a/meta-agl/templates/feature/ss-config/README_feature_ss-config.md b/meta-agl/templates/feature/ss-config/README_feature_ss-config.md new file mode 100644 index 00000000..0c48f6ce --- /dev/null +++ b/meta-agl/templates/feature/ss-config/README_feature_ss-config.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-config +authors: diff --git a/meta-agl/templates/feature/ss-interfaceunified/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-interfaceunified/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-interfaceunified/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-interfaceunified/50_local.conf.inc b/meta-agl/templates/feature/ss-interfaceunified/50_local.conf.inc new file mode 100644 index 00000000..5d58b66c --- /dev/null +++ b/meta-agl/templates/feature/ss-interfaceunified/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ss-interfaceunified" diff --git a/meta-agl/templates/feature/ss-interfaceunified/README_feature_ss-interfaceunified.md b/meta-agl/templates/feature/ss-interfaceunified/README_feature_ss-interfaceunified.md new file mode 100644 index 00000000..719dd692 --- /dev/null +++ b/meta-agl/templates/feature/ss-interfaceunified/README_feature_ss-interfaceunified.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-interfaceunified +authors: diff --git a/meta-agl/templates/feature/ss-loggerservice/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-loggerservice/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-loggerservice/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-loggerservice/50_local.conf.inc b/meta-agl/templates/feature/ss-loggerservice/50_local.conf.inc new file mode 100644 index 00000000..8291986d --- /dev/null +++ b/meta-agl/templates/feature/ss-loggerservice/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " agl-service-ss-loggerservice" diff --git a/meta-agl/templates/feature/ss-loggerservice/README_feature_ss-loggerservice.md b/meta-agl/templates/feature/ss-loggerservice/README_feature_ss-loggerservice.md new file mode 100644 index 00000000..7a8e49e3 --- /dev/null +++ b/meta-agl/templates/feature/ss-loggerservice/README_feature_ss-loggerservice.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-loggerservice +authors: diff --git a/meta-agl/templates/feature/ss-powerservice/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-powerservice/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-powerservice/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-powerservice/50_local.conf.inc b/meta-agl/templates/feature/ss-powerservice/50_local.conf.inc new file mode 100644 index 00000000..2eecc646 --- /dev/null +++ b/meta-agl/templates/feature/ss-powerservice/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " agl-service-ss-powerservice" diff --git a/meta-agl/templates/feature/ss-powerservice/README_feature_ss-powerservice.md b/meta-agl/templates/feature/ss-powerservice/README_feature_ss-powerservice.md new file mode 100644 index 00000000..ae52f2f7 --- /dev/null +++ b/meta-agl/templates/feature/ss-powerservice/README_feature_ss-powerservice.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-powerservice +authors: diff --git a/meta-agl/templates/feature/ss-resourcemanager/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-resourcemanager/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-resourcemanager/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-resourcemanager/50_local.conf.inc b/meta-agl/templates/feature/ss-resourcemanager/50_local.conf.inc new file mode 100644 index 00000000..9bfa7637 --- /dev/null +++ b/meta-agl/templates/feature/ss-resourcemanager/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ss-resourcemanager agl-service-ss-resourcemanager" diff --git a/meta-agl/templates/feature/ss-resourcemanager/README_feature_ss-resourcemanager.md b/meta-agl/templates/feature/ss-resourcemanager/README_feature_ss-resourcemanager.md new file mode 100644 index 00000000..a9d42523 --- /dev/null +++ b/meta-agl/templates/feature/ss-resourcemanager/README_feature_ss-resourcemanager.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-resourcemanager +authors: diff --git a/meta-agl/templates/feature/ss-romaccesslibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-romaccesslibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-romaccesslibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-romaccesslibrary/50_local.conf.inc b/meta-agl/templates/feature/ss-romaccesslibrary/50_local.conf.inc new file mode 100644 index 00000000..a28556ce --- /dev/null +++ b/meta-agl/templates/feature/ss-romaccesslibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ss-romaccesslibrary" diff --git a/meta-agl/templates/feature/ss-romaccesslibrary/README_feature_ss-romaccesslibrary.md b/meta-agl/templates/feature/ss-romaccesslibrary/README_feature_ss-romaccesslibrary.md new file mode 100644 index 00000000..0e61e6ed --- /dev/null +++ b/meta-agl/templates/feature/ss-romaccesslibrary/README_feature_ss-romaccesslibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-romaccesslibrary +authors: diff --git a/meta-agl/templates/feature/ss-systemmanager/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-systemmanager/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-systemmanager/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-systemmanager/50_local.conf.inc b/meta-agl/templates/feature/ss-systemmanager/50_local.conf.inc new file mode 100644 index 00000000..36406664 --- /dev/null +++ b/meta-agl/templates/feature/ss-systemmanager/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " agl-service-ss-systemmanager" diff --git a/meta-agl/templates/feature/ss-systemmanager/README_feature_ss-systemmanager.md b/meta-agl/templates/feature/ss-systemmanager/README_feature_ss-systemmanager.md new file mode 100644 index 00000000..7ecb971a --- /dev/null +++ b/meta-agl/templates/feature/ss-systemmanager/README_feature_ss-systemmanager.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-systemmanager +authors: diff --git a/meta-agl/templates/feature/ss-taskmanager/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-taskmanager/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-taskmanager/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-taskmanager/50_local.conf.inc b/meta-agl/templates/feature/ss-taskmanager/50_local.conf.inc new file mode 100644 index 00000000..4fe8b365 --- /dev/null +++ b/meta-agl/templates/feature/ss-taskmanager/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ss-taskmanager agl-service-ss-taskmanager" diff --git a/meta-agl/templates/feature/ss-taskmanager/README_feature_ss-taskmanager.md b/meta-agl/templates/feature/ss-taskmanager/README_feature_ss-taskmanager.md new file mode 100644 index 00000000..8bf420bf --- /dev/null +++ b/meta-agl/templates/feature/ss-taskmanager/README_feature_ss-taskmanager.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-taskmanager +authors: diff --git a/meta-agl/templates/feature/ss-versionlibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/ss-versionlibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/ss-versionlibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/ss-versionlibrary/50_local.conf.inc b/meta-agl/templates/feature/ss-versionlibrary/50_local.conf.inc new file mode 100644 index 00000000..3eff74ff --- /dev/null +++ b/meta-agl/templates/feature/ss-versionlibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " ss-versionlibrary" diff --git a/meta-agl/templates/feature/ss-versionlibrary/README_feature_ss-versionlibrary.md b/meta-agl/templates/feature/ss-versionlibrary/README_feature_ss-versionlibrary.md new file mode 100644 index 00000000..c4d1bccc --- /dev/null +++ b/meta-agl/templates/feature/ss-versionlibrary/README_feature_ss-versionlibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature ss-versionlibrary +authors: diff --git a/meta-agl/templates/feature/vs-positioning/50_bblayers.conf.inc b/meta-agl/templates/feature/vs-positioning/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/vs-positioning/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/vs-positioning/50_local.conf.inc b/meta-agl/templates/feature/vs-positioning/50_local.conf.inc new file mode 100644 index 00000000..375f4bc7 --- /dev/null +++ b/meta-agl/templates/feature/vs-positioning/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " vs-positioning agl-service-vs-positioning" diff --git a/meta-agl/templates/feature/vs-positioning/README_feature_vs-positioning.md b/meta-agl/templates/feature/vs-positioning/README_feature_vs-positioning.md new file mode 100644 index 00000000..ed4ec6ac --- /dev/null +++ b/meta-agl/templates/feature/vs-positioning/README_feature_vs-positioning.md @@ -0,0 +1,3 @@ +--- +description: Feature vs-positioning +authors: diff --git a/meta-agl/templates/feature/vs-positioningbaselibrary/50_bblayers.conf.inc b/meta-agl/templates/feature/vs-positioningbaselibrary/50_bblayers.conf.inc new file mode 100644 index 00000000..94d13d64 --- /dev/null +++ b/meta-agl/templates/feature/vs-positioningbaselibrary/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ " \ + ${METADIR}/meta-agl/meta-agl-basesystem \ +" diff --git a/meta-agl/templates/feature/vs-positioningbaselibrary/50_local.conf.inc b/meta-agl/templates/feature/vs-positioningbaselibrary/50_local.conf.inc new file mode 100644 index 00000000..07d15b84 --- /dev/null +++ b/meta-agl/templates/feature/vs-positioningbaselibrary/50_local.conf.inc @@ -0,0 +1,9 @@ +DISTRO_FEATURES_append = " systemd ${DISTRO_FEATURES_LIBC}" +TOOLCHAIN_HOST_TASK_append += " nativesdk-os-rpclibrary-tool nativesdk-perl-module-app-cpan nativesdk-perl-module-json-pp" + +# add the static lib to SDK toolchain +SDKIMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs tools-debug tools-profile headerfiles-pkgs nativesdk-os-rpclibrary" +SDKIMAGE_FEATURES_remove += " dbg-pkgs" +EXTRA_IMAGE_FEATURES_append += " staticdev-pkgs dev-pkgs dbg-pkgs tools-profile" + +IMAGE_INSTALL_append += " vs-positioningbaselibrary" diff --git a/meta-agl/templates/feature/vs-positioningbaselibrary/README_feature_vs-positioningbaselibrary.md b/meta-agl/templates/feature/vs-positioningbaselibrary/README_feature_vs-positioningbaselibrary.md new file mode 100644 index 00000000..24450c8f --- /dev/null +++ b/meta-agl/templates/feature/vs-positioningbaselibrary/README_feature_vs-positioningbaselibrary.md @@ -0,0 +1,3 @@ +--- +description: Feature vs-positioningbaselibrary +authors: diff --git a/meta-agl/templates/machine/bbe/50_bblayers.conf.inc b/meta-agl/templates/machine/bbe/50_bblayers.conf.inc new file mode 100644 index 00000000..0b42c9bf --- /dev/null +++ b/meta-agl/templates/machine/bbe/50_bblayers.conf.inc @@ -0,0 +1,5 @@ +BBLAYERS =+ " \ + ${METADIR}/bsp/meta-ti \ + ${METADIR}/bsp/meta-sancloud \ + ${METADIR}/bsp/meta-rtlwifi \ + " diff --git a/meta-agl/templates/machine/bbe/50_local.conf.inc b/meta-agl/templates/machine/bbe/50_local.conf.inc new file mode 100644 index 00000000..7f378e5c --- /dev/null +++ b/meta-agl/templates/machine/bbe/50_local.conf.inc @@ -0,0 +1,2 @@ +MACHINE = "bbe" +require conf/include/agl_bbe.inc diff --git a/meta-agl/templates/machine/bbe/README_machine_bbe.md b/meta-agl/templates/machine/bbe/README_machine_bbe.md new file mode 100644 index 00000000..c32f23d4 --- /dev/null +++ b/meta-agl/templates/machine/bbe/README_machine_bbe.md @@ -0,0 +1,9 @@ +--- +description: Machine bbe +authors: Paul Barker +--- + +### Machine bbe + +*Description is missing - please complete file meta-agl/templates/machine/bbe/README_machine_bbe.md* + diff --git a/meta-agl/templates/machine/beaglebone/50_bblayers.conf.inc b/meta-agl/templates/machine/beaglebone/50_bblayers.conf.inc new file mode 100644 index 00000000..f116ca28 --- /dev/null +++ b/meta-agl/templates/machine/beaglebone/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-ti" diff --git a/meta-agl/templates/machine/beaglebone/50_local.conf.inc b/meta-agl/templates/machine/beaglebone/50_local.conf.inc new file mode 100644 index 00000000..54edffef --- /dev/null +++ b/meta-agl/templates/machine/beaglebone/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "beaglebone" +#see meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc +require conf/include/agl_beaglebone.inc diff --git a/meta-agl/templates/machine/beaglebone/README_machine_beaglebone.md b/meta-agl/templates/machine/beaglebone/README_machine_beaglebone.md new file mode 100644 index 00000000..06fbcee2 --- /dev/null +++ b/meta-agl/templates/machine/beaglebone/README_machine_beaglebone.md @@ -0,0 +1,9 @@ +--- +description: Machine beaglebone +authors: Jan-Simon Möller +--- + +### Machine beaglebone + +*Description is missing - please complete file meta-agl/templates/machine/beaglebone/README_machine_beaglebone.md* + diff --git a/meta-agl/templates/machine/cubox-i/40_bblayers.conf.inc b/meta-agl/templates/machine/cubox-i/40_bblayers.conf.inc new file mode 100644 index 00000000..a4323be1 --- /dev/null +++ b/meta-agl/templates/machine/cubox-i/40_bblayers.conf.inc @@ -0,0 +1,6 @@ +# This must be parsed after qt5, etc. layers so that they are correctly +# recognized by meta-freescale/dynamic-layers +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-freescale \ + ${METADIR}/bsp/meta-freescale-3rdparty \ + " diff --git a/meta-agl/templates/machine/cubox-i/50_local.conf.inc b/meta-agl/templates/machine/cubox-i/50_local.conf.inc new file mode 100644 index 00000000..b0835bf6 --- /dev/null +++ b/meta-agl/templates/machine/cubox-i/50_local.conf.inc @@ -0,0 +1,4 @@ +MACHINE = "cubox-i" +#see meta-agl/meta-agl-bsp/conf/include/agl_cubox-i.inc +require conf/include/agl_cubox-i.inc + diff --git a/meta-agl/templates/machine/cubox-i/50_setup.sh b/meta-agl/templates/machine/cubox-i/50_setup.sh new file mode 100644 index 00000000..bb22790d --- /dev/null +++ b/meta-agl/templates/machine/cubox-i/50_setup.sh @@ -0,0 +1,2 @@ +find_and_ack_eula $METADIR/meta-freescale EULA +export EULA_FLAG_NAME="ACCEPT_FSL_EULA" diff --git a/meta-agl/templates/machine/cubox-i/README_machine_cubox-i.md b/meta-agl/templates/machine/cubox-i/README_machine_cubox-i.md new file mode 100644 index 00000000..2d264d5d --- /dev/null +++ b/meta-agl/templates/machine/cubox-i/README_machine_cubox-i.md @@ -0,0 +1,9 @@ +--- +description: Machine cubox-i +authors: Scott Murray +--- + +### Machine cubox-i + +*Description is missing - please complete file meta-agl/templates/machine/cubox-i/README_machine_cubox-i.md* + diff --git a/meta-agl/templates/machine/cyclone5/50_bblayers.conf.inc b/meta-agl/templates/machine/cyclone5/50_bblayers.conf.inc new file mode 100644 index 00000000..857d9f1d --- /dev/null +++ b/meta-agl/templates/machine/cyclone5/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-altera" diff --git a/meta-agl/templates/machine/cyclone5/50_local.conf.inc b/meta-agl/templates/machine/cyclone5/50_local.conf.inc new file mode 100644 index 00000000..a4761ef4 --- /dev/null +++ b/meta-agl/templates/machine/cyclone5/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "cyclone5" +#see meta-agl/meta-agl-bsp/conf/include/agl_cyclone5.inc +require conf/include/agl_cyclone5.inc diff --git a/meta-agl/templates/machine/cyclone5/README_machine_cyclone5.md b/meta-agl/templates/machine/cyclone5/README_machine_cyclone5.md new file mode 100644 index 00000000..da195afa --- /dev/null +++ b/meta-agl/templates/machine/cyclone5/README_machine_cyclone5.md @@ -0,0 +1,9 @@ +--- +description: Machine cyclone5 +authors: Jan-Simon Möller +--- + +### Machine cyclone5 + +*Description is missing - please complete file meta-agl/templates/machine/cyclone5/README_machine_cyclone5.md* + diff --git a/meta-agl/templates/machine/dra7xx-evm/50_bblayers.conf.inc b/meta-agl/templates/machine/dra7xx-evm/50_bblayers.conf.inc new file mode 100644 index 00000000..f116ca28 --- /dev/null +++ b/meta-agl/templates/machine/dra7xx-evm/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-ti" diff --git a/meta-agl/templates/machine/dra7xx-evm/50_local.conf.inc b/meta-agl/templates/machine/dra7xx-evm/50_local.conf.inc new file mode 100644 index 00000000..e43a4f29 --- /dev/null +++ b/meta-agl/templates/machine/dra7xx-evm/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "dra7xx-evm" +#see meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc +require conf/include/agl_dra7xx-evm.inc diff --git a/meta-agl/templates/machine/dra7xx-evm/README_machine_dra7xx-evm.md b/meta-agl/templates/machine/dra7xx-evm/README_machine_dra7xx-evm.md new file mode 100644 index 00000000..8a9a72fb --- /dev/null +++ b/meta-agl/templates/machine/dra7xx-evm/README_machine_dra7xx-evm.md @@ -0,0 +1,9 @@ +--- +description: Machine dra7xx-evm +authors: Jan-Simon Möller , Karthik Ramanan , Kevin Hilman , Ronan Le Martret , Stephane Desneux +--- + +### Machine dra7xx-evm + +*Description is missing - please complete file meta-agl/templates/machine/dra7xx-evm/README_machine_dra7xx-evm.md* + diff --git a/meta-agl/templates/machine/dragonboard-410c/50_bblayers.conf.inc b/meta-agl/templates/machine/dragonboard-410c/50_bblayers.conf.inc new file mode 100644 index 00000000..4a3cae0f --- /dev/null +++ b/meta-agl/templates/machine/dragonboard-410c/50_bblayers.conf.inc @@ -0,0 +1,2 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-qcom" +BBMASK .= "|bsp/meta-qcom/openembedded-layer/recipes-navigation/gpsd" diff --git a/meta-agl/templates/machine/dragonboard-410c/50_local.conf.inc b/meta-agl/templates/machine/dragonboard-410c/50_local.conf.inc new file mode 100644 index 00000000..f717fd8e --- /dev/null +++ b/meta-agl/templates/machine/dragonboard-410c/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "dragonboard-410c" +#see meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc +require conf/include/agl_dragonboard-410c.inc diff --git a/meta-agl/templates/machine/dragonboard-410c/README_machine_dragonboard-410c.md b/meta-agl/templates/machine/dragonboard-410c/README_machine_dragonboard-410c.md new file mode 100644 index 00000000..047e08c2 --- /dev/null +++ b/meta-agl/templates/machine/dragonboard-410c/README_machine_dragonboard-410c.md @@ -0,0 +1,9 @@ +--- +description: Machine dragonboard-410c +authors: Jan-Simon Möller , Kotaro Hashimoto , Stephane Desneux +--- + +### Machine dragonboard-410c + +*Description is missing - please complete file meta-agl/templates/machine/dragonboard-410c/README_machine_dragonboard-410c.md* + diff --git a/meta-agl/templates/machine/dragonboard-820c/50_bblayers.conf.inc b/meta-agl/templates/machine/dragonboard-820c/50_bblayers.conf.inc new file mode 100644 index 00000000..f3b96cbb --- /dev/null +++ b/meta-agl/templates/machine/dragonboard-820c/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-qcom" diff --git a/meta-agl/templates/machine/dragonboard-820c/50_local.conf.inc b/meta-agl/templates/machine/dragonboard-820c/50_local.conf.inc new file mode 100644 index 00000000..1cd53d60 --- /dev/null +++ b/meta-agl/templates/machine/dragonboard-820c/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "dragonboard-820c" +#see meta-agl/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc +require conf/include/agl_dragonboard-820c.inc diff --git a/meta-agl/templates/machine/dragonboard-820c/README_machine_dragonboard-820c.md b/meta-agl/templates/machine/dragonboard-820c/README_machine_dragonboard-820c.md new file mode 100644 index 00000000..73d9532c --- /dev/null +++ b/meta-agl/templates/machine/dragonboard-820c/README_machine_dragonboard-820c.md @@ -0,0 +1,9 @@ +--- +description: Machine dragonboard-820c +authors: Jan-Simon Möller +--- + +### Machine dragonboard-820c + +*Description is missing - please complete file meta-agl/templates/machine/dragonboard-820c/README_machine_dragonboard-820c.md* + diff --git a/meta-agl/templates/machine/ebisu/50_bblayers.conf.inc b/meta-agl/templates/machine/ebisu/50_bblayers.conf.inc new file mode 100644 index 00000000..7b0db440 --- /dev/null +++ b/meta-agl/templates/machine/ebisu/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + " diff --git a/meta-agl/templates/machine/ebisu/50_local.conf.inc b/meta-agl/templates/machine/ebisu/50_local.conf.inc new file mode 100644 index 00000000..e780501a --- /dev/null +++ b/meta-agl/templates/machine/ebisu/50_local.conf.inc @@ -0,0 +1,6 @@ +MACHINE = "ebisu" +#see meta-agl/meta-agl-bsp/conf/include/agl_ebisu.inc +require conf/include/agl_ebisu.inc + +#see meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc +#require conf/include/rcar-gen3-adas.inc diff --git a/meta-agl/templates/machine/ebisu/50_setup.sh b/meta-agl/templates/machine/ebisu/50_setup.sh new file mode 100644 index 00000000..c8471ae0 --- /dev/null +++ b/meta-agl/templates/machine/ebisu/50_setup.sh @@ -0,0 +1,42 @@ +# setup proprietary gfx drivers and multimedia packages +pushd $METADIR 2>/dev/null + +COPY_SCRIPT="$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_proprietary_softwares.sh" +EXTRACT_DIR=$METADIR/binary-tmp +#EBISU_BIN_PATH should contain the path where the .zip archive of E3 binaries is. +#CUSTOM_RENESAS_CONFIG_SCRIPT should contain the custom script needed for setup. If not filled, do not failed, just warn. + +# Check the ebisu binaries path +if [[ ! -d $EBISU_BIN_PATH ]] || [[ $EBISU_BIN_PATH == "" ]]; then + echo "ERROR: E3 Binary path not valid." + echo "HELP: Export the path where the E3 Binaries ZIP file is into 'EBISU_BIN_PATH' then launch the setup again." + echo "HELP: Example: '$ export EBISU_BIN_PATH=`pwd`/ebisu_binaries'" + exit 1 +else + [ -z "$(ls -A $EBISU_BIN_PATH)" ] && echo "ERROR: $EBISU_BIN_PATH is empty. Add the E3 Binaries ZIP file inside and try again." && exit 1 +fi + +if [ -f $COPY_SCRIPT ]; then + # Extract the ZIP into the tmp directory + mkdir -p $EXTRACT_DIR + unzip -q -o $EBISU_BIN_PATH/*.zip -d $EXTRACT_DIR + + cd $METADIR/bsp/meta-renesas-rcar-gen3/ + $COPY_SCRIPT $EXTRACT_DIR + cd .. + + # Clean temp dir + rm -r $EXTRACT_DIR +else + echo "ERROR: Script to copy Renesas proprietary drivers for $MACHINE not found. No additionnal setup to do." + exit 1 +fi + +if [[ ! -z $CUSTOM_RENESAS_CONFIG_SCRIPT ]] && [[ -f $CUSTOM_RENESAS_CONFIG_SCRIPT ]]; then + echo "Launching Renesas custom setup script ($CUSTOM_RENESAS_CONFIG_SCRIPT)..." + $CUSTOM_RENESAS_CONFIG_SCRIPT +else + echo "WARNING: Renesas custom setup script for $MACHINE not found." +fi + +popd 2>/dev/null diff --git a/meta-agl/templates/machine/ebisu/README_machine_ebisu.md b/meta-agl/templates/machine/ebisu/README_machine_ebisu.md new file mode 100644 index 00000000..eb5666ec --- /dev/null +++ b/meta-agl/templates/machine/ebisu/README_machine_ebisu.md @@ -0,0 +1,44 @@ +--- +description: machine ebisu +author: +--- +## Machine 'ebisu' + +### Prepare the build + +Before building the AGL distribution for Renesas 'ebisu' board, it is necessary to prepare the environnement. See [AGL Doc - Initializing Your Build Environment](https://docs.automotivelinux.org/docs/en/master/getting_started/reference/getting-started/image-workflow-initialize-build-environment.html) before going to the next step. + +The 'ebisu' board need some specifics binaries in order to build. These binaries contain Graphics support, specific drivers... They are only delivered by Renesas. +Before setting up the build with `meta-agl/scripts/aglsetup.sh`, the environment variable `EBISU_BIN_PATH` need to be set. This variable specify the path to a folder which contains all ebisu's binaries zip files. + +Moreover, it's possible to launch a custom bash script during the setup. This optional step will be called at the end of the `aglsetup.sh` sequence. This can be used to add a specific configuration to the official setup or add a hotfix. + +Example: +```bash +$ cd $AGL_TOP +$ export EBISU_BIN_PATH=/home/user/Downloads/ebisu_binaries +$ export CUSTOM_RENESAS_CONFIG_SCRIPT=/path/to/my/Renesas_custom_setup_ebisu.sh #optional +$ source meta-agl/scripts/aglsetup.sh -m ebisu agl-demo -f +``` + +### Launch the build + +When your environnment is ready, you can launch the AGL build with `bitbake` : + +```bash +$ cd $AGL_TOP +$ bitbake agl-demo-platform +``` + +### Debugging the board + +To debug the ebisu board, the PC should be connected to the CN25 USB serial port. +And the serial communication's protocol of the terminal software on the PC should be set as follows: + +Parameter | Value +--- | --- +Transfer rate | 115200 bps +Data length | 8 bits +Parity | Not in use +Stop bit | 1 bit +Flow control | Not provided diff --git a/meta-agl/templates/machine/h3-salvator-x/50_bblayers.conf.inc b/meta-agl/templates/machine/h3-salvator-x/50_bblayers.conf.inc new file mode 100644 index 00000000..7b0db440 --- /dev/null +++ b/meta-agl/templates/machine/h3-salvator-x/50_bblayers.conf.inc @@ -0,0 +1,3 @@ +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + " diff --git a/meta-agl/templates/machine/h3-salvator-x/50_local.conf.inc b/meta-agl/templates/machine/h3-salvator-x/50_local.conf.inc new file mode 100644 index 00000000..05cca974 --- /dev/null +++ b/meta-agl/templates/machine/h3-salvator-x/50_local.conf.inc @@ -0,0 +1,4 @@ +MACHINE = "salvator-x" +#see meta-agl/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc +require conf/include/agl_h3-salvator-x.inc + diff --git a/meta-agl/templates/machine/h3-salvator-x/50_setup.sh b/meta-agl/templates/machine/h3-salvator-x/50_setup.sh new file mode 100644 index 00000000..abd2a33a --- /dev/null +++ b/meta-agl/templates/machine/h3-salvator-x/50_setup.sh @@ -0,0 +1,10 @@ +# setup proprietary gfx drivers and multimedia packages +pushd $METADIR 2>/dev/null + +SETUP_MM_SCRIPT=$METADIR/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh +if [ -f $SETUP_MM_SCRIPT ]; then + . $SETUP_MM_SCRIPT + copy_mm_packages +fi + +popd 2>/dev/null diff --git a/meta-agl/templates/machine/h3-salvator-x/README_machine_h3-salvator-x.md b/meta-agl/templates/machine/h3-salvator-x/README_machine_h3-salvator-x.md new file mode 100644 index 00000000..2dcdcd42 --- /dev/null +++ b/meta-agl/templates/machine/h3-salvator-x/README_machine_h3-salvator-x.md @@ -0,0 +1,9 @@ +--- +description: Machine h3-salvator-x +authors: Jan-Simon Möller , Martin Kelly +--- + +### Machine h3-salvator-x + +*Description is missing - please complete file meta-agl/templates/machine/h3-salvator-x/README_machine_h3-salvator-x.md* + diff --git a/meta-agl/templates/machine/h3ulcb-nogfx/50_bblayers.conf.inc b/meta-agl/templates/machine/h3ulcb-nogfx/50_bblayers.conf.inc new file mode 100644 index 00000000..5f410f0f --- /dev/null +++ b/meta-agl/templates/machine/h3ulcb-nogfx/50_bblayers.conf.inc @@ -0,0 +1,4 @@ +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \ + " diff --git a/meta-agl/templates/machine/h3ulcb-nogfx/50_local.conf.inc b/meta-agl/templates/machine/h3ulcb-nogfx/50_local.conf.inc new file mode 100644 index 00000000..4403e6ea --- /dev/null +++ b/meta-agl/templates/machine/h3ulcb-nogfx/50_local.conf.inc @@ -0,0 +1,7 @@ +MACHINE = "h3ulcb" +#see meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc +require conf/include/agl_h3ulcb-nogfx.inc + +# custom inclusion of cogent layer +#see meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc +require conf/include/rcar-gen3-adas.inc diff --git a/meta-agl/templates/machine/h3ulcb-nogfx/README_machine_h3ulcb-nogfx.md b/meta-agl/templates/machine/h3ulcb-nogfx/README_machine_h3ulcb-nogfx.md new file mode 100644 index 00000000..da5d9b73 --- /dev/null +++ b/meta-agl/templates/machine/h3ulcb-nogfx/README_machine_h3ulcb-nogfx.md @@ -0,0 +1,9 @@ +--- +description: Machine h3ulcb-nogfx +authors: Jan-Simon Möller , Kevin Hilman , Ronan Le Martret , Yannick Gicquel +--- + +### Machine h3ulcb-nogfx + +*Description is missing - please complete file meta-agl/templates/machine/m3ulcb-nogfx/README_machine_h3ulcb-nogfx.md* + diff --git a/meta-agl/templates/machine/h3ulcb/50_bblayers.conf.inc b/meta-agl/templates/machine/h3ulcb/50_bblayers.conf.inc new file mode 100644 index 00000000..5f410f0f --- /dev/null +++ b/meta-agl/templates/machine/h3ulcb/50_bblayers.conf.inc @@ -0,0 +1,4 @@ +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \ + " diff --git a/meta-agl/templates/machine/h3ulcb/50_local.conf.inc b/meta-agl/templates/machine/h3ulcb/50_local.conf.inc new file mode 100644 index 00000000..43e11737 --- /dev/null +++ b/meta-agl/templates/machine/h3ulcb/50_local.conf.inc @@ -0,0 +1,7 @@ +MACHINE = "h3ulcb" +#see meta-agl/meta-agl-bsp/conf/include/agl_h3ulcb.inc +require conf/include/agl_h3ulcb.inc + +#see meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc +require conf/include/rcar-gen3-adas.inc + diff --git a/meta-agl/templates/machine/h3ulcb/50_setup.sh b/meta-agl/templates/machine/h3ulcb/50_setup.sh new file mode 100644 index 00000000..abd2a33a --- /dev/null +++ b/meta-agl/templates/machine/h3ulcb/50_setup.sh @@ -0,0 +1,10 @@ +# setup proprietary gfx drivers and multimedia packages +pushd $METADIR 2>/dev/null + +SETUP_MM_SCRIPT=$METADIR/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh +if [ -f $SETUP_MM_SCRIPT ]; then + . $SETUP_MM_SCRIPT + copy_mm_packages +fi + +popd 2>/dev/null diff --git a/meta-agl/templates/machine/h3ulcb/README_machine_h3ulcb.md b/meta-agl/templates/machine/h3ulcb/README_machine_h3ulcb.md new file mode 100644 index 00000000..be3aa0f6 --- /dev/null +++ b/meta-agl/templates/machine/h3ulcb/README_machine_h3ulcb.md @@ -0,0 +1,9 @@ +--- +description: Machine h3ulcb +authors: Jan-Simon Möller , Ronan Le Martret +--- + +### Machine h3ulcb + +*Description is missing - please complete file meta-agl/templates/machine/h3ulcb/README_machine_h3ulcb.md* + diff --git a/meta-agl/templates/machine/hsdk/40_bblayers.conf.inc b/meta-agl/templates/machine/hsdk/40_bblayers.conf.inc new file mode 100644 index 00000000..e3954fef --- /dev/null +++ b/meta-agl/templates/machine/hsdk/40_bblayers.conf.inc @@ -0,0 +1,2 @@ +# Use meta-synopsys layer for ARC HSDK board +BBLAYERS =+ "${METADIR}/bsp/meta-synopsys" diff --git a/meta-agl/templates/machine/hsdk/50_local.conf.inc b/meta-agl/templates/machine/hsdk/50_local.conf.inc new file mode 100644 index 00000000..61f77435 --- /dev/null +++ b/meta-agl/templates/machine/hsdk/50_local.conf.inc @@ -0,0 +1,2 @@ +MACHINE = "hsdk" +require conf/include/agl_hsdk.inc diff --git a/meta-agl/templates/machine/hsdk/README_machine_hsdk.md b/meta-agl/templates/machine/hsdk/README_machine_hsdk.md new file mode 100644 index 00000000..30e56d13 --- /dev/null +++ b/meta-agl/templates/machine/hsdk/README_machine_hsdk.md @@ -0,0 +1,9 @@ +--- +description: Machine hsdk +authors: Evgeniy Didin , Jan-Simon Möller +--- + +### Machine hsdk + +*Description is missing - please complete file meta-agl/templates/machine/hsdk/README_machine_hsdk.md* + diff --git a/meta-agl/templates/machine/imx6qdlsabreauto/40_bblayers.conf.inc b/meta-agl/templates/machine/imx6qdlsabreauto/40_bblayers.conf.inc new file mode 100644 index 00000000..edcb6a3a --- /dev/null +++ b/meta-agl/templates/machine/imx6qdlsabreauto/40_bblayers.conf.inc @@ -0,0 +1,5 @@ +# This must be parsed after qt5, etc. layers so that they are correctly +# recognized by meta-freescale/dynamic-layers +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-freescale \ + " diff --git a/meta-agl/templates/machine/imx6qdlsabreauto/50_local.conf.inc b/meta-agl/templates/machine/imx6qdlsabreauto/50_local.conf.inc new file mode 100644 index 00000000..58e3c7d0 --- /dev/null +++ b/meta-agl/templates/machine/imx6qdlsabreauto/50_local.conf.inc @@ -0,0 +1,4 @@ +MACHINE = "imx6qdlsabreauto" +#see meta-agl/meta-agl-bsp/conf/include/agl_imx6qsabreauto.inc +require conf/include/agl_imx6qdlsabreauto.inc + diff --git a/meta-agl/templates/machine/imx6qdlsabreauto/50_setup.sh b/meta-agl/templates/machine/imx6qdlsabreauto/50_setup.sh new file mode 100644 index 00000000..bb22790d --- /dev/null +++ b/meta-agl/templates/machine/imx6qdlsabreauto/50_setup.sh @@ -0,0 +1,2 @@ +find_and_ack_eula $METADIR/meta-freescale EULA +export EULA_FLAG_NAME="ACCEPT_FSL_EULA" diff --git a/meta-agl/templates/machine/imx6qdlsabreauto/README_machine_imx6qdlsabreauto.md b/meta-agl/templates/machine/imx6qdlsabreauto/README_machine_imx6qdlsabreauto.md new file mode 100644 index 00000000..6b354e9f --- /dev/null +++ b/meta-agl/templates/machine/imx6qdlsabreauto/README_machine_imx6qdlsabreauto.md @@ -0,0 +1,9 @@ +--- +description: Machine imx6qdlsabreauto +authors: Bechir Mghirbi , Jan-Simon Möller +--- + +### Machine imx6qdlsabreauto + +*Description is missing - please complete file meta-agl/templates/machine/imx6qdlsabreauto/README_machine_imx6qdlsabreauto.md* + diff --git a/meta-agl/templates/machine/intel-corei7-64/50_bblayers.conf.inc b/meta-agl/templates/machine/intel-corei7-64/50_bblayers.conf.inc new file mode 100644 index 00000000..8fd7af53 --- /dev/null +++ b/meta-agl/templates/machine/intel-corei7-64/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-intel" diff --git a/meta-agl/templates/machine/intel-corei7-64/50_local.conf.inc b/meta-agl/templates/machine/intel-corei7-64/50_local.conf.inc new file mode 100644 index 00000000..48d26c56 --- /dev/null +++ b/meta-agl/templates/machine/intel-corei7-64/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "intel-corei7-64" +#see meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc +require conf/include/agl_intel-corei7-64.inc diff --git a/meta-agl/templates/machine/intel-corei7-64/README_machine_intel-corei7-64.md b/meta-agl/templates/machine/intel-corei7-64/README_machine_intel-corei7-64.md new file mode 100644 index 00000000..5cab9e8f --- /dev/null +++ b/meta-agl/templates/machine/intel-corei7-64/README_machine_intel-corei7-64.md @@ -0,0 +1,9 @@ +--- +description: Machine intel-corei7-64 +authors: Dominig ar Foll (Intel Open Source) , Jan-Simon Moeller , Jan-Simon Möller , Ronan Le Martret , Stephane Desneux +--- + +### Machine intel-corei7-64 + +*Description is missing - please complete file meta-agl/templates/machine/intel-corei7-64/README_machine_intel-corei7-64.md* + diff --git a/meta-agl/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc b/meta-agl/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc new file mode 100644 index 00000000..5f410f0f --- /dev/null +++ b/meta-agl/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc @@ -0,0 +1,4 @@ +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \ + " diff --git a/meta-agl/templates/machine/m3ulcb-nogfx/50_local.conf.inc b/meta-agl/templates/machine/m3ulcb-nogfx/50_local.conf.inc new file mode 100644 index 00000000..3fd5d6ee --- /dev/null +++ b/meta-agl/templates/machine/m3ulcb-nogfx/50_local.conf.inc @@ -0,0 +1,6 @@ +MACHINE = "m3ulcb" +#see meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc +require conf/include/agl_m3ulcb-nogfx.inc + +#see meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc +require conf/include/rcar-gen3-adas.inc diff --git a/meta-agl/templates/machine/m3ulcb-nogfx/README_machine_m3ulcb-nogfx.md b/meta-agl/templates/machine/m3ulcb-nogfx/README_machine_m3ulcb-nogfx.md new file mode 100644 index 00000000..1e5140c2 --- /dev/null +++ b/meta-agl/templates/machine/m3ulcb-nogfx/README_machine_m3ulcb-nogfx.md @@ -0,0 +1,9 @@ +--- +description: Machine m3ulcb-nogfx +authors: Jan-Simon Möller , Kevin Hilman , Ronan Le Martret , Yannick Gicquel +--- + +### Machine m3ulcb-nogfx + +*Description is missing - please complete file meta-agl/templates/machine/m3ulcb-nogfx/README_machine_m3ulcb-nogfx.md* + diff --git a/meta-agl/templates/machine/m3ulcb/50_bblayers.conf.inc b/meta-agl/templates/machine/m3ulcb/50_bblayers.conf.inc new file mode 100644 index 00000000..5f410f0f --- /dev/null +++ b/meta-agl/templates/machine/m3ulcb/50_bblayers.conf.inc @@ -0,0 +1,4 @@ +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \ + " diff --git a/meta-agl/templates/machine/m3ulcb/50_local.conf.inc b/meta-agl/templates/machine/m3ulcb/50_local.conf.inc new file mode 100644 index 00000000..e2fe41a8 --- /dev/null +++ b/meta-agl/templates/machine/m3ulcb/50_local.conf.inc @@ -0,0 +1,6 @@ +MACHINE = "m3ulcb" +#see meta-agl/meta-agl-bsp/conf/include/agl_m3ulcb.inc +require conf/include/agl_m3ulcb.inc + +#see meta-agl/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc +require conf/include/rcar-gen3-adas.inc diff --git a/meta-agl/templates/machine/m3ulcb/50_setup.sh b/meta-agl/templates/machine/m3ulcb/50_setup.sh new file mode 100644 index 00000000..abd2a33a --- /dev/null +++ b/meta-agl/templates/machine/m3ulcb/50_setup.sh @@ -0,0 +1,10 @@ +# setup proprietary gfx drivers and multimedia packages +pushd $METADIR 2>/dev/null + +SETUP_MM_SCRIPT=$METADIR/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh +if [ -f $SETUP_MM_SCRIPT ]; then + . $SETUP_MM_SCRIPT + copy_mm_packages +fi + +popd 2>/dev/null diff --git a/meta-agl/templates/machine/m3ulcb/README_machine_m3ulcb.md b/meta-agl/templates/machine/m3ulcb/README_machine_m3ulcb.md new file mode 100644 index 00000000..3b5e0f45 --- /dev/null +++ b/meta-agl/templates/machine/m3ulcb/README_machine_m3ulcb.md @@ -0,0 +1,9 @@ +--- +description: Machine m3ulcb +authors: Jan-Simon Möller , Ronan Le Martret , Yannick Gicquel +--- + +### Machine m3ulcb + +*Description is missing - please complete file meta-agl/templates/machine/m3ulcb/README_machine_m3ulcb.md* + diff --git a/meta-agl/templates/machine/nitrogen6x/40_bblayers.conf.inc b/meta-agl/templates/machine/nitrogen6x/40_bblayers.conf.inc new file mode 100644 index 00000000..a4323be1 --- /dev/null +++ b/meta-agl/templates/machine/nitrogen6x/40_bblayers.conf.inc @@ -0,0 +1,6 @@ +# This must be parsed after qt5, etc. layers so that they are correctly +# recognized by meta-freescale/dynamic-layers +BBLAYERS =+ "\ + ${METADIR}/bsp/meta-freescale \ + ${METADIR}/bsp/meta-freescale-3rdparty \ + " diff --git a/meta-agl/templates/machine/nitrogen6x/50_local.conf.inc b/meta-agl/templates/machine/nitrogen6x/50_local.conf.inc new file mode 100644 index 00000000..f8178bbd --- /dev/null +++ b/meta-agl/templates/machine/nitrogen6x/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "nitrogen6x" +#see meta-agl/meta-agl-bsp/conf/include/agl_nitrogen6x.inc +require conf/include/agl_nitrogen6x.inc diff --git a/meta-agl/templates/machine/nitrogen6x/50_setup.sh b/meta-agl/templates/machine/nitrogen6x/50_setup.sh new file mode 100644 index 00000000..bb22790d --- /dev/null +++ b/meta-agl/templates/machine/nitrogen6x/50_setup.sh @@ -0,0 +1,2 @@ +find_and_ack_eula $METADIR/meta-freescale EULA +export EULA_FLAG_NAME="ACCEPT_FSL_EULA" diff --git a/meta-agl/templates/machine/nitrogen6x/README_machine_nitrogen6x.md b/meta-agl/templates/machine/nitrogen6x/README_machine_nitrogen6x.md new file mode 100644 index 00000000..9994de05 --- /dev/null +++ b/meta-agl/templates/machine/nitrogen6x/README_machine_nitrogen6x.md @@ -0,0 +1,9 @@ +--- +description: Machine nitrogen6x +authors: Jan-Simon Möller , Mihail Grigorov , Nathan Illerbrun , Scott Murray +--- + +### Machine nitrogen6x + +*Description is missing - please complete file meta-agl/templates/machine/nitrogen6x/README_machine_nitrogen6x.md* + diff --git a/meta-agl/templates/machine/qemuarm/50_local.conf.inc b/meta-agl/templates/machine/qemuarm/50_local.conf.inc new file mode 100644 index 00000000..84204fb8 --- /dev/null +++ b/meta-agl/templates/machine/qemuarm/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "qemuarm" +#see meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc +require conf/include/agl_qemuarm.inc diff --git a/meta-agl/templates/machine/qemuarm/README_machine_qemuarm.md b/meta-agl/templates/machine/qemuarm/README_machine_qemuarm.md new file mode 100644 index 00000000..42e5a5cd --- /dev/null +++ b/meta-agl/templates/machine/qemuarm/README_machine_qemuarm.md @@ -0,0 +1,9 @@ +--- +description: Machine qemuarm +authors: Jan-Simon Möller +--- + +### Machine qemuarm + +*Description is missing - please complete file meta-agl/templates/machine/qemuarm/README_machine_qemuarm.md* + diff --git a/meta-agl/templates/machine/qemuarm64/50_local.conf.inc b/meta-agl/templates/machine/qemuarm64/50_local.conf.inc new file mode 100644 index 00000000..65605b53 --- /dev/null +++ b/meta-agl/templates/machine/qemuarm64/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "qemuarm64" +#see meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc +require conf/include/agl_qemuarm64.inc diff --git a/meta-agl/templates/machine/qemuarm64/README_machine_qemuarm64.md b/meta-agl/templates/machine/qemuarm64/README_machine_qemuarm64.md new file mode 100644 index 00000000..6fc8c69b --- /dev/null +++ b/meta-agl/templates/machine/qemuarm64/README_machine_qemuarm64.md @@ -0,0 +1,9 @@ +--- +description: Machine qemuarm64 +authors: Jan-Simon Möller +--- + +### Machine qemuarm64 + +*Description is missing - please complete file meta-agl/templates/machine/qemuarm64/README_machine_qemuarm64.md* + diff --git a/meta-agl/templates/machine/qemux86-64/50_local.conf.inc b/meta-agl/templates/machine/qemux86-64/50_local.conf.inc new file mode 100644 index 00000000..497a3467 --- /dev/null +++ b/meta-agl/templates/machine/qemux86-64/50_local.conf.inc @@ -0,0 +1,3 @@ +MACHINE = "qemux86-64" +#see meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc +require conf/include/agl_qemux86-64.inc diff --git a/meta-agl/templates/machine/qemux86-64/README_machine_qemux86-64.md b/meta-agl/templates/machine/qemux86-64/README_machine_qemux86-64.md new file mode 100644 index 00000000..88b6375b --- /dev/null +++ b/meta-agl/templates/machine/qemux86-64/README_machine_qemux86-64.md @@ -0,0 +1,9 @@ +--- +description: Machine qemux86-64 +authors: Anton Gerasimov , Kevin Hilman , Ronan Le Martret , Stephane Desneux +--- + +### Machine qemux86-64 + +*Description is missing - please complete file meta-agl/templates/machine/qemux86-64/README_machine_qemux86-64.md* + diff --git a/meta-agl/templates/machine/raspberrypi3/50_bblayers.conf.inc b/meta-agl/templates/machine/raspberrypi3/50_bblayers.conf.inc new file mode 100644 index 00000000..2e677dd8 --- /dev/null +++ b/meta-agl/templates/machine/raspberrypi3/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-raspberrypi" diff --git a/meta-agl/templates/machine/raspberrypi3/50_local.conf.inc b/meta-agl/templates/machine/raspberrypi3/50_local.conf.inc new file mode 100644 index 00000000..dcaf5e9d --- /dev/null +++ b/meta-agl/templates/machine/raspberrypi3/50_local.conf.inc @@ -0,0 +1,7 @@ +MACHINE = "raspberrypi3" +#see meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc +require conf/include/agl_raspberrypi3.inc + +# Set appropriate version of Mesa for Raspberry Pi 3 and +# ignore the newer version with has been added for Raspberry Pi 4 +PREFERRED_VERSION_mesa_raspberrypi3 = "18.1%" diff --git a/meta-agl/templates/machine/raspberrypi3/README_machine_raspberrypi3.md b/meta-agl/templates/machine/raspberrypi3/README_machine_raspberrypi3.md new file mode 100644 index 00000000..be5c9bb5 --- /dev/null +++ b/meta-agl/templates/machine/raspberrypi3/README_machine_raspberrypi3.md @@ -0,0 +1,9 @@ +--- +description: Machine raspberrypi3 +authors: Anton Gerasimov , Jan-Simon Möller , Kevin Hilman , Leon Anavi , Matt Ranostay , Ronan Le Martret , Stephane Desneux , Tom Rini +--- + +### Machine raspberrypi3 + +*Description is missing - please complete file meta-agl/templates/machine/raspberrypi3/README_machine_raspberrypi3.md* + diff --git a/meta-agl/templates/machine/raspberrypi4/50_bblayers.conf.inc b/meta-agl/templates/machine/raspberrypi4/50_bblayers.conf.inc new file mode 100644 index 00000000..2e677dd8 --- /dev/null +++ b/meta-agl/templates/machine/raspberrypi4/50_bblayers.conf.inc @@ -0,0 +1 @@ +BBLAYERS =+ "${METADIR}/bsp/meta-raspberrypi" diff --git a/meta-agl/templates/machine/raspberrypi4/50_local.conf.inc b/meta-agl/templates/machine/raspberrypi4/50_local.conf.inc new file mode 100644 index 00000000..27a8bf2a --- /dev/null +++ b/meta-agl/templates/machine/raspberrypi4/50_local.conf.inc @@ -0,0 +1,8 @@ +MACHINE = "raspberrypi4" +#see meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc +require conf/include/agl_raspberrypi3.inc + +PREFERRED_VERSION_linux-raspberrypi_raspberrypi4 = "4.19%" + +# Set appropriate version of Mesa for Raspberry Pi 4 +PREFERRED_VERSION_mesa_raspberrypi4 = "19.1%" -- cgit 1.2.3-korg