Permalink
Browse files

Firmware files now taken from userland repo. Added hello_jpeg demo (t…

…hanks to Matt Ownby and Anthong Sale)
  • Loading branch information...
1 parent 51bc0d8 commit 34ad764cd5947c34fc1964838143de59f31cf22e Dom Cobley committed Nov 13, 2012
Showing with 1,167 additions and 973 deletions.
  1. BIN vc/hardfp/opt/vc/bin/tvservice
  2. BIN vc/hardfp/opt/vc/lib/libEGL.so
  3. BIN vc/hardfp/opt/vc/lib/libEGL_static.a
  4. BIN vc/hardfp/opt/vc/lib/libGLESv1_CM.so
  5. BIN vc/hardfp/opt/vc/lib/libGLESv2.so
  6. BIN vc/hardfp/opt/vc/lib/libGLESv2_static.a
  7. BIN vc/hardfp/opt/vc/lib/libWFC.so
  8. BIN vc/hardfp/opt/vc/lib/libbcm_host.so
  9. BIN vc/hardfp/opt/vc/lib/libkhrn_client.a
  10. BIN vc/hardfp/opt/vc/lib/libkhrn_static.a
  11. BIN vc/hardfp/opt/vc/lib/libvcfiled_check.a
  12. BIN vc/hardfp/opt/vc/lib/libvchostif.a
  13. BIN vc/hardfp/opt/vc/lib/libvmcs_rpc_client.a
  14. +0 −279 vc/hardfp/opt/vc/sbin/install_vmcs
  15. BIN vc/hardfp/opt/vc/sbin/vcfiled
  16. +0 −8 vc/sdk/opt/vc/include/interface/vchi/vchi.h
  17. +26 −19 vc/sdk/opt/vc/include/interface/vchi/vchi_autoservice.h
  18. +15 −2 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_bi.h
  19. +0 −6 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_bi_ipc_shared_mem.h
  20. +15 −2 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_bivcm.h
  21. +3 −3 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_cfg.h
  22. +2 −23 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_core.h
  23. +6 −5 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_if.h
  24. +3 −3 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_ioctl.h
  25. +1 −3 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_test.h
  26. +1 −2 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_util.h
  27. +2 −8 vc/sdk/opt/vc/include/interface/vchiq_arm/vchiq_vc.h
  28. +1 −7 vc/sdk/opt/vc/include/interface/vcos/generic/vcos_joinable_thread_from_plain.h
  29. +14 −47 vc/sdk/opt/vc/include/interface/vcos/pthreads/vcos_platform.h
  30. +16 −10 vc/sdk/opt/vc/include/interface/vcos/pthreads/vcos_platform_types.h
  31. +2 −30 vc/sdk/opt/vc/include/interface/vcos/vcos_assert.h
  32. +0 −8 vc/sdk/opt/vc/include/interface/vcos/vcos_cmd.h
  33. +3 −50 vc/sdk/opt/vc/include/interface/vcos/vcos_init.h
  34. +96 −8 vc/sdk/opt/vc/include/interface/vcos/vcos_inttypes.h
  35. +9 −25 vc/sdk/opt/vc/include/interface/vcos/vcos_logging.h
  36. +0 −4 vc/sdk/opt/vc/include/interface/vcos/vcos_logging_control.h
  37. +1 −3 vc/sdk/opt/vc/include/interface/vcos/vcos_lowlevel_thread.h
  38. +2 −6 vc/sdk/opt/vc/include/interface/vcos/vcos_msgqueue.h
  39. +1 −3 vc/sdk/opt/vc/include/interface/vcos/vcos_semaphore.h
  40. +4 −7 vc/sdk/opt/vc/include/interface/vcos/vcos_stdbool.h
  41. +135 −30 vc/sdk/opt/vc/include/interface/vcos/vcos_stdint.h
  42. +2 −35 vc/sdk/opt/vc/include/interface/vcos/vcos_string.h
  43. +1 −4 vc/sdk/opt/vc/include/interface/vcos/vcos_thread.h
  44. +1 −3 vc/sdk/opt/vc/include/interface/vcos/vcos_timer.h
  45. +1 −2 vc/sdk/opt/vc/include/interface/vcos/vcos_types.h
  46. +1 −10 vc/sdk/opt/vc/include/interface/vctypes/vc_display_types.h
  47. +0 −7 vc/sdk/opt/vc/include/interface/vmcs_host/vc_dispmanx_types.h
  48. +0 −1 vc/sdk/opt/vc/include/interface/vmcs_host/vc_fileservice_defs.h
  49. +0 −2 vc/sdk/opt/vc/include/interface/vmcs_host/vc_ilcs_defs.h
  50. +1 −1 vc/sdk/opt/vc/include/interface/vmcs_host/vc_tvservice.h
  51. +0 −2 vc/sdk/opt/vc/include/interface/vmcs_host/vc_tvservice_defs.h
  52. +5 −1 vc/sdk/opt/vc/src/hello_pi/Makefile.include
  53. +1 −1 vc/sdk/opt/vc/src/hello_pi/hello_encode/Makefile
  54. +6 −0 vc/sdk/opt/vc/src/hello_pi/hello_jpeg/Makefile
  55. +696 −0 vc/sdk/opt/vc/src/hello_pi/hello_jpeg/jpeg.c
  56. +68 −0 vc/sdk/opt/vc/src/hello_pi/hello_jpeg/jpeg.h
  57. +23 −23 vc/sdk/opt/vc/src/hello_pi/hello_tiger/license.txt
  58. +1 −0 vc/sdk/opt/vc/src/hello_pi/hello_tiger/main.c
  59. +2 −1 vc/sdk/opt/vc/src/hello_pi/rebuild.sh
  60. BIN vc/softfp/opt/vc/bin/tvservice
  61. BIN vc/softfp/opt/vc/lib/libEGL.so
  62. BIN vc/softfp/opt/vc/lib/libEGL_static.a
  63. BIN vc/softfp/opt/vc/lib/libGLESv1_CM.so
  64. BIN vc/softfp/opt/vc/lib/libGLESv2.so
  65. BIN vc/softfp/opt/vc/lib/libGLESv2_static.a
  66. BIN vc/softfp/opt/vc/lib/libWFC.so
  67. BIN vc/softfp/opt/vc/lib/libbcm_host.so
  68. BIN vc/softfp/opt/vc/lib/libkhrn_client.a
  69. BIN vc/softfp/opt/vc/lib/libkhrn_static.a
  70. BIN vc/softfp/opt/vc/lib/libvcfiled_check.a
  71. BIN vc/softfp/opt/vc/lib/libvchostif.a
  72. BIN vc/softfp/opt/vc/lib/libvmcs_rpc_client.a
  73. +0 −279 vc/softfp/opt/vc/sbin/install_vmcs
  74. BIN vc/softfp/opt/vc/sbin/vcfiled
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,279 +0,0 @@
-#!/bin/sh
-
-# edit this file only at <vc4>\makefiles\cmake\scripts\install_vmcs
-# update (via root staging area) using cmake {args} <vc4>, etc.
-
-cmd="$0"
-cmd_dir="`dirname -- "$cmd"`"
-cmd_dir=`(cd "$cmd_dir">/dev/null;pwd)`
-cmd_name="`basename -- $cmd`"
-
-# this command should be run as root from ${dir_install}/sbin
-
-dir_install="`dirname -- "$cmd_dir"`"
-dir_data="$dir_install/share/install"
-dir_sd="/sd"
-
-do_force=false
-
-# install contents of $dir_data into the system
-
-if [ "`whoami`" != "root" ]; then
- echo "$cmd_name: you need to be root to execute this command">&2
- exit 1
-fi
-
-[ "_$1" = "_-f" -o "_$1" = "_--force" ] && { do_force=true; shift; }
-
-
-# Uninstall script
-
-#################################
-#################################
-
-create_uninstall()
-{ cat <<'EOF'
-#!/bin/sh
-
-####
-#### WARNING: this script is written and overwritten by $cmd - don't edit
-####
-
-cmd="$0"
-cmd_dir="`dirname -- "$cmd"`"
-cmd_dir=`(cd "$cmd_dir">/dev/null;pwd)`
-cmd_name="`basename -- "$cmd"`"
-
-# this command should be run from <dir_install>/sbin
-
-if [ "`whoami`" != "root" ]; then
- echo "$cmd_name: you need to be root to execute this command">&2
- exit 1
-fi
-
-# uninstall the new libraries
-
-if [ -f /etc/ld.so.conf.d/vmcs.conf ]; then
- rm /etc/ld.so.conf.d/vmcs.conf
- ldconfig
-fi
-
-vcfiled=/etc/init.d/vcfiled
-if [ -x $vcfiled ]; then
- $vcfiled stop
- if update-rc.d -f vcfiled remove; then
- rm -f $vcfiled
- else
- echo "$cmd_name: failed to install $vcfiled, sorry">&2
- fi
-fi
-
-EOF
-}
-
-
-#################################
-#################################
-
-rc=0
-
-# install un-installation script
-
-if [ -f "$cmd_dir/uninstall_vmcs" ]; then
- if mv -f "$cmd_dir/uninstall_vmcs" "$cmd_dir/uninstall_last_vmcs"; then
- echo "$cmd_name: previous installation's uninstallation script saved in">&2
- echo "$cmd_name: $cmd_dir/uninstall_last_vmcs">&2
- else
- echo "$cmd_name: failed to rename previous installation's uninstallation script">&2
- fi
-fi
-create_uninstall > "$cmd_dir/uninstall_vmcs"
-chmod +x "$cmd_dir/uninstall_vmcs"
-
-# install the new libraries
-
-if $do_force || [ -d /etc/ld.so.conf.d ]; then
- if $do_force || [ ! -f /etc/ld.so.conf.d/vmcs.conf ]; then
- if [ ! -f "$dir_data/vmcs.conf" ]; then
- echo "$cmd_name: expected file missing in $dir_data/vmcs.conf">&2
- rc=1
- else
- mkdir -p /etc/ld.so.conf.d
- cp -af "$dir_data/vmcs.conf" /etc/ld.so.conf.d/vmcs.conf
- ldconfig
- fi
- fi
-else
- echo "$cmd_name: don't know how to install libraries, sorry">&2
- rc=2
-fi
-
-# install VC file daemon
-
-if $do_force || [ ! -f /etc/init.d/vcfiled ]; then
- if [ ! -f "$dir_data/vcfiled" ]; then
- echo "$cmd_name: expected file missing in $dir_data/vcfiled">&2
- rc=3
- else
- cp -af "$dir_data/vcfiled" /etc/init.d/vcfiled
- if ! update-rc.d vcfiled defaults 16; then
- echo "$cmd_name: don't know how to install new /etc/init.d/vcfiled, sorry">&2
- rc=4
- elif ! update-rc.d vcfiled enable; then
- echo "$cmd_name: failed to enable new /etc/init.d/vcfiled, sorry">&2
- rc=5
- fi
- fi
-fi
-
-# make sure vchiq device finder is installed
-
-if $do_force || [ ! -f /etc/init.d/vchiq ]; then
- if [ ! -f "$dir_data/vchiq" ]; then
- echo "$cmd_name: expected file missing in $dir_data/vchiq">&2
- else
- cp -af "$dir_data/vchiq" /etc/init.d/vchiq
- if ! update-rc.d vchiq defaults 12; then
- echo "$cmd_name: don't know how to install new /etc/init.d/vchiq, sorry">&2
- rc=6
- elif ! update-rc.d vchiq enable; then
- echo "$cmd_name: failed to enable new /etc/init.d/vchiq, sorry">&2
- rc=7
- fi
- fi
-fi
-
-# set up a module directory from SD card if possible
-
-current_moddir=/lib/modules
-pkg_moddir=${dir_install}$current_moddir
-sd_moddir=/boot$current_moddir
-
-if [ -h "$pkg_moddir" ]; then
- # this should never have been made into a symbolic link - it will mean
- # different things on the ARM and the build machines
- # Unfortunately a previous version of this script made it symbolic
- rm "$pkg_moddir"
- echo "------------------------"
- echo "$cmd_name: Damage to $pkg_moddir caused by previous script version has"
- echo "$cmd_name: been corrected. Sorry, but you have to re-build the "
- echo "$cmd_name: vchiq module now"
- echo "------------------------"
-fi
-
-if $do_force || [ ! -f "$pkg_moddir" ]; then
- if [ -d "$sd_moddir" ]; then
- echo "$cmd_name: Installing any newer modules from SD card"
- cp -auT "$sd_moddir" "$current_moddir"
- fi
-fi
-
-# install the vchiq module from install dir (if present)
-
-current_mod=${current_moddir}/`uname -r`/extra/vchiq.ko
-pkg_mod=${dir_install}$current_mod
-
-if [ -f "$pkg_mod" ]; then
- if $do_force || \
- [ ! -f "$current_mod" ] || \
- [ "$pkg_mod" -nt "$current_mod" ]; then
- mkdir -p "`dirname -- "$current_mod"`"
- # copy new vchiq module over - try to keep same date for debugging
- if cp -af "$pkg_mod" "$current_mod"; then
- echo "$cmd_name: updated vchiq module taken from $pkg_moddir">&2
- else
- echo "$cmd_name: couldn't overwrite $current_mod">&2
- rc=8
- fi
- fi
-fi
-
-if [ ! -f "$current_mod" ]; then
- echo "$cmd_name: no vchiq module found for this kernel (`uname -r`)">&2
- rc=9
-else
- # make sure the module is loaded automatically when we reboot
- # before the vcqhiq script runs by placing its name in /etc/modules
- # (This is suppose to have been done already in mklinux)
- if ! grep "^vchiq$" /etc/modules>/dev/null; then
- echo vchiq >> /etc/modules
- fi
-fi
-
-if $do_force || [ ! -f "${current_moddir}/`uname -r`/modules.dep" ]; then
- depmod
-fi
-
-# install vlls
-
-if $do_force || [ ! -f "$dir_sd/vlls" ]; then
- if [ -d /boot/vlls/ ]; then
- # remove $dir_sd/vlls assuming it is a symbolic link
- rm -f "$dir_sd/vlls"
- ln -s /boot/vlls "$dir_sd/vlls"
- else
- echo "$cmd_name: Warning - no VLLs in $dir_sd/vlls">&2
- echo "$cmd_name: installation would normally link this location to /boot/vlls"
- echo "$cmd_name: ensure VLLs are present in /boot/vlls (probably the "
- echo "$cmd_name: DOS partition of your SD card), and rerun this "
- echo "$cmd_name: installation">&2
- fi
-fi
-
-# warn about empty media files ... player X needs some
-
-if [ -d "$dir_install/mediafiles/" -a ! -d "$dir_sd/mediafiles" ]; then
- rm -f "$dir_sd/mediafiles"
- ln -s "$dir_install/mediafiles" "$dir_sd/mediafiles"
-elif [ ! -d "$dir_sd/mediafiles/" ]; then
- echo "$cmd_name: warning - $dir_sd/mediafiles does not exist, some applications require this">&2
-else
- filecount=`ls "$dir_sd/mediafiles/" | wc -l`
- if [ -z "$filecount" -o $filecount -eq 0 ]; then
- echo "$cmd_name: warning - /sd/mediafiles is empty, some apps need content">&2
- fi
-fi
-
-
-# start up anything we rely on
-
-if [ -x /sbin/modprobe -a -f /proc/modules ]; then
- modprobe -q vchiq
-fi
-
-if [ -x /etc/init.d/vchiq ]; then
- if ! /etc/init.d/vchiq start; then
- echo "$cmd_name: /etc/init.d/vchiq failed - rc $?"
- rc=10
- fi
-else
- echo "$cmd_name: couldn't find expected file - /etc/init.d/vchiq">&2
- rc=11
-fi
-
-if [ -x /etc/init.d/vcfiled ]; then
- if ! /etc/init.d/vcfiled start; then
- echo "$cmd_name: /etc/init.d/vcfiled failed - rc $?"
- rc=12
- elif ! pidof vcfiled>/dev/null; then
- echo "$cmd_name: vcfiled daemon not started"
- if [ ! -x "${dir_install}/sbin/vcfiled" ]; then
- echo "$cmd_name: ${dir_install}/sbin/vcfiled missing or bad?"
- rc=13
- elif ! head -0 /dev/vchiq >/dev/null; then
- echo "$cmd_name: /dev/vchiq bad?"
- echo "$cmd_name: vchiq module file information -"
- ls -l "$current_mod"
- rc=14
- else
- echo "$cmd_name: /etc/init.d/vcfiled bad?"
- rc=15
- fi
- fi
-else
- echo "$cmd_name: couldn't find expected file - /etc/init.d/vcfiled">&2
- rc=16
-fi
-
-exit $rc
-
Binary file not shown.
@@ -51,13 +51,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define VCHI_BULK_ALIGNED(x) (((unsigned long)(x) & (VCHI_BULK_ALIGN-1)) == 0)
#endif
-typedef struct
-{
- uint32_t version;
- uint32_t version_min;
-} VCHI_VERSION_T;
-#define VCHI_VERSION(v_) { v_, v_ }
-#define VCHI_VERSION_EX(v_,m_) { v_, m_ }
typedef enum
{
@@ -122,7 +115,6 @@ typedef struct
// structure used to provide the information needed to open a server or a client
typedef struct {
- VCHI_VERSION_T version;
vcos_fourcc_t service_id;
VCHI_CONNECTION_T *connection;
uint32_t rx_fifo_size;
@@ -46,38 +46,45 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @param vchiq The VCHIQ handle.
* @return 0 on success
*/
+#ifdef USE_VCHIQ_ARM
+typedef int32_t (*VCHIQ_SERVICE_AUTOINIT)(VCHIQ_INSTANCE_T vchiq);
+typedef struct vchiq_service_info_tag {
+ /* Service initialisation function */
+ VCHIQ_SERVICE_AUTOINIT init;
-typedef enum {
- VCHI_API_VCHI,
- VCHI_API_VCHIQ
-} VCHI_API_ID;
+ /* Name of service for debugging */
+ const char* name;
-typedef void (*VCHI_AUTO_ENTRY)(void*);
+} VCHIQ_SERVICE_INFO_T;
+#endif
+typedef int32_t (*VCHI_SERVICE_AUTOINIT)(VCHI_INSTANCE_T vchiq);
typedef struct vchi_service_info_tag {
- VCHI_API_ID api;
- VCHI_AUTO_ENTRY entry;
- const char *name;
-} VCHI_SERVICE_INFO_T;
+ /* Service initialisation function */
+ VCHI_SERVICE_AUTOINIT init;
-#ifdef USE_VCHIQ_ARM
-typedef int32_t (*VCHIQ_SERVICE_AUTOINIT)(VCHIQ_INSTANCE_T vchiq);
-#endif
+ /* Name of service for debugging */
+ const char* name;
-typedef int32_t (*VCHI_SERVICE_AUTOINIT)(VCHI_INSTANCE_T vchiq, int num_connections, VCHI_CONNECTION_T **connections);
+} VCHI_SERVICE_INFO_T;
/**
* Declare one of these statically.
+ *
+ * To stop the linker 'optimizing' out the auto registration structures
+ * there must be a reference to
+ * <init>_info_p in dldummy.c
+ * Create this by specifying this as the prototype in applications/vmcs/components/other.mk
*/
#define VCHIQ_AUTO_REGISTER_SERVICE(name,init) \
- pragma Data(LIT, ".init.vchiq_services"); \
- static const VCHI_SERVICE_INFO_T init##_info = {VCHI_API_VCHIQ,(VCHI_AUTO_ENTRY)init,name}; \
+ pragma Data(LIT, ".vchiq_services"); \
+ static const VCHIQ_SERVICE_INFO_T init##_info = {init,name}; \
pragma Data; \
- const VCHI_SERVICE_INFO_T *init##_info_p(void) { return &init##_info; }
+ const VCHIQ_SERVICE_INFO_T *init##_info_p(void) { return &init##_info; }
-#define VCHI_AUTO_REGISTER_SERVICE(name,init) \
- pragma Data(LIT, ".init.vchiq_services"); \
- static const VCHI_SERVICE_INFO_T init##_info = {VCHI_API_VCHI,(VCHI_AUTO_ENTRY)init,name}; \
+#define VCHI_AUTO_REGISTER_SERVICE(name) \
+ pragma Data(LIT, ".vchiq_services"); \
+ const const VCHI_SERVICE_INFO_T init##_info = {init,name}; \
pragma Data; \
const VCHI_SERVICE_INFO_T *init##_info_p(void) { return &init##_info; }
@@ -23,11 +23,24 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+*/
#ifndef VCHIQ_BI_H
#define VCHIQ_BI_H
-#include "vchiq_kona.h"
+#include "vchiq_bi_ipc_shared_mem.h"
+
+/* It turns out the modem/dsp is using 4KB of the VideoCore space, so leave a gap */
+#define IPC_SHARED_MEM_VC_AVOID (0x3000)
+#define IPC_SHARED_MEM_SLOTS (IPC_SHARED_MEM_BASE + IPC_SHARED_MEM_VC_OFFSET + IPC_SHARED_MEM_VC_AVOID)
+#define IPC_SHARED_MEM_SLOTS_SIZE (IPC_SHARED_MEM_CLOCK_DEBUG_OFFSET - IPC_SHARED_MEM_VC_AVOID)
+
+#if defined(VCHIQ_SM_ALLOC_VCDDR)
+#define VCHIQ_IPC_SHARED_MEM_SIZE 0x1E000 /* ARM and VC channels. */
+#define VCHIQ_IPC_SHARED_MEM_EXTRA 0x1000 /* Misc pointers: clock debug, gpio. */
+
+#define VCHIQ_IPC_SHARED_MEM_SYMBOL "vchiq_ipc_shared_mem"
+#define VCHIQ_IPC_SHARED_MEM_SIZE_SYMBOL "vchiq_ipc_shared_mem_size"
+#endif
#endif /* VCHIQ_BI_H */
Oops, something went wrong.

0 comments on commit 34ad764

Please sign in to comment.