A problem with GRUB on OS X

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
Temich
Posts: 3
Joined: Fri Jun 03, 2016 5:02 am
Libera.chat IRC: Temich

A problem with GRUB on OS X

Post by Temich »

Hello everyone. Sorry for my poor English. I'm having a problem with GRUB on El Capitan. It doesn't making .iso file.

Code: Select all

==> Generating an ISO image
echo "insmod gfxterm; \
insmod vbe; \
timeout=5; \
set gfxmode=1024x768; \
menuentry \"U365 Basic System 1.0\" \
{ \
echo 'Loading kernel...'; \
multiboot /boot/u365.elf; \
echo 'Loading initrd...' ;\
module /boot/initrd.tar initrd; \
boot; \
} \
" > build/iso/fs/grub.cfg
cp build/iso/fs/grub.cfg build/iso/fs/boot/grub/grub.cfg
cp build/bin/u365.elf build/iso/fs/boot/
/usr/local/bin/grub-mkrescue -d ~/i386-pc -o build/releases/u365-0.7.iso build/iso/fs
/usr/local/bin/grub-mkrescue: warning: cannot open directory `/usr/local/share/locale': No such file or directory.
/usr/local/bin/grub-mkrescue: warning: Your xorriso doesn't support `--grub2-boot-info'. Some features are disabled. Please use xorriso 1.2.9 or later..
echo -n
Building C file: run.c
i686-elf-gcc: error: run.c: No such file or directory
i686-elf-gcc: fatal error: no input files
compilation terminated.
make: *** [run.c] Error 1
[Finished in 6.9s with exit code 2]
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: A problem with GRUB on OS X

Post by Nable »

It would be much better if you post the exact commands that you try to run, not just their obscure output. Or you can ask author(s) of U365 directly.
BTW, judging from this output, the problem isn't in GRUB but in absence of some file - "run.c".
User avatar
osdever
Member
Member
Posts: 492
Joined: Fri Apr 03, 2015 9:41 am
Contact:

Re: A problem with GRUB on OS X

Post by osdever »

Warning: he is third U365 developer, not my second account.
Developing U365.
Source:
only testing: http://gitlab.com/bps-projs/U365/tree/testing

OSDev newbies can copy any code from my repositories, just leave a notice that this code was written by U365 development team, not by you.
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

Re: A problem with GRUB on OS X

Post by Octocontrabass »

Temich wrote:

Code: Select all

/usr/local/bin/grub-mkrescue: warning: Your xorriso doesn't support `--grub2-boot-info'. Some features are disabled. Please use xorriso 1.2.9 or later..
What version of xorriso do you have? (Do you have xorriso at all?)
Temich
Posts: 3
Joined: Fri Jun 03, 2016 5:02 am
Libera.chat IRC: Temich

Re: A problem with GRUB on OS X

Post by Temich »

Nable wrote:It would be much better if you post the exact commands that you try to run, not just their obscure output. Or you can ask author(s) of U365 directly.
BTW, judging from this output, the problem isn't in GRUB but in absence of some file - "run.c".

Code: Select all

# Welcome user at make call
_welcome:
	@echo " Makefile: U365"

compile:     _welcome clean directories _compile $(SOURCES)
#	@echo -e " $(ARROW) Compiling GDT[0m"
#	@$(IASM) $(SRC_DIR)/arch/$(ARCH)/gdt.s -o $(BUILD_DIR)/obj/gdt.o $(IASFLAGS)
#	@echo -e " $(ARROW) Compiling IDT[0m"
#	@$(IASM) $(SRC_DIR)/arch/$(ARCH)/idt.s -o $(BUILD_DIR)/obj/idt.o $(IASFLAGS)
#	@echo -e " $(ARROW) Compiling C sources[0m"
#	@$(CC) $(SOURCES) $(SRC_DIR)/arch/$(ARCH)/init.c $(IOBJS) $(CFLAGS) $(LDFLAGS)
	@echo -n
initrd: 	_welcome clean directories
	@echo " $(ARROW) Generating initrd"
	@cd initrd; tar -cf ../build/iso/fs/boot/initrd.tar *
	

link:        _welcome clean directories compile
	@echo " $(ARROW) Linking"
	@$(CC) $(OBJS) $(LDFLAGS)


iso:         _welcome directories
	@echo " $(ARROW) Generating an ISO image"

	echo "insmod gfxterm;  \
insmod vbe;  \
timeout=5;   \
set gfxmode=1024x768;  \
menuentry \"U365 Basic System 1.0\"  \
{  \
	echo 'Loading kernel...';            \
	multiboot /boot/u365.elf;            \
	echo 'Loading initrd...'            ;\
	module    /boot/initrd.tar  initrd;  \
	boot;  \
}  \
" > $(BUILD_DIR)/iso/fs/grub.cfg

	cp $(BUILD_DIR)/iso/fs/grub.cfg $(BUILD_DIR)/iso/fs/boot/grub/grub.cfg
	cp $(BUILD_DIR)/bin/$(BINFILE).$(BINFORMAT) $(BUILD_DIR)/iso/fs/boot/
	/usr/local/bin/grub-mkrescue $(MKRSCFLAGS)
	echo -n
##########################################################

#run:         _welcome
#	
#	qemu-system-i386 -cdrom ~/desktop/Важное/U365/build/releases/u365-0.7.iso -m 128
#	

##########################################################

clean:       _welcome
	@echo " $(ARROW) Cleaning"
	#@rm -rf $(BUILD_DIR) $(VFS_DIR)/conv *.iso initrd.tar
	@echo -n

directories: _welcome
	@echo " $(ARROW) Creating build directories"
	@mkdir -p $(OBJDIRS) $(CFSDIRS) $(BUILD_DIR)/bin $(BUILD_DIR)/iso/fs/boot $(BUILD_DIR)/iso/fs/boot/grub $(BUILD_DIR)/iso/fs/fonts $(BUILD_DIR)/releases
	@echo -n

Makefile:
	@echo " Strange make bug prevented"

# Compilation notification - do not remove
_compile:
	@echo " $(ARROW) Compiling"
# Compilation routines
%.c:          _welcome directories _compile
	@echo " Building C file: $@"
	@$(CC) $@ -o $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/obj/%.c.o,$@) $(CFLAGS)
	@echo -n

%.s:          _welcome directories _compile
	@echo " Building GAS file: $@"
	@$(GAS) $@ -o $(patsubst $(SRC_DIR)/%.s,$(BUILD_DIR)/obj/%.s.o,$@)
	@echo -n

%.asm:        _welcome directories _compile
	@echo " Building IAS file: $@"
	@$(IASM) $@ -o $(patsubst $(SRC_DIR)/%.asm,$(BUILD_DIR)/obj/%.asm.o,$@) $(IASFLAGS)
	@echo -n
Temich
Posts: 3
Joined: Fri Jun 03, 2016 5:02 am
Libera.chat IRC: Temich

Re: A problem with GRUB on OS X

Post by Temich »

Octocontrabass wrote:
Temich wrote:

Code: Select all

/usr/local/bin/grub-mkrescue: warning: Your xorriso doesn't support `--grub2-boot-info'. Some features are disabled. Please use xorriso 1.2.9 or later..
What version of xorriso do you have? (Do you have xorriso at all?)
Yes, I have a horriso v1.4.0.
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

Re: A problem with GRUB on OS X

Post by Octocontrabass »

Temich wrote:Yes, I have a horriso v1.4.0.
Don't you think it's a little strange that grub would tell you to use "xorriso 1.2.9 or later" even though you already have xorriso 1.4.0 installed? It sounds like grub isn't running the correct program.
Post Reply