This patch adds a native configuration for PPC. It is based on the cross configuration files
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
diff --git a/config/examples/ppc_config.xml b/config/examples/ppc_config.xml index 4023cb8..3346357 100644 --- a/config/examples/ppc_config.xml +++ b/config/examples/ppc_config.xml @@ -4,19 +4,20 @@ <!-- generic --> <!--<option name="CONFIG_AMD64" type="boolean" value="true"/> --> <option name="CONFIG_PPC" type="boolean" value="true"/> - <!--<option name="CONFIG_MOL" type="boolean" value="true"/>--> - <!--<option name="CONFIG_BRIQ" type="boolean" value="true"/>--> - <option name="CONFIG_PEARPC" type="boolean" value="true"/> + <option name="CONFIG_MOL" type="boolean" value="false"/> + <option name="CONFIG_BRIQ" type="boolean" value="false"/> + <option name="CONFIG_PEARPC" type="boolean" value="false"/> + <option name="CONFIG_QEMU" type="boolean" value="true"/> <option name="CONFIG_BIG_ENDIAN" type="boolean" value="true"/>
<!-- Build hosted UNIX Binary --> - <option name="CONFIG_HOST_UNIX" type="boolean" value="true"/> + <option name="CONFIG_HOST_UNIX" type="boolean" value="false"/> <option name="CONFIG_UNIX_QT" type="boolean" value="false"/> <option name="CONFIG_PLUGINS" type="boolean" value="false"/> - + <!-- Kernel Debugging --> <option name="CONFIG_DEBUG" type="boolean" value="true"/> - <option name="CONFIG_DEBUG_BOOT" type="boolean" value="true"/> + <option name="CONFIG_DEBUG_BOOT" type="boolean" value="false"/> <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/> <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/> <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/> @@ -24,47 +25,53 @@ <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/> <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/> <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/> - <option name="CONFIG_SERIAL_PORT" type="boolean" value="true"/> + <option name="CONFIG_SERIAL_PORT" type="integer" value="1"/> <option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/> <option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/> - - + + <!-- Module Configuration --> <option name="CONFIG_CMDLINE" type="boolean" value="true"/> <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/> - - + + <!-- Filesystem Configuration --> <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/> <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/> + <option name="CONFIG_MAC_PARTS" type="boolean" value="true"/> + <option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/> <option name="CONFIG_PC_PARTS" type="boolean" value="true"/> <option name="CONFIG_FS" type="boolean" value="true"/> - <option name="CONFIG_HFS" type="boolean" value="false"/> - <option name="CONFIG_HFSP" type="boolean" value="true"/> + <option name="CONFIG_HFS" type="boolean" value="true"/> + <option name="CONFIG_HFSP" type="boolean" value="false"/> <option name="CONFIG_GRUBFS" type="boolean" value="true"/> - <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="true"/> <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/> <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/> <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/> - <option name="CONFIG_FSYS_REISERFS" type="boolean" value="true"/> + <option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/> <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/> <option name="CONFIG_FSYS_UFS" type="boolean" value="false"/> - <option name="CONFIG_FSYS_ISO9660" type="boolean" value="false"/> + <option name="CONFIG_FSYS_ISO9660" type="boolean" value="true"/> <option name="CONFIG_FSYS_FFS" type="boolean" value="false"/> <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/> <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/> <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/> - <option name="CONFIG_DEBUG_FS" type="boolean" value="true"/> - + <option name="CONFIG_DEBUG_FS" type="boolean" value="false"/> + <!-- Miscellaneous --> - <option name="CONFIG_LINUXBIOS" type="boolean" value="true"/> - + <option name="CONFIG_LINUXBIOS" type="boolean" value="false"/> + <!-- Drivers --> <option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/> <option name="CONFIG_DEBUG_PCI" type="boolean" value="true"/> <option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/> - <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="4"/> + <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/> + <option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/> + <option name="CONFIG_IDE_DEV_NAME" type="string" value="ata-%d"/> + <option name="CONFIG_IDE_DEV_TYPE" type="string" value="ata"/> <option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/> <option name="CONFIG_DRIVER_ADB" type="boolean" value="true"/> + <option name="CONFIG_DRIVER_VGA" type="boolean" value="true"/>
</config> diff --git a/config/examples/ppc_rules.xml b/config/examples/ppc_rules.xml new file mode 100644 index 0000000..57f1479 --- /dev/null +++ b/config/examples/ppc_rules.xml @@ -0,0 +1,100 @@ +<rules> + +<pre><![CDATA[ +# +# Autogenerated OpenBIOS Makefile +# (C) 2004-2005 by the OpenBIOS team +# + +ARCH := ppc +ODIR := obj-$(ARCH) +HOSTCC := gcc +HOSTCFLAGS := -Os -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) +HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations +HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes +HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +# +# MOLPATH is needed if you want to build openbios-mol.elf +# +MOLPATH=$(HOME)/mol-0.9.71 + +CC := gcc +AS := as +AR := ar +LD := ld +NM := nm +STRIP := strip +RANLIB := ranlib +CFLAGS := -Os -Wall -msoft-float -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2 +CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations +CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes +INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include + +M4 := m4 + +# +# pre rules +# + +all: mol versions dictionaries host-libraries target-libraries host-executables target-executables + +VERSION := "1.0RC1" + +versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs + +$(ODIR)/forth/version.fs: + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ + ( echo ": builddate \" $$DATE\" ; " ; \ + echo ": version \" $(VERSION)\" ; " ; ) \ + > $(dir $@)/version.fs + +$(ODIR)/target/include/openbios-version.h: + @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ + ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \ + echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \ + echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \ + > $(dir $@)/openbios-version.h +mol: + @grep CONFIG_MOL $(ODIR)/forth/config.fs >/dev/null && ( \ + echo "Using MOL path $(MOLPATH)..."; \ + ln -s $(MOLPATH)/src/shared/osi_calls.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/shared/osi.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/shared/prom.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/include/boothelper_sh.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/include/video_sh.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/include/pseudofs_sh.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/include/kbd_sh.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/drivers/disk/include/scsi_sh.h $(ODIR)/target/include/; \ + ln -s $(MOLPATH)/src/drivers/disk/include/ablk_sh.h $(ODIR)/target/include/ ) || true + +]]></pre> + + <!-- host compiler build rules --> + +<rule target="host" entity="executable"> + $(HOSTCC) $(HOSTCFLAGS) -o $@ $^ +</rule> + +<rule target="host" entity="object"> + $(HOSTCC) $(HOSTCFLAGS) $(HOSTINCLUDES) -c -o $@ $^ +</rule> + +<rule target="host" entity="library"> + $(AR) cru $@ $^; ranlib $@ +</rule> + + <!-- target/cross compiler build rules --> + +<rule target="target" entity="executable"> + $(CC) $(CFLAGS) -o $@ $^ +</rule> + +<rule target="target" entity="object"> + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $^ +</rule> + +<rule target="target" entity="library"> + $(AR) cru $@ $^; $(RANLIB) $@ +</rule> + +</rules>
On 12/31/08, Aurelien Jarno aurelien@aurel32.net wrote:
This patch adds a native configuration for PPC. It is based on the cross configuration files
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
<!-- Build hosted UNIX Binary -->
<option name="CONFIG_HOST_UNIX" type="boolean" value="true"/>
<option name="CONFIG_HOST_UNIX" type="boolean" value="false"/>
When compiling natively, we can build a Unix host version too. Is it OK if I commit the patch including your sign-off with this change removed?
On Wed, Dec 31, 2008 at 05:24:13PM +0200, Blue Swirl wrote:
On 12/31/08, Aurelien Jarno aurelien@aurel32.net wrote:
This patch adds a native configuration for PPC. It is based on the cross configuration files
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
<!-- Build hosted UNIX Binary -->
<option name="CONFIG_HOST_UNIX" type="boolean" value="true"/>
<option name="CONFIG_HOST_UNIX" type="boolean" value="false"/>
When compiling natively, we can build a Unix host version too. Is it OK if I commit the patch including your sign-off with this change removed?
Yes, I have seen that, but the Unix host version is currently not building. I think we can enable it when it is fixed.
Aurelien
On 12/31/08, Aurelien Jarno aurelien@aurel32.net wrote:
On Wed, Dec 31, 2008 at 05:24:13PM +0200, Blue Swirl wrote:
On 12/31/08, Aurelien Jarno aurelien@aurel32.net wrote:
This patch adds a native configuration for PPC. It is based on the cross configuration files
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
<!-- Build hosted UNIX Binary -->
<option name="CONFIG_HOST_UNIX" type="boolean" value="true"/>
<option name="CONFIG_HOST_UNIX" type="boolean" value="false"/>
When compiling natively, we can build a Unix host version too. Is it OK if I commit the patch including your sign-off with this change removed?
Yes, I have seen that, but the Unix host version is currently not building. I think we can enable it when it is fixed.
Oh, what's the problem?
I'll apply the patch then as it is now.
On Wed, Dec 31, 2008 at 08:00:18PM +0200, Blue Swirl wrote:
On 12/31/08, Aurelien Jarno aurelien@aurel32.net wrote:
On Wed, Dec 31, 2008 at 05:24:13PM +0200, Blue Swirl wrote:
On 12/31/08, Aurelien Jarno aurelien@aurel32.net wrote:
This patch adds a native configuration for PPC. It is based on the cross configuration files
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
<!-- Build hosted UNIX Binary -->
<option name="CONFIG_HOST_UNIX" type="boolean" value="true"/>
<option name="CONFIG_HOST_UNIX" type="boolean" value="false"/>
When compiling natively, we can build a Unix host version too. Is it OK if I commit the patch including your sign-off with this change removed?
Yes, I have seen that, but the Unix host version is currently not building. I think we can enable it when it is fixed.
Oh, what's the problem?
obj-ppc/libbootstrap.a(primitives.o): In function `iocfetch': primitives.c:(.text+0x1416): undefined reference to `isa_io_base' primitives.c:(.text+0x141e): undefined reference to `isa_io_base' obj-ppc/libbootstrap.a(primitives.o): In function `iowfetch': primitives.c:(.text+0x1456): undefined reference to `isa_io_base' primitives.c:(.text+0x145e): undefined reference to `isa_io_base' obj-ppc/libbootstrap.a(primitives.o): In function `iolfetch': primitives.c:(.text+0x148a): undefined reference to `isa_io_base' obj-ppc/libbootstrap.a(primitives.o):primitives.c:(.text+0x1492): more undefined references to `isa_io_base' follow collect2: ld returned 1 exit status make[1]: *** [obj-ppc/openbios-unix] Erreur 1
I'll apply the patch then as it is now.
Thanks, but you forget to add the file config/examples/ppc_rules.xml .