kernel not compiling on linux

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
GLneo

kernel not compiling on linux

Post by GLneo »

hi all, ok well i want an optimized build so i need gcc 4, so i have switched over my kernel to linux (from windows) but now my linker can't find the files i make and i think it is becouse of this little square after the .o[square], does this have any thing to do with the way linux and windows handle ascii return differntly??? becouse i copyed and pasted a lot of my build files from windows, does anyone know about this stuff?

p.s. when i deleat the square they are found.
p.p.s. the square is that square you get when the display can find the picture for the given ascii value.

thx
nick8325
Member
Member
Posts: 200
Joined: Wed Oct 18, 2006 5:49 am

Re:kernel not compiling on linux

Post by nick8325 »

Windows uses carriage return+line feed for end-of-line and Linux/UNIX uses line feed only. So it might be that the output file is now called foo.o<carriage return>, which wouldn't be any good...

You can change CR/LF to LF by zipping up your kernel and then unzipping it with unzip -a.
GLneo

Re:kernel not compiling on linux

Post by GLneo »

well wont that just get rid of it on the files i have allready made?
i need a way to get it out of the file that makes those files (basicaly is there a fancy linux command that strips a file of all <carriage return>'s in it. that i an run on compile.sh)

thx
nick8325
Member
Member
Posts: 200
Joined: Wed Oct 18, 2006 5:49 am

Re:kernel not compiling on linux

Post by nick8325 »

GLneo wrote: well wont that just get rid of it on the files i have allready made?
i need a way to get it out of the file that makes those files (basicaly is there a fancy linux command that strips a file of all <carriage return>'s in it. that i an run on compile.sh)

thx
That's what I meant - if you zip your kernel source, unzip -a will convert the line endings to LF. There's also a program unix2dos, perhaps your distribution has it...
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:kernel not compiling on linux

Post by Candy »

There's also fromdos, but it requires using pipes. You can't pipe to the same file, so you'll have to use some "fancy unix command":

Code: Select all

for i in *; do mv $i $i.bk; cat $i.bk | fromdos >$i; done
This does all the files in the current directory and leaves .bk backup files that haven't been modified. Watch out when running it more than once, it overwrites the backups.
Post Reply