If file location is local then use kernelimages directory to grab the kernel tar file
Processing
We will gather statistics and do some work in 2 phases, right after we have decompressed the kernel file under the preworkspace directory and after we make some changes to its directory structure under postworkspace, statistics will be populated in 2 different files under our top working directory, their names will be:
stats.pre
stats.post
Pre Processing
Take kernel image from kernelimages directory and decompress under the preworkspace directory. We will require the following information under stats.pre files:
File Names
File Content
Some Tasks To Do
Sort in alphabetical order all the inclusion of libraries using this format #include only under drivers/i2c/ directory, please make sure you identify all files you have modified, you will need their identity in the post processing phase
Let's populate our file called intel.contributors under our top level working directory directory, search for all Intel contributors matching @intel.com and identify the file where their name was located, then write one line per contributor, cannot be repeated e.g.
Post Processing
Create 3 directories under postworkspace and move all files from preworkspace where kernel was decompressed according to the file extensions:
In all 3 directories, if we have files with the same name, add a number as identifier that will increase by 1 as required, e.g.
Some Tasks To Do
Add your name to the beginning, middle and end of every .c file
In all files substitute #include for every #include found
Fix your #include's order for the files coming from driver/i2c
We will need the following information under stats.post files:
File Names
File Content
Results
A message of Pass / Fail should be printed to stdout for each of the following:
Our Total number of files is the same in both stats.pre and stats.post
user $ myscript.sh <internet/local> <x.x.xx> <xz|gz>
# of README* (files as README.Locking also count)
# of Kconfig
# of Kbuild
# of Makefiles
# of .c files
# of .h files
# of .pl files
# of others files
Total number of files
# of ocurrences for Linus
# of directories found under arch/
# of ocurrences for kernel_start
# of ocurrences for __init
# of files in its filename containing the word gpio
# of ocurrences for #include <linux/module.h>
Path/to/file.c | Sara Sharp
Path/to/file.c | Darren Hart
files_c, all .c files
files_h, all .h files
files_others, all other files
README_1
README_2
# of READMEs
# of Kconfig
# of Kbuild
# of Makefiles
# of .c files
# of .h files
# of .pl files
# of others files
Total number of files
# of ocurrences having "Linus" string
# of ocurrences having "kernel_start" string
# of ocurrences having "__init" string
# of files in its filename containing the word "gpio"
# of ocurrences having "#include <linux/module.h>"
# of ocurrences having "#include <linux/learningscripting.h>"