multiboot2: Allow running autogen.sh
PATCH 1/3 multiboot2: Allow running autogen.sh
Current gnulib's gnulib-tool only runs if configure.ac contains AC_PREREQ(2.63).
As Autoconf 2.63 has been released in 2008-09, this should not affect too many systems in 2020.
--- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
@@ -12,7 +12,7 @@ dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE dnl USE OF THIS SOFTWARE. -AC_PREREQ(2.59) +AC_PREREQ(2.63) AC_INIT([Multiboot], [2.0], [[email protected]]) AC_CONFIG_SRCDIR([doc/multiboot.texi]) AC_CONFIG_HEADER([config.h])
Signature · 1 line
2.25.2
PATCH 2/3 multiboot2: Use .gitignore files
Add /.gitignore file and remove the /.bzrignore file.
The /doc/.gitignore file is generated by gnulib-tool so we keep that file in addition to the top-level /.gitignore file which covers everything else in subdirectories as well.
--- .bzrignore | 30 ------------------------------ .gitignore | 41 +++++++++++++++++++++++++++++++++++++++++ doc/.gitignore | 2 ++ 3 files changed, 43 insertions(+), 30 deletions(-) delete mode 100644 .bzrignore create mode 100644 .gitignore create mode 100644 doc/.gitignore
.bzrignore deleted +0 -30
@@ -1,30 +0,0 @@ -gendocs.sh -lib -m4 -.deps -Makefile -autom4te.cache -config.cache -config.h -config.log -config.status -stamp-h -stamp-h1 -doc/Makefile -doc/*.info* -doc/.deps -doc/gendocs_template -doc/mdate-sh -doc/Makefile.in -doc/boot.S.texi -doc/kernel -doc/kernel.c.texi -doc/multiboot.h.texi -doc/texinfo.tex -Makefile.in -aclocal.m4 -config.h.in -configure -depcomp -install-sh -missing
.gitignore new file +41 -0
41 lines not on this page · raw message
doc/.gitignore new file +2 -0
@@ -0,0 +1,2 @@ +/gendocs_template +/gendocs_template_min
Signature · 1 line
2.25.2
PATCH v2 2/3 multiboot2: Use .gitignore files
Add /.gitignore file and remove the /.bzrignore file.
The /doc/.gitignore file is generated by gnulib-tool so we keep that file in addition to the top-level /.gitignore file which covers everything else in subdirectories as well.
--- .bzrignore | 30 ------------------------------ .gitignore | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ doc/.gitignore | 2 ++ 3 files changed, 51 insertions(+), 30 deletions(-) delete mode 100644 .bzrignore create mode 100644 .gitignore create mode 100644 doc/.gitignore
.bzrignore deleted +0 -30
@@ -1,30 +0,0 @@ -gendocs.sh -lib -m4 -.deps -Makefile -autom4te.cache -config.cache -config.h -config.log -config.status -stamp-h -stamp-h1 -doc/Makefile -doc/*.info* -doc/.deps -doc/gendocs_template -doc/mdate-sh -doc/Makefile.in -doc/boot.S.texi -doc/kernel -doc/kernel.c.texi -doc/multiboot.h.texi -doc/texinfo.tex -Makefile.in -aclocal.m4 -config.h.in -configure -depcomp -install-sh -missing
.gitignore new file +49 -0
49 lines not on this page · raw message
doc/.gitignore new file +2 -0
@@ -0,0 +1,2 @@ +/gendocs_template +/gendocs_template_min
Signature · 1 line
2.25.2
PATCH 3/3 multiboot2: Make example kernel build at least for i386
In reply to Hans Ulrich NiedermannDocument both boot_i386.S and boot_mips.S, and build at least boot_i386.S.
Building a mips kernel if a mips compiler is actually available still needs some work.
---
.gitignore | 2 ++
configure.ac | 29 ++++++++++++++----
doc/Makefile.am | 9 +++---
doc/{boot.S => boot_i386.S} | 4 +--
doc/multiboot.texi | 59 +++++++++++++++++++++++--------------
5 files changed, 70 insertions(+), 33 deletions(-)
rename doc/{boot.S => boot_i386.S} (94%).gitignore +2 -0
@@ -9,7 +9,9 @@ /aclocal.m4 /autom4te.cache/ /compile +/config.guess /config.h.in +/config.sub /configure /depcomp /doc/mdate-sh
configure.ac +24 -5
@@ -32,11 +32,30 @@ dnl Because recent automake complains about AS, set it here. CCAS="$CC" AC_SUBST(CCAS) -dnl Build the example Multiboot kernel. -AC_ARG_ENABLE(example-kernel, - [ --enable-example-kernel - build the example Multiboot kernel]) -AM_CONDITIONAL(BUILD_EXAMPLE_KERNEL, test "x$enable_example_kernel" = xyes) +dnl Build the example Multiboot kernel (if possible on this host) +AC_CANONICAL_HOST +case "$host" in #( + i[3456]86-*) kernel_boot_arch=i386 + ;; #( + x86_64-*) kernel_boot_arch=i386 + kernel_ccasflags="-m32" + kernel_cflags="-m32" + ;; #( + mips-*) kernel_boot_arch=mips + ;; #( + *) kernel_boot_arch=unsupported + ;; +esac +AC_SUBST([kernel_boot_arch]) +AC_SUBST([kernel_ccasflags]) +AC_SUBST([kernel_cflags]) + +AC_ARG_ENABLE([example-kernel], [dnl +AS_HELP_STRING([--enable-example-kernel], + [build the example Multiboot2 kernel])]) + +AM_CONDITIONAL([BUILD_EXAMPLE_KERNEL], + [test "x$enable_example_kernel" = xyes && test "x$kernel_boot_arch" != "xunsupported"]) dnl Because recent automake complains about CCASFLAGS, set it here. CCASFLAGS='$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)'
doc/Makefile.am +5 -4
@@ -1,6 +1,6 @@ info_TEXINFOS = multiboot.texi -EXAMPLES = boot_mips.S kernel.c multiboot2.h -multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot2.h.texi +EXAMPLES = boot_i386.S boot_mips.S kernel.c multiboot2.h +multiboot_TEXINFOS = boot_i386.S.texi boot_mips.S.texi kernel.c.texi multiboot2.h.texi SRC2TEXI = src2texi noinst_SCRIPTS = $(SRC2TEXI) EXTRA_PROGRAMS = kernel
@@ -9,8 +9,9 @@ pkginclude_HEADERS = multiboot2.h # The example kernel is built if you specify --enable-example-kernel. if BUILD_EXAMPLE_KERNEL noinst_PROGRAMS = kernel -kernel_SOURCES = $(EXAMPLES) -kernel_CFLAGS = -fno-builtin -nostdinc -O -g -Wall \ +kernel_SOURCES = boot_$(kernel_boot_arch).S kernel.c multiboot2.h +kernel_CCASFLAGS = $(kernel_ccasflags) +kernel_CFLAGS = $(kernel_cflags) -fno-builtin -nostdinc -O -g -Wall \ -imacros $(top_builddir)/config.h kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,80100000 -Wl,--build-id=none
doc/boot_i386.S renamed from doc/boot.S +2 -2
@@ -50,11 +50,11 @@ multiboot_header: /* magic */ .long MULTIBOOT2_HEADER_MAGIC /* ISA: i386 */ - .long GRUB_MULTIBOOT_ARCHITECTURE_I386 + .long MULTIBOOT_ARCHITECTURE_I386 /* Header length. */ .long multiboot_header_end - multiboot_header /* checksum */ - .long -(MULTIBOOT2_HEADER_MAGIC + GRUB_MULTIBOOT_ARCHITECTURE_I386 + (multiboot_header_end - multiboot_header)) + .long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT_ARCHITECTURE_I386 + (multiboot_header_end - multiboot_header)) #ifndef __ELF__ address_tag_start: .short MULTIBOOT_HEADER_TAG_ADDRESS
doc/multiboot.texi +37 -22
76 lines not on this page · raw message
Signature · 1 line
2.25.2