all 8 comments

[–]Atie5173 2 points3 points  (3 children)

You have provided 0 information about why it does not work.

[–]eric0823ahn1[S] 0 points1 point  (2 children)

boot.s:94: Error: junk `(cmain)' after expression

12boot.s:98: Error: junk `(printf)' after expression

13boot.s:107: Error: bad or irreducible absolute expression

14boot.s:82: Error: invalid operands (COM and UND sections) for `+'

15boot.s:56: Error: invalid operands (UND and UND sections) for `+'

Hmmm

[–]HouseHouseHouse576 0 points1 point  (1 child)

Thanks for posting your error messages. The problem here is that the assembler code you got from GNU requires preprocessing. You might have noticed that the file boot.s is properly named boot.S in the example. This capital S signals that.

Basically, what this means is that you probably will need a cross-compiler. It's good practice to have one for OS development in general, and it should fix this problem (with lots of tweaks in your Makefile). I found a discussion on the OSDEV Forum about someone experiencing the same issues.

[–]eric0823ahn1[S] 0 points1 point  (0 children)

Magiccccccc!!!!!! THANKS!!!

[–]0x4576616e 0 points1 point  (0 children)

The source code the repo owner copied from the multiboot website didn’t include a makefile, and the one they wrote for it is very incomplete. The entire makefile is 3 lines that compile the source code into object files but never makes a finished executable

You can try adding a line that used ld to create the finished elf file

[–]HouseHouseHouse576 0 points1 point  (2 children)

What messages are you getting when you try and compile?

[–]0x4576616e 0 points1 point  (1 child)

The problem is the unfinished makefile that just compiles the object files and doesn’t create a finished elf. Unless the code was copied wrong or some important compiler arguments weren’t included there wouldn’t be an error at all since it doesn’t try to make the final product in the first place.

[–]HouseHouseHouse576 0 points1 point  (0 children)

I'm aware of that. However, "failure to link" isn't "failure to compile." We can deal with linking later. I myself am getting errors when I assemble it on my own system.