Assistant
REPLY |
Linux kernel from the inside | all questions about Linux kernel |
Message#1 20.11.14, 20:40 | |
viewer [offline] Group: Friendssavagemessiahzine.com Messages 5952 Check in: 09.11.10 Xiaomi Redmi 4X 3/32 Reputation: 849 | All answers to android nuclear questions: how the Linux kernel is organized in general and for Android in particular, the interaction mechanisms inside the kernel, kernel programming, discussion of various errors that occur during kernel assembly and operation, general kernel configuration rules and other system issues. It discusses the kernel at the source level. Because of this, it is recommended to attach a link to the repository with the kernel sources, protocols (dmesg) in text form to your question. It is better to set questions for assembling kernel images and packaging these images into a specific loader format for a specific device in a specialized topic.section. For example,Self-compiled kernel from source, Android 4.4.x (KitKat) / 5.x.x (Lollipop) / 6.x.x (Marshmallow) / 7.x.x (Nougat) kernel build for MTK processors, Assistance in the development and porting of Android OS on MTK devices, Developing Android 6.0 kernel and firmware for Asus Zenfone Go, Development and porting for devices on the Spreadtrum SC7731 platform, Development of kernels and firmware Redmi 4 (prada), RockChip rk3188 and newer, kernel build and moreetc. The topic has grown from here:Shell scripts for Android. The parent theme discusses the system issues of the functioning of Android in the user space (userspace): the initial start, low-level interaction with the system components of the Android. Linux kernel regulatory materials
For questions of filling and updating the topic header, the Curator is always ready to help you.username11 Post has been editedusername11 - 26.07.18, 15:29 Reason for editing: Added section with regulatory materials |
Message#2 20.11.14, 21:37 | |
◄��► [offline] Group: Friendssavagemessiahzine.com Messages 4541 Check in: 09.06.10 Reputation: 798 | subscribe to this periodical;) |
Message#3 21.11.14, 00:13 | |
Libero [offline] Group: Friendssavagemessiahzine.com Messages 3462 Check in: 16.11.12 LG G3 S Reputation: 1627 | Well, I will be the first username11,when unpacking the boot image boot.img (Android Boot Image format) to Windows, I get two folders: \ ramdisk, which contains the entire appropriate folder and file structure, and \ kernel, which contains kernel.img and another \ ramdisk folder with two subfolders attached - empty \ root and \ dev containing an empty console file (0KB). What is another \ ramdisk folder for and how to practically use it? It's just that a crazy thought slipped through me - is it possible to somehow use it for multiboot, i.e. Choice of loading one of several different firmware, assembled on the basis of the same kernel? -------------------- LG G3s D724 |
Message#4 21.11.14, 00:28 | |
FiveGFox [offline] Group: Curators Messages 1655 Check in: 24.06.12 Huawei P10 Lite WAS-LX1 Reputation: 280 | vitaly51370 In the ramdisk is the initial configuration with instructions for preparing the equipment, mounting partitions and starting the processes responsible for the life of the android. Kernel - kernel, not decompiled. Compiled from Linux source. And in general, I recommend working with androyd only from under linux (ubuntu, linux mint - I recommend them) Post has been editedTimofey777 - 21.11.14, 00:29 -------------------- Huawei P10 Lite Android 8 |
Message#5 21.11.14, 00:59 | |
Libero [offline] Group: Friendssavagemessiahzine.com Messages 3462 Check in: 16.11.12 LG G3 S Reputation: 1627 | Timofey777,it's all clear, I'm interested in additionalempty ramdisk. -------------------- LG G3s D724 |
Message#6 21.11.14, 06:56 | |
FiveGFox [offline] Group: Curators Messages 1655 Check in: 24.06.12 Huawei P10 Lite WAS-LX1 Reputation: 280 | |
Message#7 21.11.14, 08:43 | |
Old resident [offline] Group: Friendssavagemessiahzine.com Messages 843 Check in: 09.10.12 Lenovo Moto G5s XT1794 Reputation: 175 | |
Message#8 21.11.14, 09:25 | |
FiveGFox [offline] Group: Curators Messages 1655 Check in: 24.06.12 Huawei P10 Lite WAS-LX1 Reputation: 280 | |
Message#9 21.11.14, 09:46 | |
#define false rand ()% 2 [offline] Group: Friendssavagemessiahzine.com Messages 3058 Check in: 10.12.08 Zopo ZP980 + Reputation: 255 | Timofey777, not exactly, you need to edit in 3 files at the same time: * _voltages.c, * _voltages.h, * _data.c and in one of them in 2 places. Post has been editedadm_ - 21.11.14, 09:47 -------------------- When asking a question, it is necessary to know the percent answer at 70. Otherwise, it is meaningless to ask it: nothing will be clear from the answer anyway. |
Message#10 21.11.14, 10:35 | |
Old resident [offline] Group: Friendssavagemessiahzine.com Messages 843 Check in: 09.10.12 Lenovo Moto G5s XT1794 Reputation: 175 | Timofey777, Sorry) I repent. I did not say that the processor is intel. For arm - yes, but for x86 ... driver kernel / drivers / cpufreq / sfi-cpufreq.c kernel / drivers / cpufreq / sfi-cpufreq.h and in / arch / x86 another directory structure kernel / arch / x86 / boot / kernel / arch / x86 / configs / kernel / arch / x86 / crypto / kernel / arch / x86 / ia32 / kernel / arch / x86 / include / kernel / arch / x86 / kernel / kernel / arch / x86 / kvm / kernel / arch / x86 / lguest / kernel / arch / x86 / lib / kernel / arch / x86 / math-emu / kernel / arch / x86 / mm / kernel / arch / x86 / net / kernel / arch / x86 / oprofile / kernel / arch / x86 / pci / kernel / arch / x86 / platform / kernel / arch / x86 / power / kernel / arch / x86 / realmode / kernel / arch / x86 / syscalls / kernel / arch / x86 / tools / kernel / arch / x86 / um / kernel / arch / x86 / vdso / kernel / arch / x86 / video / kernel / arch / x86 / xen / kernel / arch / x86 / .gitignore kernel / arch / x86 / Kbuild kernel / arch / x86 / Kconfig kernel / arch / x86 / Kconfig.cpu kernel / arch / x86 / Kconfig.debug kernel / arch / x86 / Makefile kernel / arch / x86 / Makefile.um kernel / arch / x86 / Makefile_32.cpu -------------------- |
Message#11 21.11.14, 14:53 | |
User [offline] Topics Curator Group: Curators Messages 11373 Check in: 04.07.11 HTC Desire S Reputation: 2169 | vitaly513701. This is not an empty file, it is a special file - a device. We have little idea what it will turn into windows, and how everything will work after repacking. 2. Judging by / dev / console, you are watching your root - rootfs. Everything else is either mounted to it, or the rootfs immediately switch via pivot_root. 3. You can have any number of ramdisks. Initially, you have access to the initrd and rootfs (root option =), then you can do pivot_root to infinity. 4. In addition to ramdisks, you can use initfs, which has its advantages. OLEG4120, arch / x86 / kernel / cpu / cpufreq, look, for example, at acpi-cpufreq.c. Responsible for maintaining the table drivers / cpufreq / freq_table.c |
Message#12 22.11.14, 00:35 | |
Old resident [offline] Group: Friendssavagemessiahzine.com Messages 843 Check in: 09.10.12 Lenovo Moto G5s XT1794 Reputation: 175 | Thanks to everyone who will respond. But I didn’t have much success. I looked at the processor frequency control driver files and frequency table. But there everything is abstract (get_min_freq, get_current_freq from a certain structure, which is not clear where defined), the constants themselves, which would be equal to no frequencies. And nowhere to find him. I suspect it is somewhere in another section of the system, ifwi may be glorious for Intel Post has been editedOLEG4120 - 22.11.14, 00:36 -------------------- |
Message#13 22.11.14, 01:19 | |
#define false rand ()% 2 [offline] Group: Friendssavagemessiahzine.com Messages 3058 Check in: 10.12.08 Zopo ZP980 + Reputation: 255 | of a certain structure, which is not clear where defined, the constants themselves, which would be equal to frequencies there. in the arm the search is found by searching (in all files) of any known frequency (in hertz, there are not so many of these numbers in the source code ;-)) ... in the same place and the voltage is determined, it is also possible / worthwhile to twitch synchronously ... Post has been editedadm_ - 22.11.14, 01:28 -------------------- When asking a question, it is necessary to know the percent answer at 70. Otherwise, it is meaningless to ask it: nothing will be clear from the answer anyway. |
Message#14 04.12.14, 18:00 | |
Libero [offline] Group: Friendssavagemessiahzine.com Messages 3462 Check in: 16.11.12 LG G3 S Reputation: 1627 | username11,On my dual-core device, different CPU monitoring programs show the state of the second core in different ways, i.e. it is not entirely clear that the second core is working or sleeping. When executing the command: dmesg | grep -i cpu CPU1: Booted secondary processor CPU1 is up Switched to NOHz mode on CPU # 1 I read that the inscription "Switched then NOHz mode on CPU # 1" means that the second core is switched to offline mode without using a quartz timer, as a source of periodic interruptions (the so-called “ticking” of the system timer), invigorating the system during idle time, those. it turns out that it works. How can one accurately determine the state of the second core? -------------------- LG G3s D724 |
Message#15 04.12.14, 21:11 | |
User [offline] Topics Curator Group: Curators Messages 11373 Check in: 04.07.11 HTC Desire S Reputation: 2169 | vitaly51370No, it is not switched to offline mode, it will be switched to offline mode when there is no work for it. And at the time of the appearance of the inscription processor 1 is working - CPU1 is up. If the kernel has a cpuidle driver, then in / sys / devices / system / cpu you can see how much time it has spent in different states. |
Message#16 05.12.14, 22:15 | |
Libero [offline] Group: Friendssavagemessiahzine.com Messages 3462 Check in: 16.11.12 LG G3 S Reputation: 1627 | username11,In / sys / devices / system / cpu of interest are: folder / cpuidle containing the file current_driver, inside of which is writtennone folder / cpu1 containing the file online, inside of which is written1 two files: offline (inside is empty) and online (inside0-1), as I understand it, these are binary keys? I do not see the information of interest. -------------------- LG G3s D724 |
Message#17 06.12.14, 19:30 | |
User [offline] Topics Curator Group: Curators Messages 11373 Check in: 04.07.11 HTC Desire S Reputation: 2169 | vitaly51370, offline - interface for shutting down the processor, not for taking readings. I thought that such a hotplug could not be found already ... [email protected], 22:15 ... containing the file online, inside which 1 is written ... ... and online (inside 0-1) ... You decide to start how many files and what they contain. |
Message#18 07.12.14, 02:57 | |
Old resident [offline] Group: Friendssavagemessiahzine.com Messages 1007 Check in: 17.03.13 Reputation: 186 | vitaly51370, username11, / # # here 0 - 1st percents, 1 - 2nd percents, and 0-1 both at once (work / sleep / are present / accessible). / sys / devices / system / cpu # ls -FxSr power / cpufreq / cpu1 / cpu0 / uevent present possible online offline kernel_max / sys / devices / system / cpu # cat online offline present possible 0 1 0-1 0-1 / sys / devices / system / cpu # cat online offline present possible 0-1 0-1 0-1 / # # ------------------ / # # here 0 - sleeps, 1 - works. / # cat / sys / devices / system / cpu / cpu1 / online 0 / # cat / sys / devices / system / cpu / cpu1 / online 1 / # # ------------------ / # # statistics on frequencies, I did not find them in a dream. / sys / devices / system / cpu # ls -Fx ./cpu0/cpufreq/stats trans_table total_trans time_in_state / sys / devices / system / cpu / cpu0 / cpufreq / stats # cat trans_table From: To : 1300000 1209000 1001000 806000 598000 1300000: 0 432 294 254 950 1209000: 50 0 164 93 125 1001000: 1281 0 0 22136 15357 806000: 10 0 12177 0 10296 598000: 589 0 26138 0 0 / sys / devices / system / cpu / cpu0 / cpufreq / stats # cat total_trans 90420 / sys / devices / system / cpu / cpu0 / cpufreq / stats # cat time_in_state 1300000 139299 1209000 17918 1001000 3652376 806000 322914 598000 925570 / # # ------------------ / # dmesg | grep CPU ... <4>[57346.900942] (0) [12379: kworker / 0: 0] [WDK]: Stop CPU: 1 <4>[57347.929911] (0) [12379: kworker / 0: 0] dbs_check_cpu: turn on CPU <2>[57347.974142] (0) [12379: kworker / 0: 0] Boot slave CPU <4>[57347.975258] (1) [0: swapper / 1] CPU1: Booted secondary processor <4>[57350.949876] (0) [12379: kworker / 0: 0] dbs_check_cpu: turn off CPU <5>[57350.971178] (0) [12379: kworker / 0: 0] CPU1: shutdown <4>[57350.971809] (0) [12379: kworker / 0: 0] [WDK]: Stop CPU: 1 / # # ------------------ / sys / devices / system / cpu / cpu0 / cpufreq # cat scaling_available_governors ondemand userspace powersave hotplug performance / sys / devices / system / cpu / cpu0 / cpufreq # cat scaling_governor hotplug / # # ------------------ / # echo `uname -m`` cat / proc / version` armv7l Linux version 3.4.5 (znsj_bianyi5 @ znsj-ian5) (gcc version 4.6.x-Google 20120106 (prerelease) (GCC)) # 1 SMP PREEMPT Wed Nov 27 09:21:32 CST 2013 #! / system / bin / sh (log = / data / cpulog $$ while:; do s = `cat / sys / devices / system / cpu / cpu1 / online`; if ["$ s"! = "$ os"]; then echo "` date +% H:% M:% S` $ s `cat / sys / devices / system / cpu / cpu0 / cpufreq / cpuinfo_cur_freq`">>$ log os = $ s; if [-f / data / cpulogkill]; then rm $ log; break; fi; fi; usleep 200,000; done; ) </ dev / null>/ dev / null 2>&1 & Post has been editedVisitor7 - 07.12.14, 05:01 |
Message#19 07.12.14, 12:03 | |
User [offline] Topics Curator Group: Curators Messages 11373 Check in: 04.07.11 HTC Desire S Reputation: 2169 | So, I understood. Even in this thread, for some reason, everyone wantsexperiment instead of just read . Maybe you should slowly get rid of bad habits. : D Find the kernel sources, read Documentation / ABI / testing / sysfs-devices-system-cpu. |
Message#20 07.12.14, 13:38 | |
#define false rand ()% 2 [offline] Group: Friendssavagemessiahzine.com Messages 3058 Check in: 10.12.08 Zopo ZP980 + Reputation: 255 | [email protected], 12:03 everyone wantsexperiment instead of just read . no, well, you need to demonstrate (like a small child to adults - cleanly wiped ass) the ability to handle cat, echo and even ls ... ;-) ... You didn’t answer in the parental topic whether there are alternatives to hotplug havernor and how to do them (hotplug and / or alternatives) in case of great need ... (well, or poke in url, pliz). a big need - readers on 8-core are eating more than on a single-core with a layonhat on a range of 1.1-0.2 GHz, and the difference in zhore can hardly be attributed to almost double the difference in screen sizes ... ... how to look at the reader used (in the general case - by one specific program) the number of cores, without additionally loading the processor, I can’t think of it either ... Post has been editedadm_ - 07.12.14, 13:49 -------------------- When asking a question, it is necessary to know the percent answer at 70. Otherwise, it is meaningless to ask it: nothing will be clear from the answer anyway. |
Message#21 08.12.14, 15:03 | |
User [offline] Topics Curator Group: Curators Messages 11373 Check in: 04.07.11 HTC Desire S Reputation: 2169 | |
mobile version | Now: 05/01/19 05:50 |