summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp
AgeCommit message (Expand)AuthorFilesLines
2017-12-20Adding lua to Host SDKRomain Forlot1-0/+1
2017-12-14Add SCHED_DEBUG and PROC_EVENT config fragmentFrode Isaksen2-0/+3
2017-12-13Enabled general Intel bluetooth driver support instead of specific one.Kien Dinh2-7/+4
2017-12-13meta-intel: Ensure we pass the microcode as initrd in wic imagesTom Rini2-2/+2
2017-12-10meta-intel: Switch to using WIC images onlyTom Rini4-25/+44
2017-12-08linux-renesas_%.bbappend: Fix ath9k_htc.cfg and rtl_sdr.cfgLeon Anavi1-4/+0
2017-12-01meta-agl-bsp: move usbaudio.cfg to linux-agl.incMatt Porter3-1/+3
2017-11-30Fix Linux Kernel fragment for netbootKotaro Hashimoto1-1/+1
2017-11-30meta-agl-bsp/meta-rcar-gen3: Add default asound.state fileTom Rini2-0/+322
2017-11-27Added XDG compatibility to ivi-shellRomain Forlot1-0/+0
2017-11-22Add sota support for Renesas R-Car M3Anton Gerasimov2-0/+2
2017-11-22Rework Linux Kernel fragment applicationsTom Rini46-553/+83
2017-11-14Add Logicool G29 steering wheel kernel configYuichi Kusakabe1-0/+3
2017-11-08meta-agl-bsp: kernel: remove linux-boundary defconfig from meta-freescale-layer.Mihail Grigorov2-457/+0
2017-10-31meta-agl-bsp: templates: update of nitrogen6x machine templateMihail Grigorov1-0/+5
2017-10-31imx6qsabrelite starts to using 'meta-boundary' layerMihail Grigorov1-2/+3
2017-10-31meta-agl-bsp: imx6qsabrelite: Switch to WIC imageMihail Grigorov3-3/+82
2017-10-29python-wand: Add patch to ensure our built ImageMagick is usedTom Rini2-1/+38
2017-10-29meta-agl-bsp/meta-rcar-gen3: Import imagemagick_6.9.2.bbTom Rini1-0/+90
2017-10-28Add joystick.cfg for usb joystick and steering-wheel kernel configurezheng_wenlong9-2/+30
2017-10-21R-Car Gen3: Add WIC supportTom Rini3-0/+15
2017-10-20weston-ini-conf: Rework to use fragments to construct weston.iniTom Rini15-76/+70
2017-10-18Backport fix for image class dependenciesJan-Simon Möller1-5/+9
2017-10-14meta-agl-bsp: Make more and better use of WIC imagesTom Rini4-3/+10
2017-10-14BSPs: Do not use := for AGL_DEFAULT_IMAGE_FSTYPESTom Rini5-5/+5
2017-10-14meta-agl-bsp: Re-merge image-vm/image.bbclass overlaysTom Rini2-7/+7
2017-10-14meta-agl-bsp: Enable WIC support for Raspberry Pi 2/3Tom Rini2-10/+26
2017-10-14meta-agl-bsp: imx6: Add EGL support for iMX6 in Weston 2.0Mihail Grigorov5-0/+388
2017-10-14meta-agl-bsp: imx6: Update the imx6sabreauto machine templateMihail Grigorov1-0/+1
2017-10-14meta-agl-bsp: imx6: Update the imx6qsabrelite machine templateMihail Grigorov1-0/+34
2017-10-14meta-agl-bsp: imx6: Add new defconfig for the linux-boundary kernelMihail Grigorov2-0/+457
2017-10-12weston-ini-conf: Make this track variables correctly for signaturesTom Rini5-4/+7
2017-10-11Support CANUSB deviceRomain Forlot1-0/+1
2017-10-11adding eGalax screen support for demoDominig ar Foll (Intel Open Source)1-0/+8
2017-10-11linux-intel: Pull in common configuration fragmentsScott Murray3-20/+22
2017-10-09meta-intel: Include and deploy a startup.nsh fileTom Rini2-0/+8
2017-10-09enable vmware drm driversMartin Kelly1-3/+2
2017-10-05dra7xx-evm: fix build by including linux-dtb.incMatt Porter1-0/+2
2017-09-28cleaning kernel config warnings under pyroDominig ar Foll (Intel Open Source)2-2/+3
2017-09-26adding a symlink to keep compatibility with linux-yoctoDominig ar Foll (Intel Open Source)3-35/+13
2017-09-24meta-agl-bsp: meta-ti: Rework Weston patches for 2.0Tom Rini7-258/+21
2017-09-18Add uvc.cfg for usb video class kernel configurezheng_wenlong10-0/+28
2017-09-17Fix rpm metadata clash due to change of rpm backendJan-Simon Möller2-0/+6
2017-09-15Create virtual-gles-user-module recipesRonan Le Martret3-4/+11
2017-09-15Remove weston.bin pkg from gen3 machine confRonan Le Martret3-6/+0
2017-09-15realigning Joule on kernel 4.9Dominig ar Foll (Intel Open Source)1-1/+0
2017-09-15Update rcar gen3 to BSP 2.23Ronan Le Martret1-3/+3
2017-09-13Fix ovmf parallel build issueJan-Simon Möller1-0/+1
2017-09-13Fix build of harfbuzzJan-Simon Möller1-0/+4
2017-09-11Fix lacked vspm kernel module for R-Car H3 and M3Harunobu Kurokawa2-0/+2
"s">"No diagnostics messages nor CAN signals registered in that subscription. Name empty ! It's a bug to be reported."); return ""; } /// @brief Return name from a diagnostic message from a PID /// /// @param[in] pid - Diagnostic message PID const std::string low_can_socket_t::get_name(uint32_t pid) const { if (!diagnostic_message_.empty()) return get_diagnostic_message(pid)->get_name() ; AFB_WARNING("No diagnostics messages nor CAN signals registered in that subscription. Name empty ! It's a bug to be reported."); return ""; } float low_can_socket_t::get_frequency() const { return event_filter_.frequency; } float low_can_socket_t::get_min() const { return event_filter_.min; } float low_can_socket_t::get_max() const { return event_filter_.max; } utils::socketcan_bcm_t& low_can_socket_t::get_socket() { return socket_; } void low_can_socket_t::set_frequency(float freq) { event_filter_.frequency = freq; } void low_can_socket_t::set_min(float min) { event_filter_.min = min; } void low_can_socket_t::set_max(float max) { event_filter_.max = max; } /// @brief Based upon which object is a subscribed CAN signal or diagnostic message /// it will open the socket with the required CAN bus device name. /// /// @return INVALID_SOCKET on failure, else positive integer int low_can_socket_t::open_socket(const std::string& bus_name) { int ret = 0; if(! socket_) { if( can_signal_ != nullptr) {ret = socket_.open(can_signal_->get_message()->get_bus_device_name());} else if (! diagnostic_message_ .empty()) {ret = socket_.open(application_t::instance().get_diagnostic_manager().get_bus_device_name());} else if ( ! bus_name.empty()) { ret = socket_.open(bus_name);} index_ = (int)socket_.socket(); } return ret; } /// @brief Builds a BCM message head but doesn't set can_frame. /// /// @returns a simple_bcm_msg with the msg_head parts set and can_frame /// zeroed. struct utils::simple_bcm_msg low_can_socket_t::make_bcm_head(uint32_t opcode, uint32_t can_id, uint32_t flags, const struct timeval& timeout, const struct timeval& frequency_thinning) const { struct utils::simple_bcm_msg bcm_msg; ::memset(&bcm_msg, 0, sizeof(bcm_msg)); bcm_msg.msg_head.opcode = opcode; bcm_msg.msg_head.can_id = can_id; bcm_msg.msg_head.flags = flags; bcm_msg.msg_head.ival1.tv_sec = timeout.tv_sec ; bcm_msg.msg_head.ival1.tv_usec = timeout.tv_usec; bcm_msg.msg_head.ival2.tv_sec = frequency_thinning.tv_sec ; bcm_msg.msg_head.ival2.tv_usec = frequency_thinning.tv_usec; return bcm_msg; } /// @brief Take an existing simple_bcm_msg struct and add a can_frame. /// Currently only 1 uniq can_frame can be added, it's not possible to build /// a multiplexed message with several can_frame. void low_can_socket_t::add_bcm_frame(const struct can_frame& cf, struct utils::simple_bcm_msg& bcm_msg) const { for(int i=0; i < CAN_MAX_DLEN; i++) { if(cf.data[i] != 0) { bcm_msg.msg_head.nframes = 1; bcm_msg.frames = cf; return; } } } /// @brief Create a RX_SETUP receive job to be used by the BCM socket for a CAN signal /// subscription /// /// @return 0 if ok else -1 int low_can_socket_t::create_rx_filter(std::shared_ptr<can_signal_t> sig) { can_signal_= sig; struct can_frame cfd; memset(&cfd, 0, sizeof(cfd)); float val = (float)(1 << can_signal_->get_bit_size()) - 1; bitfield_encode_float(val, can_signal_->get_bit_position(), can_signal_->get_bit_size(), can_signal_->get_factor(), can_signal_->get_offset(), cfd.data, CAN_MAX_DLEN); struct timeval freq, timeout = {0, 0}; frequency_clock_t f = event_filter_.frequency == 0 ? can_signal_->get_frequency() : frequency_clock_t(event_filter_.frequency); freq = f.get_timeval_from_period(); utils::simple_bcm_msg bcm_msg = make_bcm_head(RX_SETUP, can_signal_->get_message()->get_id(), SETTIMER|RX_NO_AUTOTIMER, timeout, freq); add_bcm_frame(cfd, bcm_msg); return create_rx_filter(bcm_msg); } /// @brief Create a RX_SETUP receive job to be used by the BCM socket for a /// diagnostic message subscription. /// /// @return 0 if ok else -1 int low_can_socket_t::create_rx_filter(std::shared_ptr<diagnostic_message_t> sig) { diagnostic_message_.push_back(sig); struct timeval freq = frequency_clock_t(event_filter_.frequency).get_timeval_from_period(); //struct timeval timeout = frequency_clock_t(10).get_timeval_from_period(); struct timeval timeout = {0,0}; utils::simple_bcm_msg bcm_msg = make_bcm_head(RX_SETUP, OBD2_FUNCTIONAL_BROADCAST_ID, SETTIMER|RX_NO_AUTOTIMER|RX_FILTER_ID, timeout, freq); return create_rx_filter(bcm_msg); } /// @brief Create a RX_SETUP receive job used by the BCM socket directly from /// a simple_bcm_msg. The method should not be used directly but rather through the /// two previous method with can_signal_t or diagnostic_message_t object. /// /// If the CAN arbitration ID is the OBD2 functional broadcast id the subscribed /// to the 8 classics OBD2 functional response ID /// /// @return 0 if ok else -1 int low_can_socket_t::create_rx_filter(utils::simple_bcm_msg& bcm_msg) { // Make sure that socket is opened. if(open_socket() < 0) {return -1;} // If it's not an OBD2 CAN ID then just add a simple RX_SETUP job // else monitor all standard 8 CAN OBD2 ID response. if(bcm_msg.msg_head.can_id != OBD2_FUNCTIONAL_BROADCAST_ID) { socket_ << bcm_msg; if(! socket_) return -1; } else { for(uint8_t i = 0; i < 8; i++) { bcm_msg.msg_head.can_id = OBD2_FUNCTIONAL_RESPONSE_START + i; socket_ << bcm_msg; if(! socket_) return -1; } } return 0; } /// @brief Creates a TX_SEND job that is used by the BCM socket to /// send a message /// /// @return 0 if ok, else -1 int low_can_socket_t::tx_send(const struct can_frame& cf, std::shared_ptr<can_signal_t> sig) { can_signal_ = sig; utils::simple_bcm_msg bcm_msg = make_bcm_head(TX_SEND); add_bcm_frame(cf, bcm_msg); if(open_socket() < 0) {return -1;} socket_ << bcm_msg; if(! socket_) return -1; return 0; } /// @brief Creates a TX_SEND job that is used by the BCM socket to /// send a message /// /// @return 0 if ok else -1 int low_can_socket_t::tx_send(const struct can_frame& cf, const std::string& bus_name) { can_signal_ = nullptr; utils::simple_bcm_msg bcm_msg = make_bcm_head(TX_SEND); add_bcm_frame(cf, bcm_msg); if(open_socket(bus_name) < 0) {return -1;} socket_ << bcm_msg; if(! socket_) return -1; return 0; }