NixOS nVidia Driver Version Bounds - version

I'm trying to get NixOS to work with my old GeForce 6600, which only accepts an nVidia driver version <305 (304.xx). Is there any way to put an upper bound on the kernel module version / proprietary version in my configuration.nix? Any help would be greatly appreciated!

You have to use nvidiaLegacy304 instead of nvidia in the system.xserver.videoDrivers = [ "nvidia..." ]; declaration (use hardware.opengl.videoDrivers for the unstable channel).

Related

Uboot adding new serial driver on arm

I'm trying to add my own serial driver to uboot. That what I've been achieved so far are those messages:
U-Boot SPL 2017.09-gdc4fd1d6eb-dirty (Dec 30 2017 - 09:13:03)
DRAM: 2048 MiB
Trying to boot from FEL
but that is all. I know that there should be other messages also, but there are not any.
I suspect that my serial driver is working only in uboot SPL, but after that there is "uboot device model" driver compatible needed to run. Am I right?
To register my driver in "uboot device model" I introduced two invocations:
U_BOOT_DEVICE(sun8i_serials) = {
.name = "serial_sun8i",
.platdata = &sun8i_serial_plat,
};
U_BOOT_DRIVER(serial_sun8i) = {
.name = "serial_sun8i",
.id = UCLASS_SERIAL,
.ops = &sun8i_serial_ops,
.probe = sun8i_serial_probe,
};
With those two structures I expected that my procedure "sun8i_serial_probe" will be executed but it isn't. In this procedure I'm just turning on some LED, but this LED is still off, so my conclusion is that it is not invocated.
What should I do to proper register my driver and achieve call to my sun8i_serial_probe procedure?
Maybe after the SPL there is another step (third program loader?) and it is working in arm virtual memory space and that is why my procedure is not able to turn on the LED?
Any suggestions?
Edit1: I discovered that proc list_bind_drivers() issues "No match for driver serial_sun8i". So seems like U_BOOT_DEVICE is working fine while U_BOOT_DRIVER for some reasons not.
Edit2: Seems like I fixed the bug. The bug was in Makefile.

Implementation error in ISE for a Virtex-5 board

I'm using a Xilinx Virtex-5 version XC5VLX110T in ISE project navigator 14.6 to test a simple code but it always give implementation design error:
ERROR:Security:12 - No 'xc5vlx110t' feature version 2013.06 was
available (-15),
ERROR:Map:258 - A problem was encountered attempting
to get the license for this architecture.
this is it's Design proprieties
The code is:
module compare(clk ,x,y
);
input x,clk;
output reg y;
always #(posedge clk)
begin
y= x+1'b1;
end
endmodule
It depends ...
First, have a look into the Xilinx license manager to see what's supported and what's not.
Some development boards are sold with a "node locked license". If so, your package should contain a serial for the registration process on Xilinx.com. Then you can download your personal, board specific license and register it in ISE.
Otherwise you'll need a normal/full license, which is quite expensive. For development purposes, you can change the device for ex. to XC5VLX50T-1FFG1136 (Virtex-5 LX50T from ML505 board) this one should supported by the webpack license. All implementation steps will work, but programming, because it's the false size and pinout.

pyOpenCL not running, no error

I am trying to get started with pyOpenCL and I'm running into an issue running the examples. I simplified the code to try to figure out what is going on to what I have below. When I run the code it will only print 1. It will not produce any error. The same occurs if I just call cl.create_some_context().
I am running windows 7, python 2.7 with AMD CPU and ATI GPU. I have updated my drivers. From what I can find my GPU does not support OpenCL but my CPU does.
CPU: AMD Athlon II X2 250
GPU: ATI Radeon HD 4600
import pyopencl as cl
import numpy
print 1
cl.get_platforms()
print 2
cl.create_some_context()
print 3
output:
1
Thanks!
To get more information on your problem - you might want to set up your context in the more explicit way.
Get the list of devices on your platform:
pyopencl.get_devices(device_type = device_type.ALL)
Select a preferred device:
for found_device in my_platform.get_devices():
if pyopencl.device_type.to_string(found_device.name) == 'GPU':
device = found_device
Create a context from device type, or a list of devices (device_type : ALL, GPU, CPU):
context = pyopencl.Context(devices = None | [dev1, dev2], dev_type = None )
I hope that helps!
Test This Code
import pyopencl as cl
platforms = cl.get_platforms()
len(platforms)
gpu_devices = platforms[0].get_devices(cl.device_type.GPU)
gpu_devices
cpu_devices = platforms[0].get_devices(cl.device_type.CPU)
cpu_devices

Create openGL context in linux console(Raspbian)

I want to make a minimal visual display in console with openGL, but as far as my knowledge goes there has to be a window system involved(glut, glfw, sdl, etc..).
I've seen omxplayer build a graphic environment(I just assume it is openGL or something similar, so please correct me if I'm wrong) from console, in order to save some processing power, and make movies watchable in the PI.
I'm just wondering how do they do it? Is there some literature in the topic? I'm mostly interested in solutions in C/C++, but any language with these capabilities would be great to know about!
I scavenged through the source code, but couldn't really find a clue about this particular task. Any help or pointer would be appreciated!
Note: the Raspberry Pi does OpenGL ES, not OpenGL.
You can find examples of making console based OpenGL ES applications in the VideoCore SDK:
/opt/vc/src/hello_pi
I'm not sure what you mean by "window system", especially as you mention SDL. You can absolutely use SDL + OpenGL ES in the console. That's what the Quake3 port (and the Quake2 port I made) uses.
It uses the EGL native platform interface.
Here's some code from the SubtitleRenderer class:
void SubtitleRenderer::initialize_vg() {
// get an EGL display connection
display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
ENFORCE(display_);
// initialize the EGL display connection
ENFORCE(eglInitialize(display_, NULL, NULL));
// get an appropriate EGL frame buffer configuration
static const EGLint attribute_list[] = {
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_NONE
};
EGLConfig config{};
EGLint num_config{};
ENFORCE(eglChooseConfig(display_, attribute_list, &config, 1, &num_config));

How to get os name, version in windows?

Which one is better in following aspects to get OS name, OS version in windows -
time in getting information
compatibility in all windows OS like xp, vista and higher
systeminfo or wmic command? I wanted to avoid the use of OSVersionInfoEx in C as one has to hardcode the marketing name detection and will add to maintenance work if new flavour of windows gets introduced. Please share your opinion.
GetVersionEx - You can't get any faster than this for getting a basic os version number. But you are right, you won't be able to map newer versions of the OS to the correct string. Have you considered just doing this:
OSVERSIONINFOEX version = {};
char szOS[MAX_OS_LENGTH];
version.dwOSVersionInfoSize = sizeof(version);
GetVersionEx((OSVERSIONINFO*)&version);
if (MyFunctionToMapVersionToString(&version, szOS) == false)
{
sprintf(szOS, "Microsoft Windows %d.%d", version.dwMajorVersion, version.dwMinorVersion);
}
WMI - A bit more code to write. But you could likely just do this at app startup (or when it's needed) and cache the result if the information is needed again. It's not like the operating system product name will change after the app has queried for it once. :) As to backwards compatibility, I'm sure it work fine on older operating systems... but you are going to test it before shipping it to the customer, right?
If you want an undocumented way, there is a registry key that has exactly what you want in it:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion ("ProductName")

Resources