Page 1 of 1

A problem with GRUB on OS X

Posted: Fri Jun 03, 2016 5:14 am
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]

Re: A problem with GRUB on OS X

Posted: Fri Jun 03, 2016 5:20 am
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".

Re: A problem with GRUB on OS X

Posted: Fri Jun 03, 2016 5:20 am
by osdever
Warning: he is third U365 developer, not my second account.

Re: A problem with GRUB on OS X

Posted: Fri Jun 03, 2016 5:24 am
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?)

Re: A problem with GRUB on OS X

Posted: Fri Jun 03, 2016 5:25 am
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

Re: A problem with GRUB on OS X

Posted: Fri Jun 03, 2016 5:26 am
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.

Re: A problem with GRUB on OS X

Posted: Fri Jun 03, 2016 7:16 am
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.