You are on the right track, you are following the latest Quark X1000 BSP and already working on the image. In order to make modifications to the image, there are two main methods. You can modify the recipes manually (those are the .bb files) or you can use menuconfig.
Of those two I believe the most convenient is menuconfig. I suggest you to read Yocto's Mega Manual (http://www.yoctoproject.org/docs/1.7.2/mega-manual/mega-manual.html) in section 220.127.116.11 and 5.7 to learn more about how to use this tool.
What exactly do you want to achieve? I don't have a clear idea about that. Why do you need to modify the kernel? Is there any possibility of making the changes you require on the image? I mean, like installing the printk package from source.
Let me clarify.
I need to modify a driver in the kernel. Codes have been tested in other platforms. What I need to do is to make the exact same changes, most of which are printing messages in the kernel.
Now, I'm not sure how to make it work, i.e., where is the kernel source code in the environment and how I can compile the new kernel.
Hopefully, this is clear for you.
1 of 1 people found this helpful
In the file, ./drivers/net/wireless/ath/ath9k/main.c, I will add a printk message,
+ printk("INT_TX %llu\n", (long long) tsf);
This is one of files, and one of many modifications.
I simply want to add these lines in the source code and then compile the image.
I followed the instruction from Yocto Project Development Manual, 18.104.22.168.
Establish the temporary kernel source files: Temporary kernel source files are kept in the Build Directory created by the OpenEmbedded build system when you run BitBake.
Rebuild the kernel image with your changes: Rebuilding the kernel image applies your changes.
The source code for Galileo, I think, is located in ./meta-clanton_v22.214.171.124/yocto_build/tmp/work/i586-poky-linux/linux-libc-headers/3.16-r0/linux-3.16, which was mentioned in my initial post. And then I do bitbake image-full, but the modification does work.
I understand... thank you for the clarification. I haven't done something like this before, but let me check it to see if I'm able to find something useful for you. If I'm able to find anything useful I'll post it here.
2 of 2 people found this helpful
The other day I was adding an i2c driver to the Intel Yocto kernel, which qualifies for modifying the kernel. I am guessing this is similar to what you want to do...
To do this put in the following commands:
1. bitbake –c devshell linux-yocto-quark
Now make your modifications to the kernel then:
2. bitbake –c compile linux-yocto-quark -f
3. bitbake linux-yocto-quark
4. bitbake image-full
Hope this helps,
Thank you very much for your reply.
It should work. I just only changed version number to test your commands, and it worked. I will work on driver modification tomorrow.
Thank you again, it saves me a lot of time.
Well, I'm wondering where you got these stuffs. I want to get the link, and learn as much as possible.
No problem, its great to help others out with the way people help me.
I'm afraid I don't have a specific link, I was helped with this problem by a colleague of mine, but I'm sure the Open Embedded Wiki will have something on it, as Bitbake is part of Open Embedded.
Glad to help,