I’m so interested in contributing for the linux kernel, so I’m going to follow the instructions to submit a first patch.
Actually I’m running in my laptop Fedora 27, the tutorial was made for ubuntu but with a little changes we can do it for fedora.
1 – Install some packages
The first thing we are going to do is to run this command
sudo dnf install vim libncurses5-devel gcc make git ctags openssl-devel
let it download the packages.
2 – Setup your Linux kernel code repository
Create a directory and a subdirectory in our user’s home
enter to this subdirectory and we are going to clone there the tree Greg Kroah-Hartman’s staging tree repository
then we enter to the directory staging.
3 – Setting up your kernel configuration
When we download the source tree, it doesn’t have a .config file. We have to generate a .config file which determines which drivers are built. In order to do that duplicate your current config.
That config file is stored somewhere in /boot/. And we need to copy that file in our current directory just running this command
And as we can see, the file was copied, now we have to change it name
4 – Building the kernel
I couln’t run the command make at first, because before that I had to install the packages bison and flex, also installed libelf-dev, libelf-devel or elfutils-libelf-devel, on my laptop worked with elfutils-libelf-devel
Now, I can run make, takes a long time, but finally it works without errors
finally we can see that make add to our current directory 6 files (built-in.o, modules.order, modules.builtin, Moule.symvers, System.map, vmlinux.o) and 2 directories (net, vmlinux)
5- Installing the kernel
Once we have the .ko files, we have to install the kernel running this command
And that’s all, when you boot your computer in the grub will appear the kernel that you have installed.
We wanted to create a program that can do something like take an entry and select an option to choose a faculty where you study and finally return the name and the faculty where belongs instead of message
we enter the name of the student(alumno) “fiorella effio saldivar” and then select the faculty(facultad) “Facultad Ciencias Matematicas”, finally press send(enviar) and we will have “name of the student” + of(de la) + “faculty”
Now we are going to see the taxonomy of this program
The first part of the code
Here we set the title for the window in line 8 (UNMSM), in line 11 create a Gtk.Box called box_outer to contain all the items(select_message, listbox, button, final_label), in line 12 we add this box_outer to our main window, in line 13 we create a Gtk.Label called select_message and then in line 14 add it to our box_outer.
Now in line 16 we create a Gtk.ListBoxRow called listbox to contain the row1 and row2, in line we set the selection mode to NONE, in line 19 we create row1 to contain hbox11, in line 20 create hbox11 to contain label1 and entry1.
In line 28 we create row2 to contain hbox21, in line 29 create hbox21 to contain label2 and combo.
The second partin line 32 we create a Gtk.ComboBoxText called combo, then in line 33, 34, 35, 36 we define the options for combo, in line 41 we create a Gtk.Button called button and in line 42 create a Gtk.Label called final_label to show the result for our program.
In line 44 we are going to called for button when it is clicked the function on_clicked_me, we add the button and final_label to box_outer.
Finally we define the function on_clicked_me that ask us for 5 parameters (self, button, entry, label,combo), first we get the text written in a variable text, then in text2 we get the string for our combo option selected, in text3 we combine text and text2, and finally we set the text for final_label 🙂
You can check the code here.
Today is the final session for #PeruRoadtoGSoC2018 and we are going to test integration with CircleCI in order to contribute with the documentation of Fedora (automatize the proccess of deploying), first you have to create an account in CircleCI (link), to create it please sign up with your github account, once you do that you can see in the Projects tab that you don’t have any project building on CircleCI
Now we have to create our repository so create a directory called integration_Fedora containing another directory called src there create the file index.html with this code
and creating it in our github we can initiliaze our repo now ir order to push all the commits, now in the CircleCI page check the tab Projects and you can see our project integration_Fedora now click on Setup project
We have to read this guide and the first step is create a folder name .circleci and add a file config.yml there, the second step is to copy on the file the sample .yml below, now push this change up to your Github and press Start building once you did that
Just actualize the page and you have this
Now, we are going to do our second commit
And we see that we put an octocat when you enter the name of the commit
Now we are going to edit our config.yml file changing for fedora:latest
Now we are going to create a ssh-keygen, please what I did in my terminal
Then in the github page we can check in settings the ssh keys and we add our ssh key with the part in white selected, once you’ve done that it will be there our ssh-key
Now in the CircleCI page we have to authorize in permissions checkout SSH keys
Then just authorize
After creating the key we start to commit with a icon (fire)
Icon (rat and raise_hand)
Finally we are going to edit our config.yml file in this way
And edit our index.html file like this
Now we are going to upload it to our repository
Here you can get the link to your page
And finally we see here how it works! 🙂
You can check my repo here.
Today we are going to use Gtk with Python and for that we can check our version of Python just type python
Then I’m going to install pygobject3-devel
this code just create an empty window that close the program when you close the window
and then we run it with python
Now, if you want to set the title, you have to add the line win.set_title(“The Text”) like this
And finally you can run it
Now we are going to create another file that have to allow us lo go to the web page of 4 languages, there we are going to add a label and gtk.listbox that contains 4 gtklistboxrow in order to create some like this
We create a Gtk.Box that will contain all (our first label and gtklistbox and so on)
Here is how it works
- box_outer contain label and gtklistbox
- gtklistbox contain gtklistboxrow and hbox
- hbox contain button
All that we did was to create the same 4 rows and just change the link for each one using gtklinbutton also to create the link and open it in Chrome.
You can check the code here.
Finally we were seeing how to search bugs in gnome here.
In the next picture we are able to see the nautilus bugs clicking in Issues
There we can grep bugs for people who are Newcomers like me
Also we saw the projects for Fedora in this link
we saw one project called system_config_language that wants to create something like a button for example that change the language configuration for all the system including apps browser keyword etc
First we have to install gtk dependencies to compile the file and also run the file. So you have to install with this comand
sudo dnf install gtk3-devel gstreamer-devel clutter-devel libgda-devel gobject-introspection-devel
then we are going to install webkit dependencies to compile our file
At the moment of compile we had an error
That’s because the name of the package is not the same as the package that we download before, so we have to find it in /usr/lib64
And here at the end we have the webkit2gtk-4.0
So we have to do a modification to compile it replace webkit3.0 for wetkit2gtk-4.0
But there is another error because we have to do a modification in the file that contains our code, so open the file to modificate it
just add 2 at the final of webkit, like this
now we can compile it without errors 😀
finally we can run the code 🙂
You can check the code here.