Skip to contentSkip to conversation

a bit more trouble

DISCUSSION Mark Heim 2 participants 5 messages Mar 17, 2023 2 messages not in the archive

lore
Share & tools
lore

Mark Heim

author
#0 lore raw

The original task I was working on is the prism2fw.c file

kernels/staging/drivers/staging/wlan-ng

The above C code is not compiled using the makefile and I do not know how to build it successfully. It seems at least part of the problem is due to include macros not being able to find the right header.

This above task looked too difficult for me as a patch for now. The README mentions that this code is perhaps not ready for public use.

I am now looking at this directory

kernels/staging/drivers/staging/greybus

and more specifically at the top TODO
item in audio_gb.c. The main Linux build does compile this C code to an object but the makefile will not generate an object. It appears to be another PATH variable issue.

I tried to use gcc on audio_gb.c. It gives
an include macro error.

I tried to use the makefile in the relevant directory to generate the object but there
is a similar macro error.

Part of the issue with getting audio_gb.c
to compile is missing headers. I have done something like this:

gcc audio_gb.c -I/path/one -I/path/two -I/path/three

and so forth. Several warnings and errors appear with this approach. One of them that is repated over and over is atomic64, and
I tried to use the below line to identify where it had been defined, but it gave me what I think is the wrong answer.

grep -nr atomic64_t ~ | grep -v Binary | grep typedef

Please let me know if you have suggestions on what I could try next.

Thank you,

Mark

#1 lore raw
Quoted 43 lines · Mark Heim

The original task I was working on is the prism2fw.c file

kernels/staging/drivers/staging/wlan-ng

The above C code is not compiled using the makefile and I do not know how to build it successfully. It seems at least part of the problem is due to include macros not being able to find the right header.

This above task looked too difficult for me as a patch for now. The README mentions that this code is perhaps not ready for public use.

I am now looking at this directory

kernels/staging/drivers/staging/greybus

and more specifically at the top TODO
item in audio_gb.c. The main Linux build does compile this C code to an object but the makefile will not generate an object. It appears to be another PATH variable issue.

I tried to use gcc on audio_gb.c. It gives
an include macro error.

I tried to use the makefile in the relevant directory to generate the object but there
is a similar macro error.

Part of the issue with getting audio_gb.c
to compile is missing headers. I have done something like this:

gcc audio_gb.c -I/path/one -I/path/two -I/path/three

and so forth. Several warnings and errors appear with this approach. One of them that is repated over and over is atomic64, and
I tried to use the below line to identify where it had been defined, but it gave me what I think is the wrong answer.

Quoted 4 lines

grep -nr atomic64_t ~ | grep -v Binary | grep typedef

Please let me know if you have suggestions on what I could try next.

I don't have the impression that you are trying to compile the files in a proper manner.

First, please read the complete outreachy tutorial. If you have read it once, then read it again. Now that you have a concrete problem, you will pay more attention when you see the solution.

In general, with the Linux kernel, you can't compile the files manually with gcc. You have to start at the top level of your Linux tree. And then to compile something you need to say make and then provide the complete path. The tutorial will show different paths that you can use in different cases.

julia

A message that is not in the archive (sent off-list or not yet received): 20230317070102.GA433311@pikachu-Z97-D3H

A message that is not in the archive (sent off-list or not yet received): CALfc2niC57eNmN5CMtOmwUmS-nW2jsK2uD_tD3eYZ=A359CK4w@mail.gmail.com

#4 lore raw
Quoted 4 lines

I will take another look. Are you referring to these links:

https://kernelnewbies.org/OutreachyfirstpatchSetup
https://kernelnewbies.org/Outreachyfirstpatch

I was referring this one specifically. If you have access to a printer, print it out, go to some peaceful place and read the whole thing. The Linux kernel has many particularities, due eg to history, the large size, the widespread set of developers, and anything you do based on your intuition, you will do wrong.

julia

author
#5 lore raw
In reply to Julia Lawall
Quoted 47 lines · Julia Lawall
Quoted 43 lines · Mark Heim

The original task I was working on is the prism2fw.c file

kernels/staging/drivers/staging/wlan-ng

The above C code is not compiled using the makefile and I do not know how to build it successfully. It seems at least part of the problem is due to include macros not being able to find the right header.

This above task looked too difficult for me as a patch for now. The README mentions that this code is perhaps not ready for public use.

I am now looking at this directory

kernels/staging/drivers/staging/greybus

and more specifically at the top TODO
item in audio_gb.c. The main Linux build does compile this C code to an object but the makefile will not generate an object. It appears to be another PATH variable issue.

I tried to use gcc on audio_gb.c. It gives
an include macro error.

I tried to use the makefile in the relevant directory to generate the object but there
is a similar macro error.

Part of the issue with getting audio_gb.c
to compile is missing headers. I have done something like this:

gcc audio_gb.c -I/path/one -I/path/two -I/path/three

and so forth. Several warnings and errors appear with this approach. One of them that is repated over and over is atomic64, and
I tried to use the below line to identify where it had been defined, but it gave me what I think is the wrong answer.

Quoted 8 lines
Quoted 4 lines

grep -nr atomic64_t ~ | grep -v Binary | grep typedef

Please let me know if you have suggestions on what I could try next.

I don't have the impression that you are trying to compile the files in a proper manner.

Yes, seems like it. I tried to compile by extracting files out of the build but it didn't work.

Quoted 4 lines

First, please read the complete outreachy tutorial. If you have read it once, then read it again. Now that you have a concrete problem, you will pay more attention when you see the solution.

Affirmative. I went through the whole thing. Somehow, the make -j2 command seemed to go faster in certain settings. I also tried to note the "Compiling only part of the kernel," but I don't know what else to pick up.

Quoted 6 lines

In general, with the Linux kernel, you can't compile the files manually with gcc. You have to start at the top level of your Linux tree. And then to compile something you need to say make and then provide the complete path. The tutorial will show different paths that you can use in different cases.

Yes, I think I got that down. I finished a patch that is slightly more complicated than editing whitespace, but I have no idea if I'm on the right track or if I'm still off course.

Quoted 1 line

julia

#6 lore raw
Quoted 3 lines

Yes, I think I got that down. I finished a patch that is slightly more complicated than editing whitespace, but I have no idea if I'm on the right track or if I'm still off course.

It could be better to start with something extremely simple, to be sure to do everything in the proper manner.

julia