Android Kernel - Unable to activate CONFIG_USB_ETH=y in the kernel dot config - linux

I am trying to configure Android Kernel (msm-4.4)to have USB-CDC Ethernet Support in order to implement USB tethering in the low level. What I want to do is to migrate what's done in the following link to Android: https://developer.ridgerun.com/wiki/index.php/How_to_use_USB_device_networking
The following are already enabled in the .config:
CONFIG_USB=y
CONFIG_SND_USB=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_GADGET=y
CONFIG_USB_CONFIGFS_UEVENT=y
However, when I add the following
CONFIG_USB_ETH=y
CONFIG_USB_ETH_EEM=y
Resulting .config has CONFIG_USB_CONFIGFS_UEVENT disabled:
CONFIG_USB_ETH=y
# CONFIG_USB_CONFIGFS_UEVENT is not set
which results in kernel compilation errors:
In function 'gadgets_make':
error: 'gadget_index' undeclared (first use in this function)
gadget_index++;
^
note: each undeclared identifier is reported only once for each function it appears in
In function 'gadgets_drop':
error: 'struct gadget_info' has no member named 'dev'
if (gi->dev) {
^
When I try to compile CONFIG_USB_ETH as a module, kernel compilation succeeds, but the resulting .config don't have it as enabled:
# CONFIG_USB_ETH is not set
I want to understand why something bizarre like this happens. I searched through the entire Android source code and couldn't find which triggers this blocking behavior.
Please have a look at the following Kconfigs if you require:
https://github.com/android-linux-stable/msm-4.4/blob/5a05099fd7feedfa07a75720669caf5f374810d4/drivers/usb/gadget/legacy/Kconfig
https://github.com/android-linux-stable/msm-4.4/blob/5a05099fd7feedfa07a75720669caf5f374810d4/drivers/usb/gadget/legacy/Kconfig
Any guidance to identify this problem is much appreciated.

You should use CONFIG_USB_NET_CDC_EEM=y instead of CONFIG_USB_ETH=y.
CONFIG_USB_ETH is not compatible with CONFIG_USB_CONFIGFS_UEVENT

Related

YOLO Error: names: Using default 'data/names.list' Couldn't open file: data/names.list when implemented on CPU offline

I have implemented custom object detector using YOLO for offline on CPU.
When I run this command on CPU:
!./darknet detector demo data/obj.data cfg/yolov4-obj.cfg yolov4-obj_final.weights -dont_show MVI_1615_VIS.avi -i 0 -out_filename results.avi
I get the following error:
GPU isn't used
OpenCV version: 3.2.0
names: Using default 'data/names.list'
Couldn't open file: data/names.list
Kindly help.
I came across this error recently. For me, it was a simple mistake in the obj.data file.
Instead of the correct version which is:
names = obj.names
I had:
names - obj.names
Hence why it couldnt find the obj.names file
Make sure there aren't any errors in the obj.data file. For more info, check out: https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects

After updating ChefDK, I get the error "undefined local variable or method `credentials_file'" in Test Kitchen or an error in credentials.rb in knife

This issue was discovered after upgrading from ChefDK 3.2.30 to 4.2.0, and everything worked fine before the upgrade (Including these two commands).
The full error from "knife node list":
C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/rbvmomi-1.13.0/lib/rbvmomi/vim.rb:8: warning: Win32API is deprecated after Ruby 1.9.1; use fiddle directly instead
Traceback (most recent call last):
8: from C:/opscode/chefdk/bin/knife:359:in <main>' 7: from C:/opscode/chefdk/bin/knife:359:inload'
6: from C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.1.36-universal-mingw32/bin/knife:24:in <top (required)>' 5: from C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.1.36-universal-mingw32/lib/chef/application/knife.rb:162:inrun'
4: from C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.1.36-universal-mingw32/lib/chef/knife.rb:221:in run' 3: from C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.1.36-universal-mingw32/lib/chef/knife.rb:440:inconfigure_chef'
2: from C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-15.1.36-universal-mingw32/lib/chef/knife.rb:185:in load_config' 1: from C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-config-15.1.36/lib/chef-config/workstation_config_loader.rb:72:inload'
C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-config-15.1.36/lib/chef-config/mixin/credentials.rb:92:in load_credentials': undefined local variable or methodcredentials_file' for #<ChefConfig::WorkstationConfigLoader:0x000000000c311e68> (NameError)
The full error from 'kitchen converge':
------Exception-------
Class: Kitchen::ClientError
Message: Could not load the 'chef_zero' provisioner. Error: undefined local variable or method `credentials_file' for #<ChefConfig::WorkstationConfigLoader:0x0000000006f176a0>
Did you mean? credentials_profile
credentials_found
#credentials_found
----------------------
Please see .kitchen/logs/kitchen.log for more details
Also try running kitchen diagnose --all for configuration
We found that the problem in this case was an invalid profile being requested.
The profile can be set either with the CHEF_PROFILE environment variable, or in a file named 'context' in the users home .chef directory (~/.chef on Linux, C:\Users\username.chef on Windows).
If a profile other than 'default' is specified, than the ChefDK looks for a file named 'credentials' in that same directory. It will then parse that file and look for a section matching the profile name.
If it doesn't find a matching profile, then it will generate errors like the one in the question.
To fix the problem for this user, we changed the value of the 'context' file to "default" (without quotes) and everything started working again.
There are several possible resolutions, which one is best for you depends on where the problem comes from
If the profile name is valid, then add the proper section to the ~/credentials file
If the value of the CHEF_PROFILE environment variable is the problem, change it to "default" or to a valid name
If the value of the ~/context file is the problem, than you can either delete it, or change the value in it to a valid profile (NOTE: Always make a back up of the file before deleting or making changes)
I found the details listed above that led me to the resolution by going through the code in C:/opscode/chefdk/embedded/lib/ruby/gems/2.6.0/gems/chef-config-15.1.36/lib/chef-config/mixin/credentials.rb (which was where the initial exception was thrown)

Running tsung_stats from tsung and getting Symbol not found: _Perl_xs_handshake error

I am trying to produce an output using tsung_stats, however whenever I run the command:
/usr/local/Cellar/tsung/1.7.0/lib/tsung/bin/tsung_stats.pl --stats /Users/Chris/.tsung/log/20181031-2312/tsung.log
The following happens:
warn, last interval (7) not equal to the first, use the first one (10)
No data for Bosh
No data for Match
No data for Event
No data for Async
No data for Errors
dyld: lazy symbol binding failed: Symbol not found: _Perl_xs_handshake
Referenced from:
/usr/local/Cellar/perl/5.28.0/lib/perl5/site_perl/5.28.0/darwin-thread-multi-2level/auto/Template/Stash/XS/XS.bundle
Expected in: flat namespace
dyld: Symbol not found: _Perl_xs_handshake Referenced from:
/usr/local/Cellar/perl/5.28.0/lib/perl5/site_perl/5.28.0/darwin-thread-multi-2level/auto/Template/Stash/XS/XS.bundle
Expected in: flat namespace
Abort trap: 6
At first it was giving me this error:
warn, last interval (7) not equal to the first, use the first one (10)
No data for Bosh
No data for Match
No data for Event
No data for Async
No data for Errors
Can't locate Template.pm in #INC (you may need to install the Template
module) (#INC contains: /Library/Perl/5.18/darwin-thread-multi-2level
/Library/Perl/5.18
/Network/Library/Perl/5.18/darwin-thread-multi-2level
/Network/Library/Perl/5.18
/Library/Perl/Updates/5.18.2/darwin-thread-multi-2level
/Library/Perl/Updates/5.18.2
/System/Library/Perl/5.18/darwin-thread-multi-2level
/System/Library/Perl/5.18
/System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.18 .) at
/usr/local/Cellar/tsung/1.7.0/lib/tsung/bin/tsung_stats.pl line 571.
After searching the internet, I first ran sudo cpan Template and then set the environment variable PERL5LIB to the path of Perl (i.e. /usr/local/Cellar/perl/5.28.0/lib/perl5/site_perl/5.28.0).
I am stuck and there doesn't seem to be a fix on the internet, what can be done next?
I had a similar problem. Instead of sudo cpan Template,
execute the following
sudo perl -MCPAN -e'shell'
then
install Template
and
quit
It works for me

Why do OpenGL-based VTK targets in drake executed via `bazel test` sometimes fail on Linux?

While a binary works with bazel run, when I run a test using bazel test, such as:
$ bazel test //systems/sensors:rgbd_camera_test
I encounter a slew of errors from VTK / OpenGL:
ERROR: In /vtk/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 820
vtkXOpenGLRenderWindow (0x55880715b760): failed to create offscreen window
ERROR: In /vtk/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 816
vtkXOpenGLRenderWindow (0x55880715b760): GLEW could not be initialized.
ERROR: In /vtk/Rendering/OpenGL2/vtkShaderProgram.cxx, line 453
vtkShaderProgram (0x5588071d5aa0): Shader object was not initialized, cannot attach it.
ERROR: In /vtk/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx, line 1858
vtkXOpenGLRenderWindow (0x55880715b760): Hardware does not support the number of textures defined.
May I ask why this happens?
(Note: This post is a means to migrate from http://drake.mit.edu/faq.html to StackOverflow for user-based questions.)
The best workaround at the moment is to first mark the test as as local in the BUILD.bazel file, either with local = 1, or tags = [.., "local"]. Doing so will make the specific target run without sandboxing, such that it has an environment similar to that of bazel run.
As an example, in systems/sensors/BUILD.bazel:
drake_cc_googletest(
name = "rgbd_camera_test",
# ...
local = 1,
# ...
)
If this does not work, then try running the test in Bazel without sandboxing:
$ bazel test --spawn_strategy=standalone //systems/sensors:rgbd_camera_test
Please note that you can possibly add --spawn_strategy=standalone to your ~/.bazelrc, but be aware that this means your development testing environment may deviate even more from other developer's testing environments.

erlang zip:unzip/1 {error, bad_central_directory} and {error, bad_eocd}

I have always used erlang stdlib library zip:unzip/1 successfully. Last night i hit a bar with this error:
E:\WimaxStatsParser-1.1>erl
Eshell V5.9.2 (abort with ^G)
1> zip:unzip("e:/WimaxStatsParser-1.1/in/SomeZipFile.zip").
{error,bad_central_directory}
2>
Some one help explain the cause for this ? and how i get around it ?
ADDITIONS
I got some other error on another file: {error,bad_eocd}. Please explain this as well.
I am not able to reproduce your problem with the information you give. There are 2 functions that may send this error:
get_cd_loop/5 and get_name_extra_comment/4 in stdlib-1.18.2/src/zip.erl .
it should be easy to debug
copy the file zip.erl, zip.hrl, file.hrl in a working directory,
compile with debug_info option, you will get the error message "Can't load module that resides in sticky dir", leave the VM
copy zip.beam in the stdlib.../ebin
restart the VM in the working directory, you can now add breakpoint in the zip.erl source.
BR
Pascal.

Resources