lkl / linux

Linux kernel source tree
https://lkl.github.io/
Other
796 stars 136 forks source link

What is the best way to port the lkl code back old linux kernel(like 3.2.16)? #251

Open weiqiandai opened 7 years ago

weiqiandai commented 7 years ago

Try to find out the list of files outside arch/lkl that LKL modified. Look like the master branch don't have the latest tag (the last one in the master branch is v4.7-rc7) - not v4.8. Need to study the diff and port the LKL code to based on old linux kernel (like 3.2.16). Would like to get your suggestion to accomplish this task. thanks, Weiqian

M1cha commented 7 years ago

you can use git diff c8d2bc9 for that. c8d2bc9 is that latest merged upstream tag. If you do a git diff --stat --diff-filter=M c8d2bc9 which excludes new files and only shows a statistics instead of a full diff you can see that the number of changes is actually very small:

 MAINTAINERS                       |  8 ++++++++
 Makefile                          |  1 +
 crypto/xor.c                      |  2 ++
 fs/xfs/xfs_buf.c                  | 27 +++++++++++++++++++++++++++
 include/asm-generic/atomic64.h    |  2 ++
 include/asm-generic/vmlinux.lds.h |  9 +++++++--
 include/linux/compiler-gcc.h      |  4 ++++
 include/linux/cpu.h               |  2 ++
 include/linux/syscalls.h          |  6 ++++++
 init/Kconfig                      | 12 ++++++++++++
 kernel/cpu.c                      |  5 +++++
 kernel/signal.c                   |  2 +-
 lib/.gitignore                    |  1 +
 lib/raid6/.gitignore              |  1 +
 lib/raid6/algos.c                 |  9 ++++++---
 scripts/.gitignore                |  2 ++
 scripts/Makefile                  |  2 ++
 scripts/basic/.gitignore          |  2 ++
 scripts/checkpatch.pl             |  6 ++++--
 scripts/kallsyms.c                | 15 +++++++++++----
 scripts/kconfig/.gitignore        |  1 +
 scripts/link-vmlinux.sh           | 16 +++++++++++-----
 scripts/mod/.gitignore            |  1 +
 tools/Makefile                    | 12 +++++++-----
 24 files changed, 126 insertions(+), 22 deletions(-)
weiqiandai commented 7 years ago

Hi Folks, Need some hint to port the arch/lkl/kernel/time.c back to linux 3.2.16. Look like it has a major changes between 4.7 and 3.2.16 on the data structure "struct clock_event_device". The field for enum clock_event_state machine is new. How can we initialize the structure: static struct clock_event_device clockevent = { .name = "lkl", .features = CLOCK_EVT_FEAT_ONESHOT, .set_state_oneshot = clockevent_set_state_oneshot, .set_next_event = clockevent_next_event, .set_state_shutdown = clockevent_set_state_shutdown, }; Since some of the fields are new on 4.7 kernel. Thanks, Weiqian