georgev Posted August 23, 2016 Posted August 23, 2016 Hello Everybody I'm using olimex olinuxino lime2. I'm to expiriment on real time linux. I could build the kernel with the real time patch by disabling newer kernel patches, .108 and on, but I would really like to have a ticking system. There are not options for this in the kernel menu configuration. Just tickless system. That may cause some extra delays on realtime processes. Is there a way to configure tick frequency at 1khz? Thank you for your time
wildcat_paris Posted August 23, 2016 Posted August 23, 2016 @georgev ".108" do you mean kernel 3.4.x (3.4.112)? because you don't need to disable newer kernel patches, there is a rt patch for 3.4.112 https://www.kernel.org/pub/linux/kernel/projects/rt/3.4/ from memory... on "non-rt" linux there are options for 100, 200, 400, 500Hz (others? 1 kHz not sure) (I have tried once) I guess you need to install the Armbian build tool (if not done already), put the rt-patch in the proper folder inside the tree of userpatches/ then just compile the kernel only once (to check you are using patched-RT linux). keep a copy of Armbian ".config" file, then restart the tool with the option to modify the kernel config (load Armbian based ".config" then feel free to change and add RT or preemptive and/or change the frequency you need, then let the tool generate the Armbian kernel debian files. http://docs.armbian.com/Developer-Guide_Build-Options/
georgev Posted August 24, 2016 Author Posted August 24, 2016 Thank you for your reply. I have the build enviroment set up, I did not know about the RT patch for latest kernel. I 'll look in to that and let you know what happens. The thing is that in kernel menuconfig which is invoked by the build script there is no option to set up tick frequency. There is just one option to setup tickless kernel or not (I 'm wondering what will happen if unchecked since no tick frequency options are available). From a little diging around in varius .config files I could find there are no CONFIG_HZ=100 or 250 or 500 or 1000 lines neither CONFIG_HZ_100=y or n or not set. I tried to set this up in linux_sunxi/.config but it seems it get overwriten by the script. Could you point me to the proper .config or .config template being used by armbian? Thank you 1
wildcat_paris Posted August 24, 2016 Posted August 24, 2016 @georgev I only dig twice (a test) to add RT patch to mainline linux for XU4 (then the A20), so I haven't really looked @ CONFIG_HZ I can only tell you, I activated RT options in the kernel config and the kernel was running ok. the ".config" file for Armbian are there: https://github.com/igorpecovnik/lib/tree/master/config/kernel of course, you will find this file in your "lib" tree when you git clone Armbian tool. I guess it is linux-sunxi-dev.config as it is the same Allwinner A20 I have on my lamobo-R1. Use this file as a base, then use Armbian tool with KERNEL_ONLY=yes KERNEL_CONFIGURE=yes so you can load the ".config" file, change the kernel config (switch to RT or preemptive) and save .config in the kernel tree (and keep a copy of the .config if it is working fine!) then rename the file as linux-sunxi-dev.config, put it in userpatches tree and the Armbian tool will use your config (so you can use KERNEL_CONFIGURE=no) [gr@server1604:~/gro_armbian/userpatches] $ ls README kernel lib.config.test linux-sunxi-next.config overlay u-boot customize-image.sh lib.config.disabled linux-odroidxu4-next.config.disabled misc patch Example of (disabled ".OLD") 4.6.1 RT patch for the A20 (the 2 others patches are "activated") [gr@server1604:~/gro_armbian/userpatches/kernel] $ tree |-- sun4i-default |-- sun5i-default |-- sun7i-default |-- sun8i-default |-- sunxi-dev |-- sunxi-next | |-- 0001-crypto-sun4i-ss-support-the-Security-System-PRNG.patch | |-- X101-golfromeo.cpu.gmac.patch | `-- patch-4.6.1-rt3.patch.OLD |-- udoo-default `-- udoo-next
georgev Posted August 25, 2016 Author Posted August 25, 2016 Thank you very much I will test tomorrow and report back!
vincele Posted August 31, 2016 Posted August 31, 2016 Hello, if it's like x86, you'll only see the tick frequency options if you uncheck tickless.
georgev Posted September 2, 2016 Author Posted September 2, 2016 hello and sorry for the delay to report back. It seems that in arm architecture there are no frequency option it takes them from the architecture, from what I've read it is 100Hz with no option to change that. So what I did was simply uncheck the tickless kernel option. @vincele that's what I thought too but it seems this is not the case. @goldfish_paris the new patch for RT doesn't succeed for some reason so I'm stuck to .108 which is not a great problem for me. I do not have the expertise to try to fix it so whenever someone comes with a solution it will be most welcome, but so far it is n't urgent for me. Thanx again for all the info.
Recommended Posts