Real-time linux kernel - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Linux on Pine A64(+) (https://forum.pine64.org/forumdisplay.php?fid=6) +--- Thread: Real-time linux kernel (/showthread.php?tid=394) |
Real-time linux kernel - Artyom - 03-02-2016 Development of real-time kernel. This thread created for all those interested in the development of real-time kernel. real-time Linux kernel will allow to extend the scope of possible application Pine64. For example in avionics (autopilot for drone), automation systems, etc. RE: Real-time linux kernel - Artyom - 03-06-2016 This is link to pure kernel 3.10.65 with PREEMPT RT patch installed. Apparently a patch is installed correctly. ------------ Patching process output ----------------- patching file Documentation/hwlat_detector.txt patching file Documentation/sysrq.txt patching file Documentation/trace/histograms.txt patching file arch/Kconfig patching file arch/alpha/mm/fault.c patching file arch/arm/Kconfig patching file arch/arm/include/asm/switch_to.h patching file arch/arm/include/asm/thread_info.h patching file arch/arm/kernel/asm-offsets.c patching file arch/arm/kernel/entry-armv.S patching file arch/arm/kernel/perf_event_cpu.c patching file arch/arm/kernel/process.c patching file arch/arm/kernel/signal.c patching file arch/arm/kernel/unwind.c patching file arch/arm/mach-at91/at91rm9200_time.c patching file arch/arm/mach-at91/at91sam926x_time.c patching file arch/arm/mach-exynos/platsmp.c patching file arch/arm/mach-msm/platsmp.c patching file arch/arm/mach-omap2/omap-smp.c patching file arch/arm/mach-prima2/platsmp.c patching file arch/arm/mach-spear/platsmp.c patching file arch/arm/mach-ux500/platsmp.c patching file arch/arm/mm/fault.c patching file arch/arm/mm/highmem.c patching file arch/arm/plat-versatile/platsmp.c patching file arch/avr32/mm/fault.c patching file arch/cris/mm/fault.c patching file arch/frv/mm/fault.c patching file arch/ia64/mm/fault.c patching file arch/m32r/mm/fault.c patching file arch/m68k/mm/fault.c patching file arch/microblaze/mm/fault.c patching file arch/mips/Kconfig patching file arch/mips/kernel/signal.c patching file arch/mips/mm/fault.c patching file arch/mn10300/mm/fault.c patching file arch/parisc/mm/fault.c patching file arch/powerpc/Kconfig patching file arch/powerpc/include/asm/thread_info.h patching file arch/powerpc/kernel/asm-offsets.c patching file arch/powerpc/kernel/entry_32.S patching file arch/powerpc/kernel/entry_64.S patching file arch/powerpc/kernel/irq.c patching file arch/powerpc/kernel/misc_32.S patching file arch/powerpc/kernel/misc_64.S patching file arch/powerpc/kernel/time.c patching file arch/powerpc/mm/fault.c patching file arch/powerpc/platforms/52xx/mpc52xx_pic.c patching file arch/powerpc/platforms/8xx/m8xx_setup.c patching file arch/powerpc/sysdev/cpm1.c patching file arch/s390/mm/fault.c patching file arch/score/mm/fault.c patching file arch/sh/kernel/irq.c patching file arch/sh/mm/fault.c patching file arch/sparc/Kconfig patching file arch/sparc/kernel/irq_64.c patching file arch/sparc/kernel/pcr.c patching file arch/sparc/kernel/setup_32.c patching file arch/sparc/kernel/setup_64.c patching file arch/sparc/mm/fault_32.c patching file arch/sparc/mm/fault_64.c patching file arch/tile/mm/fault.c patching file arch/um/kernel/trap.c patching file arch/x86/Kconfig patching file arch/x86/crypto/aesni-intel_glue.c patching file arch/x86/crypto/cast5_avx_glue.c patching file arch/x86/crypto/glue_helper.c patching file arch/x86/include/asm/signal.h patching file arch/x86/include/asm/stackprotector.h patching file arch/x86/include/asm/thread_info.h patching file arch/x86/kernel/apic/io_apic.c patching file arch/x86/kernel/asm-offsets.c patching file arch/x86/kernel/cpu/mcheck/mce.c patching file arch/x86/kernel/entry_32.S patching file arch/x86/kernel/entry_64.S patching file arch/x86/kernel/irq_32.c patching file arch/x86/kernel/irq_64.c patching file arch/x86/kernel/irq_work.c patching file arch/x86/kernel/process_32.c patching file arch/x86/kernel/signal.c patching file arch/x86/kernel/traps.c patching file arch/x86/kvm/x86.c patching file arch/x86/mm/fault.c patching file arch/x86/mm/highmem_32.c patching file arch/x86/mm/iomap_32.c patching file arch/xtensa/mm/fault.c patching file block/blk-core.c patching file block/blk-ioc.c patching file block/blk-iopoll.c patching file block/blk-softirq.c patching file crypto/algapi.c patching file crypto/api.c patching file crypto/internal.h patching file drivers/acpi/acpica/acglobal.h patching file drivers/acpi/acpica/hwregs.c patching file drivers/acpi/acpica/hwxface.c patching file drivers/acpi/acpica/utmutex.c patching file drivers/ata/libata-sff.c patching file drivers/char/random.c patching file drivers/clocksource/tcb_clksrc.c patching file drivers/gpu/drm/drm_irq.c patching file drivers/gpu/drm/i915/i915_gem.c patching file drivers/gpu/drm/i915/i915_gem_execbuffer.c patching file drivers/i2c/busses/i2c-omap.c patching file drivers/ide/alim15x3.c patching file drivers/ide/hpt366.c patching file drivers/ide/ide-io-std.c patching file drivers/ide/ide-io.c patching file drivers/ide/ide-iops.c patching file drivers/ide/ide-probe.c patching file drivers/ide/ide-taskfile.c patching file drivers/infiniband/ulp/ipoib/ipoib_multicast.c patching file drivers/input/gameport/gameport.c patching file drivers/leds/trigger/Kconfig patching file drivers/md/bcache/Kconfig patching file drivers/md/dm.c patching file drivers/md/raid5.c patching file drivers/md/raid5.h patching file drivers/misc/Kconfig patching file drivers/misc/Makefile patching file drivers/misc/hwlat_detector.c patching file drivers/mmc/host/mmci.c patching file drivers/net/Kconfig patching file drivers/net/ethernet/3com/3c59x.c patching file drivers/net/ethernet/atheros/atl1c/atl1c_main.c patching file drivers/net/ethernet/atheros/atl1e/atl1e_main.c patching file drivers/net/ethernet/chelsio/cxgb/sge.c patching file drivers/net/ethernet/dec/tulip/tulip_core.c patching file drivers/net/ethernet/freescale/gianfar.c patching file drivers/net/ethernet/freescale/gianfar_ethtool.c patching file drivers/net/ethernet/freescale/gianfar_sysfs.c patching file drivers/net/ethernet/neterion/s2io.c patching file drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c patching file drivers/net/ethernet/realtek/8139too.c patching file drivers/net/ethernet/tehuti/tehuti.c patching file drivers/net/rionet.c patching file drivers/net/wireless/orinoco/orinoco_usb.c patching file drivers/pci/access.c patching file drivers/scsi/fcoe/fcoe.c patching file drivers/scsi/fcoe/fcoe_ctlr.c patching file drivers/scsi/hpsa.c patching file drivers/scsi/libfc/fc_exch.c patching file drivers/scsi/qla2xxx/qla_inline.h patching file drivers/tty/serial/8250/8250_core.c patching file drivers/tty/serial/amba-pl011.c patching file drivers/tty/serial/omap-serial.c patching file drivers/tty/tty_buffer.c patching file drivers/tty/tty_ldisc.c patching file drivers/usb/core/hcd.c patching file drivers/usb/gadget/f_fs.c patching file drivers/usb/gadget/inode.c patching file drivers/usb/host/ohci-hcd.c patching file fs/autofs4/autofs_i.h patching file fs/autofs4/expire.c patching file fs/buffer.c patching file fs/dcache.c patching file fs/eventpoll.c patching file fs/exec.c patching file fs/fscache/page.c patching file fs/jbd/checkpoint.c patching file fs/jbd2/checkpoint.c patching file fs/namespace.c patching file fs/ntfs/aops.c patching file fs/timerfd.c patching file include/acpi/platform/aclinux.h patching file include/asm-generic/bug.h patching file include/linux/buffer_head.h patching file include/linux/completion.h patching file include/linux/cpu.h patching file include/linux/delay.h patching file include/linux/ftrace_event.h patching file include/linux/hardirq.h patching file include/linux/highmem.h patching file include/linux/hrtimer.h patching file include/linux/idr.h patching file include/linux/init_task.h patching file include/linux/interrupt.h patching file include/linux/irq.h patching file include/linux/irq_work.h patching file include/linux/irqdesc.h patching file include/linux/irqflags.h patching file include/linux/jbd_common.h patching file include/linux/jump_label.h patching file include/linux/kdb.h patching file include/linux/kernel.h patching file include/linux/lglock.h patching file include/linux/list.h patching file include/linux/list_bl.h patching file include/linux/locallock.h patching file include/linux/mm.h patching file include/linux/mm_types.h patching file include/linux/mutex.h patching file include/linux/mutex_rt.h patching file include/linux/netdevice.h patching file include/linux/netfilter/x_tables.h patching file include/linux/notifier.h patching file include/linux/page_cgroup.h patching file include/linux/percpu.h patching file include/linux/pid.h patching file include/linux/preempt.h patching file include/linux/printk.h patching file include/linux/radix-tree.h patching file include/linux/random.h patching file include/linux/rcupdate.h patching file include/linux/rcutree.h patching file include/linux/rtmutex.h patching file include/linux/rwlock_rt.h patching file include/linux/rwlock_types.h patching file include/linux/rwlock_types_rt.h patching file include/linux/rwsem.h patching file include/linux/rwsem_rt.h patching file include/linux/sched.h patching file include/linux/sched/rt.h patching file include/linux/seqlock.h patching file include/linux/signal.h patching file include/linux/skbuff.h patching file include/linux/smp.h patching file include/linux/spinlock.h patching file include/linux/spinlock_api_smp.h patching file include/linux/spinlock_rt.h patching file include/linux/spinlock_types.h patching file include/linux/spinlock_types_nort.h patching file include/linux/spinlock_types_raw.h patching file include/linux/spinlock_types_rt.h patching file include/linux/srcu.h patching file include/linux/sysctl.h patching file include/linux/timer.h patching file include/linux/uaccess.h patching file include/linux/uprobes.h patching file include/linux/vmstat.h patching file include/linux/wait-simple.h patching file include/net/dst.h patching file include/net/neighbour.h patching file include/net/netns/ipv4.h patching file include/trace/events/hist.h patching file include/trace/events/latency_hist.h patching file init/Kconfig patching file init/Makefile patching file init/main.c patching file ipc/mqueue.c patching file ipc/msg.c patching file ipc/sem.c patching file kernel/Kconfig.locks patching file kernel/Kconfig.preempt patching file kernel/Makefile patching file kernel/cpu.c patching file kernel/debug/kdb/kdb_io.c patching file kernel/events/core.c patching file kernel/exit.c patching file kernel/fork.c patching file kernel/futex.c patching file kernel/hrtimer.c patching file kernel/irq/handle.c patching file kernel/irq/manage.c patching file kernel/irq/settings.h patching file kernel/irq/spurious.c patching file kernel/irq_work.c patching file kernel/itimer.c patching file kernel/ksysfs.c patching file kernel/lglock.c patching file kernel/lockdep.c patching file kernel/panic.c patching file kernel/posix-cpu-timers.c patching file kernel/posix-timers.c patching file kernel/power/hibernate.c patching file kernel/power/suspend.c patching file kernel/printk.c patching file kernel/rcupdate.c patching file kernel/rcutiny.c patching file kernel/rcutiny_plugin.h patching file kernel/rcutree.c patching file kernel/rcutree.h patching file kernel/rcutree_plugin.h patching file kernel/relay.c patching file kernel/res_counter.c patching file kernel/rt.c patching file kernel/rtmutex.c patching file kernel/rtmutex_common.h patching file kernel/sched/core.c patching file kernel/sched/cputime.c patching file kernel/sched/debug.c patching file kernel/sched/fair.c patching file kernel/sched/features.h patching file kernel/sched/rt.c patching file kernel/sched/sched.h patching file kernel/signal.c patching file kernel/softirq.c patching file kernel/spinlock.c patching file kernel/stop_machine.c patching file kernel/time/jiffies.c patching file kernel/time/ntp.c patching file kernel/time/tick-common.c patching file kernel/time/tick-internal.h patching file kernel/time/tick-sched.c patching file kernel/time/timekeeping.c patching file kernel/timer.c patching file kernel/trace/Kconfig patching file kernel/trace/Makefile patching file kernel/trace/latency_hist.c patching file kernel/trace/trace.c patching file kernel/trace/trace.h patching file kernel/trace/trace_events.c patching file kernel/trace/trace_irqsoff.c patching file kernel/trace/trace_output.c patching file kernel/user.c patching file kernel/wait-simple.c patching file kernel/watchdog.c patching file kernel/workqueue.c patching file kernel/workqueue_internal.h patching file lib/Kconfig patching file lib/Kconfig.debug patching file lib/Makefile patching file lib/debugobjects.c patching file lib/idr.c patching file lib/locking-selftest.c patching file lib/percpu-rwsem.c patching file lib/radix-tree.c patching file lib/scatterlist.c patching file lib/smp_processor_id.c patching file lib/spinlock_debug.c patching file localversion-rt patching file mm/Kconfig patching file mm/bounce.c patching file mm/filemap.c patching file mm/highmem.c patching file mm/memcontrol.c patching file mm/memory.c patching file mm/mmu_context.c patching file mm/page_alloc.c patching file mm/page_cgroup.c patching file mm/slab.c patching file mm/slab.h patching file mm/slub.c patching file mm/swap.c patching file mm/vmalloc.c patching file mm/vmstat.c patching file net/core/dev.c patching file net/core/skbuff.c patching file net/core/sock.c patching file net/ipv4/icmp.c patching file net/ipv4/ip_output.c patching file net/ipv4/sysctl_net_ipv4.c patching file net/mac80211/rx.c patching file net/netfilter/core.c patching file net/packet/af_packet.c patching file net/rds/ib_rdma.c patching file net/sched/sch_generic.c patching file scripts/mkcompile_h ------------ Patching process output ----------------- Link to download patched kernel 3.10.65: https://yadi.sk/d/zWpNsbfZpwbd8 What i must do next to prepare this kernel for testing on pine64? RE: Real-time linux kernel - umiddelb - 03-06-2016 (03-06-2016, 02:23 AM)Artyom Wrote: This is link to pure kernel 3.10.65 with PREEMPT RT patch installed. Apparently a patch is installed correctly. Are you sure? Code: Hunk #1 FAILED at 277. At least 8 patches were missed, BSP kernel ≠ mainline kernel. The missed patches need to be reviewed. RE: Real-time linux kernel - Artyom - 03-07-2016 (03-06-2016, 03:28 PM)umiddelb Wrote:Where can i get missed patches?(03-06-2016, 02:23 AM)Artyom Wrote: This is link to pure kernel 3.10.65 with PREEMPT RT patch installed. Apparently a patch is installed correctly. (03-07-2016, 12:47 AM)Artyom Wrote:Now I'm sure that PREEMPT_RT patch is applied correctly. Still needed additional patches. where to get them?(03-06-2016, 03:28 PM)umiddelb Wrote:Where can i get missed patches?(03-06-2016, 02:23 AM)Artyom Wrote: This is link to pure kernel 3.10.65 with PREEMPT RT patch installed. Apparently a patch is installed correctly. RE: Real-time linux kernel - umiddelb - 03-07-2016 Code: Hunk #1 FAILED at 277. You need to review the files with the suffix .rej to find out why a specific hunk failed, e.g run a diff between the mainline and the BSP version of the file. RE: Real-time linux kernel - Artyom - 03-07-2016 (03-07-2016, 01:48 AM)umiddelb Wrote:Ok(03-07-2016, 12:47 AM)Artyom Wrote:(03-06-2016, 03:28 PM)umiddelb Wrote: RE: Real-time linux kernel - Artyom - 03-07-2016 (03-07-2016, 02:07 AM)Artyom Wrote:(03-07-2016, 01:48 AM)umiddelb Wrote:Ok(03-07-2016, 12:47 AM)Artyom Wrote:(03-06-2016, 03:28 PM)umiddelb Wrote: @umiddelb Can you tell me, What is the difference between BSP kernel and mainline kernel? What i must do with mainline kernel to get BSP kernel? RE: Real-time linux kernel - umiddelb - 03-07-2016 (03-07-2016, 03:29 AM)Artyom Wrote: @umiddelb The BSP (= Board Support Package) kernel contains patches provided by Allwinner to make the stock Linux kernel run on their SoC. Some of theses patches may interfere with the RT patches. You can download the mainline 3.10.65 kernel here and run diffs against the BSP kernel for the files indicated above. Then you need to identify the sections affected by the RT patch in the BSP kernel or run the patch against the mainline sources and compare the files mentioned above before and after applying the RT patch with their BSP kernel counterpart. RE: Real-time linux kernel - Artyom - 03-07-2016 (03-07-2016, 04:16 AM)umiddelb Wrote:(03-07-2016, 03:29 AM)Artyom Wrote: @umiddelb Part in BSP kernel which swears RT patch: patching file arch/arm/mm/fault.c Hunk #1 FAILED at 277. 1 out of 1 hunk FAILED -- saving rejects to file arch/arm/mm/fault.c.rej patching file drivers/misc/Makefile Hunk #1 FAILED at 53. 1 out of 1 hunk FAILED -- saving rejects to file drivers/misc/Makefile.rej patching file kernel/fork.c Hunk #2 FAILED at 230. 1 out of 9 hunks FAILED -- saving rejects to file kernel/fork.c.rej patching file kernel/hrtimer.c Hunk #1 FAILED at 47. 1 out of 31 hunks FAILED -- saving rejects to file kernel/hrtimer.c.rej patching file kernel/sched/core.c Hunk #29 FAILED at 4038. Hunk #45 FAILED at 7450. 2 out of 46 hunks FAILED -- saving rejects to file kernel/sched/core.c.rej patching file kernel/watchdog.c Hunk #2 FAILED at 241. 1 out of 3 hunks FAILED -- saving rejects to file kernel/watchdog.c.rej patching file mm/page_alloc.c Hunk #18 FAILED at 5540. 1 out of 21 hunks FAILED -- saving rejects to file mm/page_alloc.c.rej RE: Real-time linux kernel - umiddelb - 03-07-2016 I've re-mediated the rejected hunks and this time the kernel builds and boots up nicely. You can download the the kernel binary tar archive here. Unpack with: Code: curl -sSL https://github.com/umiddelb/z2d/blob/master/kernel/linux-3.10.65-2-pine64-rt69+-p64.tar.xz?raw=true | sudo tar --numeric-owner -C / -xpJf - You may find the kernel sources here. |