Disable CPU cores on Yocto
Why in my Yocto rpi-basic-image, the online files in each CPU folder doesnt exist?, I cant disable the CPU cores with "echo 0 > /sys/devices/system/cpu/cpu1/online", because de online file doesnt exist. You know why? And also i installed ubuntu server 19 on my raspberry pi 2 and neither the online files for each CPU core exist.
1 answer
-
answered 2019-11-14 21:38
Mostafa
To be able to disable/enable cores at run time you need to configure your kernel to hotplug CPUs
CONFIG_HOTPLUG_CPU=y
You can check if this configuration is enabled by extracting the kernel configuration under
/proc/config.gz
(If it is enabled).To limit the number of CPUs, you can achive this from kernel command line
nr_cpus
you can read more about CPU hotplug in Linux kernel for more info.
See also questions close to this topic
-
What is random : crng init done
Can someone explain to me what the above message means? I am developing a Linux block driver and I am attempting to format with ext4. After a few minutes I get this message. I have tried searching other threads but cant find an explanation of what it is. Thanks
-
NFS Server not responding when Mac is mounting
I've setup a NFS Server on a Ubuntu 18.04 machine. The problem is when I mount it on a MacBook Pro, and move files from Mac's disk to the mounted foulder, the system freezes.
Looking at the logs on the server site through vim
/var/log/messages
i see this error:Dunlockd: server MacBook-Pro.local not responding, timed out
Here's my exports file:
/storage/public *(rw,async,no_subtree_check,insecure)
Does someone know what could it be?
-
Getting absolute pathname of a file in c
I'll describe the problem- I have a configuration file which has in its first line a path to a DIR-
char students_Dest[LINE_LENGTH]; FILE *f_Conf = fdopen(fd_Conf, "r"); fgets(students_Dest, DIR_LENGTH, f_Conf); //Getting the dest of the students DIR
So I wrote the line to the buffer
Now, I opened the DIR with
DIR *students_Dir = opendir(students_Dest);
And in this directory there are more directories that each one of them has a
main.out
executable.So i Wrote this code
struct dirent *dir_Entry; char real_Student_Path[128]; while((dir_Entry = readdir(students_Dir)) != NULL){ if((strcmp(dir_Entry -> d_name , ".") == 0) || (strcmp(dir_Entry -> d_name, "..") == 0)) continue; printf("%s\n", dir_Entry->d_name); realpath(dir_Entry->d_name, real_Student_Path); printf("%s\n", real_Student_Path);
But when I print
real_Student_Path
I get the relative path + cwd of this prog, notstudents_Dest + dir_Entry
String. I think that I didnt understand realpath, But I cant understand what exactly.Could anyone help me? Thank You!
-
How can I max out the computers CPU?
I feel like it should be possible to max out the CPU with a simple script from Chrome Dev Tools. However, I haven't managed to work out a method of doing it.
Something like
for(var i=0; i<999999999; i++) { Math.random(); }
does use a bit of CPU for a couple of seconds, but doesn't get to max 100% utilization on all cores/threads.So what (preferably short and simple) Javascript code can I run in Chrome Dev Tools to accomplish this?
-
Intel Atom CXXX family (Denverton) and max RAM
I'm about to acquire a motherboard based on Intel Atom C3958 (SoC) for my home hi-end NAS/microserver.
Motherboard will have 4 RAM slots for 2 channels. For my tasks I need minimum 256Gb of ECC RAM and at the first glance the CPU fulfills my needs. (spec is here, page 115: https://www.intel.com/content/www/us/en/products/docs/processors/atom/c-series/c3000-family-datasheet.html)
Although the spec claims the CPU supports 256 gigs, there are few limitations:
- The ECC SDRAM device must be of the same type and width as the SDRAM devices used for the data bits. This limitation is driven by the DDR4 spec.
- It is NOT alright to use x16 SDRAM devices for data and a x8 device for ECC.
- It is NOT alright to use x8 SDRAM devices for data and a x4 device for ECC.
- Memory based on 16 Gb dual rank technology (including maximum memory configuration of 256GB) is supported by silicon but not validated on Intel platforms.
Candidates:
https://www.mouser.de/datasheet/2/671/asf36c8gx72pz-1649492.pdf
Could anyone, please, clarify this for me: will the mentioned modules work? Or may be someone has already built such a system.
Thanks! Before asking tried to find something related, but without luck.
-
Importance of crystal clock source on an electronic board
I read at a blog about it and content sounded very crucial from the authors approach. If the primary clock is malfunctioning for some reason, what does this imply ?
-
.NET CORE getting universal password from Novell eDirectory in plain text in C#
The question title is self explanatory. In Novell eDirectory there is a supported way of getting universal password in plain text programmatically. We tested this with C language and it works, but due to our project requirements we need to use .net or .net core for this. Nuget we are using for this project is this: link.
To get this working Extended operations must be used, but I haven't been able to understand how to send extended request.
My code for connecting is following:
using (var cn = new LdapConnection()) { cn.SecureSocketLayer = true; Console.WriteLine("Connecting to:" + ldapHost); cn.Connect(ldapHost, ldapPort); cn.Bind(loginDN, pwd); Console.WriteLine(" SSL Bind successfull"); }
LdapConnection
hasExtendedOperation
available and as I understand this is what we need to use for this request. Here I found some example of how to use it, but unfortunately for us nothing there really helped us to understand how to proceed.My question is: was someone able to get universal password from eDirectory and if so, then how?
-
asp.net core mvc Unable to access the site, does not start through IIS Express
enter image description herein VS2017, creating a boxed asp.net core mvc application by simply clicking on and on. After creating the application, it does not start through ISS Express, but you need to start it through IIS Expres. What could be the problem? Where to look?
An important detail, if in the project => properties => debugging, turn off the "SSL". Starts to start and work. Why does not work with SSL, how to fix it?
-
How to compress the image size using C# Dot Net Core
I am using .NET Core 2.2 In my code, I am using IFormFile to upload images. How can I compress the image size (to KB) just before it is uploaded to the server ? I search for solutions but those answers were related to Bitmap but since I am using IFormFile therefore I want solution related to it.
I will internally check the image size and if its size is upto 700KB, I don't want to compress. But if it is higher, then I want to compress and upload. Sample codes would be very useful
I tried to use Magick.NET package. But the problem is, how can I make IFormFile to MagickImage type ?
foreach(IFormFile photo in Images) { using (MagickImage mi = photo) // Cannot implicitly convert type //Microsoft.AspNetCore.Http.IFormFile to ImageMagick.MagickImage { mi.Format = Image.Jpeg; mi.Resize(40, 40); mi.Quality = 10; mi.Write(imageFile); } }
-
Having Angstrom build and Poky build in one repository
I have successfully made a test image (core-image-minimal) for Colibri-imx6 board using the poky distribution. The kernel does not completely load when the image is deployed on the board. So, I have decided to make a test image using the Angstrom distribution under Yocto.
The specifications are Ubuntu 18.04, Linux kernel-4.9, Bitbake 1.44, gcc 4.8.5, Python 2.7.15+, Yocto version Zeus, Poky version 3.0 and Target system is arm-poky-linux-gnueabi. Below is a screenshot of the subfolders in the project folder:
I wish to have more than one build folder, one for poky distribution and one for angstrom distribution.
The current error I am facing is the following after making the changes in local.conf in the new build_angstrom folder:
What layers/changes will I have to add to make this possible? Do I have to clone Angstrom distribution and keep it separately? Thanks!
-
How to exclude opencv compilation from Yocto image?
I'm compiling image fsl-image-validation-imx. I have to compile opencv. How to exclude it from image compilation.
-
Building an embedded linux yocto
I try to build an embedded linux system for my raspberrypi3 board using yocto on Ubuntu 16.04 I use stable branch fido. But I got this error:
kamel@ThinkPad-E590:/opt/yocto/poky/build$ bitbake core-image-minimal Parsing recipes: 100% |########################################################################################################| Time: 0:00:33 Parsing of 1499 .bb files complete (0 cached, 1499 parsed). 2061 targets, 132 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "1.32.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "raspberrypi3" DISTRO = "poky" DISTRO_VERSION = "2.2.4" TUNE_FEATURES = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7" TARGET_FPU = "hard" meta meta-poky meta-yocto-bsp = "fido:e56be3cee517c5262486136dbd6d649b68c3a8b7" meta-oe = "fido:997caf9146cd3797cd054e2adebd1fbb4df91911" meta-raspberrypi = "fido:2a192261a914892019f4f428d7462bb3c585ebac" Initialising tasks: 100% |#####################################################################################################| Time: 0:00:06 NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks **ERROR:** *quilt-native-0.64-r0 do_populate_lic: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module>*
How do I resolve these ?
-
Minimum FFMPEG configure options for H264 decoding
I'm working on a project using an LS1021A board, which has a Cortex-A7, NEON, FPU, etc, which seems to be very similar to a Raspberry Pi 2. We are streaming in H264 via RTP (UDP) with VLC to simulate an IP Camera with the end goal of extracting the raw RGB frame data (in a C app) to be used elsewhere in the system.
So, I'd like to compile ffmpeg and the associated libs to do only H264 decoding, using libavcodec in C code. This will be running on a custom linux OS with tight size constraints, so lib size needs to be as small as possible.
I have the following so far after a day or so of googling:
./configure --disable-encoders --disable-decoders --enable-decoder=h264 --enable-small --enable-cross-compile --arch-arm --target-os=linux --cpu=cortex-a7 --disable-debug --cross-prefix=${GCC_PREFIX} --prefix=/c/Users/labuser/Desktop/build --extra-cflags='march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard' --enable-neon --disable-devices --disable-sdl --disable-ffprobe --disable-ffserver --disable-doc --disable-w32threads --disable-ffplay
Since I'll be using libavcodec directly, I'm not sure if some of these --disable switches are needed, but can anyone give any pointers on if this looks acceptable or if there are any other switches I should be using?
Thanks!
-
Lubuntu 16: 'USER namespaces aren't enabled in the kernel' when deploying Lambda on AWS Greengrass
I have a Raspberry Pi B running Lubunutu 16. I have installed AWS Greengrass on it and can see it is running fine.
However when I go to deploy a Lambda, an error pops up & the deploy fails-
USER namespaces aren't enabled in the kernel
Is there a way to enable user_namespaces on Ubuntu/Lubuntu?